@@ -82,9 +99,13 @@
form:{
openNy:this.format(new Date(),'yyyy-MM'),
openPic:'',
+ openPic2:'',
+ openPic3:'',
openFile:'',
},
openPic:[],
+ openPic2:[],
+ openPic3:[],
fileList:[],
fileList1:[],
openNy:new Date(),
@@ -137,7 +158,18 @@
this.openPic.push({url:'/api'+rrr})
})
}
-
+ if (res.data.openPic2 !='' && res.data.openPic2 != null && res.data.openPic2 != undefined){
+ res.data.openPic2 = res.data.openPic2.split(',')
+ res.data.openPic2.map((rrr,i)=>{
+ this.openPic2.push({url:'/api'+rrr})
+ })
+ }
+ if (res.data.openPic3 !='' && res.data.openPic3 != null && res.data.openPic3 != undefined){
+ res.data.openPic3 = res.data.openPic3.split(',')
+ res.data.openPic3.map((rrr,i)=>{
+ this.openPic3.push({url:'/api'+rrr})
+ })
+ }
this.form = res.data;
})
},
diff --git a/src/views/sunVillage_info/list_tourists_edit.vue b/src/views/sunVillage_info/list_tourists_edit.vue
index 6344b23c..0be57b22 100644
--- a/src/views/sunVillage_info/list_tourists_edit.vue
+++ b/src/views/sunVillage_info/list_tourists_edit.vue
@@ -46,12 +46,29 @@
- 公开图片
+ 事前公开
+
+
+
+ 事中公开
+
+
+
+
+
+
+
+
+ 事后公开
+
+
+
+
@@ -102,9 +119,13 @@
form:{
openNy:this.format(new Date(),'yyyy-MM'),
openPic:'',
+ openPic2:'',
+ openPic3:'',
openFile:'',
},
openPic:[],
+ openPicsz:[],
+ openPicsh:[],
fileList:[],
fileList1:[],
openNy:new Date(),
@@ -117,6 +138,8 @@
deptId:''
},
openPic2:[],
+ openPic3:[],
+ openPic4:[],
openFile2:[]
};
},
@@ -161,6 +184,20 @@
this.openPic[i] = {url:'/api'+rrr}
})
}
+ if (res.data.openPic2!='' && res.data.openPic2 != null && res.data.openPic2 != undefined){
+ this.openPicsz = res.data.openPic2.split(',')
+ this.openPic3 = res.data.openPic2.split(',')
+ this.openPicsz.map((rrr,i)=>{
+ this.openPicsz[i] = {url:'/api'+rrr}
+ })
+ }
+ if (res.data.openPic3!='' && res.data.openPic3 != null && res.data.openPic3 != undefined){
+ this.openPicsh = res.data.openPic3.split(',')
+ this.openPic4 = res.data.openPic3.split(',')
+ this.openPicsh.map((rrr,i)=>{
+ this.openPicsh[i] = {url:'/api'+rrr}
+ })
+ }
that.form = res.data;
})
},
@@ -168,6 +205,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(',')
tempWorkerOpenEdit(that.form).then((r1) => {
if (r1.code == 200){
that.$notify({ type: 'success', message: '修改成功' });
@@ -186,6 +225,13 @@
console.log(detail)
this.openPic2.splice(detail.index,1)
},
+ deleteFile2(file,detail){
+ console.log(detail)
+ this.openPic3.splice(detail.index,1)
+ },
+ deleteFile3(file,detail){
+ this.openPic4.splice(detail.index,1)
+ },
deleteWord(index){
this.openFile.splice(index,1);
this.openFile2.splice(index,1);
@@ -213,6 +259,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: "上传中...",