update home

This commit is contained in:
DESKTOP-FUDKNA8\znjsz 2024-04-18 16:33:16 +08:00
parent 72eb06bb2d
commit 53ec6dacd5
2 changed files with 38 additions and 8 deletions

View File

@ -215,15 +215,12 @@ export default {
) { ) {
options.series[1].data[0].value = 0; options.series[1].data[0].value = 0;
options.series[1].data[1].value = 100; options.series[1].data[1].value = 100;
// options.series[2].data[0].value = 0;
} else { } else {
options.series[1].data[0].value = this.output.current; options.series[1].data[0].value = this.output.current;
options.series[1].data[1].value = options.series[1].data[1].value =
this.output.target - this.output.current; this.output.target - this.output.current;
// options.series[2].data[0].value = this.output.previous;
} }
// //
console.log("output---", this.output);
if (this.output.previous == 0) { if (this.output.previous == 0) {
options.series[2].data[0].value = 0; options.series[2].data[0].value = 0;
options.series[2].data[1].value = 100; options.series[2].data[1].value = 100;

View File

@ -82,6 +82,8 @@ const LOCATIONS = [
{ x: 60, y: 58 }, { x: 60, y: 58 },
// //
{ x: 56, y: 60 }, { x: 56, y: 60 },
//
{ x: 58, y: 45 },
]; ];
export default { export default {
@ -108,7 +110,7 @@ export default {
}; };
}, },
mounted() { mounted() {
this.$store.dispatch('copilot/initHome'); this.$store.dispatch("copilot/initHome");
this.$nextTick(() => { this.$nextTick(() => {
this.initPins(); this.initPins();
@ -143,29 +145,60 @@ export default {
this.hintPosition = null; this.hintPosition = null;
}, },
showHint(position) { showHint(position) {
const homeStore = this.$store.getters.home;
this.hintPosition = position; this.hintPosition = position;
const templateInfo = { const templateInfo = {
companyName: "", companyName: "",
items: [ items: [
{ label: "FTO投入", value: Math.floor(Math.random() * 1000000) }, { label: "FTO投入", value: 0 }, // Math.floor(Math.random() * 1000000) },
{ label: "芯片产出", value: Math.floor(Math.random() * 10000000) }, { label: "芯片产出", value: 0 }, // Math.floor(Math.random() * 10000000) },
{ label: "芯片投入", value: Math.floor(Math.random() * 1000000) }, { label: "芯片投入", value: 0 }, // Math.floor(Math.random() * 1000000) },
{ label: "标准组件产出", value: Math.floor(Math.random() * 1000000) }, { label: "标准组件产出", value: 0 }, // Math.floor(Math.random() * 1000000) },
], ],
}; };
if (position === LOCATIONS[0]) { if (position === LOCATIONS[0]) {
templateInfo.companyName = "佳木斯中建材光电材料有限公司"; templateInfo.companyName = "佳木斯中建材光电材料有限公司";
templateInfo.items[0].value = homeStore.ftoInvest.current[3];
templateInfo.items[2].value = homeStore.chipInvest.current[3];
templateInfo.items[1].value = homeStore.chipOutput.current[3];
templateInfo.items[3].value = homeStore.stdOutput.current[3];
} else if (position === LOCATIONS[1]) { } else if (position === LOCATIONS[1]) {
templateInfo.companyName = "成都中建材光电材料有限公司"; templateInfo.companyName = "成都中建材光电材料有限公司";
templateInfo.items[0].value = homeStore.ftoInvest.current[4];
templateInfo.items[2].value = homeStore.chipInvest.current[4];
templateInfo.items[1].value = homeStore.chipOutput.current[4];
templateInfo.items[3].value = homeStore.stdOutput.current[4];
} else if (position === LOCATIONS[2]) { } else if (position === LOCATIONS[2]) {
templateInfo.companyName = "蚌埠兴科玻璃有限公司"; templateInfo.companyName = "蚌埠兴科玻璃有限公司";
templateInfo.items[0].value = homeStore.ftoInvest.current[6];
templateInfo.items[2].value = homeStore.chipInvest.current[6];
templateInfo.items[1].value = homeStore.chipOutput.current[6];
templateInfo.items[3].value = homeStore.stdOutput.current[6];
} else if (position === LOCATIONS[3]) { } else if (position === LOCATIONS[3]) {
templateInfo.companyName = "凯盛光伏材料有限公司(本部)"; templateInfo.companyName = "凯盛光伏材料有限公司(本部)";
templateInfo.items[0].value = homeStore.ftoInvest.current[5];
templateInfo.items[2].value = homeStore.chipInvest.current[5];
templateInfo.items[1].value = homeStore.chipOutput.current[5];
templateInfo.items[3].value = homeStore.stdOutput.current[5];
} else if (position === LOCATIONS[4]) { } else if (position === LOCATIONS[4]) {
templateInfo.companyName = "瑞昌中建材光电材料有限公司"; templateInfo.companyName = "瑞昌中建材光电材料有限公司";
templateInfo.items[0].value = homeStore.ftoInvest.current[0];
templateInfo.items[2].value = homeStore.chipInvest.current[0];
templateInfo.items[1].value = homeStore.chipOutput.current[0];
templateInfo.items[3].value = homeStore.stdOutput.current[0];
} else if (position === LOCATIONS[5]) { } else if (position === LOCATIONS[5]) {
templateInfo.companyName = "中建材(株洲)光电材料有限公司"; templateInfo.companyName = "中建材(株洲)光电材料有限公司";
templateInfo.items[0].value = homeStore.ftoInvest.current[2];
templateInfo.items[2].value = homeStore.chipInvest.current[2];
templateInfo.items[1].value = homeStore.chipOutput.current[2];
templateInfo.items[3].value = homeStore.stdOutput.current[2];
} else if (position === LOCATIONS[6]) {
templateInfo.companyName = "中建材(邯郸)光电材料有限公司";
templateInfo.items[0].value = homeStore.ftoInvest.current[1];
templateInfo.items[2].value = homeStore.chipInvest.current[1];
templateInfo.items[1].value = homeStore.chipOutput.current[1];
templateInfo.items[3].value = homeStore.stdOutput.current[1];
} }
this.info = templateInfo; this.info = templateInfo;