|
@@ -119,6 +119,7 @@ export default {
|
|
|
tagTypes: [],
|
|
|
Adscriptions: [], //标签归属列表
|
|
|
tagTypesList: [], //标签类型列表
|
|
|
+ searched: false,
|
|
|
filter: {
|
|
|
tagType: [], //标签类型
|
|
|
tagAdscription: '', //标签归属
|
|
@@ -135,6 +136,20 @@ export default {
|
|
|
})
|
|
|
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ 'filter': {
|
|
|
+ handler: function () {
|
|
|
+ this.searched = false;
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ //const pm = to.param;
|
|
|
+ Object.assign(vm, to.params);
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
getValue(val) {
|
|
|
// console.log('changeVal', val, this.filter.tagAdscription)
|
|
@@ -157,6 +172,7 @@ export default {
|
|
|
},
|
|
|
getDataList() {
|
|
|
const param = this.getFilterItems();
|
|
|
+ this.searched = true;
|
|
|
api.getTagList(param).then((res) => {
|
|
|
const list = res.data.data.records
|
|
|
for (var i = 0; i < list.length; i++) {
|
|
@@ -181,18 +197,32 @@ export default {
|
|
|
this.getDataList();
|
|
|
},
|
|
|
addTagGroup() {
|
|
|
- this.$router.push({path:'LT-YXSJWH-TJBQZ'})
|
|
|
+ const pam = this.searched ? {
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ filter: this.filter
|
|
|
+ } : {currentPage: this.currentPage};
|
|
|
+ this.$router.push({name: 'AddLabelGroup', params: pam});
|
|
|
},
|
|
|
modifyTagGroup(row, type) {
|
|
|
api.detailsTag({id:row.id}).then((res)=>{
|
|
|
const {code,data,msg} = res.data;
|
|
|
if(code=='0'){
|
|
|
const item = Object.assign({},row,data);
|
|
|
+ const pam = this.searched ? {
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ filter: this.filter
|
|
|
+ } : {currentPage: this.currentPage};
|
|
|
// console.log('item', item)
|
|
|
if(type == 'modify') {
|
|
|
- this.$router.push({name:'AddLabelGroup',params:{isEdit:true,data:item}});
|
|
|
+ this.$router.push({
|
|
|
+ name: 'AddLabelGroup',
|
|
|
+ params: Object.assign(pam, {isEdit: true, data: item})
|
|
|
+ });
|
|
|
} else if( type == 'copy') {
|
|
|
- this.$router.push({name:'AddLabelGroup',params:{isCopy:true,data:item}});
|
|
|
+ this.$router.push({
|
|
|
+ name: 'AddLabelGroup',
|
|
|
+ params: Object.assign(pam, {isCopy: true, data: item})
|
|
|
+ });
|
|
|
} else {
|
|
|
return
|
|
|
}
|