From c86707bdeb4b84dfc3a357120646972f25d4e7fd Mon Sep 17 00:00:00 2001 From: zhaomeijing Date: Tue, 14 Jun 2022 18:22:10 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/tableCollection/index.vue | 12 +-- .../ParameterItemCollectionList.vue | 82 ++++++++++++------- 2 files changed, 59 insertions(+), 35 deletions(-) diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index b92a268ba..388442cbb 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -481,12 +481,12 @@ } }, watch: { - paramsManifest(newVal, oldVal) { - this.getData() - this.getLoginUserType() - }, - currentPersonRole(newVal,oldVal){ - console.log(newVal,oldVal) + currentPersonRole: { + handler: function(){ + this.getTableList() + this.getData() + }, + immediate: true } } } diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 3850463ea..32b4c4240 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -241,6 +241,20 @@ + + + + @@ -255,7 +269,6 @@ import AssignedBy from '@/components/AssignedBy/index' import axios from 'axios' import { ACCESS_TOKEN } from '@/store/mutation-types' import Vue from 'vue' -import moment from 'moment' export default { name: 'ParameterItemCollectionList', components:{ @@ -330,9 +343,6 @@ export default { getquerySdtList: 'params/collectManifest/querySdtList', // 获取工程接口人的列表 updateSdt: 'params/collectManifest/updateSdt', // 提交工程接口人 deleteBatch: 'params/collectManifest/deleteBatch', - // deleteAll: 'params/manifest/deleteBatch', - // conAdd: 'params/config/addBatch', - // conList: 'params/config/list', }, loading: false, dataSource: [], @@ -349,15 +359,13 @@ export default { itemId: '', selectedRowKeysValue: [], // table列表所选得数据 token:Vue.ls.get(ACCESS_TOKEN), - homo: 0, // 认证工程师 - sdt: 0, // 工程接口人 - dre: 0, // 填写人 Dateline: {}, areaVisibleFreeze: false, // 冻结配置 areaVisibleAssignedby: false, // 分配填写人弹框 areaVisibleTaskCutOffTime: false, // 截至时间弹框 areaVisiblereferenceparameter: false, // 引用参数弹框 areaVisibsynchronous: false, // 同步上报库弹框 + visibleoperationFailed: false, // 数据失败的弹框 currentPersonRole: '', // 当前人角色 wrapperCol: { xs: { span: 24 }, @@ -381,8 +389,8 @@ export default { } ] }, - RoleType: [ // 控件类型 - ], + RoleType: [ ],// 控件类型 + NotSelectedRowKeysValue: [], } }, props: { @@ -412,6 +420,31 @@ export default { GetgetTableList() { this.$refs.CollectionTabel.getTableList() }, + // 错误数据的弹框 + cancleoperationFailed() { + this.visibleoperationFailed = false + this.GetgetTableList() + }, + // 一下为认证工程师 + // 认证工程师 下发收集 权限 + // 仅仅状态为 待发起收集 工程接口人退回 变更 可以下发收集 + homodistributionAndCollection() { + this.NotSelectedRowKeysValue = [] + // 定义开关 0为没有权限 1为有权限 + let flag = 1 + if(this.selectedRowKeysValue.length == 0) { + flag = 2 + this.$message.warning(this.$t('selectLeastOne')) + } else { + this.selectedRowKeysValue.forEach((item, index) => { + if(item.state !== '待发起收集' && item.state !== '工程接口人退回' && item.state !== '变更') { + this.NotSelectedRowKeysValue.push(item) + flag = 0 + } + }) + } + return flag + }, // 认证工程师的权限 // 认证工程师 退回 权限 // 仅仅状态为 已提交 可以退回 @@ -498,9 +531,9 @@ export default { // 认证工程师 批量删除 权限 // 仅仅状态为 待发起收集 工程接口人退回 变更 可以批量删除 homoJurisdictionBatchdelete() { + // 定义开关 0为没有权限 1为有权限 let flag = 1 - if(this.homo) { if(this.selectedRowKeysValue.length == 0) { flag = 0 this.$message.warning(this.$t('selectLeastOne')) @@ -516,15 +549,6 @@ export default { this.$message.warning(this.$t('Statusis')+this.$t('CollectionInitiated')+this.$t('ReturnedPerson')+this.$t('alteration')+this.$t('toHavePermission')) } } - // 工程接口人没有权限 - }else if(this.sdt) { - flag = 0 - this.$message.warning(this.$t('operatethisbutton')) - } else { - flag = 0 - console.log('ppp') - this.$message.warning(this.$t('operatethisbutton')) - } return flag }, // 认证工程师 同步上报库 权限 @@ -722,11 +746,12 @@ export default { return flag }, LoginUserType(val) { + console.log(val) + this.RoleType = [] this.currentPersonRole = val.length > 1 ? val[0].value : '' this.RoleType = val this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole this.formInlineRoleSwitching = {...this.formInlineRoleSwitching} - }, // 表格所选中得行内容 rowValue(val) { @@ -821,12 +846,15 @@ export default { }, // 下发收集的权限 distributionAndCollectionJurisdiction() { - let homoJurisdictionBatchdelete = this.homoJurisdictionBatchdelete() - if(homoJurisdictionBatchdelete) { + let homodistributionAndCollection = this.homodistributionAndCollection() + if(homodistributionAndCollection == 1) { this.distributionAndCollection() + } else if(homodistributionAndCollection == 0){ + this.visibleoperationFailed = true + console.log(this.NotSelectedRowKeysValue,'!===') } }, - // 下发收集 + // 下发收集---请求接口 distributionAndCollection() { let _array = [] this.selectedRowKeysValue.forEach((item, index) => { @@ -877,12 +905,8 @@ export default { }, // 添加 handleAdd() { - if(this.homo) { - // 认证工程师 任意状态 都有此权限 - this.areaVisible = true - } else { - this.$message.warning(this.$t('certifiedEngineer')+this.$t('toHavePermission')) - } + // 认证工程师 任意状态 都有此权限 + this.areaVisible = true }, // 提交 handleSubmit() {