From 92e59025a7b76a3d7cd79d956b5b7d2d01315acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Fri, 7 Apr 2023 10:22:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=B2=A1=E6=9C=89=E6=9E=9A=E4=B8=BE=E5=80=BC?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PC/src/components/umyTable/index.vue | 6 +++--- fe/PC/src/filters/index.js | 6 ++++++ fe/PC/src/utils/index.js | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/fe/PC/src/components/umyTable/index.vue b/fe/PC/src/components/umyTable/index.vue index a946c772a..5f427db67 100644 --- a/fe/PC/src/components/umyTable/index.vue +++ b/fe/PC/src/components/umyTable/index.vue @@ -702,9 +702,9 @@ export default { background: #f6f7fb !important; border: none !important; - &:last-child{ - background: unset !important; - } + // &:last-child{ + // background: unset !important; + // } } ::v-deep .el-form-item__error{ position: relative; diff --git a/fe/PC/src/filters/index.js b/fe/PC/src/filters/index.js index 92cd33a7e..350d335ff 100644 --- a/fe/PC/src/filters/index.js +++ b/fe/PC/src/filters/index.js @@ -114,6 +114,12 @@ export function isTableColumns(data) { return isData } +/** + * @param {*} index 枚举值 + * @param {*} text 枚举函数名称 + * @param {*} prop 返回字段 + * @param {*} type dictType + */ export function trigger(index, text, prop, type) { let Function = statusType.default[text] return Function(index, prop, type) diff --git a/fe/PC/src/utils/index.js b/fe/PC/src/utils/index.js index 09d37fcee..6cc3b36bc 100644 --- a/fe/PC/src/utils/index.js +++ b/fe/PC/src/utils/index.js @@ -386,12 +386,14 @@ export function removeClass(ele, cls) { //返回 export function Enum(status, index, prop) { + let _no_text = '无' + if(!status)return _no_text if (index != undefined) { //如果传入的是index if (prop === 'color') { const domColor = status[index] ? status[index][prop] : "" return 'color:' + domColor } else { - const dom = status[index] ? status[index][prop] : "无" + const dom = status[index] ? status[index][prop] : _no_text return dom } } else { From d0640b8f6fdbb2aefe6c3e74fef3679aa0a89a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Fri, 7 Apr 2023 10:25:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?dictFormatData=E6=96=B9=E6=B3=95=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PC/src/utils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/PC/src/utils/index.js b/fe/PC/src/utils/index.js index 6cc3b36bc..aec7bb21e 100644 --- a/fe/PC/src/utils/index.js +++ b/fe/PC/src/utils/index.js @@ -494,7 +494,7 @@ export function getMatchRegConformValue(type,defaultValue,fixedNum){ // 字典格式化数据结构 export function dictFormatData() { - return new Promise(resolve => { + return new Promise((resolve,reject) => { let rs = [] let childRs = {} let param = { From 6b9fe61eb30c2c7dcf935766c38bf0502483a6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Fri, 7 Apr 2023 10:29:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PC/src/filters/index.js | 1 + fe/PC/src/utils/request.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fe/PC/src/filters/index.js b/fe/PC/src/filters/index.js index 350d335ff..a674ed054 100644 --- a/fe/PC/src/filters/index.js +++ b/fe/PC/src/filters/index.js @@ -122,6 +122,7 @@ export function isTableColumns(data) { */ export function trigger(index, text, prop, type) { let Function = statusType.default[text] + if(!Function)return '无' return Function(index, prop, type) } // 多数据源,集合 diff --git a/fe/PC/src/utils/request.js b/fe/PC/src/utils/request.js index 58180b04e..1c1750bf9 100644 --- a/fe/PC/src/utils/request.js +++ b/fe/PC/src/utils/request.js @@ -91,7 +91,7 @@ service.interceptors.response.use( }, error => { let err = error.response.data.error // for debug - if (err.validationErrors) { + if (err && err.validationErrors) { for (let item in err.validationErrors) { Message({ message: err.validationErrors[item].message,