| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637 |
- <template>
- <div class="page">
- <div class="pipeline">
- <div class="pipeline_module">
- <div class="tanks">
- <dv-percent-pond class="vertical_pond pond_pos1" :config="{ value: pondValue, lineDash }"
- style="width:270px;height:100px;" />
- <dv-percent-pond class="vertical_pond pond_pos2" :config="{ value: pondValue, lineDash }"
- style="width:270px;height:100px;" />
- <dv-percent-pond class="vertical_pond pond_pos3" :config="{ value: pondValue, lineDash }"
- style="width:270px;height:100px;" />
- <dv-percent-pond class="vertical_pond pond_pos4" :config="{ value: pondValue, lineDash }"
- style="width:270px;height:100px;" />
- </div>
- <!-- 蓝色管道 -->
- <div class="progress_blue">
- <b-progress :value="100" striped :animated="upInWaterState"
- class=" rotate_270 progress progress_pos1"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState"
- class=" rotate_270 progress progress_pos2"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState"
- class=" rotate_270 progress progress_pos3"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState"
- class=" rotate_270 progress progress_pos4"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState"
- class=" rotate_180 progress progress_pos5"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || downInWaterState"
- class=" rotate_270 progress progress_pos6"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState"
- class=" rotate_270 progress progress_pos7"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || outWaterState"
- class=" rotate_90 progress progress_pos8"
- :class="{ 'rotate_270': outWaterState, 'progress_green': outWaterState }"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || outWaterState"
- class=" rotate_90 progress progress_pos9"
- :class="{ 'rotate_270': outWaterState, 'progress_green': outWaterState }"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || outWaterState"
- class=" rotate_90 progress progress_pos10"
- :class="{ 'rotate_270': outWaterState, 'progress_green': outWaterState }"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || outWaterState"
- class=" rotate_90 progress progress_pos11"
- :class="{ 'rotate_270': outWaterState, 'progress_green': outWaterState }"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState"
- class=" rotate_180 progress progress_pos12"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || downInWaterState"
- class=" rotate_180 progress progress_pos34"></b-progress>
- </div>
- <!-- 黄色管道(气管) -->
- <div class="progress_yellow">
- <b-progress :value="100" striped :animated="upInGasState"
- class=" rotate_270 progress progress_pos13"></b-progress>
- <b-progress :value="100" striped :animated="upInGasState"
- class=" rotate_270 progress progress_pos14"></b-progress>
- <b-progress :value="100" striped :animated="upInGasState"
- class=" rotate_270 progress progress_pos15"></b-progress>
- <b-progress :value="100" striped :animated="upInGasState"
- class=" rotate_270 progress progress_pos16"></b-progress>
- <b-progress :value="100" striped :animated="upInGasState"
- class=" progress progress_pos17"></b-progress>
- <b-progress :value="100" striped :animated="downInGasState"
- class=" rotate_270 progress progress_pos18"></b-progress>
- <b-progress :value="100" striped :animated="downInGasState"
- class=" rotate_90 progress progress_pos19"></b-progress>
- <b-progress :value="100" striped :animated="downInGasState"
- class=" rotate_90 progress progress_pos20"></b-progress>
- <b-progress :value="100" striped :animated="downInGasState"
- class=" rotate_90 progress progress_pos21"></b-progress>
- <b-progress :value="100" striped :animated="downInGasState"
- class=" rotate_90 progress progress_pos22"></b-progress>
- <b-progress :value="100" striped :animated="downInGasState"
- class=" progress progress_pos23"></b-progress>
- <b-progress :value="100" striped :animated="upInGasState || downInGasState"
- class=" progress progress_pos35"></b-progress>
- </div>
- <!-- 淡蓝色管道(上排水) -->
- <div class="progress_blue_light">
- <b-progress :value="100" striped :animated="upInWaterState || downInWaterState"
- class=" rotate_90 progress progress_pos24"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || downInWaterState"
- class=" rotate_90 progress progress_pos25"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || downInWaterState"
- class=" rotate_90 progress progress_pos26"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || downInWaterState"
- class=" rotate_90 progress progress_pos27"></b-progress>
- <b-progress :value="100" striped :animated="upInWaterState || downInWaterState"
- class=" progress progress_pos28"></b-progress>
- </div>
- <!-- 绿色管道(下排水) -->
- <div class="progress_green">
- <b-progress :value="100" striped :animated="outWaterState"
- class=" rotate_270 progress progress_pos29"></b-progress>
- <b-progress :value="100" striped :animated="outWaterState"
- class=" rotate_270 progress progress_pos30"></b-progress>
- <b-progress :value="100" striped :animated="outWaterState"
- class=" rotate_270 progress progress_pos31"></b-progress>
- <b-progress :value="100" striped :animated="outWaterState"
- class=" rotate_270 progress progress_pos32"></b-progress>
- <b-progress :value="100" striped :animated="outWaterState"
- class=" rotate_180 progress progress_pos33"></b-progress>
- </div>
- <!-- 阀门 -->
- <div class="valves">
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- //水库容量
- pondValue: 20,
- lineDash: [100, 0],//罐内水位线条样式
- interval: null,//定时器
- // animate: true,//是否动画
- //阀门状态数组
- upInWaterState: false,//上进水阀门状态
- downInWaterState: false,//下进水阀门状态
- outWaterState: false,//出水阀门状态
- upInGasState: false,//上进气阀门状态
- downInGasState: false,//下进气阀门状态
- };
- },
- mounted() {
- this.getValveState();
- },
- methods: {
- //获取阀门状态
- getValveState() {
- this.upInWaterState = this.$route.query.upInWaterState;
- this.downInWaterState = this.$route.query.downInWaterState;
- this.outWaterState = this.$route.query.outWaterState;
- this.upInGasState = this.$route.query.upInGasState;
- this.downInGasState = this.$route.query.downInGasState;
- if (this.upInWaterState || this.downInWaterState) {
- this.addWater();
- }
- if (this.outWaterState) {
- this.reduceWater();
- }
- },
- //水量增加
- addWater() {
- this.clearWaterInterval();
- this.interval = setInterval(() => {
- if (this.pondValue < 100) {
- this.pondValue += 1;
- } else {
- this.pondValue = 0;
- }
- }, 100);
- },
- //水量减少
- reduceWater() {
- this.clearWaterInterval();
- this.interval = setInterval(() => {
- if (this.pondValue > 0) {
- this.pondValue -= 1;
- } else {
- this.pondValue = 100;
- }
- }, 100);
- },
- //清除定时器
- clearWaterInterval() {
- clearInterval(this.interval);
- this.interval = null;
- },
- },
- };
- </script>
- <style scoped lang="scss">
- // .page {
- // width: 1920px;
- // height: 1080px;
- // }
- .pipeline {
- width: 1000px;
- height: 571px;
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- .pipeline_module {
- margin-top: 100px;
- width: 700px;
- height: 400px;
- position: relative;
- .tanks {
- .vertical_pond {
- z-index: 110;
- transform: rotate(-90deg);
- /* 逆时针旋转90度 */
- transform-origin: 50% 50%;
- /* 设置旋转中心点 */
- }
- ::v-deep .dv-percent-pond text {
- display: none; //隐藏文字
- }
- .pond_pos1 {
- left: -50px;
- top: 155px;
- }
- .pond_pos2 {
- left: 120px;
- top: 55px;
- }
- .pond_pos3 {
- left: 290px;
- top: -45px;
- }
- .pond_pos4 {
- left: 460px;
- top: -145px;
- }
- }
- //进度条(管道)
- .progress {
- height: 8px;
- z-index: 10;
- }
- //旋转角度
- .rotate_90 {
- transform: rotate(90deg); //顺时针旋转90度
- transform-origin: 50% 50%;
- }
- .rotate_180 {
- transform: rotate(180deg); //顺时针旋转180度
- transform-origin: 50% 50%;
- }
- .rotate_270 {
- transform: rotate(-90deg); //顺时针旋转270度
- transform-origin: 50% 50%;
- }
- // 蓝色管道
- ::v-deep .progress_blue {
- .progress-bar-striped {
- background-image: linear-gradient(-45deg, transparent 50%, #0088ff 50%),
- linear-gradient(-135deg, transparent 50%, #0088ff 50%);
- background-size: 15px;
- // background-position: 0 0, 0.5rem 0.5rem;
- }
- .progress-bar {
- background-color: #edeef0;
- }
- }
- // 黄色管道
- ::v-deep .progress_yellow {
- .progress-bar-striped {
- background-image: linear-gradient(-45deg, transparent 50%, #FFA500 50%),
- linear-gradient(-135deg, transparent 50%, #FFA500 50%);
- background-size: 15px;
- // background-position: 0 0, 0.5rem 0.5rem;
- }
- .progress-bar {
- background-color: #edeef0 !important;
- }
- }
- //淡蓝色管道
- ::v-deep .progress_blue_light {
- .progress-bar-striped {
- background-image: linear-gradient(45deg,
- rgba(254, 254, 248, 1) 25%,
- transparent 25%,
- transparent 50%,
- rgba(254, 254, 248, 1) 50%,
- rgba(254, 254, 248, 1) 75%,
- transparent 75%,
- transparent) !important;
- background-size: 1rem 1rem !important;
- }
- .progress-bar {
- background-color: #60ccf0 !important;
- /* 蓝色 */
- }
- }
- // 绿色管道
- ::v-deep .progress_green {
- .progress-bar-striped {
- background-image: linear-gradient(-45deg, transparent 50%, #3ea934 50%),
- linear-gradient(-135deg, transparent 50%, #3ea934 50%) !important;
- background-size: 8px;
- // background-position: 0 0, 0.5rem 0.5rem;
- }
- .progress-bar {
- background-color: #edeef0 !important;
- }
- }
- .valves {
- .color_green {
- color: greenyellow !important;
- }
- .valve {
- color: #c4c6cc;
- z-index: 110;
- }
- // 阀门定位
- }
- //管道定位
- // 蓝色管道定位
- .progress_blue {
- .progress {
- z-index: 20; //管道层级
- }
- .rotate_90 {
- z-index: 21 !important; //管道层级
- }
- .progress_pos1 {
- position: absolute;
- left: 63px;
- top: 42px;
- width: 50px;
- }
- .progress_pos2 {
- position: absolute;
- left: 234px;
- top: 42px;
- width: 50px;
- }
- .progress_pos3 {
- position: absolute;
- left: 402px;
- top: 42px;
- width: 50px;
- }
- .progress_pos4 {
- position: absolute;
- left: 572px;
- top: 42px;
- width: 50px;
- }
- .progress_pos5 {
- position: absolute;
- left: 10px;
- top: 20px;
- width: 591px;
- }
- .progress_pos6 {
- position: absolute;
- left: -61px;
- top: -1px;
- width: 50px;
- }
- .progress_pos7 {
- position: absolute;
- left: -170px;
- top: 200px;
- width: 368px;
- }
- .progress_pos8 {
- position: absolute;
- left: 61px;
- top: 362px;
- width: 52px;
- }
- .progress_pos9 {
- position: absolute;
- left: 231px;
- top: 362px;
- width: 52px;
- }
- .progress_pos10 {
- position: absolute;
- left: 401px;
- top: 362px;
- width: 52px;
- }
- .progress_pos11 {
- position: absolute;
- left: 571px;
- top: 362px;
- width: 52px;
- }
- .progress_pos12 {
- position: absolute;
- left: 10px;
- top: 383px;
- width: 591px;
- }
- .progress_pos34 {
- position: absolute;
- left: -40px;
- top: 20px;
- width: 60px;
- }
- }
- // 黄色管道定位
- .progress_yellow {
- .progress {
- z-index: 10; //管道层级
- }
- .progress_pos13 {
- position: absolute;
- left: 82px;
- top: 33px;
- width: 70px;
- }
- .progress_pos14 {
- position: absolute;
- left: 252px;
- top: 33px;
- width: 70px;
- }
- .progress_pos15 {
- position: absolute;
- left: 422px;
- top: 33px;
- width: 70px;
- }
- .progress_pos16 {
- position: absolute;
- left: 592px;
- top: 33px;
- width: 70px;
- }
- .progress_pos17 {
- position: absolute;
- left: 113px;
- top: 1px;
- width: 565px;
- }
- .progress_pos18 {
- position: absolute;
- left: 468px;
- top: 204px;
- width: 410px;
- }
- .progress_pos19 {
- position: absolute;
- left: 529px;
- top: 371px;
- width: 74px;
- }
- .progress_pos20 {
- position: absolute;
- left: 363px;
- top: 371px;
- width: 74px;
- }
- .progress_pos21 {
- position: absolute;
- left: 192px;
- top: 371px;
- width: 74px;
- }
- .progress_pos22 {
- position: absolute;
- left: 24px;
- top: 371px;
- width: 74px;
- }
- .progress_pos23 {
- position: absolute;
- left: 58px;
- top: 405px;
- width: 618px;
- }
- .progress_pos35 {
- position: absolute;
- left: 670px;
- top: 1px;
- width: 100px;
- }
- }
- //淡蓝色管道定位
- .progress_blue_light {
- .progress {
- z-index: 30; //管道层级
- }
- .progress_pos24 {
- position: absolute;
- left: 13px;
- top: 23px;
- width: 90px;
- }
- .progress_pos25 {
- position: absolute;
- left: 184px;
- top: 23px;
- width: 90px;
- }
- .progress_pos26 {
- position: absolute;
- left: 354px;
- top: 23px;
- width: 90px;
- }
- .progress_pos27 {
- position: absolute;
- left: 524px;
- top: 23px;
- width: 90px;
- }
- .progress_pos28 {
- position: absolute;
- left: -3px;
- top: -18px;
- width: 576px;
- }
- }
- .progress_green {
- .progress {
- z-index: 40; //管道层级
- }
- .progress_pos29 {
- position: absolute;
- left: 62px;
- top: 411px;
- width: 50px;
- }
- .progress_pos30 {
- position: absolute;
- left: 232px;
- top: 411px;
- width: 50px;
- }
- .progress_pos31 {
- position: absolute;
- left: 402px;
- top: 411px;
- width: 50px;
- }
- .progress_pos32 {
- position: absolute;
- left: 572px;
- top: 411px;
- width: 50px;
- }
- .progress_pos33 {
- position: absolute;
- left: 84px;
- top: 433px;
- width: 688px;
- }
- }
- }
- }
- </style>
|