|
@@ -96,6 +96,7 @@
|
|
|
tagTypes: [],
|
|
|
Adscriptions: [],
|
|
|
tagTypesList:[],
|
|
|
+ searched:false,
|
|
|
filter: {
|
|
|
tagType: [], //标签类型
|
|
|
tagAdscription: '', //标签归属
|
|
@@ -109,6 +110,14 @@
|
|
|
created() {
|
|
|
this.getDropList();
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ 'filter':{
|
|
|
+ handler:function(){
|
|
|
+ this.searched = false;
|
|
|
+ },
|
|
|
+ deep:true
|
|
|
+ }
|
|
|
+ },
|
|
|
beforeRouteEnter(to, from, next){
|
|
|
next(vm => {
|
|
|
//const pm = to.param;
|
|
@@ -130,6 +139,7 @@
|
|
|
},
|
|
|
getDataList() {
|
|
|
const param = this.getFilterItems();
|
|
|
+ this.searched = true;
|
|
|
api.getQuestionList(param).then((res) => {
|
|
|
const list = [...res.data.data.records];
|
|
|
for (var i = 0; i < list.length; i++) {
|
|
@@ -154,17 +164,19 @@
|
|
|
this.getDataList();
|
|
|
},
|
|
|
addIndeptTag() {
|
|
|
+ const pam = this.searched?{currentPage:this.currentPage,
|
|
|
+ filter:this.filter}:{currentPage:this.currentPage};
|
|
|
this.$router.push({name:'AddCombinQuestion',
|
|
|
- params:{currentPage:this.currentPage,
|
|
|
- filter:this.filter}});
|
|
|
+ params:pam});
|
|
|
},
|
|
|
modifyIndeptTag(row) {
|
|
|
api.questionDetail({id:row.id}).then((res)=>{
|
|
|
const {code,data,msg} = res.data;
|
|
|
if(code=='0'){
|
|
|
const infos = Object.assign({},row,data);
|
|
|
- this.$router.push({name:'AddCombinQuestion',params:{isEdit:true,data:infos,currentPage:this.currentPage,
|
|
|
- filter:this.filter}});
|
|
|
+ const pam = this.searched?{currentPage:this.currentPage,
|
|
|
+ filter:this.filter}:{currentPage:this.currentPage};
|
|
|
+ this.$router.push({name:'AddCombinQuestion',params:Object.assign(pam,{isEdit:true,data:infos})});
|
|
|
}else{
|
|
|
this.$message({
|
|
|
message: msg,
|