From 96da56370a8c8474da67ddbd393a32b189c3830c Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Fri, 1 Jul 2022 11:24:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93=E5=B7=B2?= =?UTF-8?q?=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 1 + .../src/components/CollectionType/index.vue | 362 ++++++++++-------- .../src/components/tableCollection/index.vue | 7 +- .../components/uploadFileChangeDown/file.vue | 348 ++++++++--------- .../ParameterItemCollectionList.vue | 38 +- .../components/TaskParameterCollection.vue | 30 +- 7 files changed, 419 insertions(+), 368 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 31adbbc6f..5d3f89fe0 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1064,4 +1064,5 @@ module.exports = { Templatenamelist: 'Template name - parameter item collection list', newNiONumber: 'Number', English: 'English', + requiredParametersEmpty:'Required parameters cannot be empty', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 16d90e5b3..aa0add5a9 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1068,4 +1068,5 @@ module.exports = { Templatenamelist: '模板名称-参数项收集清单', newNiONumber: 'NIO编号', English:'英文', + requiredParametersEmpty:'必填参数不能为空', } \ No newline at end of file diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index 1c12046db..04fc59443 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -1,7 +1,7 @@ diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index b5eaff5d6..93de6bb5d 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -360,7 +360,7 @@ } getAction(this.url.getLoginUserType, params).then((res) => { if (res.success) { - this.getTableList() + this.getTableList(res.result[0].value) this.$emit('LoginUserType', res.result) } }) @@ -455,7 +455,7 @@ cancleoperationFailed(){ this.selectedRowKeys = [] }, - getTableList() { + getTableList(currentPersonRole) { // todo let paramsManifestid let url @@ -464,13 +464,12 @@ paramsManifestid = this.$route.query.id url = this.url.tableList } else { - console.log('历史版本呢') // 历史版本 paramsManifestid = this.$route.query.it url = 'params/collectManifestHistory/list' } let params = { - userTypes: this.currentPersonRole, + userTypes: this.currentPersonRole || currentPersonRole, paramsManifestId: paramsManifestid, ...this.formInline } diff --git a/jero-web/src/components/uploadFileChangeDown/file.vue b/jero-web/src/components/uploadFileChangeDown/file.vue index 906c22484..47f4c1df5 100644 --- a/jero-web/src/components/uploadFileChangeDown/file.vue +++ b/jero-web/src/components/uploadFileChangeDown/file.vue @@ -5,7 +5,8 @@ {{ this.template.templateName === undefined || this.template.templateName === null? '暂无模板': this.template.templateName }} - + @@ -34,140 +35,121 @@ \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index b0badbc4e..bb640dbd3 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -796,7 +796,7 @@ this.currentPersonRole = val.length >= 1 ? val[0].value : '' } this.RoleType = val - this.formInlineRoleSwitching.roleSwitchingCode = JSON.parse(localStorage.getItem('currentPersonRole')) === null ? this.currentPersonRole : JSON.parse(localStorage.getItem('currentPersonRole')) + this.formInlineRoleSwitching.roleSwitchingCode = val[0].value this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching } }, // 表格所选中得行内容 @@ -969,27 +969,33 @@ ishandleSubmit() { let _this = this let postDate = [] - console.log(this.selectedRowKeysValue) - this.selectedRowKeysValue.forEach((item, index) => { + for (let i = 0; i < this.selectedRowKeysValue.length; i++) { let postDateobj = {} - Object.keys(item).forEach((itemIn, index) => { - if (itemIn !== 'sdt') { - if (item[itemIn] instanceof Object && !(item[itemIn] instanceof Array)) { - postDateobj[itemIn] = item[itemIn] - item[itemIn].list.forEach((item, index) => { - if (item.type == 'pull_more') { - item.dataValue = item.dataValue.join(',') + let itemIn = Object.keys(this.selectedRowKeysValue[i]) + for (let j = 0; j < itemIn.length; j++) { + if (itemIn[j] !== 'sdt') { + if (this.selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(this.selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { + postDateobj[itemIn[j]] = this.selectedRowKeysValue[i][itemIn[j]] + for (let k = 0; k < this.selectedRowKeysValue[i][itemIn[j]].list.length; k++) { + if (this.selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') { + this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',') } - if (item.type == 'text' && item.dataValue !== null) { - item.dataValue = item.dataValue.toString() + if (this.selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) { + this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString() } - }) + if (!this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue && this.selectedRowKeysValue[i][itemIn[j]].list[k].isMust == '1' + && this.selectedRowKeysValue[i][itemIn[j]].list[k].isLock == '0') { + this.$message.warning(this.selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty')) + return + } + } } } - }) - postDateobj.id = item.id + } + postDateobj.id = this.selectedRowKeysValue[i].id postDate.push(postDateobj) - }) + } + let configDataList = { configDataList: postDate } if (this.selectedRowKeys.length == 0) { this.$message.warning(this.$t('selectLeastOne')) diff --git a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue index b6e124509..74218183e 100644 --- a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue +++ b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue @@ -49,16 +49,18 @@ :dataSource='dataSource' :pagination='false' :loading='loading' - :scroll="{x: 600}" + :scroll="{x: '100%',y:'calc(100vh - 320px)'}" :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' @change='handleTableChange'> - + {{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }} - {{record.finishTime ? record.finishTime : '-'}} + + {{record.finishTime ? record.finishTime : '-'}} + {{$t('configure')}} @@ -129,43 +131,50 @@ title: this.$t('title'), align: 'center', dataIndex: 'title', + width: 240, scopedSlots: { customRender: 'paramsManifestClick' } }, { title: this.$t('status'), align: 'center', width: 80, + ellipsis: true, dataIndex: 'state' }, { title: this.$t('parameterTemplateName'), align: 'center', width: 180, + ellipsis: true, dataIndex: 'paramsTemplateName' }, { title: this.$t('collectionCompletionTime'), align: 'center', dataIndex: 'finishTime', - width: 130, + width: 160, + ellipsis: true, scopedSlots: { customRender: 'collectionCompletionTime' } }, { title: this.$t('Version'), align: 'center', width: 50, + ellipsis: true, dataIndex: 'version' }, { title: this.$t('creator'), align: 'center', width: 110, + ellipsis: true, dataIndex: 'createBy' }, { title: this.$t('createTime'), align: 'center', width: 160, + ellipsis: true, dataIndex: 'createTime' }, { @@ -517,6 +526,19 @@ /deep/ .add-padding { margin-left: -89px !important; } + + .textName { + width: 100%; + overflow: hidden; + display: -webkit-box; + text-overflow: ellipsis; + /*! autoprefixer: off */ + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + /*! autoprefixer: on;*/ + text-justify: inter-ideograph; + word-break: break-all + }