From af93e102fa04be3fc4c93ad247afdf86d562db45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Sun, 12 Dec 2021 15:29:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E7=AC=A6=E5=90=88=E9=A1=B9=E6=96=B0?= =?UTF-8?q?=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/details/complianceDetails/index.vue | 7 + .../pages/rectificationDatabase.vue | 403 ++++++++++++++---- 2 files changed, 324 insertions(+), 86 deletions(-) diff --git a/src/pages/details/complianceDetails/index.vue b/src/pages/details/complianceDetails/index.vue index aea6be615..4cb725b59 100644 --- a/src/pages/details/complianceDetails/index.vue +++ b/src/pages/details/complianceDetails/index.vue @@ -16,6 +16,7 @@ @@ -34,6 +35,7 @@ @@ -43,12 +45,14 @@ @@ -73,6 +77,7 @@ @@ -85,12 +90,14 @@ diff --git a/src/pages/regulatoryRepository/nonConfomity/pages/rectificationDatabase.vue b/src/pages/regulatoryRepository/nonConfomity/pages/rectificationDatabase.vue index 0312294bf..e5eb602fd 100644 --- a/src/pages/regulatoryRepository/nonConfomity/pages/rectificationDatabase.vue +++ b/src/pages/regulatoryRepository/nonConfomity/pages/rectificationDatabase.vue @@ -162,7 +162,7 @@ label="责任部门"> @@ -415,56 +415,19 @@ - - - - - - - - - - - - - - - - - + placeholder="请输入标准名称" + /> + 手动查找 @@ -489,6 +452,41 @@ placeholder="请输入条款名称" :maxlength="500" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + + + + 清空 + + + + + + + + + + + {{ scope.row.standSortShow }} {{ + scope.row.standNumber + }}-{{ scope.row.standYear }} + {{ + scope.row.standSortShow + }} + {{ scope.row.standNumber }} + + + + + {{ scope.row.standName }} + + + + + {{ scope.row.issueTime ? $moment(scope.row.issueTime).format("YYYY-MM-DD") : "" }} + + + + + + + + {{$t('m.dataAcquisition')}} + + + + @@ -593,11 +721,34 @@ export default { loading: false, nonList: [], //未符合项表格数据 replaceLoading: false, + standList: [], + productLines: [], //产品线数据 //项目数据 ProjectDatas: [], + dialogTableVisible: false, itemsData: [], selectItems: [], dataList: [], + //查询添加标准相关数据 + standardSearch: { + standType: "", + standNumber: "", + pageNo: 1, + pageSizeNo: this.$store.getters.userInfo.configContent + }, + standardData: [], //存放标准数据 + standardTypeOptions: [ + { + value: "INLAND", + label: "国内标准法规", + item: "INLAND" + }, + { + value: "FOREIGN", + label: "海外标准法规", + item: "FOREIGN" + } + ], page: 1, pageSize: this.$store.getters.userInfo.configContent, total: 0, @@ -685,9 +836,6 @@ export default { //数据查看 historySee: false, historySeeForm: {}, - // 新增编辑框的disabled - serialNumber: true, - // 提交按钮loading submiting: false, // 选择人(单选) @@ -749,6 +897,47 @@ export default { this.myLoading.loadData = false; }); }, + typeChange(type) { + console.log(type); + this.standardSearch.standType = type; + }, + //取消添加 + cancelStand(){ + this.dialogTableVisible = false + }, + //确认添加标准 + okStand(){ + if(this.standList > 1){ + this.$message.warning('您只能选择一条标准进行添加') + }else if(this.standList < 1){ + this.$message.warning('请至少选择一条数据进行添加') + }else{ + this.addForm.standId = this.standList[0].id + this.addForm.standName = this.standList[0].standName + this.addForm.standSerialNumber = this.standList[0].standSort + '-' + this.standList[0].standNumber + '-' + this.standList[0].standYear + this.dialogTableVisible = false + } + }, + //添加标准select的改变 + selectStand(data) { + this.standList = data; + }, + showStand(){ + this.dialogTableVisible = true + }, + //标准查询按钮 + getStandDataBtn(){ + this.page =1; + this.getStandDatas(); + }, + //清空查询按钮 + clearStandSearch(){ + this.standardSearch = { + standType: "", + standNumber: "" + }; + this.getStandDatas(); + }, // 点击历史记录按钮事件 historyClick() { this.$router.push({ @@ -873,25 +1062,24 @@ export default { } }, - //获取项目数据 - getProjectData() { - this.$http.get("sarStandProjectLibrary/queryProjectWorkFlow", { - page: this.page, - pageSize: this.pageSize, - ...this.projectSearch - }, { - _this: this - }, res => { - if (res.data === null) { - this.ProjectDatas = ""; - this.total = 0; - } else { - this.ProjectDatas = res.data.Maintenance.records; - this.total = res.data.Maintenance.total; - } - }); - - }, + // //获取项目数据 + // getProjectData() { + // this.$http.get("sarStandProjectLibrary/queryProjectWorkFlow", { + // page: 1, + // pageSize: 100, + // }, { + // _this: this + // }, res => { + // if (res.data === null) { + // this.ProjectDatas = ""; + // this.total = 0; + // } else { + // this.ProjectDatas = res.data.Maintenance.records; + // this.total = res.data.Maintenance.total; + // } + // }); + // + // }, //提交 submit() { const id = this.addForm.id; @@ -1004,13 +1192,31 @@ export default { });*/ }); }, + //查询项目下的标准 + getStandDatas() { + this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPageByWk1", { + standType: this.standardSearch.standType, + standNumber: this.standardSearch.standNumber, + page: this.pageNo, + pageSize: this.pageSizeNo + }, { + _this: this + }, res => { + this.standardData = res.data.list; + this.standardData.forEach(item => { + this.$set(item, "ZCCSSRQ", item.zccssrq); + this.$set(item, "XCXSSRQ", item.xcxssrq); + }) + this.total = res.data.count; + }, e => { + }); + }, //新增事件 addModel() { this.dataList = [] - this.serialNumber = true this.drawerTitle = "新增"; - this.getProjectData() this.drawerTable = true + this.getStandDatas() }, //编辑事件 projectEdit(row) { @@ -1022,9 +1228,8 @@ export default { } }) let productId = this.projectId - this.getProjectData() + // this.getProjectData() this.getStandData(productId) - this.serialNumber = false this.drawerTable = true; }, //点击查看按钮事件 @@ -1091,6 +1296,15 @@ export default { }); }, // 分页事件 + pageChange(page) { + this.page = page; + this.getStandDatas() + }, + pageSizeChange(pageSize) { + this.pageSize = pageSize; + this.getStandDatas() + }, + // 分页事件 pageChangeNo(page) { this.pageNo = page; this.getTableByPage(); @@ -1099,6 +1313,11 @@ export default { this.pageSizeNo = pageSize; this.getTableByPage(); }, + //产品线change事件 + handleChangeLine(val){ + this.addForm.productLine = val.productLine + this.ProjectDatas = val.sarStandProjectLibraries + }, /** 项目名称change事件 */ handleChange(val) { @@ -1108,18 +1327,11 @@ export default { } this.addForm.productId = val.id this.addForm.productId = val.projectNumber - this.addForm.productLine = val.productLine this.addForm.productName = val.projectName this.addForm.productType = val.projectPlatfor this.serialNumber = false - let productId = val.id - this.getStandData(productId) - }, - /** 标准号change事件 */ - standChange(item) { - this.addForm.standId = item.standId - this.addForm.standName = item.standName - this.addForm.standSerialNumber = item.standSort + '-' + item.standNumber + '-' + item.standYear + // let productId = val.id + // this.getStandData(productId) }, /** 责任工程师选择 */ choiceZRR(type, title, id) { @@ -1179,11 +1391,28 @@ export default { this.addForm.responsibleUnit = nameList; }, + //获取产品线数据 + getProductData() { + this.$http.get("sarStandProjectLibrary/queryProjectManager", { + current: 1, + PageSize:100, + }, { + _this: this + }, res => { + res.data.records.forEach(item => { + if(item.productLine){ + this.productLines.push(item) + } + }) + }, e => { + + }); + }, }, mounted() { - //查询已维护的项目 - this.getProjectData(); + //查询产品线 + this.getProductData() this.getData() // 加载所有的部门 this.getOrgTreeSource(); @@ -1192,6 +1421,9 @@ export default {