diff --git a/.env.dev b/.env.dev index e077e07..baa8f98 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ ### # @Author: zhp # @Date: 2024-04-28 13:42:51 - # @LastEditTime: 2024-06-14 08:56:41 + # @LastEditTime: 2024-06-17 09:01:32 # @LastEditors: DY # @Description: ### diff --git a/src/assets/images/map.png b/src/assets/images/map.png new file mode 100644 index 0000000..083e44f Binary files /dev/null and b/src/assets/images/map.png differ diff --git a/src/store/modules/home.js b/src/store/modules/home.js index aaa4d21..234fa10 100644 --- a/src/store/modules/home.js +++ b/src/store/modules/home.js @@ -378,10 +378,14 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO transformRate.target[fId] = componentConversionEfficiency } // 芯片OEE - chipOeeRate.current[fId] = factory.oee; + if (factory.glassType === 0) { + chipOeeRate.current[fId] = factory.oee; + } // chipOeeRate.previous[fId] = factory.previousYearOee; // 转化效率 - transformRate.current[fId] = factory.componentConversionEfficiency; + if (factory.glassType === 1) { + transformRate.current[fId] = factory.componentConversionEfficiency; + } // transformRate.previous[fId] = factory.previousYearComponentConversionEfficiency ; // 芯片良率 与 标准组件良率 if (![0, 1].includes(factory.glassType)) continue; @@ -448,8 +452,11 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu if (factoryListResponse && factoryListResponse[0] != null) { for (const factory of factoryListResponse) { const fId = getFactoryId(factory); + console.log('factory.inputNumber', factory, fId); + if (factory.glassType === 0) { + chipInvest.current[fId] = factory.inputNumber + } // const preFId = getPreFactoryId(factory); - // 获取目标值 if (targetListResponse) { const { chipYield, componentYield, bipvProductOutput } = @@ -459,7 +466,6 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu bipvOutput.target[fId] = bipvProductOutput; } // 芯片投入 - chipInvest.current[fId] = factory.inputNumber; // 产出数据, 0 - (玻璃)芯片产出, 1 - 标准组件产出, 2 - BIPV产出 // 因为后端写的垃圾数据,所以这里要做一下判断 @@ -467,6 +473,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType]; _t.current[fId] = factory.outputNumber; } + console.log('chipInvest',chipInvest); return { chipInvest, // ftoInvest, @@ -475,15 +482,6 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu stdOutput, bipvOutput, }; - }else{ - return { - chipInvest, - // ftoInvest, - ftoInvest, - chipOutput, - stdOutput, - bipvOutput, - } } } diff --git a/src/views/copilot/efficiency/components/ChipOee.vue b/src/views/copilot/efficiency/components/ChipOee.vue index f2a0ae4..16c89be 100644 --- a/src/views/copilot/efficiency/components/ChipOee.vue +++ b/src/views/copilot/efficiency/components/ChipOee.vue @@ -47,8 +47,11 @@ export default { legend() { let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -60,13 +63,13 @@ export default { const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `${year-1}年${month}月${today}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${year - 1}年${yesterday}日`, color: "#12f7f1" }, + { label: `${yesterday}日`, color: "#58adfa" }, ]; } else if (this.period === '日' && this.than === '环比') { items = [ - { label: `${yesterday}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${dayBeYes}日`, color: "#12f7f1" }, + { label: `${yesterday}日`, color: "#58adfa" }, ]; } else if (this.period === '周' && this.than === '同比') { items = [ @@ -96,7 +99,7 @@ export default { items = [ { label: `${year - 1}年`, color: "#12f7f1" }, { label: `${year}年`, color: "#58adfa" }, - { label: `${year}年`, color: "#58adfa" }, + { label: `${year}年目标`, color: "#58adfa" }, // { label: `${year}年目标`, value: valueTuple[2] }, ]; @@ -163,8 +166,11 @@ function getTemplate(period, dataList, than) { // console.log('dataList',dataList); let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -177,11 +183,11 @@ function getTemplate(period, dataList, than) { if (period === '日' && than === '同比') { items = [ { - name: `${year-1}年${month}月${today}日`, + name: `${year - 1}年${yesterday}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, @@ -189,11 +195,11 @@ function getTemplate(period, dataList, than) { } else if (period === '日' && than === '环比') { items = [ { - name: `${yesterday}日`, + name: `${dayBeYes}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, diff --git a/src/views/copilot/efficiency/components/TransformRate.vue b/src/views/copilot/efficiency/components/TransformRate.vue index 9c3dc91..04e07f5 100644 --- a/src/views/copilot/efficiency/components/TransformRate.vue +++ b/src/views/copilot/efficiency/components/TransformRate.vue @@ -47,8 +47,11 @@ export default { legend() { let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -60,13 +63,13 @@ export default { const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `${year-1}年${month}月${today}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${year - 1}年${yesterday}日`, color: "#12f7f1" }, + { label: `${yesterday}日`, color: "#58adfa" }, ]; } else if (this.period === '日' && this.than === '环比') { items = [ - { label: `${yesterday}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${dayBeYes}日`, color: "#12f7f1" }, + { label: `${yesterday}日`, color: "#58adfa" }, ]; } else if (this.period === '周' && this.than === '同比') { items = [ @@ -96,7 +99,7 @@ export default { items = [ { label: `${year - 1}年`, color: "#12f7f1" }, { label: `${year}年`, color: "#58adfa" }, - { label: `${year}年`, color: "#58adfa" }, + { label: `${year}年目标`, color: "#58adfa" }, // { label: `${year}年目标`, value: valueTuple[2] }, ]; @@ -154,8 +157,11 @@ function getTemplate(period, dataList,than) { // console.log('dataList',dataList); let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -168,11 +174,11 @@ function getTemplate(period, dataList,than) { if (period === '日' && than === '同比') { items = [ { - name: `${year-1}年${month}月${today}日`, + name: `${year - 1}年${yesterday}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, @@ -180,11 +186,11 @@ function getTemplate(period, dataList,than) { } else if (period === '日' && than === '环比') { items = [ { - name: `${yesterday}日`, + name: `${dayBeYes}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, diff --git a/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue b/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue index 67b2633..c227aef 100644 --- a/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue +++ b/src/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue @@ -1,7 +1,7 @@ diff --git a/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue b/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue index d2959e9..8d90011 100644 --- a/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue +++ b/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue @@ -87,8 +87,11 @@ export default { const vt = this.valueTuple; let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -100,13 +103,13 @@ export default { // const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `${month}月${today}日良率`, }, - { label: `${year-1}年${month}月${today}日良率` }, + { label: `${yesterday}日良率`, }, + { label: `${year - 1}年${yesterday}日良率` }, ]; } else if (this.period === '日' && this.than === '环比') { items = [ - { label: `${month}月${today}日良率` }, { label: `${yesterday}日良率` }, + { label: `${dayBeYes}日良率` }, ]; } else if (this.period === '周' && this.than === '同比') { items = [ @@ -139,7 +142,7 @@ export default { } let titleValue = vt[1] === null ? 0 + '%' : this.formatNumber(vt[1]) + '%', subtitle = { - 日: "本日良率", + 日: "昨日良率", 周: "本周良率", 月: `${month}月良率`, 年: `${year}良率`, @@ -161,8 +164,11 @@ export default { legend() { let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -174,13 +180,13 @@ export default { const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `${year-1}年${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.formatNumber(this.valueTuple[1])) + "%" }, + { label: `${year - 1}年${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" }, + { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, ]; } else if (this.period === '日' && this.than === '环比') { 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.formatNumber(this.valueTuple[1])) + "%" }, + { label: `${dayBeYes}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" }, + { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" }, ]; } else if (this.period === '周' && this.than === '同比') { items = [ diff --git a/src/views/copilot/efficiency/components/sub/std/StdRateItem.vue b/src/views/copilot/efficiency/components/sub/std/StdRateItem.vue index 1a79296..a6d707e 100644 --- a/src/views/copilot/efficiency/components/sub/std/StdRateItem.vue +++ b/src/views/copilot/efficiency/components/sub/std/StdRateItem.vue @@ -1,7 +1,7 @@ @@ -69,16 +69,19 @@ export default { titlePre() { console.log(this.city); var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() const today = new Date().getDate(); 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 === '同比') { - return `${year-1}年${month}月${today}日` + return `${year - 1}年${yesterday}日` } else if (this.period === '日' && this.than === '环比') { - return `${yesterday}日` + return `${dayBeYes}日` } else if (this.period === '周' && this.than === '同比') { return `${year-1}年本周` } else if (this.period === '周' && this.than === '环比') { @@ -93,14 +96,18 @@ export default { }, title() { var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) + var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() const today = new Date().getDate(); const month = new Date().getMonth() + 1; const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { - return `${month}月${today}日` + return `${yesterday}日` } else if (this.period === '日' && this.than === '环比') { - return `${month}月${today}日` + return `${yesterday}日` } else if (this.period === '周' && this.than === '同比') { return `本周` } else if (this.period === '周' && this.than === '环比') { diff --git a/src/views/copilot/factoryData/components/BarChartBase.vue b/src/views/copilot/factoryData/components/BarChartBase.vue index a477920..5bf1725 100644 --- a/src/views/copilot/factoryData/components/BarChartBase.vue +++ b/src/views/copilot/factoryData/components/BarChartBase.vue @@ -36,6 +36,8 @@ export default { isFullscreen: false, actualOptions: null, chart: "", + data: [], + orderXAxis:[], // obj:{ // seriesArr: [], // targetProduceArr: [], @@ -50,7 +52,7 @@ export default { grid: { left: "7%", right: "7%", - bottom: "8%", + bottom: "15%", top: "15%", }, tooltip: { @@ -66,6 +68,7 @@ export default { }, }, axisLabel: { + rotate:45, color: "rgba(255, 255, 255, 0.7)", fontSize: 12, }, @@ -191,7 +194,7 @@ export default { }, watch: { type(val) { - + this.initChart() }, /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */ // isFullscreen(val) { @@ -249,79 +252,62 @@ export default { }, 500)(); }, initChart() { - if (this.chart) { - this.chart.dispose(); - } - this.chart = echarts.init(document.getElementById("factoryEnergyChart")); - const actualOptions = JSON.parse(JSON.stringify(this.options)); if (this.type === '目标产量') { - let orderXAxis = [] - let targetProduceArr = [] + this.orderXAxis = [] + this.data = [] if (this.energyCockpits) { this.energyCockpits.forEach(ele => { - targetProduceArr.push(ele.targetProduction) - orderXAxis.push(ele.workOrderNumber) + this.data.push(ele.targetProduction) + this.orderXAxis.push(ele.workOrderNumber) }); } - actualOptions.xAxis.data = orderXAxis; - actualOptions.series[0].data = targetProduceArr; // this.initChart(targetProduceArr, orderXAxis) } else if (this.type === '计划投入') { - let orderXAxis = [] - let planIn = [] + this.orderXAxis = [] + this.data = [] if (this.energyCockpits) { this.energyCockpits.forEach(ele => { - planIn.push(ele.plannedInvestment) - orderXAxis.push(ele.workOrderNumber) + this.data.push(ele.plannedInvestment) + this.orderXAxis.push(ele.workOrderNumber) }); } - actualOptions.xAxis.data = orderXAxis; - actualOptions.series[0].data = planIn; } else if (this.type === '实际投入') { - let orderXAxis = [] - let acIn = [] + this.orderXAxis = [] + this.data = [] if (this.energyCockpits) { this.energyCockpits.forEach(ele => { - acIn.push(ele.actualInvestment) - orderXAxis.push(ele.workOrderNumber) + this.data.push(ele.actualInvestment) + this.orderXAxis.push(ele.workOrderNumber) }); } - actualOptions.xAxis.data = orderXAxis; - actualOptions.series[0].data = acIn; } else if (this.type === '实际产出') { - let orderXAxis = [] - let acProduceArr = [] + this.orderXAxis = [] + this.data = [] if (this.energyCockpits) { this.energyCockpits.forEach(ele => { - acProduceArr.push(ele.actualProduction) - orderXAxis.push(ele.workOrderNumber) + this.data.push(ele.actualProduction) + this.orderXAxis.push(ele.workOrderNumber) }); } - actualOptions.xAxis.data = orderXAxis; - actualOptions.series[0].data = acProduceArr; } else if (this.type === '废品数量') { - let orderXAxis = [] - let scrapNum = [] + this.orderXAxis = [] + this.data = [] if (this.energyCockpits) { this.energyCockpits.forEach(ele => { - scrapNum.push(ele.wasteNum) - orderXAxis.push(ele.workOrderNumber) + this.data.push(ele.wasteNum) + this.orderXAxis.push(ele.workOrderNumber) }); } - actualOptions.xAxis.data = orderXAxis; - actualOptions.series[0].data = scrapNum; } else if (this.type === '待再加工') { - let orderXAxis = [] - let processNum = [] + this.orderXAxis = [] + this.data = [] if (this.energyCockpits) { this.energyCockpits.forEach(ele => { console.log(ele.reworkNum); - processNum.push(ele.reworkNum) - orderXAxis.push(ele.workOrderNumber) + this.data.push(ele.reworkNum) + this.orderXAxis.push(ele.workOrderNumber) }); } - actualOptions.xAxis.data = orderXAxis; - actualOptions.series[0].data = processNum; } // let seriesArr = [ @@ -370,6 +356,13 @@ export default { // actualOptions.series[1].name = seriesArr[1].name; // actualOptions.series[2].data = seriesArr[2].data; // actualOptions.series[2].name = seriesArr[2].name; + if (this.chart) { + this.chart.dispose(); + } + this.chart = echarts.init(document.getElementById("factoryEnergyChart")); + const actualOptions = JSON.parse(JSON.stringify(this.options)); + actualOptions.xAxis.data = this.orderXAxis; + actualOptions.series[0].data = this.data; this.actualOptions = actualOptions; this.chart.setOption(actualOptions); }, diff --git a/src/views/copilot/factoryData/components/ChipOee.vue b/src/views/copilot/factoryData/components/ChipOee.vue index c555412..a89bef2 100644 --- a/src/views/copilot/factoryData/components/ChipOee.vue +++ b/src/views/copilot/factoryData/components/ChipOee.vue @@ -1,7 +1,7 @@ @@ -49,7 +49,7 @@ export default { computed: { xAxis() { console.log(' this.companyId', this.companyId); - return this.companyId === 0 ? ["fto投入", "芯片产量", "标准组件产量"] : ["fto投入", "芯片产量", "标准组件产量", 'BIPV产量']; + return this.companyId === 0 ? ["FTO投入", "芯片产量", "标准组件产量"] : ["FTO投入", "芯片产量", "标准组件产量", 'BIPV产量']; }, legend() { let items = []; diff --git a/src/views/copilot/factoryData/hdIndex.vue b/src/views/copilot/factoryData/hdIndex.vue index 69bff90..d4bb788 100644 --- a/src/views/copilot/factoryData/hdIndex.vue +++ b/src/views/copilot/factoryData/hdIndex.vue @@ -9,7 +9,7 @@ :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" /> - + @@ -47,6 +47,7 @@ export default { }, data() { return { + type: '目标产量', companyId: 1, companyName: "邯郸中建材光电材料有限公司", period: 1, @@ -75,6 +76,10 @@ export default { this.getMes(); }, methods: { + updateType(val) { + console.log(val) + this.type = val + }, updateCompany(obj) { this.companyId = obj.companyId; this.companyName = obj.companyName; diff --git a/src/views/copilot/yield/components/ChipInvest.vue b/src/views/copilot/yield/components/ChipInvest.vue index dd3033c..3d2b3fc 100644 --- a/src/views/copilot/yield/components/ChipInvest.vue +++ b/src/views/copilot/yield/components/ChipInvest.vue @@ -45,8 +45,11 @@ export default { legend() { let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -58,13 +61,13 @@ export default { const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `${year-1}年${month}月${today}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${year - 1}年${yesterday}日`, color: "#12f7f1" }, + { label: `${yesterday}日`, color: "#58adfa" }, ]; } else if (this.period === '日' && this.than === '环比') { items = [ - { label: `${yesterday}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${dayBeYes}日`, color: "#12f7f1" }, + { label: `${yesterday}日`, color: "#58adfa" }, ]; } else if (this.period === '周' && this.than === '同比') { items = [ @@ -149,8 +152,11 @@ export default { function getTemplate(period, dataList,than) { let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -163,11 +169,11 @@ function getTemplate(period, dataList,than) { if (period === '日' && than === '同比') { items = [ { - name: `${year-1}年${month}月${today}日`, + name: `${year - 1}年${yesterday}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, @@ -175,11 +181,11 @@ function getTemplate(period, dataList,than) { } else if (period === '日' && than === '环比') { items = [ { - name: `${yesterday}日`, + name: `${dayBeYes}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, diff --git a/src/views/copilot/yield/components/FtoInvest.vue b/src/views/copilot/yield/components/FtoInvest.vue index 63184fb..0274af6 100644 --- a/src/views/copilot/yield/components/FtoInvest.vue +++ b/src/views/copilot/yield/components/FtoInvest.vue @@ -45,8 +45,11 @@ export default { legend() { let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -58,13 +61,13 @@ export default { const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `${year-1}年${month}月${today}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${year - 1}年${yesterday}日`, color: "#12f7f1" }, + { label: `${yesterday}日`, color: "#58adfa" }, ]; } else if (this.period === '日' && this.than === '环比') { items = [ - { label: `${yesterday}日`, color: "#12f7f1" }, - { label: `${month}月${today}日`, color: "#58adfa" }, + { label: `${dayBeYes}日`, color: "#12f7f1" }, + { label: `${yesterday}日`, color: "#58adfa" }, ]; } else if (this.period === '周' && this.than === '同比') { items = [ @@ -150,9 +153,15 @@ export default { function getTemplate(period, dataList,than) { let items = []; + // var day1 = new Date(); + // day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + // var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -165,11 +174,11 @@ function getTemplate(period, dataList,than) { if (period === '日' && than === '同比') { items = [ { - name: `${year-1}年${month}月${today}日`, + name: `${year - 1}年${yesterday}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, @@ -177,11 +186,11 @@ function getTemplate(period, dataList,than) { } else if (period === '日' && than === '环比') { items = [ { - name: `${yesterday}日`, + name: `${dayBeYes}日`, data: dataList ? dataList[0] : [], }, { - name: `${month}月${today}日`, + name: `${yesterday}日`, data: dataList ? dataList[1] : [], // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)), }, diff --git a/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue b/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue index ca350e8..a592e46 100644 --- a/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue +++ b/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue @@ -1,7 +1,7 @@ @@ -78,13 +78,13 @@ export default { valueTuple() { // [previousValue, currentValue, sumValue?] const getter = this.$store.getters.copilot.yield[this.dataSourceField]; - if (this.period === "日" || this.period === "周") { - console.log(this.period) - return [ - getter.previous[this.factoryId], - getter.current[this.factoryId], - ]; - } + // if (this.period === "日" || this.period === "周") { + // console.log(this.period) + // return [ + // getter.previous[this.factoryId], + // getter.current[this.factoryId], + // ]; + // } // [100, 200, 200] return [ getter.previous[this.factoryId], @@ -100,8 +100,11 @@ export default { const vt = this.valueTuple; let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -113,14 +116,14 @@ export default { // const year = new Date().getFullYear(); if (this.period === '日' && this.than === '同比') { items = [ - { label: `${month}月${today}日累计`,}, - { label: `${year-1}年${month}月${today}日累计` }, + { label: `${yesterday}日累计`,}, + { label: `${year - 1}年${yesterday}累计` }, { label: `${month}月${today}日目标`, }, ]; } else if (this.period === '日' && this.than === '环比') { items = [ - { label: `${month}月${today}日累计`}, - { label: `${yesterday}日累计` }, + { label: `${yesterday}日累计`}, + { label: `${dayBeYes}日累计` }, { label: `${month}月${today}日目标`, }, ]; } else if (this.period === '周' && this.than === '同比') { @@ -160,9 +163,9 @@ export default { : (vt[1] != 0 && vt[1] != null) && vt[2] == 0 ? "100%" : '0%', subtitle = - 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[2]- this.valueTuple[1]) + this.period == "日" ? `${yesterday}日累计完成值` : this.period == "周" ? `本周累计完成值` : this.period == "月" ? `${month}月累计完成值` : `${year}年累计完成值`; + console.log('titleValue', items) + // console.log(this.valueTuple[2]- this.valueTuple[1]) return getOptions({ titleValue, subtitle, @@ -221,8 +224,12 @@ function calculateItems(period, valueTuple, than) { console.log('valueTuple', valueTuple); let items = []; var day1 = new Date(); - day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000); + var day2 = new Date(); + day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000) + day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000) var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate() + var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate() + //今天的时间 // var day2 = new Date(); // day2.setTime(day2.getTime()); @@ -234,14 +241,14 @@ function calculateItems(period, valueTuple, than) { const year = new Date().getFullYear(); if (period === '日' && than === '同比') { items = [ - { label: `${year-1}年${month}月${today}日累计`, value: valueTuple[0] }, - { label: `${month}月${today}日累计`, value: valueTuple[1] }, + { label: `${year - 1}年${yesterday}累计`, value: valueTuple[0] }, + { label: `${yesterday}累计`, value: valueTuple[1] }, { label: `${month}月${today}日目标`, value: valueTuple[2] }, ]; } else if (period === '日' && than === '环比') { items = [ - { label: `${yesterday}日累计`, value: valueTuple[0] }, - { label: `${month}月${today}日累计`, value: valueTuple[1] }, + { label: `${dayBeYes}日累计`, value: valueTuple[0] }, + { label: `${yesterday}日累计`, value: valueTuple[1] }, { label: `${month}月${today}日目标`, value: valueTuple[2] }, ]; } else if (period === '周' && than === '同比') { diff --git a/src/views/dashboard/charts/ChipYieldChart.vue b/src/views/dashboard/charts/ChipYieldChart.vue index eaf3c35..fc5b61e 100644 --- a/src/views/dashboard/charts/ChipYieldChart.vue +++ b/src/views/dashboard/charts/ChipYieldChart.vue @@ -1,7 +1,7 @@ @@ -221,6 +221,7 @@ export default { }; }, actualOptions() { + console.log('this.output.current / this.output.target', this.output.current/this.output.target); const year = new Date().getFullYear() const options = JSON.parse(JSON.stringify(this.options)); // console.log('options', options); @@ -228,7 +229,7 @@ export default { if (!this.output.target) options.title.text = "0%"; else options.title.text = - (this.output.current / this.output.target) * 100 + "%"; + ((this.output.current / this.output.target).toFixed(2)) * 100 + "%"; // 外环 if ( this.output.current == this.output.target && diff --git a/src/views/dashboard/charts/LeftChartBase.vue b/src/views/dashboard/charts/LeftChartBase.vue index d0e1acd..7ba5c38 100644 --- a/src/views/dashboard/charts/LeftChartBase.vue +++ b/src/views/dashboard/charts/LeftChartBase.vue @@ -59,7 +59,7 @@ export default { actualOptions: null, options: { grid: { - left: "3%", + left: "5%", right: "4%", bottom: "0", top: "15%", diff --git a/src/views/dashboard/charts/RightChartBase.vue b/src/views/dashboard/charts/RightChartBase.vue index 4070b8b..d94f8e1 100644 --- a/src/views/dashboard/charts/RightChartBase.vue +++ b/src/views/dashboard/charts/RightChartBase.vue @@ -1,7 +1,7 @@ @@ -65,7 +65,7 @@ export default { isFullscreen: false, options: { grid: { - left: "3%", + left: "5%", right: "4%", bottom: "0", top: "18%", diff --git a/src/views/login.vue b/src/views/login.vue index 8b646f6..1bef94f 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -10,7 +10,7 @@ style=" position: absolute; top: 12%; - left: 20%; + left: 15%; user-select: none; display: flex; flex-direction: column; @@ -31,7 +31,7 @@

diff --git a/src/views/report/chipOEEBM/index.vue b/src/views/report/chipOEEBM/index.vue new file mode 100644 index 0000000..ff02fc7 --- /dev/null +++ b/src/views/report/chipOEEBM/index.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/src/views/report/chipOutputBM/index.vue b/src/views/report/chipOutputBM/index.vue new file mode 100644 index 0000000..5e2f021 --- /dev/null +++ b/src/views/report/chipOutputBM/index.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/src/views/report/chipPerCapitaBM/index.vue b/src/views/report/chipPerCapitaBM/index.vue new file mode 100644 index 0000000..dfd303c --- /dev/null +++ b/src/views/report/chipPerCapitaBM/index.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/src/views/report/chipYieldBM/index.vue b/src/views/report/chipYieldBM/index.vue new file mode 100644 index 0000000..ba9c677 --- /dev/null +++ b/src/views/report/chipYieldBM/index.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/src/views/report/components/bmLineBar.vue b/src/views/report/components/bmLineBar.vue new file mode 100644 index 0000000..81e4354 --- /dev/null +++ b/src/views/report/components/bmLineBar.vue @@ -0,0 +1,213 @@ + + + diff --git a/src/views/report/components/bmSearchBar.vue b/src/views/report/components/bmSearchBar.vue new file mode 100644 index 0000000..734c363 --- /dev/null +++ b/src/views/report/components/bmSearchBar.vue @@ -0,0 +1,136 @@ + + + diff --git a/src/views/report/components/chartButton.vue b/src/views/report/components/chartButton.vue new file mode 100644 index 0000000..a2c4b1e --- /dev/null +++ b/src/views/report/components/chartButton.vue @@ -0,0 +1,148 @@ + + + + + + + + + diff --git a/src/views/report/components/lineChart.vue b/src/views/report/components/lineChart.vue new file mode 100644 index 0000000..01eec9d --- /dev/null +++ b/src/views/report/components/lineChart.vue @@ -0,0 +1,218 @@ + + + + + + diff --git a/src/views/report/comprehensiveData.vue b/src/views/report/comprehensiveData.vue new file mode 100644 index 0000000..b3a181d --- /dev/null +++ b/src/views/report/comprehensiveData.vue @@ -0,0 +1,460 @@ + + + + + + diff --git a/src/views/report/conversionEfficiencyBM/index.vue b/src/views/report/conversionEfficiencyBM/index.vue new file mode 100644 index 0000000..75bfe95 --- /dev/null +++ b/src/views/report/conversionEfficiencyBM/index.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/src/views/report/ftoOutputBM/index.vue b/src/views/report/ftoOutputBM/index.vue new file mode 100644 index 0000000..bbaf1f9 --- /dev/null +++ b/src/views/report/ftoOutputBM/index.vue @@ -0,0 +1,292 @@ + + + + + diff --git a/src/views/report/packageOEEBM/index.vue b/src/views/report/packageOEEBM/index.vue new file mode 100644 index 0000000..77e8d8c --- /dev/null +++ b/src/views/report/packageOEEBM/index.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/src/views/report/produceConversion.vue b/src/views/report/produceConversion.vue new file mode 100644 index 0000000..8fa9c14 --- /dev/null +++ b/src/views/report/produceConversion.vue @@ -0,0 +1,450 @@ + + + + + + diff --git a/src/views/report/scOutputBM/index.vue b/src/views/report/scOutputBM/index.vue new file mode 100644 index 0000000..f2cc4eb --- /dev/null +++ b/src/views/report/scOutputBM/index.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/src/views/report/scPerCapitaBM/index.vue b/src/views/report/scPerCapitaBM/index.vue new file mode 100644 index 0000000..41922de --- /dev/null +++ b/src/views/report/scPerCapitaBM/index.vue @@ -0,0 +1,244 @@ + + + + + diff --git a/src/views/report/scYieldBM/index.vue b/src/views/report/scYieldBM/index.vue new file mode 100644 index 0000000..b608280 --- /dev/null +++ b/src/views/report/scYieldBM/index.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/src/views/report/turnoverRateBM/index.vue b/src/views/report/turnoverRateBM/index.vue new file mode 100644 index 0000000..9cbadbc --- /dev/null +++ b/src/views/report/turnoverRateBM/index.vue @@ -0,0 +1,283 @@ + + + + +