|
@@ -80,13 +80,9 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-divider content-position="left">自定义属性</el-divider>
|
|
|
|
- <FromData :Datalist="Datalist" @SetSaveData="SetSaveData" v-if="Datalist && Datalist.length > 0"></FromData>
|
|
|
|
|
|
+ <el-divider content-position="left" v-if="Datalist && Datalist.length > 0">自定义属性</el-divider>
|
|
|
|
+ <FromData :Datalist="Datalist" @SetSaveData="SetSaveData" v-if="Datalist && Datalist.length > 0"></FromData>
|
|
</el-form>
|
|
</el-form>
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<template #footer>
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
<el-button @click="showDialog = false">取消</el-button>
|
|
<el-button @click="showDialog = false">取消</el-button>
|
|
@@ -153,11 +149,8 @@ const handleSelectionChange = (value: any) => {
|
|
|
|
|
|
const onSubmit = async () => {
|
|
const onSubmit = async () => {
|
|
await formRef.value.validate();
|
|
await formRef.value.validate();
|
|
-
|
|
|
|
const theApi = formData.id ? api.dev_asset.edit : api.dev_asset.add;
|
|
const theApi = formData.id ? api.dev_asset.edit : api.dev_asset.add;
|
|
-
|
|
|
|
await theApi(formData);
|
|
await theApi(formData);
|
|
-
|
|
|
|
ElMessage.success('操作成功');
|
|
ElMessage.success('操作成功');
|
|
resetForm();
|
|
resetForm();
|
|
showDialog.value = false;
|
|
showDialog.value = false;
|
|
@@ -183,7 +176,6 @@ const open = async (row: any, productInfo: any) => {
|
|
resetForm();
|
|
resetForm();
|
|
showDialog.value = true;
|
|
showDialog.value = true;
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
- //获取区域
|
|
|
|
system.org.getList({ status: 1 }).then((res: any) => {
|
|
system.org.getList({ status: 1 }).then((res: any) => {
|
|
res.forEach((item) => {
|
|
res.forEach((item) => {
|
|
item.id = item.id.toString();
|
|
item.id = item.id.toString();
|
|
@@ -199,18 +191,13 @@ const open = async (row: any, productInfo: any) => {
|
|
id: getIdByKey(row.productKey),
|
|
id: getIdByKey(row.productKey),
|
|
key: row.productKey,
|
|
key: row.productKey,
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
//根据产品ID获取设备列表
|
|
//根据产品ID获取设备列表
|
|
api.device.allList({ productId: productInfo.id }).then((resd: any) => {
|
|
api.device.allList({ productId: productInfo.id }).then((resd: any) => {
|
|
deviceList.value = resd.device || [];
|
|
deviceList.value = resd.device || [];
|
|
});
|
|
});
|
|
-
|
|
|
|
})
|
|
})
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
//获取部门
|
|
//获取部门
|
|
api.dept.getList({ status: -1 }).then((res: any) => {
|
|
api.dept.getList({ status: -1 }).then((res: any) => {
|
|
res.forEach((item) => {
|
|
res.forEach((item) => {
|
|
@@ -219,7 +206,6 @@ const open = async (row: any, productInfo: any) => {
|
|
deptData.value = res || [];
|
|
deptData.value = res || [];
|
|
});
|
|
});
|
|
|
|
|
|
-
|
|
|
|
if (row.id) {
|
|
if (row.id) {
|
|
api.dev_asset.detail({ deviceKey: row.deviceKey }).then((resde: any) => {
|
|
api.dev_asset.detail({ deviceKey: row.deviceKey }).then((resde: any) => {
|
|
Object.assign(formData, { ...resde });
|
|
Object.assign(formData, { ...resde });
|