diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 556381e2b..726a682cf 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -75,7 +75,7 @@ - @@ -184,28 +184,28 @@ @cancel="handleCancel" > - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
{ if (res.success) { @@ -708,9 +708,9 @@ getAction('paramsCollectManifestLog/paramsCollectManifestLogEO/page', query).then((res) => { if (res.success) { this.dataSourcehistory = res.result.records - if(this.dataSourcehistory && this.dataSourcehistory.length > 0){ - this.dataSourcehistory.forEach(val=>{ - val.logContent = val.logContent.replace(/\"/g,"\"") + if (this.dataSourcehistory && this.dataSourcehistory.length > 0) { + this.dataSourcehistory.forEach(val => { + val.logContent = val.logContent.replace(/\"/g, '"') }) } this.total = res.result.total @@ -728,11 +728,11 @@ this.pageNohistory = 1 this.visible = false }, - collectionForm(){ + collectionForm() { this.getTableList() }, - consolidateData(){ - this.dataSource = [...this.dataSource] + consolidateData() { + this.dataSource = [...this.dataSource] console.log(this.dataSource) }, getAndUserId(result) { @@ -776,18 +776,18 @@ } let params = { paramsManifestId: paramsManifestid, - projectName:this.$route.query.projectName, + projectName: this.$route.query.projectName, flag: '7' } let paramscm = { paramsManifestId: paramsManifestid, - moduleFlag:'参数项收集清单', + moduleFlag: '参数项收集清单', flag: this.$route.query.it === undefined ? '' : '7' } var jsonHead = [] getAction(url, paramscm).then((res) => { if (res.success) { - if(res.result && res.result.length > 0){ + if (res.result && res.result.length > 0) { jsonHead = res.result this.columns = [] let num = 0 @@ -812,7 +812,7 @@ customRender: 'detailClick', title: 'titleName' + num } - console.log( this.content," this.content this.content this.content this.content this.content") + console.log(this.content, ' this.content this.content this.content this.content this.content') // 非配置列 } else { this.columns.push({ @@ -873,17 +873,17 @@ } } - if(res.isLock && res.isLock === '0'){ + if (res.isLock && res.isLock === '0') { this.colIndexs.push(index) } }) this.columns = [...this.columns] - this.colIndexs.forEach((item)=>{ - this.minWidthColumns.push([this.columns[item],500]) + this.colIndexs.forEach((item) => { + this.minWidthColumns.push([this.columns[item], 500]) }) - this.$emit('getcustomizeList',checkedList) + this.$emit('getcustomizeList', checkedList) this.$forceUpdate() - }else{ + } else { getAction(this.url.tableHeader, params).then((val) => { if (val.success) { jsonHead = val.result @@ -894,7 +894,7 @@ jsonHead.forEach((res, index) => { // console.log(res) // 配置列 - if(res.headFieldCn == '操作'){ + if (res.headFieldCn == '操作') { res.field = 'operation' } checkedList.push(res.field) @@ -913,7 +913,7 @@ customRender: 'detailClick', title: 'titleName' + num } - console.log( this.content," this.content this.content this.content this.content this.content") + console.log(this.content, ' this.content this.content this.content this.content this.content') // 非配置列 } else { this.columns.push({ @@ -965,15 +965,15 @@ } } - if(res.isLock && res.isLock === '0'){ + if (res.isLock && res.isLock === '0') { this.colIndexs.push(index) } }) this.columns = [...this.columns] - this.colIndexs.forEach((item)=>{ - this.minWidthColumns.push([this.columns[item],500]) + this.colIndexs.forEach((item) => { + this.minWidthColumns.push([this.columns[item], 500]) }) - this.$emit('getcustomizeList',checkedList) + this.$emit('getcustomizeList', checkedList) this.$forceUpdate() } }) @@ -1016,9 +1016,8 @@ Object.keys(Obj).forEach((item) => { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { - for (const key in Obj[item].paramsConfigData){ - Obj[item].paramsConfigData[key].forEach((itemLi) => - { + for (const key in Obj[item].paramsConfigData) { + Obj[item].paramsConfigData[key].forEach((itemLi) => { itemLi.isLock = 1 if (itemLi.type === 'pull_more') { @@ -1040,12 +1039,12 @@ res.result.records.forEach((Obj) => { Object.keys(Obj).forEach((item) => { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { - for (const key in Obj[item].paramsConfigData){ + for (const key in Obj[item].paramsConfigData) { Obj[item].paramsConfigData[key].forEach((itemLi) => { if (itemLi.type === 'pull_more') { itemLi.dataValue = itemLi.dataValue === null ? [] : itemLi.dataValue.split(',') } - if (Obj.state == '已同步至上报库' || Obj.state == 'Synced to library'){ + if (Obj.state == '已同步至上报库' || Obj.state == 'Synced to library') { Obj[item].referencesColFlag = '1' itemLi.isLock = '1' } @@ -1078,11 +1077,11 @@ }, tableOnChange(pagination, filters, sorter) { this.orderBy = sorter.order == 'ascend' ? '1' : '2' - if(sorter.columnKey == 'nioNumber'){ + if (sorter.columnKey == 'nioNumber') { sorter.columnKey = 'nio_number' - }else if (sorter.columnKey == 'dutyTerritory'){ + } else if (sorter.columnKey == 'dutyTerritory') { sorter.columnKey = 'duty_territory' - }else if (sorter.columnKey == 'reportTime'){ + } else if (sorter.columnKey == 'reportTime') { sorter.columnKey = 'report_time' } this.orderByField = sorter.columnKey @@ -1103,6 +1102,12 @@ paramsManifestid = this.$route.query.it url = 'params/collectManifestHistory/list' } + let formInline = JSON.parse(JSON.stringify(this.formInline)) + Object.keys(formInline).forEach(res => { + if (formInline[res] && formInline[res] instanceof Array) { + formInline[res] = formInline[res].join(',') + } + }) let params = { pageNo: this.pageNo, pageSize: this.pageSize, @@ -1110,7 +1115,7 @@ paramsManifestId: paramsManifestid, orderBy: this.orderBy, orderByField: this.orderByField, - ...this.formInline, + ...formInline, ...currentPersonRole, ...this.queryParamQuery } @@ -1140,13 +1145,13 @@ res.result.records.forEach((Obj) => { Object.keys(Obj).forEach((item) => { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { - for (const key in Obj[item].paramsConfigData){ + for (const key in Obj[item].paramsConfigData) { Obj[item].paramsConfigData[key].forEach((itemLi) => { // console.log(item) // console.log(this.currentPersonRole) - if((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol'){ + if ((this.currentPersonRole == 'homo' || this.currentPersonRole == 'admin') && item == 'referencesCol') { itemLi.isLock = 0 - }else{ + } else { itemLi.isLock = 1 } if (itemLi.type === 'pull_more') { @@ -1174,12 +1179,12 @@ res.result.records.forEach((Obj) => { Object.keys(Obj).forEach((item) => { if (Obj[item] instanceof Object && Obj[item].controlType !== undefined) { - for (const key in Obj[item].paramsConfigData){ + for (const key in Obj[item].paramsConfigData) { Obj[item].paramsConfigData[key].forEach((itemLi) => { if (itemLi.type === 'pull_more') { itemLi.dataValue = !itemLi.dataValue ? [] : itemLi.dataValue.split(',') } - if (Obj.state == '已同步至上报库' || Obj.state == 'Synced to library'){ + if (Obj.state == '已同步至上报库' || Obj.state == 'Synced to library') { itemLi.isLock = '1' Obj[item].referencesColFlag = '1' } @@ -1244,17 +1249,20 @@ .table .ant-table-column-title { font-weight: bold; } - .textData{ - font-family:cursive; + + .textData { + font-family: cursive; }