[update] 封装表格操作列,有特殊判断

This commit is contained in:
lideqin
2023-09-18 10:01:10 +08:00
parent 838bf6d651
commit 929fb3b737
8 changed files with 192 additions and 26 deletions
@@ -176,7 +176,7 @@
</template>
<!-- 操作栏 -->
<div slot="action" slot-scope="{text, record}" class="action-span-cell">
<div slot="action" slot-scope="{record}" class="action-span-cell">
<a @click="handleDetail(record)" class="table-ope-btn" v-has="'enterpriseStandardLibrary:plan:detail'">{{ $t('view') }}</a>
<a @click="handleDelete(record.id)" class="table-ope-btn" v-if="record.allowDel" v-has="'enterpriseStandardLibrary:plan:delete'">{{ $t('delete') }}</a>
</div>
@@ -198,6 +198,18 @@ export default {
mixins: [JeroListMixin],
data () {
return {
operationList: [
{
text: this.$t('view'),
clickEvent: 'handleDetail',
has: 'enterpriseStandardLibrary:plan:detail'
},
{
text: this.$t('delete'),
clickEvent: 'handleDelete',
has: 'enterpriseStandardLibrary:plan:delete'
}
],
categoryTreeList: [], // 组织机构下拉框数据
labelCol: {
span: 4
@@ -378,6 +390,7 @@ export default {
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 200
}
],