[update] 企标增加编辑删除权限控制

This commit is contained in:
lideqin
2023-11-01 17:02:42 +08:00
parent dbaa6cd5d0
commit 9db70755c9
@@ -95,8 +95,8 @@
@change="tableOnChange">
<!-- 在混入里已经过滤过没有权限的按钮了 -->
<template slot="operation" slot-scope="{text, record}">
<!-- 查看详情权限 -->
<template v-if="record.detailFlag">
<!-- 编辑删除权限 -->
<template v-if="record.editFlag">
<a v-for="(operation, index) in operationList.slice(0, operateMaxNum)" :key="index" @click="operationClick(operation,record)">
<template v-if="operation.text === $t('enterpriseStandardLibrary.standard.collection')">
<i class="iconfont icon-star1" v-show="record.collectionFlag" />
@@ -121,6 +121,24 @@
</a-menu>
</a-dropdown>
</template>
<!-- 没有编辑删除权限 -->
<template v-else>
<a v-for="(operation, index) in operationList.slice(0, operateMaxNum)" :key="index" @click="operationClick(operation,record)">
<template v-if="operation.text === $t('enterpriseStandardLibrary.standard.collection')">
<i class="iconfont icon-star1" v-show="record.collectionFlag" />
<i class="iconfont icon-star" v-show="!record.collectionFlag" />
</template>
</a>
<a-divider v-if="operationList.find(item => item.text === $t('share'))" type="vertical" />
<template v-if="operationList.find(item => item.text === $t('share'))">
<template v-for="(operation, index) in operationList.slice(operateMaxNum)">
<a :key="index" @click="operationClick(operation,record)" v-if="operation.text === $t('share')">
<!-- 分享图标 -->
<i class="iconfont icon-fangxingfenxiang operate-btn-icon" />{{ operation.text }}
</a>
</template>
</template>
</template>
</template>
<!-- 企标编号 -->