diff --git a/src/router/index.js b/src/router/index.js index 176105423..e1fb606fc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -539,7 +539,7 @@ export const dataBoardRoutes = { component: () => import("@/views/dataBoard/satisfactionEval/index"), name: "dataBoard-satisfactionEval-index", meta: { - title: "满意度评价", + title: "群众满意度", isTab: false, }, }, diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index 59d554eb2..9b3b20388 100644 --- a/src/views/components/resiForm.vue +++ b/src/views/components/resiForm.vue @@ -436,7 +436,7 @@ export default { this.handleNextOrgTreeClick(node, resolve) }, checkStrictly: true, - multiple: false + multiple: false, }, activeName: 'groupeduInfoDto', validateFlag: null, @@ -552,8 +552,9 @@ export default { { label: '残疾', value: '0', formName: "disabilityFlag" }, { label: '大病', value: '0', formName: "seriousIllnessFlag" }, { label: '慢病', value: '0', formName: "chronicDiseaseFlag" }, - { label: '公益岗人员', value: '0', formName: "publicWelfareFlag" } - + { label: '公益岗人员', value: '0', formName: "publicWelfareFlag" }, + { label: '楼长', value: '0', formName: "buildingChiefFlag" }, + { label: '单元长', value: '0', formName: "unitChiefFlag" } ] } ], @@ -1398,6 +1399,8 @@ export default { disabilityFlag: '0',//是否残疾 seriousIllnessFlag: '0', //大病 chronicDiseaseFlag: '0', //慢病 + buildingChiefFlag: '0', //楼长 + unitChiefFlag: '0', //单元长 eduInfoDto: { // 教育信息 cultureLevel: '', @@ -1718,25 +1721,22 @@ export default { }) }, async handleNextOrgTreeClick (node,resolve) { - console.log(node,resolve); await this.getTreeChildenList(node,resolve) }, async getTreeChildenList (node, resolve) { - if (node.data.partyOrgLevel === 7) { - resolve([]); // 直接解决为空数组,不执行请求 + if (node.data.partyOrgLevel === 7 ) { + resolve(null); return; - } + } const url = "/actual/base/party/org/listNextLevelPartyOrgTreeNodesByPid" - console.log('级联', node.value) let params = { partyOrgPid: node.data.id } const { data, code, msg } = await requestGet(url, params) if (code === 0) { data.forEach(item => { - if (item.partyOrgLevel === 7) { - item.children = null; // 或 item.children = []; - } + item.children = null; + item.leaf = item.partyOrgLevel === 7 || item.childrenQty === 0 }); resolve(data) } else { @@ -2312,7 +2312,8 @@ export default { this.form.floatingFlag = data.categoryInfo.floatingFlag.toString() this.form.liveAloneFlag = data.categoryInfo.liveAloneFlag.toString() this.form.publicWelfareFlag = data.categoryInfo.publicWelfareFlag.toString() - this.form.publicWelfareFlag = data.categoryInfo.publicWelfareFlag.toString() + this.form.buildingChiefFlag = data.categoryInfo.buildingChiefFlag.toString() + this.form.unitChiefFlag = data.categoryInfo.unitChiefFlag.toString() if (this.form.partyFlag == '1') this.tabsList.push({ label: '党员', id: '0', groupId: 'parymemberInfoDto' }) if (this.form.ensureHouseFlag == '1') this.tabsList.push({ label: '保障房信息', id: '1', groupId: 'ensureHouseDto' }) @@ -2331,7 +2332,7 @@ export default { villageId, birthday, gender, idType, idNum, localResidenceFlag, mobile, name, nation, nationality, remark, partyFlag, subsistenceAllowanceFlag, ensureHouseFlag, unemployedFlag, fertileWomanFlag, veteranFlag, unitedFrontFlag, petitionOfficerFlag, volunteerFlag, oldPeopleFlag, emptyNesterFlag, specialSupportFlag, disabledFlag, - dementedFlag, disabilityFlag, seriousIllnessFlag, chronicDiseaseFlag, specialCrowdFlag, tenantFlag, floatingFlag, liveAloneFlag, publicWelfareFlag } = this.form + dementedFlag, disabilityFlag, seriousIllnessFlag, chronicDiseaseFlag, specialCrowdFlag, tenantFlag, floatingFlag, liveAloneFlag, publicWelfareFlag,buildingChiefFlag, unitChiefFlag} = this.form this.newForm = { categoryId, resiId, @@ -2375,7 +2376,8 @@ export default { floatingFlag, liveAloneFlag, publicWelfareFlag, - + buildingChiefFlag, + unitChiefFlag, } }, // 教育信息详情 @@ -2863,7 +2865,9 @@ export default { this.newForm.disabilityFlag = this.form.disabilityFlag, this.newForm.seriousIllnessFlag = this.form.seriousIllnessFlag, this.newForm.chronicDiseaseFlag = this.form.chronicDiseaseFlag, - this.newForm.publicWelfareFlag = this.form.publicWelfareFlag + this.newForm.publicWelfareFlag = this.form.publicWelfareFlag, + this.newForm.buildingChiefFlag = this.form.buildingChiefFlag, + this.newForm.unitChiefFlag = this.form.unitChiefFlag if (this.newForm.eduInfoDto) { this.newForm.eduInfoDto = this.form.eduInfoDto @@ -2936,7 +2940,7 @@ export default { this.newForm.specialSupportDto = this.form.specialSupportDto } - } + }, } } @@ -2979,4 +2983,7 @@ export default { .item-agency { width: 400px; } +::v-deep .no-expand>:nth-child(1) .cell .el-table__expand-icon{ + display: none; +} diff --git a/src/views/dataBoard/renfang/index.vue b/src/views/dataBoard/renfang/index.vue index 0664e1ee3..d1704d40a 100644 --- a/src/views/dataBoard/renfang/index.vue +++ b/src/views/dataBoard/renfang/index.vue @@ -722,31 +722,25 @@ export default { //居民分类分析数据 async getResiCategoryData() { - const url = "resident_class_statics"; - - const { data, code, msg } = await requestPostBi( - url, - { - queryParam: { - org_id: this.orgId, - }, - }, - { - // mockId: 60031937, - } - ); - + const url = "/actual/base/resiCategory/categoryCountList"; + let params = { + // id: this.orgData.id, + // level: "agency", + }; + const { data, code, msg } = await requestGet(url, params); if (code === 0) { - this.resiCategoryData = data.map((item) => { - return { - code: item.label_id, - name: item.label, - count: item.count, - ratio: item.ratio, - growth: item.growth, - growthAbs: Math.abs(item.growth), - }; - }); + if (data) { + this.resiCategoryData = data.categoryList.map((item) => { + return { + code: item.categoryName, + name: resiCategoryMap[item.categoryName] || "", + count: item.categoryCount, + ratio: ((100 * item.categoryCount) / data.resiCount).toFixed(0), + growth: 0, + growthAbs: Math.abs(item.growth), + }; + }); + } } else { this.$message.error(msg); } diff --git a/src/views/modules/base/community/communityForm.vue b/src/views/modules/base/community/communityForm.vue index 64dd16dee..3dbcd7528 100644 --- a/src/views/modules/base/community/communityForm.vue +++ b/src/views/modules/base/community/communityForm.vue @@ -168,7 +168,9 @@ export default { // label: 'agencyName', // value: 'agencyId', lazy: true, - lazyLoad: this.lazyLoadAgency + lazyLoad:(node, resolve) => { + this.lazyLoadAgency(node, resolve) + }, }, userAgencyId: '', } @@ -182,10 +184,8 @@ export default { }, methods: { - lazyLoadAgency(node, resolve) { - setTimeout(() => { - this.getAgency(node, resolve) - }, 200) + async lazyLoadAgency(node, resolve) { + await this.getAgency(node, resolve) }, async getAgency(node, resolve) { const url = "/gov/org/agency/dynamicOrgTreeWithDepth" @@ -206,8 +206,9 @@ export default { label: item.name, level: item.agencyLevel, orgType: item.orgType, - leaf: node.level >= 4 // 5层级 + leaf: item.orgType == 'grid' // 5层级 })) + console.log(nodes); resolve(nodes) } else { this.$message.error(msg) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 7d2b4a14c..b9bd516fe 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -210,6 +210,16 @@ ? "志愿者 " : "" }} + {{ + scope.row.categoryInfo.buildingChiefFlag == 1 + ? "楼长 " + : "" + }} + {{ + scope.row.categoryInfo.unitChiefFlag == 1 + ? "单元长 " + : "" + }} @@ -975,6 +985,11 @@ export default { _baseForm.disabledFlag = parseInt(_baseForm.disabledFlag); //失能老人 _baseForm.dementedFlag = parseInt(_baseForm.dementedFlag); //失智老人 _baseForm.disabilityFlag = parseInt(_baseForm.disabilityFlag); //是否残疾 + + _baseForm.buildingChiefFlag = parseInt(_baseForm.buildingChiefFlag); //是否楼长 + _baseForm.unitChiefFlag = parseInt(_baseForm.unitChiefFlag); //是否单元长 + + _baseForm.seriousIllnessFlag = parseInt( _baseForm.seriousIllnessFlag ); //大病 @@ -1092,7 +1107,6 @@ export default { }, async getTableData(obj) { - console.log(this.currentPage); let params = { pageNo: this.currentPage, pageSize: this.pageSize, diff --git a/src/views/modules/base/virtualResi.vue b/src/views/modules/base/virtualResi.vue index f44180e0c..240c1fdee 100644 --- a/src/views/modules/base/virtualResi.vue +++ b/src/views/modules/base/virtualResi.vue @@ -1083,7 +1083,6 @@ export default { }, async getTableData(obj) { - console.log(this.currentPage); let params = { pageNo: this.currentPage, pageSize: this.pageSize, diff --git a/src/views/modules/communityParty/partyOrg/update.vue b/src/views/modules/communityParty/partyOrg/update.vue index 1d73a2fc1..759a0d1de 100644 --- a/src/views/modules/communityParty/partyOrg/update.vue +++ b/src/views/modules/communityParty/partyOrg/update.vue @@ -168,12 +168,14 @@ export default { this.dataForm.principalId = partyOrgInfo.principalId; console.log(this.principals) console.log(this.dataForm.principalId ) + this.$nextTick(()=>{ if (!map) { this.initMap(this.dataForm.latitude, this.dataForm.longitude); } else { map.setCenter(this.dataForm.latitude, this.dataForm.longitude); map.setMarker(this.dataForm.latitude, this.dataForm.longitude); } + }) }, // 初始化地图 diff --git a/src/views/modules/communityParty/regionalParty/unitsForm.vue b/src/views/modules/communityParty/regionalParty/unitsForm.vue index 0f0b06f59..7f76ce9ce 100644 --- a/src/views/modules/communityParty/regionalParty/unitsForm.vue +++ b/src/views/modules/communityParty/regionalParty/unitsForm.vue @@ -480,6 +480,9 @@ export default { longitude: [ { required: true, message: "坐标不能为空", trigger: "blur" }, ], + serviceMatterList:[ + { required: true, message: "服务事项不能为空", trigger: "blur" }, + ] }; }, }, diff --git a/src/views/modules/portrayal/jumin/cpts/rightTop.vue b/src/views/modules/portrayal/jumin/cpts/rightTop.vue index 37706683f..c3f28f963 100644 --- a/src/views/modules/portrayal/jumin/cpts/rightTop.vue +++ b/src/views/modules/portrayal/jumin/cpts/rightTop.vue @@ -1,90 +1,128 @@ \ No newline at end of file diff --git a/src/views/modules/portrayal/loudong/cpts/buildingTable.vue b/src/views/modules/portrayal/loudong/cpts/buildingTable.vue deleted file mode 100644 index af3a15433..000000000 --- a/src/views/modules/portrayal/loudong/cpts/buildingTable.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/src/views/modules/portrayal/loudong/cpts/house.vue b/src/views/modules/portrayal/loudong/cpts/house.vue deleted file mode 100644 index af3a15433..000000000 --- a/src/views/modules/portrayal/loudong/cpts/house.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/src/views/modules/portrayal/loudong/cpts/unit.vue b/src/views/modules/portrayal/loudong/cpts/unit.vue deleted file mode 100644 index af3a15433..000000000 --- a/src/views/modules/portrayal/loudong/cpts/unit.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - - diff --git a/src/views/modules/satisfaction/communitySelfInsp/index.vue b/src/views/modules/satisfaction/communitySelfInsp/index.vue index bbb4b9fd0..bc38e6ff6 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/index.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/index.vue @@ -344,7 +344,7 @@ export default { this.option.series[2].data.push(item.badQty) this.option.xAxis.data.push(item.satisfactionCategoryName) this.satisfactionCategory.push(item.satisfactionCategory) - this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`) }); + this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`@/assets/img/satisfaction/${item.satisfactionCategory}.png`) }); } }); this.myChart.setOption(this.option); diff --git a/src/views/modules/satisfaction/satisfactionProvince/formList.vue b/src/views/modules/satisfaction/satisfactionProvince/formList.vue index 4cb06e463..a15dc566d 100644 --- a/src/views/modules/satisfaction/satisfactionProvince/formList.vue +++ b/src/views/modules/satisfaction/satisfactionProvince/formList.vue @@ -96,11 +96,9 @@ export default { //创建前 created() { }, async mounted() { - if (this.satisfactionCategoryStr) { - this.formData.scopeId = this.satisfactionCategoryStr + this.formData.scopeId = this.formObj.scopeId this.formData.periodStart = this.formObj.periodStart this.formData.orgCategoryCode = this.formObj.orgCategoryCode - } await this.loadAgency(); await this.getDicts() await this.getTableData() @@ -215,10 +213,7 @@ export default { //计算 computed: {}, props: { - satisfactionCategoryStr: { - type: String, - default: '' - }, + formObj: { type: Object, default: () => {} diff --git a/src/views/modules/satisfaction/satisfactionProvince/index.vue b/src/views/modules/satisfaction/satisfactionProvince/index.vue index 487cea591..0e8a322ee 100644 --- a/src/views/modules/satisfaction/satisfactionProvince/index.vue +++ b/src/views/modules/satisfaction/satisfactionProvince/index.vue @@ -1,59 +1,59 @@ - + - - \ No newline at end of file + + \ No newline at end of file diff --git a/src/views/modules/shequzhili/event/cpts/event-info.vue b/src/views/modules/shequzhili/event/cpts/event-info.vue index 018af9492..ab6605a54 100644 --- a/src/views/modules/shequzhili/event/cpts/event-info.vue +++ b/src/views/modules/shequzhili/event/cpts/event-info.vue @@ -388,7 +388,7 @@ export default { this.eventInfoData.categoryList.push(this.replayInfo.categoryId); } } else if (this.formData.operationType === '5') { - this.replayInfo = this.$refs.ref_process_form_designate.replayInfo; + this.replayInfo = this.$refs.ref_processinfo_add.replayInfo; //回复属性赋值 this.eventInfoData.content = this.replayInfo.content; this.eventInfoData.status = this.replayInfo.status; diff --git a/src/views/modules/shequzhili/event/eventList.vue b/src/views/modules/shequzhili/event/eventList.vue index 79d333d2f..b6deb8152 100644 --- a/src/views/modules/shequzhili/event/eventList.vue +++ b/src/views/modules/shequzhili/event/eventList.vue @@ -309,10 +309,6 @@ export default { { value: "3", label: "12345", - }, - { - value: "5", - label: "北尚诉办", } ], diff --git a/src/views/modules/shequzhili/eventOld/cpts/add.vue b/src/views/modules/shequzhili/eventOld/cpts/add.vue index 575d9367d..1ed27b5d5 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/add.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/add.vue @@ -1,705 +1,617 @@ + + - - - + + - \ No newline at end of file +} + diff --git a/src/views/modules/shequzhili/eventOld/cpts/event-detail.vue b/src/views/modules/shequzhili/eventOld/cpts/event-detail.vue index e79d6c436..7f4d5ae63 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/event-detail.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/event-detail.vue @@ -446,7 +446,7 @@ export default { satisfyLevel = "perfect"; } } - const url = "/governance/icEvent/comment"; + const url = "/governance/icEventOld/comment"; let params = { icEventId: this.eventId, diff --git a/src/views/modules/shequzhili/eventOld/cpts/event-info.vue b/src/views/modules/shequzhili/eventOld/cpts/event-info.vue index 3ad7a4c57..620928a76 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/event-info.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/event-info.vue @@ -2,7 +2,15 @@
-

新增事件

+

+ + 新增事件 +

-

处理

+

+ + 处理 +

-
+
- 处理 + + 处理
-
+
0) { + } else if (this.formData.operationType === "5") { + this.replayInfo = this.$refs.ref_processinfo_add.replayInfo; + //回复属性赋值 + this.eventInfoData.content = this.replayInfo.content; + this.eventInfoData.status = this.replayInfo.status; + this.eventInfoData.timeLimit = this.replayInfo.timeLimit; + if (this.replayInfo.categoryId) { this.eventInfoData.categoryList = []; - this.eventInfoData.categoryList.push(this.project.categoryList[0].id); + this.eventInfoData.categoryList.push(this.replayInfo.categoryId); } - - console.log("projectInfo", this.project); - } else if (this.formData.operationType === "2") { - this.replayInfo = {}; - this.project = {}; - this.demand = this.$refs.ref_processinfo_add.demand; - this.demand.gridId = this.eventInfoData.gridId; - //需求的属性同事件一样 - // this.eventInfoData.categoryList = [] - // this.eventInfoData.categoryList.push(this.demand.categoryId) - console.log("demond", this.demand); - } else if (this.formData.operationType === "3") { - this.project = {}; - this.demand = {}; + } else if (this.formData.operationType === "4") { this.replayInfo = {}; - this.issueInfo = this.$refs.ref_processinfo_add.issueInfo; - - if ( - this.issueInfo.categoryList && - this.issueInfo.categoryList.length > 0 - ) { - this.eventInfoData.categoryList = []; - this.eventInfoData.categoryList.push( - this.issueInfo.categoryList[0].id - ); - } - console.log("issueInfo", this.issueInfo); } // } @@ -542,14 +553,15 @@ export default { }, async submit() { + // (this.formData.operationType == 2 && this.demand.demandUserName) ||(this.formData.operationType == 3 && this.issueInfo.issueTitle) || (this.formData.operationType == 1 && this.project.categoryList) ||(this.formData.operationType == 0 && this.eventInfoData.content) || if ( - (this.formData.operationType == 3 && this.issueInfo.issueTitle) || - (this.formData.operationType == 2 && this.demand.demandUserName) || - (this.formData.operationType == 1 && this.project.categoryList) || - (this.formData.operationType == 0 && this.eventInfoData.content) || - this.formData.operationType == 4 + this.formData.operationType == "4" || + this.formData.operationType == "5" || + this.formData.operationType == "6" || + this.formData.operationType == "0" || + this.formData.operationType == "2" ) { - const url = "/governance/icEvent/add"; + const url = "/governance/icEventOld/add"; const { formData } = this; const { data, code, msg } = await requestPost(url, { ...formData, @@ -582,7 +594,7 @@ export default { this.replayInfo.icEventId = this.eventId; console.log("replayInfo", this.replayInfo); //回复属性赋值 - let url = "/governance/icEvent/reply"; + let url = "/governance/icEventOld/reply"; await this.submitDispose(url, this.replayInfo); } else if (this.formData.operationType === "1") { this.replayInfo = {}; @@ -591,7 +603,7 @@ export default { //项目的属性同事件一样 this.project.icEventId = this.eventId; console.log("projectInfo", this.project); - let url = "/governance/icEvent/icEventToProject"; + let url = "/governance/icEventOld/icEventToProject"; await this.submitDispose(url, this.project); } else if (this.formData.operationType === "2") { this.replayInfo = {}; @@ -600,7 +612,7 @@ export default { //需求的属性同事件一样 this.demand.icEventId = this.eventId; console.log("demond", this.demand); - let url = "/governance/icEvent/icEventToDemand"; + let url = "/governance/icEventOld/icEventToDemand"; await this.submitDispose(url, this.demand); } else if (this.formData.operationType === "3") { this.replayInfo = {}; @@ -610,7 +622,7 @@ export default { //项目的属性同事件一样 console.log("issueInfo", this.issueInfo); - let url = "/governance/icEvent/icEventToIssue"; + let url = "/governance/icEventOld/icEventToIssue"; await this.submitDispose(url, this.issueInfo); } else { this.$message.info("请选择一种处理方式"); diff --git a/src/views/modules/shequzhili/eventOld/cpts/process-form-designate.vue b/src/views/modules/shequzhili/eventOld/cpts/process-form-designate.vue index 0c3af3a14..a87027c5c 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/process-form-designate.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/process-form-designate.vue @@ -13,7 +13,7 @@ prop="categoryList">
@@ -28,6 +28,15 @@ placeholder="请输入转办意见,不超过500字" v-model="formData.content">
+ + + 点击上传 +
支持图片、word、pdf
+
+
@@ -55,7 +64,8 @@ export default { categoryId: "",//事件分类 deptId: "", //指派部门 deptName: "", - categoryList: [] + categoryList: [], + files: [] //附件 }, orgOptions: [], orgOptionProps: { @@ -71,12 +81,15 @@ export default { eventDetailCopy: {}, selCategoryArray: [], casOptions: [], + fileList: [], + uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile", iscascaderShow: 0, optionProps: { multiple: false, value: "id", - label: "name", - children: "subCategory", + label: "categoryName", + children: "children", + checkStrictly: true }, dataRule: { content: [ @@ -90,10 +103,13 @@ export default { ], timeLimit: [ { required: true, message: "办结时限不能为空", trigger: "blur" }, + ], + categoryList: [ + { required: true, message: '事件分类不能为空', trigger: 'blur' }, ] }, - selCateObj:{ - id:"" + selCateObj: { + id: "" }, }; }, @@ -126,12 +142,11 @@ export default { this.getCategoryList(); if (this.eventId) { this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); - console.log(this.eventDetailCopy); // 这一步接收到eventDetailCopy在这里回填 if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { - this.selCateObj.id = this.eventDetailCopy.categoryId - this.formData.categoryId = this.eventDetailCopy.categoryId - this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId, this.eventDetailCopy.categoryId) + this.selCategoryArray = this.eventDetailCopy.parentCategoryId.split(","); + this.selCategoryArray.push(this.eventDetailCopy.categoryId); + this.handleChangeCate(this.selCategoryArray) } } }, @@ -152,18 +167,40 @@ export default { } }, async getCategoryList() { - const url = "/governance/issueprojectcategorydict/list"; + const url = '/governance/icEvent/getCategoryTree'; let params = {}; const { data, code, msg } = await requestPost(url, params); if (code === 0) { - let treeDataNew = this.filterTree(data); - //组织级联数据 + let treeDataNew = this.deepTree(data, "children"); ++this.iscascaderShow; this.casOptions = []; this.casOptions = treeDataNew; } else { this.$message.error(msg); } + if (this.eventDetailCopy.parentCategoryId) { + const pids = this.eventDetailCopy.parentCategoryId.split(','); + pids.push(this.eventDetailCopy.categoryId); + let nodes = this.casOptions; + for (let i = 0; i < pids.length; i++) { + nodes = this.buildNode(nodes, pids[i]) + } + if (nodes) { + this.formData.categoryList.push(nodes) + this.selCateObj = nodes + } + } + }, + buildNode(nodes, treeId) { + for (let i = 0; i < nodes.length; i++) { + if (nodes[i].id === treeId) { + if (nodes[i].children) { + return nodes[i].children + } else { + return nodes[i] + } + } + } }, handleChangeAgency(val) { let obj = this.$refs["agencyIdArray"].getCheckedNodes()[0].data @@ -171,7 +208,6 @@ export default { this.formData.orgType = obj.level === 'grid' ? 'grid' : 'agency' this.formData.deptId = obj.agencyId this.formData.deptName = obj.agencyName - } else { this.form.orgType = '' this.form.orgId = '' @@ -180,25 +216,26 @@ export default { handleChangeCate() { if (this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]) { this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data + this.formData.categoryList = this.selCateObj this.formData.categoryId = this.selCateObj.id - console.log(this.formData.categoryId,'this.formData.categoryId'); } else { this.selCateObj = {} } }, //重构树,去除网格 - filterTree(arr) { - let childs = arr; - for (let i = childs.length; i--; i > 0) { - if (childs[i].subCategory) { - if (childs[i].subCategory.length) { - this.filterTree(childs[i].subCategory); - } else { - delete childs[i].subCategory; - } - } + deepTree(arr, children) { + if (Array.isArray(arr) && arr.length > 0) { + return arr.map((item) => { + return { + ...item, + [children]: + (item[children] && + item[children].length > 0 && + this.deepTree(item[children], children)) || + null, + }; + }); } - return arr; }, async getReplayInfo() { this.okflag = false; @@ -206,11 +243,13 @@ export default { if (!valid) { app.util.validateRule(messageObj); } else { - console.log(this.selCateObj); if (!this.selCateObj || !this.selCateObj.id) { this.$message.error("请选择事件分类"); return false; } + if (this.fileList) { + this.formData.files = this.fileList + } this.formData.status = "processing"; this.formData.categoryId = this.selCateObj.id; this.formData.categoryList = []; @@ -222,6 +261,74 @@ export default { resetData() { this.agencyIdArray = [] }, + beforeUpload(file) { + const array = file.name.split("."); + const extension = array[array.length - 1]; + const formatarray = [ + "jpg", + "png", + "jpeg", + "bmp", + "mp4", + "wma", + "m4a", + "mp3", + "doc", + "docx", + "xls", + "xlsx", + "pdf", + ]; + if (formatarray.indexOf(extension) === -1) { + this.$message.error("只支持图片、word、pdf"); + return false; + } + }, + handleFileRemove(file) { + if (file && file.status === "success") { + this.fileList.splice( + this.fileList.findIndex((item) => item.uid === file.uid), + 1 + ); + } + }, + handleFileSuccess(res, file) { + if (res.code === 0 && res.msg === "success") { + const array = file.name.split("."); + const fileType = array[array.length - 1]; + const picArray = ["jpg", "png", "jpeg", "bmp"]; + const videoarray = ["mp4", "wma", "m4a"]; + const docArray = ["doc", "docx", "xls", "xlsx", "pdf"]; + const mp3Array = ["mp3"]; + + if (picArray.indexOf(fileType) > -1) { + file.attachmentFormat = "image"; + } else if (videoarray.indexOf(fileType) > -1) { + file.attachmentFormat = "video"; + } else if (docArray.indexOf(fileType) > -1) { + file.attachmentFormat = "doc"; + } else if (mp3Array.indexOf(fileType) > -1) { + file.attachmentFormat = "voice"; + } + + file.url = res.data.url; + file.type = fileType; + + file.attachmentName = file.name; + file.attachmentType = file.type; + file.attachmentUrl = file.url; + + this.fileList.push(file); + } else this.$message.error(res.msg); + }, + //下载 + handleFileDownload(file) { + var a = document.createElement("a"); + var event = new MouseEvent("click"); + a.download = file.name; + a.href = file.url; + a.dispatchEvent(event); + }, // 开启加载动画 startLoading() { loading = Loading.service({ diff --git a/src/views/modules/shequzhili/eventOld/cpts/process-form-replay-end.vue b/src/views/modules/shequzhili/eventOld/cpts/process-form-replay-end.vue index 9cad30838..a7ad2654f 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/process-form-replay-end.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/process-form-replay-end.vue @@ -1,8 +1,8 @@ 转服务 - 转议题 - + - -
- +
+
- -
+
+ +
+
+ +
+ + +
+
- -
- - -
-
+
-
@@ -72,27 +86,26 @@ import processFormReplay from "./process-form-replay"; import processFormProject from "./process-form-project"; import processFormDemand from "./process-form-demand"; import processFormIssue from "./process-form-issue"; - +import processFormReplayEnd from "./process-form-replay-end"; +import processFormDesignate from "./process-form-designate"; let loading; // 加载动画 export default { - data () { + data() { return { - casOptions: [], iscascaderShow: 0, selCategoryArray: [], selCateObj: {}, optionProps: { multiple: false, - value: 'id', - label: 'name', - children: 'subCategory', + value: "id", + label: "name", + children: "subCategory", }, - operationType: '', - + operationType: "", replayInfo: {}, demand: {}, @@ -101,30 +114,28 @@ export default { okflag: false, eventDetailCopy: {}, - transferObj:{ - latitude :"", - longitude :"" - } + transferObj: { + latitude: "", + longitude: "", + }, }; }, components: { processFormReplay, processFormProject, processFormDemand, - processFormIssue + processFormIssue, + processFormReplayEnd, + processFormDesignate, }, computed: { - dataRule () { + dataRule() { return { - operationType: [ { required: true, message: "处理方式不能为空", trigger: "blur" }, ], - }; }, - - }, props: { demandUserId: { @@ -149,107 +160,89 @@ export default { }, eventDetailData: { type: Object, - default () { - return {} - } + default() { + return {}; + }, }, - source: {//展示来源:manage 管理平台 visiual 可视化平台 + source: { + //展示来源:manage 管理平台 visiual 可视化平台 type: String, - default: 'manage' - } - }, - - watch: { - + default: "manage", + }, }, - created () { - - console.log(this.source) + watch: {}, + created() { + console.log(this.source); }, - async mounted () { - const { user } = this.$store.state - this.agencyId = user.agencyId + async mounted() { + const { user } = this.$store.state; + this.agencyId = user.agencyId; if (this.eventId) { this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); - } - if(this.eventDetailData.operationType){ - this.operationType = this.eventDetailCopy.operationType + if (this.eventDetailData.operationType) { + this.operationType = this.eventDetailCopy.operationType; // this.getProcessInfo() } - this.$EventBus.$on('map',(val)=>{ - this.transferObj.latitude = val.lat - this.transferObj.longitude = val.lng - }) + this.$EventBus.$on("map", (val) => { + this.transferObj.latitude = val.lat; + this.transferObj.longitude = val.lng; + }); }, methods: { - handleChangeOperationType (val) { - + handleChangeOperationType(val) { + this.operationType = val; }, - async getProcessInfo () { - this.okflag = false - if (this.operationType === '0') { - this.$refs.ref_process_form_replay.getReplayInfo() + async getProcessInfo() { + this.okflag = false; + if (this.operationType === "0") { + this.$refs.ref_process_form_replay.getReplayInfo(); if (this.$refs.ref_process_form_replay.okflag) { - this.replayInfo = this.$refs.ref_process_form_replay.formData - - this.okflag = true - - } else { - return false - } - - } else if (this.operationType === '1') { - this.$refs.ref_process_form_project.getProjectInfo() - if (this.$refs.ref_process_form_project.okflag) { - - this.project = this.$refs.ref_process_form_project.formData - - //赋值分类信息 - this.okflag = true + this.replayInfo = this.$refs.ref_process_form_replay.formData; + this.okflag = true; } else { - return false + return false; } - } else if (this.operationType === '2') { - this.$refs.ref_process_form_demond.getDemandInfo() + } else if (this.operationType === "2") { + this.$refs.ref_process_form_demond.getDemandInfo(); if (this.$refs.ref_process_form_demond.okflag) { - this.demand = this.$refs.ref_process_form_demond.formData - - this.okflag = true + this.demand = this.$refs.ref_process_form_demond.formData; + this.okflag = true; } else { - return false + return false; } - } else if (this.operationType === '3') { - this.$refs.ref_process_form_issue.getIssueInfo() - if (this.$refs.ref_process_form_issue.okflag) { - this.issueInfo = this.$refs.ref_process_form_issue.formData - - this.okflag = true - - } else { - return false + } else if (this.operationType === "5") { + this.$refs.ref_process_form_designate.getReplayInfo(); + this.replayInfo = this.$refs.ref_process_form_designate.formData; + if (this.$refs.ref_process_form_designate.okflag) { + this.replayInfo = this.$refs.ref_process_form_designate.formData; + this.okflag = true; } + } else if (this.operationType === "6") { + this.$refs.ref_process_form_replay_end.getReplayInfo(); + this.replayInfo = this.$refs.ref_process_form_replay_end.formData; + if (this.$refs.ref_process_form_replay_end.okflag) { + this.replayInfo = this.$refs.ref_process_form_replay_end.formData; + this.okflag = true; + } + } else if (this.formData.operationType === "4") { + this.replayInfo = {}; } - }, - - handleCancle () { + handleCancle() { this.resetData(); - - }, - resetData () { - }, + resetData() {}, // 开启加载动画 - startLoading () { + startLoading() { loading = Loading.service({ lock: true, // 是否锁定 text: "正在加载……", // 加载中需要显示的文字 @@ -257,7 +250,7 @@ export default { }); }, // 结束加载动画 - endLoading () { + endLoading() { // clearTimeout(timer); if (loading) { loading.close(); diff --git a/src/views/modules/shequzhili/eventOld/eventList.vue b/src/views/modules/shequzhili/eventOld/eventList.vue index 2569d1a3c..078efbdcd 100644 --- a/src/views/modules/shequzhili/eventOld/eventList.vue +++ b/src/views/modules/shequzhili/eventOld/eventList.vue @@ -573,10 +573,10 @@ export default { value: "2", label: "社区电话", }, - { - value: "3", - label: "12345", - }, + // { + // value: "3", + // label: "12345", + // }, { value: "4", label: "网络员手持终端",