报废原因管理bug修复

This commit is contained in:
hongchao 2025-01-17 11:25:21 +08:00
parent 9f98a65dea
commit 1afa702f6a
1 changed files with 13 additions and 3 deletions

View File

@ -251,7 +251,10 @@ export default {
parentOption: [],
typeOption: [],
//
form: {},
form: {
parentId: undefined,
typeId: undefined,
},
//
rules: {
parentId: [
@ -265,7 +268,7 @@ export default {
{
required: true,
message: "名称不能为空",
trigger: "change",
trigger: "blur",
},
],
reason: [
@ -299,6 +302,7 @@ export default {
/** 根据二级查三级类型下拉框 */
handleChange() {
this.typeOption = [];
setTimeout(()=>{
getTypeOptionInfoThree({parentId:this.form.parentId}).then((response) => {
response.data.forEach((item) => {
this.typeOption.push({
@ -306,7 +310,9 @@ export default {
typeName: item.typeName,
});
});
this.form.typeId = null; //
});
},500)
},
@ -323,6 +329,7 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
// this.form.typeId = undefined; //
this.showDevice = true;
this.title = "新增";
},
@ -347,7 +354,10 @@ export default {
},
//
reset() {
this.form = {};
this.form = {
parentId: undefined,
typeId: undefined,
};
this.resetForm("form");
},