diff --git a/src/views/bigScreen/drivingCabin/left1.vue b/src/views/bigScreen/drivingCabin/left1.vue index 8f3ad3c..506d04c 100644 --- a/src/views/bigScreen/drivingCabin/left1.vue +++ b/src/views/bigScreen/drivingCabin/left1.vue @@ -106,11 +106,12 @@ export default { start() { // 每隔一段时间,页码+1,判断是否到最后一页,是则将页码重设为1 this.time = setInterval(() => { - this.currentPage1 = this.currentPage1 + 1; - this.handleCurrentChange(this.currentPage1); if (this.currentPage1 >= this.total / this.pageSize) { - this.currentPage1 = 0; + this.currentPage1 = 1; + } else { + this.currentPage1 = this.currentPage1 + 1; } + this.handleCurrentChange(this.currentPage1); }, 5000); }, end() { @@ -130,15 +131,70 @@ export default { url: "/hx/cockpitOverview/businessResponsibility", method: "get", }).then((res) => { + // this.res = { + // list: [ + // { + // targetTasks: 2, + // cate: 100, + // completedTasks: 2, + // indicator_name: "类别1", + // }, + // { + // targetTasks: 2, + // cate: 50, + // completedTasks: 1, + // indicator_name: "类别2", + // }, + // { + // targetTasks: 2, + // cate: 50, + // completedTasks: 1, + // indicator_name: "类别3", + // }, + // { + // targetTasks: 2, + // cate: 50, + // completedTasks: 1, + // indicator_name: "类别4", + // }, + // { + // targetTasks: 2, + // cate: 50, + // completedTasks: 1, + // indicator_name: "类别5", + // }, + // { + // targetTasks: 2, + // cate: 50, + // completedTasks: 1, + // indicator_name: "类别6", + // }, + // { + // targetTasks: 2, + // cate: 50, + // completedTasks: 1, + // indicator_name: "类别7", + // }, + // { + // targetTasks: 2, + // cate: 50, + // completedTasks: 1, + // indicator_name: "类别8", + // }, + // ], + // map: null, + // }; this.res = res.data; - // console.log(res.data); + // TODO: 分页 this.total = this.res.list.length; for (let i = 0; i < this.res.list.length; i++) { const item = this.res.list[i]; this.titData.push(item.indicator_name); this.valData.push({ - value: item.cate, + // TODO: + // value: item.rate, + value: item.completedTasks, name: item.indicator_name, tooltip: { trigger: "item", diff --git a/src/views/bigScreen/drivingCabin/right1.vue b/src/views/bigScreen/drivingCabin/right1.vue index 8b5a385..662a721 100644 --- a/src/views/bigScreen/drivingCabin/right1.vue +++ b/src/views/bigScreen/drivingCabin/right1.vue @@ -94,7 +94,8 @@ export default { this.chart.setOption({ tooltip: { trigger: "item", - formatter: "{a} {b}: {c} ({d}%)", + // formatter: "{a} {b}: {c} ({d}%)", + formatter: "{a} {b}: {c}", }, color: this.colorList, legend: { diff --git a/src/views/bigScreen/information/left1.vue b/src/views/bigScreen/information/left1.vue index f11de09..69ea24b 100644 --- a/src/views/bigScreen/information/left1.vue +++ b/src/views/bigScreen/information/left1.vue @@ -25,10 +25,11 @@ background: rgba(0, 255, 255, 0.3); " > - - 责任令 - 部门 - 完成情况 + 序号 + 月份 + 责任令 + 部门 + 完成情况 - + - + {{ + index + 1 + }} + {{ + item.month + }} {{ item.responsibilityContent }} {{ item.deptName }} - + - + 序号 项目名称 计划名称 @@ -141,11 +146,11 @@ style="height: 168px" > - + - + {{ + idx + 1 + }} - + 序号 名称 部门 时间 @@ -50,11 +50,11 @@ }" > - + - + {{ + idx + 1 + }} - + 序号 项目名称 部门 时间 @@ -84,11 +84,11 @@ style="height: 168px" > - + - + {{ + idx + 1 + }} - + 序号 合同名称 数量 金额 @@ -83,11 +83,11 @@ }" > - + - + {{ + idx + 1 + }} - - + @@ -87,7 +87,7 @@ background: rgba(0, 255, 255, 0.3); " > - + 序号 项目名称 负责人 团队 @@ -104,11 +104,11 @@ style="height: 168px" > - + - + {{ + idx + 1 + }} - + 序号 部门 公示内容 时间 @@ -174,11 +174,11 @@ style="height: 168px" > - + - + {{ + idx + 1 + }} {{ item.deptName }} @@ -308,6 +308,11 @@ export default { let { rate, list } = res.data; if (rate) { this.rate = rate; + } else { + this.rate = { + comprehensiveRate: 0, + performanceRate: 0, + }; } this.chart = echarts.init(this.$refs.chart); this.chart.setOption({ @@ -461,153 +466,187 @@ export default { this.chart2 = echarts.init(this.$refs.chart2); this.setOptions2(); }, - setOptions2() { - this.chart2.setOption({ - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: { - data: ["综合", "绩效"], - textStyle: { - color: "#fff", //legend字体颜色 - }, - }, - grid: { - left: 20, - right: 20, - top: 30, - bottom: 50, - containLabel: true, - }, - dataZoom: { - type: "slider", - start: 0, - end: 50, - }, - xAxis: [ - { - type: "category", - data: [ - "部门5", - "部门二", - "部门三", - "部门四", - "部门五", - "部门六", - "部门七", - ], - axisLine: { - lineStyle: { - color: "rgb(255, 255, 255)", - }, - }, - }, - ], - yAxis: [ - { - name: "个", - splitLine: { - show: true, - // 改变轴线颜色 - lineStyle: { - // 使用深浅的间隔色 - color: ["rgba(255, 255, 255,.5)"], - }, - }, - axisLabel: { - formatter: "{value}", - }, - axisLine: { - lineStyle: { - color: "rgb(255, 255, 255)", - }, - }, - }, - { - type: "value", - min: 0, - max: 100, - interval: 20, - axisLabel: { - formatter: "{value} %", - }, - splitLine: { - show: false, //不显示网格线 - }, - splitArea: { - show: false, //不显示网格区域 - }, - axisLine: { - lineStyle: { - color: "rgb(255, 255, 255)", - }, - }, - }, - ], - series: [ - { - name: "绩效", - type: "bar", - stack: "Ad", - emphasis: { - focus: "series", - }, - itemStyle: { - color: "#F64F58", - }, - barWidth: 30, - data: [150, 232, 201, 154, 190, 330, 410], - }, - { - name: "综合", - type: "bar", - stack: "Ad", - emphasis: { - focus: "series", - }, - itemStyle: { - color: "#F6D97E", - }, - barWidth: 30, - data: [150, 232, 201, 154, 190, 330, 410], - }, - { - name: "完成率", - type: "scatter", - symbol: "rect", - symbolSize: [30, 4], - symbolOffset: [0, 0], - position: [0, 0], - itemStyle: { - color: "#7EA7FC", - }, - data: [600, 650, 700, 750, 800, 750, 700], - }, - // { - // name: '', - // type: 'line', - // smooth: false, - // data: [500, 550, 700, 520, 650, 520, 550], - // itemStyle: { - // color: '#F6D97E', - // }, - // symbol: 'none', - // }, - // { - // name: '', - // type: 'line', - // smooth: false, - // itemStyle: { - // color: '#F64F58', - // }, - // data: [600, 500, 700, 620, 750, 800, 600], - // symbol: 'none', - // }, - ], + async setOptions2() { + let params = { type: 1 }; + // if (month) { + // params["month"] = month; + // } + const res = await this.request({ + url: "/hx/operating/getComprehensivePlanPic", + method: "get", + params: params, }); + if (200 == res.code) { + let { rate, list } = res.data; + // if (rate) { + // this.rate = rate; + // } + this.chart2.setOption({ + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + }, + legend: { + data: ["综合", "绩效"], + textStyle: { + color: "#fff", //legend字体颜色 + }, + }, + grid: { + left: 20, + right: 20, + top: 30, + bottom: 50, + containLabel: true, + }, + dataZoom: { + type: "slider", + start: 0, + end: 50, + }, + xAxis: [ + { + type: "category", + data: list.map((e) => e.deptName), + axisLine: { + lineStyle: { + color: "rgb(255, 255, 255)", + }, + }, + }, + ], + yAxis: [ + { + name: "个", + max: "dataMax", + splitLine: { + show: true, + // 改变轴线颜色 + lineStyle: { + // 使用深浅的间隔色 + color: ["rgba(255, 255, 255,.5)"], + }, + }, + axisLabel: { + formatter: "{value}", + }, + axisLine: { + lineStyle: { + color: "rgb(255, 255, 255)", + }, + }, + }, + { + type: "value", + min: 0, + max: 100, + interval: 20, + axisLabel: { + formatter: "{value} %", + }, + splitLine: { + show: false, //不显示网格线 + }, + splitArea: { + show: false, //不显示网格区域 + }, + axisLine: { + lineStyle: { + color: "rgb(255, 255, 255)", + }, + }, + }, + ], + series: [ + { + name: "绩效", + type: "bar", + stack: "Ad", + emphasis: { + focus: "series", + }, + itemStyle: { + color: "#F64F58", + }, + barWidth: 30, + data: list.map((el) => el.performancePlanCompleted), + }, + { + name: "综合", + type: "bar", + stack: "Ad", + emphasis: { + focus: "series", + }, + itemStyle: { + color: "#F6D97E", + }, + barWidth: 30, + data: list.map((el) => el.comprehensivePlanCompleted), + }, + { + name: "综合完成率", + // type: "scatter", + type: "line", + symbol: "rect", + symbolSize: [30, 4], + symbolOffset: [0, 0], + position: [0, 0], + itemStyle: { + color: "#F6D97E", + }, + yAxisIndex: "1", + data: list.map((el) => + ( + (el.comprehensivePlanCompleted / el.comprehensivePlanTotal) * + 100 + ).toFixed(2) + ), + }, + { + name: "绩效完成率", + // type: "scatter", + type: "line", + yAxisIndex: "1", + symbol: "rect", + symbolSize: [30, 4], + symbolOffset: [0, 0], + position: [0, 0], + itemStyle: { + color: "#F64F58", + }, + data: list.map((el) => + ( + (el.performancePlanCompleted / el.performancePlanTotal) * + 100 + ).toFixed(2) + ), + }, + // { + // name: '', + // type: 'line', + // smooth: false, + // data: [500, 550, 700, 520, 650, 520, 550], + // itemStyle: { + // color: '#F6D97E', + // }, + // symbol: 'none', + // }, + // { + // name: '', + // type: 'line', + // smooth: false, + // itemStyle: { + // color: '#F64F58', + // }, + // data: [600, 500, 700, 620, 750, 800, 600], + // symbol: 'none', + // }, + ], + }); + } }, }, }; diff --git a/src/views/bigScreen/qualityManage/right1.vue b/src/views/bigScreen/qualityManage/right1.vue index 8c9c8a6..2041462 100644 --- a/src/views/bigScreen/qualityManage/right1.vue +++ b/src/views/bigScreen/qualityManage/right1.vue @@ -42,7 +42,7 @@ background: rgba(0, 255, 255, 0.3); " > - + 序号 部门 案例名称 @@ -56,11 +56,11 @@ }" > - + - + {{ + idx + 1 + }} {{ item.className }} diff --git a/src/views/bigScreen/scientific/tab1/center1.vue b/src/views/bigScreen/scientific/tab1/center1.vue index d82d2fb..7d41ea9 100644 --- a/src/views/bigScreen/scientific/tab1/center1.vue +++ b/src/views/bigScreen/scientific/tab1/center1.vue @@ -31,7 +31,7 @@ - + 总装车间 @@ -62,7 +62,7 @@ :key="index" > - + - +