Merge pull request 'projects/mescc/zhp' (#25) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #25
This commit is contained in:
commit
00dd5b4bfe
6
.env.dev
6
.env.dev
@ -1,7 +1,7 @@
|
|||||||
###
|
###
|
||||||
# @Author: zhp
|
# @Author: zhp
|
||||||
# @Date: 2024-04-28 13:42:51
|
# @Date: 2024-04-28 13:42:51
|
||||||
# @LastEditTime: 2024-05-29 17:06:55
|
# @LastEditTime: 2024-05-31 08:31:32
|
||||||
# @LastEditors: zhp
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
@ -12,8 +12,8 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = 芋道管理系统
|
VUE_APP_TITLE = 芋道管理系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'http://192.168.1.61:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.61:48080'
|
||||||
# VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
|
VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-07 08:54:59
|
* @Date: 2024-05-07 08:54:59
|
||||||
* @LastEditTime: 2024-05-22 16:31:08
|
* @LastEditTime: 2024-05-31 09:33:50
|
||||||
* @LastEditors: DY
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
@ -138,3 +138,12 @@ export function cockpitDataMonitor(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function exportFactoryDataExcel(data) {
|
||||||
|
return request({
|
||||||
|
url: '/ip/prod-output-month/export/excel',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.6 MiB After Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 6.5 MiB After Width: | Height: | Size: 1.2 MiB |
@ -4,16 +4,16 @@ function __resizeHandler(entries) {
|
|||||||
console.log(entries)
|
console.log(entries)
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
if (entry.contentBoxSize) {
|
if (entry.contentBoxSize) {
|
||||||
const contentBoxSize = Array.isArray(entry.contentBoxSize)
|
// const contentBoxSize = Array.isArray(entry.contentBoxSize)
|
||||||
? entry.contentBoxSize[0]
|
// ? entry.contentBoxSize[0]
|
||||||
: entry.contentBoxSize;
|
// : entry.contentBoxSize;
|
||||||
this.chart_mixin_chartInstance.resize({
|
// this.chart_mixin_chartInstance.resize({
|
||||||
width:
|
// width:
|
||||||
contentBoxSize.inlineSize < this.MIN_WIDTH
|
// contentBoxSize.inlineSize < this.MIN_WIDTH
|
||||||
? this.MIN_WIDTH
|
// ? this.MIN_WIDTH
|
||||||
: contentBoxSize.inlineSize,
|
// : contentBoxSize.inlineSize,
|
||||||
height: contentBoxSize.blockSize,
|
// height: contentBoxSize.blockSize,
|
||||||
});
|
// });
|
||||||
} else {
|
} else {
|
||||||
// manipulate contentRect
|
// manipulate contentRect
|
||||||
this.chart_mixin_chartInstance.resize({
|
this.chart_mixin_chartInstance.resize({
|
||||||
|
@ -93,9 +93,10 @@ const actions = {
|
|||||||
async initHome({ commit }) {
|
async initHome({ commit }) {
|
||||||
const dataArr = await getHomeInfo();
|
const dataArr = await getHomeInfo();
|
||||||
console.log('dataArr', dataArr);
|
console.log('dataArr', dataArr);
|
||||||
|
let preData = dataArr.previousProdOutputOutDO
|
||||||
|
let preFtoData = dataArr.previousProdOutputFtoDO
|
||||||
// const targetArr = await getHomeInfo();
|
// const targetArr = await getHomeInfo();
|
||||||
const payload = splitCurrentAndPrevious(dataArr.prodOutputOutDO, dataArr.prodTargetDO,dataArr.prodOutputFtoDO
|
const payload = splitCurrentAndPrevious(dataArr.prodOutputOutDO, dataArr.prodTargetDO,dataArr.prodOutputFtoDO,preData,preFtoData);
|
||||||
);
|
|
||||||
commit("SET_HOME_INFO", payload);
|
commit("SET_HOME_INFO", payload);
|
||||||
},
|
},
|
||||||
/** 初始化驾驶舱数据 */
|
/** 初始化驾驶舱数据 */
|
||||||
@ -125,6 +126,7 @@ const actions = {
|
|||||||
// const payload = handler(factoryData)
|
// const payload = handler(factoryData)
|
||||||
// commit("SET_COPILOT_INFO", { type, payload });
|
// commit("SET_COPILOT_INFO", { type, payload });
|
||||||
// } else {
|
// } else {
|
||||||
|
console.log('factoryList',factoryList)
|
||||||
let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO
|
let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO
|
||||||
let preData = factoryList.previousProdOutputOutDO ? factoryList.previousProdOutputOutDO : factoryList.previousProdOutputRateDO
|
let preData = factoryList.previousProdOutputOutDO ? factoryList.previousProdOutputOutDO : factoryList.previousProdOutputRateDO
|
||||||
let preFtoData = factoryList.previousProdOutputFtoDO ? factoryList.previousProdOutputFtoDO : []
|
let preFtoData = factoryList.previousProdOutputFtoDO ? factoryList.previousProdOutputFtoDO : []
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<CopilotButton v-for="i in ['日', '周', '月', '年']" :key="i" :label="i" :active="i === period"
|
<CopilotButton v-for="i in ['日', '周', '月', '年']" :key="i" :label="i" :active="i === period"
|
||||||
@click="() => $emit('update:period', i)" />
|
@click="() => $emit('update:period', i)" />
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="export-btn" />
|
<!-- <button type="button" class="export-btn" @click="handleExport" /> -->
|
||||||
<button type="button" class="fullscreen-btn" :class="[isFullscreen ? 'exit-fullscreen' : '']"
|
<button type="button" class="fullscreen-btn" :class="[isFullscreen ? 'exit-fullscreen' : '']"
|
||||||
@click="toggleFullScreen" />
|
@click="toggleFullScreen" />
|
||||||
<!-- <button class="times-btn"> {{ times }} </button> -->
|
<!-- <button class="times-btn"> {{ times }} </button> -->
|
||||||
@ -31,6 +31,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import CopilotButton from "./button.vue";
|
import CopilotButton from "./button.vue";
|
||||||
import screenfull from "screenfull";
|
import screenfull from "screenfull";
|
||||||
|
import { exportFactoryDataExcel } from "@/api/produceData";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CopilotHeader",
|
name: "CopilotHeader",
|
||||||
@ -58,6 +59,15 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleExport() {
|
||||||
|
exportFactoryDataExcel({
|
||||||
|
// factoryId: this.companyId,
|
||||||
|
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
|
||||||
|
}).then(response => {
|
||||||
|
this.$download.excel(response, `生产数据.xls`);
|
||||||
|
// this.exportLoading = false;
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
getTimes() {
|
getTimes() {
|
||||||
setInterval(this.getTimesInterval, 60000);
|
setInterval(this.getTimesInterval, 60000);
|
||||||
},
|
},
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
|
<CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
|
||||||
@click="() => $emit('update:than', i)" />
|
@click="() => $emit('update:than', i)" />
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="export-btn" />
|
<button type="button" class="export-btn" @click="handleExport" />
|
||||||
<button type="button" class="fullscreen-btn" :class="[isFullscreen ? 'exit-fullscreen' : '']"
|
<button type="button" class="fullscreen-btn" :class="[isFullscreen ? 'exit-fullscreen' : '']"
|
||||||
@click="toggleFullScreen" />
|
@click="toggleFullScreen" />
|
||||||
</div>
|
</div>
|
||||||
@ -25,6 +25,8 @@
|
|||||||
import FactorySelect from "./FactorySelect.vue";
|
import FactorySelect from "./FactorySelect.vue";
|
||||||
import screenfull from "screenfull";
|
import screenfull from "screenfull";
|
||||||
import CopilotButton from "./button.vue";
|
import CopilotButton from "./button.vue";
|
||||||
|
import { exportFactoryDataExcel } from "@/api/produceData";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FactoryDataHeader",
|
name: "FactoryDataHeader",
|
||||||
components: { CopilotButton, FactorySelect },
|
components: { CopilotButton, FactorySelect },
|
||||||
@ -55,6 +57,15 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleExport() {
|
||||||
|
exportFactoryDataExcel({
|
||||||
|
factoryId: this.companyId,
|
||||||
|
timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
|
||||||
|
}).then(response => {
|
||||||
|
this.$download.excel(response, `${this.companyName}生产数据.xls`);
|
||||||
|
// this.exportLoading = false;
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
toggleFullScreen() {
|
toggleFullScreen() {
|
||||||
this.isFullscreen = !this.isFullscreen;
|
this.isFullscreen = !this.isFullscreen;
|
||||||
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-04-28 13:42:51
|
||||||
|
* @LastEditTime: 2024-05-31 13:26:32
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
<!--
|
<!--
|
||||||
filename: button.vue
|
filename: button.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
@ -50,7 +57,7 @@ button {
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 22px;
|
font-size: 18px;
|
||||||
letter-spacing: 10px;
|
letter-spacing: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-23 15:49:14
|
* @Date: 2024-05-23 15:49:14
|
||||||
* @LastEditTime: 2024-05-29 10:56:21
|
* @LastEditTime: 2024-05-31 16:06:50
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<!--
|
|
||||||
filename: BarChartBase.vue
|
|
||||||
author: liubin
|
|
||||||
date: 2024-04-10 08:59:28
|
|
||||||
description:
|
|
||||||
-->
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<chart-container class="bar-chart-base">
|
<chart-container class="bar-chart-base">
|
||||||
|
@ -35,7 +35,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
page: "产量",
|
page: "产量",
|
||||||
period: "日",
|
period: "月",
|
||||||
than:'同比',
|
than:'同比',
|
||||||
currentsStyles: '',
|
currentsStyles: '',
|
||||||
};
|
};
|
||||||
|
@ -36,7 +36,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
// 城市数组的顺序必须是固定的
|
// 城市数组的顺序必须是固定的
|
||||||
const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
|
const cities = ["瑞昌", "邯郸",
|
||||||
|
// "株洲", "佳木斯", "成都", "凯盛", "蚌埠"
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
xAxis: cities,
|
xAxis: cities,
|
||||||
};
|
};
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-10 11:10:54
|
* @Date: 2024-05-10 11:10:54
|
||||||
* @LastEditTime: 2024-05-30 13:23:03
|
* @LastEditTime: 2024-05-31 16:19:45
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="chip-rate">
|
<div class="chip-rate">
|
||||||
<ChipRateItem :period="period" :than="than" :cities="['成都', '邯郸', '株洲', '瑞昌']" :color="1" />
|
<ChipRateItem :period="period" :than="than" :cities="['邯郸', '瑞昌']" :color="1" />
|
||||||
<ChipRateItem :period="period" :than="than" :cities="['佳木斯', '凯盛光伏', '蚌埠兴科']" :color="2" />
|
<!-- <ChipRateItem :period="period" :than="than" :cities="['佳木斯', '凯盛光伏', '蚌埠兴科']" :color="2" /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -43,15 +43,15 @@ export default {
|
|||||||
gap: 5px;
|
gap: 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&:after {
|
// &:after {
|
||||||
content: "";
|
// content: "";
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
left: 50%;
|
// left: 50%;
|
||||||
top: 0;
|
// top: 0;
|
||||||
width: 3px;
|
// width: 3px;
|
||||||
height: 100%;
|
// height: 100%;
|
||||||
transform: translateX(-50%);
|
// transform: translateX(-50%);
|
||||||
background: linear-gradient(to bottom, transparent, #00f2ff, transparent);
|
// background: linear-gradient(to bottom, transparent, #00f2ff, transparent);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-07 10:25:10
|
* @Date: 2024-05-07 10:25:10
|
||||||
* @LastEditTime: 2024-05-30 11:19:51
|
* @LastEditTime: 2024-05-31 16:38:29
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,10 +9,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div class="order"> -->
|
<!-- <div class="order"> -->
|
||||||
<div class="std-rate" style="width: 100%; overflow: hidden scroll; height: 400px">
|
<div class="std-rate" style="width: 100%; overflow: hidden scroll; height: 400px">
|
||||||
<div class="span-2">
|
<!-- <div class="span-2">
|
||||||
<StdRateItem :period="period" :city="cities[5]" />
|
<StdRateItem :period="period" :city="cities[5]" />
|
||||||
</div>
|
</div> -->
|
||||||
<div class="flex-item" v-for="item in cities.filter((val, index) => index != 5)" :key="item.name">
|
<div class="span-2" v-for="item in cities.filter((val, index) => index != 5)" :key="item.name">
|
||||||
<StdRateItem :period="period" :than="than" :city="item" />
|
<StdRateItem :period="period" :than="than" :city="item" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -49,8 +49,8 @@ export default {
|
|||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
const _cities = [
|
const _cities = [
|
||||||
{ name: "瑞昌", target: 0, total: 0, current: 0, componentYield: 0, goodNumber:0,},
|
{ name: "瑞昌", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
||||||
{ name: "邯郸", target: 0, total: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
{ name: "邯郸",target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
||||||
{ name: "株洲", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
{ name: "株洲", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
||||||
{ name: "佳木斯", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
{ name: "佳木斯", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
||||||
{ name: "成都", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
{ name: "成都", target: 0, previous: 0, current: 0, componentYield: 0, goodNumber: 0, },
|
||||||
@ -80,7 +80,10 @@ export default {
|
|||||||
}
|
}
|
||||||
// 删掉凯盛光伏
|
// 删掉凯盛光伏
|
||||||
// _cities.splice(4, 1);
|
// _cities.splice(4, 1);
|
||||||
return _cities;
|
let arr = []
|
||||||
|
arr.push(_cities[0])
|
||||||
|
arr.push(_cities[1])
|
||||||
|
return arr;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -36,7 +36,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
// 城市数组的顺序必须是固定的
|
// 城市数组的顺序必须是固定的
|
||||||
const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
|
const cities = ["瑞昌", "邯郸",
|
||||||
|
// "株洲", "佳木斯", "成都", "凯盛", "蚌埠"
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
xAxis: cities,
|
xAxis: cities,
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-07 13:22:43
|
* @Date: 2024-05-07 13:22:43
|
||||||
* @LastEditTime: 2024-05-29 14:09:08
|
* @LastEditTime: 2024-05-31 15:55:00
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<span v-for="(item,index) in legend" :key="index" class="legend-item"
|
<span v-for="(item,index) in legend" :key="index" class="legend-item"
|
||||||
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
|
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div ref="oeeChart" style="height:96%;width:100%"></div>
|
<div ref="oeeChart" style="height:100%;width:100%"></div>
|
||||||
</chart-container>
|
</chart-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -220,30 +220,30 @@ export default {
|
|||||||
this.canvasReset()
|
this.canvasReset()
|
||||||
},
|
},
|
||||||
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
|
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
|
||||||
isFullscreen(val) {
|
// isFullscreen(val) {
|
||||||
this.actualOptions.series.map((item) => {
|
|
||||||
item.barWidth = val ? 18 : 12;
|
|
||||||
});
|
|
||||||
this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
|
|
||||||
this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
|
|
||||||
this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
|
|
||||||
// if (val === false && this.isOpen === true) {
|
|
||||||
// console.log(val)
|
|
||||||
// this.width = 97 + '%'
|
|
||||||
// this.canvasReset()
|
|
||||||
// } else if (val === false && this.isOpen === false) {
|
|
||||||
// this.width = 100 + '%'
|
|
||||||
// this.canvasReset()
|
|
||||||
// }
|
|
||||||
// this.actualOptions.series.map((item) => {
|
// this.actualOptions.series.map((item) => {
|
||||||
// item.barWidth = val ? 18 : 12;
|
// item.barWidth = val ? 18 : 12;
|
||||||
// });
|
// });
|
||||||
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
|
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
|
||||||
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
|
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
|
||||||
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
|
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
|
||||||
this.initChart(this.actualOptions)
|
// // if (val === false && this.isOpen === true) {
|
||||||
this.canvasReset()
|
// // console.log(val)
|
||||||
},
|
// // this.width = 97 + '%'
|
||||||
|
// // this.canvasReset()
|
||||||
|
// // } else if (val === false && this.isOpen === false) {
|
||||||
|
// // this.width = 100 + '%'
|
||||||
|
// // this.canvasReset()
|
||||||
|
// // }
|
||||||
|
// // this.actualOptions.series.map((item) => {
|
||||||
|
// // item.barWidth = val ? 18 : 12;
|
||||||
|
// // });
|
||||||
|
// // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
|
||||||
|
// // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
|
||||||
|
// // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
|
||||||
|
// this.initChart(this.actualOptions)
|
||||||
|
// this.canvasReset()
|
||||||
|
// },
|
||||||
series(val) {
|
series(val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
this.initChart(this.options);
|
this.initChart(this.options);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-23 15:50:44
|
* @Date: 2024-05-23 15:50:44
|
||||||
* @LastEditTime: 2024-05-29 14:25:10
|
* @LastEditTime: 2024-05-31 15:54:41
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<span v-for="(item,index) in legend" :key="index" class="legend-item"
|
<span v-for="(item,index) in legend" :key="index" class="legend-item"
|
||||||
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
|
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div ref="oeeChart" style="height:96%;width:100%"></div>
|
<div ref="oeeChart" style="height:100%;width:100%"></div>
|
||||||
</chart-container>
|
</chart-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ export default {
|
|||||||
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
|
// this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
|
||||||
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
|
// this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
|
||||||
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
|
// this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
|
||||||
this.initChart(this.actualOptions)
|
// this.initChart(this.actualOptions)
|
||||||
// this.canvasReset()
|
// this.canvasReset()
|
||||||
},
|
},
|
||||||
series(val) {
|
series(val) {
|
||||||
|
@ -79,15 +79,64 @@ export default {
|
|||||||
];
|
];
|
||||||
},
|
},
|
||||||
options() {
|
options() {
|
||||||
const single = this.period === "日" || this.period === "周";
|
// const single = this.period === "日" || this.period === "周";
|
||||||
|
const today = new Date().getDate();
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
const month = new Date().getMonth() + 1;
|
const month = new Date().getMonth() + 1;
|
||||||
const vt = this.valueTuple;
|
const vt = this.valueTuple;
|
||||||
let titleValue = single
|
let items = [];
|
||||||
? (vt[1] != null && `${vt[1] * 100}%`) || "0%"
|
var day1 = new Date();
|
||||||
: vt[0] != null && vt[2] != null && vt[2] !== 0
|
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
|
||||||
? `${((vt[1] / vt[2]) * 100).toFixed(0)}%`
|
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
|
||||||
: "0%",
|
//今天的时间
|
||||||
|
// var day2 = new Date();
|
||||||
|
// day2.setTime(day2.getTime());
|
||||||
|
// var s2 = (day2.getMonth() + 1) + "月" + day2.getDate() + '日';
|
||||||
|
// const today = new Date().getDate();
|
||||||
|
// let yesterday = new Date().getDate() -1;
|
||||||
|
// const month = new Date().getMonth() + 1;
|
||||||
|
const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1;
|
||||||
|
// const year = new Date().getFullYear();
|
||||||
|
if (this.period === '日' && this.than === '同比') {
|
||||||
|
items = [
|
||||||
|
{ label: `${month}月${today}日良率`, },
|
||||||
|
{ label: `去年${month}月${today}日良率` },
|
||||||
|
];
|
||||||
|
} else if (this.period === '日' && this.than === '环比') {
|
||||||
|
items = [
|
||||||
|
{ label: `${month}月${today}日良率` },
|
||||||
|
{ label: `${yesterday}日良率` },
|
||||||
|
];
|
||||||
|
} else if (this.period === '周' && this.than === '同比') {
|
||||||
|
items = [
|
||||||
|
{ label: `本周良率`, },
|
||||||
|
{ label: `去年本周良率` },
|
||||||
|
];
|
||||||
|
} else if (this.period === '周' && this.than === '环比') {
|
||||||
|
items = [
|
||||||
|
{ label: `本周良率`, },
|
||||||
|
{ label: `上周良率`, },
|
||||||
|
];
|
||||||
|
} else if (this.period === '月' && this.than === '同比') {
|
||||||
|
items = [
|
||||||
|
{ label: `${month}月良率`, },
|
||||||
|
{ label: `去年${month}月良率`, },
|
||||||
|
{ label: `${month}月目标良率`, },
|
||||||
|
];
|
||||||
|
} else if (this.period === '月' && this.than === '环比') {
|
||||||
|
items = [
|
||||||
|
{ label: `${month}月良率`, },
|
||||||
|
{ label: `${lastMonth}月良率`, },
|
||||||
|
{ label: `${month}月目标良率`, },
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
items = [
|
||||||
|
{ label: `${year}年良率`, },
|
||||||
|
{ label: `${year - 1}年良率` },
|
||||||
|
{ label: `${year}年目标良率` },
|
||||||
|
];
|
||||||
|
}
|
||||||
|
let titleValue = vt[1] === null ? 0 + '%' : this.formatNumber(vt[1]) + '%',
|
||||||
subtitle = {
|
subtitle = {
|
||||||
日: "本日良率",
|
日: "本日良率",
|
||||||
周: "本周良率",
|
周: "本周良率",
|
||||||
@ -96,10 +145,12 @@ export default {
|
|||||||
}[this.period];
|
}[this.period];
|
||||||
|
|
||||||
const t = getOptions({
|
const t = getOptions({
|
||||||
single,
|
// single,
|
||||||
color: this.color == 1 ? "#4CF0E8" : "#1065ff",
|
color: this.color == 1 ? "#4CF0E8" : "#1065ff",
|
||||||
titleValue,
|
titleValue,
|
||||||
subtitle,
|
subtitle,
|
||||||
|
currentName: items[0].label,
|
||||||
|
preName: items[1].label,
|
||||||
previousSum: vt[0],
|
previousSum: vt[0],
|
||||||
currentSum: vt[1],
|
currentSum: vt[1],
|
||||||
targetSum: vt[2],
|
targetSum: vt[2],
|
||||||
@ -122,41 +173,45 @@ export default {
|
|||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
if (this.period === '日' && this.than === '同比') {
|
if (this.period === '日' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${month}月${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
|
{ label: `去年${month}月${today}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" },
|
||||||
{ label: `去年${month}月${today}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
|
{ label: `${month}月${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '日' && this.than === '环比') {
|
} else if (this.period === '日' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${month}月${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
|
{ label: `${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
|
||||||
{ label: `${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
|
{ label: `${month}月${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '同比') {
|
} else if (this.period === '周' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
|
{ label: `去年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
|
||||||
{ label: `去年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
|
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
|
||||||
|
|
||||||
];
|
];
|
||||||
} else if (this.period === '周' && this.than === '环比') {
|
} else if (this.period === '周' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
|
{ label: `上周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
|
||||||
{ label: `上周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
|
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '月' && this.than === '同比') {
|
} else if (this.period === '月' && this.than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${month}月良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
|
{ label: `去年${month}月良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
|
||||||
{ label: `去年${month}月良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
|
{ label: `${month}月良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
|
||||||
{ label: `${month}月目标良率`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.valueTuple[2]) + "%" },
|
|
||||||
|
{ label: `${month}月目标良率`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
|
||||||
];
|
];
|
||||||
} else if (this.period === '月' && this.than === '环比') {
|
} else if (this.period === '月' && this.than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${month}月良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
|
{ label: `${lastMonth}月良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
|
||||||
{ label: `${lastMonth}月良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
|
{ label: `${month}月良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
|
||||||
{ label: `${month}月目标良率`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.valueTuple[2]) + "%" },
|
|
||||||
|
{ label: `${month}月目标良率`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${year}年良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
|
{ label: `${year - 1}年良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
|
||||||
{ label: `${year - 1}年良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
|
{ label: `${year}年良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
|
||||||
{ label: `${year}年目标良率`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.valueTuple[2]) + "%" },
|
|
||||||
|
{ label: `${year}年目标良率`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return items
|
return items
|
||||||
@ -191,6 +246,15 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
formatNumber(num) {
|
||||||
|
// 判断是否为整数
|
||||||
|
if (Number.isInteger(num)) {
|
||||||
|
return num; // 如果是整数,直接转换为字符串
|
||||||
|
} else {
|
||||||
|
// 如果不是整数,保留两位小数并转换为字符串
|
||||||
|
return num.toFixed(2);
|
||||||
|
}
|
||||||
|
},
|
||||||
handleCityUpdate(id) {
|
handleCityUpdate(id) {
|
||||||
this.factoryId = id;
|
this.factoryId = id;
|
||||||
},
|
},
|
||||||
@ -216,14 +280,11 @@ export default {
|
|||||||
.chart {
|
.chart {
|
||||||
// margin-left: 5%;
|
// margin-left: 5%;
|
||||||
// width: 290px;
|
// width: 290px;
|
||||||
align-self: stretch;
|
flex: 1 1 auto;
|
||||||
// flex: 1 1 auto;
|
padding: 0 15%;
|
||||||
// align-items: center;
|
|
||||||
// margin:0 auto;
|
|
||||||
// padding: 0 10%;;
|
|
||||||
/* margin: 10%; */
|
/* margin: 10%; */
|
||||||
/* min-width: 300px; */
|
/* min-width: 300px; */
|
||||||
height: 200px;
|
align-self: stretch;
|
||||||
}
|
}
|
||||||
.legend {
|
.legend {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-07 10:04:53
|
* @Date: 2024-05-07 10:04:53
|
||||||
* @LastEditTime: 2024-05-30 11:13:01
|
* @LastEditTime: 2024-05-31 13:19:34
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
export default function ({
|
export default ({
|
||||||
single = false,
|
|
||||||
color,
|
|
||||||
titleValue,
|
titleValue,
|
||||||
subtitle,
|
subtitle,
|
||||||
previousSum,
|
previousSum,
|
||||||
currentSum,
|
currentSum,
|
||||||
targetSum,
|
targetSum,
|
||||||
}) {
|
currentName,
|
||||||
return {
|
preName,
|
||||||
|
}) => ({
|
||||||
grid: {
|
grid: {
|
||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
@ -15,15 +14,11 @@ export default function ({
|
|||||||
top: 0,
|
top: 0,
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {},
|
||||||
// formatter(params) {
|
|
||||||
// return `${params.name}: ${(params.value * 100).toFixed(0)}%`;
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
title: {
|
title: {
|
||||||
text: titleValue,
|
text: titleValue,
|
||||||
left: "49%",
|
left: "44%",
|
||||||
top: "39%",
|
top: "37%",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
@ -42,18 +37,18 @@ export default function ({
|
|||||||
// 背景 series
|
// 背景 series
|
||||||
{
|
{
|
||||||
type: "pie",
|
type: "pie",
|
||||||
name: "当前目标",
|
name: "当前良率",
|
||||||
radius: ["70%", "85%"],
|
radius: ["70%", "85%"],
|
||||||
center: ["50%", "52%"],
|
center: ["45%", "52%"],
|
||||||
emptyCircleStyle: {
|
emptyCircleStyle: {
|
||||||
color: "#040c5f45",
|
color: "#042c5f33",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// 数据 series
|
// 数据 series
|
||||||
{
|
{
|
||||||
type: "pie",
|
type: "pie",
|
||||||
radius: ["70%", "85%"],
|
radius: ["70%", "85%"],
|
||||||
center: ["50%", "52%"],
|
center: ["45%", "52%"],
|
||||||
avoidLabelOvervlap: false,
|
avoidLabelOvervlap: false,
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
@ -64,7 +59,7 @@ export default function ({
|
|||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: currentSum,
|
value: currentSum,
|
||||||
name: "当前良率",
|
name: currentName,
|
||||||
selected: false,
|
selected: false,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderJoin: "round",
|
borderJoin: "round",
|
||||||
@ -77,12 +72,7 @@ export default function ({
|
|||||||
y: 0,
|
y: 0,
|
||||||
x2: 0,
|
x2: 0,
|
||||||
y2: 1,
|
y2: 1,
|
||||||
colorStops: single
|
colorStops: [
|
||||||
? [
|
|
||||||
{ offset: 0, color: `${color}11` },
|
|
||||||
{ offset: 1, color: `${color}` },
|
|
||||||
]
|
|
||||||
: [
|
|
||||||
{ offset: 0, color: "#4CF0E811" },
|
{ offset: 0, color: "#4CF0E811" },
|
||||||
{ offset: 1, color: "#4CF0E8" },
|
{ offset: 1, color: "#4CF0E8" },
|
||||||
],
|
],
|
||||||
@ -90,28 +80,20 @@ export default function ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:
|
value:currentSum == 0
|
||||||
targetSum > currentSum
|
|
||||||
? targetSum - currentSum
|
|
||||||
: targetSum == 0
|
|
||||||
? currentSum == 0
|
|
||||||
? 1
|
? 1
|
||||||
: 0
|
: 0,
|
||||||
: targetSum,
|
name: "未达成良率",
|
||||||
|
|
||||||
name: "未达成",
|
|
||||||
itemStyle: { color: "transparent" },
|
itemStyle: { color: "transparent" },
|
||||||
label: { show: false },
|
label: { show: false },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// 数据 series2 - 2023累计
|
// 数据 series2 - 2023累计
|
||||||
single
|
{
|
||||||
? null
|
|
||||||
: {
|
|
||||||
type: "pie",
|
type: "pie",
|
||||||
radius: ["55%", "70%"],
|
radius: ["55%", "70%"],
|
||||||
center: ["50%", "52%"],
|
center: ["45%", "52%"],
|
||||||
avoidLabelOvervlap: false,
|
avoidLabelOvervlap: false,
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
@ -122,7 +104,7 @@ export default function ({
|
|||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: previousSum,
|
value: previousSum,
|
||||||
name: "上期良率",
|
name: preName,
|
||||||
selected: false,
|
selected: false,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderJoin: "round",
|
borderJoin: "round",
|
||||||
@ -143,21 +125,14 @@ export default function ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:
|
value:previousSum == 0
|
||||||
targetSum > previousSum
|
|
||||||
? targetSum - previousSum
|
|
||||||
: previousSum == 0
|
|
||||||
? 1
|
? 1
|
||||||
: 0,
|
: 0,
|
||||||
name: "-",
|
name: "-",
|
||||||
formatter: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
itemStyle: { color: "transparent" },
|
itemStyle: { color: "transparent" },
|
||||||
label: { show: false },
|
label: { show: false },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
});
|
||||||
}
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-20 16:04:18
|
* @Date: 2024-05-20 16:04:18
|
||||||
* @LastEditTime: 2024-05-30 11:14:17
|
* @LastEditTime: 2024-05-31 13:16:26
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<!-- <div class="copilot-layout" ref="copilot-layout"> -->
|
<!-- <div class="copilot-layout" ref="copilot-layout"> -->
|
||||||
<div class="copilot-layout other" ref="copilot-layout">
|
<div class="copilot-layout" ref="copilot-layout">
|
||||||
<CopilotHeaderVue :than="than" :active="page" :period="period" @update:active="updateActive"
|
<CopilotHeaderVue :than="than" :active="page" :period="period" @update:active="updateActive"
|
||||||
@update:period="period = $event" @update:than="updateThan" />
|
@update:period="period = $event" @update:than="updateThan" />
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
than:'同比',
|
than:'同比',
|
||||||
page: "效率",
|
page: "效率",
|
||||||
period: "日",
|
period: "月",
|
||||||
currentsStyles: '',
|
currentsStyles: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -101,7 +101,7 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: -16px;
|
left: -16px;
|
||||||
/* top: -8px; */
|
/* top: -8px; */
|
||||||
/* height: calc(100% + 38px); */
|
height: calc(100% + 240px);
|
||||||
width: calc(100% + 30px);
|
width: calc(100% + 30px);
|
||||||
z-index: 1001;
|
z-index: 1001;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@ -114,7 +114,7 @@ export default {
|
|||||||
height: calc(100% + 38px);
|
height: calc(100% + 38px);
|
||||||
}
|
}
|
||||||
.other {
|
.other {
|
||||||
height: calc(100% + 240px);
|
/* height: calc(100% + 240px); */
|
||||||
}
|
}
|
||||||
.copilot-footer {
|
.copilot-footer {
|
||||||
/** position: absolute;
|
/** position: absolute;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-30 08:58:39
|
* @Date: 2024-05-30 08:58:39
|
||||||
* @LastEditTime: 2024-05-30 10:38:32
|
* @LastEditTime: 2024-05-31 15:52:28
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -11,7 +11,7 @@
|
|||||||
<span v-for="(item,index) in legend" :key="index" class="legend-item"
|
<span v-for="(item,index) in legend" :key="index" class="legend-item"
|
||||||
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
|
:style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div ref="oeeChart" style="height:96%;width:100%"></div>
|
<div ref="oeeChart" style="height:100%"></div>
|
||||||
</chart-container>
|
</chart-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ export default {
|
|||||||
data: this.xAxis,
|
data: this.xAxis,
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: "单位/%",
|
name: "单位/片",
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: "#fff",
|
color: "#fff",
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="chart">
|
<div class="chart">
|
||||||
<div class="chart-title">
|
<div class="chart-title">
|
||||||
<span class="title">生产情况</span>
|
<span class="title">工单情况</span>
|
||||||
<span class="line"></span>
|
<span class="line"></span>
|
||||||
</div>
|
</div>
|
||||||
<barChartBase :energyCockpits="prodOrder" ref="barChart" style="height: 0;flex:1"></barChartBase>
|
<barChartBase :energyCockpits="prodOrder" ref="barChart" style="height: 0;flex:1"></barChartBase>
|
||||||
|
@ -23,7 +23,10 @@ export default {
|
|||||||
components: { BarChartBase },
|
components: { BarChartBase },
|
||||||
data() {
|
data() {
|
||||||
// 城市数组的顺序必须是固定的
|
// 城市数组的顺序必须是固定的
|
||||||
const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
|
const cities = ["瑞昌", "邯郸",
|
||||||
|
// "株洲", "佳木斯", "成都", "凯盛", "蚌埠"
|
||||||
|
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
xAxis: cities,
|
xAxis: cities,
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,10 @@ export default {
|
|||||||
components: { BarChartBase },
|
components: { BarChartBase },
|
||||||
data() {
|
data() {
|
||||||
// 城市数组的顺序必须是固定的
|
// 城市数组的顺序必须是固定的
|
||||||
const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
|
const cities = ["瑞昌", "邯郸",
|
||||||
|
// "株洲", "佳木斯", "成都", "凯盛", "蚌埠"
|
||||||
|
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
xAxis: cities,
|
xAxis: cities,
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-20 13:32:59
|
* @Date: 2024-05-20 13:32:59
|
||||||
* @LastEditTime: 2024-05-30 13:35:00
|
* @LastEditTime: 2024-05-31 15:05:20
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -151,9 +151,10 @@ export default {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
let titleValue =
|
let titleValue =
|
||||||
vt[0] != null && vt[2] != null && vt[2] !== 0
|
vt[1] != null && vt[2] !== 0
|
||||||
? `${vt[1] / vt[2]}%`
|
? this.formatNumber((vt[1] / vt[2] * 100)) + '%'
|
||||||
: "0%",
|
: (vt[1] != 0 && vt[1] != null) && vt[2] == 0
|
||||||
|
? "100%" : '0%',
|
||||||
subtitle =
|
subtitle =
|
||||||
this.period == "日" ? `${month}月${today}日累计` : this.period == "周" ? `本周` : this.period == "月" ? `${month}月累计产出` : `${year}年累计产出`;
|
this.period == "日" ? `${month}月${today}日累计` : this.period == "周" ? `本周` : this.period == "月" ? `${month}月累计产出` : `${year}年累计产出`;
|
||||||
console.log(this.valueTuple[0], this.valueTuple[1], this.valueTuple[2],)
|
console.log(this.valueTuple[0], this.valueTuple[1], this.valueTuple[2],)
|
||||||
@ -196,6 +197,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
formatNumber(num) {
|
||||||
|
// 判断是否为整数
|
||||||
|
if (Number.isInteger(num)) {
|
||||||
|
return num; // 如果是整数,直接转换为字符串
|
||||||
|
} else {
|
||||||
|
// 如果不是整数,保留两位小数并转换为字符串
|
||||||
|
return num.toFixed(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
// fullscreen mixin 需要的回调
|
// fullscreen mixin 需要的回调
|
||||||
// fullscreenCallback(isFullscreen) {
|
// fullscreenCallback(isFullscreen) {
|
||||||
// console.log("isFullscreen--->", isFullscreen);
|
// console.log("isFullscreen--->", isFullscreen);
|
||||||
@ -219,40 +229,40 @@ function calculateItems(period, valueTuple,than) {
|
|||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
if (period === '日' && than === '同比') {
|
if (period === '日' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${month}月${today}日累计`, value: valueTuple[1] },
|
|
||||||
{ label: `去年${month}月${today}日累计`, value: valueTuple[0] },
|
{ label: `去年${month}月${today}日累计`, value: valueTuple[0] },
|
||||||
|
{ label: `${month}月${today}日累计`, value: valueTuple[1] },
|
||||||
];
|
];
|
||||||
} else if (period === '日' && than === '环比') {
|
} else if (period === '日' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${month}月${today}日累计`, value: valueTuple[1] },
|
|
||||||
{ label: `${yesterday}日累计`, value: valueTuple[0] },
|
{ label: `${yesterday}日累计`, value: valueTuple[0] },
|
||||||
|
{ label: `${month}月${today}日累计`, value: valueTuple[1] },
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '同比') {
|
} else if (period === '周' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `本周累计`, value: valueTuple[1] },
|
|
||||||
{ label: `去年本周累计`, value: valueTuple[0] },
|
{ label: `去年本周累计`, value: valueTuple[0] },
|
||||||
|
{ label: `本周累计`, value: valueTuple[1] },
|
||||||
];
|
];
|
||||||
} else if (period === '周' && than === '环比') {
|
} else if (period === '周' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `本周累计`, value: valueTuple[1] },
|
|
||||||
{ label: `上周累计`, value: valueTuple[0] },
|
{ label: `上周累计`, value: valueTuple[0] },
|
||||||
|
{ label: `本周累计`, value: valueTuple[1] },
|
||||||
];
|
];
|
||||||
} else if (period === '月' && than === '同比') {
|
} else if (period === '月' && than === '同比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${month}月累计`, value: valueTuple[1] },
|
|
||||||
{ label: `去年${month}月累计`, value: valueTuple[0] },
|
{ label: `去年${month}月累计`, value: valueTuple[0] },
|
||||||
|
{ label: `${month}月累计`, value: valueTuple[1] },
|
||||||
{ label: `${month}月目标`, value: valueTuple[2] },
|
{ label: `${month}月目标`, value: valueTuple[2] },
|
||||||
];
|
];
|
||||||
} else if (period === '月' && than === '环比') {
|
} else if (period === '月' && than === '环比') {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${month}月累计`, value: valueTuple[1] },
|
|
||||||
{ label: `${lastMonth}月累计`, value: valueTuple[0] },
|
{ label: `${lastMonth}月累计`, value: valueTuple[0] },
|
||||||
|
{ label: `${month}月累计`, value: valueTuple[1] },
|
||||||
{ label: `${month}月目标`, value: valueTuple[2] },
|
{ label: `${month}月目标`, value: valueTuple[2] },
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
items = [
|
items = [
|
||||||
{ label: `${year}年累计`, value: valueTuple[1] },
|
|
||||||
{ label: `${year - 1}年累计`, value: valueTuple[0] },
|
{ label: `${year - 1}年累计`, value: valueTuple[0] },
|
||||||
|
{ label: `${year}年累计`, value: valueTuple[1] },
|
||||||
{ label: `${year}年目标`, value: valueTuple[2] },
|
{ label: `${year}年目标`, value: valueTuple[2] },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -314,17 +324,17 @@ function calculateItems(period, valueTuple,than) {
|
|||||||
left: -18px;
|
left: -18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.legend-item:nth-child(1) .legend-item__label::before {
|
.legend-item:nth-child(2) .legend-item__label::before {
|
||||||
background: #12fff5;
|
background: #12fff5;
|
||||||
}
|
}
|
||||||
.legend-item:nth-child(1) .legend-item__value {
|
.legend-item:nth-child(2) .legend-item__value {
|
||||||
color: #12fff5;
|
color: #12fff5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.legend-item:nth-child(2) .legend-item__label::before {
|
.legend-item:nth-child(1) .legend-item__label::before {
|
||||||
background: #0f65ff;
|
background: #0f65ff;
|
||||||
}
|
}
|
||||||
.legend-item:nth-child(2) .legend-item__value {
|
.legend-item:nth-child(1) .legend-item__value {
|
||||||
color: #0f65ff;
|
color: #0f65ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-05-30 16:00:50
|
||||||
|
* @LastEditTime: 2024-05-31 16:15:51
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
<!--
|
<!--
|
||||||
filename: DoubleRingWrapper.vue
|
filename: DoubleRingWrapper.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
@ -42,13 +49,13 @@ export default {
|
|||||||
return {
|
return {
|
||||||
factoryId: 4, // 默认成都
|
factoryId: 4, // 默认成都
|
||||||
cityOptions: [
|
cityOptions: [
|
||||||
"成都",
|
// "成都",
|
||||||
"邯郸",
|
"邯郸",
|
||||||
"株洲",
|
// "株洲",
|
||||||
"瑞昌",
|
"瑞昌",
|
||||||
"佳木斯",
|
// "佳木斯",
|
||||||
"凯盛光伏",
|
// "凯盛光伏",
|
||||||
"蚌埠兴科",
|
// "蚌埠兴科",
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-05-24 15:15:00
|
* @Date: 2024-05-24 15:15:00
|
||||||
* @LastEditTime: 2024-05-28 08:42:36
|
* @LastEditTime: 2024-05-31 16:16:16
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -54,12 +54,12 @@ export default {
|
|||||||
return {
|
return {
|
||||||
factoryId: 4, // 默认成都
|
factoryId: 4, // 默认成都
|
||||||
cityOptions: [
|
cityOptions: [
|
||||||
"成都",
|
// "成都",
|
||||||
"邯郸",
|
"邯郸",
|
||||||
"株洲",
|
// "株洲",
|
||||||
"佳木斯",
|
// "佳木斯",
|
||||||
"凯盛光伏",
|
// "凯盛光伏",
|
||||||
"蚌埠兴科",
|
// "蚌埠兴科",
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -80,15 +80,9 @@ export default ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:
|
value:currentSum == 0
|
||||||
targetSum > currentSum
|
|
||||||
? targetSum - currentSum
|
|
||||||
: targetSum == 0
|
|
||||||
? currentSum == 0
|
|
||||||
? 1
|
? 1
|
||||||
: 0
|
|
||||||
: 0,
|
: 0,
|
||||||
|
|
||||||
name: "未达成累计",
|
name: "未达成累计",
|
||||||
itemStyle: { color: "transparent" },
|
itemStyle: { color: "transparent" },
|
||||||
label: { show: false },
|
label: { show: false },
|
||||||
@ -131,10 +125,7 @@ export default ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value:
|
value:previousSum == 0
|
||||||
targetSum > previousSum
|
|
||||||
? targetSum - previousSum
|
|
||||||
: previousSum == 0
|
|
||||||
? 1
|
? 1
|
||||||
: 0,
|
: 0,
|
||||||
name: "-",
|
name: "-",
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-04-28 13:42:51
|
||||||
|
* @LastEditTime: 2024-05-31 16:14:09
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
<!--
|
<!--
|
||||||
filename: Bipv.vue
|
filename: Bipv.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
@ -24,7 +31,10 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
// 城市数组的顺序必须是固定的
|
// 城市数组的顺序必须是固定的
|
||||||
const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
|
const cities = ["瑞昌", "邯郸",
|
||||||
|
// "株洲", "佳木斯", "成都", "凯盛", "蚌埠"
|
||||||
|
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
legend: [
|
legend: [
|
||||||
{ label: `${year}年目标值`, color: "#f3c000" },
|
{ label: `${year}年目标值`, color: "#f3c000" },
|
||||||
|
@ -23,7 +23,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
// 城市数组的顺序必须是固定的
|
// 城市数组的顺序必须是固定的
|
||||||
const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
|
const cities = ["瑞昌", "邯郸",
|
||||||
|
// "株洲", "佳木斯", "成都", "凯盛", "蚌埠"
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
legend: [
|
legend: [
|
||||||
{ label: `${year - 1}年`, color: "#12f7f1" },
|
{ label: `${year - 1}年`, color: "#12f7f1" },
|
||||||
|
@ -11,24 +11,24 @@
|
|||||||
<section class="right-part">
|
<section class="right-part">
|
||||||
<div class="yield-location">
|
<div class="yield-location">
|
||||||
<section class="btn-group">
|
<section class="btn-group">
|
||||||
<button
|
<!-- <button
|
||||||
@click="activeLoc = '1'"
|
@click="activeLoc = '1'"
|
||||||
:class="activeLoc === '1' ? 'active' : ''"
|
:class="activeLoc === '1' ? 'active' : ''"
|
||||||
>
|
>
|
||||||
成都
|
成都
|
||||||
</button>
|
</button> -->
|
||||||
<button
|
<button
|
||||||
@click="activeLoc = '2'"
|
@click="activeLoc = '2'"
|
||||||
:class="activeLoc === '2' ? 'active' : ''"
|
:class="activeLoc === '2' ? 'active' : ''"
|
||||||
>
|
>
|
||||||
邯郸
|
邯郸
|
||||||
</button>
|
</button>
|
||||||
<button
|
<!-- <button
|
||||||
@click="activeLoc = '3'"
|
@click="activeLoc = '3'"
|
||||||
:class="activeLoc === '3' ? 'active' : ''"
|
:class="activeLoc === '3' ? 'active' : ''"
|
||||||
>
|
>
|
||||||
株洲
|
株洲
|
||||||
</button>
|
</button> -->
|
||||||
<button
|
<button
|
||||||
@click="activeLoc = '4'"
|
@click="activeLoc = '4'"
|
||||||
:class="activeLoc === '4' ? 'active' : ''"
|
:class="activeLoc === '4' ? 'active' : ''"
|
||||||
@ -37,7 +37,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</section>
|
</section>
|
||||||
<section class="btn-group">
|
<section class="btn-group">
|
||||||
<button
|
<!-- <button
|
||||||
@click="activeLoc = '5'"
|
@click="activeLoc = '5'"
|
||||||
:class="activeLoc === '5' ? 'active' : ''"
|
:class="activeLoc === '5' ? 'active' : ''"
|
||||||
class="fixwidth"
|
class="fixwidth"
|
||||||
@ -55,7 +55,7 @@
|
|||||||
:class="activeLoc === '7' ? 'active' : ''"
|
:class="activeLoc === '7' ? 'active' : ''"
|
||||||
>
|
>
|
||||||
蚌埠兴科
|
蚌埠兴科
|
||||||
</button>
|
</button> -->
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div class="yield-summary">
|
<div class="yield-summary">
|
||||||
@ -85,13 +85,14 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeLoc: "1",
|
activeLoc: "2",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
output() {
|
output() {
|
||||||
// ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"]
|
// ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"]
|
||||||
const chipOutput = this.$store.getters.home.chipOutput;
|
const chipOutput = this.$store.getters.home.chipOutput;
|
||||||
|
console.log('chipOutput', chipOutput);
|
||||||
if (
|
if (
|
||||||
!chipOutput ||
|
!chipOutput ||
|
||||||
!chipOutput.target ||
|
!chipOutput.target ||
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-04-28 13:42:51
|
||||||
|
* @LastEditTime: 2024-05-31 16:11:56
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
<!--
|
<!--
|
||||||
filename: ChipYield.vue
|
filename: ChipYield.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-04-28 13:42:51
|
||||||
|
* @LastEditTime: 2024-05-31 16:11:06
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
<!--
|
<!--
|
||||||
filename: fto.vue
|
filename: fto.vue
|
||||||
author: liubin
|
author: liubin
|
||||||
@ -23,7 +30,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
// 城市数组的顺序必须是固定的
|
// 城市数组的顺序必须是固定的
|
||||||
const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
|
const cities = ["瑞昌", "邯郸",
|
||||||
|
// "株洲", "佳木斯", "成都", "凯盛", "蚌埠"
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
legend: [
|
legend: [
|
||||||
{ label: `${year - 1}年`, color: "#12f7f1" },
|
{ label: `${year - 1}年`, color: "#12f7f1" },
|
||||||
|
@ -113,6 +113,16 @@ export default {
|
|||||||
barWidth: 12,
|
barWidth: 12,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius: [10, 10, 0, 0],
|
borderRadius: [10, 10, 0, 0],
|
||||||
|
normal: {
|
||||||
|
label: {
|
||||||
|
show: true, //开启显示
|
||||||
|
position: 'top', //在上方显示
|
||||||
|
textStyle: { //数值样式
|
||||||
|
color: '#DFF1FE',
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
color: {
|
color: {
|
||||||
type: "linear",
|
type: "linear",
|
||||||
x: 0,
|
x: 0,
|
||||||
@ -146,11 +156,6 @@ export default {
|
|||||||
name: '', // this.series[1].name,
|
name: '', // this.series[1].name,
|
||||||
type: "bar",
|
type: "bar",
|
||||||
barWidth: 12,
|
barWidth: 12,
|
||||||
// tooltip: {
|
|
||||||
// valueFormatter: function (value) {
|
|
||||||
// return value + " ml";
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius: [10, 10, 0, 0],
|
borderRadius: [10, 10, 0, 0],
|
||||||
color: {
|
color: {
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-04-28 13:42:51
|
||||||
|
* @LastEditTime: 2024-05-31 16:13:47
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
<!--
|
<!--
|
||||||
filename: right-chart-base
|
filename: right-chart-base
|
||||||
author: liubin
|
author: liubin
|
||||||
|
@ -25,7 +25,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
// 城市数组的顺序必须是固定的
|
// 城市数组的顺序必须是固定的
|
||||||
const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
|
const cities = ["瑞昌", "邯郸",
|
||||||
|
// "株洲", "佳木斯", "成都", "凯盛", "蚌埠"
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
legend: [
|
legend: [
|
||||||
{ label: `${year}年目标值`, color: "#f3c000" },
|
{ label: `${year}年目标值`, color: "#f3c000" },
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dashboard-factory-all">
|
<div class="dashboard-factory-all">
|
||||||
<div id="map-container">
|
<div id="map-container">
|
||||||
<div v-if="visible" class="cdLine"></div>
|
<!-- <div v-if="visible" class="cdLine"></div> -->
|
||||||
<div v-if="visible" class="zzLine"></div>
|
<!-- <div v-if="visible" class="zzLine"></div> -->
|
||||||
<div v-if="visible" class="rcLine"></div>
|
<div v-if="visible" class="rcLine"></div>
|
||||||
<div v-if="visible" class="rcLineTwo"></div>
|
<div v-if="visible" class="rcLineTwo"></div>
|
||||||
<div v-if="visible" class="hdLine"></div>
|
<div v-if="visible" class="hdLine"></div>
|
||||||
<div v-if="visible" class="hdLineTwo"></div>
|
<div v-if="visible" class="hdLineTwo"></div>
|
||||||
<div v-if="visible" class="ksLine"></div>
|
<!-- <div v-if="visible" class="ksLine"></div> -->
|
||||||
<div v-if="visible" class="bbLine"></div>
|
<!-- <div v-if="visible" class="bbLine"></div> -->
|
||||||
<div v-if="visible" class="bbLineTwo"></div>
|
<!-- <div v-if="visible" class="bbLineTwo"></div> -->
|
||||||
<div v-if="visible" class="bbLineThree"></div>
|
<!-- <div v-if="visible" class="bbLineThree"></div> -->
|
||||||
<div v-if="visible" class="jmsLine"></div>
|
<!-- <div v-if="visible" class="jmsLine"></div> -->
|
||||||
<div v-if="visible" class="jmsLineTwo"></div>
|
<!-- <div v-if="visible" class="jmsLineTwo"></div> -->
|
||||||
<div class="databoard">
|
<div class="databoard">
|
||||||
<db-header class="db-header"></db-header>
|
<db-header class="db-header"></db-header>
|
||||||
<div class="db-body">
|
<div class="db-body">
|
||||||
@ -61,19 +61,19 @@ import StdChart from "./dashboard/charts/StdChart.vue";
|
|||||||
|
|
||||||
const LOCATIONS = [
|
const LOCATIONS = [
|
||||||
// 佳木斯
|
// 佳木斯
|
||||||
{ x: 67, y: 20, tx: 60, ty: 29, path: 'copilot/jmsIndex' },
|
// { x: 67, y: 20, tx: 60, ty: 29, path: 'factoryData/jmsIndex' },
|
||||||
// 成都
|
// 成都
|
||||||
{ x: 46, y: 56,tx:46,ty:93, path: 'copilot/cdIndex' },
|
// { x: 46, y: 56, tx: 46, ty: 93, path: 'factoryData/cdIndex' },
|
||||||
// 蚌埠1
|
// 蚌埠1
|
||||||
{ x: 60, y: 52, tx: 35.5, ty: 48.3, path: 'copilot/bbIndex' },
|
// { x: 60, y: 52, tx: 35.5, ty: 48.3, path: 'factoryData/bbIndex' },
|
||||||
// 蚌埠2
|
// 蚌埠2
|
||||||
{ x: 61, y: 53,tx:39,ty:68, path: 'copilot/ksIndex' },
|
// { x: 61, y: 53, tx: 39, ty: 68, path: 'factoryData/ksIndex' },
|
||||||
// 江西 瑞昌
|
// 江西 瑞昌
|
||||||
{ x: 60, y: 58, tx: 68, ty: 52, path: 'copilot/factory-data' },
|
{ x: 60, y: 58, tx: 68, ty: 52, path: 'factoryData/factory-data' },
|
||||||
// 湖南 株洲
|
// 湖南 株洲
|
||||||
{ x: 56, y: 60, tx: 60, ty: 95, path: 'copilot/zzIndex' },
|
// { x: 56, y: 60, tx: 60, ty: 95, path: 'factoryData/zzIndex' },
|
||||||
// 邯郸
|
// 邯郸
|
||||||
{ x: 58, y: 45, tx: 47, ty: 34, path: 'copilot/hdIndex' },
|
{ x: 58, y: 45, tx: 47, ty: 34, path: 'factoryData/hdIndex' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -213,39 +213,41 @@ export default {
|
|||||||
{ label: "标准组件产出", value: 0 }, // Math.floor(Math.random() * 1000000) },
|
{ label: "标准组件产出", value: 0 }, // Math.floor(Math.random() * 1000000) },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
if (position === LOCATIONS[0]) {
|
if
|
||||||
templateInfo.companyName = "佳木斯中建材";
|
// (position === LOCATIONS[0]) {
|
||||||
this.jmsHintPosition = position;
|
// templateInfo.companyName = "佳木斯中建材";
|
||||||
templateInfo.items[0].value = this.homeStore.ftoInvest.current[3];
|
// this.jmsHintPosition = position;
|
||||||
templateInfo.items[2].value = this.homeStore.chipInvest.current[3];
|
// templateInfo.items[0].value = this.homeStore.ftoInvest.current[3];
|
||||||
templateInfo.items[1].value = this.homeStore.chipOutput.current[3];
|
// templateInfo.items[2].value = this.homeStore.chipInvest.current[3];
|
||||||
templateInfo.items[3].value = this.homeStore.stdOutput.current[3];
|
// templateInfo.items[1].value = this.homeStore.chipOutput.current[3];
|
||||||
this.jmsInfo = templateInfo;
|
// templateInfo.items[3].value = this.homeStore.stdOutput.current[3];
|
||||||
} else if (position === LOCATIONS[1]) {
|
// this.jmsInfo = templateInfo;
|
||||||
this.cdHintPosition = position;
|
// } else if (position === LOCATIONS[1]) {
|
||||||
templateInfo.companyName = "成都中建材";
|
// this.cdHintPosition = position;
|
||||||
templateInfo.items[0].value = this.homeStore.ftoInvest?.current[4];
|
// templateInfo.companyName = "成都中建材";
|
||||||
templateInfo.items[2].value = this.homeStore.chipInvest.current[4];
|
// templateInfo.items[0].value = this.homeStore.ftoInvest?.current[4];
|
||||||
templateInfo.items[1].value = this.homeStore.chipOutput.current[4];
|
// templateInfo.items[2].value = this.homeStore.chipInvest.current[4];
|
||||||
templateInfo.items[3].value = this.homeStore.stdOutput.current[4];
|
// templateInfo.items[1].value = this.homeStore.chipOutput.current[4];
|
||||||
this.cdInfo = templateInfo;
|
// templateInfo.items[3].value = this.homeStore.stdOutput.current[4];
|
||||||
} else if (position === LOCATIONS[2]) {
|
// this.cdInfo = templateInfo;
|
||||||
this.bbHintPosition = position;
|
// } else if (position === LOCATIONS[2]) {
|
||||||
templateInfo.companyName = "蚌埠兴科";
|
// this.bbHintPosition = position;
|
||||||
templateInfo.items[0].value = this.homeStore.ftoInvest?.current[6];
|
// templateInfo.companyName = "蚌埠兴科";
|
||||||
templateInfo.items[2].value = this.homeStore.chipInvest.current[6];
|
// templateInfo.items[0].value = this.homeStore.ftoInvest?.current[6];
|
||||||
templateInfo.items[1].value = this.homeStore.chipOutput?.current[6];
|
// templateInfo.items[2].value = this.homeStore.chipInvest.current[6];
|
||||||
templateInfo.items[3].value = this.homeStore.stdOutput.current[6];
|
// templateInfo.items[1].value = this.homeStore.chipOutput?.current[6];
|
||||||
this.bbInfo = templateInfo;
|
// templateInfo.items[3].value = this.homeStore.stdOutput.current[6];
|
||||||
} else if (position === LOCATIONS[3]) {
|
// this.bbInfo = templateInfo;
|
||||||
this.ksHintPosition = position;
|
// } else if (position === LOCATIONS[3]) {
|
||||||
templateInfo.companyName = "凯盛光伏";
|
// this.ksHintPosition = position;
|
||||||
templateInfo.items[0].value = this.homeStore.ftoInvest?.current[5];
|
// templateInfo.companyName = "凯盛光伏";
|
||||||
templateInfo.items[2].value = this.homeStore.chipInvest.current[5];
|
// templateInfo.items[0].value = this.homeStore.ftoInvest?.current[5];
|
||||||
templateInfo.items[1].value = this.homeStore.chipOutput.current[5];
|
// templateInfo.items[2].value = this.homeStore.chipInvest.current[5];
|
||||||
templateInfo.items[3].value = this.homeStore.stdOutput.current[5];
|
// templateInfo.items[1].value = this.homeStore.chipOutput.current[5];
|
||||||
this.ksInfo = templateInfo;
|
// templateInfo.items[3].value = this.homeStore.stdOutput.current[5];
|
||||||
} else if (position === LOCATIONS[4]) {
|
// this.ksInfo = templateInfo;
|
||||||
|
// }
|
||||||
|
(position === LOCATIONS[0]) {
|
||||||
this.rcHintPosition = position;
|
this.rcHintPosition = position;
|
||||||
templateInfo.companyName = "瑞昌中建材";
|
templateInfo.companyName = "瑞昌中建材";
|
||||||
templateInfo.items[0].value = this.homeStore.ftoInvest?.current[0];
|
templateInfo.items[0].value = this.homeStore.ftoInvest?.current[0];
|
||||||
@ -253,15 +255,15 @@ export default {
|
|||||||
templateInfo.items[1].value = this.homeStore.chipOutput.current[0];
|
templateInfo.items[1].value = this.homeStore.chipOutput.current[0];
|
||||||
templateInfo.items[3].value = this.homeStore.stdOutput.current[0];
|
templateInfo.items[3].value = this.homeStore.stdOutput.current[0];
|
||||||
this.info = templateInfo;
|
this.info = templateInfo;
|
||||||
} else if (position === LOCATIONS[5]) {
|
// } else if (position === LOCATIONS[5]) {
|
||||||
this.zzHintPosition = position;
|
// this.zzHintPosition = position;
|
||||||
templateInfo.companyName = "株洲中建材";
|
// templateInfo.companyName = "株洲中建材";
|
||||||
templateInfo.items[0].value = this.homeStore.ftoInvest?.current[2];
|
// templateInfo.items[0].value = this.homeStore.ftoInvest?.current[2];
|
||||||
templateInfo.items[2].value = this.homeStore.chipInvest.current[2];
|
// templateInfo.items[2].value = this.homeStore.chipInvest.current[2];
|
||||||
templateInfo.items[1].value = this.homeStore.chipOutput.current[2];
|
// templateInfo.items[1].value = this.homeStore.chipOutput.current[2];
|
||||||
templateInfo.items[3].value = this.homeStore.stdOutput.current[2];
|
// templateInfo.items[3].value = this.homeStore.stdOutput.current[2];
|
||||||
this.zzInfo = templateInfo;
|
// this.zzInfo = templateInfo;
|
||||||
} else if (position === LOCATIONS[6]) {
|
} else if (position === LOCATIONS[1]) {
|
||||||
this.hdHintPosition = position;
|
this.hdHintPosition = position;
|
||||||
templateInfo.companyName = "邯郸中建材";
|
templateInfo.companyName = "邯郸中建材";
|
||||||
templateInfo.items[0].value = this.homeStore.ftoInvest?.current[1];
|
templateInfo.items[0].value = this.homeStore.ftoInvest?.current[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user