flx:安全/质量自检新增状态和总数

This commit is contained in:
X_Rian 2024-07-31 11:34:00 +08:00
parent 03cf6a4e04
commit 787ad02b42
2 changed files with 90 additions and 8 deletions

View File

@ -115,6 +115,23 @@
{{ scope.row.startTime }} {{ scope.row.endTime }}
</template>
</el-table-column>
<el-table-column
prop="inspectNum"
label="任务状态"
align="center"
>
<template slot-scope="scope">
<div class="stateItem">
<div>
{{ scope.row.taskCompleteNum ? scope.row.taskCompleteNum : 0 }}/{{ scope.row.taskNum ? scope.row.taskNum : 0 }}
</div>
<!-- bg-cbad14(进行中) bg-57b54b(已完成) bg-6389f6(未开始) bg-ffc8c8(已逾期) -->
<div v-if="scope.row.taskStatus" :class="taskStatusList[scope.row.taskStatus - 1].color">
{{ taskStatusList[scope.row.taskStatus - 1].title }}
</div>
</div>
</template>
</el-table-column>
<!-- 隐患总数 -->
<el-table-column
prop="inspectNum"
@ -483,7 +500,24 @@ export default {
checkDaterange: [],
frequencyType: this.$t('message.safeMangeCheck.frequency'),
accountList: [],
enterpriseListData: []
enterpriseListData: [],
taskStatusList:[{
id: 1,
title: "未开始",
color: "bg-6389f6",
},{
id: 2,
title: "进行中",
color: "bg-cbad14",
}, {
id: 3,
title: "已完成",
color: "bg-57b54b",
}, {
id: 4,
title: "已逾期",
color: "bg-ffc8c8",
}]
}
},
@ -647,6 +681,37 @@ export default {
}
</script>
<style lang="less" scoped>
.stateItem{
display: flex;
align-items: center;
justify-content: center;
>div:last-child {
margin-left: 10px;
padding: 2px 5px;
border-radius: 5px;
}
.bg-ffc8c8 {
background-color: #FFC8C8;
color:#FF5A5F;
border: 1px solid #FF5A5F;
}
.bg-6389f6 {
background-color: #D9E3FD;
color:#6389F6;
border: 1px solid #6389F6;
}
.bg-57b54b {
background-color: #C2E8BD;
color:#57B54B;
border: 1px solid #57B54B;
}
.bg-cbad14 {
background-color: #F4E9AB;
color:#CBAD14;
border: 1px solid #CBAD14;
}
}
.filterBox {
margin: 15px;
}

View File

@ -116,7 +116,7 @@
{{ scope.row.startTime }} {{ scope.row.endTime }}
</template>
</el-table-column>
<!-- <el-table-column
<el-table-column
prop="inspectNum"
label="任务状态"
align="center"
@ -124,15 +124,15 @@
<template slot-scope="scope">
<div class="stateItem">
<div>
3/10
{{ scope.row.taskCompleteNum }}/{{ scope.row.taskNum }}
</div>
bg-cbad14(进行中) bg-57b54b(已完成) bg-6389f6(未开始) bg-ffc8c8(已逾期)
<div class="bg-ffc8c8">
已逾期
<!-- bg-cbad14(进行中) bg-57b54b(已完成) bg-6389f6(未开始) bg-ffc8c8(已逾期) -->
<div v-if="scope.row.taskStatus" :class="taskStatusList[scope.row.taskStatus - 1].color">
{{ taskStatusList[scope.row.taskStatus - 1].title }}
</div>
</div>
</template>
</el-table-column> -->
</el-table-column>
<!-- 隐患总数 -->
<el-table-column
prop="inspectNum"
@ -500,7 +500,24 @@ export default {
checkDaterange: [],
frequencyType: this.$t('message.safeMangeCheck.frequency'),
accountList: [],
enterpriseListData: []
enterpriseListData: [],
taskStatusList:[{
id: 1,
title: "未开始",
color: "bg-6389f6",
},{
id: 2,
title: "进行中",
color: "bg-cbad14",
}, {
id: 3,
title: "已完成",
color: "bg-57b54b",
}, {
id: 4,
title: "已逾期",
color: "bg-ffc8c8",
}]
}
},