Commit 52d7e9f6 by wangzhihui

```

feat(commissionPlanList): 新增状态列显示功能

- 添加状态列到表格中,支持状态的可视化展示
- 增加状态颜色标识和样式配置
- 引入getStatusColor函数处理状态颜色映射
- 添加在线状态样式类用于状态显示
- 导入statusList和statusTypeOptMap常量配置
```
1 parent 731841b7
...@@ -15,6 +15,25 @@ ...@@ -15,6 +15,25 @@
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
> >
<!-- 状态 -->
<div slot="statusHtml" slot-scope="scope">
<div
class="online-status"
v-if="scope.scope.status === 0 || scope.scope.status"
>
<span
class="dot"
:style="{
background: getStatusColor(
scope && scope.scope && scope.scope.status,
'statusTypeOptMap'
)
}"
></span>
{{ getStatusItem(baseData, "statusList", scope.scope, "status") }}
</div>
<span v-else>-</span>
</div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleParameter(scope.scope)" <el-button type="text" @click="handleParameter(scope.scope)"
>调整参数</el-button >调整参数</el-button
...@@ -25,13 +44,18 @@ ...@@ -25,13 +44,18 @@
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { Util, deepClone, getStatusItem } from "@/common/util" import { Util, deepClone, getStatusItem, getStatusColor } from "@/common/util"
import { getConfigList } from "@api/salaryManagement" import { getConfigList } from "@api/salaryManagement"
import { outputValue_businessOpt } from "@/common/constants" import {
outputValue_businessOpt,
statusList,
statusTypeOptMap
} from "@/common/constants"
export default { export default {
name: "commissionPlanList", name: "commissionPlanList",
data() { data() {
return { return {
getStatusColor,
getStatusItem, getStatusItem,
getListApi: getConfigList, getListApi: getConfigList,
tableParams: { tableParams: {
...@@ -67,6 +91,12 @@ export default { ...@@ -67,6 +91,12 @@ export default {
} }
}, },
{ {
label: "状态",
prop: "status",
minWidth: 120,
addHtml: "statusHtml"
},
{
label: "生效月份", label: "生效月份",
prop: "effectiveMonth", prop: "effectiveMonth",
formatter: (cellValue) => { formatter: (cellValue) => {
...@@ -102,7 +132,9 @@ export default { ...@@ -102,7 +132,9 @@ export default {
confId: 0, confId: 0,
confValue: "轻改" confValue: "轻改"
} }
] ],
statusList: deepClone(statusList),
statusTypeOptMap: deepClone(statusTypeOptMap)
}, },
searchFormSearch: {} searchFormSearch: {}
} }
...@@ -147,4 +179,17 @@ export default { ...@@ -147,4 +179,17 @@ export default {
.d2-container-content { .d2-container-content {
position: relative; position: relative;
} }
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!