添加按钮权限
This commit is contained in:
@@ -42,11 +42,11 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div @click="initiatingProcessClick" class="operator-text">
|
||||
<div @click="initiatingProcessClick" v-has="'documentComparison:Initiate'" class="operator-text">
|
||||
<a-icon type="apartment"/>
|
||||
{{$t('initiateComparison')}}
|
||||
</div>
|
||||
<div @click="BatchDelete" class="operator-text">
|
||||
<div @click="BatchDelete" v-has="'documentComparison:batchDelete'" class="operator-text">
|
||||
<a-icon type="delete"/>
|
||||
{{$t('BatchDelete')}}
|
||||
</div>
|
||||
@@ -67,15 +67,15 @@
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="comparisonResultsClick(record)">{{$t('comparisonResults')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username"
|
||||
v-if="record.createBy == userInfoQuery.username || administrators"
|
||||
@click="subscribe(record)">
|
||||
{{!record.releaseState || record.releaseState == 'draft' ? $t('release') :$t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
|
||||
v-if="(record.createBy == userInfoQuery.username || administrators) && record.releaseState == 'draft'"
|
||||
@click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userInfoQuery.username && record.releaseState == 'draft'"
|
||||
v-if="(record.createBy == userInfoQuery.username || administrators) && record.releaseState == 'draft'"
|
||||
@click="deleteData(record)">{{$t('delete')}}</a>
|
||||
</span>
|
||||
<span slot="serialNumberRight" :title="text" slot-scope="text,record">
|
||||
@@ -132,6 +132,7 @@
|
||||
pageNo: 1,
|
||||
queryParam: {},
|
||||
userInfoQuery: {},
|
||||
administrators:false,
|
||||
selectedRowKeysRecord: [],
|
||||
columns: [
|
||||
{
|
||||
@@ -233,6 +234,14 @@
|
||||
this.queryParam = { ...this.queryParam }
|
||||
}
|
||||
this.userInfoQuery = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user