From 28bd61701bb409257ea0dd3c78f32bd0b45ebbd5 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期一, 06 三月 2023 09:16:35 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW --- src/components/Screen/left.vue | 162 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 148 insertions(+), 14 deletions(-) diff --git a/src/components/Screen/left.vue b/src/components/Screen/left.vue index 97ee516..2f30e4b 100644 --- a/src/components/Screen/left.vue +++ b/src/components/Screen/left.vue @@ -3,23 +3,80 @@ <div class="leftarrow"> <img :src="leftImg" @click="ChangeLeft" /> </div> - <div class="leftContainer" v-if="ChartDisplay"> - <div class="current1" style="height: 27%;" id="leftCurrent1"> + <div class="leftContainer" v-if="currentDisplay == '澶у睆' && ChartDisplay"> + <div class="current1" id="leftCurrent1"> <div class="aside-title">鏁版嵁鐢宠娆℃暟</div> - <count-data-apply ></count-data-apply> + <count-data-apply></count-data-apply> </div> - <div class="current1" style="height: 27%;" id="leftCurrent2"> - <div class="aside-title">鏈嶅姟绫诲埆</div> - + <div class="current1" id="leftCurrent2"> + <div class="aside-title">鐢ㄦ埛璁块棶閲�</div> <service-type></service-type> </div> - <div class="current1" style="height: 36%;" id="leftCurrent3"> - <div class="aside-title">瀛樺偍淇℃伅</div> + <div class="current1" id="leftCurrent3"> + <div class="aside-title">椤圭洰瀛樺偍淇℃伅</div> <data-storage></data-storage> </div> </div> - <div class="leftContainer" v-if="ProjectreeDisplay"> - <project-tree></project-tree> + <!-- 鍏ㄧ悆銆佸叏鍥界粺璁℃鏁� --> + <div class="leftContainer" v-if="currentDisplay == '椤圭洰'"> + <div class="current1" id="leftCurrent1"> + <div class="aside-title">鏁版嵁鎬昏</div> + <div class="wrapper"> + <div class="title">{{ currentProject }}</div> + <dv-digital-flop style="height: 40px" :config="xmCountConfig" /> + </div> + </div> + <div class="current1" id="leftCurrent2"> + <div class="aside-title">瀛樺偍淇℃伅</div> + <base-line-chart + :requsetFn="requsetFn" + :project="currentProject" + title="鏁版嵁瀛樺偍閲�" + ></base-line-chart> + </div> + <div class="current1" id="leftCurrent3"> + <div class="aside-title">鏁版嵁瀛樺偍閲�</div> + <data-storage-type></data-storage-type> + </div> + </div> + <!-- 鍏ㄧ悆銆佸叏鍥界缃戝浘 --> + <div class="leftContainer" v-if="currentDisplay == '绠$綉'"> + <div class="current1" id="leftCurrent1"> + <div class="aside-title">鏁版嵁鎬昏</div> + <div class="wrapper"> + <div class="title">{{ currentProject }}</div> + <dv-digital-flop style="height: 40px" :config="xmCountConfig" /> + </div> + </div> + <div class="current1" id="leftCurrent2"> + <div class="aside-title">绠$綉闀垮害</div> + <base-line-chart + :requsetFn="requsetFn" + :project="currentProject" + title="绠$綉闀垮害" + ></base-line-chart> + <!-- <base-pie-chart :project="currentProject"></base-pie-chart> --> + <!-- <service-type></service-type> --> + </div> + <div class="current1" id="leftCurrent3"> + <div class="aside-title">鏁版嵁瀛樺偍閲�</div> + <data-storage-type></data-storage-type> + </div> + </div> + <!-- 鍗曚釜宸ョ▼灞曠ず --> + <div class="leftContainer" v-if="currentDisplay == '宸ョ▼'"> + <div class="current1"> + <div class="aside-title">宸ョ▼绠�浠�</div> + <projectintroduction></projectintroduction> + </div> + <div class="current1"> + <div class="aside-title">椤圭洰鐘舵��</div> + <projectState></projectState> + </div> + <div class="current1"> + <div class="aside-title">寤鸿宸ユ湡</div> + <projectTime></projectTime> + </div> </div> </div> </template> @@ -28,24 +85,83 @@ import countDataApply from "@/components/chart/CountDataApply.vue" import ServiceType from "../chart/ServiceType.vue" import DataStorage from "../chart/DataStorage.vue" +import DataStorageType from "../chart/DataStorageType.vue" + +import BaseBarChart from "../chart/BaseBarChart.vue" +import BaseLineChart from "../chart/BaseLineChart.vue" +import BasePieChart from "../chart/BasePieChart .vue" +import projectintroduction from "../chart/projectintroduction.vue" +import projectState from "../chart/projectState.vue" +import projectTime from "../chart/projectTime.vue" +import { + countCountryDimension, + countProvinceDimension, + countZhPipeStations, + countZhPipeMapLength, +} from "@/api/screen.js" +function formatter(number) { + const numbers = number.toString().split("").reverse() + const segs = [] + + while (numbers.length) segs.push(numbers.splice(0, 3).join("")) + + return segs.join(",").split("").reverse().join("") +} export default { components: { ProjectTree, countDataApply, ServiceType, DataStorage, + BaseBarChart, + BaseLineChart, + BasePieChart, + projectintroduction, + projectState, + projectTime, + DataStorageType }, data() { return { leftMessage: "init", ChartDisplay: true, ProjectreeDisplay: false, + GlobleChartDisplay: false, + CountryChartDisplay: false, leftImg: require("../../assets/img/Screen/rightArrow.png"), + currentProject: "鍏ㄧ悆椤圭洰", + currentDisplay: "澶у睆", + requsetFn: countZhPipeMapLength, + xmCountConfig: { + number: [0], + content: "{nt}", + formatter, + }, } }, mounted() { this.OpenLeftInit() // this.OpenLeftInitChart(); + + this.$bus.$on("changeProject", name => { + if (name.includes("鍏ㄧ悆绠$綉") || name.includes("鍏ㄥ浗绠$綉")) { + this.currentDisplay = "绠$綉" + } else if (name.includes("鍏ㄧ悆椤圭洰") || name.includes("鍏ㄥ浗椤圭洰")) { + this.currentDisplay = "椤圭洰" + } else { + this.currentDisplay = "宸ョ▼" + } + + this.currentProject = name + }) + this.$bus.$on("changeCount", count => { + if (typeof count == "number") { + this.xmCountConfig.number = [count] + this.xmCountConfig = { + ...this.xmCountConfig, + } + } + }) }, methods: { ChangeLeft() { @@ -71,11 +187,14 @@ }, //鎵撳紑澶у睆宸︿晶鐣岄潰 OpenLeftInit() { + this.currentDisplay = "澶у睆" + this.ChartDisplay = true this.ProjectreeDisplay = false this.leftMessage = "init" // this.OpenLeftInitChart(); this.$parent.ChangeWidth("leftView") + this.GlobleChartDisplay = false }, //鎵撳紑宸ョ▼鏍� OpenLeftProjectTree() { @@ -542,15 +661,14 @@ .leftContainer { height: 100%; - width: calc(100% - 7px); - + width: calc(100% - 45px); display: flex; flex-direction: column; align-items: center; justify-content: space-around; .current1 { - height: 30%; + height: 32%; width: 100%; background: url(../../assets/img/Screen/chartbg.png); background-size: 100% 100%; @@ -562,7 +680,23 @@ background: url(../../assets/img/Screen/contentBg.png); background-size: 100% 100%; background-repeat: no-repeat; - + } + .wrapper { + display: flex; + flex-direction: column; + justify-content: center; + margin: 15px auto; + width: 180px; + height: 180px; + background: url(../../assets/img/Screen/all.png); + background-size: 100% 100%; + background-repeat: no-repeat; + .title { + color: #fff; + font-size: 20px; + width: 100%; + text-align: center; + } } } } -- Gitblit v1.9.3