提交 fd0b9e3b authored 作者: 王鹏飞's avatar 王鹏飞

fix: #3296

上级 20aaa9d0
...@@ -78,6 +78,7 @@ textarea:focus { ...@@ -78,6 +78,7 @@ textarea:focus {
:root { :root {
--main-color: #ba143e; --main-color: #ba143e;
--main-success-color: #00ac27;
} }
.el-dialog__header { .el-dialog__header {
margin-right: 0 !important; margin-right: 0 !important;
......
...@@ -53,7 +53,14 @@ const listOptions = computed(() => { ...@@ -53,7 +53,14 @@ const listOptions = computed(() => {
} }
}, },
{ label: '最近计算完成时间', prop: 'record.updated_time' }, { label: '最近计算完成时间', prop: 'record.updated_time' },
{ label: '状态', prop: 'status', slots: 'table-status' }, {
label: '状态',
prop: 'status',
computed({ row }: { row: Group }) {
const color = row.status === '1' ? 'var(--main-success-color)' : 'var(--main-color)'
return `<span style="color: ${color}">${getNameByValue(row.status, statusList)}</span>`
}
},
{ label: '更新人', prop: 'created_operator.real_name' }, { label: '更新人', prop: 'created_operator.real_name' },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
{ label: '操作', slots: 'table-x', width: 240 } { label: '操作', slots: 'table-x', width: 240 }
...@@ -129,11 +136,6 @@ function handleView(row: Group) { ...@@ -129,11 +136,6 @@ function handleView(row: Group) {
<template #filter-user> <template #filter-user>
<SelectUser v-model="listParams.updated_operator" placeholder="更新人" @change="handleRefresh"></SelectUser> <SelectUser v-model="listParams.updated_operator" placeholder="更新人" @change="handleRefresh"></SelectUser>
</template> </template>
<template #table-status="{ row }: { row: Group }">
<el-tag :type="row.status === '1' ? 'success' : 'danger'">
{{ getNameByValue(row.status, statusList) }}
</el-tag>
</template>
<template #table-x="{ row }"> <template #table-x="{ row }">
<el-button type="primary" plain @click="handleView(row)">查看</el-button> <el-button type="primary" plain @click="handleView(row)">查看</el-button>
......
...@@ -56,7 +56,14 @@ const listOptions = computed(() => { ...@@ -56,7 +56,14 @@ const listOptions = computed(() => {
return getNameByValue(row.update_status, updateStatusRuleList) return getNameByValue(row.update_status, updateStatusRuleList)
} }
}, },
{ label: '状态', prop: 'status', slots: 'table-status' }, {
label: '状态',
prop: 'status',
computed({ row }: { row: Label }) {
const color = row.status === '1' ? 'var(--main-success-color)' : 'var(--main-color)'
return `<span style="color: ${color}">${getNameByValue(row.status, statusList)}</span>`
}
},
{ label: '更新人', prop: 'updated_operator.real_name' }, { label: '更新人', prop: 'updated_operator.real_name' },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
{ label: '操作', slots: 'table-x', width: 320 } { label: '操作', slots: 'table-x', width: 320 }
...@@ -117,11 +124,6 @@ function handleRule(row: Label) { ...@@ -117,11 +124,6 @@ function handleRule(row: Label) {
<template #filter-user> <template #filter-user>
<SelectUser v-model="listParams.updated_operator" placeholder="更新人" @change="handleRefresh"></SelectUser> <SelectUser v-model="listParams.updated_operator" placeholder="更新人" @change="handleRefresh"></SelectUser>
</template> </template>
<template #table-status="{ row }: { row: Label }">
<el-tag :type="row.status === '1' ? 'success' : 'danger'">
{{ getNameByValue(row.status, statusList) }}
</el-tag>
</template>
<template #table-x="{ row }"> <template #table-x="{ row }">
<el-button type="primary" plain @click="handleRule(row)">规则</el-button> <el-button type="primary" plain @click="handleRule(row)">规则</el-button>
......
...@@ -44,7 +44,14 @@ const listOptions = computed(() => { ...@@ -44,7 +44,14 @@ const listOptions = computed(() => {
return parseInt(row.score) return parseInt(row.score)
} }
}, },
{ label: '状态', prop: 'status', slots: 'table-status' }, {
label: '状态',
prop: 'status',
computed({ row }: { row: TripTemplate }) {
const color = row.status === '1' ? 'var(--main-success-color)' : 'var(--main-color)'
return `<span style="color: ${color}">${getNameByValue(row.status, statusList)}</span>`
}
},
{ label: '更新人', prop: 'updated_operator.real_name' }, { label: '更新人', prop: 'updated_operator.real_name' },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
{ label: '操作', slots: 'table-x', width: 300 } { label: '操作', slots: 'table-x', width: 300 }
...@@ -105,9 +112,7 @@ function handleConfig(row: TripTemplate) { ...@@ -105,9 +112,7 @@ function handleConfig(row: TripTemplate) {
<el-button type="primary" :icon="Plus" @click="handleAdd">新建</el-button> <el-button type="primary" :icon="Plus" @click="handleAdd">新建</el-button>
</el-space> </el-space>
</template> </template>
<template #table-status="{ row }: { row: TripTemplate }">
<el-tag :type="row.status === '1' ? 'success' : 'danger'">{{ getNameByValue(row.status, statusList) }}</el-tag>
</template>
<template #table-x="{ row }: { row: TripTemplate }"> <template #table-x="{ row }: { row: TripTemplate }">
<el-button type="primary" plain @click="handleConfig(row)">配置</el-button> <el-button type="primary" plain @click="handleConfig(row)">配置</el-button>
<el-button type="primary" plain @click="handleView(row)">查看</el-button> <el-button type="primary" plain @click="handleView(row)">查看</el-button>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论