From f8dd086cf9bfdd4fd3d8521423cba0b2bd58f238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Fri, 14 Jul 2023 16:01:10 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/qualityChange-add.vue | 47 +++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/src/views/modules/researchquality/components/qualityChange-add.vue b/src/views/modules/researchquality/components/qualityChange-add.vue index e7b50ab..f1a98f1 100644 --- a/src/views/modules/researchquality/components/qualityChange-add.vue +++ b/src/views/modules/researchquality/components/qualityChange-add.vue @@ -1,7 +1,7 @@ @@ -34,7 +34,7 @@ - + @@ -250,7 +250,7 @@ export default { this.$nextTick(() => { this.$refs["dataForm"].resetFields(); if (this.dataForm.id) { - this.getInfo(); + this.getInfo() } else { } }); @@ -305,9 +305,6 @@ export default { .catch(() => { }) }, - getProcessList(val) { - console.log(val); - }, // 获取信息 getInfo() { this.$http @@ -324,6 +321,41 @@ export default { .catch(() => {}); }, // 表单提交 + dataFormSubmit() { + this.$refs["dataForm"].validate((valid) => { + if (!valid) { + return false; + } + const processArr = this.dataForm.processList.map((item) => { + return { + id:item + } + }) + this.dataForm.processList = processArr + const productTypeArr = this.dataForm.productTypeList.map((item) => { + return { + id: item + } + }) + this.dataForm.productTypeList = productTypeArr + this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg); + } + this.$message({ + message: this.$t("prompt.success"), + type: "success", + duration: 500, + onClose: () => { + this.visible = false; + this.$emit("refreshDataList"); + }, + }); + }) + .catch(() => { }); + }); + }, dataFormSubmitHandle: debounce( function () { this.$refs["dataForm"].validate((valid) => { @@ -340,9 +372,8 @@ export default { type: "success", duration: 500, onClose: () => { - console.log(1111); this.visible = false; - this.$emit("successSubmit"); + this.$emit("refreshDataList"); }, }); }) From 062623791233d9a07fe2d800828676905457d6bc Mon Sep 17 00:00:00 2001 From: zwq Date: Mon, 17 Jul 2023 10:18:06 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=9B=B4=E6=96=B08D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/views/main-navbar.vue | 7 +- .../components/startEightDiscipline-add.vue | 66 ++++--- src/views/modules/code/eightDiscipline.vue | 49 +++-- .../managementCenter/bestPractices.vue | 74 ++++++-- .../components/line-chart.vue | 11 +- .../components/processStatus.vue | 49 +++++ .../managementCenter/eightDisciplineList.vue | 133 ++++++++++++-- .../eightDisciplineProgressStatus.vue | 147 +++++++++++++-- .../managementCenter/joinEightDiscipline.vue | 169 ++++++++++++++++-- .../problemTypeDistribution.vue | 2 +- .../managementCenter/productDistribution.vue | 12 +- 12 files changed, 605 insertions(+), 116 deletions(-) create mode 100644 src/views/modules/managementCenter/components/processStatus.vue diff --git a/package.json b/package.json index 1a9465f..d3d5a19 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "axios": "^0.19.2", "babel-eslint": "^8.0.1", "babel-plugin-component": "^1.1.1", - "code-brick-zj": "0.0.7", + "code-brick-zj": "1.0.2", "core-js": "^3.6.5", "echarts": "^5.4.2", "element-theme": "^2.0.1", diff --git a/src/views/main-navbar.vue b/src/views/main-navbar.vue index a3f7a45..1de9761 100644 --- a/src/views/main-navbar.vue +++ b/src/views/main-navbar.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2022-08-22 14:57:51 * @LastEditors: zwq - * @LastEditTime: 2023-05-12 12:46:50 + * @LastEditTime: 2023-07-14 15:53:17 * @Description: --> @@ -25,8 +31,10 @@ import basicPage from "@/mixins/basic-page" // import basicSearch from "@/mixins/basic-search" // import projectTypeSearch from "./components/projectTypeSearch.vue" +import baseConfigAdd from "./baseConfig-add" import customerquality from '@/filters/customerquality' // import qmsKnowledgeBaseAdd from "./components/qmsKnowledgeBase-add.vue" +import InnerTable from "./innerTable" import i18n from "@/i18n" // import i18n from "@/i18n"; const tableProps = [ @@ -40,8 +48,13 @@ const tableProps = [ }, { prop: "categoryName", - label: i18n.t('customerquality.category'), - } + label: i18n.t('uploadFile'), + }, + { + prop: "code", + label: i18n.t('customerquality.file'), + subcomponent: InnerTable + }, ]; const tableBtn = [ { @@ -51,14 +64,13 @@ const tableBtn = [ { type: "delete", btnName: i18n.t('delete'), - }, - { - type: "configuration", - btnName: i18n.t('delete'), } ]; export default { mixins: [basicPage], + components: { + baseConfigAdd, + }, data() { return { urlOptions: { @@ -67,7 +79,23 @@ export default { exportURL: '/customerquality/qmsKnowledgeBase/export' }, tableBtn, - + baseConfigAddShow:[], + formConfig: [ + { + type: "button", + btnName: i18n.t('search'), + name: "search", + color: "primary", + // plain: true, + }, + { + type: "button", + btnName: i18n.t('add'), + name: "add", + color: "success", + plain: true + }, + ], tableProps, tableData: [], drawer: false, @@ -83,11 +111,89 @@ export default { // this.dataForm.dictTypeId = dictTypeId || ""; this.drawer = true this.$nextTick(() => { + this.getDataList() }); }, - handleClick(){ - - } + buttonClick(val) { + console.log(val) + switch (val.btnName) { + case "search": + // this.listQuery.paramCode = val.paramCode; + // this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined + // this.listQuery.supplierStatus = val.supplierStatus ? val.supplierStatus : undefined + // this.listQuery.supplierTypeId = val.supplierTypeId ? val.supplierTypeId : undefined + // this.listQuery.ment = this.ment ? this.ment : undefined + // console.log(i18n); + this.listQuery.page = 1; + this.getDataList() + break; + // case "export": + // // this.listQuery.paramCode = val.paramCode; + // this.exportHandle() + // break; + case "add": + // this.addOrEditTitle = '新增' + // this.addOrUpdateVisible = true; + this.baseConfigAddShow = true + this.$nextTick(() => { + this.$refs.baseConfigAddList.init() + }) + // this.addOrUpdateHandle() + break; + default: + } + }, + getDataList() { + this.dataListLoading = true; + this.$http + .get(this.urlOptions.getDataListURL, { + params: this.listQuery, + }) + .then(({ data: res }) => { + this.dataListLoading = false; + if (res.code !== 0) { + this.tableData = []; + this.listQuery.total = 0; + return this.$message.error(res.msg); + } + this.tableData = res.data.list; + this.listQuery.total = res.data.total; + }) + .catch(() => { + this.dataListLoading = false; + }) + }, + handleClick(val) { + if (val.type === "delete") { + this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => { + if (data && data.code === 0) { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.getDataList(); + }, + }); + } else { + this.$message.error(data.msg); + } + }); + }) + .catch(() => { }); + } else if (val.type === 'edit') { + this.baseConfigAddShow = true + this.$nextTick(() => { + this.$refs.baseConfigAddList.init(val.data.id) + }) + } + }, }, } diff --git a/src/views/modules/customerquality/components/baseConfigFile-add.vue b/src/views/modules/customerquality/components/baseConfigFile-add.vue new file mode 100644 index 0000000..6565371 --- /dev/null +++ b/src/views/modules/customerquality/components/baseConfigFile-add.vue @@ -0,0 +1,173 @@ + + + + + + diff --git a/src/views/modules/customerquality/components/innerTable.vue b/src/views/modules/customerquality/components/innerTable.vue new file mode 100644 index 0000000..c84b871 --- /dev/null +++ b/src/views/modules/customerquality/components/innerTable.vue @@ -0,0 +1,164 @@ + + + diff --git a/src/views/modules/customerquality/components/publicDocuments-add.vue b/src/views/modules/customerquality/components/publicDocuments-add.vue index 2cd6482..86a278e 100644 --- a/src/views/modules/customerquality/components/publicDocuments-add.vue +++ b/src/views/modules/customerquality/components/publicDocuments-add.vue @@ -1,7 +1,7 @@ @@ -45,7 +45,7 @@ diff --git a/src/views/modules/customerquality/qmsQualityChange.vue b/src/views/modules/customerquality/qmsQualityChange.vue deleted file mode 100644 index 820fd9e..0000000 --- a/src/views/modules/customerquality/qmsQualityChange.vue +++ /dev/null @@ -1,281 +0,0 @@ - - - - diff --git a/src/views/modules/incoming/components/incomingInspection-add.vue b/src/views/modules/incoming/components/incomingInspection-add.vue index 568235f..5b5def1 100644 --- a/src/views/modules/incoming/components/incomingInspection-add.vue +++ b/src/views/modules/incoming/components/incomingInspection-add.vue @@ -1,7 +1,7 @@ @@ -10,7 +10,7 @@ - + @@ -18,26 +18,26 @@ - + - + - + - + @@ -53,7 +53,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -69,31 +69,34 @@ - + + - + - + - + + - + @@ -101,15 +104,15 @@ - - + + - + @@ -119,7 +122,7 @@ - + diff --git a/src/views/modules/incoming/components/purchaseRegistration-add.vue b/src/views/modules/incoming/components/purchaseRegistration-add.vue index 0dea683..6385cfc 100644 --- a/src/views/modules/incoming/components/purchaseRegistration-add.vue +++ b/src/views/modules/incoming/components/purchaseRegistration-add.vue @@ -1,7 +1,7 @@ @@ -11,7 +11,7 @@ - + @@ -19,26 +19,26 @@ - + - + - + - + @@ -54,7 +54,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -70,31 +70,34 @@ - + + - + - + - + + - + @@ -102,15 +105,15 @@ - - + + - + @@ -120,7 +123,7 @@ - + @@ -133,27 +136,29 @@ - + - + - + - + + - + @@ -161,27 +166,29 @@ - + - + - + - + + - + @@ -189,27 +196,29 @@ - + - + - + - + + - + @@ -217,27 +226,29 @@ - + - + - + - + + - + @@ -245,7 +256,6 @@ - diff --git a/src/views/modules/customerquality/components/baseConfig-add.vue b/src/views/modules/customerquality/components/baseConfig-add.vue index 205b96f..07178a4 100644 --- a/src/views/modules/customerquality/components/baseConfig-add.vue +++ b/src/views/modules/customerquality/components/baseConfig-add.vue @@ -1,7 +1,7 @@ @@ -12,14 +12,16 @@ - + - + @@ -84,8 +86,10 @@ export default { this.getDict() }, methods: { - init(id) { - this.dataForm.id = id || '' + init(obj) { + this.dataForm.knowledgeBaseId = obj.knowledgeBaseId || '' + this.dataForm.requirementListId = obj.requirementListId || '' + this.dataForm.id = obj.id || '' this.innerDrawer = true this.$nextTick(() => { this.$refs["dataForm"].resetFields() diff --git a/src/views/modules/customerquality/components/baseConfig.vue b/src/views/modules/customerquality/components/baseConfig.vue index 1f34dbb..d900087 100644 --- a/src/views/modules/customerquality/components/baseConfig.vue +++ b/src/views/modules/customerquality/components/baseConfig.vue @@ -1,7 +1,7 @@ @@ -106,8 +106,10 @@ export default { } }, methods: { - init(id) { - this.listQuery.knowledgeBaseId = id || "" + init(obj) { + this.listQuery.knowledgeBaseId = obj.knowledgeBaseId || "" + this.listQuery.requirementListId = obj.requirementListId || "" + // this.dataForm.dictTypeId = dictTypeId || ""; this.drawer = true this.$nextTick(() => { @@ -135,8 +137,12 @@ export default { // this.addOrEditTitle = '新增' // this.addOrUpdateVisible = true; this.baseConfigAddShow = true + const obj = { + knowledgeBaseId: this.listQuery.knowledgeBaseId, + requirementListId: this.listQuery.requirementListId + } this.$nextTick(() => { - this.$refs.baseConfigAddList.init() + this.$refs.baseConfigAddList.init(obj) }) // this.addOrUpdateHandle() break; @@ -189,8 +195,13 @@ export default { .catch(() => { }); } else if (val.type === 'edit') { this.baseConfigAddShow = true + const obj = { + knowledgeBaseId: this.listQuery.knowledgeBaseId, + requirementListId: this.listQuery.requirementListId, + id:val.data.id + } this.$nextTick(() => { - this.$refs.baseConfigAddList.init(val.data.id) + this.$refs.baseConfigAddList.init(obj) }) } }, diff --git a/src/views/modules/customerquality/components/baseConfigFile-add.vue b/src/views/modules/customerquality/components/baseConfigFile-add.vue index 6565371..22d4411 100644 --- a/src/views/modules/customerquality/components/baseConfigFile-add.vue +++ b/src/views/modules/customerquality/components/baseConfigFile-add.vue @@ -1,29 +1,31 @@