80 lines
2.0 KiB
Vue
Raw Normal View History

2022-10-17 10:13:22 +08:00
<template>
2022-10-25 15:25:40 +08:00
<div class="container" ref="Process">
<div class="process">
<vue-scroll :ops="ops" ref="stageScroll">
<Process style="transform: translateX(0)" :list="stageList" />
</vue-scroll>
2022-10-17 10:13:22 +08:00
</div>
2022-10-25 15:25:40 +08:00
</div>
2022-10-17 10:13:22 +08:00
</template>
<script>
2022-10-25 15:25:40 +08:00
import Process from "./Process";
import { listProgressOfTheTask } from "@/assets/js/api/zhongjianFourth";
2022-10-17 10:13:22 +08:00
export default {
components: { Process },
2022-10-17 10:13:22 +08:00
data() {
return {
2022-10-25 15:25:40 +08:00
ops: {
vuescroll: {
// wheelScrollDuration: 0,
wheelDirectionReverse: true
}
},
// projectData.constructionStage
stageList: this.$t("message.companyDiagram.CONSTRUCTIONSTAGE"),
2022-10-17 10:13:22 +08:00
list: [
// { 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: '室内装饰装修工程' }
2022-10-17 10:13:22 +08:00
],
2022-10-25 15:25:40 +08:00
index: 0,
};
2022-10-17 10:13:22 +08:00
},
mounted() {
const progress = this.$refs.Process;
progress.scrollLeft = 48;
2022-10-25 15:25:40 +08:00
this.getData();
2022-10-17 10:13:22 +08:00
},
2022-10-25 15:25:40 +08:00
methods: {
getData() {
2022-12-12 13:43:14 +08:00
// 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;
// }
// });
// console.log("进度条的返回值", res);
// this.list = res.result;
// });
2022-10-25 15:25:40 +08:00
},
},
};
2022-10-17 10:13:22 +08:00
</script>
<style lang="less" scoped>
.container {
display: grid;
place-items: center;
width: 100%;
height: 100%;
2022-10-25 15:25:40 +08:00
// overflow: auto;
.process {
margin-top: 5%;
width: 95%;
height: 85%;
overflow: hidden;
}
.process:hover{
overflow-x: auto;
}
2022-10-17 10:13:22 +08:00
}
</style>