diff --git a/src/main.js b/src/main.js index 00fa465..1efe892 100644 --- a/src/main.js +++ b/src/main.js @@ -59,6 +59,18 @@ Vue.prototype.dataZoomEnd = (titLength, defaultLength = 7) => { } return ((defaultLength / (titLength + 1)) * 100).toFixed(0) } +Vue.prototype.dataZoomStart = (titLength, defaultLength = 4,position) => { + if (titLength <= defaultLength) { + if(position=='start'){ + return 0 + } + return titLength - 1 + } + if(position=='start'){ + return titLength - 4 + } + return titLength - 1 +} // 全局组件挂载 Vue.component('DictTag', DictTag) diff --git a/src/views/bigScreen/components/scaleBox.vue b/src/views/bigScreen/components/scaleBox.vue index 7260f21..f0dfe2c 100644 --- a/src/views/bigScreen/components/scaleBox.vue +++ b/src/views/bigScreen/components/scaleBox.vue @@ -1,85 +1,85 @@ diff --git a/src/views/bigScreen/drivingCabin/center.vue b/src/views/bigScreen/drivingCabin/center.vue index ab4d7c0..cc55be2 100644 --- a/src/views/bigScreen/drivingCabin/center.vue +++ b/src/views/bigScreen/drivingCabin/center.vue @@ -26,11 +26,11 @@ >{{ handleMillion(val.targetIncome) }}亿元 -
+
@@ -43,11 +43,11 @@ >{{ handleMillion(val.targetProfit) }}亿元
-
+
@@ -60,13 +60,13 @@ >{{ handleMillion(val.targetChargeQuantity) }}亿件
-
+
@@ -79,14 +79,14 @@ >{{ handleMillion(val.targetDeliveryQuantity) }}亿件
-
+
@@ -168,8 +168,8 @@ export default { color: #ffffff; font-size: 18px; .data-item { - // flex: 1; - width: 20%; + flex: 1; + // width: 20%; display: flex; flex-direction: column; align-items: flex-start; diff --git a/src/views/bigScreen/drivingCabin/left1.vue b/src/views/bigScreen/drivingCabin/left1.vue index ffeea9f..9e6f1ef 100644 --- a/src/views/bigScreen/drivingCabin/left1.vue +++ b/src/views/bigScreen/drivingCabin/left1.vue @@ -5,16 +5,28 @@
+
+ + +
-
+
@@ -54,6 +66,11 @@ export default { }, data() { return { + currentPage1: 1, + total: 30, + titData: [], + valData: [], + time: null, data: [ { value: 154, name: "类别一" }, { value: 775, name: "类别二" }, @@ -78,73 +95,59 @@ export default { this.$nextTick(() => { this.initChart(); this.initLine(); + this.start(); }); }, - beforeDestroy() {}, + beforeDestroy() { + this.end(); + }, methods: { + start() { + this.time = setInterval(() => { + let size = this.currentPage1 + 1; + if (size * 6 > this.total) size = 1; + this.handleCurrentChange(size); + }, 5000); + }, + end() { + if (this.time) { + clearInterval(this.time); + } + }, initChart() { this.setOptions(); }, - setOptions() { + handleCurrentChange(val) { + this.currentPage1 = val; + this.setPageData(val); + }, + setOptions(val) { request({ url: "/hx/cockpitOverview/businessResponsibility", method: "get", }).then((res) => { this.res = res.data; - let titData = []; - let valData = []; for (let i = 0; i < this.res.list.length; i++) { const item = this.res.list[i]; - titData.push(item.indicator_name); - valData.push({ value: item.cate, name: item.indicator_name }); + this.titData.push(item.indicator_name); + this.valData.push({ value: item.cate, name: item.indicator_name }); } - this.chart = echarts.init(this.$refs.left1, "macarons"); - this.chart.setOption({ - tooltip: { - trigger: "item", - formatter: "{a}
{b}: {c} ({d}%)", - }, - color: this.colorList, - legend: { - type: "scroll", - data: titData, - orient: "vertical", - // left: '60%', - right: "10%", - y: "center", - textStyle: { - //图例文字的样式 - color: "#fff", - fontSize: 16, - }, - pageTextStyle: { - color: "#fff", - }, - pageIconColor: "#fff", - pageIconInactiveColor: "#ccc", - // formatter: value => { - // return value + calcAverageValue(this.data, value) - // }, - }, - series: [ - { - name: "概括", - type: "pie", - radius: [0, "85%"], - center: ["35%", "50%"], - label: { - formatter: "", - position: "inner", - fontSize: 14, - }, - labelLine: { - show: false, - }, - data: valData, - }, - ], - }); + this.setPageData(val); }); + }, + + setPageData(val) { + let titData = []; + let valData = []; + if (!val) { + titData = this.titData.slice(0, 7); + // valData = this.valData.slice(0, 7); + valData = this.valData; + } else { + titData = this.titData.slice((val - 1) * 7, 7 * val); + // valData = this.valData.slice((val - 1) * 7, 7 * val); + valData = this.valData; + } const calcAverageValue = (data, name) => { const items = data.filter((d) => d.name === name); @@ -152,7 +155,54 @@ export default { ? items.reduce((a, b) => a + b.value, 0) / items.length : "-"; }; + this.chart = echarts.init(this.$refs.left1, "macarons"); + this.chart.setOption({ + tooltip: { + trigger: "item", + formatter: "{a}
{b}: {c} ({d}%)", + }, + color: this.colorList, + legend: { + type: "scroll", + data: titData, + orient: "vertical", + // left: '60%', + right: "10%", + y: "center", + textStyle: { + //图例文字的样式 + color: "#fff", + fontSize: 16, + }, + pageTextStyle: { + color: "#fff", + }, + pageIconColor: "#fff", + pageIconInactiveColor: "#ccc", + // formatter: value => { + // return value + calcAverageValue(this.data, value) + // }, + }, + series: [ + { + name: "概括", + type: "pie", + radius: [0, "85%"], + center: ["35%", "50%"], + label: { + formatter: "", + position: "inner", + fontSize: 14, + }, + labelLine: { + show: false, + }, + data: valData, + }, + ], + }); }, + initLine() { request({ url: "/hx/cockpitOverview/revenueProfile", @@ -222,11 +272,24 @@ export default { }, }, }, - dataZoom: { - type: "slider", - start: 0, - end: this.dataZoomEnd(titData.length, 7), - }, + // dataZoom: { + // type: "slider", + // start: 0, + // end: this.dataZoomEnd(titData.length, 7), + // }, + dataZoom: [ + { + type: "slider", + textStyle: { + color: "#fff", + }, + startValue: this.dataZoomStart(titData.length, 4, "start"), + endValue: this.dataZoomStart(titData.length, 4, "end"), + }, + { + type: "inside", + }, + ], color: ["#ccc", "red"], yAxis: [ { @@ -312,6 +375,25 @@ export default { diff --git a/src/views/bigScreen/information/left1.vue b/src/views/bigScreen/information/left1.vue index 784a9d3..011ec90 100644 --- a/src/views/bigScreen/information/left1.vue +++ b/src/views/bigScreen/information/left1.vue @@ -12,7 +12,7 @@ 已完成任务/完成率 {{ totalAndRate.total }}/{{ - Math.floor(totalAndRate.rate * 100) / 100 + Math.floor(totalAndRate.rate * 100) / 100 || 0 }}% @@ -351,14 +351,27 @@ export default { }, }, }, - dataZoom: { - type: "slider", - start: 0, - end: this.dataZoomEnd(titList.length, 5), - textStyle: { - color: "#fff", + // dataZoom: { + // type: "slider", + // start: 0, + // end: this.dataZoomEnd(titList.length, 5), + // textStyle: { + // color: "#fff", + // }, + // }, + dataZoom: [ + { + type: "slider", + textStyle: { + color: "#fff", + }, + startValue: this.dataZoomStart(titList.length, 4, "start"), + endValue: this.dataZoomStart(titList.length, 4, "end"), }, - }, + { + type: "inside", + }, + ], color: ["#ccc", "red"], yAxis: [ { diff --git a/src/views/bigScreen/information/right1.vue b/src/views/bigScreen/information/right1.vue index cf9075b..e85d96a 100644 --- a/src/views/bigScreen/information/right1.vue +++ b/src/views/bigScreen/information/right1.vue @@ -1,577 +1,637 @@ diff --git a/src/views/bigScreen/management/center.vue b/src/views/bigScreen/management/center.vue index 78d56f3..a8c8773 100644 --- a/src/views/bigScreen/management/center.vue +++ b/src/views/bigScreen/management/center.vue @@ -20,11 +20,11 @@ >{{ handleMillion(resData.targetIncome) }}亿元
-
+
@@ -37,11 +37,11 @@ >{{ handleMillion(resData.targetProfit) }}亿元
-
+
@@ -54,55 +54,72 @@ >{{ handleMillion(resData.targetEva) }}亿元
-
+
-
+
两金两金( 产成品 / 应收账款 )
-
+
{{ handleMillion(resData.realCollection) }}/{{ handleMillion(resData.targetCollection) }}亿元 +
- 产成品 -
+ +
-
+
{{ handleMillion(resData.realFinishProduct) }}/{{ handleMillion(resData.targetFinishProduct) }}亿元 +
- 应收账款 -
+
@@ -848,7 +865,8 @@ export default { padding: 5px 0; display: flex; flex-direction: column; - justify-content: space-between; + justify-content: center; + // justify-content: space-between; align-items: flex-start; > div { margin: 5px 0; diff --git a/src/views/bigScreen/management/left1.vue b/src/views/bigScreen/management/left1.vue index 1fcbf4e..e31c9b3 100644 --- a/src/views/bigScreen/management/left1.vue +++ b/src/views/bigScreen/management/left1.vue @@ -8,7 +8,7 @@ layout="prev, pager, next" background :total="total" - :page-size="2" + :page-size="1" :current-page.sync="currentPage1" @current-change="handleCurrentChange" > @@ -165,6 +165,7 @@ export default { currentPage1: 1, dataList: [], total: 0, + time: null, index: 0, chart: null, chart2: null, @@ -179,9 +180,12 @@ export default { this.$nextTick(() => { this.initChart(); this.initLine(); + this.start(); }); }, - beforeDestroy() {}, + beforeDestroy() { + this.end(); + }, watch: { index(newVal, oldVal) { if (newVal == 0) { @@ -196,6 +200,18 @@ export default { }, }, methods: { + start() { + this.time = setInterval(() => { + let size = this.currentPage1 + 1; + if (size > this.total) size = 1; + this.handleCurrentChange(size); + }, 5000); + }, + end() { + if (this.time) { + clearInterval(this.time); + } + }, initChart() { this.request({ url: "/hx/operating/getHxStrategyIndexPic", @@ -206,6 +222,7 @@ export default { this.dataList = res.data; if (this.total == 0) return false; this.setData(res.data.slice(0, 2)); + this.setOddEchars(res.data.slice(0, 1)); // if (res.data.length > 2) { // list = res.data.splice(0, 2); // } else { @@ -216,8 +233,10 @@ export default { }, handleCurrentChange(val) { this.currentPage1 = val; - const data = this.dataList.slice(val * 2 - 2, val * 2); - this.setData(data); + // const data = this.dataList.slice(val * 2 - 2, val * 2); + const data = this.dataList.slice(val - 1, val); + // this.setData(data); + this.setOddEchars(data); }, setData(list) { @@ -591,11 +610,24 @@ export default { top: 50, bottom: 50, }, - dataZoom: { - type: "slider", - start: 0, - end: this.dataZoomEnd(list.length, 5), - }, + // dataZoom: { + // type: "slider", + // start: 0, + // end: this.dataZoomEnd(list.length, 5), + // }, + dataZoom: [ + { + type: "slider", + textStyle: { + color: "#fff", + }, + startValue: this.dataZoomStart(list.length, 4, "start"), + endValue: this.dataZoomStart(list.length, 4, "end"), + }, + { + type: "inside", + }, + ], series: [ { name: "实际", diff --git a/src/views/bigScreen/management/left2.vue b/src/views/bigScreen/management/left2.vue index 24894c1..1837dc9 100644 --- a/src/views/bigScreen/management/left2.vue +++ b/src/views/bigScreen/management/left2.vue @@ -579,11 +579,24 @@ export default { top: 30, bottom: 40, }, - dataZoom: { - type: "slider", - start: 0, - end: this.dataZoomEnd(list.length, 11), - }, + // dataZoom: { + // type: "slider", + // start: 0, + // end: this.dataZoomEnd(list.length, 11), + // }, + dataZoom: [ + { + type: "slider", + textStyle: { + color: "#fff", + }, + startValue: this.dataZoomStart(list.length, 4, "start"), + endValue: this.dataZoomStart(list.length, 4, "end"), + }, + { + type: "inside", + }, + ], xAxis: { data: list.map((e) => e.deptName), // data: [ diff --git a/src/views/bigScreen/management/right1.vue b/src/views/bigScreen/management/right1.vue index 66c02b9..8c6373c 100644 --- a/src/views/bigScreen/management/right1.vue +++ b/src/views/bigScreen/management/right1.vue @@ -330,14 +330,27 @@ export default { bottom: 50, containLabel: true, }, - dataZoom: { - type: "slider", - start: 0, - end: this.dataZoomEnd(list.length, 5), - textStyle: { - color: "#fff", + // dataZoom: { + // type: "slider", + // start: 0, + // end: this.dataZoomEnd(list.length, 5), + // textStyle: { + // color: "#fff", + // }, + // }, + dataZoom: [ + { + type: "slider", + textStyle: { + color: "#fff", + }, + startValue: this.dataZoomStart(list.length, 4, "start"), + endValue: this.dataZoomStart(list.length, 4, "end"), }, - }, + { + type: "inside", + }, + ], xAxis: [ { type: "category", diff --git a/src/views/bigScreen/management/right2.vue b/src/views/bigScreen/management/right2.vue index b30c1d4..9bec295 100644 --- a/src/views/bigScreen/management/right2.vue +++ b/src/views/bigScreen/management/right2.vue @@ -191,14 +191,27 @@ export default { bottom: 50, containLabel: true, }, - dataZoom: { - type: "slider", - start: 0, - end: this.dataZoomEnd(list.length, 7), - textStyle: { - color: "#fff", + // dataZoom: { + // type: "slider", + // start: 0, + // end: this.dataZoomEnd(list.length, 7), + // textStyle: { + // color: "#fff", + // }, + // }, + dataZoom: [ + { + type: "slider", + textStyle: { + color: "#fff", + }, + startValue: this.dataZoomStart(list.length, 4, "start"), + endValue: this.dataZoomStart(list.length, 4, "end"), }, - }, + { + type: "inside", + }, + ], xAxis: [ { type: "category", @@ -793,14 +806,27 @@ export default { top: 30, bottom: 50, }, - dataZoom: { - type: "slider", - start: 0, - end: this.dataZoomEnd(list.length, 7), - textStyle: { - color: "#fff", + // dataZoom: { + // type: "slider", + // start: 0, + // end: this.dataZoomEnd(list.length, 7), + // textStyle: { + // color: "#fff", + // }, + // }, + dataZoom: [ + { + type: "slider", + textStyle: { + color: "#fff", + }, + startValue: this.dataZoomStart(list.length, 4, "start"), + endValue: this.dataZoomStart(list.length, 4, "end"), }, - }, + { + type: "inside", + }, + ], xAxis: { data: list.map((e) => e.deptName), axisLine: { diff --git a/src/views/bigScreen/qualityManage/center.vue b/src/views/bigScreen/qualityManage/center.vue index 6161032..f040538 100644 --- a/src/views/bigScreen/qualityManage/center.vue +++ b/src/views/bigScreen/qualityManage/center.vue @@ -7,18 +7,18 @@
{{ percentage }}%
-
+
产品合格率
{{ dataInfo.productCate || 0 }}%
-
+
一般性质量问题数量
@@ -43,9 +43,9 @@ {{ dataInfo.smallProductCate || 0 }}%
-
+
产品错、漏检率
@@ -64,9 +64,9 @@ dataInfo.qualityPlanCompleteTotal }}
-
+
质量检查完成率
@@ -76,9 +76,9 @@ dataInfo.qualityNotificationCompleteTotal }}
-
+
diff --git a/src/views/bigScreen/qualityManage/center2.vue b/src/views/bigScreen/qualityManage/center2.vue index d38b215..c3105ad 100644 --- a/src/views/bigScreen/qualityManage/center2.vue +++ b/src/views/bigScreen/qualityManage/center2.vue @@ -150,11 +150,24 @@ export default { top: 30, bottom: 50, }, - dataZoom: { - type: "slider", - start: 0, - end: this.dataZoomEnd(productName.length, 7), - }, + // dataZoom: { + // type: "slider", + // start: 0, + // end: this.dataZoomEnd(productName.length, 7), + // }, + dataZoom: [ + { + type: "slider", + textStyle: { + color: "#fff", + }, + startValue: this.dataZoomStart(productName.length, 4, "start"), + endValue: this.dataZoomStart(productName.length, 4, "end"), + }, + { + type: "inside", + }, + ], series: [ { name: "实际", diff --git a/src/views/bigScreen/qualityManage/left1.vue b/src/views/bigScreen/qualityManage/left1.vue index 27adc63..96e1016 100644 --- a/src/views/bigScreen/qualityManage/left1.vue +++ b/src/views/bigScreen/qualityManage/left1.vue @@ -1,457 +1,490 @@ diff --git a/src/views/bigScreen/qualityManage/right1.vue b/src/views/bigScreen/qualityManage/right1.vue index 7b98716..522f450 100644 --- a/src/views/bigScreen/qualityManage/right1.vue +++ b/src/views/bigScreen/qualityManage/right1.vue @@ -1,46 +1,82 @@ diff --git a/src/views/bigScreen/scientific/tab2/center1.vue b/src/views/bigScreen/scientific/tab2/center1.vue index eda099e..19fc998 100644 --- a/src/views/bigScreen/scientific/tab2/center1.vue +++ b/src/views/bigScreen/scientific/tab2/center1.vue @@ -3,35 +3,58 @@
-
+
军品收入
- {{res.realMilitaryIncome}}/{{res.targetMilitaryIncome}} + {{ res.realMilitaryIncome }}/{{ + res.targetMilitaryIncome + }}
装药量
- {{res.realCharge}}/{{res.targetCharge}} + {{ res.realCharge }}/{{ + res.targetCharge + }}
大型产品
- {{res.realBigProduct}}/{{res.targetBigProduct}} + {{ res.realBigProduct }}/{{ + res.targetBigProduct + }}
中型产品
- {{res.realMediumProduct}}/{{res.targetMediumProduct}} + {{ res.realMediumProduct }}/{{ + res.targetMediumProduct + }}
小型产品
- {{res.realSmallProduct}}/{{res.targetSmallProduct}} + {{ res.realSmallProduct }}/{{ + res.targetSmallProduct + }}
@@ -43,19 +66,23 @@ diff --git a/src/views/bigScreen/securityManage/center.vue b/src/views/bigScreen/securityManage/center.vue index 7255618..a8c9f08 100644 --- a/src/views/bigScreen/securityManage/center.vue +++ b/src/views/bigScreen/securityManage/center.vue @@ -202,6 +202,7 @@ export default { method: "get", }).then((res) => { if (200 == res.code) { + console.log(res.data); this.pointLevelCount = res.data.pointLevelCount; this.sourceLevelCount = res.data.sourceLevelCount; this.points = res.data.points; diff --git a/src/views/bigScreen/securityManage/left2.vue b/src/views/bigScreen/securityManage/left2.vue index 00b7169..3477a74 100644 --- a/src/views/bigScreen/securityManage/left2.vue +++ b/src/views/bigScreen/securityManage/left2.vue @@ -3,7 +3,10 @@
- +
@@ -20,30 +23,69 @@ - + 序号 - 安全隐患内容 + 安全隐患内容 措施 责任人 - +
  • - {{ item.id }} - {{ item.dangerContent }} + {{ + item.id + }} + {{ item.dangerContent }}
    - · - · + · + · 未整改 已整改
    - {{ item.personLiable }} + {{ + item.personLiable + }}
@@ -57,20 +99,20 @@