From dc1675c02f238ac98170c49ec0493ba5eba4017c Mon Sep 17 00:00:00 2001 From: shaoyong Date: Fri, 19 Apr 2024 10:19:35 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/quality/qcInventory/index.vue | 18 +++++++++--------- src/views/quality/qcMarket/index.vue | 8 ++++---- src/views/quality/qcWarehousing/index.vue | 14 ++++++++++---- src/views/quality/unqualified/index.vue | 7 +++++-- src/views/system/datasource/index.vue | 5 ++++- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/views/quality/qcInventory/index.vue b/src/views/quality/qcInventory/index.vue index c80efba..860481a 100644 --- a/src/views/quality/qcInventory/index.vue +++ b/src/views/quality/qcInventory/index.vue @@ -184,7 +184,7 @@ - + - + - + @@ -265,7 +265,7 @@ - + @@ -284,7 +284,7 @@ - + @@ -388,7 +388,7 @@ export default { // 表单校验 rules: { checkType:[ - { required: true, message: "检验类型不能为空", trigger: "blur" } + { required: true, message: "检验类型不能为空", trigger: "blur" } ], incomeBatchNo: [ { required: true, message: "批次号不能为空", trigger: "blur" } @@ -452,12 +452,12 @@ export default { /** 查询库存检验列表 */ getList() { this.loading = true; - + console.log("--------"+this.queryParams) if(this.queryParams.incomeTimeArray!=null && this.queryParams.incomeTimeArray.length>0){ this.queryParams.incomeTimeStart = moment(this.queryParams.incomeTimeArray[0]).format('YYYY-MM-DD HH:mm:ss'); this.queryParams.incomeTimeEnd = moment(this.queryParams.incomeTimeArray[1]).format('YYYY-MM-DD HH:mm:ss'); }else{ - this.queryParams.incomeTimeStart = null; + this.queryParams.incomeTimeStart = null; this.queryParams.incomeTimeEnd = null; } @@ -619,7 +619,7 @@ export default { this.form.supplierCode = obj.code; this.form.supplierName = obj.name; }, - + /**人员选择弹出框**/ handleSelectUser() { this.$refs.itemSelectUser.showFlag = true; diff --git a/src/views/quality/qcMarket/index.vue b/src/views/quality/qcMarket/index.vue index 3e3d01e..95be25d 100644 --- a/src/views/quality/qcMarket/index.vue +++ b/src/views/quality/qcMarket/index.vue @@ -185,7 +185,7 @@ - + 0){ + if(this.queryParams.incomeTimeArray != null && this.queryParams.incomeTimeArray.length>0){ this.queryParams.incomeTimeStart = moment(this.queryParams.incomeTimeArray[0]).format('YYYY-MM-DD HH:mm:ss'); this.queryParams.incomeTimeEnd = moment(this.queryParams.incomeTimeArray[1]).format('YYYY-MM-DD HH:mm:ss'); - } + }else{ + this.queryParams.incomeTimeStart = null; + this.queryParams.incomeTimeEnd = null; + } - if(this.queryParams.checkTimeArray.length>0){ + if(this.queryParams.checkTimeArray != null && this.queryParams.checkTimeArray.length>0){ this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss'); this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss'); - } + }else{ + this.queryParams.checkTimeStart = null; + this.queryParams.checkTimeEnd = null; + } listWarehousing(this.queryParams).then(response => { this.warehousingList = response.rows; diff --git a/src/views/quality/unqualified/index.vue b/src/views/quality/unqualified/index.vue index a5c6ae8..78be986 100644 --- a/src/views/quality/unqualified/index.vue +++ b/src/views/quality/unqualified/index.vue @@ -389,10 +389,13 @@ export default { getList() { this.loading = true; - if(this.queryParams.checkTimeArray.length>0){ + if(this.queryParams.checkTimeArray != null && this.queryParams.checkTimeArray.length>0){ this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss'); this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss'); - } + }else { + this.queryParams.checkTimeStart = null; + this.queryParams.checkTimeEnd = null; + } listUnqualified(this.queryParams).then(response => { this.unqualifiedList = response.rows; diff --git a/src/views/system/datasource/index.vue b/src/views/system/datasource/index.vue index 13a7aa1..5aea8d8 100644 --- a/src/views/system/datasource/index.vue +++ b/src/views/system/datasource/index.vue @@ -128,7 +128,7 @@ - + + + + From e53cf8b53764f52ad34d4574fba4b65b7f562c40 Mon Sep 17 00:00:00 2001 From: "LAPTOP-R6EHHS26\\86155" <2217640373@qq.com> Date: Fri, 19 Apr 2024 16:19:23 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E7=BA=BF=E6=9D=A1=E7=9C=8B=E6=9D=BF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/kanban/Packagingline.js | 8 + src/router/index.js | 2 +- src/views/kanban/Packagingline/index2.vue | 1559 +++++++++++++++++++++ 3 files changed, 1568 insertions(+), 1 deletion(-) create mode 100644 src/views/kanban/Packagingline/index2.vue diff --git a/src/api/kanban/Packagingline.js b/src/api/kanban/Packagingline.js index 832925c..9041e47 100644 --- a/src/api/kanban/Packagingline.js +++ b/src/api/kanban/Packagingline.js @@ -30,4 +30,12 @@ export function getProductionLineInfo(data) { method: 'post', data: data }); +} +// 产线信息 +export function getPorOrderList(data) { + return request({ + url: '/mes/mesborad/getPorOrderList', + method: 'post', + data: data + }); } \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 0bae369..5ce0f2d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -135,7 +135,7 @@ export const constantRoutes = [ // 包装线产线生产看板 { path: "/kanban/Packagingline", - component: () => import("@/views/kanban/Packagingline/index"), + component: () => import("@/views/kanban/Packagingline/index2"), hidden: true, }, diff --git a/src/views/kanban/Packagingline/index2.vue b/src/views/kanban/Packagingline/index2.vue new file mode 100644 index 0000000..9a4f90b --- /dev/null +++ b/src/views/kanban/Packagingline/index2.vue @@ -0,0 +1,1559 @@ + + + + From d2e39751340a765f9f9cf06d655fde85d2eb989f Mon Sep 17 00:00:00 2001 From: "LAPTOP-R6EHHS26\\86155" <2217640373@qq.com> Date: Fri, 19 Apr 2024 16:38:59 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8C=85=E8=A3=85?= =?UTF-8?q?=E7=BA=BF=E6=9D=A1=E7=9C=8B=E6=9D=BF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kanban/Packagingline/index2.vue | 140 +++++++++++++++++++++- 1 file changed, 139 insertions(+), 1 deletion(-) diff --git a/src/views/kanban/Packagingline/index2.vue b/src/views/kanban/Packagingline/index2.vue index 9a4f90b..0402e0f 100644 --- a/src/views/kanban/Packagingline/index2.vue +++ b/src/views/kanban/Packagingline/index2.vue @@ -463,7 +463,7 @@ export default { }); _this.initChart2(); }else{ - _this.initChart2(); + _this.initChart3(); } } @@ -839,6 +839,144 @@ export default { }; myChart5.setOption(option5); }, + initChart3() { + const _this = this; + var data5 = this.piedata; + console.log(data5); + var myChart5 = echarts.init(document.querySelector("#echart5")); + + var option5 = { + tooltip: { + trigger: "item", + formatter: "{a}
{b}: {c} ({d}%)", + }, + color: ["#00E7E5", "#1DBEFF"], + legend: { + left: "left", + orient: "vertical", + bottom: 10, + textStyle: { + color: "black", + padding: [5, 5, 5, -50], + fontWeight: 600, + }, + itemWidth: 50, + itemHeight: 22, + }, + series: [ + { + radius: 120, + name: "巡检", + type: "pie", + labelLine: { + length: 40, + length2: 85, + }, + itemStyle: { + borderWidth: 1, + shadowBlur: 20, + shadowOffsetY: 5, + }, + center: ["50%", "55%"], + avoidLabelOverlap: true, + + data: [ + { + value: + data5[0] && data5[0].name == "合格" ? data5[0].value : 0, + name: + data5[0] && data5[0].name == "合格" ? data5[0].name : "合格", + selected: true, + itemStyle: { + color: "#129E92", + borderColor: "#3FFFE2", + shadowColor: "rgba(63, 255, 226, 0.5)", + }, + labelLine: { + lineStyle: { + color: "#00EAE8", + }, + }, + label: { + formatter: "{e|}\n{a|}{b|{c}%}{c|}", + rich: { + a: { + padding: -33, + }, + c: { + padding: [5, 0], + lineHeight: 60, + verticalAlign: "top", + backgroundColor: "#00EAE8", + }, + b: { + color: "#00E7E5", + backgroundColor: "rgba(63, 255, 226, 0.2)", + height: 19, + width: 40, + borderRadius: 0, + padding: [5, 25], + verticalAlign: "top", + }, + e: { + padding: -10, + }, + }, + }, + }, + { + value: + data5[1] && data5[1].name == "不合格" ? data5[1].value : 0, + name: + data5[1] && data5[1].name == "不合格" + ? data5[1].name + : "不合格", + itemStyle: { + color: "#105BA4", + borderColor: "#31B4FF", + shadowColor: "rgba(49, 180, 255, 0.8)", + }, + labelLine: { + lineStyle: { + color: "#07D2FF", + }, + }, + label: { + + formatter: "{e|}\n{c|}{b|{c}%}{a|}", + rich: { + c: { + + padding: [5, 0], + lineHeight: 60, + verticalAlign: "top", + backgroundColor: "#07D2FF", + }, + a: { + padding: -33, + }, + b: { + color: "#1DBEFF", + backgroundColor: "rgba(49, 180, 255, 0.2)", + height: 19, + width: 20, + borderRadius: 0, + padding: [5, 25], + align: "right", + verticalAlign: "top", + }, + e: { + padding: -10, + }, + }, + }, + }, + ], + }, + ], + }; + myChart5.setOption(option5); + }, //左侧第一个选择类型下拉框 回调函数 }, }; From df2dd96c2abc842a895b553b8f1312fa6323c641 Mon Sep 17 00:00:00 2001 From: shaoyong Date: Fri, 19 Apr 2024 16:50:27 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E4=B8=8D=E8=89=AF=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/quality/defectType/index.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/views/quality/defectType/index.vue b/src/views/quality/defectType/index.vue index 00f0e39..de19815 100644 --- a/src/views/quality/defectType/index.vue +++ b/src/views/quality/defectType/index.vue @@ -95,6 +95,7 @@ + @@ -155,6 +156,9 @@ + + + @@ -245,6 +249,15 @@ export default { form: {}, // 表单校验 rules: { + defectType: [ + { required: true, message: "请选择不良类型", trigger: "blur" } + ], + defectSubclass: [ + { required: true, message: "请输入不良名称", trigger: "blur" } + ], + ratio: [ + { required: true, pattern: /^(0(?:\.\d{1,2})?|1(?:\.0{0,2})?)$/ ,message: "请输入(0-1)之间的两位小数", trigger: "blur" } + ], } }; }, @@ -366,9 +379,8 @@ export default { } } } - this.$modal.confirm('是否确认删除不良类型维护编号为"' + defectCodes + '"的数据项?').then(function() { - return deldefectType(defectIds); + return delDefectType(defectIds); }).then(() => { this.getList(); this.$modal.msgSuccess("删除成功"); From 5511640c43772a8240de3c7b14290423c3f6ae48 Mon Sep 17 00:00:00 2001 From: "LAPTOP-R6EHHS26\\86155" <2217640373@qq.com> Date: Mon, 22 Apr 2024 15:35:38 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/kanban/quality.js | 2 +- src/api/mes/reportWork.js | 24 ++- src/views/dashboard/DeviceChartLine.vue | 2 +- src/views/dashboard/LineChart copy.vue | 136 ------------- src/views/dashboard/LineChart.vue | 3 +- src/views/dashboard/LineChartshadow.vue | 203 +++++++++++++++++++ src/views/dashboard/PieChart3.vue | 208 +++++++++++++++++++ src/views/dashboard/QcChartLine.vue | 7 +- src/views/dashboard/crossBarChart.vue | 189 +++++++++++++++++ src/views/index.vue | 258 +++++++++++++++++++++--- src/views/register.vue | 2 +- 11 files changed, 864 insertions(+), 170 deletions(-) delete mode 100644 src/views/dashboard/LineChart copy.vue create mode 100644 src/views/dashboard/LineChartshadow.vue create mode 100644 src/views/dashboard/PieChart3.vue create mode 100644 src/views/dashboard/crossBarChart.vue diff --git a/src/api/kanban/quality.js b/src/api/kanban/quality.js index 4e9d7c0..8354510 100644 --- a/src/api/kanban/quality.js +++ b/src/api/kanban/quality.js @@ -93,4 +93,4 @@ export function getMonthOfYearContrast(data) { method: 'post', data: data }); -} \ No newline at end of file +} diff --git a/src/api/mes/reportWork.js b/src/api/mes/reportWork.js index 065bce6..cfa39b2 100644 --- a/src/api/mes/reportWork.js +++ b/src/api/mes/reportWork.js @@ -81,7 +81,29 @@ export function getLineChartData() { method: 'get' }); } - +// 首页-各线体当日计划产量(横向柱状图) +export function getLineProData(data) { + return request({ + url: '/mes/reportWork/getLineProData', + method: 'post', + params: data + }); +} +// 首页-当月各日实际产量(单折线图, +export function getMonthProData() { + return request({ + url: '/mes/reportWork/getMonthProData', + method: 'get', + }); +} +// 首页-当日产品产量(饼图) +export function getProductProData(data) { + return request({ + url: '/mes/reportWork/getProductProData', + method: 'post', + params: data, + }); +} // 获取组线每月设备故障数 export function getGroupLineEquInfo() { return request({ diff --git a/src/views/dashboard/DeviceChartLine.vue b/src/views/dashboard/DeviceChartLine.vue index 7ee9507..934b8cf 100644 --- a/src/views/dashboard/DeviceChartLine.vue +++ b/src/views/dashboard/DeviceChartLine.vue @@ -1,7 +1,7 @@ diff --git a/src/views/dashboard/LineChart copy.vue b/src/views/dashboard/LineChart copy.vue deleted file mode 100644 index 8e00258..0000000 --- a/src/views/dashboard/LineChart copy.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - diff --git a/src/views/dashboard/LineChart.vue b/src/views/dashboard/LineChart.vue index 5945501..d035232 100644 --- a/src/views/dashboard/LineChart.vue +++ b/src/views/dashboard/LineChart.vue @@ -30,7 +30,8 @@ }, chartData: { type: Object, - required: true + required: true, + default: {}, } }, data() { diff --git a/src/views/dashboard/LineChartshadow.vue b/src/views/dashboard/LineChartshadow.vue new file mode 100644 index 0000000..2b1d27a --- /dev/null +++ b/src/views/dashboard/LineChartshadow.vue @@ -0,0 +1,203 @@ + + + diff --git a/src/views/dashboard/PieChart3.vue b/src/views/dashboard/PieChart3.vue new file mode 100644 index 0000000..6eb9d3b --- /dev/null +++ b/src/views/dashboard/PieChart3.vue @@ -0,0 +1,208 @@ + + + diff --git a/src/views/dashboard/QcChartLine.vue b/src/views/dashboard/QcChartLine.vue index 20f1032..f95ee8c 100644 --- a/src/views/dashboard/QcChartLine.vue +++ b/src/views/dashboard/QcChartLine.vue @@ -1,7 +1,7 @@ @@ -26,7 +26,7 @@ }, height: { type: String, - default: '260px' + default: '230px' }, autoResize: { type: Boolean, @@ -34,7 +34,8 @@ }, chartData: { type: Object, - required: true + required: true, + default: {}, } }, data() { diff --git a/src/views/dashboard/crossBarChart.vue b/src/views/dashboard/crossBarChart.vue new file mode 100644 index 0000000..e4b0af3 --- /dev/null +++ b/src/views/dashboard/crossBarChart.vue @@ -0,0 +1,189 @@ + + + diff --git a/src/views/index.vue b/src/views/index.vue index 0fcfcd1..34fb5f0 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,17 +1,72 @@ -