阅片顺序添加admin角色权限
continuous-integration/drone/push Build encountered an error Details

uat
wangxiaoshuang 2025-06-17 16:49:15 +08:00
parent 48633a1ed4
commit 1022fa2888
1 changed files with 8 additions and 3 deletions

View File

@ -71,7 +71,7 @@
</el-button>
<!-- 随机排序 -->
<el-button type="primary" @click="randomOrder"
:disabled="!searchData.TrialReadingCriterionId || !searchData.DoctorUserId">
:disabled="!searchData.TrialReadingCriterionId || !searchData.DoctorUserId" v-if="!isAdmin">
{{ $t('trials:readingTracking:button:order') }}
</el-button>
</el-form-item>
@ -189,7 +189,7 @@
<template slot-scope="scope">
<el-input-number v-model="scope.row.RandomOrder"
@change="(value, old) => handleChange(scope.row, value, old)" :min="0" style="width: 150px;"
v-if="scope.row.ReadingTaskState !== 1"></el-input-number>
v-if="scope.row.ReadingTaskState !== 1 && !isAdmin"></el-input-number>
<span v-else>{{ scope.row.RandomOrder }}</span>
</template>
</el-table-column>
@ -260,7 +260,12 @@ export default {
}
},
created() {
if (!this.hasPermi(['role:pm', 'role:apm'])) return this.$router.replace("/login")
if (!this.hasPermi(['role:pm', 'role:apm', 'role:admin'])) return this.$router.replace("/login")
},
computed: {
isAdmin() {
return !!this.hasPermi(['role:admin'])
}
},
mounted() {
this.getSite()