|
@@ -27,6 +27,12 @@
|
|
|
{{ row.code }}
|
|
{{ row.code }}
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-slot:status="{ row }">
|
|
|
|
|
+ <span :class="{ 'ele-text-danger': row.status == 3 }">
|
|
|
|
|
+ {{ statusFormatter(row.status) }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
<!-- 操作列 -->
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link
|
|
<el-link
|
|
@@ -249,10 +255,9 @@
|
|
|
minWidth: 110
|
|
minWidth: 110
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'status',
|
|
|
|
|
|
|
+ slot: 'status',
|
|
|
label: '状态',
|
|
label: '状态',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- minWidth: 110,
|
|
|
|
|
formatter: (row) => {
|
|
formatter: (row) => {
|
|
|
const obj = this.statusOpt[this.activeName].find(
|
|
const obj = this.statusOpt[this.activeName].find(
|
|
|
(i) => i.value == row.status
|
|
(i) => i.value == row.status
|
|
@@ -289,6 +294,13 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ statusFormatter (status) {
|
|
|
|
|
+ const obj = this.statusOpt[this.activeName].find(
|
|
|
|
|
+ (i) => i.value == status
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ return obj && obj.label;
|
|
|
|
|
+ },
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
datasource ({ page, limit, where }) {
|
|
datasource ({ page, limit, where }) {
|
|
|
return getList({
|
|
return getList({
|