| | |
| | | break |
| | | case "项ç®å±ç¤º": |
| | | this.DisplayCurrentProject(child) |
| | | this.changeProject(child) |
| | | break |
| | | case "ä¸é¢å±ç¤º": |
| | | this.changeProject(child) |
| | |
| | | <div class="leftarrow"> |
| | | <img :src="leftImg" @click="ChangeLeft" /> |
| | | </div> |
| | | <div class="leftContainer" v-if="ChartDisplay"> |
| | | <div class="leftContainer" v-if="currentDisplay == '大å±' && ChartDisplay"> |
| | | <div class="current1" id="leftCurrent1"> |
| | | <div class="aside-title">æ°æ®ç³è¯·æ¬¡æ°</div> |
| | | <count-data-apply></count-data-apply> |
| | |
| | | <data-storage></data-storage> |
| | | </div> |
| | | </div> |
| | | <!-- å
¨çç»è®¡æ¬¡æ° --> |
| | | <div class="leftContainer" v-if="GlobleChartDisplay"> |
| | | <!-- å
¨çãå
¨å½ç»è®¡æ¬¡æ° --> |
| | | <div class="leftContainer" v-if="currentDisplay == '项ç®'"> |
| | | <div class="current1" id="leftCurrent1"> |
| | | <div class="aside-title">项èªç±»å</div> |
| | | <div class="aside-title">å½å
ãå½å¤</div> |
| | | </div> |
| | | <div class="current1" id="leftCurrent2"> |
| | | <div class="aside-title">ç»è®¡å°ç¾ãæ´åºçä¸ä¸æ°æ®åå¨é</div> |
| | | <base-line-chart :project="currProject"></base-line-chart> |
| | | |
| | | </div> |
| | | <div class="current1" id="leftCurrent3"> |
| | | <div class="aside-title">æ°æ®åå¨é</div> |
| | | <data-storage></data-storage> |
| | | </div> |
| | | </div> |
| | | <!-- å
¨çãå
¨å½ç®¡ç½å¾ --> |
| | | <div class="leftContainer" v-if="currentDisplay == '管ç½'"> |
| | | <div class="current1" id="leftCurrent1"> |
| | | <div class="aside-title">管ç½å½å
ãå½å¤</div> |
| | | <!-- <base-bar-chart :project="currProject"></base-bar-chart> --> |
| | | <!-- <count-data-apply></count-data-apply> --> |
| | | </div> |
| | | <div class="current1" id="leftCurrent2"> |
| | | <div class="aside-title">ç¨æ·è®¿é®é</div> |
| | | <base-pie-chart :project="currProject"></base-pie-chart> |
| | | <div class="aside-title">è¾éä»è´¨ç±»å«ç»è®¡é¿åº¦</div> |
| | | <base-line-chart :project="currProject"></base-line-chart> |
| | | <!-- <base-pie-chart :project="currProject"></base-pie-chart> --> |
| | | <!-- <service-type></service-type> --> |
| | | </div> |
| | | <div class="current1" id="leftCurrent3"> |
| | | <div class="aside-title">项ç®åå¨ä¿¡æ¯</div> |
| | | <div class="aside-title">æ°æ®åå¨é</div> |
| | | <data-storage></data-storage> |
| | | </div> |
| | | </div> |
| | | <!-- å
¨å½é¡¹ç®ç»è®¡æ¬¡æ° --> |
| | | <div class="leftContainer" v-if="CountryChartDisplay"> |
| | | <div class="current1" id="leftCurrent1"> |
| | | <div class="aside-title">æ°æ®ç³è¯·æ¬¡æ°</div> |
| | | <count-data-apply></count-data-apply> |
| | | <!-- å个工ç¨å±ç¤º --> |
| | | <div class="leftContainer" v-if="currentDisplay == 'å·¥ç¨'"> |
| | | <div class="current1" > |
| | | <div class="aside-title">å·¥ç¨ç®ä»</div> |
| | | |
| | | </div> |
| | | <div class="current1" id="leftCurrent2"> |
| | | <div class="aside-title">ç¨æ·è®¿é®é</div> |
| | | <service-type></service-type> |
| | | <div class="current1" > |
| | | <div class="aside-title">项ç®ç¶æ</div> |
| | | |
| | | </div> |
| | | <div class="current1" id="leftCurrent3"> |
| | | <div class="aside-title">项ç®åå¨ä¿¡æ¯</div> |
| | | <data-storage></data-storage> |
| | | <div class="current1"> |
| | | <div class="aside-title">建设工æ</div> |
| | | |
| | | </div> |
| | | </div> |
| | | <!-- <div class="leftContainer" v-if="ProjectreeDisplay"> |
| | |
| | | DataStorage, |
| | | BaseBarChart, |
| | | BaseLineChart, |
| | | BasePieChart |
| | | BasePieChart, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | CountryChartDisplay: false, |
| | | leftImg: require("../../assets/img/Screen/rightArrow.png"), |
| | | currProject: "å
¨ç项ç®", |
| | | currentDisplay: "大å±", |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.OpenLeftInit() |
| | | // this.OpenLeftInitChart(); |
| | | |
| | | this.$bus.$on("changeProject", name => { |
| | | this.currProject = name |
| | | this.GlobleChartDisplay = true |
| | | this.ChartDisplay = false |
| | | // if (name == "å
¨ç项ç®") { |
| | | // this.GlobleChartDisplay = true |
| | | // this.ChartDisplay = false |
| | | |
| | | // } else { |
| | | // this.ChartDisplay = true |
| | | // this.GlobleChartDisplay = false |
| | | |
| | | // } |
| | | if (name.includes("å
¨ç管ç½") || name.includes("å
¨å½ç®¡ç½")) { |
| | | this.currentDisplay = "管ç½" |
| | | } else if (name.includes("å
¨ç项ç®") || name.includes("å
¨å½é¡¹ç®")) { |
| | | this.currentDisplay = "项ç®" |
| | | } else { |
| | | this.currentDisplay = 'å·¥ç¨' |
| | | } |
| | | this.currentProject = name |
| | | }) |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | //æå¼å¤§å±å·¦ä¾§çé¢ |
| | | OpenLeftInit() { |
| | | this.currentDisplay = "大å±" |
| | | |
| | | this.ChartDisplay = true |
| | | this.ProjectreeDisplay = false |
| | | this.leftMessage = "init" |
| | | // this.OpenLeftInitChart(); |
| | | this.$parent.ChangeWidth("leftView") |
| | | this.GlobleChartDisplay = false |
| | | |
| | | }, |
| | | //æå¼å·¥ç¨æ |
| | | OpenLeftProjectTree() { |
| | |
| | | |
| | | .leftContainer { |
| | | height: 100%; |
| | | width: calc(100% - 7px); |
| | | width: calc(100% - 45px); |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | |
| | | <template> |
| | | <div class="current"> |
| | | <div class="rightContainer" v-if="ChartDisplay"> |
| | | <div class="rightContainer" v-if="currentDisplay == '大å±' && ChartDisplay"> |
| | | <div class="current1"> |
| | | <div class="aside-title">项ç®ç»è®¡</div> |
| | | <project-category></project-category> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">æ°æ®ç»è®¡</div> |
| | | <!-- <div class="content" style="height:30px"> |
| | | <div class="header"> |
| | | <div>æ ¼å¼</div> |
| | | <div>æ°é</div> |
| | | </div> |
| | | </div> --> |
| | | <file-format></file-format> |
| | | <visit-count></visit-count> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">æå¡è®¿é®æ¬¡æ°</div> |
| | | <Service-Get></Service-Get> |
| | | </div> |
| | | </div> |
| | | |
| | | <div |
| | | class="rightContainer2" |
| | | v-if="CourtyDisplay && currentProject == 'å
¨ç项ç®'" |
| | | > |
| | | <!-- å
¨çãå
¨å½é¡¹ç® --> |
| | | <div class="rightContainer" v-if="currentDisplay == '项ç®'"> |
| | | <div class="current1"> |
| | | <div class="aside-title">é¡¹ç®æ°éæ±ç¶å¾</div> |
| | | <div class="aside-title">ç«åºåº§æ°</div> |
| | | <!-- <country-dimension-bar ref="barRef"></country-dimension-bar> --> |
| | | <base-bar-chart :project="currentProject"></base-bar-chart> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">é¡¹ç®æ°é饼ç¶å¾</div> |
| | | <country-dimension-pie ref="pieRef"></country-dimension-pie> |
| | | <div class="aside-title">é室座æ°</div> |
| | | <!-- <base-pie-chart :project="currentProject"></base-pie-chart> --> |
| | | <country-dimension-pie |
| | | v-if="currentProject == 'å
¨ç项ç®'" |
| | | ref="pieRef" |
| | | ></country-dimension-pie> |
| | | <province-dimension-pie v-else ref="pieRef"></province-dimension-pie> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">é¡¹ç®æ°é饼ç¶å¾</div> |
| | | <dv-capsule-chart |
| | | :config="config" |
| | | style="width: 300px; height: 200px" |
| | | /> |
| | | <div class="aside-title">é¡¹ç®æ°æ®ä½¿ç¨æ
åµ</div> |
| | | <dv-capsule-chart :config="config" style="width: 360px; height: 85%" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div |
| | | class="rightContainer2" |
| | | v-if="CourtyDisplay && currentProject == 'å
¨å½é¡¹ç®'" |
| | | > |
| | | <!-- å
¨å½ãå
¨çç®¡ç½ --> |
| | | <div class="rightContainer" v-if="currentDisplay == '管ç½'"> |
| | | <div class="current1"> |
| | | <div class="aside-title">é¡¹ç®æ°éæ±ç¶å¾</div> |
| | | <!-- <province-dimension-bar ref="barRef"></province-dimension-bar> --> |
| | | <div class="aside-title">ç«åºåº§æ°</div> |
| | | <!-- <country-dimension-bar ref="barRef"></country-dimension-bar> --> |
| | | <base-bar-chart :project="currentProject"></base-bar-chart> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">é¡¹ç®æ°é饼ç¶å¾</div> |
| | | <province-dimension-pie ref="pieRef"></province-dimension-pie> |
| | | <div class="aside-title">é室座æ°</div> |
| | | <dv-active-ring-chart |
| | | :config="pieconfig" |
| | | style="width: 377px; height: 85%" |
| | | /> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">ä¸åè¾éä»è´¨ç®¡éæ¡æ°</div> |
| | | <dv-conical-column-chart |
| | | :config="config" |
| | | style="width: 377px; height: 85%" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <!-- åä¸ªå·¥ç¨ --> |
| | | <div class="rightContainer" v-if="currentDisplay == 'å·¥ç¨'"> |
| | | <div class="current1"> |
| | | <div class="aside-title">æ°æ®åå¨é</div> |
| | | <base-line-chart :project="currentProject"></base-line-chart> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">æ°æ®ä¸è½½æ¬¡æ°</div> |
| | | <base-pie-chart height="90%" :project="currentProject"></base-pie-chart> |
| | | </div> |
| | | <div class="current1"> |
| | | <div class="aside-title">ç»è®¡ä¸åè¾éä»è´¨ç®¡éæ¡æ°</div> |
| | | <div class="content" style="height: 30px"> |
| | | <div class="header"> |
| | | <div>æ ¼å¼</div> |
| | | <div>æ°é</div> |
| | | </div> |
| | | </div> |
| | | <file-format></file-format> |
| | | <!-- <dv-conical-column-chart |
| | | :config="config" |
| | | style="width: 377px; height: 85" |
| | | /> --> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="rightarrow"> |
| | | <img :src="RightImg" @click="ChangeRight" /> |
| | | </div> |
| | |
| | | import BaseBarChart from "../chart/BaseBarChart.vue" |
| | | import BaseLineChart from "../chart/BaseLineChart.vue" |
| | | import BasePieChart from "../chart/BasePieChart .vue" |
| | | |
| | | import VisitCount from "../chart/VisitCount.vue" |
| | | import { countCountryDimension, countProvinceDimension } from "@/api/screen.js" |
| | | |
| | | export default { |
| | |
| | | BaseBarChart, |
| | | BaseLineChart, |
| | | BasePieChart, |
| | | VisitCount, |
| | | }, |
| | | data() { |
| | | return { |
| | | ChartDisplay: true, |
| | | CourtyDisplay: false, |
| | | PipeDisPlay: false, |
| | | RightImg: require("../../assets/img/Screen/leftArrow.png"), |
| | | leftMessage: "init", |
| | | currentProject: "å
¨ç项ç®", |
| | | currentDisplay: "大å±", |
| | | countryData: [], |
| | | provinceData: [], |
| | | config: { |
| | |
| | | value: 66, |
| | | }, |
| | | ], |
| | | unit: "åä½", |
| | | showValue: true, |
| | | }, |
| | | pieconfig: { |
| | | data: [ |
| | | { |
| | | name: "å¨å£", |
| | | value: 55, |
| | | }, |
| | | { |
| | | name: "åé³", |
| | | value: 120, |
| | | }, |
| | | { |
| | | name: "西峡", |
| | | value: 78, |
| | | }, |
| | | { |
| | | name: "驻马åº", |
| | | value: 66, |
| | | }, |
| | | { |
| | | name: "æ°ä¹¡", |
| | | value: 80, |
| | | }, |
| | | ], |
| | | lineWidth: 10, |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | this.OpenLeftInit() |
| | | 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.CourtyDisplay = true |
| | | this.ChartDisplay = false |
| | | }) |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | //æå¼å¤§å±å·¦ä¾§çé¢ |
| | | OpenLeftInit() { |
| | | this.currentDisplay = "大å±" |
| | | this.ChartDisplay = true |
| | | this.CourtyDisplay = false |
| | | this.leftMessage = "init" |
| | |
| | | }, |
| | | } |
| | | </script> |
| | | <style lang="less" sc> |
| | | <style lang="less"> |
| | | .current { |
| | | height: 100%; |
| | | width: 100%; |
| | |
| | | flex-direction: row; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .rightarrow { |
| | | width: 36px; |
| | | height: 100%; |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('changeProject', name => { |
| | | if (name == 'å
¨å½é¡¹ç®' || name == 'å
¨ç项ç®') { |
| | | // this.OpenProjectree() |
| | | } |
| | | }) |
| | | // this.$bus.$on('changeProject', name => { |
| | | // if (name == 'å
¨å½é¡¹ç®' || name == 'å
¨ç项ç®') { |
| | | // this.OpenProjectree() |
| | | // } |
| | | // }) |
| | | }, |
| | | methods: { |
| | | ReturnLast() { |
| | |
| | | default: |
| | | break |
| | | } |
| | | this.initData(requsetFn) |
| | | requsetFn && this.initData(requsetFn) |
| | | this.setOptions(this.option) |
| | | }, |
| | | }, |
| | |
| | | boundaryGap: true, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#fff", |
| | | color: "#fff" |
| | | }, |
| | | show: false |
| | | }, |
| | | nameRotate: 45, |
| | | axisTick: { |
| | | show: false, |
| | | alignWithLabel: true, |
| | | }, |
| | | axisLabel: { |
| | |
| | | default: |
| | | break |
| | | } |
| | | this.initData(requsetFn) |
| | | requsetFn && this.initData(requsetFn) |
| | | |
| | | this.setOptions(this.option) |
| | | }, |
| | | }, |
| | |
| | | let data = [] |
| | | let xAxisData = [] |
| | | let yAxisData = [] |
| | | let count = 0 |
| | | let count = 0 |
| | | if (this.dataList) { |
| | | data = this.dataList |
| | | echartData = data.map(item => { |
| | |
| | | yellow: { |
| | | color: "#ffc72b", |
| | | fontSize: 18 * scale, |
| | | padding: [5, 4], |
| | | padding: [4, 4], |
| | | align: "center", |
| | | }, |
| | | total: { |
| | |
| | | color: "#fff", |
| | | align: "center", |
| | | fontSize: 14 * scale, |
| | | padding: [5, 0], |
| | | padding: [4, 0], |
| | | }, |
| | | blue: { |
| | | color: "#49dff0", |
| | |
| | | left: "1%", // ä¸å®¹å¨å·¦ä¾§çè·ç¦» |
| | | right: "1%", // ä¸å®¹å¨å³ä¾§çè·ç¦» |
| | | top: "1%", // ä¸å®¹å¨é¡¶é¨çè·ç¦» |
| | | bottom: "1%", // ä¸å®¹å¨åºé¨çè·ç¦» |
| | | bottom: "10%", // ä¸å®¹å¨åºé¨çè·ç¦» |
| | | containLabel: true, |
| | | |
| | | }, |
| | | title: { |
| | | text: "æ»æ°", |
| | |
| | | fontFamily: "YouSheBiaoTiHei", |
| | | }, |
| | | }, |
| | | |
| | | |
| | | // legend: { |
| | | // selectedMode: false, |
| | | // formatter: function (name) { |
| | |
| | | "#034079", |
| | | "#6f81da", |
| | | "#00ffb4", |
| | | "#3087d6", |
| | | "#f6ce54", |
| | | "#4be1ff", |
| | | "#b6e9ff", |
| | | "#18edc9", |
| | | "#6ac5fa", |
| | | ], |
| | | minAngle: 30, //æå°è§åº¦ |
| | | startAngle: 270, //èµ·å§è§åº¦ |
| | | // minAngle: 15, |
| | | // startAngle: 270, |
| | | label: { |
| | | normal: { |
| | | formatter: function (params, ticket, callback) { |
| | |
| | | params.name + |
| | | "}\n{hr|}\n{yellow|" + |
| | | params.value + |
| | | "}\n{blue|" + |
| | | "} {blue|" + |
| | | percent + |
| | | "%}" |
| | | ) |
| | |
| | | default: |
| | | break |
| | | } |
| | | this.initData(requsetFn) |
| | | requsetFn && this.initData(requsetFn) |
| | | this.setOptions(this.option) |
| | | }, |
| | | }, |
| | |
| | | <style lang="scss" scoped> |
| | | .piechar { |
| | | width: 100%; |
| | | height: 100%; |
| | | height: 85%; |
| | | } |
| | | </style> |
| | |
| | | <style lang="scss" scoped> |
| | | .echart { |
| | | width: 100%; |
| | | height: 100%; |
| | | height: 85%; |
| | | } |
| | | </style> |
| | |
| | | <style lang="scss" scoped> |
| | | .echart { |
| | | width: 100%; |
| | | height: 100%; |
| | | height: 85%; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="file-format" ref="chart"></div> |
| | | <div class="FileFormat" ref="chart"></div> |
| | | </template> |
| | | |
| | | <script> |
| | | const fileTypeBar = require("@/assets/img/Screen/fileTypeBar.png") |
| | | import * as echarts from "echarts" |
| | | import { GetTypeVisitsCount } from "@/api/screen.js" |
| | | import { countFileFormat } from "@/api/screen.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | value: 20, |
| | | }, |
| | | ] |
| | | const res = await GetTypeVisitsCount() |
| | | let xAxis = [] |
| | | let yAxis = [] |
| | | const res = await countFileFormat() |
| | | if (res.code == 200) { |
| | | data = res.result.map(item => { |
| | | xAxis.push(item.name) |
| | | yAxis.push(item.count) |
| | | return { |
| | | name: item.type, |
| | | value: item.number, |
| | | } |
| | | }) |
| | | } |
| | | data.sort((a, b) => b.value - a.value) |
| | | data = data.slice(0, 4) |
| | | let getArrByKey = (data, k) => { |
| | | let key = k || "value" |
| | | let res = [] |
| | | if (data) { |
| | | data.forEach(function (t) { |
| | | res.push(t[key]) |
| | | }) |
| | | } |
| | | return res |
| | | } |
| | | let getSymbolData = data => { |
| | | let arr = [] |
| | | for (var i = 0; i < data.length; i++) { |
| | | arr.push({ |
| | | value: data[i].value, |
| | | symbolPosition: "end", |
| | | }) |
| | | } |
| | | return arr |
| | | } |
| | | let opt = { |
| | | index: 0, |
| | | } |
| | | let color = ["#A71A2B"] |
| | | data = data.sort((a, b) => { |
| | | return b.value - a.value |
| | | }) |
| | | let option = { |
| | | backgroundColor: "transparent", |
| | | grid: { |
| | | // 让å¾è¡¨å æ»¡å®¹å¨ |
| | | top: "12%", |
| | | left: "15%", |
| | | right: "10%", |
| | | bottom: "15%", |
| | | }, |
| | | tooltip: { |
| | | show: true |
| | | top: "10%", |
| | | bottom: "10%", |
| | | right: "5%", |
| | | left: "10%", |
| | | containLabel: true, |
| | | }, |
| | | xAxis: { |
| | | data: xAxis, |
| | | axisLabel: { |
| | | show: true, |
| | | color: "#ffff", |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | axisLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: "rgba(95, 180, 237, 0.32)", |
| | | }, |
| | | }, |
| | | show: false, |
| | | }, |
| | | yAxis: { |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | axisLabel: { |
| | | color: "#ffff", |
| | | }, |
| | | // åå²çº¿ |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: "#5d7289", |
| | | width: 1, |
| | | type: "dashed", |
| | | }, |
| | | }, |
| | | }, |
| | | series: [ |
| | | yAxis: [ |
| | | { |
| | | // é¡¶é¨åç |
| | | type: "pictorialBar", |
| | | animation: false, |
| | | itemStyle: { |
| | | color: "rgba(115, 240, 252, 1)", |
| | | triggerEvent: true, |
| | | show: true, |
| | | inverse: true, |
| | | data: getArrByKey(data, "name"), |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | symbolRepeat: false, |
| | | symbolSize: [15, 8], |
| | | symbolMargin: 1, |
| | | z: 10, |
| | | data: data, |
| | | symbolPosition: "end", |
| | | symbolOffset: [0, -4], |
| | | }, |
| | | { |
| | | // åºé¨åç |
| | | type: "pictorialBar", |
| | | animation: false, |
| | | |
| | | itemStyle: { |
| | | color: "rgba(50, 96, 225, 0.8)", |
| | | splitLine: { |
| | | show: false, |
| | | }, |
| | | symbolRepeat: false, |
| | | symbolSize: [15, 8], |
| | | symbolMargin: 1, |
| | | z: 10, |
| | | data: data, |
| | | symbolPosition: "start", |
| | | symbolOffset: [0, 3], |
| | | }, |
| | | { |
| | | barWidth: 15, |
| | | animation: false, |
| | | |
| | | type: "bar", |
| | | label: { |
| | | show: true, |
| | | position: "top", |
| | | textStyle: { |
| | | color: "#ffff", |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | axisLabel: { |
| | | show: false, |
| | | interval: 0, |
| | | color: "#fff", |
| | | align: "left", |
| | | margin: 0, |
| | | fontSize: 13, |
| | | formatter: function (value, index) { |
| | | return "{title|" + value + "}" |
| | | }, |
| | | rich: { |
| | | title: { |
| | | width: 165, |
| | | }, |
| | | }, |
| | | }, |
| | | itemStyle: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 1, color: "rgba(82, 180, 249, 0.35)" }, |
| | | { offset: 0, color: "rgba(82, 180, 249, 1)" }, |
| | | ]), |
| | | }, |
| | | { |
| | | triggerEvent: true, |
| | | show: true, |
| | | inverse: true, |
| | | data: getArrByKey(data, "name"), |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | data: yAxis, |
| | | splitLine: { |
| | | show: false, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | axisLabel: { |
| | | interval: 0, |
| | | shadowOffsetX: "-20px", |
| | | color: "#fff", |
| | | align: "right", |
| | | verticalAlign: "bottom", |
| | | lineHeight: 20, |
| | | fontSize: 13, |
| | | formatter: function (value, index) { |
| | | return data[index].value |
| | | }, |
| | | }, |
| | | }, |
| | | ], |
| | | series: [ |
| | | { |
| | | name: "XXX", |
| | | type: "pictorialBar", |
| | | symbol: |
| | | "image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAZlBMVEUAAABe3uVe3+Vf3uVf3+Zf3uVg3+Zg3+Zf3+Vi4OZh4OZg3+Z86/Bh3+Zi4Odj4Odi4OZ86/B76/B86/Bj4ed56+9x5+xn4umB7/N87PB36e+A7/N+7fF/7vJ/7vJ+7fGA7/OB7/PReX+lAAAAIXRSTlMABQkVDREmIhk3MR10LEFFPHh7cUprXE35h2XnqMLAp+mHAG9cAAAB5ElEQVRIx83WjU7CMBQFYIoiKMqU/XUboHv/l/Tce7t2XamDNSacETEmX86tlK2rx4py150o+MstMBLwWRfHKo6JCVxLnvmFGBjFQ58oF1//sUZhGy/ClSTWObgnL4O+bkeN4nY2okfNMbkRt9/vtxz8InoTsWplJSCzFxPmO8+GpSIByX3YQAuGDWtRKhKjCnxDXhF6Z4yxnZ20Wgko7BMRDmxtSGVaI4kdTIgb+zTYoJQlIMlDlmUFgrcDWWC201qSayqlTkiCddWWeV62VU0YlnpRi9VOKaSUsiyq/N0krwq2Ugt7lVpZl5BfHNiytjagMi+XYp0kCR45hMlivVQrE/uU5pXSrCB5bM6d1t2lOZItMqmliT3q5uVxqxzyW/ccfYLNKx7ZTeykMvNyac2yt2Fbc61MHLSC0rwoxbiNdlQ3GBm1NLHQsHUrtEXppR/ljNpW6DbSCoqlFiVoN6YdaFlgsSFVPs1BdT8OaB5QyQzVcaqWDows/zepxR8ObLglTrdtCRVuRNj4Rrxh+//0ke2f8KVL+Kon3GCSbmsJN9OUW3j6g0Ns+LgCij2u0h+Sghc8mlMPBMgdx5DFh59VmOVHrvmDnoNxCz3J7MFWsMuaLyR089xz/xhlfijvwutR8gv3zk6BLUUeCgAAAABJRU5ErkJggg==", |
| | | symbolSize: [35, 35], |
| | | symbolOffset: [20, 0], |
| | | z: 5, |
| | | data: getSymbolData(data), |
| | | }, |
| | | { |
| | | name: "æ¡", |
| | | type: "bar", |
| | | showBackground: true, |
| | | barBorderRadius: 10, |
| | | yAxisIndex: 0, |
| | | data: data, |
| | | barWidth: 8, |
| | | // align: left, |
| | | itemStyle: { |
| | | normal: { |
| | | color: new echarts.graphic.LinearGradient( |
| | | 0, |
| | | 0, |
| | | 1, |
| | | 0, |
| | | [ |
| | | { |
| | | offset: 0, |
| | | color: "#5A9DFF", |
| | | }, |
| | | { |
| | | offset: 0.7, |
| | | color: "#1878FF", |
| | | }, |
| | | { |
| | | offset: 1, |
| | | color: "#164182", |
| | | }, |
| | | ], |
| | | false |
| | | ), |
| | | barBorderRadius: 5, |
| | | }, |
| | | // color: '#A71A2B', |
| | | barBorderRadius: 2, |
| | | }, |
| | | label: { |
| | | normal: { |
| | | color: "#fff", |
| | | show: true, |
| | | position: ["0px", "-25px"], |
| | | textStyle: { |
| | | fontSize: 14, |
| | | }, |
| | | formatter: function (a, b) { |
| | | return a.name |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | ], |
| | | } |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .file-format { |
| | | .FileFormat { |
| | | width: 100%; |
| | | height: calc(100% - 30px); |
| | | height: calc(100% - 40px); |
| | | } |
| | | </style> |
| | |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | show: false |
| | | }, |
| | | nameRotate: 45, |
| | | axisTick: { |
| | | // show: false, |
| | | alignWithLabel: true |
| | | }, |
| | | axisLabel: { |
| | |
| | | data: dataPie, |
| | | icon: "vertical", |
| | | right: "1%", |
| | | top: "10%", |
| | | top: "2%", |
| | | orient: "vertical", |
| | | itemGap: 7, |
| | | itemGap: 5, |
| | | itemWidth: 12, |
| | | itemHeight: 3, |
| | | |
| | |
| | | left: "1%", // ä¸å®¹å¨å·¦ä¾§çè·ç¦» |
| | | right: "1%", // ä¸å®¹å¨å³ä¾§çè·ç¦» |
| | | top: "1%", // ä¸å®¹å¨é¡¶é¨çè·ç¦» |
| | | bottom: "1%", // ä¸å®¹å¨åºé¨çè·ç¦» |
| | | bottom: "5%", // ä¸å®¹å¨åºé¨çè·ç¦» |
| | | containLabel: true |
| | | }, |
| | | series: [ |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="visit-count" ref="chart"></div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as echarts from "echarts" |
| | | import { GetTypeVisitsCount } from "@/api/screen.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | option: {}, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initChart() |
| | | }, |
| | | methods: { |
| | | async initChart() { |
| | | let data = [ |
| | | { |
| | | name: "user1", |
| | | value: 10, |
| | | }, |
| | | { |
| | | name: "user2", |
| | | value: 20, |
| | | }, |
| | | { |
| | | name: "user3", |
| | | value: 23, |
| | | }, |
| | | { |
| | | name: "user4", |
| | | value: 44, |
| | | }, |
| | | { |
| | | name: "user1", |
| | | value: 10, |
| | | }, |
| | | { |
| | | name: "user2", |
| | | value: 20, |
| | | }, |
| | | { |
| | | name: "user3", |
| | | value: 53, |
| | | }, |
| | | { |
| | | name: "user4", |
| | | value: 24, |
| | | }, |
| | | { |
| | | name: "user1", |
| | | value: 10, |
| | | }, |
| | | { |
| | | name: "user2", |
| | | value: 20, |
| | | }, |
| | | ] |
| | | const res = await GetTypeVisitsCount() |
| | | let xAxis = [] |
| | | let yAxis = [] |
| | | if (res.code == 200) { |
| | | data = res.result.map(item => { |
| | | xAxis.push(item.name) |
| | | yAxis.push(item.count) |
| | | }) |
| | | } |
| | | let option = { |
| | | grid: { |
| | | // 让å¾è¡¨å æ»¡å®¹å¨ |
| | | top: "12%", |
| | | left: "15%", |
| | | right: "10%", |
| | | bottom: "15%", |
| | | }, |
| | | tooltip: { |
| | | show: true |
| | | }, |
| | | xAxis: { |
| | | data: xAxis, |
| | | axisLabel: { |
| | | show: true, |
| | | color: "#ffff", |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | axisLine: { |
| | | show: true, |
| | | lineStyle: { |
| | | color: "rgba(95, 180, 237, 0.32)", |
| | | }, |
| | | }, |
| | | }, |
| | | yAxis: { |
| | | axisLine: { |
| | | show: false, |
| | | }, |
| | | axisTick: { |
| | | show: false, |
| | | }, |
| | | axisLabel: { |
| | | color: "#ffff", |
| | | }, |
| | | // åå²çº¿ |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: "#5d7289", |
| | | width: 1, |
| | | type: "dashed", |
| | | }, |
| | | }, |
| | | }, |
| | | series: [ |
| | | { |
| | | // é¡¶é¨åç |
| | | type: "pictorialBar", |
| | | animation: false, |
| | | itemStyle: { |
| | | color: "rgba(115, 240, 252, 1)", |
| | | }, |
| | | symbolRepeat: false, |
| | | symbolSize: [15, 8], |
| | | symbolMargin: 1, |
| | | z: 10, |
| | | data: data, |
| | | symbolPosition: "end", |
| | | symbolOffset: [0, -4], |
| | | }, |
| | | { |
| | | // åºé¨åç |
| | | type: "pictorialBar", |
| | | animation: false, |
| | | |
| | | itemStyle: { |
| | | color: "rgba(50, 96, 225, 0.8)", |
| | | }, |
| | | symbolRepeat: false, |
| | | symbolSize: [15, 8], |
| | | symbolMargin: 1, |
| | | z: 10, |
| | | data: data, |
| | | symbolPosition: "start", |
| | | symbolOffset: [0, 3], |
| | | }, |
| | | { |
| | | barWidth: 15, |
| | | animation: false, |
| | | |
| | | type: "bar", |
| | | label: { |
| | | show: true, |
| | | position: "top", |
| | | textStyle: { |
| | | color: "#ffff", |
| | | }, |
| | | }, |
| | | itemStyle: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 1, color: "rgba(82, 180, 249, 0.35)" }, |
| | | { offset: 0, color: "rgba(82, 180, 249, 1)" }, |
| | | ]), |
| | | }, |
| | | data: yAxis, |
| | | }, |
| | | ], |
| | | } |
| | | |
| | | const chart = echarts.init(this.$refs.chart) |
| | | |
| | | chart.setOption(option) |
| | | window.addEventListener("resize", function () { |
| | | chart.resize() |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .visit-count{ |
| | | width: 100%; |
| | | height: calc(100% - 30px); |
| | | } |
| | | </style> |
| | |
| | | <top class="title" ref="title"></top> |
| | | <left |
| | | class="mapleft" |
| | | :style="{ width: leftWidth, left: leftTree && leftWidth == '20%' ? '-14px' : '0' }" |
| | | :style="{ width: leftWidth, left: leftWidth == '22%' ? '-19px' : '0' }" |
| | | ref="mapleft" |
| | | ></left> |
| | | <right |
| | |
| | | components: { mapsdk, top, left, right, bottom }, |
| | | data() { |
| | | return { |
| | | leftWidth: "20%", |
| | | leftWidth: "22%", |
| | | rightWidth: "22%", |
| | | leftTree: false, |
| | | currTree: false |
| | |
| | | //ä¿®æ¹å·¦ä¾§å®½åº¦ |
| | | ChangeWidth(parm) { |
| | | if (parm == "left") { |
| | | if (this.leftWidth == "20%") { |
| | | if (this.leftWidth == "22%") { |
| | | this.leftWidth = "8px" |
| | | } else { |
| | | this.leftWidth = "20%" |
| | | this.leftWidth = "22%" |
| | | } |
| | | } |
| | | |
| | | // if (parm == "leftView" || parm == "leftTree") { |
| | | // this.leftWidth = "20%" |
| | | // this.rightWidth = "22%" |
| | | // } |
| | | if (parm == "leftView" || parm == "leftTree") { |
| | | this.leftWidth = "22%" |
| | | this.rightWidth = "22%" |
| | | } |
| | | // if (parm == "leftView") { |
| | | // this.leftTree = false |
| | | // } |