处理先查看在编辑后 表单显示异常问题

This commit is contained in:
caorui 2024-09-14 14:01:56 +08:00
parent 0ea75d967b
commit 38ed4ff43f
2 changed files with 21 additions and 3 deletions

View File

@ -26,6 +26,7 @@
{{ taskStatusDist[row.type] }}
</template>
<template #status="{ row }">
<div>
<el-switch
v-model="row.status"
:active-value="'1'"
@ -35,6 +36,7 @@
@change="StopMessageTemplate(row)"
>
</el-switch>
</div>
</template>
</base-table>
</div>
@ -350,4 +352,7 @@ export default {
color: #409eff;
cursor: pointer;
}
::v-deep .el-switch{
margin-bottom: 0 !important;
}
</style>

View File

@ -127,13 +127,22 @@ export default {
},
],
billID: null,
appArrData:[]
appArrData: [],
};
},
methods: {
openDialog(type, row = {}) {
this.dialogVisible = true;
this.billID = row ? row.id : null;
this.formRow = configData.formRow;
this.basicsRules = configData.basicsRules
this.funData = [
{
color: "#ff0000",
text: "删除",
handle: "deleteData",
},
];
if (type == "add") {
this.dialogTitle = "新增";
}
@ -144,6 +153,7 @@ export default {
this.dialogTitle = "查看";
this.formRow = configData.formRowShow;
this.funData = [];
this.basicsRules = {}
}
if (type != "show") {
this.getMessageList();
@ -174,7 +184,10 @@ export default {
const result = this.appArrData
.filter((item) => appList.includes(item.id)) // id
.map((item) => ({ id: item.id, label: item.name })); // idappName
this.apiClassificationData = [{ id: res.attribute.father.appIdList, label: "全部" }, ...result];
this.apiClassificationData = [
{ id: res.attribute.father.appIdList, label: "全部" },
...result,
];
res.attribute.father.appIdList = appList;
res.attribute.father.warningAppId =
res.attribute.father.warningAppId.split(",");
@ -325,7 +338,7 @@ export default {
{}
);
if (res.status == "200") {
this.appArrData = res.attribute
this.appArrData = res.attribute;
this.formRow[0].elCol[1].options = res.attribute;
}
},