diff --git a/.env.dev b/.env.dev index 1da25e71..9171993b 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ ### # @Author: Do not edit # @Date: 2023-08-29 09:40:39 - # @LastEditTime: 2023-11-21 10:36:47 + # @LastEditTime: 2024-07-29 15:00:13 # @LastEditors: DY # @Description: ### @@ -14,9 +14,9 @@ VUE_APP_TITLE = MES系统 # 芋道管理系统/开发环境 # VUE_APP_BASE_API = 'http://100.64.0.26:48082' VUE_APP_BASE_API = 'http://192.168.0.33:48082' -# VUE_APP_BASE_API = 'http://192.168.4.173:48080' +# VUE_APP_BASE_API = 'http://192.168.1.164:48082' # VUE_APP_BASE_API = 'http://192.168.2.173:48080' -# VUE_APP_BASE_API = 'http://192.168.1.49:48082' +# VUE_APP_BASE_API = 'http://192.168.1.81:48082' # VUE_APP_BASE_API = 'http://192.168.1.8:48082' # VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.1.56:48082' diff --git a/package.json b/package.json index 556024f1..b51a8bc6 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "crypto-js": "^4.0.0", "diagram-js": "^12.3.0", "echarts": "5.4.0", + "el-tree-transfer": "^2.4.7", "element-ui": "2.15.12", "file-saver": "^2.0.5", "fuse.js": "6.6.2", diff --git a/src/api/base/coreProduct.js b/src/api/base/coreProduct.js index 476a60b5..fa67db60 100644 --- a/src/api/base/coreProduct.js +++ b/src/api/base/coreProduct.js @@ -1,9 +1,9 @@ /* * @Author: Do not edit * @Date: 2023-10-21 11:50:46 - * @LastEditTime: 2023-11-04 10:42:50 - * @LastEditors: DY - * @Description: + * @LastEditTime: 2024-07-08 14:35:17 + * @LastEditors: zwq + * @Description: */ import request from '@/utils/request' @@ -61,7 +61,7 @@ export function getCoreProductPage(query) { // 获得所有列表 export function getCoreProductList(query) { return request({ - url: '/base/core-product/listAll', + url: '/base/core-product-material/listAll', method: 'get', params: query }) @@ -108,4 +108,4 @@ export function getCoreProductAttrPage(query) { method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/api/base/groupClasses.js b/src/api/base/groupClasses.js index bfc626b7..c512d06a 100644 --- a/src/api/base/groupClasses.js +++ b/src/api/base/groupClasses.js @@ -51,6 +51,13 @@ export function getCode() { }) } +// 获得可用的班次列表 +export function listClassesEnabled() { + return request({ + url: '/base/group-classes/listEnable', + method: 'get' + }) +} // 导出班次基础信息 Excel export function exportGroupClassesExcel(query) { return request({ diff --git a/src/api/base/groupSchedulingPlan.js b/src/api/base/groupSchedulingPlan.js new file mode 100644 index 00000000..44743f1b --- /dev/null +++ b/src/api/base/groupSchedulingPlan.js @@ -0,0 +1,125 @@ +import request from '@/utils/request' + +// 创建排班计划配置基础信息 +export function createGroupPlan(data) { + return request({ + url: '/base/group-scheduling-plan/create', + method: 'post', + data: data + }) +} + +// 更新排班计划配置基础信息 +export function updateGroupPlan(data) { + return request({ + url: '/base/group-scheduling-plan/update', + method: 'put', + data: data + }) +} + +// 删除排班计划配置基础信息 +export function deleteGroupPlan(id) { + return request({ + url: '/base/group-scheduling-plan/delete?id=' + id, + method: 'delete' + }) +} + +// 获得排班计划配置基础信息 +export function getGroupPlan(id) { + return request({ + url: '/base/group-scheduling-plan/get?id=' + id, + method: 'get' + }) +} + +// 获得排班计划配置基础信息分页 +export function getGroupPlanPage(query) { + return request({ + url: '/base/group-scheduling-plan/page', + method: 'get', + params: query + }) +} + +// 获得所有排班计划列表 +export function groupPlanList() { + return request({ + url: '/base/group-scheduling-plan/listAll', + method: 'get' + }) +} +// 获得排班计划相关班组列表 +export function groupPlanTeamList(id) { + return request({ + url: '/base/group-scheduling-plan-team/teamListByPlanId?planId=' + id, + method: 'get' + }) +} +// 获得排班计划相关班次列表 +export function groupPlanClassesList(id) { + return request({ + url: '/base/group-scheduling-plan-classes/classesListByPlanId?planId=' + id, + method: 'get' + }) +} +// 获取code +export function getCode() { + return request({ + url: '/base/group-scheduling-plan/getCode', + method: 'get' + }) +} + +// 导出排班计划配置基础信息 Excel +export function exportGroupPlanExcel(query) { + return request({ + url: '/base/group-scheduling-plan/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 获得产线工段树形结构 +export function getGroupPlanTree() { + return request({ + url: '/base/group-scheduling-plan/getLineSectionTree', + method: 'get' + }) +} + +// 创建排班计划产线工段 +export function createGroupPlanLine(data) { + return request({ + url: '/base/group-scheduling-plan-line-section/createPlanLineSection', + method: 'post', + data: data + }) +} + +// 更新排班计划产线工段 +export function updateGroupPlanLine(data) { + return request({ + url: '/base/group-scheduling-plan-line-section/updatePlanLineSection', + method: 'put', + data: data + }) +} + +// 获得排班计划配置基础信息 +export function getGroupPlanLine(id) { + return request({ + url: '/base/group-scheduling-plan-line-section/getLineSectionByPlanId?planId=' + id, + method: 'get' + }) +} + +// 获得当前登录用户所在部门id +export function getLoginUserDeptId() { + return request({ + url: '/base/group-scheduling-plan-line-section/getLoginUserDeptId', + method: 'get' + }) +} diff --git a/src/api/base/groupSchedulingRule.js b/src/api/base/groupSchedulingRule.js new file mode 100644 index 00000000..d93d02fc --- /dev/null +++ b/src/api/base/groupSchedulingRule.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建排班规则基础信息 +export function createGroupRule(data) { + return request({ + url: '/base/group-scheduling-rule/create', + method: 'post', + data: data + }) +} + +// 更新排班规则基础信息 +export function updateGroupRule(data) { + return request({ + url: '/base/group-scheduling-rule/update', + method: 'put', + data: data + }) +} + +// 删除排班规则基础信息 +export function deleteGroupRule(id) { + return request({ + url: '/base/group-scheduling-rule/delete?id=' + id, + method: 'delete' + }) +} + +// 获得排班规则基础信息 +export function getGroupRule(id) { + return request({ + url: '/base/group-scheduling-rule/get?id=' + id, + method: 'get' + }) +} + +// 获得排班规则基础信息分页 +export function getGroupRulePage(query) { + return request({ + url: '/base/group-scheduling-rule/page', + method: 'get', + params: query + }) +} + +// 导出排班规则基础信息 Excel +export function exportGroupRuleExcel(query) { + return request({ + url: '/base/group-scheduling-rule/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/base/groupTeamScheduling.js b/src/api/base/groupTeamScheduling.js index be88f707..f6ccc85b 100644 --- a/src/api/base/groupTeamScheduling.js +++ b/src/api/base/groupTeamScheduling.js @@ -8,7 +8,14 @@ export function getPreset(query) { params: query }) } - +// 获取某月预排班 +export function getScheduling(query) { + return request({ + url: '/base/group-team-scheduling/getScheduling', + method: 'get', + params: query + }) +} // 批量创建-更新排班信息 export function createOrUpdateList(data) { return request({ diff --git a/src/api/base/material.js b/src/api/base/material.js index 26e495a0..ba6c1e2a 100644 --- a/src/api/base/material.js +++ b/src/api/base/material.js @@ -1,9 +1,9 @@ /* * @Author: Do not edit * @Date: 2023-10-21 11:50:46 - * @LastEditTime: 2023-10-24 11:22:28 - * @LastEditors: DY - * @Description: + * @LastEditTime: 2024-07-05 10:09:18 + * @LastEditors: zwq + * @Description: */ import request from '@/utils/request' @@ -61,7 +61,7 @@ export function getMaterialPage(query) { // 获得物料列表 export function getMaterialList(query) { return request({ - url: '/base/material/listbyfilter', + url: '/base/core-product-material/listAll', method: 'get', params: query }) @@ -118,4 +118,85 @@ export function getMaterialAttr(query) { method: 'get', params: query }) -} \ No newline at end of file +} +// 获得物料树结构 +export function getMaterialTree() { + return request({ + url: '/base/core-product-material-type/listTree', + method: 'get' + }) +} + +// 创建物料树 +export function createMaterialTree(data) { + return request({ + url: '/base/core-product-material-type/create', + method: 'post', + data: data + }) +} + +// 更新物料树 +export function updateMaterialTree(data) { + return request({ + url: '/base/core-product-material-type/update', + method: 'put', + data: data + }) +} + +// 删除物料树 +export function deleteMaterialTree(id) { + return request({ + url: '/base/core-product-material-type/delete?id=' + id, + method: 'delete' + }) +} + +// 获得产品物料分页 +export function getProductMaterialPage(query) { + return request({ + url: '/base/core-product-material/page', + method: 'get', + params: query + }) +} +// 删除产品物料 +export function deleteProductMaterial(id) { + return request({ + url: '/base/core-product-material/delete?id=' + id, + method: 'delete' + }) +} +// 创建产品物料 +export function createProductMaterial(data) { + return request({ + url: '/base/core-product-material/create', + method: 'post', + data: data + }) +} + +// 更新产品物料 +export function updateProductMaterial(data) { + return request({ + url: '/base/core-product-material/update', + method: 'put', + data: data + }) +} +// 获得产品物料 +export function getProductMaterial(id) { + return request({ + url: '/base/core-product-material/get?id=' + id, + method: 'get' + }) +} + +// 获得产品物料code +export function getProductMaterialCode() { + return request({ + url: '/base/core-product-material/getCode', + method: 'POST' + }) +} diff --git a/src/api/base/materialProductBom.js b/src/api/base/materialProductBom.js index 4721ab2a..9bdefcfd 100644 --- a/src/api/base/materialProductBom.js +++ b/src/api/base/materialProductBom.js @@ -3,7 +3,7 @@ * @Date: 2023-10-21 11:50:46 * @LastEditTime: 2023-11-27 17:54:28 * @LastEditors: DY - * @Description: + * @Description: */ import request from '@/utils/request' @@ -70,7 +70,7 @@ export function getMaterialPBList(query) { // 获得产品列表 export function getProList(query) { return request({ - url: '/base/core-product/listAll', + url: '/base/core-product-material/listAll', method: 'get', params: query }) diff --git a/src/api/base/product.js b/src/api/base/product.js index 4956018b..2924c882 100644 --- a/src/api/base/product.js +++ b/src/api/base/product.js @@ -2,7 +2,7 @@ import request from '@/utils/request' // 获得产品列表 export function getProductAll() { return request({ - url: '/base/core-product/listAll', + url: '/base/core-product-material/listAll', method: 'get' }) -} \ No newline at end of file +} diff --git a/src/api/equipment/analysis/statistics.js b/src/api/equipment/analysis/statistics.js index ebd60e17..3c0d7b80 100644 --- a/src/api/equipment/analysis/statistics.js +++ b/src/api/equipment/analysis/statistics.js @@ -24,4 +24,14 @@ export function exportEqAnalysisExcel(query) { params: query, responseType: 'blob' }) +} + +// 导出设备状态追溯 +export function exportEfficiencyExcel(query) { + return request({ + url: '/analysis/equipment-analysis/export-efficiency', + method: 'get', + params: query, + responseType: 'blob' + }) } \ No newline at end of file diff --git a/src/api/extend/processEquMaterialBom.js b/src/api/extend/processEquMaterialBom.js index 0a01aa7d..af8075b1 100644 --- a/src/api/extend/processEquMaterialBom.js +++ b/src/api/extend/processEquMaterialBom.js @@ -1,8 +1,8 @@ /* * @Author: zhp * @Date: 2023-11-07 19:47:48 - * @LastEditTime: 2023-11-23 13:57:41 - * @LastEditors: zhp + * @LastEditTime: 2024-07-08 14:33:12 + * @LastEditors: zwq * @Description: */ import request from '@/utils/request' @@ -99,7 +99,7 @@ export function getProcessEquMaterialBomDet(data) { export function getMaterialList(data) { return request({ - url: '/base/material/listbyfilter', + url: '/base/core-product-material/listAll', method: 'get', data: data }) diff --git a/src/api/monitoring/statisticalData.js b/src/api/monitoring/statisticalData.js index 2d0f19be..6e1d1cb7 100644 --- a/src/api/monitoring/statisticalData.js +++ b/src/api/monitoring/statisticalData.js @@ -25,7 +25,7 @@ export function getWorkOrderList(query) { } export function getProductList(query) { return request({ - url: '/base/core-product/listAll', + url: '/base/core-product-material/listAll', method: 'get', params: query, }) @@ -38,3 +38,11 @@ export function getInspectionData(query) { params: query, }) } + +export function getRecordInOneDay(query) { + return request({ + url: '/analysis/record-in-one-day/get', + method: 'get', + params: query, + }) +} diff --git a/src/assets/images/choicepart/Devconfig.png b/src/assets/images/choicepart/Devconfig.png new file mode 100644 index 00000000..30a1a7e8 Binary files /dev/null and b/src/assets/images/choicepart/Devconfig.png differ diff --git a/src/mixins/tableHeightMixin.js b/src/mixins/tableHeightMixin.js new file mode 100644 index 00000000..ad23d16e --- /dev/null +++ b/src/mixins/tableHeightMixin.js @@ -0,0 +1,20 @@ +export default { + data() { + return { + tableH: this.tableHeight(260), + }; + }, + created() { + this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260); + window.addEventListener('resize', this._setTableHeight); + }, + destroyed() { + window.removeEventListener('resize', this._setTableHeight); + }, + methods: { + _setTableHeight() { + this.tableH = this?.heightNum ? this.tableHeight(this.heightNum) : this.tableHeight(260); + // this.tableH = this.tableHeight(260); + }, + }, +}; diff --git a/src/plugins/modal.js b/src/plugins/modal.js index b37ca145..78623683 100644 --- a/src/plugins/modal.js +++ b/src/plugins/modal.js @@ -59,6 +59,33 @@ export default { type: "warning", }) }, + // 删除确认窗体(UI规范) + delConfirm(title) { + return MessageBox.confirm("确定删除后不可恢复该数据", `是否确认删除 【${title}】 数据项?`, { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: "warning", + showClose:false + }) + }, + // 关闭页面确认窗体(UI规范) + closeConfirm() { + return MessageBox.confirm("确定关闭将不保留编辑内容", "是否确认要关闭页面?", { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: "warning", + showClose:false + }) + }, + // 确认窗体(UI规范) + newConfirm(content,title) { + return MessageBox.confirm(content, title, { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: "warning", + showClose:false + }) + }, // 提交内容 prompt(content) { return MessageBox.prompt(content, "系统提示", { diff --git a/src/styles/index.scss b/src/styles/index.scss index d162abed..f1393e30 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -200,4 +200,35 @@ input, textarea{ // 弹出框,上下分布,去掉label的padding-bottom .el-form--label-top .el-form-item__label { padding: 0; -} \ No newline at end of file +} + +// 确认弹窗(UI样式修改和原样式有区别--start) +.el-message-box__status+.el-message-box__message { + padding-left: 58px; +} +.el-message-box { + width: auto; + min-width: 424px; + .el-message-box__header { + padding:32px 32px 0px 72px; + .el-message-box__title { + font-size: 16px; + font-weight: 600; + color: rgba(0,0,0,0.85); + } + } + .el-message-box__content { + padding-bottom: 24px; + .el-message-box__status { + top:-72%; + left:20px; + font-size:21px !important + } + } + .el-message-box__btns { + padding-right: 32px; + padding-bottom:14px; + } +} + +// 确认弹窗(UI样式修改和原样式有区别--end) \ No newline at end of file diff --git a/src/views/choicePart/index.vue b/src/views/choicePart/index.vue index 71126915..e506cb60 100644 --- a/src/views/choicePart/index.vue +++ b/src/views/choicePart/index.vue @@ -1,44 +1,60 @@ - \ No newline at end of file + diff --git a/src/views/energy/base/energyType/components/InputArea.vue b/src/views/devConfig/energy/energyLimit/components/InputArea.vue similarity index 100% rename from src/views/energy/base/energyType/components/InputArea.vue rename to src/views/devConfig/energy/energyLimit/components/InputArea.vue diff --git a/src/views/energy/base/energyType/components/TimePickerArea.vue b/src/views/devConfig/energy/energyLimit/components/TimePickerArea.vue similarity index 100% rename from src/views/energy/base/energyType/components/TimePickerArea.vue rename to src/views/devConfig/energy/energyLimit/components/TimePickerArea.vue diff --git a/src/views/energy/monitoring/energyLimit/components/energyLimitAdd.vue b/src/views/devConfig/energy/energyLimit/components/energyLimitAdd.vue similarity index 100% rename from src/views/energy/monitoring/energyLimit/components/energyLimitAdd.vue rename to src/views/devConfig/energy/energyLimit/components/energyLimitAdd.vue diff --git a/src/views/energy/monitoring/energyLimit/index.vue b/src/views/devConfig/energy/energyLimit/index.vue similarity index 100% rename from src/views/energy/monitoring/energyLimit/index.vue rename to src/views/devConfig/energy/energyLimit/index.vue diff --git a/src/views/energy/base/energyPlc/components/energyPlcAdd.vue b/src/views/devConfig/energy/energyPlc/components/energyPlcAdd.vue similarity index 100% rename from src/views/energy/base/energyPlc/components/energyPlcAdd.vue rename to src/views/devConfig/energy/energyPlc/components/energyPlcAdd.vue diff --git a/src/views/devConfig/energy/energyPlc/index.vue b/src/views/devConfig/energy/energyPlc/index.vue new file mode 100644 index 00000000..5b48b281 --- /dev/null +++ b/src/views/devConfig/energy/energyPlc/index.vue @@ -0,0 +1,215 @@ + + + diff --git a/src/views/energy/base/energyPlcConnect/components/energyPlcConnectAdd.vue b/src/views/devConfig/energy/energyPlcConnect/components/energyPlcConnectAdd.vue similarity index 100% rename from src/views/energy/base/energyPlcConnect/components/energyPlcConnectAdd.vue rename to src/views/devConfig/energy/energyPlcConnect/components/energyPlcConnectAdd.vue diff --git a/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue b/src/views/devConfig/energy/energyPlcConnect/components/energyPlcParam.vue similarity index 100% rename from src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue rename to src/views/devConfig/energy/energyPlcConnect/components/energyPlcParam.vue diff --git a/src/views/energy/base/energyPlcConnect/components/energyPlcParamAdd.vue b/src/views/devConfig/energy/energyPlcConnect/components/energyPlcParamAdd.vue similarity index 100% rename from src/views/energy/base/energyPlcConnect/components/energyPlcParamAdd.vue rename to src/views/devConfig/energy/energyPlcConnect/components/energyPlcParamAdd.vue diff --git a/src/views/energy/base/energyPlcConnect/index.vue b/src/views/devConfig/energy/energyPlcConnect/index.vue similarity index 100% rename from src/views/energy/base/energyPlcConnect/index.vue rename to src/views/devConfig/energy/energyPlcConnect/index.vue diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsAdd.vue b/src/views/devConfig/energy/energyStatistics/components/energyStatisticsAdd.vue similarity index 100% rename from src/views/energy/monitoring/energyStatistics/components/energyStatisticsAdd.vue rename to src/views/devConfig/energy/energyStatistics/components/energyStatisticsAdd.vue diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue b/src/views/devConfig/energy/energyStatistics/components/energyStatisticsDet.vue similarity index 100% rename from src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue rename to src/views/devConfig/energy/energyStatistics/components/energyStatisticsDet.vue diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue b/src/views/devConfig/energy/energyStatistics/components/energyStatisticsDetAdd.vue similarity index 100% rename from src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue rename to src/views/devConfig/energy/energyStatistics/components/energyStatisticsDetAdd.vue diff --git a/src/views/energy/monitoring/energyStatistics/index.vue b/src/views/devConfig/energy/energyStatistics/index.vue similarity index 100% rename from src/views/energy/monitoring/energyStatistics/index.vue rename to src/views/devConfig/energy/energyStatistics/index.vue diff --git a/src/views/energy/base/energyType/components/InnerTable.vue b/src/views/devConfig/energy/energyType/components/InnerTable.vue similarity index 100% rename from src/views/energy/base/energyType/components/InnerTable.vue rename to src/views/devConfig/energy/energyType/components/InnerTable.vue diff --git a/src/views/energy/monitoring/energyLimit/components/InputArea.vue b/src/views/devConfig/energy/energyType/components/InputArea.vue similarity index 100% rename from src/views/energy/monitoring/energyLimit/components/InputArea.vue rename to src/views/devConfig/energy/energyType/components/InputArea.vue diff --git a/src/views/energy/monitoring/energyLimit/components/TimePickerArea.vue b/src/views/devConfig/energy/energyType/components/TimePickerArea.vue similarity index 100% rename from src/views/energy/monitoring/energyLimit/components/TimePickerArea.vue rename to src/views/devConfig/energy/energyType/components/TimePickerArea.vue diff --git a/src/views/energy/base/energyType/components/energyTypeAdd.vue b/src/views/devConfig/energy/energyType/components/energyTypeAdd.vue similarity index 100% rename from src/views/energy/base/energyType/components/energyTypeAdd.vue rename to src/views/devConfig/energy/energyType/components/energyTypeAdd.vue diff --git a/src/views/energy/base/energyType/index.vue b/src/views/devConfig/energy/energyType/index.vue similarity index 100% rename from src/views/energy/base/energyType/index.vue rename to src/views/devConfig/energy/energyType/index.vue diff --git a/src/views/quality/base/basicData/qualityInspectionBoxBtn/dialogForm.vue b/src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue similarity index 53% rename from src/views/quality/base/basicData/qualityInspectionBoxBtn/dialogForm.vue rename to src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue index 0cae68d9..6253c041 100644 --- a/src/views/quality/base/basicData/qualityInspectionBoxBtn/dialogForm.vue +++ b/src/views/devConfig/quality/qualityInspectionBoxBtn/dialogForm.vue @@ -6,37 +6,67 @@ --> diff --git a/src/views/devConfig/quality/qualityScrapDet/basic-page.js b/src/views/devConfig/quality/qualityScrapDet/basic-page.js new file mode 100644 index 00000000..81886d1f --- /dev/null +++ b/src/views/devConfig/quality/qualityScrapDet/basic-page.js @@ -0,0 +1,159 @@ +/* + * @Author: zwq + * @Date: 2022-08-24 11:19:43 + * @LastEditors: DY + * @LastEditTime: 2023-09-21 16:02:07 + * @Description: + */ +export default { + data() { + /* eslint-disable */ + return { + urlOptions: { + getDataListURL: '', + deleteURL: '', + statusUrl: '', + exportURL: '' + }, + tableData: [], + listQuery: { + pageSize: 10, + pageNo: 1, + total: 1, + }, + exportLoading: false, + dataListLoading: false, + addOrEditTitle: '', + addOrUpdateVisible: false, + } + }, + created() { + }, + mounted() { + this.getDataList() + }, + methods: { + // 获取数据列表 + getDataList() { + this.dataListLoading = true; + this.urlOptions.getDataListURL(this.listQuery).then(response => { + this.tableData = response.data.list; + this.listQuery.total = response.data.total; + this.dataListLoading = false; + }); + }, + // 每页数 + sizeChangeHandle(val) { + this.listQuery.pageSize = val; + this.listQuery.pageNo = 1; + this.getDataList(); + }, + // 当前页 + currentChangeHandle(val) { + this.listQuery.pageNo = val; + this.getDataList(); + }, + // 新增 / 修改 + addOrUpdateHandle(id) { + this.addOrUpdateVisible = true; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(id); + }); + }, + cancel(id) { + this.$refs["popover-" + id].showPopper = false; + }, + //改变状态 + changeStatus(id) { + this.$http + .post(this.urlOptions.statusUrl, { id }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.$refs["popover-" + id].showPopper = false; + this.$message({ + message: this.$t("prompt.success"), + type: "success", + duration: 500, + onClose: () => { + this.getDataList(); + }, + }); + }) + .catch(() => { }); + }, + //tableBtn点击 + handleClick(val) { + if (val.type === "edit") { + this.addOrUpdateVisible = true; + this.addOrEditTitle = "编辑"; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(val.data.id); + }); + } else if (val.type === "delete") { + this.deleteHandle(val.data.id, val.data.content) + } else if (val.type === "change") { + this.changeStatus(val.data.id) + } else { + this.otherMethods(val) + } + }, + // 删除 + deleteHandle(id,name) { + this.$modal + .delConfirm(name) + .then(() => { + this.urlOptions.deleteURL(id).then(({ data }) => { + this.getDataList(); + this.$modal.msgSuccess('删除成功'); + }); + }) + .catch(() => { }); + }, + //search-bar点击 + buttonClick(val) { + switch (val.btnName) { + case "search": + this.listQuery.xm1 = val.xm1; + this.listQuery.xm2 = val.xm2; + this.listQuery.pageNo = 1; + this.getDataList(); + break; + case "add": + this.addOrEditTitle = '新增' + this.addOrUpdateVisible = true; + this.addOrUpdateHandle() + break; + default: + console.log(val) + } + }, + handleCancel() { + this.$refs.addOrUpdate.formClear() + this.addOrUpdateVisible = false + this.addOrEditTitle = '' + }, + handleConfirm() { + this.$refs.addOrUpdate.dataFormSubmit() + }, + successSubmit() { + this.handleCancel() + this.getDataList() + }, + /** 导出按钮操作 */ + handleExport() { + // 处理查询参数 + let params = { ...this.queryParams }; + params.pageNo = undefined; + params.pageSize = undefined; + this.$modal.confirm('是否确认导出所有数据项?').then(() => { + this.exportLoading = true; + return this.urlOptions.exportURL(params); + }).then(response => { + this.$download.excel(response, '工厂.xls'); + this.exportLoading = false; + }).catch(() => { }); + } + } +} diff --git a/src/views/quality/base/qualityScrapDet/index.vue b/src/views/devConfig/quality/qualityScrapDet/index.vue similarity index 53% rename from src/views/quality/base/qualityScrapDet/index.vue rename to src/views/devConfig/quality/qualityScrapDet/index.vue index 6e9276aa..78ea8b36 100644 --- a/src/views/quality/base/qualityScrapDet/index.vue +++ b/src/views/devConfig/quality/qualityScrapDet/index.vue @@ -9,11 +9,12 @@ :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" - :table-data="tableData"> + :table-data="tableData" + :max-height="tableH"> @@ -21,7 +22,7 @@ + width="50%"> @@ -39,77 +40,84 @@ diff --git a/src/views/devConfig/quality/qualityScrapType/basic-page.js b/src/views/devConfig/quality/qualityScrapType/basic-page.js new file mode 100644 index 00000000..6bb8befa --- /dev/null +++ b/src/views/devConfig/quality/qualityScrapType/basic-page.js @@ -0,0 +1,159 @@ +/* + * @Author: zwq + * @Date: 2022-08-24 11:19:43 + * @LastEditors: DY + * @LastEditTime: 2023-09-21 16:02:07 + * @Description: + */ +export default { + data() { + /* eslint-disable */ + return { + urlOptions: { + getDataListURL: '', + deleteURL: '', + statusUrl: '', + exportURL: '' + }, + tableData: [], + listQuery: { + pageSize: 10, + pageNo: 1, + total: 1, + }, + exportLoading: false, + dataListLoading: false, + addOrEditTitle: '', + addOrUpdateVisible: false, + } + }, + created() { + }, + mounted() { + this.getDataList() + }, + methods: { + // 获取数据列表 + getDataList() { + this.dataListLoading = true; + this.urlOptions.getDataListURL(this.listQuery).then(response => { + this.tableData = response.data.list; + this.listQuery.total = response.data.total; + this.dataListLoading = false; + }); + }, + // 每页数 + sizeChangeHandle(val) { + this.listQuery.pageSize = val; + this.listQuery.pageNo = 1; + this.getDataList(); + }, + // 当前页 + currentChangeHandle(val) { + this.listQuery.pageNo = val; + this.getDataList(); + }, + // 新增 / 修改 + addOrUpdateHandle(id) { + this.addOrUpdateVisible = true; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(id); + }); + }, + cancel(id) { + this.$refs["popover-" + id].showPopper = false; + }, + //改变状态 + changeStatus(id) { + this.$http + .post(this.urlOptions.statusUrl, { id }) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.$refs["popover-" + id].showPopper = false; + this.$message({ + message: this.$t("prompt.success"), + type: "success", + duration: 500, + onClose: () => { + this.getDataList(); + }, + }); + }) + .catch(() => { }); + }, + //tableBtn点击 + handleClick(val) { + if (val.type === "edit") { + this.addOrUpdateVisible = true; + this.addOrEditTitle = "编辑"; + this.$nextTick(() => { + this.$refs.addOrUpdate.init(val.data.id); + }); + } else if (val.type === "delete") { + this.deleteHandle(val.data.id, val.data.name) + } else if (val.type === "change") { + this.changeStatus(val.data.id) + } else { + this.otherMethods(val) + } + }, + // 删除 + deleteHandle(id,name) { + this.$modal + .delConfirm(name) + .then(() => { + this.urlOptions.deleteURL(id).then(({ data }) => { + this.getDataList(); + this.$modal.msgSuccess('删除成功'); + }); + }) + .catch(() => { }); + }, + //search-bar点击 + buttonClick(val) { + switch (val.btnName) { + case "search": + this.listQuery.xm1 = val.xm1; + this.listQuery.xm2 = val.xm2; + this.listQuery.pageNo = 1; + this.getDataList(); + break; + case "add": + this.addOrEditTitle = '新增' + this.addOrUpdateVisible = true; + this.addOrUpdateHandle() + break; + default: + console.log(val) + } + }, + handleCancel() { + this.$refs.addOrUpdate.formClear() + this.addOrUpdateVisible = false + this.addOrEditTitle = '' + }, + handleConfirm() { + this.$refs.addOrUpdate.dataFormSubmit() + }, + successSubmit() { + this.handleCancel() + this.getDataList() + }, + /** 导出按钮操作 */ + handleExport() { + // 处理查询参数 + let params = { ...this.queryParams }; + params.pageNo = undefined; + params.pageSize = undefined; + this.$modal.confirm('是否确认导出所有数据项?').then(() => { + this.exportLoading = true; + return this.urlOptions.exportURL(params); + }).then(response => { + this.$download.excel(response, '工厂.xls'); + this.exportLoading = false; + }).catch(() => { }); + } + } +} diff --git a/src/views/quality/base/qualityScrapType/index.vue b/src/views/devConfig/quality/qualityScrapType/index.vue similarity index 67% rename from src/views/quality/base/qualityScrapType/index.vue rename to src/views/devConfig/quality/qualityScrapType/index.vue index 6d638e83..f94dc126 100644 --- a/src/views/quality/base/qualityScrapType/index.vue +++ b/src/views/devConfig/quality/qualityScrapType/index.vue @@ -9,11 +9,12 @@ :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" - :table-data="tableData"> + :table-data="tableData" + :max-height="tableH"> @@ -21,7 +22,7 @@ + width="50%"> @@ -39,39 +40,45 @@ diff --git a/src/views/energy/monitoring/energyOverlimitLog/index.vue b/src/views/energy/energyOverlimitLog/index.vue similarity index 100% rename from src/views/energy/monitoring/energyOverlimitLog/index.vue rename to src/views/energy/energyOverlimitLog/index.vue diff --git a/src/views/energy/base/energyQuantityRealtime/index.vue b/src/views/energy/energyQuantityRealtime/index.vue similarity index 100% rename from src/views/energy/base/energyQuantityRealtime/index.vue rename to src/views/energy/energyQuantityRealtime/index.vue diff --git a/src/views/energy/monitoring/energyReport/index.vue b/src/views/energy/energyReport/index.vue similarity index 100% rename from src/views/energy/monitoring/energyReport/index.vue rename to src/views/energy/energyReport/index.vue diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index 0b3512f9..d492cb7b 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -1,4 +1,4 @@ -