diff --git a/.env.dev b/.env.dev index 1da25e71..676a0aa6 100644 --- a/.env.dev +++ b/.env.dev @@ -13,8 +13,8 @@ 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.0.33:48082' +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.8:48082' 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/views/devConfig/quality/qualityInspectionBoxBtn/index.vue b/src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue index 3fdd7d79..8387c7fa 100644 --- a/src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue +++ b/src/views/devConfig/quality/qualityInspectionBoxBtn/index.vue @@ -307,7 +307,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除"' + row.sectionName + '"?') + .delConfirm(row.buttonId) .then(function () { return deleteQualityInspectionBoxBtn(id); }) diff --git a/src/views/devConfig/quality/qualityInspectionDet/index.vue b/src/views/devConfig/quality/qualityInspectionDet/index.vue index da6240b4..97d533fb 100644 --- a/src/views/devConfig/quality/qualityInspectionDet/index.vue +++ b/src/views/devConfig/quality/qualityInspectionDet/index.vue @@ -288,7 +288,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除检测信息"' + row.content + '"?') + .delConfirm(row.content) .then(function () { return deleteQualityInspectionDet(id); }) diff --git a/src/views/devConfig/quality/qualityInspectionType/index.vue b/src/views/devConfig/quality/qualityInspectionType/index.vue index 46183389..17318da0 100644 --- a/src/views/devConfig/quality/qualityInspectionType/index.vue +++ b/src/views/devConfig/quality/qualityInspectionType/index.vue @@ -273,7 +273,7 @@ export default { handleDelete(row) { const id = row.id; this.$modal - .confirm('是否确认删除该质量检测类型?') + .delConfirm(row.name) .then(function () { return deleteQualityInspectionType(id); }) 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/devConfig/quality/qualityScrapDet/index.vue b/src/views/devConfig/quality/qualityScrapDet/index.vue index 6bb2f75d..78ea8b36 100644 --- a/src/views/devConfig/quality/qualityScrapDet/index.vue +++ b/src/views/devConfig/quality/qualityScrapDet/index.vue @@ -40,7 +40,7 @@