中建四(指挥中心):进度管理接口对接
This commit is contained in:
parent
ec6c77d17f
commit
b137940af4
@ -2,10 +2,10 @@
|
||||
<template>
|
||||
<div class="list progress">
|
||||
<div class="list-item progress-item" v-for="(item, index) in list" :key="index">
|
||||
<div :class="['progress-item-dot', { active: item.active }]"></div>
|
||||
<div :class="['progress-item-dot', { active: item.state }]"></div>
|
||||
<div class="info">
|
||||
<span class="label">{{ item.label }}</span>
|
||||
<span class="value">{{ item.value }}</span>
|
||||
<span class="label">{{ item.endTime }}</span>
|
||||
<span class="value">{{ item.subitemProjectName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -9,17 +9,18 @@
|
||||
<script>
|
||||
import Process from './Process'
|
||||
import Card from '../../components/Card'
|
||||
import { listProgressOfTheTask } from '@/assets/js/api/zhongjianFourth'
|
||||
|
||||
export default {
|
||||
components: { Card, Process },
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{ label: '2022-01-01', value: '基础工程', active: true },
|
||||
{ label: '2022-02-14', value: '主题结构施工', active: true },
|
||||
{ label: '2022-03-25', value: '屋面工程', active: true },
|
||||
{ label: '2022-07-31', value: '机械设备安拆工程', active: true },
|
||||
{ label: '2022-21-31', value: '室内装饰装修工程' }
|
||||
{ endTime: '2022-01-01', subitemProjectName: '基础工程', state: true ,},
|
||||
// { endTime: '2022-02-14', subitemProjectName: '主题结构施工', state: true, },
|
||||
// { endTime: '2022-03-25', subitemProjectName: '屋面工程', state: true, },
|
||||
// { endTime: '2022-07-31', subitemProjectName: '机械设备安拆工程', state: true, },
|
||||
// { endTime: '2022-21-31', subitemProjectName: '室内装饰装修工程' }
|
||||
],
|
||||
index: 0
|
||||
}
|
||||
@ -27,7 +28,21 @@ export default {
|
||||
mounted() {
|
||||
const progress = this.$refs.Process;
|
||||
progress.scrollLeft = 48;
|
||||
this.getData()
|
||||
},
|
||||
methods:{
|
||||
getData(){
|
||||
listProgressOfTheTask({ projectSn: this.$store.state.projectSn ,isNoStart: false}).then(res => {
|
||||
// state 0未开始, 1进行中, 2已完成
|
||||
res.result.forEach((item)=>{
|
||||
if(item.state == 2){
|
||||
item.state = true
|
||||
}
|
||||
})
|
||||
this.list = res.result
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user