|
|
@@ -19,7 +19,21 @@
|
|
|
<el-table-column prop="appNames" label="关联应用" width="120" />
|
|
|
<el-table-column prop="appIds" label="关联应用ID" width="150" />
|
|
|
<el-table-column prop="templateCode" label="配置编码" width="90" />
|
|
|
- <el-table-column prop="templateContent" label="配置内容" />
|
|
|
+ <el-table-column prop="templateContent" label="配置内容">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-popover
|
|
|
+ class="box-item"
|
|
|
+ :title="`${scope.row.templateName}的配置内容`"
|
|
|
+ :width="400"
|
|
|
+ placement="top-start"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ {{ scope.row.templateContent }}
|
|
|
+ </template>
|
|
|
+ <div v-html="scope.row.templateContent.split(',').filter(Boolean).map(item => item.trim()).join('<br/>')"></div>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="templateId" label="配置模版ID" width="160" />
|
|
|
<el-table-column prop="templateName" label="配置名称" width="100" />
|
|
|
<el-table-column prop="createTime" label="创建时间" width="160">
|
|
|
@@ -90,7 +104,7 @@
|
|
|
import { useStore } from 'vuex'
|
|
|
|
|
|
const store = useStore()
|
|
|
- const { dictData, loadDictData } = useGetDictList();
|
|
|
+ const { dictData, loadDictData, getOptions, getDictionaryName } = useGetDictList();
|
|
|
const form = ref(null);
|
|
|
const tableData = ref([]);
|
|
|
|
|
|
@@ -133,7 +147,7 @@
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
await getEnabledListData()
|
|
|
- // await settingData()
|
|
|
+ await settingData()
|
|
|
await getList();
|
|
|
await getRiskOptions()
|
|
|
});
|
|
|
@@ -149,29 +163,9 @@
|
|
|
options: appListOptions.value,
|
|
|
},
|
|
|
]
|
|
|
-
|
|
|
- function getOptions(name) {
|
|
|
- const options = dictData.value
|
|
|
- .filter(item => item.typeCode === name) // 只取启用的项
|
|
|
- .sort((a, b) => a.sort - b.sort) // 按 sort 排序
|
|
|
- .map(item => ({
|
|
|
- label: item.dictionaryName,
|
|
|
- value: Number(item.dictionaryCode) // 将字符串"1"/"0"转为数字
|
|
|
- }));
|
|
|
- return options
|
|
|
- }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- function getDictionaryName(typeCode, dictionaryCode) {
|
|
|
- const item = dictData.value.find(
|
|
|
- entry =>
|
|
|
- entry.typeCode === typeCode &&
|
|
|
- entry.dictionaryCode === String(dictionaryCode)
|
|
|
- );
|
|
|
- return item ? item.dictionaryName : '';
|
|
|
- }
|
|
|
-
|
|
|
const appListData = ref([])
|
|
|
const appListOptions = ref([])
|
|
|
const getEnabledListData = async () => {
|
|
|
@@ -378,14 +372,13 @@
|
|
|
// 提交内容
|
|
|
riskRelativeApps(formEdit.value).then((res) => {
|
|
|
ElMessage.success('关联应用成功')
|
|
|
+ layer1.value.show = false;
|
|
|
getList();
|
|
|
})
|
|
|
} else {
|
|
|
console.log("error submit!", fields);
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- layer1.value.show = false;
|
|
|
}
|
|
|
// #endregion
|
|
|
|