diff --git a/.env.dev b/.env.dev index 1e1219a..f6c259c 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ ### # @Author: zhp # @Date: 2024-04-28 13:42:51 - # @LastEditTime: 2024-06-19 16:04:10 + # @LastEditTime: 2024-06-19 16:05:46 # @LastEditors: DY # @Description: ### @@ -14,6 +14,9 @@ VUE_APP_TITLE = 发电玻璃智能管控平台 # 芋道管理系统/开发环境 # VUE_APP_BASE_API = 'http://192.168.1.70:30307' VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com' +# 闫阳 +# VUE_APP_BASE_API = 'http://192.168.1.81:48080' +# 徐 # VUE_APP_BASE_API = 'http://192.168.1.56:48080' # 郭 # VUE_APP_BASE_API = 'http://192.168.1.61:48080' diff --git a/src/api/report/benchmarking.js b/src/api/report/benchmarking.js new file mode 100644 index 0000000..b863bbd --- /dev/null +++ b/src/api/report/benchmarking.js @@ -0,0 +1,127 @@ +// 对标报表的接口 +import request from '@/utils/request' + +// 产量对标FTO +export function fTOReportByDateRangePage(data) { + return request({ + url: '/ip/prod-output/queryOBFTOReportByDateRange', + method: 'post', + data: data + }) +} +// 产量对标FTO导出 +export function fTOReportByDateRangeExport(data) { + return request({ + url: '/ip/prod-output/queryOBFTOReportByDateRangeExcel', + method: 'post', + responseType: 'blob', + data: data + }) +} + +// 芯片产量对标 +export function cPReportByDateRangePage(data) { + return request({ + url: '/ip/prod-output/queryCPReportByDateRange', + method: 'post', + data: data + }) +} +// 芯片产量对标导出 +export function cPReportByDateRangeExport(data) { + return request({ + url: '/ip/prod-output/queryCPReportByDateRangeExport', + method: 'post', + responseType: 'blob', + data: data + }) +} + +// 标准组件产量对标 +export function sCPReportByDateRangePage(data) { + return request({ + url: '/ip/prod-output/querySCPReportByDateRange', + method: 'post', + data: data + }) +} +// 标准组件产量对标导出 +export function sCPReportByDateRangeExport(data) { + return request({ + url: '/ip/prod-output/querySCPReportByDateRangeExport', + method: 'post', + responseType: 'blob', + data: data + }) +} +// 稼动率对标 +export function utilzationComparePage(data) { + return request({ + url: '/ip/utilzation-compare/page', + method: 'post', + data: data + }) +} +// 稼动率对标导出 +export function utilzationCompareExport(data) { + return request({ + url: '/ip/utilzation-compare/export-excel', + method: 'post', + responseType: 'blob', + data: data + }) +} + +// 芯片OEE对标 +export function chipoeeComparePage(data) { + return request({ + url: '/ip/chipoee-compare/page', + method: 'post', + data: data + }) +} +// 芯片OEE对标导出 +export function chipoeeCompareExport(data) { + return request({ + url: '/ip/chipoee-compare/export-excel', + method: 'post', + responseType: 'blob', + data: data + }) +} + +// 封装OEE对标 +export function componentOEEPage(data) { + return request({ + url: '/ip/component-oee/page', + method: 'post', + data: data + }) +} +// 封装OEE对标导出 +export function componentOEEExport(data) { + return request({ + url: '/ip/component-oee/export', + method: 'post', + responseType: 'blob', + data: data + }) +} + +// 芯片人均产量 +export function chipAnnualAverageProductionPage(data) { + return request({ + url: '/ip/chip-annual-average-production/page', + method: 'post', + data: data + }) +} +// 芯片人均产量导出 +export function chipAnnualAverageProductionExport(data) { + return request({ + url: '/ip/chip-annual-average-production/export', + method: 'post', + responseType: 'blob', + data: data + }) +} \ No newline at end of file diff --git a/src/api/report/index.js b/src/api/report/index.js index 243341e..8571ad5 100644 --- a/src/api/report/index.js +++ b/src/api/report/index.js @@ -1,7 +1,7 @@ /* * @Author: zhp * @Date: 2024-06-17 09:41:03 - * @LastEditTime: 2024-06-17 09:54:26 + * @LastEditTime: 2024-06-18 13:47:36 * @LastEditors: zhp * @Description: */ @@ -13,3 +13,11 @@ export function getComprehensiveDataPage(data) { params: data }) } + +export function getProduceTransData(data) { + return request({ + url: 'ip/prod-output/queryYCEReportByDateRange', + method: 'post', + data: data + }) +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index f3c0b35..5b6759d 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -232,6 +232,8 @@ aside { background-color: #d9d9d9; } +// 大屏滚动表格 + .no-data-bg { position: absolute; display: inline-block; @@ -252,3 +254,13 @@ aside { letter-spacing: 1px; } } + +.dv-scroll-board .rows .ceil, +.dv-scroll-board .header .header-item { + border-right: 1px solid rgba(13, 23, 40, 1); +} + +.dv-scroll-board .rows .ceil:last-child, +.dv-scroll-board .header .header-item:last-child { + border-right: none; +} diff --git a/src/store/modules/home.js b/src/store/modules/home.js index cdd0e6f..0d1678d 100644 --- a/src/store/modules/home.js +++ b/src/store/modules/home.js @@ -407,7 +407,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu console.log('prodOutputFtoListRes',preFtoData); // 初始数据 const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init() - if (prodOutputFtoListRes) { + if (prodOutputFtoListRes.length !== 0 ) { for (const factory of prodOutputFtoListRes) { console.log(factory); const fId = getFactoryId(factory); @@ -433,7 +433,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu // } } } - if (preData && preData[0] != null) { + if (preData) { for (const factory of preData) { const fId = getPreFactoryId(factory); if (factory.previousGlassType === 0) { @@ -452,7 +452,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu } } // console.log('ftoInvest',ftoInvest) - if (factoryListResponse && factoryListResponse[0] != null) { + if (factoryListResponse) { for (const factory of factoryListResponse) { const fId = getFactoryId(factory); console.log('factory.inputNumber', factory, fId); diff --git a/src/styles/index.scss b/src/styles/index.scss index 5e425c0..df45f29 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -163,4 +163,4 @@ textarea { .el-upload__tip { line-height: 1.2; -} \ No newline at end of file +} diff --git a/src/views/copilot/components/FactoryDataHeader.vue b/src/views/copilot/components/FactoryDataHeader.vue index 08e42e2..f6d1bfc 100644 --- a/src/views/copilot/components/FactoryDataHeader.vue +++ b/src/views/copilot/components/FactoryDataHeader.vue @@ -107,7 +107,7 @@ export default { gap: 8px; } .factory-header > .menu2 { - width: 26vw; + width: 20vw; display: flex; justify-content: flex-end; align-items: center; diff --git a/src/views/copilot/efficiency/options/chipOptions.js b/src/views/copilot/efficiency/options/chipOptions.js index 23ffef7..3c50d1d 100644 --- a/src/views/copilot/efficiency/options/chipOptions.js +++ b/src/views/copilot/efficiency/options/chipOptions.js @@ -8,7 +8,7 @@ export default ({ preName, }) => ({ grid: { - left: '0%', + left: 300, right: 0, bottom: 0, top: 0, @@ -17,7 +17,7 @@ export default ({ tooltip: {}, title: { text: titleValue, - left: "44%", + left: "48%", top: "37%", textAlign: "center", textStyle: { @@ -39,7 +39,7 @@ export default ({ type: "pie", name: "当前良率", radius: ["70%", "85%"], - center: ["45%", "52%"], + center: ["50%", "52%"], emptyCircleStyle: { color: "#003982", }, @@ -48,7 +48,7 @@ export default ({ { type: "pie", radius: ["70%", "85%"], - center: ["45%", "52%"], + center: ["50%", "52%"], avoidLabelOvervlap: false, label: { show: false, @@ -97,7 +97,7 @@ export default ({ { type: "pie", radius: ["55%", "70%"], - center: ["45%", "52%"], + center: ["50%", "52%"], avoidLabelOvervlap: false, label: { show: false, diff --git a/src/views/copilot/factoryData/components/BarChartBase.vue b/src/views/copilot/factoryData/components/BarChartBase.vue index 534d37e..b54d83c 100644 --- a/src/views/copilot/factoryData/components/BarChartBase.vue +++ b/src/views/copilot/factoryData/components/BarChartBase.vue @@ -73,12 +73,25 @@ export default { }, }, axisLabel: { - // rotate:45, + interval: 0,//设置横坐标为斜 + rotate:45, color: "rgba(255, 255, 255, 0.7)", fontSize: 12, + // formatter: function (value) { + // console.log(value); + + // return value; + // }, }, data: [], }, + // dataZoom: [ + // { + // // show: true, + // start: 0, + // end: 50 + // } + // ], yAxis: { type: "value", name: "单位/片", @@ -92,7 +105,7 @@ export default { }, axisLabel: { color: "rgba(255, 255, 255, 0.7)", - fontSize: 12, + fontSize: 10, }, axisLine: { show: true, @@ -226,9 +239,9 @@ export default { // this.actualOptions = actualOptions; // this.initOptions(actualOptions); // }, - energyCockpits() { - this.initChart(); - }, + // energyCockpits() { + // this.initChart(); + // }, isOpen(val) { this.canvasReset(); }, @@ -263,6 +276,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.targetProduction) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -273,6 +289,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.plannedInvestment) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -282,6 +301,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.actualInvestment) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -291,6 +313,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.actualProduction) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -300,6 +325,9 @@ export default { if (this.energyCockpits) { this.energyCockpits.forEach(ele => { this.data.push(ele.wasteNum) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } @@ -310,6 +338,9 @@ export default { this.energyCockpits.forEach(ele => { console.log(ele.reworkNum); this.data.push(ele.reworkNum) + if (ele.workOrderNumber.length > 4) { + ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + ".."; + } this.orderXAxis.push(ele.workOrderNumber) }); } diff --git a/src/views/copilot/factoryData/components/ChipOee.vue b/src/views/copilot/factoryData/components/ChipOee.vue index 8ed936e..6823a60 100644 --- a/src/views/copilot/factoryData/components/ChipOee.vue +++ b/src/views/copilot/factoryData/components/ChipOee.vue @@ -1,7 +1,7 @@ @@ -173,8 +173,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()); @@ -187,11 +190,11 @@ function getTemplate(period, dataList, than) { if (period === 1 && 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)), }, @@ -199,11 +202,11 @@ function getTemplate(period, dataList, than) { } else if (period ===1 && 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/factoryData/components/Order.vue b/src/views/copilot/factoryData/components/Order.vue index 0219590..9ea4ec6 100644 --- a/src/views/copilot/factoryData/components/Order.vue +++ b/src/views/copilot/factoryData/components/Order.vue @@ -1,7 +1,7 @@