优化当获取不到应用时,出现的逻辑错误

This commit is contained in:
aixianling
2023-01-05 09:10:12 +08:00
parent b69b0e878a
commit c42f6006b8
2 changed files with 5 additions and 4 deletions

View File

@@ -54,7 +54,8 @@ export default {
multiple: Boolean,
disabled: Boolean,
meta: {default: () => []},
choose: {default: null}
choose: {default: null},
customData: Boolean
},
data() {
return {
@@ -83,8 +84,8 @@ export default {
},
methods: {
getTableData() {
const {page, search, action, meta, searchKey, dict} = this
if (meta.length > 0) {
const {page, search, action, meta, searchKey, dict, customData} = this
if (meta.length > 0 || customData) {
const reg = new RegExp(search[searchKey])
this.handleTableData(meta.filter(e => reg.test(e.label) || reg.test(e.name) || reg.test(dict.getLabel('appsCategory', e.category))))
} else this.instance?.post(action, null, {

View File

@@ -189,7 +189,7 @@
</el-form>
</el-tab-pane>
<el-tab-pane label="方案应用" lazy>
<ai-lib-table :meta="appList" :isShowPagination="false" v-bind="$props" disabled :colConfigs="appListConfigs">
<ai-lib-table :meta="appList" customData :isShowPagination="false" v-bind="$props" disabled :colConfigs="appListConfigs">
<template slot="options" slot-scope="{row}">
<ai-dialog-btn text="编辑" :customFooter="false" dialogTitle="应用配置" width="500px" @onConfirm="handleAppEdit(row)">
<el-form size="small" label-width="80px">