From e35e43b2b8b88c990520651a7ed970a1db8d0cd3 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Fri, 15 Sep 2023 09:42:30 +0800 Subject: [PATCH 1/6] bug --- .../satisfaction/communitySelfInsp/index.vue | 22 +++++++++++-------- .../satisfactionProvince/formList.vue | 2 +- .../satisfactionProvince/index.vue | 6 +++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/views/modules/satisfaction/communitySelfInsp/index.vue b/src/views/modules/satisfaction/communitySelfInsp/index.vue index ced74c97b..d8861edcb 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/index.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/index.vue @@ -230,9 +230,7 @@ export default { this.agencyId = this.user.agencyId; await this.getDicts(); await this.getTableData(); - this.$nextTick(() => { - this.initEcharts(); - }) + await this.initEcharts(); }, created() { let date = new Date() @@ -318,14 +316,19 @@ export default { // 获取列表 async getTableData() { + + try{ const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis"; const { formData } = this; - const { data, code, msg } = await requestGet(url, { ...formData }); - this.tableLoading = false; - if (code === 0) { + const { data, msg } = await requestGet(url, { ...formData }); this.total = data.total || 0; this.score = [] - this.tableData = data.categoryDatas; + this.option.series[0].data = [] + this.option.series[1].data = [] + this.option.series[2].data = [] + this.option.xAxis.data = [] + this.tableData = data.categoryDatas || []; + this.satisfactionCategory = [] this.formData.inspRecordId = data.inspRecordId; this.synthesisScore = data.synthesisScore; this.personQty = data.personQty @@ -340,8 +343,9 @@ export default { this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`) }); } }); - } else { - this.$message.error(msg); + this.myChart.setOption(this.option); + }catch(error){ + console.log(error); } }, diff --git a/src/views/modules/satisfaction/satisfactionProvince/formList.vue b/src/views/modules/satisfaction/satisfactionProvince/formList.vue index 1e1e641f6..fdc5adb80 100644 --- a/src/views/modules/satisfaction/satisfactionProvince/formList.vue +++ b/src/views/modules/satisfaction/satisfactionProvince/formList.vue @@ -62,7 +62,7 @@ export default { periodStart: '', scopeId: '', }, - pageNo: 1, + pageNo: 0, pageSize: 20, total: 0, tableData: [], diff --git a/src/views/modules/satisfaction/satisfactionProvince/index.vue b/src/views/modules/satisfaction/satisfactionProvince/index.vue index 952b377ab..bb1daa398 100644 --- a/src/views/modules/satisfaction/satisfactionProvince/index.vue +++ b/src/views/modules/satisfaction/satisfactionProvince/index.vue @@ -256,6 +256,8 @@ export default { `/governance/provinceEvaluationRecord/staticPeopleNum`, { ...this.formData } ); + this.option.series[0].data = [] + this.option.xAxis.data = [] this.tableData = data this.tableData.forEach(item => { if (allowedCategories.includes(item.scopeId)) { @@ -263,10 +265,10 @@ export default { this.option.xAxis.data.push(item.scopeName) } }); + this.myChart.setOption(this.option) } catch (error) { console.log(error); } - }, async handleExportModule() { let url = "/governance/provinceEvaluationRecord/provinceStatis/downloadImportTemplate"; @@ -336,7 +338,7 @@ export default { const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 formData.append("file", file.file); //添加文件对象 await this.$http - .post("/governance/satisfaction/provinceEvaluationRecord/StaticPeopleNum/2023-09", formData) + .post(`/governance/provinceEvaluationRecord/importDataByExcel`, formData) .then((res) => { console.log("res-up", res); if (res.data.code == 0 && res.data.msg == "success") { From d1863f75adfdae24e6ea8bb6e2118ea96461756f Mon Sep 17 00:00:00 2001 From: duanliangtao Date: Mon, 18 Sep 2023 17:21:47 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E6=99=BA=E8=83=BD=E6=90=9C=E7=B4=A2=E8=A7=84=E5=88=99=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=9B=9E=E6=98=BE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/shequ/chaxun.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/modules/shequ/chaxun.vue b/src/views/modules/shequ/chaxun.vue index 91991aa3d..418839b52 100644 --- a/src/views/modules/shequ/chaxun.vue +++ b/src/views/modules/shequ/chaxun.vue @@ -539,9 +539,9 @@ export default { this.searchFangwu.total = 0; this.getSearchFangwu(); } - if (this.smatrFlag && this.childrenRulesData.length === 0) { - this.getRulesList(); - } + // if (this.smatrFlag && this.childrenRulesData.length === 0) { + // this.getRulesList(); + // } this.searchStatus = "ing"; }, async getRulesList() { @@ -629,6 +629,7 @@ export default { } else { this.$message.error(msg); } + this.getRulesList(); }, async getSearchFangwu() { @@ -676,6 +677,7 @@ export default { : []; } else { } + this.getRulesList(); }, handelClickTab(type) { console.log(type); From 21f37a64c84db607330b1a4c824c369634a19b0c Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 18 Sep 2023 17:24:33 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E7=9C=81=E6=BB=A1=E6=84=8F=E5=BA=A6?= =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E6=9F=A5=E6=97=A5=E6=9C=9F=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=8E=BB=E9=99=A4=E4=BF=9D=E7=95=99=E6=9C=88=E4=BB=BD?= =?UTF-8?q?/bug#569=E4=BA=8B=E4=BB=B6=E6=8C=87=E6=B4=BEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../satisfaction/communitySelfInsp/index.vue | 2 +- .../satisfaction/satisfactionProvince/index.vue | 2 +- .../event/cpts/process-form-designate.vue | 14 ++++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/views/modules/satisfaction/communitySelfInsp/index.vue b/src/views/modules/satisfaction/communitySelfInsp/index.vue index ced74c97b..5aefedc55 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/index.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/index.vue @@ -5,7 +5,7 @@ @@ -259,6 +311,9 @@ export default { changeGridId(val) { this.gridId = val; }, + watchImg(src) { + window.open(src); + }, //加载组织数据 async getProjectProcess() { @@ -305,6 +360,7 @@ export default { }, async handelAdd() { + debugger this.$refs.ref_add.getEventInfo(); if (this.$refs.ref_add.okflag) { this.eventInfoData = this.$refs.ref_add.formData; @@ -318,6 +374,7 @@ export default { this.project = {}; this.demand = {}; this.replayInfo = this.$refs.ref_processinfo_add.replayInfo; + console.log(this.replayInfo); //回复属性赋值 this.eventInfoData.content = this.replayInfo.content; this.eventInfoData.status = this.replayInfo.status; @@ -330,6 +387,7 @@ export default { this.demand = {}; console.log(this.$refs.ref_process_form_designate.replayInfo); this.replayInfo = this.$refs.ref_process_form_designate.replayInfo; + console.log(this.replayInfo); //回复属性赋值 this.eventInfoData.content = this.replayInfo.content; this.eventInfoData.status = this.replayInfo.status; diff --git a/src/views/modules/shequzhili/event/cpts/process-form-designate.vue b/src/views/modules/shequzhili/event/cpts/process-form-designate.vue index 0c3af3a14..81ff219b3 100644 --- a/src/views/modules/shequzhili/event/cpts/process-form-designate.vue +++ b/src/views/modules/shequzhili/event/cpts/process-form-designate.vue @@ -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,6 +81,8 @@ export default { eventDetailCopy: {}, selCategoryArray: [], casOptions: [], + fileList: [], + uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile", iscascaderShow: 0, optionProps: { multiple: false, @@ -92,8 +104,8 @@ export default { { required: true, message: "办结时限不能为空", trigger: "blur" }, ] }, - selCateObj:{ - id:"" + selCateObj: { + id: "" }, }; }, @@ -126,7 +138,6 @@ 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 @@ -181,7 +192,7 @@ export default { if (this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0]) { this.selCateObj = this.$refs["myCascader"].getCheckedNodes()[0].data this.formData.categoryId = this.selCateObj.id - console.log(this.formData.categoryId,'this.formData.categoryId'); + console.log(this.formData.categoryId, 'this.formData.categoryId'); } else { this.selCateObj = {} } @@ -206,11 +217,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 +235,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/event/cpts/process-form-replay-end.vue b/src/views/modules/shequzhili/event/cpts/process-form-replay-end.vue index 62f536191..2a001ba74 100644 --- a/src/views/modules/shequzhili/event/cpts/process-form-replay-end.vue +++ b/src/views/modules/shequzhili/event/cpts/process-form-replay-end.vue @@ -25,6 +25,15 @@ placeholder="请输入回复内容,不超过500字" v-model="formData.content">
+ + + 点击上传 +
支持图片、word、pdf
+
+
@@ -43,12 +52,15 @@ export default { content: '', status: 'closed_case', categoryList: [], + files: [] }, status: false, okflag: false, eventDetailCopy: {}, selCategoryArray: [], casOptions: [], + fileList: [], + uploadUlr: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadvariedfile", iscascaderShow: 0, optionProps: { multiple: false, @@ -87,7 +99,7 @@ export default { }, watch: {}, - created() {}, + created() { }, async mounted() { this.getCategoryList(); @@ -152,6 +164,9 @@ export default { if (!this.formData.categoryId) { this.formData.categoryId = this.selCateObj.id; } + if(this.fileList){ + this.formData.files = this.fileList + } this.formData.categoryList = []; this.formData.categoryList.push(this.selCateObj); this.okflag = true; @@ -159,6 +174,74 @@ export default { }); }, resetData() { }, + 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({