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