|
|
@@ -1202,8 +1202,8 @@
|
|
|
getLabel() {
|
|
|
return this.categoryIdList
|
|
|
.map((item) => {
|
|
|
- let data = this.$refs.treeSelect.getNodeByValue(item);
|
|
|
- return data.rootCategoryLevelId;
|
|
|
+ let data = this.$refs?.treeSelect?.getNodeByValue(item);
|
|
|
+ return data?.rootCategoryLevelId;
|
|
|
})
|
|
|
.includes('20250317001')
|
|
|
? '生产列表'
|
|
|
@@ -1344,11 +1344,11 @@
|
|
|
watch: {
|
|
|
categoryIdList(val) {
|
|
|
if (val.length > 0) {
|
|
|
- this.$refs.form.clearValidate('categoryId');
|
|
|
+ this.$refs.form?.clearValidate('categoryId');
|
|
|
this.form.categoryId = this.categoryIdList.join(',');
|
|
|
} else {
|
|
|
this.form.categoryId = '';
|
|
|
- this.$refs.form.validateField('categoryId');
|
|
|
+ this.$refs.form?.validateField('categoryId');
|
|
|
}
|
|
|
}
|
|
|
},
|