@@ -190,6 +190,7 @@ | |||||
.then(() => { | .then(() => { | ||||
tempWorkerOpenRemove(id).then(response => { | tempWorkerOpenRemove(id).then(response => { | ||||
this.$notify({ type: 'success', message: '删除成功' }); | this.$notify({ type: 'success', message: '删除成功' }); | ||||
this.applicationList = []; | |||||
this.getList() | this.getList() | ||||
}); | }); | ||||
}) | }) | ||||
@@ -46,12 +46,27 @@ | |||||
<van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
<template #label> | <template #label> | ||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | ||||
<p style="margin-left: 5px;">公开图片</p> | |||||
<p style="margin-left: 5px;">事前公开</p> | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
<!-- @delete="deleteFile1"--> | <!-- @delete="deleteFile1"--> | ||||
<van-uploader v-model="fileList" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | <van-uploader v-model="fileList" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | ||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">事中公开</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="fileList2" multiple :after-read="afterRead2" @delete="deleteFile2" style="margin-top: 10PX" /> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">事后公开</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="fileList3" multiple :after-read="afterRead3" @delete="deleteFile3" style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | ||||
<van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
<template #label> | <template #label> | ||||
@@ -102,12 +117,15 @@ | |||||
form:{ | form:{ | ||||
openNy:this.format(new Date(),'yyyy-MM'), | openNy:this.format(new Date(),'yyyy-MM'), | ||||
openPic:'', | openPic:'', | ||||
openPic2:'', | |||||
openPic3:'', | |||||
openFile:'', | openFile:'', | ||||
openName:this.format(new Date(),'yyyy')+ '年' + (this.format(new Date(),'MM')-1) + '月零工公开' | openName:this.format(new Date(),'yyyy')+ '年' + (this.format(new Date(),'MM')-1) + '月零工公开' | ||||
}, | }, | ||||
openPic:[], | |||||
fileList:[], | fileList:[], | ||||
fileList1:[], | fileList1:[], | ||||
fileList2:[], | |||||
fileList3:[], | |||||
openNy:new Date(), | openNy:new Date(), | ||||
type:'', | type:'', | ||||
openFile:[], | openFile:[], | ||||
@@ -118,6 +136,8 @@ | |||||
}, | }, | ||||
openFile2:[], | openFile2:[], | ||||
openPic2:[], | openPic2:[], | ||||
openPic3:[], | |||||
openPic4:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -139,6 +159,8 @@ | |||||
var that = this; | var that = this; | ||||
that.form.openFile = that.openFile2.join(',') | that.form.openFile = that.openFile2.join(',') | ||||
that.form.openPic = that.openPic2.join(',') | that.form.openPic = that.openPic2.join(',') | ||||
that.form.openPic2 = that.openPic3.join(',') | |||||
that.form.openPic3 = that.openPic4.join(',') | |||||
tempWorkerOpenAdd(that.form).then((r1) => { | tempWorkerOpenAdd(that.form).then((r1) => { | ||||
if (r1.code == 200){ | if (r1.code == 200){ | ||||
that.$notify({ type: 'success', message: '新增成功' }); | that.$notify({ type: 'success', message: '新增成功' }); | ||||
@@ -157,6 +179,14 @@ | |||||
this.openPic2.splice(detail.index,1) | this.openPic2.splice(detail.index,1) | ||||
// this.form.openPic.splice(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){ | deleteWord(index){ | ||||
this.openFileList.splice(index,1); | this.openFileList.splice(index,1); | ||||
this.openFile2.splice(index,1); | this.openFile2.splice(index,1); | ||||
@@ -170,7 +200,6 @@ | |||||
// 此时可以自行将文件上传至服务器 | // 此时可以自行将文件上传至服务器 | ||||
if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | if (file instanceof Array){//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false | ||||
file.map(res=>{ | file.map(res=>{ | ||||
this.openPic.push(res.file); | |||||
let params1 = new FormData(); | let params1 = new FormData(); | ||||
params1.append("file", res.file); | params1.append("file", res.file); | ||||
commonUpload(params1).then((r1) => { | commonUpload(params1).then((r1) => { | ||||
@@ -178,7 +207,6 @@ | |||||
}) | }) | ||||
}) | }) | ||||
}else{ | }else{ | ||||
this.openPic.push(file); | |||||
let params1 = new FormData(); | let params1 = new FormData(); | ||||
params1.append("file", file.file); | params1.append("file", file.file); | ||||
commonUpload(params1).then((r1) => { | commonUpload(params1).then((r1) => { | ||||
@@ -186,6 +214,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){ | afterReadOpenFile(file){ | ||||
this.$toast.loading({ | this.$toast.loading({ | ||||
message: "上传中...", | message: "上传中...", | ||||
@@ -36,12 +36,29 @@ | |||||
<van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
<template #label> | <template #label> | ||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | ||||
<p style="margin-left: 5px;">公开图片</p> | |||||
<p style="margin-left: 5px;">事前公开</p> | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
<!-- @delete="deleteFile1"--> | <!-- @delete="deleteFile1"--> | ||||
<van-uploader v-model="openPic" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | <van-uploader v-model="openPic" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | ||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">事中公开</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPic2" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">事后公开</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPic3" :show-upload="false" :deletable="false" multiple style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | ||||
<van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
<template #label> | <template #label> | ||||
@@ -82,9 +99,13 @@ | |||||
form:{ | form:{ | ||||
openNy:this.format(new Date(),'yyyy-MM'), | openNy:this.format(new Date(),'yyyy-MM'), | ||||
openPic:'', | openPic:'', | ||||
openPic2:'', | |||||
openPic3:'', | |||||
openFile:'', | openFile:'', | ||||
}, | }, | ||||
openPic:[], | openPic:[], | ||||
openPic2:[], | |||||
openPic3:[], | |||||
fileList:[], | fileList:[], | ||||
fileList1:[], | fileList1:[], | ||||
openNy:new Date(), | openNy:new Date(), | ||||
@@ -137,7 +158,18 @@ | |||||
this.openPic.push({url:'/api'+rrr}) | 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; | this.form = res.data; | ||||
}) | }) | ||||
}, | }, | ||||
@@ -46,12 +46,29 @@ | |||||
<van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
<template #label> | <template #label> | ||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | ||||
<p style="margin-left: 5px;">公开图片</p> | |||||
<p style="margin-left: 5px;">事前公开</p> | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
<!-- @delete="deleteFile1"--> | <!-- @delete="deleteFile1"--> | ||||
<van-uploader v-model="openPic" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | <van-uploader v-model="openPic" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | ||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">事中公开</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPicsz" multiple :after-read="afterRead2" @delete="deleteFile2" style="margin-top: 10PX" /> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_03.png" width="18"> | |||||
<p style="margin-left: 5px;">事后公开</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<van-uploader v-model="openPicsh" multiple :after-read="afterRead3" @delete="deleteFile3" style="margin-top: 10PX" /> | |||||
<div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | <div style="border-top: 1px solid #ededed;margin-top: 10PX;"> | ||||
<van-field readonly input-align="right" :border="false" > | <van-field readonly input-align="right" :border="false" > | ||||
<template #label> | <template #label> | ||||
@@ -102,9 +119,13 @@ | |||||
form:{ | form:{ | ||||
openNy:this.format(new Date(),'yyyy-MM'), | openNy:this.format(new Date(),'yyyy-MM'), | ||||
openPic:'', | openPic:'', | ||||
openPic2:'', | |||||
openPic3:'', | |||||
openFile:'', | openFile:'', | ||||
}, | }, | ||||
openPic:[], | openPic:[], | ||||
openPicsz:[], | |||||
openPicsh:[], | |||||
fileList:[], | fileList:[], | ||||
fileList1:[], | fileList1:[], | ||||
openNy:new Date(), | openNy:new Date(), | ||||
@@ -117,6 +138,8 @@ | |||||
deptId:'' | deptId:'' | ||||
}, | }, | ||||
openPic2:[], | openPic2:[], | ||||
openPic3:[], | |||||
openPic4:[], | |||||
openFile2:[] | openFile2:[] | ||||
}; | }; | ||||
}, | }, | ||||
@@ -161,6 +184,20 @@ | |||||
this.openPic[i] = {url:'/api'+rrr} | 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; | that.form = res.data; | ||||
}) | }) | ||||
}, | }, | ||||
@@ -168,6 +205,8 @@ | |||||
var that = this; | var that = this; | ||||
that.form.openFile = that.openFile2.join(',') | that.form.openFile = that.openFile2.join(',') | ||||
that.form.openPic = that.openPic2.join(',') | that.form.openPic = that.openPic2.join(',') | ||||
that.form.openPic2 = that.openPic3.join(',') | |||||
that.form.openPic3 = that.openPic4.join(',') | |||||
tempWorkerOpenEdit(that.form).then((r1) => { | tempWorkerOpenEdit(that.form).then((r1) => { | ||||
if (r1.code == 200){ | if (r1.code == 200){ | ||||
that.$notify({ type: 'success', message: '修改成功' }); | that.$notify({ type: 'success', message: '修改成功' }); | ||||
@@ -186,6 +225,13 @@ | |||||
console.log(detail) | console.log(detail) | ||||
this.openPic2.splice(detail.index,1) | 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){ | deleteWord(index){ | ||||
this.openFile.splice(index,1); | this.openFile.splice(index,1); | ||||
this.openFile2.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){ | afterReadOpenFile(file){ | ||||
this.$toast.loading({ | this.$toast.loading({ | ||||
message: "上传中...", | message: "上传中...", | ||||