滚动条处理
This commit is contained in:
parent
bfc047da2c
commit
4456edbaca
@ -1,20 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container" ref="Process">
|
<div class="container" ref="Process">
|
||||||
|
<div class="process">
|
||||||
|
<vue-scroll :ops="ops" ref="stageScroll">
|
||||||
<Process style="transform: translateX(0)" :list="stageList" />
|
<Process style="transform: translateX(0)" :list="stageList" />
|
||||||
|
</vue-scroll>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Process from './Process'
|
import Process from "./Process";
|
||||||
import { listProgressOfTheTask } from '@/assets/js/api/zhongjianFourth'
|
import { listProgressOfTheTask } from "@/assets/js/api/zhongjianFourth";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Process },
|
components: { Process },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
ops: {
|
||||||
|
vuescroll: {
|
||||||
|
// wheelScrollDuration: 0,
|
||||||
|
wheelDirectionReverse: true
|
||||||
|
}
|
||||||
|
},
|
||||||
// projectData.constructionStage
|
// projectData.constructionStage
|
||||||
stageList: this.$t('message.companyDiagram.CONSTRUCTIONSTAGE'),
|
stageList: this.$t("message.companyDiagram.CONSTRUCTIONSTAGE"),
|
||||||
list: [
|
list: [
|
||||||
// { endTime: '2022-01-01', subitemProjectName: '基础工程', state: true ,},
|
// { endTime: '2022-01-01', subitemProjectName: '基础工程', state: true ,},
|
||||||
// { endTime: '2022-02-14', subitemProjectName: '主题结构施工', state: true, },
|
// { endTime: '2022-02-14', subitemProjectName: '主题结构施工', state: true, },
|
||||||
@ -22,29 +31,32 @@ export default {
|
|||||||
// { endTime: '2022-07-31', subitemProjectName: '机械设备安拆工程', state: true, },
|
// { endTime: '2022-07-31', subitemProjectName: '机械设备安拆工程', state: true, },
|
||||||
// { endTime: '2022-21-31', subitemProjectName: '室内装饰装修工程' }
|
// { endTime: '2022-21-31', subitemProjectName: '室内装饰装修工程' }
|
||||||
],
|
],
|
||||||
index: 0
|
index: 0,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const progress = this.$refs.Process;
|
const progress = this.$refs.Process;
|
||||||
progress.scrollLeft = 48;
|
progress.scrollLeft = 48;
|
||||||
this.getData()
|
this.getData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getData() {
|
getData() {
|
||||||
listProgressOfTheTask({ projectSn: this.$store.state.projectSn ,isNoStart: false}).then(res => {
|
listProgressOfTheTask({
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
isNoStart: false,
|
||||||
|
}).then((res) => {
|
||||||
// state 0未开始, 1进行中, 2已完成
|
// state 0未开始, 1进行中, 2已完成
|
||||||
res.result.forEach((item) => {
|
res.result.forEach((item) => {
|
||||||
if (item.state == 2) {
|
if (item.state == 2) {
|
||||||
item.state = true
|
item.state = true;
|
||||||
}
|
|
||||||
})
|
|
||||||
console.log('进度条的返回值',res)
|
|
||||||
this.list = res.result
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
console.log("进度条的返回值", res);
|
||||||
|
this.list = res.result;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@ -53,6 +65,15 @@ export default {
|
|||||||
place-items: center;
|
place-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: auto;
|
// overflow: auto;
|
||||||
|
.process {
|
||||||
|
margin-top: 5%;
|
||||||
|
width: 95%;
|
||||||
|
height: 85%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.process:hover{
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user