|
|
@@ -39,7 +39,6 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getAuditList();
|
|
|
- this.getTableData();
|
|
|
},
|
|
|
methods: {
|
|
|
addDialogEvent(row) {
|
|
|
@@ -52,7 +51,7 @@ export default {
|
|
|
formAdd() {
|
|
|
this.$post("/api/admin/common/addCategory", this.add_form).then(res => {
|
|
|
if (res && res.status === 1) {
|
|
|
- this.getTableData();
|
|
|
+ this.getCategoryMap();
|
|
|
this.$message.success('操作成功')
|
|
|
this.addDialog = false;
|
|
|
this.add_form.parent_id =0;
|
|
|
@@ -134,10 +133,30 @@ export default {
|
|
|
},
|
|
|
//筛选类型
|
|
|
async typechange(val) {
|
|
|
+ let form = this.add_form;
|
|
|
this.page=1;
|
|
|
this.type=val;
|
|
|
this.keywords="";
|
|
|
+ if(val==1)
|
|
|
+ {
|
|
|
+ this.catetype=2;
|
|
|
+ form.type=2;
|
|
|
+ this.add_form=form;
|
|
|
+ }
|
|
|
+ else if(val==2)
|
|
|
+ {
|
|
|
+ this.catetype=3;
|
|
|
+ form.type=3;
|
|
|
+ this.add_form=form;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ this.catetype=0;
|
|
|
+ form.type=0;
|
|
|
+ this.add_form=form;
|
|
|
+ }
|
|
|
this.getAuditList();
|
|
|
+ this.getCategoryMap();
|
|
|
},
|
|
|
//删选状态
|
|
|
async statuschange(val) {
|
|
|
@@ -153,7 +172,7 @@ export default {
|
|
|
this.getAuditList();
|
|
|
},
|
|
|
//获取分类列表
|
|
|
- async getTableData() {
|
|
|
+ async getCategoryMap() {
|
|
|
let id = 1;
|
|
|
let arr = [];
|
|
|
let where={type:this.catetype};
|