This commit is contained in:
shijing 2023-11-24 10:39:36 +08:00
parent db3e181254
commit 0f6ffb356b
2 changed files with 12 additions and 11 deletions

View File

@ -20,7 +20,7 @@
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="state"> <el-table-column label="状态" prop="state">
<template #default="scope"> <template #default="scope">
<span><el-tag :type="stateOption[scope.row.state].color">{{ stateOption[scope.row.state] }}</el-tag></span> <span><el-tag :type="stateOption[scope.row.state].color">{{ stateOption[scope.row.state].label }}</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="提交时间" prop="submit_time"> <el-table-column label="提交时间" prop="submit_time">
@ -69,11 +69,12 @@ export default {
}, },
selection: [], selection: [],
stateOption: { stateOption: {
10: '创建中', 10: {"label": "创建中", "color": ""},
20: '已提交', 20: {"label": "已提交", "color": ""},
30: '到货中', 30: {"label": "到货中", "color": ""},
40: '已完成', 40: {"label": "已完成", "color": "success"},
}, },
}; };
}, },
methods: { methods: {

View File

@ -18,7 +18,7 @@
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="state"> <el-table-column label="状态" prop="state">
<template #default="scope"> <template #default="scope">
<span><el-tag :type="stateOption[scope.row.state].color">{{ stateOption[scope.row.state] }}</el-tag></span> <span><el-tag :type="stateOption[scope.row.state].color">{{ stateOption[scope.row.state].label }}</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="提交时间" prop="submit_time" show-overflow-tooltip> <el-table-column label="提交时间" prop="submit_time" show-overflow-tooltip>
@ -66,11 +66,11 @@ export default {
}, },
selection: [], selection: [],
stateOption: { stateOption: {
10: '创建中', 10: {"label": "创建中", "color": ""},
20: '已提交', 20: {"label": "已提交", "color": ""},
30: '下单中', 30: {"label": "下单中", "color": ""},
40: '下单完成', 40: {"label": "下单完成", "color": ""},
50: '已完成', 40: {"label": "已完成", "color": "success"},
}, },
}; };
}, },