列表状态插槽

This commit is contained in:
zhaoxiao
2021-09-30 14:49:19 +08:00
parent 4b19f803e3
commit 060f17b704
8 changed files with 214 additions and 16 deletions
+20 -7
View File
@@ -38,9 +38,21 @@
<div>
<a-spin :spinning="loading">
<project-table :column-data="columns" :table-data="dataSource" @change="handlePageChange">
<!-- 打包、需要发票、到账、开票、邮寄-->
<!-- 打包、需要发票-->
<template v-slot:status-pack="{record, text}">
<status-slot :statu-obj="record" :status-no="text"></status-slot>
</template>
<!-- 到账-->
<template v-slot:status="{record, text}">
<div @click="d(record)">{{ text }}</div>
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
</template>
<!-- 开票-->
<template v-slot:status-bill="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot>
</template>
<!-- 邮寄-->
<template v-slot:status-mail="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="mail"></status-slot>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record}">
@@ -75,10 +87,11 @@
import { JeroListMixin } from '@/mixins/JeroListMixin'
import ProjectTable from '@comp/table/ProjectTable'
import ProjectDetailModal from '@views/MessagePage/ProjectDetailModal'
import StatusSlot from '@comp/tools/StatusSlot'
export default {
name: 'MineProject',
components: { ProjectTable, ProjectDetailModal },
components: { ProjectTable, ProjectDetailModal, StatusSlot },
mixins: [JeroListMixin],
data() {
return {
@@ -111,13 +124,13 @@ export default {
}, {
title: '打包',
dataIndex: 'pack',
scopedSlots: 'status',
scopedSlots: 'status-pack',
col: 2
}, {
title: '需要发票',
col: 2,
dataIndex: 'needInvoice',
scopedSlots: 'status',
scopedSlots: 'status-pack',
slot: 'status'
}, {
title: '到账',
@@ -127,12 +140,12 @@ export default {
}, {
title: '开票',
dataIndex: 'makeInvoice',
scopedSlots: 'status',
scopedSlots: 'status-bill',
col: 2
}, {
title: '邮寄',
dataIndex: 'mail',
scopedSlots: 'status',
scopedSlots: 'status-mail',
col: 2
}
],