[update] 封装表格操作列,有特殊判断
This commit is contained in:
@@ -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
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user