[update] 按钮权限

This commit is contained in:
zhaomeijing
2022-06-14 12:02:32 +08:00
parent 9cf100c790
commit 167c13dcac
3 changed files with 47 additions and 41 deletions
@@ -758,6 +758,7 @@
//导出
handleExportManage(){
if(JSON.stringify(this.parameter)=='{}'){
console.log('pppp')
this.parameter.info_id=this.infoId
this.parameter.menu_id=this.menuId
}
@@ -72,10 +72,10 @@
<!-- // 游客 guest-->
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight">
<template slot="title" id="popconfirm">
<!-- 退回-->
<div @click="returnDataJurisdiction" class="operator-text-title" v-if='currentPersonRole == "sdt" || currentPersonRole == "homo" || currentPersonRole == "dre"'>
<a-icon type="delete"/>
{{$t('sendBack')}}
<!-- 添加-->
<div @click="handleAdd" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="plus"/>
{{$t('addTo')}}
</div>
<!-- 下发收集 -->
<div @click="distributionAndCollectionJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
@@ -92,45 +92,45 @@
<a-icon type="setting"/>
{{$t('SynchronousReportLibrary')}}
</div>
<!-- 强制撤回-->
<div @click="compulsoryWithdrawaljurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo" || currentPersonRole == "sdt" ||currentPersonRole == "dre"'>
<a-icon type="delete"/>
{{$t('CompulsoryWithdrawal')}}
</div>
<!-- 分配填写人-->
<div @click="assignedBy" class="operator-text-title" v-if='currentPersonRole == "sdt" '>
<a-icon type="copy"/>
{{$t('Assignedby')}}
</div>
<!-- 引用参数-->
<div @click="referenceparameter" class="operator-text-title" v-if='currentPersonRole == "dre" '>
<a-icon type="plus"/>
{{$t('referenceparameter')}}
</div>
<!-- 截止时间-->
<div @click="TaskCutOffTimeLibrary" class="operator-text-title" v-if='currentPersonRole == "homo" '>
<a-icon type="bulb"/>
{{$t('TaskCutOffTime')}}
</div>
<!-- 批量删除-->
<div @click="handleDelJurisdiction" class="operator-text-title" v-if='currentPersonRole == "homo"'>
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
</template>
<div class="operator-text" style="position: relative">
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
</div>
</a-popconfirm>
<!-- 添加-->
<div @click="handleAdd" class="operator-text" v-if='currentPersonRole == "homo"'>
<!-- 分配填写人-->
<div @click="assignedBy" class="operator-text" v-if='currentPersonRole == "sdt" '>
<a-icon type="copy"/>
{{$t('Assignedby')}}
</div>
<!-- 引用参数-->
<div @click="referenceparameter" class="operator-text" v-if='currentPersonRole == "dre" '>
<a-icon type="plus"/>
{{$t('addTo')}}
{{$t('referenceparameter')}}
</div>
<!-- 提交-->
<div @click="handleSubmit" class="operator-text" v-if='currentPersonRole == "dre"'>
<a-icon type="check-circle"/>
{{$t('submit')}}
</div>
<!-- 批量删除-->
<div @click="handleDelJurisdiction" class="operator-text" v-if='currentPersonRole == "homo"'>
<!-- 退回-->
<div @click="returnDataJurisdiction" class="operator-text" v-if='currentPersonRole == "sdt" || currentPersonRole == "homo" || currentPersonRole == "dre"'>
<a-icon type="delete"/>
{{$t('BatchDelete')}}
{{$t('sendBack')}}
</div>
<!-- 强制撤回-->
<div @click="compulsoryWithdrawaljurisdiction" class="operator-text" v-if='currentPersonRole == "homo" || currentPersonRole == "sdt" ||currentPersonRole == "dre"'>
<a-icon type="delete"/>
{{$t('CompulsoryWithdrawal')}}
</div>
<!-- 角色切换 -->
<div class="operator-text"
@@ -142,7 +142,7 @@
<div style="width: 100%">
<!-- 表格-10控件-->
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
:formInline='formInline' @LoginUserType='LoginUserType' @value='value' @listReset='listReset'/>
:formInline='formInline' :currentPersonRole='currentPersonRole' @value='value' @listReset='listReset' @LoginUserType='LoginUserType'/>
</div>
<!-- 添加--->
<a-modal v-model="areaVisible" :title="$t('ParameterLibrary')" width='750px' :footer="null">
@@ -207,6 +207,7 @@
<synchronous-submission-library v-if='areaVisibsynchronous' :paramsManifest='paramsManifest' @GetgetTableList='GetgetTableList'
:selectedRowKeysArray='selectedRowKeysArray' @areaVisible='areaVisibsynchronous = false'/>
</a-modal>
<!-- 切换角色-->
<a-modal
:title="$t('roleSwitching')"
:width="500"
@@ -381,9 +382,6 @@ export default {
]
},
RoleType: [ // 控件类型
{value:'homo', label: '认证工程师' },
{value:'sdt', label: '工程接口人' },
{value:'dre', label: '填写人' },
],
}
},
@@ -395,13 +393,15 @@ export default {
}
},
mounted() {
this.GetgetLoginUserType()
},
methods:{
handleCancelRoleSwitching() {
this.visibleRoleSwitching = false
},
handleOkRoleSwitching() {
//
this.visibleRoleSwitching = false
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
},
roleSwitchingClick() {
this.visibleRoleSwitching = true
@@ -722,13 +722,11 @@ export default {
return flag
},
LoginUserType(val) {
this.currentPersonRole = val.length > 1 ? val[0].value : ''
this.RoleType = val
val.forEach((item) => {
console.log(item,'pppp')
// if(item) {
//
// }
})
this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole
this.formInlineRoleSwitching = {...this.formInlineRoleSwitching}
},
// 表格所选中得行内容
rowValue(val) {