This commit is contained in:
曹辉 2023-01-29 15:09:07 +08:00
parent 04eaeb3dd8
commit 3a4a1396f4
3 changed files with 21 additions and 6 deletions

View File

@ -244,6 +244,7 @@
:clearable="true"
ref="cascader"
:placeholder="form.goodsCategoryName ? form.goodsCategoryName : ''"
:key="isResouceShow"
>
</el-cascader>
<!-- <el-select

View File

@ -148,7 +148,7 @@ export default {
}, 300);
},
},
ruleForm: [],
isResouceShow: 1,
};
},
created() {
@ -261,6 +261,7 @@ export default {
this.$refs.cascader.$refs.panel.clearCheckedNodes();
// 设置为空可以让节点不高亮显示
this.$refs.cascader.$refs.panel.activePath = [];
++this.isResouceShow
},
//页面所属护理站
ParamsStation(item) {
@ -419,7 +420,11 @@ export default {
updatePicture(obj).then((res) => {});
}
this.$modal.msgSuccess("修改成功");
++this.isResouceShow
// 清空选中的节点
this.$refs.cascader.$refs.panel.clearCheckedNodes();
// 设置为空可以让节点不高亮显示
this.$refs.cascader.$refs.panel.activePath = [];
this.open = false;
this.getList();
});
@ -431,6 +436,11 @@ export default {
addGoodsInfo(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站";
++this.isResouceShow
// 清空选中的节点
this.$refs.cascader.$refs.panel.clearCheckedNodes();
// 设置为空可以让节点不高亮显示
this.$refs.cascader.$refs.panel.activePath = [];
this.open = false;
this.getList();
});
@ -501,4 +511,4 @@ export default {
});
},
},
};
};

View File

@ -205,6 +205,7 @@
:show-all-levels="false"
ref="cascader"
:placeholder="form.parentName ? form.parentName : ''"
:key="isResouceShow"
>
</el-cascader>
<!-- <el-input
@ -278,6 +279,7 @@ export default {
components: { stationAcatar },
data() {
return {
isResouceShow: 1,
treeOption: {
lazy: true,
checkStrictly: true, //
@ -379,7 +381,7 @@ export default {
this.loading = true;
this.queryParams.parentId = data.id;
this.queryParams.parentName = data.goodsCategoryName;
this.categoryLevel = data.categoryLevel;
// this.categoryLevel = data.categoryLevel;
this.handleQuery();
getStationCategoryList(data.id).then((res) => {
res.data.forEach((e) => {
@ -425,6 +427,7 @@ export default {
},
//
cancel() {
++this.isResouceShow;
if (this.form.parentId) {
//
this.$refs.cascader.$refs.panel.clearCheckedNodes();
@ -490,8 +493,7 @@ export default {
this.form.parentId = this.queryParams.parentId;
// }
this.form.parentName = this.queryParams.parentName;
this.form.categoryLevel = this.categoryLevel;
console.log(this.form);
// this.form.categoryLevel = this.categoryLevel;
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -523,6 +525,7 @@ export default {
this.$refs.cascader.$refs.panel.clearCheckedNodes();
//
this.$refs.cascader.$refs.panel.activePath = [];
++this.isResouceShow;
this.open = false;
this.getList();
this.info();
@ -534,6 +537,7 @@ export default {
this.$refs.cascader.$refs.panel.clearCheckedNodes();
//
this.$refs.cascader.$refs.panel.activePath = [];
++this.isResouceShow;
this.open = false;
this.getList();
this.info();