feat(richedit): 将操作记录图标替换为按钮并调整权限控制

将操作记录从el-icon替换为el-button以提升用户体验
调整权限控制逻辑,增加用户类型判断
添加按钮样式并移除无用样式
This commit is contained in:
zzp 2025-11-30 11:02:10 +08:00
parent 717110a061
commit 25fc929f06
2 changed files with 42 additions and 23 deletions

View File

@ -376,10 +376,14 @@
</div> -->
<!-- v-if="isAdmin" -->
<el-icon v-if="isAdmin" size="16" @click="goRecord(scope.row)" style="margin-left: 10px">
<Tickets />
</el-icon>
<el-button
type="text"
class="record_btn"
v-if="isAdmin || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
@click="goRecord(scope.row)"
>
操作记录
</el-button>
</div>
</template>
</el-table-column>
@ -1140,4 +1144,15 @@ onMounted(async () => {
display: flex;
align-items: center;
}
.record_btn {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #6b6c6f;
line-height: 20px;
text-align: left;
font-style: normal;
cursor: pointer;
}
</style>

View File

@ -577,14 +577,21 @@
</el-icon> -->
</div>
<!-- v-if="isAdmin" -->
<el-icon
<el-button
class="record_btn"
type="text"
v-if="isAdmin || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
@click="goRecord(scope.row)"
>
操作记录
</el-button>
<!-- <el-icon
v-if="isAdmin || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'"
size="16"
@click="goRecord(scope.row)"
style="margin-left: 10px"
>
<Tickets />
</el-icon>
</el-icon> -->
</div>
</template>
</el-table-column>
@ -1023,6 +1030,7 @@ const isScoreShow = ref(false);
const curScore = ref(0);
const scoreDetail = ref<any>({});
const isAdmin = computed(() => {
console.log('🚀 ~ route.query.admin :', route.query.admin);
return route.query.admin == 'superman' || Session.get('userInfoLocal').userType == '02' || Session.get('userInfoLocal').userType == '01'
? true
: false;
@ -1249,6 +1257,7 @@ onMounted(async () => {
:deep(.el-button--large) {
padding: 0;
height: 35px;
}
:deep(.is-disabled) {
@ -1378,23 +1387,18 @@ onMounted(async () => {
align-items: center;
}
:deep(.el-table__expand-icon .el-icon-arrow-right:before) {
background: url('../../../../assets/images/文件夹未展开.png') no-repeat;
content: '';
display: block;
width: 16px;
height: 16px;
font-size: 16px;
background-size: 16px;
}
.el-button + .el-button {
margin-left: 0px;
}
.record_btn {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #6b6c6f;
line-height: 20px;
text-align: left;
font-style: normal;
cursor: pointer;
}
</style>