From 62ee6c395c2bad6b34e492582c502a6001c61e44 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Thu, 6 Apr 2023 16:04:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=94=B6=E9=9B=86=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=A1=A8=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/tableCollection/index.vue | 7 +- .../src/components/tableCollection/index1.vue | 20 +- .../parameter/managementdetails/index.vue | 236 ++++++++++-------- .../ParameterItemCollectionList.vue | 2 + 4 files changed, 158 insertions(+), 107 deletions(-) diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 5bb51b711..19d15e003 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -779,8 +779,11 @@ projectName:this.$route.query.projectName, flag: '7' } + let paramscm = { + moduleFlag:'参数项收集清单' + } var jsonHead = [] - getAction(url, params).then((res) => { + getAction(url, paramscm).then((res) => { if (res.success) { if(res.result && res.result.length > 0){ jsonHead = res.result @@ -874,7 +877,7 @@ }) let checkedList = [] this.columns.forEach((item) => { - checkedList.push(item.dataIndex) + checkedList.push(item.field) }) this.$emit('getcustomizeList',checkedList) this.$forceUpdate() diff --git a/jero-web/src/components/tableCollection/index1.vue b/jero-web/src/components/tableCollection/index1.vue index f8ecad5d1..3b8372c14 100644 --- a/jero-web/src/components/tableCollection/index1.vue +++ b/jero-web/src/components/tableCollection/index1.vue @@ -563,7 +563,7 @@ if (this.$route.query.it === undefined) { // 页面跳转 paramsManifestid = this.$route.query.id - url = this.url.tableHeader + url = 'head/headCustomEO/list' } else { // 历史版本 paramsManifestid = this.$route.query.it @@ -573,9 +573,18 @@ paramsManifestId: paramsManifestid, flag: '8' } + var jsonHead = [] getAction(url, params).then((res) => { - if (res.success) { - var jsonHead = res.result + if (res.success) { + if(res.result && res.result.length > 0){ + jsonHead = res.result + }else{ + getAction(this.url.tableHeader, params).then((val) => { + if (val.success) { + jsonHead = val.result + } + }) + } this.columns = [] let num = 0 this.content = [] @@ -653,6 +662,11 @@ this.columns = [...this.columns] this.colIndexs.forEach((item)=>{ this.minWidthColumns.push([this.columns[item],500]) + let checkedList = [] + this.columns.forEach((item) => { + checkedList.push(item.field) + }) + this.$emit('getcustomizeList',checkedList) }) },300) console.log(this.columns) diff --git a/jero-web/src/views/parameter/managementdetails/index.vue b/jero-web/src/views/parameter/managementdetails/index.vue index 2077e1322..95b2a4d09 100644 --- a/jero-web/src/views/parameter/managementdetails/index.vue +++ b/jero-web/src/views/parameter/managementdetails/index.vue @@ -115,7 +115,7 @@ {{ item.name }} + :key="key" :value="item.field">{{ item.db_field_txt }}
@@ -137,6 +137,7 @@ :formInline='formInline' :currentPersonRole='currentPersonRole' @getDataSource="getDataSource" @handlePreservation="handlePreservation" + @getcustomizeList="getcustomizeList" @value='value' @listReset='listReset' @LoginUserType='LoginUserType'/>
@@ -268,120 +269,150 @@ indeterminate: false, checkAll: false, selectedValue: [], - checkedList: ['NiONumber', 'ParameterName', 'operation'], - customizeList: [ - { - sort: '1', - name: this.$t('NiONumber'), - disabled: true, - headFieldCn: 'NIO编号', - headFieldEn: 'NiONumber', - field: 'NiONumber', - key: 1, - moduleFlag: '上报库', - status: 1 - }, - { - sort: '2', - disabled: true, - name: this.$t('ParameterName'), - headFieldCn: '参数名称', - headFieldEn: 'Parameter Name', - field: 'ParameterName', - key: 2, - moduleFlag: '上报库', - status: 2 - }, - { - sort: '', - name: this.$t('ParameterDescription'), - headFieldCn: '参数说明', - headFieldEn: 'Parameter Description', - field: 'ParameterDescription', - key: 3, - moduleFlag: '上报库' - }, - { - sort: '', - name: this.$t('status'), - headFieldCn: '状态', - headFieldEn: 'status', - field: 'status', - key: 4, - moduleFlag: '上报库' - }, - { - sort: '', - name: this.$t('areaOfResponsibility'), - headFieldCn: '责任领域', - headFieldEn: 'Responsible Field', - field: 'areaOfResponsibility', - key: 5, - moduleFlag: '上报库' - }, - { - sort: '', - name: this.$t('engineeringInterfacePerson'), - headFieldCn: '工程接口人', - headFieldEn: 'Eng. Interface', - field: 'engineeringInterfacePerson', - key: 6, - moduleFlag: '上报库' - }, - { - sort: '', - name: this.$t('completedBy'), - headFieldCn: '填写人', - headFieldEn: 'Filled by', - field: 'completedBy', - key: 15, - moduleFlag: '上报库' - }, - { - sort: '', - name: this.$t('Version'), - headFieldCn: '版本', - headFieldEn: 'Version', - field: 'Version', - key: 23, - moduleFlag: '上报库' - }, - { - sort: '', - name: this.$t('synchronizationtime'), - headFieldCn: '同步时间', - headFieldEn: 'Synchronization time', - field: 'synchronizationtime', - key: 21, - moduleFlag: '上报库' - }, - { - sort: '', - disabled: true, - name: this.$t('operation'), - headFieldCn: '操作', - headFieldEn: 'Operation', - key: 35, - field: 'operation', - moduleFlag: '上报库', - status: 2 - } - ], + checkedList: ['nio_number', 'params_name', 'operation'], + customizeList:[], + // customizeList: [ + // { + // sort: '1', + // name: this.$t('NiONumber'), + // disabled: true, + // headFieldCn: 'NIO编号', + // headFieldEn: 'NiONumber', + // field: 'NiONumber', + // key: 1, + // moduleFlag: '上报库', + // status: 1 + // }, + // { + // sort: '2', + // disabled: true, + // name: this.$t('ParameterName'), + // headFieldCn: '参数名称', + // headFieldEn: 'Parameter Name', + // field: 'ParameterName', + // key: 2, + // moduleFlag: '上报库', + // status: 2 + // }, + // { + // sort: '', + // name: this.$t('ParameterDescription'), + // headFieldCn: '参数说明', + // headFieldEn: 'Parameter Description', + // field: 'ParameterDescription', + // key: 3, + // moduleFlag: '上报库' + // }, + // { + // sort: '', + // name: this.$t('status'), + // headFieldCn: '状态', + // headFieldEn: 'status', + // field: 'status', + // key: 4, + // moduleFlag: '上报库' + // }, + // { + // sort: '', + // name: this.$t('areaOfResponsibility'), + // headFieldCn: '责任领域', + // headFieldEn: 'Responsible Field', + // field: 'areaOfResponsibility', + // key: 5, + // moduleFlag: '上报库' + // }, + // { + // sort: '', + // name: this.$t('engineeringInterfacePerson'), + // headFieldCn: '工程接口人', + // headFieldEn: 'Eng. Interface', + // field: 'engineeringInterfacePerson', + // key: 6, + // moduleFlag: '上报库' + // }, + // { + // sort: '', + // name: this.$t('completedBy'), + // headFieldCn: '填写人', + // headFieldEn: 'Filled by', + // field: 'completedBy', + // key: 15, + // moduleFlag: '上报库' + // }, + // { + // sort: '', + // name: this.$t('Version'), + // headFieldCn: '版本', + // headFieldEn: 'Version', + // field: 'Version', + // key: 23, + // moduleFlag: '上报库' + // }, + // { + // sort: '', + // name: this.$t('synchronizationtime'), + // headFieldCn: '同步时间', + // headFieldEn: 'Synchronization time', + // field: 'synchronizationtime', + // key: 21, + // moduleFlag: '上报库' + // }, + // { + // sort: '', + // disabled: true, + // name: this.$t('operation'), + // headFieldCn: '操作', + // headFieldEn: 'Operation', + // key: 35, + // field: 'operation', + // moduleFlag: '上报库', + // status: 2 + // } + // ], } }, props: {}, mounted() { // this.Getlist() this.getTableList() + this.getcustomizeList() document.title = this.$t('ParameterViewPage') }, methods: { onCheckAllChange(e) { - let selectedValue = ['NiONumber', 'ParameterName', 'operation'] + let selectedValue = ['nio_number', 'params_name', 'operation'] this.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : selectedValue this.selectedValue = this.checkedList this.indeterminate = false }, + getcustomizeList(item){ + let params = { + paramsManifestId: this.$route.query.id, + projectName:this.$route.query.projectName, + flag: '7' + } + getAction('params/collectManifest/getHeader', params).then((res) => { + if (res.success) { + let List = [] + res.result.forEach((item,index) => { + if(!item.isLock){ + if(item.headFieldCn == '操作'){ + item.field = 'operation' + item.disabled = true + }else if(item.headFieldCn == 'NIO编号' || item.headFieldCn == '参数名称'){ + item.disabled = true + } + List.push(item) + } + }) + this.customizeList = List + } + }) + if(item){ + console.log(item) + this.checkedList = item + } + }, onChange() { this.selectedValue = this.checkedList }, @@ -399,7 +430,8 @@ uniqueArray.forEach(item => { this.customizeList.forEach((val, index) => { if (item == val.field) { - val.sort = index + 1 + // val.sort = index + 1 + val.dbFieldName = val.db_field_name list.push(val) } }) diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 863f2c34e..13030bab1 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -314,6 +314,7 @@ @getDataSource="getDataSource" @handlePreservation="handlePreservation" @value='value' + @getcustomizeList="getcustomizeList" @listReset='listReset' @LoginUserType='LoginUserType'/> @@ -1776,6 +1777,7 @@ this.customizeList.forEach((val, index) => { if (item == val.field) { // val.sort = index + 1 + val.dbFieldName = val.db_field_name list.push(val) } })