[update] 封装表格操作列,有特殊判断
This commit is contained in:
@@ -105,6 +105,12 @@
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
operSpecialJudgeField="delayFlag"
|
||||
:operSpecialJudgeValue="false"
|
||||
:operSpecialJudgeDelBtn="$t('enterpriseStandardLibrary.check.deferredCheck')"
|
||||
:operationList="operationList"
|
||||
:operateMaxNum="operateMaxNum"
|
||||
@operationClick="operationClick"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 企标编号/企标名称 -->
|
||||
@@ -125,31 +131,31 @@
|
||||
</template>
|
||||
|
||||
<!-- 操作栏 -->
|
||||
<div slot="action" slot-scope="{text, record}" class="action-span-cell">
|
||||
<template v-if="record.delayFlag && isHasPermission(operationList[0].has)">
|
||||
<a @click="operationClick(operationList[0],record)">{{ operationList[0].text }}</a>
|
||||
<template v-if="operationList.length > operateMaxNum">
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown placement="bottomCenter">
|
||||
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
|
||||
<a @click="operationClick(operation,record)">
|
||||
<div class="operate-btn">
|
||||
{{ operation.text }}
|
||||
</div>
|
||||
</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="operationList.length > 0">
|
||||
<template v-for="(operation, index) in operationList.slice(1)">
|
||||
<a :key="index" @click="operationClick(operation,record)">{{ operation.text }}</a>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<!--<div slot="action" slot-scope="{text, record}" class="action-span-cell">-->
|
||||
<!-- <template v-if="record.delayFlag && isHasPermission(operationList[0].has)">-->
|
||||
<!-- <a @click="operationClick(operationList[0],record)">{{ operationList[0].text }}</a>-->
|
||||
<!-- <template v-if="operationList.length > operateMaxNum">-->
|
||||
<!-- <a-divider type="vertical" />-->
|
||||
<!-- <a-dropdown placement="bottomCenter">-->
|
||||
<!-- <a-icon type="more" class="operate-icon-btn operate-icon-more" />-->
|
||||
<!-- <a-menu slot="overlay">-->
|
||||
<!-- <a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">-->
|
||||
<!-- <a @click="operationClick(operation,record)">-->
|
||||
<!-- <div class="operate-btn">-->
|
||||
<!-- {{ operation.text }}-->
|
||||
<!-- </div>-->
|
||||
<!-- </a>-->
|
||||
<!-- </a-menu-item>-->
|
||||
<!-- </a-menu>-->
|
||||
<!-- </a-dropdown>-->
|
||||
<!-- </template>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template v-else-if="operationList.length > 0">-->
|
||||
<!-- <template v-for="(operation, index) in operationList.slice(1)">-->
|
||||
<!-- <a :key="index" @click="operationClick(operation,record)">{{ operation.text }}</a>-->
|
||||
<!-- </template>-->
|
||||
<!-- </template>-->
|
||||
<!--</div>-->
|
||||
|
||||
</j-table>
|
||||
</div>
|
||||
@@ -288,6 +294,7 @@ export default {
|
||||
title: this.$t('operation'),
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 200
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user