From d96ed41928602059862eb50fcc39937ad238f4f1 Mon Sep 17 00:00:00 2001 From: xuyuanqing <392009588@qq.com> Date: Fri, 20 Sep 2024 16:45:21 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E9=98=B3=E5=85=89=E6=9D=91=E5=8A=A1-?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=8B=E4=B8=AD=E3=80=81=E4=BA=8B=E5=90=8E?= =?UTF-8?q?=E5=85=AC=E5=BC=80=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sunVillage_info/list_tourists.vue | 1 + .../sunVillage_info/list_tourists_add.vue | 82 ++++++++++++++++- .../sunVillage_info/list_tourists_detail.vue | 33 ++++++- .../sunVillage_info/list_tourists_edit.vue | 92 ++++++++++++++++++- 4 files changed, 202 insertions(+), 6 deletions(-) diff --git a/src/views/sunVillage_info/list_tourists.vue b/src/views/sunVillage_info/list_tourists.vue index a49e15f7..b59066fd 100644 --- a/src/views/sunVillage_info/list_tourists.vue +++ b/src/views/sunVillage_info/list_tourists.vue @@ -190,6 +190,7 @@ .then(() => { tempWorkerOpenRemove(id).then(response => { this.$notify({ type: 'success', message: '删除成功' }); + this.applicationList = []; this.getList() }); }) diff --git a/src/views/sunVillage_info/list_tourists_add.vue b/src/views/sunVillage_info/list_tourists_add.vue index 943f8338..4770b794 100644 --- a/src/views/sunVillage_info/list_tourists_add.vue +++ b/src/views/sunVillage_info/list_tourists_add.vue @@ -46,11 +46,27 @@ + + + + + + + + + +
@@ -102,12 +118,16 @@ form:{ openNy:this.format(new Date(),'yyyy-MM'), openPic:'', + openPic2:'', + openPic3:'', openFile:'', openName:this.format(new Date(),'yyyy')+ '年' + (this.format(new Date(),'MM')-1) + '月零工公开' }, openPic:[], fileList:[], fileList1:[], + fileList2:[], + fileList3:[], openNy:new Date(), type:'', openFile:[], @@ -118,6 +138,8 @@ }, openFile2:[], openPic2:[], + openPic3:[], + openPic4:[], }; }, created() { @@ -139,6 +161,8 @@ var that = this; that.form.openFile = that.openFile2.join(',') that.form.openPic = that.openPic2.join(',') + that.form.openPic2 = that.openPic3.join(',') + that.form.openPic3 = that.openPic4.join(',') tempWorkerOpenAdd(that.form).then((r1) => { if (r1.code == 200){ that.$notify({ type: 'success', message: '新增成功' }); @@ -157,6 +181,14 @@ this.openPic2.splice(detail.index,1) // this.form.openPic.splice(index,1); }, + deleteFile2(detail){ + this.openPic3.splice(detail.index,1) + // this.form.openPic.splice(index,1); + }, + deleteFile3(detail){ + this.openPic4.splice(detail.index,1) + // this.form.openPic.splice(index,1); + }, deleteWord(index){ this.openFileList.splice(index,1); this.openFile2.splice(index,1); @@ -170,7 +202,6 @@ // 此时可以自行将文件上传至服务器 if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false file.map(res=>{ - this.openPic.push(res.file); let params1 = new FormData(); params1.append("file", res.file); commonUpload(params1).then((r1) => { @@ -178,7 +209,6 @@ }) }) }else{ - this.openPic.push(file); let params1 = new FormData(); params1.append("file", file.file); commonUpload(params1).then((r1) => { @@ -186,6 +216,52 @@ }) } }, + afterRead2(file) { + this.$toast.loading({ + message: "上传中...", + forbidClick: true, + duration: 0, + }); + // 此时可以自行将文件上传至服务器 + if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false + file.map(res=>{ + let params1 = new FormData(); + params1.append("file", res.file); + commonUpload(params1).then((r1) => { + this.openPic3.push(r1.fileName); + }) + }) + }else{ + let params1 = new FormData(); + params1.append("file", file.file); + commonUpload(params1).then((r1) => { + this.openPic3.push(r1.fileName); + }) + } + }, + afterRead3(file) { + this.$toast.loading({ + message: "上传中...", + forbidClick: true, + duration: 0, + }); + // 此时可以自行将文件上传至服务器 + if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false + file.map(res=>{ + let params1 = new FormData(); + params1.append("file", res.file); + commonUpload(params1).then((r1) => { + this.openPic4.push(r1.fileName); + }) + }) + }else{ + let params1 = new FormData(); + params1.append("file", file.file); + commonUpload(params1).then((r1) => { + this.openPic4.push(r1.fileName); + }) + } + }, afterReadOpenFile(file){ this.$toast.loading({ message: "上传中...", diff --git a/src/views/sunVillage_info/list_tourists_detail.vue b/src/views/sunVillage_info/list_tourists_detail.vue index ed98aa51..2d85901f 100644 --- a/src/views/sunVillage_info/list_tourists_detail.vue +++ b/src/views/sunVillage_info/list_tourists_detail.vue @@ -36,12 +36,28 @@ + + + + + + + + + +