[update] 权限
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight">
|
||||
<template slot="title" id="popconfirm">
|
||||
<!-- 下发收集 -->
|
||||
<div @click="distributionAndCollection" class="operator-text-title">
|
||||
<div @click="distributionAndCollectionJurisdiction" class="operator-text-title">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('distributionAndCollection')}}
|
||||
</div>
|
||||
@@ -74,12 +74,12 @@
|
||||
{{$t('FreezeConfiguration')}}
|
||||
</div>
|
||||
<!-- 同步上报库 -->
|
||||
<div @click="handleAdd" class="operator-text-title">
|
||||
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('SynchronousReportLibrary')}}
|
||||
</div>
|
||||
<!-- 强制撤回-->
|
||||
<div @click="compulsoryWithdrawal" class="operator-text-title">
|
||||
<div @click="compulsoryWithdrawaljurisdiction" class="operator-text-title">
|
||||
<a-icon type="bulb"/>
|
||||
{{$t('CompulsoryWithdrawal')}}
|
||||
</div>
|
||||
@@ -109,7 +109,7 @@
|
||||
{{$t('submit')}}
|
||||
</div>
|
||||
<!-- 退回-->
|
||||
<div @click="returnData" class="operator-text">
|
||||
<div @click="returnDataJurisdiction" class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('sendBack')}}
|
||||
</div>
|
||||
@@ -119,7 +119,7 @@
|
||||
{{$t('referenceparameter')}}
|
||||
</div>
|
||||
<!-- 批量删除-->
|
||||
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
|
||||
<div @click="handleDelJurisdiction" class="operator-text" v-has="'document:deleteBatch'">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
@@ -304,11 +304,9 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods:{
|
||||
// 判断是否有权限 认证工程师 待发起收集
|
||||
// 添加 批量删除 下发收集 冻结配置 工程接口人列修改
|
||||
permissionmoAndinitiated() {
|
||||
// 判断是否具有提交权限
|
||||
// 认证工程师
|
||||
// 工程接口人 退回 权限
|
||||
// 仅仅状态为 已提交 可以退回
|
||||
homoJurisdictionReturn() {
|
||||
// 定义开关 0为没有权限 1为有权限
|
||||
let flag = 1
|
||||
if(this.homo) {
|
||||
@@ -317,7 +315,7 @@ export default {
|
||||
this.$message.success(this.$t('selectLeastOne'))
|
||||
} else {
|
||||
this.selectedRowKeysValue.forEach((item, index) => {
|
||||
if(item.state !== '待发起收集') {
|
||||
if(item.state !== '已提交') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
@@ -332,6 +330,110 @@ export default {
|
||||
}
|
||||
return flag
|
||||
},
|
||||
// 工程接口人 批量删除 权限
|
||||
// 仅仅状态为 待发起收集 工程接口人退回 变更 可以批量删除
|
||||
homoJurisdictionBatchdelete() {
|
||||
// 定义开关 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
|
||||
},
|
||||
// 工程接口人 同步上报库 权限
|
||||
// 仅仅状态为 已提交 变更 可以同步上报库
|
||||
homoJurisdictionSynchronousLibrary() {
|
||||
// 定义开关 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 !== '变更') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
}else {
|
||||
this.$message.success(this.$t('operatethisbutton'))
|
||||
}
|
||||
return flag
|
||||
},
|
||||
// 工程接口人 强制撤回 权限
|
||||
// 仅仅状态为 待工程接口人处理 填写人退回 可以强制撤回
|
||||
homoJurisdictionCompulsoryWithdrawal() {
|
||||
// 定义开关 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 !== '填写人退回') {
|
||||
flag = 0
|
||||
}
|
||||
})
|
||||
if(flag === 1) {
|
||||
flag = 1
|
||||
} else {
|
||||
this.$message.warning(this.$t('operatethisbutton'))
|
||||
}
|
||||
}
|
||||
}else {
|
||||
this.$message.success(this.$t('operatethisbutton'))
|
||||
}
|
||||
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') {
|
||||
@@ -430,6 +532,13 @@ export default {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 下发收集的权限
|
||||
distributionAndCollectionJurisdiction() {
|
||||
let homoJurisdictionBatchdelete = this.homoJurisdictionBatchdelete()
|
||||
if(homoJurisdictionBatchdelete) {
|
||||
this.distributionAndCollection()
|
||||
}
|
||||
},
|
||||
// 下发收集
|
||||
distributionAndCollection() {
|
||||
let _array = []
|
||||
@@ -469,6 +578,16 @@ export default {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
handleSynchronousReportLibraryJurisdiction() {
|
||||
let homoJurisdictionSynchronousLibrary = this.homoJurisdictionSynchronousLibrary()
|
||||
if(homoJurisdictionSynchronousLibrary) {
|
||||
this.handleSynchronousReportLibrary()
|
||||
}
|
||||
},
|
||||
// 同步上报库
|
||||
handleSynchronousReportLibrary() {
|
||||
console.log('同步上报库')
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
if(this.homo) {
|
||||
@@ -511,6 +630,13 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
returnDataJurisdiction() {
|
||||
// 退回的状态权限
|
||||
let homoJurisdictionReturn = this.homoJurisdictionReturn
|
||||
if (homoJurisdictionReturn) {
|
||||
this.returnData()
|
||||
}
|
||||
},
|
||||
// 退回
|
||||
returnData() {
|
||||
let _array = []
|
||||
@@ -549,6 +675,12 @@ export default {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
compulsoryWithdrawaljurisdiction() {
|
||||
let homoJurisdictionCompulsoryWithdrawal = this.homoJurisdictionCompulsoryWithdrawal()
|
||||
if(homoJurisdictionCompulsoryWithdrawal) {
|
||||
this.compulsoryWithdrawal()
|
||||
}
|
||||
},
|
||||
// 强制撤回
|
||||
compulsoryWithdrawal() {
|
||||
let _array = []
|
||||
@@ -636,6 +768,12 @@ export default {
|
||||
searchReset() {
|
||||
this.$refs.CollectionTabel.getTableListReset()
|
||||
},
|
||||
handleDelJurisdiction() {
|
||||
let homoJurisdictionBatchdelete = this.homoJurisdictionBatchdelete()
|
||||
if(homoJurisdictionBatchdelete) {
|
||||
this.handleDel()
|
||||
}
|
||||
},
|
||||
handleDel(){
|
||||
let param={
|
||||
ids: this.selectedRowKeysArray
|
||||
|
||||
Reference in New Issue
Block a user