@@ -1353,3 +1353,56 @@ export function delSiyigongkai(id) { | |||||
method: 'get' | method: 'get' | ||||
}) | }) | ||||
} | } | ||||
// 查询四议两公开列表 | |||||
export function specialPublicityList(query) { | |||||
return request({ | |||||
url: '/open/villageAffairs/public/specialPublicityList', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询四议两公开列表 | |||||
export function specialPublicityDetail(query) { | |||||
return request({ | |||||
url: '/open/villageAffairs/public/specialPublicityDetail', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询四议两公开列表 | |||||
export function specialPublicityEdit(data) { | |||||
return request({ | |||||
url: '/subcontract/publicity/edit', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 查询四议两公开列表 | |||||
export function specialPublicityAdd(data) { | |||||
return request({ | |||||
url: '/subcontract/publicity/add', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 删除四议两公开 | |||||
export function specialPublicityRemove(id) { | |||||
return request({ | |||||
url: '/subcontract/publicity/remove/' + id, | |||||
method: 'get' | |||||
}) | |||||
} | |||||
// 查询四议两公开列表 | |||||
export function updateSpecialPublicityCount(query) { | |||||
return request({ | |||||
url: '/open/villageAffairs/public/updateSpecialPublicityCount', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -150,6 +150,11 @@ const whiteList = [ | |||||
'/sunVillage_info/list_process_detail', | '/sunVillage_info/list_process_detail', | ||||
'/sunVillage_info/list_issues_zy', | '/sunVillage_info/list_issues_zy', | ||||
'/sunVillage_info/list_issues_zy_detail', | '/sunVillage_info/list_issues_zy_detail', | ||||
'/sunVillage_info/list_special', | |||||
'/sunVillage_info/list_special_detail', | |||||
'/sunVillage_info/list_special_detail_vote', | |||||
'/sunVillage_info/list_finance_new', | |||||
'/sunVillage_info/list_finance_new_detail', | |||||
// 新型经营主体 | // 新型经营主体 | ||||
'newBusinessEntity/newsBulletin', //新闻公告 | 'newBusinessEntity/newsBulletin', //新闻公告 | ||||
@@ -3479,6 +3479,51 @@ export const constantRoutes = [ | |||||
}, | }, | ||||
component: (resolve) => require(['@/views/sunVillage_info/list_discussions_new_add'], resolve) | component: (resolve) => require(['@/views/sunVillage_info/list_discussions_new_add'], resolve) | ||||
}, | }, | ||||
{ ////阳光村务(新)-- 四议两公开 | |||||
path: '/sunVillage_info/list_special', | |||||
name: 'sunVillageInfoListSpecial', | |||||
meta: { | |||||
title: '专项公示', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_special'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 四议两公开 | |||||
path: '/sunVillage_info/list_special_add', | |||||
name: 'sunVillageInfoListSpecialAdd', | |||||
meta: { | |||||
title: '专项公示', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_special_add'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 四议两公开 | |||||
path: '/sunVillage_info/list_special_detail', | |||||
name: 'sunVillageInfoListSpecialDetail', | |||||
meta: { | |||||
title: '专项公示', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_special_detail'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 四议两公开 | |||||
path: '/sunVillage_info/list_special_detail_vote', | |||||
name: 'sunVillageInfoListSpecialDetailVote', | |||||
meta: { | |||||
title: '专项公示', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_special_detail_vote'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 四议两公开 | |||||
path: '/sunVillage_info/list_special_edit', | |||||
name: 'sunVillageInfoListSpecialEdit', | |||||
meta: { | |||||
title: '专项公示', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/sunVillage_info/list_special_edit'], resolve) | |||||
}, | |||||
{ ////阳光村务(新)-- 一张图公开 | { ////阳光村务(新)-- 一张图公开 | ||||
path: '/sunVillage_info/list_contract_detail', | path: '/sunVillage_info/list_contract_detail', | ||||
name: 'sunVillageInfoListContractDetail', | name: 'sunVillageInfoListContractDetail', | ||||
@@ -49,18 +49,28 @@ | |||||
<van-col :span="2">{{item.buildingTime}}</van-col> | <van-col :span="2">{{item.buildingTime}}</van-col> | ||||
<van-col :span="2">{{item.startTime}}</van-col> | <van-col :span="2">{{item.startTime}}</van-col> | ||||
<van-col :span="2">{{item.endTime}}</van-col> | <van-col :span="2">{{item.endTime}}</van-col> | ||||
<van-col :span="2">{{item.endTime}}</van-col> | |||||
<van-col :span="2"><p style="cursor: pointer;color: #2C41DA;" @click="openPopupFile(item.id)">点击查看附件</p></van-col> | |||||
</van-row> | </van-row> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="clear"></div> | <div class="clear"></div> | ||||
</div> | </div> | ||||
<!-- 附件弹出层 --> | |||||
<van-popup v-model="showFile" round closeable position="top" :style="{ height: '30%' }" > | |||||
<div style="padding: 0 3%;"> | |||||
<van-divider>附件</van-divider> | |||||
<van-uploader v-model="fileList" accept="" :show-upload="false" :deletable="false" /> | |||||
<van-empty v-if="fileList.length < 1" image-size="50" description="暂无附件" /> | |||||
</div> | |||||
</van-popup> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { contractionListNew } from "@/api/sunVillage_info/fixedAssets"; | |||||
import {attachmentQuery, contractionListNew} from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
export default { | export default { | ||||
@@ -76,6 +86,7 @@ | |||||
finished: false, | finished: false, | ||||
show: false, | show: false, | ||||
showTab: false, | showTab: false, | ||||
showFile: false, | |||||
fileList:[], | fileList:[], | ||||
listLength:'0', | listLength:'0', | ||||
searchInput:'', | searchInput:'', | ||||
@@ -102,6 +113,26 @@ | |||||
this.getList() | this.getList() | ||||
}, | }, | ||||
methods: { | methods: { | ||||
openPopupFile(id){ | |||||
this.fileList = []; | |||||
this.signaId = id; | |||||
this.showFile = true; | |||||
let queryParams = { | |||||
tableId: id, | |||||
tableName: 't_contraction_info', | |||||
bizPath: 'contraction', | |||||
}; | |||||
attachmentQuery(queryParams).then(response => { | |||||
response.rows.map(res => { | |||||
// let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | |||||
this.fileList.push({ | |||||
url: '/api'+res.fileUrl, | |||||
file: new File([], res.fileName,{}), | |||||
id: res.id | |||||
}); | |||||
}) | |||||
}); | |||||
}, | |||||
getList(){ | getList(){ | ||||
var _this = this; | var _this = this; | ||||
setTimeout(() => { | setTimeout(() => { | ||||
@@ -53,6 +53,42 @@ | |||||
<van-uploader v-model="jueyiPic" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | <van-uploader v-model="jueyiPic" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | ||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.shishiguochengAt" | |||||
@click="showBuildTime3 = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">实施过程公开日期</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime3" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openNy3" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy3" | |||||
@cancel="showBuildTime3 = false" | |||||
/> | |||||
</van-popup> | |||||
<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="shishiguochengPic" multiple :after-read="afterRead3" @delete="deleteFile3" style="margin-top: 10PX" /> | |||||
<van-field | <van-field | ||||
readonly | readonly | ||||
clickable | clickable | ||||
@@ -66,7 +102,7 @@ | |||||
> | > | ||||
<template #label> | <template #label> | ||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | ||||
<p style="margin-left: 5px;">实施公开日期</p> | |||||
<p style="margin-left: 5px;">实施结果公开日期</p> | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
<van-popup v-model="showBuildTime2" position="bottom"> | <van-popup v-model="showBuildTime2" position="bottom"> | ||||
@@ -79,10 +115,10 @@ | |||||
/> | /> | ||||
</van-popup> | </van-popup> | ||||
<van-field readonly input-align="right" :border="false" > | |||||
<van-field readonly input-align="right" label-width="auto" :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"--> | ||||
@@ -119,6 +155,7 @@ | |||||
return { | return { | ||||
showBuildTime:false, | showBuildTime:false, | ||||
showBuildTime2:false, | showBuildTime2:false, | ||||
showBuildTime3:false, | |||||
showPictureType:false, | showPictureType:false, | ||||
form:{ | form:{ | ||||
openAt:this.format(new Date(),'yyyy-MM-dd'), | openAt:this.format(new Date(),'yyyy-MM-dd'), | ||||
@@ -127,11 +164,13 @@ | |||||
}, | }, | ||||
jueyiPic:[], | jueyiPic:[], | ||||
shishiPic:[], | shishiPic:[], | ||||
shishiguochengPic:[], | |||||
otherGkTypeOptions:[], | otherGkTypeOptions:[], | ||||
fileList:[], | fileList:[], | ||||
fileList1:[], | fileList1:[], | ||||
openNy:new Date(), | openNy:new Date(), | ||||
openNy2:new Date(), | openNy2:new Date(), | ||||
openNy3:new Date(), | |||||
type:'', | type:'', | ||||
openFile:[], | openFile:[], | ||||
openFileList:[], | openFileList:[], | ||||
@@ -139,6 +178,7 @@ | |||||
id:'' | id:'' | ||||
}, | }, | ||||
shishiPic2:[], | shishiPic2:[], | ||||
shishiguochengPic2:[], | |||||
jueyiPic2:[], | jueyiPic2:[], | ||||
// 操作类型:update或copy | // 操作类型:update或copy | ||||
operation: '', | operation: '', | ||||
@@ -153,6 +193,7 @@ | |||||
var that = this; | var that = this; | ||||
that.form.shishiPic = that.shishiPic2.join(',') | that.form.shishiPic = that.shishiPic2.join(',') | ||||
that.form.jueyiPic = that.jueyiPic2.join(',') | that.form.jueyiPic = that.jueyiPic2.join(',') | ||||
that.form.shishiguochengPic = that.shishiguochengPic2.join(',') | |||||
this.form.deptName = Cookies.get('deptName'); | this.form.deptName = Cookies.get('deptName'); | ||||
addSiyigongkai(that.form).then((r1) => { | addSiyigongkai(that.form).then((r1) => { | ||||
if (r1.code == 200){ | if (r1.code == 200){ | ||||
@@ -173,6 +214,11 @@ | |||||
this.openNy2 = data; | this.openNy2 = data; | ||||
this.showBuildTime2 = false; | this.showBuildTime2 = false; | ||||
}, | }, | ||||
onConfirmOpenNy3(data){ | |||||
this.form.shishiguochengAt = this.format(data,'yyyy-MM-dd'); | |||||
this.openNy3 = data; | |||||
this.showBuildTime3 = false; | |||||
}, | |||||
deleteFile1(file,detail){ | deleteFile1(file,detail){ | ||||
console.log(detail) | console.log(detail) | ||||
this.jueyiPic2.splice(detail.index,1) | this.jueyiPic2.splice(detail.index,1) | ||||
@@ -181,6 +227,10 @@ | |||||
console.log(detail) | console.log(detail) | ||||
this.shishiPic2.splice(detail.index,1) | this.shishiPic2.splice(detail.index,1) | ||||
}, | }, | ||||
deleteFile3(file,detail){ | |||||
console.log(detail) | |||||
this.shishiguochengPic2.splice(detail.index,1) | |||||
}, | |||||
afterRead(file) { | afterRead(file) { | ||||
this.$toast.loading({ | this.$toast.loading({ | ||||
message: "上传中...", | message: "上传中...", | ||||
@@ -227,6 +277,29 @@ | |||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
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.shishiguochengPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
}else{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.shishiguochengPic2.push(r1.fileName); | |||||
}) | |||||
} | |||||
}, | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -12,7 +12,7 @@ | |||||
<div class="list_main"> | <div class="list_main"> | ||||
<van-field name="otherName" :value="form.openName" label="公开标题" input-align="right" :border="false" /> | <van-field name="otherName" :value="form.openName" label="公开标题" input-align="right" :border="false" /> | ||||
<van-field name="openAt" :value="form.jueyiAt" label="決议公开日期" input-align="right" :border="false" /> | |||||
<van-field name="openAt" :value="form.jueyiAt" label="决议公开日期" input-align="right" :border="false" /> | |||||
<van-field | <van-field | ||||
name="jueyiPic" | name="jueyiPic" | ||||
label="决议公开图片" | label="决议公开图片" | ||||
@@ -22,11 +22,23 @@ | |||||
</van-field> | </van-field> | ||||
<CommonUpload style="padding-left: 10PX;" name="jueyiPic" :value="form.jueyiPic" multiple :deletable="false" :show-upload="false"/> | <CommonUpload style="padding-left: 10PX;" name="jueyiPic" :value="form.jueyiPic" multiple :deletable="false" :show-upload="false"/> | ||||
<van-field name="otherName" :value="form.shishiAt" label="实施公开日期" input-align="right" :border="false" /> | |||||
<van-field name="shishiguochengAt" :value="form.shishiguochengAt" label="实施过程公开日期" label-width="auto" input-align="right" :border="false" /> | |||||
<van-field | |||||
label-width="auto" | |||||
name="shishiguochengPic" | |||||
label="实施过程公开图片" | |||||
input-align="right" | |||||
:border="false" | |||||
> | |||||
</van-field> | |||||
<CommonUpload style="padding-left: 10PX;" name="shishiguochengPic" :value="form.shishiguochengPic" multiple :deletable="false" :show-upload="false"/> | |||||
<van-field name="otherName" :value="form.shishiAt" label="实施结果公开日期" label-width="auto" input-align="right" :border="false" /> | |||||
<van-field | <van-field | ||||
name="shishiPic" | name="shishiPic" | ||||
label="实施公开图片" | |||||
label="实施结果公开图片" | |||||
input-align="right" | input-align="right" | ||||
label-width="auto" | |||||
:border="false" | :border="false" | ||||
> | > | ||||
</van-field> | </van-field> | ||||
@@ -53,6 +53,42 @@ | |||||
<van-uploader v-model="jueyiPic" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | <van-uploader v-model="jueyiPic" multiple :after-read="afterRead" @delete="deleteFile1" style="margin-top: 10PX" /> | ||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.shishiguochengAt" | |||||
@click="showBuildTime3 = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
:border="false" | |||||
> | |||||
<template #label> | |||||
<img src="../../assets/images/sunVillage_info/add_tit_icon_01.png" width="18"> | |||||
<p style="margin-left: 5px;">实施过程公开日期</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime3" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openNy3" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy3" | |||||
@cancel="showBuildTime3 = false" | |||||
/> | |||||
</van-popup> | |||||
<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="shishiguochengPic" multiple :after-read="afterRead3" @delete="deleteFile3" style="margin-top: 10PX" /> | |||||
<van-field | <van-field | ||||
readonly | readonly | ||||
clickable | clickable | ||||
@@ -122,6 +158,9 @@ | |||||
showBuildTime:false, | showBuildTime:false, | ||||
showBuildTime2:false, | showBuildTime2:false, | ||||
showPictureType:false, | showPictureType:false, | ||||
showBuildTime3:false, | |||||
shishiguochengPic:[], | |||||
shishiguochengPic2:[], | |||||
form:{ | form:{ | ||||
openAt:this.format(new Date(),'yyyy-MM-dd'), | openAt:this.format(new Date(),'yyyy-MM-dd'), | ||||
jueyiPic:'', | jueyiPic:'', | ||||
@@ -134,6 +173,7 @@ | |||||
fileList1:[], | fileList1:[], | ||||
openNy:new Date(), | openNy:new Date(), | ||||
openNy2:new Date(), | openNy2:new Date(), | ||||
openNy3:new Date(), | |||||
type:'', | type:'', | ||||
openFile:[], | openFile:[], | ||||
openFileList:[], | openFileList:[], | ||||
@@ -169,6 +209,13 @@ | |||||
this.shishiPic[i] = {url:'/api'+rrr} | this.shishiPic[i] = {url:'/api'+rrr} | ||||
}) | }) | ||||
} | } | ||||
if (res.data.shishiguochengPic!='' && res.data.shishiguochengPic != null && res.data.shishiguochengPic != undefined){ | |||||
this.shishiguochengPic = res.data.shishiguochengPic.split(',') | |||||
this.shishiguochengPic2 = res.data.shishiguochengPic.split(',') | |||||
this.shishiguochengPic.map((rrr,i)=>{ | |||||
this.shishiguochengPic[i] = {url:'/api'+rrr} | |||||
}) | |||||
} | |||||
this.form = res.data; | this.form = res.data; | ||||
}) | }) | ||||
}, | }, | ||||
@@ -176,6 +223,7 @@ | |||||
var that = this; | var that = this; | ||||
that.form.shishiPic = that.shishiPic2.join(',') | that.form.shishiPic = that.shishiPic2.join(',') | ||||
that.form.jueyiPic = that.jueyiPic2.join(',') | that.form.jueyiPic = that.jueyiPic2.join(',') | ||||
that.form.shishiguochengPic = that.shishiguochengPic2.join(',') | |||||
this.form.deptName = Cookies.get('deptName'); | this.form.deptName = Cookies.get('deptName'); | ||||
updateSiyigongkai(that.form).then((r1) => { | updateSiyigongkai(that.form).then((r1) => { | ||||
if (r1.code == 200){ | if (r1.code == 200){ | ||||
@@ -196,6 +244,11 @@ | |||||
this.openNy2 = data; | this.openNy2 = data; | ||||
this.showBuildTime2 = false; | this.showBuildTime2 = false; | ||||
}, | }, | ||||
onConfirmOpenNy3(data){ | |||||
this.form.shishiguochengAt = this.format(data,'yyyy-MM-dd'); | |||||
this.openNy3 = data; | |||||
this.showBuildTime3 = false; | |||||
}, | |||||
deleteFile1(file,detail){ | deleteFile1(file,detail){ | ||||
console.log(detail) | console.log(detail) | ||||
this.jueyiPic2.splice(detail.index,1) | this.jueyiPic2.splice(detail.index,1) | ||||
@@ -204,6 +257,10 @@ | |||||
console.log(detail) | console.log(detail) | ||||
this.shishiPic2.splice(detail.index,1) | this.shishiPic2.splice(detail.index,1) | ||||
}, | }, | ||||
deleteFile3(file,detail){ | |||||
console.log(detail) | |||||
this.shishiguochengPic2.splice(detail.index,1) | |||||
}, | |||||
afterRead(file) { | afterRead(file) { | ||||
this.$toast.loading({ | this.$toast.loading({ | ||||
message: "上传中...", | message: "上传中...", | ||||
@@ -250,6 +307,29 @@ | |||||
}) | }) | ||||
} | } | ||||
}, | }, | ||||
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.shishiguochengPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
}else{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.shishiguochengPic2.push(r1.fileName); | |||||
}) | |||||
} | |||||
}, | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -121,7 +121,7 @@ | |||||
<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_04.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | ||||
<p style="margin-left: 5px;">附件</p> | |||||
<p style="margin-left: 5px;">公开文件</p> | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
@@ -79,7 +79,7 @@ | |||||
<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_04.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | ||||
<p style="margin-left: 5px;">附件</p> | |||||
<p style="margin-left: 5px;">公开文件</p> | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
@@ -121,7 +121,7 @@ | |||||
<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_04.png" width="18"> | <img src="../../assets/images/sunVillage_info/add_tit_icon_04.png" width="18"> | ||||
<p style="margin-left: 5px;">附件</p> | |||||
<p style="margin-left: 5px;">公开文件</p> | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
@@ -87,7 +87,7 @@ | |||||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | <div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | ||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | ||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | ||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
<p class="fileName" style="margin-left: 10px;">{{item.name}}</p> | |||||
<img src="../../assets/images/sunVillage_info/delete.png" width="16" style="margin-left: auto;" @click="deleteWord(index)" /> | <img src="../../assets/images/sunVillage_info/delete.png" width="16" style="margin-left: auto;" @click="deleteWord(index)" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -56,7 +56,7 @@ | |||||
<div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | <div v-for="(item,index) in openFileList" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | ||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | ||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | ||||
<a :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
<a class="fileName" :href="item.url" style="margin-left: 10px;color: #333333">{{item.name}}</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -112,15 +112,15 @@ | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getDicts("important_type").then((response) => { | |||||
this.importantTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | this.type = this.$route.query.type; | ||||
this.queryParams.bookId = Cookies.get('bookId'); | this.queryParams.bookId = Cookies.get('bookId'); | ||||
this.queryParams.deptId = Cookies.get('deptId'); | this.queryParams.deptId = Cookies.get('deptId'); | ||||
this.queryParams.id = this.$route.query.id; | this.queryParams.id = this.$route.query.id; | ||||
this.showBtn = this.$route.query.showBtn=='false'?false:true; | this.showBtn = this.$route.query.showBtn=='false'?false:true; | ||||
this.getDetail(); | |||||
this.getDicts("important_type").then((response) => { | |||||
this.importantTypeOptions = response.data; | |||||
this.getDetail(); | |||||
}); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
getDetail(id){ | getDetail(id){ | ||||
@@ -154,6 +154,13 @@ | |||||
</script> | </script> | ||||
<style scoped lang="scss"> | <style scoped lang="scss"> | ||||
.fileName{ | |||||
display: -webkit-box; | |||||
-webkit-box-orient: vertical; | |||||
-webkit-line-clamp: 2; | |||||
word-break: break-all; | |||||
overflow: hidden; | |||||
} | |||||
.home_wrapper{ | .home_wrapper{ | ||||
background: #e9e9e9; | background: #e9e9e9; | ||||
min-height: 100vh; | min-height: 100vh; | ||||
@@ -87,7 +87,7 @@ | |||||
<div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | <div v-for="(item,index) in openFile" :key="index" style="display: flex;align-items: center;margin-top: 10px;"> | ||||
<img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | <img src="../../assets/images/sunVillage_info/WORD.png" width="30" v-if="item.type == 'word'"/> | ||||
<img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | <img src="../../assets/images/sunVillage_info/ECEL.png" width="30" v-if="item.type == 'excel'" /> | ||||
<p style="margin-left: 10px;">{{item.name}}</p> | |||||
<p class="fileName" style="margin-left: 10px;">{{item.name}}</p> | |||||
<img src="../../assets/images/sunVillage_info/delete.png" width="16" style="margin-left: auto;" @click="deleteWord(index)" /> | <img src="../../assets/images/sunVillage_info/delete.png" width="16" style="margin-left: auto;" @click="deleteWord(index)" /> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -100,6 +100,9 @@ | |||||
<template #label> | <template #label> | ||||
<p style="margin-left: 5px;">内容</p> | <p style="margin-left: 5px;">内容</p> | ||||
</template> | </template> | ||||
<template #input> | |||||
<div v-html="form.content"></div> | |||||
</template> | |||||
</van-field> | </van-field> | ||||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | <van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | ||||
@@ -153,14 +156,14 @@ | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getDicts("important_type").then((response) => { | |||||
this.importantTypeOptions = response.data; | |||||
}); | |||||
this.type = this.$route.query.type; | this.type = this.$route.query.type; | ||||
this.queryParams.bookId = Cookies.get('bookId'); | this.queryParams.bookId = Cookies.get('bookId'); | ||||
this.queryParams.deptId = Cookies.get('deptId'); | this.queryParams.deptId = Cookies.get('deptId'); | ||||
this.queryParams.id = this.$route.query.id; | this.queryParams.id = this.$route.query.id; | ||||
this.getDetail(); | |||||
this.getDicts("important_type").then((response) => { | |||||
this.importantTypeOptions = response.data; | |||||
this.getDetail(); | |||||
}); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
onConfirmThreeDetailType(data){ | onConfirmThreeDetailType(data){ | ||||
@@ -192,6 +195,7 @@ | |||||
this.openPic[i] = {url:'/api'+rrr} | this.openPic[i] = {url:'/api'+rrr} | ||||
}) | }) | ||||
} | } | ||||
this.importantType = this.selectDictLabel(this.importantTypeOptions, res.data.importantType); | |||||
that.form = res.data; | that.form = res.data; | ||||
}) | }) | ||||
}, | }, | ||||
@@ -270,6 +274,13 @@ | |||||
</script> | </script> | ||||
<style scoped lang="scss"> | <style scoped lang="scss"> | ||||
.fileName{ | |||||
display: -webkit-box; | |||||
-webkit-box-orient: vertical; | |||||
-webkit-line-clamp: 2; | |||||
word-break: break-all; | |||||
overflow: hidden; | |||||
} | |||||
/deep/ .van-button--primary{ | /deep/ .van-button--primary{ | ||||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | ||||
background-size: 100% 100%; | background-size: 100% 100%; | ||||
@@ -0,0 +1,413 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div | |||||
class="header_main" | |||||
:style="`background-image:url(${require(showBtn?'@/assets/images/sunVillage_info/list_head.png':'@/assets/images/sunVillage_info/list_head_red.png')})`" | |||||
> | |||||
<p class="title">专项公示</p> | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn" @click="add" v-show="showBtn"></div> | |||||
</div> | |||||
<div class="record_main"> | |||||
<div class="record_det"> | |||||
<div></div> | |||||
<!-- <div class="year_l" @click="tabShow"><i :class="{'icon':true , 'zk':!showTab , 'ss':showTab } "></i>{{queryParams.openYear == '' ? '全部': queryParams.openYear}}<span class="unit">{{queryParams.openYear == '' ? '': '年'}}</span></div>--> | |||||
<div class="total_r">共{{listLength}}条公开</div> | |||||
</div> | |||||
<!-- <div class="record_list" v-if="showTab">--> | |||||
<!-- <div :class="{'flex_block':true , 'current':queryParams.openYear == ''}" @click="tabClick('')">全部</div>--> | |||||
<!-- <div v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':queryParams.openYear == item}" @click="tabClick(item)">{{item}}</div>--> | |||||
<!-- </div>--> | |||||
</div> | |||||
<div class="list_main"> | |||||
<van-list | |||||
v-model="loading" | |||||
:finished="finished" | |||||
finished-text="没有更多了" | |||||
@load="getList" | |||||
> | |||||
<div class="item" v-for="(item,index) in applicationList" :key="index" @click="viewItem(item.id)" > | |||||
<div class="info"> | |||||
<div class="title"> | |||||
<p class="news_title">{{item.openName}}</p> | |||||
</div> | |||||
<div class="time"> | |||||
<!-- <div class="icon_time"></div>--> | |||||
<!-- {{item.openAt}}--> | |||||
有异议:{{item.differCount}} | |||||
无异议:{{item.agreeCount}} | |||||
</div> | |||||
</div> | |||||
<div class="operation" v-show="showBtn"> | |||||
<div class="opera_btn view" @click.stop="viewItem(item.id)"> | |||||
<i class="icon "></i> | |||||
</div> | |||||
<div class="opera_btn edit" @click.stop="edit(item.id)"> | |||||
<i class="icon "></i> | |||||
</div> | |||||
<div class="opera_btn delete" @click.stop="remove(item.id)"> | |||||
<i class="icon"></i> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</van-list> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import {Dialog, Toast} from "vant"; | |||||
import Cookies from "js-cookie"; | |||||
import {specialPublicityList, specialPublicityRemove} from "@/api/sunVillage_info/fixedAssets"; | |||||
export default { | |||||
name: "otherOpenList", | |||||
data() { | |||||
return { | |||||
dataList:[], | |||||
total: 0, | |||||
queryParams:{ | |||||
pageNum:1, | |||||
pageSize:10, | |||||
isAsc:'desc', | |||||
openYear:'', | |||||
otherType: null, | |||||
}, | |||||
yearList: [], | |||||
reload: false, | |||||
showTab: false, | |||||
otherTypeOptions: [], | |||||
showType: false, | |||||
loading: false, | |||||
finished: false, | |||||
applicationList:[], | |||||
listLength:'0', | |||||
showBtn:true, | |||||
}; | |||||
}, | |||||
created() { | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
if (this.$route.query.type == 'code'){ | |||||
this.showBtn = false; | |||||
} | |||||
}, | |||||
methods: { | |||||
getList(){ | |||||
var _this = this; | |||||
specialPublicityList(_this.queryParams).then(response => { | |||||
_this.listLength = response.total; | |||||
response.rows.map(res=>{ | |||||
_this.applicationList.push(res); | |||||
}) | |||||
if(_this.applicationList.length >= response.total){ | |||||
_this.finished = true; | |||||
return; | |||||
}else{ | |||||
_this.loading = false; | |||||
_this.queryParams.pageNum += 1 ; | |||||
} | |||||
}); | |||||
}, | |||||
viewItem(id){ | |||||
this.$router.push({path:'/sunVillage_info/list_special_detail',query: {id:id,type:this.$route.query.typeX,showBtn:this.showBtn}}); | |||||
}, | |||||
add() { | |||||
this.$router.push({path:'/sunVillage_info/list_special_add'}); | |||||
}, | |||||
edit(id) { | |||||
this.$router.push({path:'/sunVillage_info/list_special_edit',query: {id:id}}); | |||||
}, | |||||
remove(id) { | |||||
Dialog.confirm({ | |||||
title: '警告', | |||||
message: '确认删除该项?', | |||||
}) | |||||
.then(() => { | |||||
const loading = Toast.loading({ | |||||
message: '删除中...', | |||||
duration: 0, | |||||
}); | |||||
specialPublicityRemove(id).then((resp) => { | |||||
this.$notify({ type: 'success', message: '删除成功' }); | |||||
this.applicationList = []; | |||||
this.getList(); | |||||
}).finally(() => { | |||||
loading.clear(); | |||||
}); | |||||
}) | |||||
.catch(() => {}); | |||||
}, | |||||
tabClick(year){ | |||||
this.queryParams.openYear = year; | |||||
this.reload = true; | |||||
}, | |||||
tabShow(){ | |||||
this.showTab = !this.showTab; | |||||
} | |||||
} | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
.home_wrapper{ | |||||
background: #e9e9e9; | |||||
min-height: 100vh; | |||||
width: 100vw; | |||||
.header_main{ | |||||
height: 116px; | |||||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
position: fixed; | |||||
top: 0; | |||||
left: 0; | |||||
width: 100%; | |||||
font-size: 36px; | |||||
line-height: 116px; | |||||
text-align: center; | |||||
color: #fff; | |||||
position: relative; | |||||
.return_btn{ | |||||
width: 24px; | |||||
height: 43.2px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||||
background-size: 20px 36px; | |||||
position: absolute; | |||||
left: 38px; | |||||
top: 36px; | |||||
} | |||||
.add_btn{ | |||||
width: 56.4px; | |||||
height: 40.8px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||||
background-size: 47px 34px; | |||||
position: absolute; | |||||
right: 38px; | |||||
top: 36px; | |||||
} | |||||
.title { | |||||
} | |||||
/*.title::before {*/ | |||||
/* display: inline-block;*/ | |||||
/* width: 24px;*/ | |||||
/* height: 24px;*/ | |||||
/* content: '';*/ | |||||
/* background-image: url('../../assets/images/icon/index_header_focus.png');*/ | |||||
/* background-repeat: no-repeat;*/ | |||||
/* background-size: contain;*/ | |||||
/* margin-right: 0.2rem;*/ | |||||
/* transform: rotate(*/ | |||||
/* 180deg*/ | |||||
/* );*/ | |||||
/*}*/ | |||||
/*.title::after {*/ | |||||
/* width: 0.32rem;*/ | |||||
/* height: 0.32rem;*/ | |||||
/* display: inline-block;*/ | |||||
/* content: '';*/ | |||||
/* background-image: url('../../assets/images/icon/index_header_focus.png');*/ | |||||
/* background-repeat: no-repeat;*/ | |||||
/* background-size: contain;*/ | |||||
/* margin-left: 0.2rem;*/ | |||||
/*}*/ | |||||
} | |||||
.record_main{ | |||||
padding:30px 22px; | |||||
.record_det{ | |||||
height: 38px; | |||||
line-height: 38px; | |||||
display: flex; | |||||
justify-content:space-between; | |||||
.year_l{ | |||||
font-size: 30px; | |||||
display: flex; | |||||
align-items: center; | |||||
color: #858585; | |||||
.unit{ | |||||
padding-left: 5px; | |||||
} | |||||
.icon{ | |||||
width: 23px; | |||||
height: 12px; | |||||
display: block; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
margin-bottom: 4px; | |||||
margin-right: 8px; | |||||
&.zk { | |||||
transform: rotate(0deg) | |||||
} | |||||
&.ss{ | |||||
transform: rotate(180deg) | |||||
} | |||||
} | |||||
} | |||||
.total_r{ | |||||
font-size: 26px; | |||||
letter-spacing: 2px; | |||||
} | |||||
} | |||||
.record_list{ | |||||
display: flex; | |||||
flex-flow: wrap; | |||||
margin-top: 12PX; | |||||
.flex_block{ | |||||
font-size: 30px; | |||||
color: #878787; | |||||
padding-right: 30px; | |||||
&.current{ | |||||
color: #4199fe; | |||||
font-weight: bold; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
.list_main{ | |||||
padding:15px 22px; | |||||
.item{ | |||||
height: 140px; | |||||
border-radius: 30px; | |||||
background: #fff; | |||||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||||
padding:25px 32px; | |||||
display: flex; | |||||
margin-bottom: 20px; | |||||
justify-content: space-between; | |||||
.info{ | |||||
.title{ | |||||
display: flex; | |||||
font-size: 32px; | |||||
align-items: center; | |||||
height: 58px; | |||||
.icon_box{ | |||||
width: 34px; | |||||
display: block; | |||||
height: 30px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
margin-right: 10px; | |||||
flex-shrink: 0; | |||||
} | |||||
.news_title{ | |||||
display: -webkit-box; | |||||
-webkit-box-orient: vertical; | |||||
-webkit-line-clamp: 1; | |||||
word-break: break-all; | |||||
overflow: hidden; | |||||
} | |||||
.tips_mark{ | |||||
width: 34px; | |||||
height: 34px; | |||||
background: #fa0c0c; | |||||
border-radius: 8px; | |||||
font-size: 24px; | |||||
color: #fff; | |||||
text-align: center; | |||||
line-height: 34px; | |||||
margin-left: 10px; | |||||
flex-shrink: 0; | |||||
} | |||||
} | |||||
.time{ | |||||
font-size: 24px; | |||||
color: #858585; | |||||
display: flex; | |||||
align-items: center; | |||||
height: 30px; | |||||
margin-top: 6px; | |||||
.icon_time{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
margin-right: 10px; | |||||
} | |||||
} | |||||
} | |||||
.operation{ | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: right; | |||||
text-align: right; | |||||
.opera_btn{ | |||||
width: 52px; | |||||
height: 52px; | |||||
border-radius: 50%; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:center; | |||||
&.delete{ | |||||
background:#df0707; | |||||
margin-left: 10PX; | |||||
.icon{ | |||||
width: 22px; | |||||
height: 29px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
} | |||||
} | |||||
&.edit{ | |||||
background: #79cf13; | |||||
margin-left: 10PX; | |||||
.icon { | |||||
width: 26px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
} | |||||
} | |||||
&.view{ | |||||
background: #3494ff; | |||||
margin-left: 10PX; | |||||
.icon { | |||||
width: 29px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
} | |||||
} | |||||
&.list{ | |||||
background: #79cf13; | |||||
margin-left: 10PX; | |||||
.icon { | |||||
width: 29px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
.bottom_tips{ | |||||
font-size: 24px; | |||||
color: #a7a6a6; | |||||
text-align: center; | |||||
margin-top: 32px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat; | |||||
background-size: 260px 2px; | |||||
.xs{ | |||||
padding:0 8px; | |||||
background: #e9e9e9; | |||||
} | |||||
} | |||||
} | |||||
.top_head_title{ | |||||
font-size: 16PX; | |||||
text-align: center; | |||||
padding: 15PX 0; | |||||
} | |||||
</style> |
@@ -0,0 +1,343 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
专项公示 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<van-form @submit="onSubmit"> | |||||
<div class="list_main"> | |||||
<van-field required :rules="[{ required: true }]" v-model="form.openName" placeholder="请输入公开标题" input-align="right" :border="false" > | |||||
<template #label> | |||||
<p style="margin-left: 5px;">公示标题</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openAt" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择公示年月' }]" | |||||
> | |||||
<template #label> | |||||
<p style="margin-left: 5px;">公示年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openAt" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="specialPublicityType" | |||||
@click="showThreeDetailType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择公示类型' }]" | |||||
> | |||||
<template #label> | |||||
<p style="margin-left: 5px;">公示类型</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showThreeDetailType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
value-key="dictLabel" | |||||
:columns="specialPublicityTypeOptions" | |||||
@confirm="onConfirmThreeDetailType" | |||||
@cancel="showThreeDetailType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<p style="margin-left: 5px;">公示图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<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>--> | |||||
<!-- <p style="margin-left: 5px;">二维码图片</p>--> | |||||
<!-- </template>--> | |||||
<!-- </van-field>--> | |||||
<!-- <!– @delete="deleteFile1"–>--> | |||||
<!-- <van-uploader v-model="qrcode" multiple :after-read="afterRead2" @delete="deleteFile2" style="margin-top: 10PX" />--> | |||||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div style="margin: 16px auto;width: 50%;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { | |||||
commonUpload, | |||||
specialPublicityAdd | |||||
} from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
showThreeDetailType:false, | |||||
form:{ | |||||
openAt:this.format(new Date(),'yyyy-MM-dd'), | |||||
openPic:'', | |||||
qrcode:'', | |||||
}, | |||||
openPic:[], | |||||
qrcode:[], | |||||
openNy:new Date(), | |||||
openAt:'', | |||||
specialPublicityType:'', | |||||
queryParams:{ | |||||
id:'' | |||||
}, | |||||
qrcode2:[], | |||||
openPic2:[], | |||||
specialPublicityTypeOptions:[], | |||||
}; | |||||
}, | |||||
created() { | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.getDicts("special_publicity_type").then((response) => { | |||||
this.specialPublicityTypeOptions = response.data; | |||||
}); | |||||
}, | |||||
methods: { | |||||
onConfirmThreeDetailType(data){ | |||||
this.specialPublicityType = data.dictLabel; | |||||
this.form.specialPublicityType = data.dictValue; | |||||
this.showThreeDetailType = false; | |||||
}, | |||||
onSubmit(){ | |||||
var that = this; | |||||
// that.form.qrcode = that.qrcode2.join(',') | |||||
that.form.openPic = that.openPic2.join(',') | |||||
specialPublicityAdd(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '新增成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},1000) | |||||
} | |||||
}) | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openAt = this.format(data,'yyyy-MM-dd'); | |||||
this.openAt = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(file,detail){ | |||||
console.log(detail) | |||||
this.openPic2.splice(detail.index,1) | |||||
}, | |||||
deleteFile2(file,detail){ | |||||
console.log(detail) | |||||
this.qrcode2.splice(detail.index,1) | |||||
}, | |||||
afterRead(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.openPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
}else{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
}) | |||||
} | |||||
}, | |||||
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.qrcode2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
}else{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.qrcode2.push(r1.fileName); | |||||
}) | |||||
} | |||||
}, | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
/deep/ .van-button--primary{ | |||||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||||
background-size: 100% 100%; | |||||
border: none; | |||||
} | |||||
.home_wrapper{ | |||||
background: #e9e9e9; | |||||
min-height: 100vh; | |||||
width: 100vw; | |||||
.header_main { | |||||
height: 116px; | |||||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
position: fixed; | |||||
top: 0; | |||||
left: 0; | |||||
width: 100%; | |||||
font-size: 36px; | |||||
line-height: 116px; | |||||
text-align: center; | |||||
color: #fff; | |||||
position: relative; | |||||
.return_btn { | |||||
width: 24px; | |||||
height: 43.2px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||||
background-size: 20px 36px; | |||||
position: absolute; | |||||
left: 38px; | |||||
top: 36px; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.list_main{ | |||||
padding:25px; | |||||
background: #ffffff; | |||||
width: 94%; | |||||
margin: 25px auto 0; | |||||
border-radius: 15PX; | |||||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||||
} | |||||
.titBox{ | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.tit{ | |||||
font-size: 36px; | |||||
font-weight: bold; | |||||
} | |||||
/deep/ .van-cell{ | |||||
padding-left: 0!important; | |||||
padding-right: 0!important; | |||||
padding-bottom: 0!important; | |||||
} | |||||
/deep/ .van-field__label{ | |||||
/*padding-left: 10PX;*/ | |||||
width: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
/deep/ .van-field__error-message{ | |||||
display: none; | |||||
} | |||||
} | |||||
</style> |
@@ -0,0 +1,172 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div | |||||
class="header_main" | |||||
:style="`background-image:url(${require(showBtn?'@/assets/images/sunVillage_info/list_head.png':'@/assets/images/sunVillage_info/list_head_red.png')})`" | |||||
> | |||||
专项公示 | |||||
<div class="return_btn" @click="back"></div> | |||||
</div> | |||||
<van-form ref="formData" :readonly="true"> | |||||
<div class="list_main"> | |||||
<van-field name="otherName" :value="form.openName" label="公示标题" input-align="right" :border="false" /> | |||||
<van-field name="openAt" :value="form.openAt" label="公示年月" input-align="right" :border="false" /> | |||||
<van-field | |||||
name="openPic" | |||||
label="公示图片" | |||||
input-align="right" | |||||
:border="false" | |||||
> | |||||
</van-field> | |||||
<CommonUpload style="padding-left: 10PX;" name="openPic" :value="form.openPic" multiple :deletable="false" :show-upload="false"/> | |||||
<van-field | |||||
label-width="auto" | |||||
name="qrcode" | |||||
label="二维码图片" | |||||
input-align="right" | |||||
:border="false" | |||||
> | |||||
</van-field> | |||||
<CommonUpload style="padding-left: 10PX;" name="qrcode" :value="form.qrcode" multiple :deletable="false" :show-upload="false"/> | |||||
<van-field name="specialPublicityType" :value="form.specialPublicityType" label="公示类型" label-width="auto" input-align="right" :border="false" /> | |||||
<van-field name="specialPublicityType" :value="form.differCount" label="有异议数" label-width="auto" input-align="right" :border="false" /> | |||||
<van-field name="specialPublicityType" :value="form.agreeCount" label="无异议数" label-width="auto" input-align="right" :border="false" /> | |||||
<van-field name="remake" :value="form.remark" label="备注" input-align="right" :border="false"/> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import CommonUpload from "@/components/form/CommonUpload.vue"; | |||||
import {specialPublicityDetail} from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
export default { | |||||
name: "otherOpenDetail", | |||||
components: {CommonUpload}, | |||||
data() { | |||||
return { | |||||
form: {}, | |||||
id:'', | |||||
title: '综合公开', | |||||
showBtn:true, | |||||
queryParams:{ | |||||
bookId:'', | |||||
id:'', | |||||
deptId:'' | |||||
}, | |||||
specialPublicityTypeOptions:[] | |||||
}; | |||||
}, | |||||
created() { | |||||
this.otherType = this.$route.query.type; | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.showBtn = this.$route.query.showBtn=='false'?false:true; | |||||
this.getDicts("special_publicity_type").then((response) => { | |||||
this.specialPublicityTypeOptions = response.data; | |||||
this.getDetail(); | |||||
}); | |||||
}, | |||||
methods: { | |||||
getDetail() { | |||||
specialPublicityDetail(this.queryParams).then((resp) => { | |||||
console.log() | |||||
resp.data.specialPublicityType = this.selectDictLabel(this.specialPublicityTypeOptions, resp.data.specialPublicityType); | |||||
this.form = resp.data; | |||||
}); | |||||
}, | |||||
back() { | |||||
this.$router.back(); | |||||
}, | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
/deep/ .van-button--primary{ | |||||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||||
background-size: 100% 100%; | |||||
border: none; | |||||
} | |||||
.home_wrapper{ | |||||
background: #e9e9e9; | |||||
min-height: 100vh; | |||||
width: 100vw; | |||||
.header_main { | |||||
height: 116px; | |||||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
position: fixed; | |||||
top: 0; | |||||
left: 0; | |||||
width: 100%; | |||||
font-size: 36px; | |||||
line-height: 116px; | |||||
text-align: center; | |||||
color: #fff; | |||||
position: relative; | |||||
.return_btn { | |||||
width: 24px; | |||||
height: 43.2px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||||
background-size: 20px 36px; | |||||
position: absolute; | |||||
left: 38px; | |||||
top: 36px; | |||||
} | |||||
.add_btn { | |||||
width: 56.4px; | |||||
height: 40.8px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||||
background-size: 47px 34px; | |||||
position: absolute; | |||||
right: 38px; | |||||
top: 36px; | |||||
} | |||||
} | |||||
.list_main{ | |||||
padding:25px; | |||||
background: #ffffff; | |||||
width: 94%; | |||||
margin: 25px auto 0; | |||||
border-radius: 15PX; | |||||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||||
} | |||||
.titBox{ | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.tit{ | |||||
font-size: 36px; | |||||
font-weight: bold; | |||||
} | |||||
/deep/ .van-cell{ | |||||
padding-left: 0!important; | |||||
padding-right: 0!important; | |||||
padding-bottom: 0!important; | |||||
} | |||||
/deep/ .van-field__label{ | |||||
padding-left: 10PX; | |||||
width: 8.2em; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 0; | |||||
} | |||||
} | |||||
.open-content { | |||||
padding: .2rem .3rem; | |||||
max-height: 8rem; | |||||
} | |||||
</style> |
@@ -0,0 +1,185 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div | |||||
class="header_main" | |||||
:style="`background-image:url(${require(showBtn?'@/assets/images/sunVillage_info/list_head.png':'@/assets/images/sunVillage_info/list_head_red.png')})`" | |||||
> | |||||
专项公示 | |||||
</div> | |||||
<van-form ref="formData" :readonly="true"> | |||||
<div class="list_main"> | |||||
<van-field name="otherName" :value="form.openName" label="公示标题" input-align="right" :border="false" /> | |||||
<van-field name="openAt" :value="form.openAt" label="公示年月" input-align="right" :border="false" /> | |||||
<van-field | |||||
name="openPic" | |||||
label="公示图片" | |||||
input-align="right" | |||||
:border="false" | |||||
> | |||||
</van-field> | |||||
<CommonUpload style="padding-left: 10PX;" name="openPic" :value="form.openPic" multiple :deletable="false" :show-upload="false"/> | |||||
<van-field | |||||
label-width="auto" | |||||
name="qrcode" | |||||
label="二维码图片" | |||||
input-align="right" | |||||
:border="false" | |||||
> | |||||
</van-field> | |||||
<CommonUpload style="padding-left: 10PX;" name="qrcode" :value="form.qrcode" multiple :deletable="false" :show-upload="false"/> | |||||
<van-field name="specialPublicityType" :value="form.specialPublicityType" label="公示类型" label-width="auto" input-align="right" :border="false" /> | |||||
<van-field name="specialPublicityType" :value="form.differCount" label="有异议数" label-width="auto" input-align="right" :border="false" /> | |||||
<van-field name="specialPublicityType" :value="form.agreeCount" label="无异议数" label-width="auto" input-align="right" :border="false" /> | |||||
<van-field name="remake" :value="form.remark" label="备注" input-align="right" :border="false"/> | |||||
</div> | |||||
<div v-if="showHasVote" style="margin: 16px auto;display: flex;justify-content: space-evenly;padding: 0 25px"> | |||||
<van-button round block type="danger" @click="hasVote('1')">有异议</van-button> | |||||
<van-button round block type="primary" @click="hasVote('2')" style="margin-left: 25px;">无异议</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import CommonUpload from "@/components/form/CommonUpload.vue"; | |||||
import {specialPublicityDetail, updateSpecialPublicityCount} from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
export default { | |||||
name: "otherOpenDetail", | |||||
components: {CommonUpload}, | |||||
data() { | |||||
return { | |||||
form: {}, | |||||
id:'', | |||||
title: '综合公开', | |||||
showBtn:true, | |||||
showHasVote:true, | |||||
queryParams:{ | |||||
bookId:'', | |||||
id:'', | |||||
deptId:'' | |||||
}, | |||||
specialPublicityTypeOptions:[] | |||||
}; | |||||
}, | |||||
created() { | |||||
this.otherType = this.$route.query.type; | |||||
this.type = this.$route.query.type; | |||||
this.queryParams.bookId = this.$route.query.bookId; | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.showBtn = this.$route.query.showBtn=='false'?false:true; | |||||
this.getDicts("special_publicity_type").then((response) => { | |||||
this.specialPublicityTypeOptions = response.data; | |||||
this.getDetail(); | |||||
}); | |||||
}, | |||||
methods: { | |||||
getDetail() { | |||||
specialPublicityDetail(this.queryParams).then((resp) => { | |||||
console.log() | |||||
resp.data.specialPublicityType = this.selectDictLabel(this.specialPublicityTypeOptions, resp.data.specialPublicityType); | |||||
this.form = resp.data; | |||||
}); | |||||
}, | |||||
back() { | |||||
this.$router.back(); | |||||
}, | |||||
hasVote(type){ | |||||
this.queryParams.countType = type; | |||||
updateSpecialPublicityCount(this.queryParams).then((resp) => { | |||||
console.log() | |||||
resp.data.specialPublicityType = this.selectDictLabel(this.specialPublicityTypeOptions, resp.data.specialPublicityType); | |||||
this.form = resp.data; | |||||
this.showHasVote = false; | |||||
}); | |||||
} | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
/*/deep/ .van-button--primary{*/ | |||||
/* background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;*/ | |||||
/* background-size: 100% 100%;*/ | |||||
/* border: none;*/ | |||||
/*}*/ | |||||
.home_wrapper{ | |||||
background: #e9e9e9; | |||||
min-height: 100vh; | |||||
width: 100vw; | |||||
.header_main { | |||||
height: 116px; | |||||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
position: fixed; | |||||
top: 0; | |||||
left: 0; | |||||
width: 100%; | |||||
font-size: 36px; | |||||
line-height: 116px; | |||||
text-align: center; | |||||
color: #fff; | |||||
position: relative; | |||||
.return_btn { | |||||
width: 24px; | |||||
height: 43.2px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||||
background-size: 20px 36px; | |||||
position: absolute; | |||||
left: 38px; | |||||
top: 36px; | |||||
} | |||||
.add_btn { | |||||
width: 56.4px; | |||||
height: 40.8px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat; | |||||
background-size: 47px 34px; | |||||
position: absolute; | |||||
right: 38px; | |||||
top: 36px; | |||||
} | |||||
} | |||||
.list_main{ | |||||
padding:25px; | |||||
background: #ffffff; | |||||
width: 94%; | |||||
margin: 25px auto 0; | |||||
border-radius: 15PX; | |||||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||||
} | |||||
.titBox{ | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.tit{ | |||||
font-size: 36px; | |||||
font-weight: bold; | |||||
} | |||||
/deep/ .van-cell{ | |||||
padding-left: 0!important; | |||||
padding-right: 0!important; | |||||
padding-bottom: 0!important; | |||||
} | |||||
/deep/ .van-field__label{ | |||||
padding-left: 10PX; | |||||
width: 8.2em; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 0; | |||||
} | |||||
} | |||||
.open-content { | |||||
padding: .2rem .3rem; | |||||
max-height: 8rem; | |||||
} | |||||
</style> |
@@ -0,0 +1,366 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<div class="header_main"> | |||||
专项公示 | |||||
<div class="return_btn" @click="onClickLeft"></div> | |||||
<div class="add_btn"></div> | |||||
</div> | |||||
<van-form @submit="onSubmit"> | |||||
<div class="list_main"> | |||||
<van-field required :rules="[{ required: true }]" v-model="form.openName" placeholder="请输入公开标题" input-align="right" :border="false" > | |||||
<template #label> | |||||
<p style="margin-left: 5px;">公示标题</p> | |||||
</template> | |||||
</van-field> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="form.openAt" | |||||
@click="showBuildTime = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择公示年月' }]" | |||||
> | |||||
<template #label> | |||||
<p style="margin-left: 5px;">公示年月</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showBuildTime" position="bottom"> | |||||
<van-datetime-picker | |||||
v-model="openAt" | |||||
type="date" | |||||
title="选择年月日" | |||||
@confirm="onConfirmOpenNy" | |||||
@cancel="showBuildTime = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
placeholder="请选择" | |||||
v-model="specialPublicityType" | |||||
@click="showThreeDetailType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
required | |||||
:border="false" | |||||
:rules="[{ required: true , message:'请选择公示类型' }]" | |||||
> | |||||
<template #label> | |||||
<p style="margin-left: 5px;">公示类型</p> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showThreeDetailType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
value-key="dictLabel" | |||||
:columns="specialPublicityTypeOptions" | |||||
@confirm="onConfirmThreeDetailType" | |||||
@cancel="showThreeDetailType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field readonly input-align="right" :border="false" > | |||||
<template #label> | |||||
<p style="margin-left: 5px;">公示图片</p> | |||||
</template> | |||||
</van-field> | |||||
<!-- @delete="deleteFile1"--> | |||||
<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>--> | |||||
<!-- <p style="margin-left: 5px;">二维码图片</p>--> | |||||
<!-- </template>--> | |||||
<!-- </van-field>--> | |||||
<!-- <!– @delete="deleteFile1"–>--> | |||||
<!-- <van-uploader v-model="qrcode" multiple :after-read="afterRead2" @delete="deleteFile2" style="margin-top: 10PX" />--> | |||||
<van-field v-model="form.remark" placeholder="请输入备注" input-align="right" :border="false" > | |||||
<template #label> | |||||
<p style="margin-left: 5px;">备注</p> | |||||
</template> | |||||
</van-field> | |||||
</div> | |||||
<div style="margin: 16px auto;width: 50%;"> | |||||
<van-button round block type="primary" native-type="submit"> | |||||
保存 | |||||
</van-button> | |||||
</div> | |||||
</van-form> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import { | |||||
commonUpload, | |||||
specialPublicityDetail, | |||||
specialPublicityEdit | |||||
} from "@/api/sunVillage_info/fixedAssets"; | |||||
import Cookies from "js-cookie"; | |||||
import request from '@/utils/request' | |||||
export default { | |||||
name: "certificateList", | |||||
data() { | |||||
return { | |||||
showBuildTime:false, | |||||
form:{ | |||||
openAt:this.format(new Date(),'yyyy-MM-dd'), | |||||
openPic:'', | |||||
qrcode:'', | |||||
}, | |||||
openPic:[], | |||||
qrcode:[], | |||||
openNy:new Date(), | |||||
openAt:'', | |||||
queryParams:{ | |||||
id:'' | |||||
}, | |||||
qrcode2:[], | |||||
openPic2:[], | |||||
showThreeDetailType:false, | |||||
specialPublicityType:'', | |||||
specialPublicityTypeOptions:[], | |||||
}; | |||||
}, | |||||
created() { | |||||
this.queryParams.bookId = Cookies.get('bookId'); | |||||
this.queryParams.deptId = Cookies.get('deptId'); | |||||
this.queryParams.id = this.$route.query.id; | |||||
this.getDicts("special_publicity_type").then((response) => { | |||||
this.specialPublicityTypeOptions = response.data; | |||||
this.getDetail(); | |||||
}); | |||||
}, | |||||
methods: { | |||||
onConfirmThreeDetailType(data){ | |||||
this.specialPublicityType = data.dictLabel; | |||||
this.form.specialPublicityType = data.dictValue; | |||||
this.showThreeDetailType = false; | |||||
}, | |||||
getDetail(){ | |||||
specialPublicityDetail(this.queryParams).then((res) => { | |||||
if (res.data.openPic!='' && res.data.openPic != null && res.data.openPic != undefined){ | |||||
this.openPic = res.data.openPic.split(',') | |||||
this.openPic2 = res.data.openPic.split(',') | |||||
this.specialPublicityType = this.selectDictLabel(this.specialPublicityTypeOptions, res.data.specialPublicityType); | |||||
this.openPic.map((rrr,i)=>{ | |||||
this.openPic[i] = {url:'/api'+rrr} | |||||
}) | |||||
} | |||||
// if (res.data.qrcode!='' && res.data.qrcode != null && res.data.qrcode != undefined){ | |||||
// this.qrcode = res.data.qrcode.split(',') | |||||
// this.qrcode2 = res.data.qrcode.split(',') | |||||
// this.qrcode.map((rrr,i)=>{ | |||||
// this.qrcode[i] = {url:'/api'+rrr} | |||||
// }) | |||||
// } | |||||
this.form = res.data; | |||||
}) | |||||
}, | |||||
onSubmit(){ | |||||
var that = this; | |||||
// that.form.qrcode = that.qrcode2.join(',') | |||||
that.form.openPic = that.openPic2.join(',') | |||||
specialPublicityEdit(that.form).then((r1) => { | |||||
if (r1.code == 200){ | |||||
that.$notify({ type: 'success', message: '修改成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},1000) | |||||
} | |||||
}) | |||||
}, | |||||
onConfirmOpenNy(data){ | |||||
this.form.openAt = this.format(data,'yyyy-MM-dd'); | |||||
this.openAt = data; | |||||
this.showBuildTime = false; | |||||
}, | |||||
deleteFile1(file,detail){ | |||||
console.log(detail) | |||||
this.openPic2.splice(detail.index,1) | |||||
}, | |||||
deleteFile2(file,detail){ | |||||
console.log(detail) | |||||
this.qrcode2.splice(detail.index,1) | |||||
}, | |||||
afterRead(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.openPic2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
}else{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.openPic2.push(r1.fileName); | |||||
}) | |||||
} | |||||
}, | |||||
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.qrcode2.push(r1.fileName); | |||||
}) | |||||
}) | |||||
}else{ | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
this.qrcode2.push(r1.fileName); | |||||
}) | |||||
} | |||||
}, | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
/deep/ .van-button--primary{ | |||||
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat; | |||||
background-size: 100% 100%; | |||||
border: none; | |||||
} | |||||
.home_wrapper{ | |||||
background: #e9e9e9; | |||||
min-height: 100vh; | |||||
width: 100vw; | |||||
.header_main { | |||||
height: 116px; | |||||
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
position: fixed; | |||||
top: 0; | |||||
left: 0; | |||||
width: 100%; | |||||
font-size: 36px; | |||||
line-height: 116px; | |||||
text-align: center; | |||||
color: #fff; | |||||
position: relative; | |||||
.return_btn { | |||||
width: 24px; | |||||
height: 43.2px; | |||||
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat; | |||||
background-size: 20px 36px; | |||||
position: absolute; | |||||
left: 38px; | |||||
top: 36px; | |||||
} | |||||
} | |||||
.release_head{ | |||||
height: 90px; | |||||
padding:0 23px; | |||||
display: flex; | |||||
align-items: center; | |||||
font-size: 26px; | |||||
color: #929292; | |||||
.people{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
.icon{ | |||||
width: 24px; | |||||
height: 21px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_1.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
.time{ | |||||
flex: 1; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content:flex-end; | |||||
.icon{ | |||||
width: 25px; | |||||
height: 25px; | |||||
background: url('../../assets/images/sunVillage_info/details_icon_2.png') no-repeat; | |||||
background-size: 100% 100%; | |||||
display: block; | |||||
margin-right: 8px; | |||||
} | |||||
} | |||||
} | |||||
.release_conetnt{ | |||||
padding:0 22px; | |||||
font-size: 32px; | |||||
color: #252525; | |||||
line-height: 44px; | |||||
img{ | |||||
max-width: 100%; | |||||
margin-bottom: 16px; | |||||
} | |||||
p{ | |||||
margin-bottom: 16px; | |||||
} | |||||
} | |||||
.list_main{ | |||||
padding:25px; | |||||
background: #ffffff; | |||||
width: 94%; | |||||
margin: 25px auto 0; | |||||
border-radius: 15PX; | |||||
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1); | |||||
} | |||||
.titBox{ | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
.tit{ | |||||
font-size: 36px; | |||||
font-weight: bold; | |||||
} | |||||
/deep/ .van-cell{ | |||||
padding-left: 0!important; | |||||
padding-right: 0!important; | |||||
padding-bottom: 0!important; | |||||
} | |||||
/deep/ .van-field__label{ | |||||
/*padding-left: 10PX;*/ | |||||
width: auto; | |||||
display: flex; | |||||
align-items: center; | |||||
} | |||||
/deep/ .van-cell--required::before{ | |||||
left: 85PX; | |||||
} | |||||
/deep/ .van-field__error-message{ | |||||
display: none; | |||||
} | |||||
} | |||||
</style> |
@@ -333,7 +333,6 @@ | |||||
padding:20px 23px; | padding:20px 23px; | ||||
display: flex; | display: flex; | ||||
.search_block{ | .search_block{ | ||||
height: 59px; | |||||
width: 535px; | width: 535px; | ||||
border-radius: 59px; | border-radius: 59px; | ||||
background: #fff; | background: #fff; | ||||