diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index 5509b4def..bbba16494 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -1131,7 +1131,7 @@ export default { contacts: "", mobile: "", agencyId: "", - departmentDuty: "123", + departmentDuty: "", }, // 网格添加表单项 GridForm: { diff --git a/src/views/modules/home/index.vue b/src/views/modules/home/index.vue index a73cf35aa..ae85df61b 100644 --- a/src/views/modules/home/index.vue +++ b/src/views/modules/home/index.vue @@ -274,7 +274,7 @@ export default { trigger: 'axis' }, legend: { - data: ['12345不满意数', '省满意调查不满意数', '社区自评不满意数'], + data: ['12345不满意数', '省满意调查不满意数', '社区自查不满意数'], bottom: '10%', icon: 'rect', itemWidth: 20, @@ -314,7 +314,7 @@ export default { data: [220, 182, 191, 234, 290, 330, 310] }, { - name: '社区自评不满意数', + name: '社区自查不满意数', type: 'line', stack: 'Total', data: [150, 232, 201, 154, 190, 330, 410] diff --git a/src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue b/src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue index 0eaabc99e..ab54c6c00 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/followUpDetail.vue @@ -1,5 +1,6 @@ @@ -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 a89ee33e7..81ff219b3 100644 --- a/src/views/modules/shequzhili/event/cpts/process-form-designate.vue +++ b/src/views/modules/shequzhili/event/cpts/process-form-designate.vue @@ -1,8 +1,8 @@ @@ -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, @@ -91,7 +103,10 @@ export default { timeLimit: [ { required: true, message: "办结时限不能为空", trigger: "blur" }, ] - } + }, + selCateObj: { + id: "" + }, }; }, components: {}, @@ -125,7 +140,7 @@ export default { this.eventDetailCopy = JSON.parse(JSON.stringify(this.eventDetailData)); // 这一步接收到eventDetailCopy在这里回填 if (this.eventDetailCopy.parentCategoryId && this.eventDetailCopy.categoryId) { - this.selCateObj = this.eventDetailCopy.selCateObj + this.selCateObj.id = this.eventDetailCopy.categoryId this.formData.categoryId = this.eventDetailCopy.categoryId this.selCategoryArray.push(this.eventDetailCopy.parentCategoryId, this.eventDetailCopy.categoryId) } @@ -177,6 +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'); } else { this.selCateObj = {} } @@ -205,6 +221,9 @@ export default { 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 = []; @@ -216,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({