From d074064e8d2e4af3aea2f18e24c7fa1d41d3ea51 Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Thu, 16 Jun 2022 16:16:16 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E7=A6=85=E9=81=93bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parameterlist/components/addModel.vue | 48 ++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/jero-web/src/views/parameter/parameterlist/components/addModel.vue b/jero-web/src/views/parameter/parameterlist/components/addModel.vue index 051196609..5feda05b4 100644 --- a/jero-web/src/views/parameter/parameterlist/components/addModel.vue +++ b/jero-web/src/views/parameter/parameterlist/components/addModel.vue @@ -414,13 +414,14 @@ export default { let tt = [] res.result.forEach((item) => { let obj = { - isdisable: false, - certCategory: item.value + certCategory: item.value, + paramsNumber: item.paramsNumber, // 编号 + paramsName: item.paramsName, //参数名称 + description: item.description, // 描述 } tt.push(Object.assign(obj,item)) }) this.contentListStart = tt - // this.contentList = tt } }) }, @@ -448,14 +449,38 @@ export default { }, Onchangelabel(val) { let _tt = [] - this.contentListStart.forEach((itemVal) => { - val.forEach((item) => { - if(itemVal.value === item.value) { - _tt.push(itemVal) - } + if(this.title == '新增') { + this.contentListStart.forEach((itemVal) => { + val.forEach((item) => { + if(itemVal.value === item.value) { + _tt.push(itemVal) + } + }) }) - }) - this.contentList = _tt + this.contentList = _tt + } else { + let _mm = [] + this.contentListStart.forEach((itemVal) => { + val.forEach((item) => { + if(itemVal.value === item.value) { + _mm.push(itemVal) + } + }) + }) + _mm.forEach((item) => { + this.contentListed.forEach((itemVal) => { + // 原编辑的数据 + if(itemVal.certCategory === item.value) { + item.textVal= itemVal.textVal, + item.certCategory= itemVal.certCategory, + item.paramsNumber= itemVal.paramsNumber, // 编号 + item.paramsName= itemVal.paramsName, //参数名称 + item.description= itemVal.description // 描述 + } + }) + }) + this.contentList = _mm + } }, Onchange(val) { if(this.formInline.certCategory == '') { @@ -500,12 +525,13 @@ export default { this.visible = true this.formInline = value this.title = '编辑' + // 获取认证类别 + this.getcontentListedEdit() value.certCategoryParamsInfoEOList.map((item, index) => { item.textVal = item.certCategory_dictText this.contentListed.push(item) }) this.contentList = this.contentListed - console.log(this.contentList,'lllll') }, handleCancel() { this.visible = false