[update] 权限
This commit is contained in:
@@ -198,7 +198,6 @@
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import Vue from 'vue'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'ParameterItemCollectionList',
|
||||
components:{
|
||||
@@ -220,32 +219,32 @@
|
||||
{
|
||||
title: this.$t('status'),
|
||||
align: 'center',
|
||||
dataIndex: 'state'
|
||||
dataIndex: 'state',
|
||||
},
|
||||
{
|
||||
title: this.$t('parameterTemplateName'),
|
||||
align: 'center',
|
||||
dataIndex: 'paramsTemplateName'
|
||||
dataIndex: 'paramsTemplateName',
|
||||
},
|
||||
{
|
||||
title: this.$t('collectionCompletionTime'),
|
||||
align: 'center',
|
||||
dataIndex: 'finishTime'
|
||||
dataIndex: 'finishTime',
|
||||
},
|
||||
{
|
||||
title: this.$t('Version'),
|
||||
align: 'center',
|
||||
dataIndex: 'version'
|
||||
dataIndex: 'version',
|
||||
},
|
||||
{
|
||||
title: this.$t('creator'),
|
||||
align: 'center',
|
||||
dataIndex: 'createBy'
|
||||
dataIndex: 'createBy',
|
||||
},
|
||||
{
|
||||
title: this.$t('createTime'),
|
||||
align: 'center',
|
||||
dataIndex: 'createTime'
|
||||
dataIndex: 'createTime',
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
@@ -264,7 +263,7 @@
|
||||
getLoginUserType: 'params/collectManifest/getLoginUserType', // 获取当前登陆人
|
||||
getquerySdtList: 'params/collectManifest/querySdtList', // 获取工程接口人的列表
|
||||
updateSdt: 'params/collectManifest/updateSdt', // 提交工程接口人
|
||||
deleteBatch: 'params/collectManifest/deleteBatch'
|
||||
deleteBatch: 'params/collectManifest/deleteBatch',
|
||||
// deleteAll: 'params/manifest/deleteBatch',
|
||||
// conAdd: 'params/config/addBatch',
|
||||
// conList: 'params/config/list',
|
||||
@@ -301,7 +300,7 @@
|
||||
sm: { span: 7 }
|
||||
},
|
||||
rules: {},
|
||||
FreezeList: [] // 冻结字段
|
||||
FreezeList: [], // 冻结字段
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -311,23 +310,58 @@
|
||||
require: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
mounted() {},
|
||||
methods:{
|
||||
// 认证工程师的权限
|
||||
// 认证工程师 退回 权限
|
||||
// 仅仅状态为 已提交 可以退回
|
||||
homoJurisdictionReturn() {
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 0
|
||||
let flag = 1
|
||||
if(this.homo) {
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.success(this.$t('selectLeastOne'))
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state === '已提交') {
|
||||
if(item.state !== '已提交') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
// 工程接口人 退回 权限
|
||||
// 待工程接口人处理 填写人退回
|
||||
}else if(this.sdt){
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if(item.state !== '待工程接口人处理' && item.state !== '填写人退回') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
} else if(this.dre){
|
||||
// 填写人
|
||||
// 待填写 认证工程师退回 状态
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if(item.state !== '待填写' && item.state !== '认证工程师退回') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
@@ -345,15 +379,15 @@
|
||||
// 仅仅状态为 待发起收集 工程接口人退回 变更 可以批量删除
|
||||
homoJurisdictionBatchdelete() {
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 0
|
||||
let flag = 1
|
||||
if(this.homo) {
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state === '待发起收集' || item.state === '工程接口人退回' || item.state === '变更') {
|
||||
flag = 1
|
||||
if(item.state !== '待发起收集' && item.state !== '工程接口人退回' && item.state !== '变更') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
@@ -362,6 +396,10 @@
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
// 工程接口人没有权限
|
||||
}else if(this.sdt) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
@@ -371,15 +409,15 @@
|
||||
// 仅仅状态为 已提交 变更 可以同步上报库
|
||||
homoJurisdictionSynchronousLibrary() {
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 0
|
||||
let flag = 1
|
||||
if(this.homo) {
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state === '已提交' || item.state === '变更') {
|
||||
flag = 1
|
||||
if(item.state !== '已提交' && item.state !== '变更') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
@@ -397,15 +435,111 @@
|
||||
// 仅仅状态为 待工程接口人处理 填写人退回 可以强制撤回
|
||||
homoJurisdictionCompulsoryWithdrawal() {
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 0
|
||||
let flag = 1
|
||||
if(this.homo) {
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.success(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state === '待工程接口人处理' || item.state === '填写人退回') {
|
||||
if(item.state !== '待工程接口人处理' && item.state !== '填写人退回') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
// 工程接口人 强制撤回 权限
|
||||
// 仅仅状态为 待填写 可以强制撤回
|
||||
}else if(this.sdt){
|
||||
if(this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if(item.state !== '待填写') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.success(this.$t('operatethisbutton'))
|
||||
}
|
||||
return flag
|
||||
},
|
||||
// 工程接口人 分配填写人 权限
|
||||
// 仅仅状态为 待工程接口人处理 填写人退回 可以分配填写人
|
||||
sdtJurisdictionAssigned() {
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 1
|
||||
if(this.sdt) {
|
||||
if (this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state !== '待工程接口人处理' && item.state !== '填写人退回') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if (flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.success(this.$t('operatethisbutton'))
|
||||
}
|
||||
return flag
|
||||
},
|
||||
// 填写人 提交 权限
|
||||
// 仅仅状态为 待填写 认证工程师退回 可以提交
|
||||
dreJurisdictionSubmit() {
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 1
|
||||
if(this.sdt) {
|
||||
if (this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state !== '待填写' && item.state !== '认证工程师退回') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if (flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.success(this.$t('operatethisbutton'))
|
||||
}
|
||||
return flag
|
||||
},
|
||||
// 填写人 引用参数 权限
|
||||
// 仅仅状态为 待填写 认证工程师退回 可以引用参数
|
||||
dreJurisdictionreferenceParameter() {
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 1
|
||||
if(this.sdt) {
|
||||
if (this.selectedRowKeysValue.length == 0) {
|
||||
flag = 0
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if (item.state !== '待填写' && item.state !== '认证工程师退回') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if (flag === 1) {
|
||||
@@ -419,35 +553,6 @@
|
||||
}
|
||||
return flag
|
||||
},
|
||||
|
||||
// 工程接口人
|
||||
|
||||
// 工程接口人 下发收集 权限
|
||||
// 仅仅状态为 待发起收集 工程接口人退回 变更 可以下发收集
|
||||
// homoJurisdictionDistributionCollection() {
|
||||
// // 定义开关 0为没有权限 1为有权限
|
||||
// let flag = 1
|
||||
// if(this.homo) {
|
||||
// if(this.selectedRowKeysValue.length == 0) {
|
||||
// flag = 0
|
||||
// this.$message.success(this.$t('selectLeastOne'))
|
||||
// } else {
|
||||
// this.selectedRowKeysValue.forEach((item, index) => {
|
||||
// if(item.state !== '待发起收集' && item.state !== '工程接口人退回' && item.state !== '变更') {
|
||||
// flag = 0
|
||||
// }
|
||||
// })
|
||||
// if(flag === 1) {
|
||||
// flag = 1
|
||||
// } else {
|
||||
// this.$message.warning(this.$t('operatethisbutton'))
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// this.$message.success(this.$t('operatethisbutton'))
|
||||
// }
|
||||
// return flag
|
||||
// },
|
||||
LoginUserType(val) {
|
||||
val.split(',').forEach((item,index) => {
|
||||
if(item === 'homo') {
|
||||
@@ -510,8 +615,8 @@
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error)
|
||||
})
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 冻结配置取消
|
||||
cancleImportsFreeze() {
|
||||
@@ -545,8 +650,8 @@
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error)
|
||||
})
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 下发收集的权限
|
||||
distributionAndCollectionJurisdiction() {
|
||||
@@ -592,8 +697,8 @@
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error)
|
||||
})
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
handleSynchronousReportLibraryJurisdiction() {
|
||||
let homoJurisdictionSynchronousLibrary = this.homoJurisdictionSynchronousLibrary()
|
||||
@@ -621,6 +726,9 @@
|
||||
// 认证工程师 工程接口人 任意状态 都无此权限
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
} else {
|
||||
// 填写人 权限
|
||||
let dreJurisdictionSubmit = this.dreJurisdictionSubmit()
|
||||
if(dreJurisdictionSubmit) {
|
||||
// 提交数据
|
||||
let postDate = []
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
@@ -648,10 +756,11 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
returnDataJurisdiction() {
|
||||
// 退回的状态权限
|
||||
let homoJurisdictionReturn = this.homoJurisdictionReturn
|
||||
let homoJurisdictionReturn = this.homoJurisdictionReturn()
|
||||
if (homoJurisdictionReturn) {
|
||||
this.returnData()
|
||||
}
|
||||
@@ -691,8 +800,8 @@
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error)
|
||||
})
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
compulsoryWithdrawaljurisdiction() {
|
||||
let homoJurisdictionCompulsoryWithdrawal = this.homoJurisdictionCompulsoryWithdrawal()
|
||||
@@ -735,8 +844,8 @@
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error)
|
||||
})
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 分配填写人
|
||||
assignedBy() {
|
||||
@@ -744,8 +853,12 @@
|
||||
// 认证工程师 任意状态 都无此权限
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
} else {
|
||||
// 工程接口人
|
||||
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
|
||||
if(sdtJurisdictionAssigned) {
|
||||
this.areaVisibleAssignedby = true
|
||||
}
|
||||
}
|
||||
},
|
||||
// 分配填写人确定后弹框关闭
|
||||
areaVisibleAssignedbyflag(val) {
|
||||
@@ -771,8 +884,12 @@
|
||||
// 认证工程师 工程接口人 任意状态 都无此权限
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
} else {
|
||||
// 填写人的权限
|
||||
let dreJurisdictionreferenceParameter = this.dreJurisdictionreferenceParameter()
|
||||
if(dreJurisdictionreferenceParameter) {
|
||||
this.areaVisiblereferenceparameter = true
|
||||
}
|
||||
}
|
||||
},
|
||||
handleModule() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user