update 设备类型,父类选择

This commit is contained in:
lb
2023-02-02 10:14:26 +08:00
parent c705b591b1
commit 6063f40606
3 changed files with 51 additions and 29 deletions

View File

@@ -26,7 +26,13 @@
:page-size.sync="pageSize" -->
<DialogWithMenu ref="edit-dialog" v-if="dialogType === DIALOG_WITH_MENU && dialogVisible" :configs="dialogConfigs" @refreshDataList="getList" />
<DialogJustForm ref="edit-dialog" v-if="dialogType === DIALOG_JUST_FORM && dialogVisible" :configs="dialogConfigs" @refreshDataList="getList" />
<DialogJustForm
ref="edit-dialog"
v-if="dialogType === DIALOG_JUST_FORM && dialogVisible"
:configs="dialogConfigs"
@refreshDataList="getList"
@dialog-closed="destroyDialog"
/>
</div>
</template>
@@ -89,6 +95,12 @@ export default {
this.initDataWhenLoad && this.getList();
},
methods: {
/* 从dom移除对话框 */
destroyDialog() {
// console.log('[ListViewWithHead] destroyDialog')
this.dialogVisible = false
},
/**
* 转换服务器数据的中间层
* 为了抹平真实服务器数据和我本地的测试服务器数据的差异
@@ -134,10 +146,10 @@ export default {
// // 如果需要树形结构的列表
// return this.reConstructDataList(res.data.list)
// } else {
return {
...item,
id: item._id ?? item.id,
};
return {
...item,
id: item._id ?? item.id,
};
// }
});
// this.dataList = res.data.records;

View File

@@ -74,7 +74,7 @@ export default function () {
},
{
prop: "parentId",
select: true,
cascader: true,
options: [
// {label: '父类1', value: '1'},
// {label: '父类2', value: '2'},
@@ -88,8 +88,8 @@ export default function () {
})
},
label: "父类",
rules: { required: true, message: "not empty", trigger: "change" },
elparams: { placeholder: "请输选择父类" },
rules: { required: false, message: "not empty", trigger: "change" },
elparams: { placeholder: "请输选择父类", 'show-all-levels': false, props: { checkStrictly: true } },
},
],
// [{ textarea: true, label: "描述信息", prop: "description", elparams: { placeholder: "描述信息" } }],