From e4cc5c5f51b0a75af9b3270c7f28ee477979c5e1 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 12 Dec 2022 13:30:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E5=B7=A5=E7=A8=8B=E5=B8=88?= =?UTF-8?q?=E5=88=86=E9=85=8D=E5=A1=AB=E5=86=99=E4=BA=BA?= 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/AssignedByHomo/index.vue | 261 ++++++++++++++++++ .../src/components/tableCollection/index.vue | 2 +- .../src/components/tableCollection/index1.vue | 14 + .../ParameterItemCollectionList.vue | 132 ++++++--- .../dialog/parametercolumn.vue | 2 +- 7 files changed, 376 insertions(+), 37 deletions(-) create mode 100644 jero-web/src/components/AssignedByHomo/index.vue diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 905dde08b..cb8f089ac 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1367,4 +1367,5 @@ module.exports = { Referenceparametercolumn:'Reference Parameter Column', Updateparametercolumn:'Update The Parameter Column', columnfirst:'Reference the parameter column first', + columnforced:'Confirm a forced retraction?', } \ 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 80ded9963..b06ea98a1 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1468,4 +1468,5 @@ module.exports = { Referenceparametercolumn:'引用参数列', Updateparametercolumn:'更新参数列', columnfirst:'请先引用参数列', + columnforced:'确认强制撤回?', } \ No newline at end of file diff --git a/jero-web/src/components/AssignedByHomo/index.vue b/jero-web/src/components/AssignedByHomo/index.vue new file mode 100644 index 000000000..a7414c884 --- /dev/null +++ b/jero-web/src/components/AssignedByHomo/index.vue @@ -0,0 +1,261 @@ + + + + + + \ No newline at end of file diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 54b32a152..818e2c07e 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -55,7 +55,7 @@ - + + @@ -183,6 +184,11 @@ + + + {{text && text.length > 10?text.slice(0,9)+'...':text}} + +
{{$t('Adjustareasofresponsibility')}}
+ +
+ + {{$t('Assignedby')}} +
@@ -309,6 +314,13 @@ @GetgetLoginUserType='GetgetLoginUserType' @areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedby = false'/> + + + + '{{$t('handledInterface')}}'{{$t('or')}}'{{$t('Filledreturn')}}' + + + '{{$t('completed')}}' + '{{$t('completed')}}'{{$t('or')}}'{{$t('ReturnedEngineer')}}' @@ -494,6 +510,7 @@ import AdjustareaSofrespon from '@/components/AdjustareaSofrespon/index' import ReferenceParameter from '@/components/ReferenceParameter/index' import AssignedBy from '@/components/AssignedBy/index' + import AssignedByHomo from '@/components/AssignedByHomo/index' import ImportFileOnlyList from '@/components/ImportFileOnlyListtag/index' import axios from 'axios' import { ACCESS_TOKEN } from '@/store/mutation-types' @@ -507,6 +524,7 @@ ParameterLibraryAdd, parameterColumn, AssignedBy, + AssignedByHomo, AdjustareaSofrespon, ImportFileOnlyList, TaskCutOffTime, @@ -688,6 +706,7 @@ Dateline: {}, areaVisibleFreeze: false, // 冻结配置 areaVisibleAssignedby: false, // 分配填写人弹框 + areaVisibleAssignedbyhomo: false, // 认证分配填写人弹框 areaVisibleTaskCutOffTime: false, // 截至时间弹框 OneclickCollection:false, parametercolumn:false, @@ -1148,6 +1167,27 @@ } return flag }, + // 认证工程师 分配填写人 权限 + // 仅仅状态为 待填写 可以分配填写人 + sdtJurisdictionAssignedhomo() { + // 定义开关 0为没有权限 1为有权限 + this.NotSelectedRowKeysValue = [] + let flag = 1 + if (this.selectedRowKeysValue.length == 0) { + flag = 2 + this.$message.warning(this.$t('selectLeastOne')) + } else { + this.selectedRowKeysValue.forEach((item, index) => { + console.log(item.state) + if (item.state !== '待填写' && item.state !== 'To be filled') { + this.NotSelectedRowKeysValue.push(item) + flag = 0 + } + }) + } + console.log(flag) + return flag + }, // 填写人 提交 权限 // 仅仅状态为 待填写 认证工程师退回 可以提交 dreJurisdictionSubmit() { @@ -1340,7 +1380,6 @@ }, // 引用参数列 Referenceparametercolumn() { - console.log(1111) this.parametercolumn = true }, Updateparametercolumn() { @@ -1348,16 +1387,20 @@ console.log(data) let referencesCol = [] let postDate = [] + let colunmnFlag = '' data.forEach((item,index) => { - if(!item.dutyTerritory){ - this.$message.warning(this.$t('columnfirst')) - return + if(!item.referencesCol){ + this.colunmnFlag = true } referencesCol.push({ referencesCol: item.referencesCol, id: item.id }) }) + if(this.colunmnFlag){ + this.$message.warning(this.$t('columnfirst')) + return + } for (let i = 0; i < referencesCol.length; i++) { let postDateobj = {} let itemIn = Object.keys(referencesCol[i]) @@ -1665,48 +1708,55 @@ }) let _this = this let param = { ids: _array.join(',') } - this.textLoading = true let url = '' if(this.currentPersonRole == 'homo'){ url = '/jero-boot/params/collectManifest/mandatoryWithdraw' }else{ url = '/jero-boot/params/collectManifest/withdraw' } - axios({ - url: url, - method: 'post', - data: param, - transformRequest: [function(data) { - let ret = '' - for (let it in data) { - ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' + this.$confirm({ + title: this.$t('columnforced'), + content: '', + onOk: + async () => { + this.textLoading = true + axios({ + url: url, + method: 'post', + data: param, + transformRequest: [function(data) { + let ret = '' + for (let it in data) { + ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' + } + return ret + }], + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-Access-Token': _this.token + } + }) + .then((res) => { + if (res.data.success) { + this.textLoading = false + _this.$message.success(_this.$t('OperationSuccessful')) + _this.GetgetTableList() + _this.selectedRowKeysValue = [] + } else { + this.textLoading = false + _this.$message.warning(_this.$t('operationFailed')) + } + }) + .catch((error) => { + this.textLoading = false + }) } - return ret - }], - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - 'X-Access-Token': _this.token - } }) - .then((res) => { - if (res.data.success) { - this.textLoading = false - _this.$message.success(_this.$t('OperationSuccessful')) - _this.GetgetTableList() - _this.selectedRowKeysValue = [] - } else { - this.textLoading = false - _this.$message.warning(_this.$t('operationFailed')) - } - }) - .catch((error) => { - this.textLoading = false - }) }, // 分配填写人 assignedBy() { - // 工程接口人 - let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned() + let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned() + // 工程接口人 if (sdtJurisdictionAssigned == 1) { this.areaVisibleAssignedby = true } else if (sdtJurisdictionAssigned == 0) { @@ -1714,6 +1764,18 @@ this.jurisdiction = 'SDTFPTXR' } }, + // 认证分配填写人 + assignedByHomo() { + let sdtJurisdictionAssigned = this.sdtJurisdictionAssignedhomo() + // 工程接口人 + if (sdtJurisdictionAssigned == 1) { + this.areaVisibleAssignedbyhomo = true + } else if (sdtJurisdictionAssigned == 0) { + this.visibleoperationFailed = true + this.jurisdiction = 'SDTFPTXRHOMO' + } + }, + // 分配填写人确定后弹框关闭 areaVisibleAssignedbyflag(val) { this.areaVisibleAssignedby = val diff --git a/jero-web/src/views/projectManagement/dialog/parametercolumn.vue b/jero-web/src/views/projectManagement/dialog/parametercolumn.vue index f392397f2..9c851626b 100644 --- a/jero-web/src/views/projectManagement/dialog/parametercolumn.vue +++ b/jero-web/src/views/projectManagement/dialog/parametercolumn.vue @@ -252,7 +252,7 @@ this.loadData() }, handleCancel() { - this.$emit('areaVisible', false) + this.$emit('drawerhandleCancel', false) }, onSelectChange(selectedRowKeys, selectedRowKeysDate) { this.selectedRowKeysDate = selectedRowKeysDate