Compare commits

..

No commits in common. "44283a049b2ed84322adc4109710e6e51cfa7a64" and "da14d9f0183be3ecf199dcb4efc5bd33e56fd206" have entirely different histories.

39 changed files with 403 additions and 538 deletions

View File

@ -1,7 +1,7 @@
### ###
# @Author: zhp # @Author: zhp
# @Date: 2024-04-28 13:42:51 # @Date: 2024-04-28 13:42:51
# @LastEditTime: 2024-06-03 08:50:41 # @LastEditTime: 2024-06-03 08:44:09
# @LastEditors: DY # @LastEditors: DY
# @Description: # @Description:
### ###

View File

@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2024-05-07 08:54:59 * @Date: 2024-05-07 08:54:59
* @LastEditTime: 2024-06-03 08:52:02 * @LastEditTime: 2024-05-31 10:25:55
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
*/ */
@ -147,12 +147,3 @@ 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: 1.8 MiB

After

Width:  |  Height:  |  Size: 7.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 6.5 MiB

View File

@ -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({

View File

@ -92,11 +92,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,preData,preFtoData); const payload = splitCurrentAndPrevious(dataArr.prodOutputOutDO, dataArr.prodTargetDO,dataArr.prodOutputFtoDO
);
commit("SET_HOME_INFO", payload); commit("SET_HOME_INFO", payload);
}, },
/** 初始化驾驶舱数据 */ /** 初始化驾驶舱数据 */
@ -126,7 +125,6 @@ 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 : []

View File

@ -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" @click="handleExport" /> --> <button type="button" class="export-btn" />
<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,7 +31,6 @@
<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",
@ -59,15 +58,6 @@ 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);
}, },

View File

@ -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" @click="handleExport" /> <button type="button" class="export-btn" />
<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,8 +25,6 @@
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 },
@ -57,15 +55,6 @@ 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;

View File

@ -1,10 +1,3 @@
<!--
* @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
@ -57,7 +50,7 @@ button {
padding: 12px; padding: 12px;
padding-left: 20px; padding-left: 20px;
color: #fff; color: #fff;
font-size: 18px; font-size: 22px;
letter-spacing: 10px; letter-spacing: 10px;
cursor: pointer; cursor: pointer;
} }

View File

@ -1,10 +1,16 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-05-23 15:49:14 * @Date: 2024-05-23 15:49:14
* @LastEditTime: 2024-05-31 16:06:50 * @LastEditTime: 2024-05-29 10:56:21
* @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">

View File

@ -35,7 +35,7 @@ export default {
data() { data() {
return { return {
page: "产量", page: "产量",
period: "", period: "",
than:'同比', than:'同比',
currentsStyles: '', currentsStyles: '',
}; };

View File

@ -36,9 +36,7 @@ export default {
}, },
data() { data() {
// //
const cities = ["瑞昌", "邯郸", const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
// "", "", "", "", ""
];
return { return {
xAxis: cities, xAxis: cities,
}; };

View File

@ -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-31 16:19:45 * @LastEditTime: 2024-05-30 13:23:03
* @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>

View File

@ -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-31 16:38:29 * @LastEditTime: 2024-05-30 11:19:51
* @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="span-2" v-for="item in cities.filter((val, index) => index != 5)" :key="item.name"> <div class="flex-item" 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, 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, 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, },
@ -80,10 +80,7 @@ export default {
} }
// //
// _cities.splice(4, 1); // _cities.splice(4, 1);
let arr = [] return _cities;
arr.push(_cities[0])
arr.push(_cities[1])
return arr;
}, },
}, },
data() { data() {

View File

@ -36,9 +36,7 @@ export default {
}, },
data() { data() {
// //
const cities = ["瑞昌", "邯郸", const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
// "", "", "", "", ""
];
return { return {
xAxis: cities, xAxis: cities,
}; };

View File

@ -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-31 15:55:00 * @LastEditTime: 2024-05-29 14:09:08
* @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:100%;width:100%"></div> <div ref="oeeChart" style="height:96%;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;
// // if (val === false && this.isOpen === true) { this.initChart(this.actualOptions)
// // console.log(val) this.canvasReset()
// // 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);

View File

@ -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-31 15:54:41 * @LastEditTime: 2024-05-29 14:25:10
* @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:100%;width:100%"></div> <div ref="oeeChart" style="height:96%;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) {

View File

@ -79,64 +79,15 @@ 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 items = []; let titleValue = single
var day1 = new Date(); ? (vt[1] != null && `${vt[1] * 100}%`) || "0%"
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); : vt[0] != null && vt[2] != null && vt[2] !== 0
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() ? `${((vt[1] / vt[2]) * 100).toFixed(0)}%`
// : "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 = {
: "本日良率", : "本日良率",
: "本周良率", : "本周良率",
@ -145,12 +96,10 @@ 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],
@ -173,45 +122,41 @@ 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[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" }, { label: `${month}${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
{ label: `${month}${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `去年${month}${today}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
]; ];
} else if (this.period === '日' && this.than === '环比') { } else if (this.period === '日' && this.than === '环比') {
items = [ items = [
{ label: `${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, { label: `${month}${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
{ label: `${month}${today}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
]; ];
} else if (this.period === '周' && this.than === '同比') { } else if (this.period === '周' && this.than === '同比') {
items = [ items = [
{ label: `去年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, { label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `去年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
]; ];
} else if (this.period === '周' && this.than === '环比') { } else if (this.period === '周' && this.than === '环比') {
items = [ items = [
{ label: `周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, { label: `周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
{ label: `周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
]; ];
} else if (this.period === '月' && this.than === '同比') { } else if (this.period === '月' && this.than === '同比') {
items = [ items = [
{ label: `去年${month}月良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, { label: `${month}月良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
{ label: `${month}月良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `去年${month}月良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
{ 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: `${lastMonth}月良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, { label: `${month}月良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
{ label: `${month}月良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `${lastMonth}月良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.valueTuple[0]) + "%" },
{ 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 - 1}年良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, { label: `${year}年良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.valueTuple[1]) + "%" },
{ label: `${year}年良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == 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[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
@ -246,15 +191,6 @@ 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;
}, },
@ -280,11 +216,14 @@ export default {
.chart { .chart {
// margin-left: 5%; // margin-left: 5%;
// width: 290px; // width: 290px;
flex: 1 1 auto; align-self: stretch;
padding: 0 15%; // flex: 1 1 auto;
// align-items: center;
// margin:0 auto;
// padding: 0 10%;;
/* margin: 10%; */ /* margin: 10%; */
/* min-width: 300px; */ /* min-width: 300px; */
align-self: stretch; height: 200px;
} }
.legend { .legend {
height: 80px; height: 80px;

View File

@ -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-31 13:19:34 * @LastEditTime: 2024-05-30 11:13:01
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->

View File

@ -1,12 +1,13 @@
export default ({ export default function ({
single = false,
color,
titleValue, titleValue,
subtitle, subtitle,
previousSum, previousSum,
currentSum, currentSum,
targetSum, targetSum,
currentName, }) {
preName, return {
}) => ({
grid: { grid: {
left: 0, left: 0,
right: 0, right: 0,
@ -14,11 +15,15 @@ export default ({
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: "44%", left: "49%",
top: "37%", top: "39%",
textAlign: "center", textAlign: "center",
textStyle: { textStyle: {
fontWeight: 600, fontWeight: 600,
@ -37,18 +42,18 @@ export default ({
// 背景 series // 背景 series
{ {
type: "pie", type: "pie",
name: "当前良率", name: "当前目标",
radius: ["70%", "85%"], radius: ["70%", "85%"],
center: ["45%", "52%"], center: ["50%", "52%"],
emptyCircleStyle: { emptyCircleStyle: {
color: "#042c5f33", color: "#040c5f45",
}, },
}, },
// 数据 series // 数据 series
{ {
type: "pie", type: "pie",
radius: ["70%", "85%"], radius: ["70%", "85%"],
center: ["45%", "52%"], center: ["50%", "52%"],
avoidLabelOvervlap: false, avoidLabelOvervlap: false,
label: { label: {
show: false, show: false,
@ -59,7 +64,7 @@ export default ({
data: [ data: [
{ {
value: currentSum, value: currentSum,
name: currentName, name: "当前良率",
selected: false, selected: false,
itemStyle: { itemStyle: {
borderJoin: "round", borderJoin: "round",
@ -72,7 +77,12 @@ export default ({
y: 0, y: 0,
x2: 0, x2: 0,
y2: 1, y2: 1,
colorStops: [ colorStops: single
? [
{ 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" },
], ],
@ -80,20 +90,28 @@ export default ({
}, },
}, },
{ {
value:currentSum == 0 value:
targetSum > currentSum
? targetSum - currentSum
: targetSum == 0
? currentSum == 0
? 1 ? 1
: 0, : 0
name: "未达成良率", : targetSum,
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: ["45%", "52%"], center: ["50%", "52%"],
avoidLabelOvervlap: false, avoidLabelOvervlap: false,
label: { label: {
show: false, show: false,
@ -104,7 +122,7 @@ export default ({
data: [ data: [
{ {
value: previousSum, value: previousSum,
name: preName, name: "上期良率",
selected: false, selected: false,
itemStyle: { itemStyle: {
borderJoin: "round", borderJoin: "round",
@ -125,14 +143,21 @@ export default ({
}, },
}, },
{ {
value:previousSum == 0 value:
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 },
}, },
], ],
}, },
], ],
}); };
}

View File

@ -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-31 13:16:26 * @LastEditTime: 2024-05-30 11:14:17
* @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" ref="copilot-layout"> <div class="copilot-layout other" 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% + 240px); /* height: calc(100% + 38px); */
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;

View File

@ -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-31 15:52:28 * @LastEditTime: 2024-05-30 10:38:32
* @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:100%"></div> <div ref="oeeChart" style="height:96%;width: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,

View File

@ -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>

View File

@ -23,10 +23,7 @@ export default {
components: { BarChartBase }, components: { BarChartBase },
data() { data() {
// //
const cities = ["瑞昌", "邯郸", const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
// "", "", "", "", ""
];
return { return {
xAxis: cities, xAxis: cities,
}; };

View File

@ -23,10 +23,7 @@ export default {
components: { BarChartBase }, components: { BarChartBase },
data() { data() {
// //
const cities = ["瑞昌", "邯郸", const cities = ["瑞昌", "邯郸", "株洲", "佳木斯", "成都", "凯盛", "蚌埠"];
// "", "", "", "", ""
];
return { return {
xAxis: cities, xAxis: cities,
}; };

View File

@ -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-31 15:05:20 * @LastEditTime: 2024-05-30 13:35:00
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -151,10 +151,9 @@ export default {
]; ];
} }
let titleValue = let titleValue =
vt[1] != null && vt[2] !== 0 vt[0] != null && vt[2] != null && vt[2] !== 0
? this.formatNumber((vt[1] / vt[2] * 100)) + '%' ? `${vt[1] / vt[2]}%`
: (vt[1] != 0 && vt[1] != null) && vt[2] == 0 : "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],)
@ -197,15 +196,6 @@ 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);
@ -229,40 +219,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[0] },
{ label: `${month}${today}日累计`, value: valueTuple[1] }, { label: `${month}${today}日累计`, value: valueTuple[1] },
{ label: `去年${month}${today}日累计`, value: valueTuple[0] },
]; ];
} else if (period === '日' && than === '环比') { } else if (period === '日' && than === '环比') {
items = [ items = [
{ label: `${yesterday}日累计`, value: valueTuple[0] },
{ label: `${month}${today}日累计`, value: valueTuple[1] }, { label: `${month}${today}日累计`, value: valueTuple[1] },
{ label: `${yesterday}日累计`, value: valueTuple[0] },
]; ];
} else if (period === '周' && than === '同比') { } else if (period === '周' && than === '同比') {
items = [ items = [
{ label: `去年本周累计`, value: valueTuple[0] },
{ label: `本周累计`, value: valueTuple[1] }, { label: `本周累计`, value: valueTuple[1] },
{ label: `去年本周累计`, value: valueTuple[0] },
]; ];
} else if (period === '周' && than === '环比') { } else if (period === '周' && than === '环比') {
items = [ items = [
{ label: `上周累计`, value: valueTuple[0] },
{ label: `本周累计`, value: valueTuple[1] }, { label: `本周累计`, value: valueTuple[1] },
{ label: `上周累计`, value: valueTuple[0] },
]; ];
} else if (period === '月' && than === '同比') { } else if (period === '月' && than === '同比') {
items = [ items = [
{ label: `去年${month}月累计`, value: valueTuple[0] },
{ label: `${month}月累计`, value: valueTuple[1] }, { label: `${month}月累计`, value: valueTuple[1] },
{ label: `去年${month}月累计`, value: valueTuple[0] },
{ label: `${month}月目标`, value: valueTuple[2] }, { label: `${month}月目标`, value: valueTuple[2] },
]; ];
} else if (period === '月' && than === '环比') { } else if (period === '月' && than === '环比') {
items = [ items = [
{ label: `${lastMonth}月累计`, value: valueTuple[0] },
{ label: `${month}月累计`, value: valueTuple[1] }, { label: `${month}月累计`, value: valueTuple[1] },
{ label: `${lastMonth}月累计`, value: valueTuple[0] },
{ label: `${month}月目标`, value: valueTuple[2] }, { label: `${month}月目标`, value: valueTuple[2] },
]; ];
} else { } else {
items = [ items = [
{ label: `${year - 1}年累计`, value: valueTuple[0] },
{ label: `${year}年累计`, value: valueTuple[1] }, { label: `${year}年累计`, value: valueTuple[1] },
{ label: `${year - 1}年累计`, value: valueTuple[0] },
{ label: `${year}年目标`, value: valueTuple[2] }, { label: `${year}年目标`, value: valueTuple[2] },
]; ];
} }
@ -324,17 +314,17 @@ function calculateItems(period, valueTuple,than) {
left: -18px; left: -18px;
} }
.legend-item:nth-child(2) .legend-item__label::before { .legend-item:nth-child(1) .legend-item__label::before {
background: #12fff5; background: #12fff5;
} }
.legend-item:nth-child(2) .legend-item__value { .legend-item:nth-child(1) .legend-item__value {
color: #12fff5; color: #12fff5;
} }
.legend-item:nth-child(1) .legend-item__label::before { .legend-item:nth-child(2) .legend-item__label::before {
background: #0f65ff; background: #0f65ff;
} }
.legend-item:nth-child(1) .legend-item__value { .legend-item:nth-child(2) .legend-item__value {
color: #0f65ff; color: #0f65ff;
} }

View File

@ -1,10 +1,3 @@
<!--
* @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
@ -49,13 +42,13 @@ export default {
return { return {
factoryId: 4, // factoryId: 4, //
cityOptions: [ cityOptions: [
// "", "成都",
"邯郸", "邯郸",
// "", "株洲",
"瑞昌", "瑞昌",
// "", "佳木斯",
// "", "凯盛光伏",
// "", "蚌埠兴科",
], ],
}; };
}, },

View File

@ -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-31 16:16:16 * @LastEditTime: 2024-05-28 08:42:36
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -54,12 +54,12 @@ export default {
return { return {
factoryId: 4, // factoryId: 4, //
cityOptions: [ cityOptions: [
// "", "成都",
"邯郸", "邯郸",
// "", "株洲",
// "", "佳木斯",
// "", "凯盛光伏",
// "", "蚌埠兴科",
], ],
}; };
}, },

View File

@ -80,9 +80,15 @@ export default ({
}, },
}, },
{ {
value:currentSum == 0 value:
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 },
@ -125,7 +131,10 @@ export default ({
}, },
}, },
{ {
value:previousSum == 0 value:
targetSum > previousSum
? targetSum - previousSum
: previousSum == 0
? 1 ? 1
: 0, : 0,
name: "-", name: "-",

View File

@ -1,10 +1,3 @@
<!--
* @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
@ -31,10 +24,7 @@ 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" },

View File

@ -23,9 +23,7 @@ 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" },

View File

@ -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,14 +85,13 @@ export default {
props: {}, props: {},
data() { data() {
return { return {
activeLoc: "2", activeLoc: "1",
}; };
}, },
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 ||

View File

@ -1,10 +1,3 @@
<!--
* @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

View File

@ -1,10 +1,3 @@
<!--
* @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
@ -30,9 +23,7 @@ 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" },

View File

@ -113,16 +113,6 @@ 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,
@ -156,6 +146,11 @@ 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: {

View File

@ -1,10 +1,3 @@
<!--
* @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

View File

@ -25,9 +25,7 @@ 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" },

View File

@ -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: 'factoryData/jmsIndex' }, { x: 67, y: 20, tx: 60, ty: 29, path: 'copilot/jmsIndex' },
// //
// { x: 46, y: 56, tx: 46, ty: 93, path: 'factoryData/cdIndex' }, { x: 46, y: 56,tx:46,ty:93, path: 'copilot/cdIndex' },
// 1 // 1
// { x: 60, y: 52, tx: 35.5, ty: 48.3, path: 'factoryData/bbIndex' }, { x: 60, y: 52, tx: 35.5, ty: 48.3, path: 'copilot/bbIndex' },
// 2 // 2
// { x: 61, y: 53, tx: 39, ty: 68, path: 'factoryData/ksIndex' }, { x: 61, y: 53,tx:39,ty:68, path: 'copilot/ksIndex' },
// 西 // 西
{ x: 60, y: 58, tx: 68, ty: 52, path: 'factoryData/factory-data' }, { x: 60, y: 58, tx: 68, ty: 52, path: 'copilot/factory-data' },
// //
// { x: 56, y: 60, tx: 60, ty: 95, path: 'factoryData/zzIndex' }, { x: 56, y: 60, tx: 60, ty: 95, path: 'copilot/zzIndex' },
// //
{ x: 58, y: 45, tx: 47, ty: 34, path: 'factoryData/hdIndex' }, { x: 58, y: 45, tx: 47, ty: 34, path: 'copilot/hdIndex' },
]; ];
export default { export default {
@ -213,41 +213,39 @@ export default {
{ label: "标准组件产出", value: 0 }, // Math.floor(Math.random() * 1000000) }, { label: "标准组件产出", value: 0 }, // Math.floor(Math.random() * 1000000) },
], ],
}; };
if if (position === LOCATIONS[0]) {
// (position === LOCATIONS[0]) { templateInfo.companyName = "佳木斯中建材";
// templateInfo.companyName = ""; this.jmsHintPosition = position;
// this.jmsHintPosition = position; templateInfo.items[0].value = this.homeStore.ftoInvest.current[3];
// templateInfo.items[0].value = this.homeStore.ftoInvest.current[3]; templateInfo.items[2].value = this.homeStore.chipInvest.current[3];
// templateInfo.items[2].value = this.homeStore.chipInvest.current[3]; templateInfo.items[1].value = this.homeStore.chipOutput.current[3];
// templateInfo.items[1].value = this.homeStore.chipOutput.current[3]; templateInfo.items[3].value = this.homeStore.stdOutput.current[3];
// templateInfo.items[3].value = this.homeStore.stdOutput.current[3]; this.jmsInfo = templateInfo;
// this.jmsInfo = templateInfo; } else if (position === LOCATIONS[1]) {
// } else if (position === LOCATIONS[1]) { this.cdHintPosition = position;
// this.cdHintPosition = position; templateInfo.companyName = "成都中建材";
// templateInfo.companyName = ""; templateInfo.items[0].value = this.homeStore.ftoInvest?.current[4];
// templateInfo.items[0].value = this.homeStore.ftoInvest?.current[4]; templateInfo.items[2].value = this.homeStore.chipInvest.current[4];
// templateInfo.items[2].value = this.homeStore.chipInvest.current[4]; templateInfo.items[1].value = this.homeStore.chipOutput.current[4];
// templateInfo.items[1].value = this.homeStore.chipOutput.current[4]; templateInfo.items[3].value = this.homeStore.stdOutput.current[4];
// templateInfo.items[3].value = this.homeStore.stdOutput.current[4]; this.cdInfo = templateInfo;
// this.cdInfo = templateInfo; } else if (position === LOCATIONS[2]) {
// } else if (position === LOCATIONS[2]) { this.bbHintPosition = position;
// this.bbHintPosition = position; templateInfo.companyName = "蚌埠兴科";
// templateInfo.companyName = ""; templateInfo.items[0].value = this.homeStore.ftoInvest?.current[6];
// templateInfo.items[0].value = this.homeStore.ftoInvest?.current[6]; templateInfo.items[2].value = this.homeStore.chipInvest.current[6];
// templateInfo.items[2].value = this.homeStore.chipInvest.current[6]; templateInfo.items[1].value = this.homeStore.chipOutput?.current[6];
// templateInfo.items[1].value = this.homeStore.chipOutput?.current[6]; templateInfo.items[3].value = this.homeStore.stdOutput.current[6];
// templateInfo.items[3].value = this.homeStore.stdOutput.current[6]; this.bbInfo = templateInfo;
// this.bbInfo = templateInfo; } else if (position === LOCATIONS[3]) {
// } else if (position === LOCATIONS[3]) { this.ksHintPosition = position;
// this.ksHintPosition = position; templateInfo.companyName = "凯盛光伏";
// templateInfo.companyName = ""; templateInfo.items[0].value = this.homeStore.ftoInvest?.current[5];
// templateInfo.items[0].value = this.homeStore.ftoInvest?.current[5]; templateInfo.items[2].value = this.homeStore.chipInvest.current[5];
// templateInfo.items[2].value = this.homeStore.chipInvest.current[5]; templateInfo.items[1].value = this.homeStore.chipOutput.current[5];
// templateInfo.items[1].value = this.homeStore.chipOutput.current[5]; templateInfo.items[3].value = this.homeStore.stdOutput.current[5];
// templateInfo.items[3].value = this.homeStore.stdOutput.current[5]; this.ksInfo = templateInfo;
// this.ksInfo = templateInfo; } else if (position === LOCATIONS[4]) {
// }
(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];
@ -255,15 +253,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[1]) { } else if (position === LOCATIONS[6]) {
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];