From 081d244d2c3ae02497cf8c92e49ed4840f2364b0 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 10 Apr 2023 09:13:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BF=E7=AD=96=E6=89=BE=E4=BA=BA=E5=88=A0?= =?UTF-8?q?=E9=99=A4,=E7=BC=96=E8=BE=91,=E8=AF=A6=E6=83=85,=E5=A4=8D?= =?UTF-8?q?=E5=88=B6,=E8=AE=BE=E5=A4=87bug82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityService/labelConfig/addForm.vue | 1 - .../communityService/policy/addPolicy.vue | 136 +- .../communityService/policy/policyList.vue | 10 +- src/views/modules/cpts/base2/cpts/edit.vue | 35 +- .../tuceng/zhonghe/shebei/cpts/record.vue | 1198 +++++++++-------- .../tuceng/zhonghe/shebei/index.vue | 4 - 6 files changed, 750 insertions(+), 634 deletions(-) diff --git a/src/views/modules/communityService/labelConfig/addForm.vue b/src/views/modules/communityService/labelConfig/addForm.vue index 574f81564..44e611073 100644 --- a/src/views/modules/communityService/labelConfig/addForm.vue +++ b/src/views/modules/communityService/labelConfig/addForm.vue @@ -488,7 +488,6 @@ export default { // this.tableData[index].colVal = '' // this.tableData[index].queryType = '' } - console.log(arr, "arr是筛选出来的"); if (row.itemId == "") return; // 列表对应值的option有的是通过接口获取的就需要再通过optionSourceType判断下 console.log(arr[0].optionSourceType); diff --git a/src/views/modules/communityService/policy/addPolicy.vue b/src/views/modules/communityService/policy/addPolicy.vue index e9a5b3a27..5522eee4b 100644 --- a/src/views/modules/communityService/policy/addPolicy.vue +++ b/src/views/modules/communityService/policy/addPolicy.vue @@ -18,7 +18,7 @@ > @@ -31,7 +31,7 @@ > - + - @@ -233,7 +237,12 @@ - + import { mapGetters } from "vuex"; import { Loading } from "element-ui"; // 引入Loading服务 -import { requestPost } from "@/js/dai/request"; +import { requestPost, requestGet } from "@/js/dai/request"; import rule from "./rule"; import labelForm from "../labelConfig/addForm.vue"; @@ -430,8 +439,8 @@ export default { }, formData: { - policyTypeLevel1Id: "", // 公共服务(政策级别)一级分类id - policyCategoryL2:"", + policyCategoryL1: "", // 公共服务(政策级别)一级分类id + policyCategoryL2: "", policyLevel: "", //政府级别 startDate: "", //起始时间yyyy-MM-dd endDate: "", //截止时间yyyy-MM-dd @@ -499,16 +508,18 @@ export default { }, components: { rule, labelForm }, async mounted() { - this.startLoading(); - this.getServiceTypeDictOptions(); - this.getDictOptions(); - this.loadScopeTree(); + await this.startLoading(); + await this.getServiceTypeDictOptions(); + await this.getDictOptions(); + await this.loadScopeTree(); await this.loadDemandoption(); if (this.formType === "add") { this.$refs.ref_form.resetFields(); } else { - this.loadFormInfo(); + await this.loadFormInfo(); + await this.handleChangeServiceTypeLevel1(); + await this.handleServiceChange(); } this.endLoading(); @@ -545,22 +556,29 @@ export default { }, async loadFormInfo() { - const url = "/heart/policy/detail/" + this.policyId; + const url = "/governance/policy/policyDetail/" + this.policyId; let params = {}; - const { data, code, msg } = await requestPost(url, params); + const { data, code, msg } = await requestGet(url, params); if (code === 0) { this.demandIdArray = []; - data.categoryList.forEach((element) => { - let arr = element.codePath.split(","); - this.demandIdArray.push(arr); - }); + // data.categoryList.forEach((element) => { + // let arr = element.codePath.split(","); + // this.demandIdArray.push(arr); + // }); // this.formData.ruleList = data.ruleList - + data.policyLevel = "" + data.policyLevel; this.formData = data; - + this.newFormData = data.assignInfo; + if (data.assignInfo) { + for (let i in data.assignInfo.serviceScopeList) { + this.newFormData.serviceScopeList.push( + data.assignInfo.serviceScopeList[i].objectId + ); + } + } if (data.attachmentList) { this.fileList = data.attachmentList; } @@ -614,13 +632,11 @@ export default { this.$message.error(msg); } }, - async handleServiceChange(type, val) { - console.log(val); - await this.getServiceuserList(val); + async handleServiceChange() { + await this.getServiceuserList(); }, - - async getServiceuserList(serverOrgType) { - if (!serverOrgType) return false; + async getServiceuserList() { + if (!this.formData.assignInfo) return; if (this.formData.commonServiceTypeId == "") { this.$message.error("请先选择需求类别!"); return; @@ -628,9 +644,10 @@ export default { const url = "/actual/base/serviceitem/listServerOrg"; let params = { serviceTypeId: this.formData.policyCategoryL2, - serverOrgType: serverOrgType, + serverOrgType: this.formData.assignInfo.serverOrgType, businessType: "common_service", }; + console.log(this.formData); let { data, code, msg } = await requestPost(url, params); if (code == 0) { this.serviceOptiondList = data; @@ -654,7 +671,7 @@ export default { console.log("组织类型获取失败!"); }); }, - async getDictOptions() { + getDictOptions() { // 政策级别下拉 this.$http .post("/sys/dict/data/dictlist", { @@ -746,8 +763,7 @@ export default { // this.addFuwu(); // } // }); - this.addFuwu(); - + this.addFuwu(); }, getLastItem(list, vals, key) { let LIST = list || []; @@ -766,8 +782,9 @@ export default { } }, async operationOption() { - this.sarr = [] + this.sarr = []; // 使用递归找出符合条件的数据需要 + if (!this.newFormData) return; await this.getLastItem( this.casOptions, this.newFormData.serviceScopeList, @@ -798,42 +815,53 @@ export default { // 处理服务范围数据 await this.operationOption(); // this.formData.attachmentList = [...this.fileList]; - this.fileList.forEach(item=>{ - this.formData.attachmentList.push({ - name:item.attachmentName, - type:item.attachmentType, - url:item.attachmentUrl, - format:item.attachmentFormat, - duration:0, - }) - }) + // this.fileList.forEach(item=>{ + // this.formData.attachmentList.push({ + // name:item.attachmentName, + // type:item.attachmentType, + // url:item.attachmentUrl, + // format:item.attachmentFormat, + // duration:0, + // }) + // }) this.formData.assignInfo = this.newFormData; - let url = "/governance/policy/addPolicy"; + let url = ""; if (this.formType === "add" || this.formType === "copy") { url = "/governance/policy/addPolicy"; // this.formData.policyId = ""; } else { - url = "/heart/policy/update"; - // this.formData.policyId = this.policyId; + url = "/governance/policy/updatePolicy"; + this.formData.policyId = this.policyId; + } + //为什么不能传null还要返回null呢? + if (this.formType == "copy"&& this.formData.assignFlag == 0) { + this.formData.assignInfo = { + noticeApproches: [], + serverOrgId: "", + serverOrgType: "", + serviceScopeList: [], + serviceTimeEnd: "", + serviceTimeStart: "", + }; + this.formData.attachmentList = [] } - // const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate' let params = { ...this.formData, }; - delete params.policyTypeLevel1Id - delete params.resiSearchTagName + delete params.policyCategoryL1; + delete params.resiSearchTagName; console.log(params); - const { data, code, msg } = await requestPost(url, params) + const { data, code, msg } = await requestPost(url, params); if (code === 0) { - this.$message.success('操作成功') - this.resetData() - this.$emit('handleOk') + this.$message.success("操作成功"); + this.resetData(); + this.$emit("handleOk"); } else { - this.btnDisable = false - this.$message.error(msg) + this.btnDisable = false; + this.$message.error(msg); } }, @@ -984,11 +1012,11 @@ export default { // 服务类型下拉框选中事件 handleChangeServiceTypeLevel1() { - this.formData.policyCategoryL2 = ""; + // this.formData.policyCategoryL2 = ""; this.$http .get( "/governance/commonServiceType/selectList/" + - this.formData.policyTypeLevel1Id + this.formData.policyCategoryL1 ) .then(({ data: res }) => { if (res.code !== 0) { diff --git a/src/views/modules/communityService/policy/policyList.vue b/src/views/modules/communityService/policy/policyList.vue index 10dc87899..01a58dec3 100644 --- a/src/views/modules/communityService/policy/policyList.vue +++ b/src/views/modules/communityService/policy/policyList.vue @@ -356,19 +356,19 @@ export default { }, async handleDetail(row) { - this.policyId = row.policyId; + this.policyId = row.id; this.addDiaTitle = "政策详情"; this.formType = "detail"; this.showAdd = true; }, async handleEdit(row) { - this.policyId = row.policyId; + this.policyId = row.id; this.addDiaTitle = "编辑政策"; this.formType = "edit"; this.showAdd = true; }, async handleCopy(row) { - this.policyId = row.policyId; + this.policyId = row.id; this.addDiaTitle = "新增政策"; this.formType = "copy"; this.showAdd = true; @@ -425,7 +425,7 @@ export default { }, async handleDel(row) { - this.policyId = row.policyId; + this.policyId = row.id; this.$confirm("确认删除政策?", "提示", { confirmButtonText: "确定", @@ -446,7 +446,7 @@ export default { }, async delPolicy() { - const url = `/heart/policy/delete/${this.policyId}`; + const url = `/governance/policy/deletePolicy/${this.policyId}`; const { data, code, msg } = await requestPost(url, {}); diff --git a/src/views/modules/cpts/base2/cpts/edit.vue b/src/views/modules/cpts/base2/cpts/edit.vue index 89e574dad..ead2d1097 100644 --- a/src/views/modules/cpts/base2/cpts/edit.vue +++ b/src/views/modules/cpts/base2/cpts/edit.vue @@ -281,6 +281,10 @@ ref="mapSearch" @click="handleSearchMap(item)">查询 --> +
+ {{ fmData[item.keyName] || "--" }}
- + +
-
- {{ fmData[item.keyName] || "--" }} -
+
- +
{{ editConfig.confirmBtnName || "确定" }} +
- + -
-
-

检查记录

-
-
- 新增 -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
+ + + + + + + + + + + + + +
+ + @@ -586,9 +676,9 @@ export default { @import "@/assets/scss/modules/management/list-main.scss"; .mt10 { - margin-bottom: 10px; + margin-bottom: 10px; } .input-width { - width: 170px; + width: 170px; } diff --git a/src/views/modules/shequzhili/tuceng/zhonghe/shebei/index.vue b/src/views/modules/shequzhili/tuceng/zhonghe/shebei/index.vue index ed9f4cbdc..499fcd5b5 100644 --- a/src/views/modules/shequzhili/tuceng/zhonghe/shebei/index.vue +++ b/src/views/modules/shequzhili/tuceng/zhonghe/shebei/index.vue @@ -24,7 +24,6 @@ >