| @@ -1371,6 +1371,22 @@ export function specialPublicityDetail(query) { | |||||
| params: query | params: query | ||||
| }) | }) | ||||
| } | } | ||||
| // 查询四议表决详情 | |||||
| export function specialPublicityVote(query) { | |||||
| return request({ | |||||
| url: '/open/villageAffairs/public/specialVote', | |||||
| method: 'get', | |||||
| params: query | |||||
| }) | |||||
| } | |||||
| // 新增表决记录 | |||||
| export function votedetailAdd(data) { | |||||
| return request({ | |||||
| url: '/open/villageAffairs/public/votedetailAdd', | |||||
| method: 'post', | |||||
| data: data | |||||
| }) | |||||
| } | |||||
| // 查询四议两公开列表 | // 查询四议两公开列表 | ||||
| export function addReadCount(query) { | export function addReadCount(query) { | ||||
| @@ -153,6 +153,8 @@ const whiteList = [ | |||||
| '/sunVillage_info/list_special', | '/sunVillage_info/list_special', | ||||
| '/sunVillage_info/list_special_detail', | '/sunVillage_info/list_special_detail', | ||||
| '/sunVillage_info/list_special_detail_vote', | '/sunVillage_info/list_special_detail_vote', | ||||
| '/sunVillage_info/special_vote', | |||||
| '/sunVillage_info/special_vote_detail', | |||||
| '/sunVillage_info/list_finance_new', | '/sunVillage_info/list_finance_new', | ||||
| '/sunVillage_info/list_finance_new_detail', | '/sunVillage_info/list_finance_new_detail', | ||||
| @@ -3524,6 +3524,24 @@ export const constantRoutes = [ | |||||
| }, | }, | ||||
| component: (resolve) => require(['@/views/sunVillage_info/list_special_edit'], resolve) | component: (resolve) => require(['@/views/sunVillage_info/list_special_edit'], resolve) | ||||
| }, | }, | ||||
| { ////阳光村务(新)-- 四议表决 | |||||
| path: '/sunVillage_info/special_vote', | |||||
| name: 'sunVillageInfoSpecialVote', | |||||
| meta: { | |||||
| title: '四议表决', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/sunVillage_info/special_vote'], resolve) | |||||
| }, | |||||
| { ////阳光村务(新)-- 四议表决 | |||||
| path: '/sunVillage_info/special_vote_detail', | |||||
| name: 'sunVillageInfoSpecialVoteDetail', | |||||
| meta: { | |||||
| title: '四议表决', | |||||
| hidden: true, | |||||
| }, | |||||
| component: (resolve) => require(['@/views/sunVillage_info/special_vote_detail'], resolve) | |||||
| }, | |||||
| { ////阳光村务(新)-- 一张图公开 | { ////阳光村务(新)-- 一张图公开 | ||||
| path: '/sunVillage_info/list_contract_detail', | path: '/sunVillage_info/list_contract_detail', | ||||
| name: 'sunVillageInfoListContractDetail', | name: 'sunVillageInfoListContractDetail', | ||||
| @@ -0,0 +1,226 @@ | |||||
| <template> | |||||
| <div class="home_wrapper"> | |||||
| <div | |||||
| class="header_main" | |||||
| :style="`background-image:url(${require('@/assets/images/sunVillage_info/list_head.png')})`" | |||||
| > | |||||
| 四议表决 | |||||
| </div> | |||||
| <van-form ref="formData" :readonly="true"> | |||||
| <div class="list_main"> | |||||
| <van-field name="itemName" :value="form.itemName" label="事项名称" input-align="right" :border="false" /> | |||||
| <van-field label="事项内容" :border="false" /> | |||||
| <div class="contentBox" v-html="form.itemContent"></div> | |||||
| <van-field name="voteType" :value="form.voteType" label="事项节点" label-width="auto" input-align="right" :border="false" /> | |||||
| <van-field name="voteStatus" :value="form.voteStatus" label="事项状态" label-width="auto" input-align="right" :border="false" /> | |||||
| </div> | |||||
| <div class="list_main"> | |||||
| <div style="display: flex;justify-content: space-between;"> | |||||
| <span style="font-size: 14px;font-weight: bold;margin-left: 5px;">表决情况</span> | |||||
| <span style="font-size: 14px;margin-left: 15px;">{{form.itemAt}}</span> | |||||
| </div> | |||||
| <div style="text-align: right;width: 100%;"> | |||||
| <span style="font-size: 14px;margin-left: 10px;color: #1AC46F">{{voteNum1}}人同意</span> | |||||
| <span style="font-size: 14px;margin-left: 10px;color: #FF5500">{{voteNum2}}人不同意</span> | |||||
| <span style="font-size: 14px;margin-left: 10px;color: #999999">{{voteNum3}}人弃权</span> | |||||
| </div> | |||||
| <div style="color: #1AC46F;font-size: 14px;margin-left: 10px;margin-top: 10px;"> | |||||
| 同意:{{vote1}} | |||||
| </div> | |||||
| <div style="color: #v;font-size: 14px;margin-left: 10px;margin-top: 10px;"> | |||||
| 不同意:{{vote2}} | |||||
| </div> | |||||
| <div style="color: #999999;font-size: 14px;margin-left: 10px;margin-top: 10px;"> | |||||
| 弃权:{{vote3}} | |||||
| </div> | |||||
| </div> | |||||
| <div v-if="showHasVote" style="margin: 16px auto;display: flex;justify-content: space-evenly;padding: 0 25px"> | |||||
| <van-button round block type="primary" :to="{name:'sunVillageInfoSpecialVoteDetail', query: {id:form.id}}" | |||||
| style="border: 0;background-image: linear-gradient(to right, #48CBFC , #2D6DF6);">我要表决</van-button> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import CommonUpload from "@/components/form/CommonUpload.vue"; | |||||
| import {specialPublicityVote, updateSpecialPublicityCount, addReadCount} from "@/api/sunVillage_info/fixedAssets"; | |||||
| import Cookies from "js-cookie"; | |||||
| export default { | |||||
| name: "otherOpenDetail", | |||||
| components: {CommonUpload}, | |||||
| data() { | |||||
| return { | |||||
| form: {}, | |||||
| id:'', | |||||
| title: '综合公开', | |||||
| vote1: '无', | |||||
| vote2: '无', | |||||
| vote3: '无', | |||||
| voteNum1: 0, | |||||
| voteNum2: 0, | |||||
| voteNum3: 0, | |||||
| showBtn:true, | |||||
| showHasVote:true, | |||||
| queryParams:{ | |||||
| bookId:'', | |||||
| id:'', | |||||
| deptId:'' | |||||
| }, | |||||
| voteTypeOptions:[], | |||||
| voteStatusOptions:[], | |||||
| }; | |||||
| }, | |||||
| 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; | |||||
| addReadCount({id: this.$route.query.id}).then((resp) => { | |||||
| }); | |||||
| this.getDicts("vote_type").then((response) => { | |||||
| this.voteTypeOptions = response.data; | |||||
| this.getDetail(); | |||||
| }); | |||||
| this.getDicts("vote_status").then((response) => { | |||||
| this.voteStatusOptions = response.data; | |||||
| }); | |||||
| }, | |||||
| methods: { | |||||
| getDetail() { | |||||
| specialPublicityVote(this.queryParams).then((resp) => { | |||||
| if(resp.data.voteStatus == '2'){ | |||||
| this.showHasVote = false; | |||||
| } | |||||
| resp.data.voteType = this.selectDictLabel(this.voteTypeOptions, resp.data.voteType); | |||||
| resp.data.voteStatus = this.selectDictLabel(this.voteStatusOptions, resp.data.voteStatus); | |||||
| this.form = resp.data; | |||||
| var votedetail =[]; | |||||
| var vote11 = ""; | |||||
| var vote22 = ""; | |||||
| var vote33 = ""; | |||||
| votedetail = resp.data.detailList; | |||||
| for(let i = 0; i < votedetail.length; i++){ | |||||
| if(votedetail[i].voteResult === '1'){ | |||||
| vote11 += (votedetail[i].voteBy + " "); | |||||
| this.voteNum1++; | |||||
| } else if(votedetail[i].voteResult === '2'){ | |||||
| vote22 += (votedetail[i].voteBy + " "); | |||||
| this.voteNum2++; | |||||
| }else if(votedetail[i].voteResult === '3'){ | |||||
| vote33 += (votedetail[i].voteBy + " "); | |||||
| this.voteNum3++; | |||||
| } | |||||
| } | |||||
| if(vote11 != null && vote11.length > 0){ | |||||
| this.vote1 = vote11; | |||||
| } | |||||
| if(vote22 != null && vote22.length > 0){ | |||||
| this.vote2 = vote22; | |||||
| } | |||||
| if(vote33 != null && vote33.length > 0){ | |||||
| this.vote3 = vote33; | |||||
| } | |||||
| }); | |||||
| }, | |||||
| 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); | |||||
| } | |||||
| .contentBox img{ | |||||
| width: 100%; | |||||
| } | |||||
| .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,215 @@ | |||||
| <template> | |||||
| <div class="app-container"> | |||||
| <div | |||||
| class="header_main" | |||||
| :style="`background-image:url(${require('@/assets/images/sunVillage_info/list_head.png')})`" | |||||
| > | |||||
| 四议表决 | |||||
| <div class="return_btn" @click="onClickLeft"></div> | |||||
| </div> | |||||
| <van-form @submit="handleGenerate" @failed="getError" :show-error-message="false" scroll-to-error validate-first> | |||||
| <div class="main_box"> | |||||
| <van-field label="表决人" required :rules="[{ required: true , message:'请输入表决人' }]" v-model="form.voteBy" placeholder="请输入表决人" input-align="right" label-width="auto"/> | |||||
| <van-cell title="表决意见" required> | |||||
| <template #right-icon> | |||||
| <van-radio-group direction="horizontal" required :rules="[{ required: true , message:'请选择表决意见' }]" v-model="form.voteResult"> | |||||
| <van-radio name="1">同意</van-radio> | |||||
| <van-radio name="2">不同意</van-radio> | |||||
| <van-radio name="3">弃权</van-radio> | |||||
| </van-radio-group> | |||||
| </template> | |||||
| </van-cell> | |||||
| <van-field label="备注" v-model="form.remark" type="textarea" placeholder="请输入备注" input-align="right" rows="3" label-width="auto"/> | |||||
| </div> | |||||
| <div> | |||||
| <van-row> | |||||
| <p class="title" style="margin: 5px 0px;position: relative;padding-left: 20px;font-size: 16px;">*电子签名</p> | |||||
| </van-row> | |||||
| <van-cell-group style="width: 100%;height:100%;overflow: hidden;padding-top: 10px;padding-bottom: 10px;"> | |||||
| <div class="signature-box" @mousedown="canvasTTdown" @touchstart="canvasTTdown"> | |||||
| <vue-esign | |||||
| ref="esign" | |||||
| class="mySign" | |||||
| :width="500" | |||||
| :height="370" | |||||
| :isCrop="signature.isCrop" | |||||
| :lineWidth="signature.lineWidth" | |||||
| :lineColor="signature.lineColor" | |||||
| :bgColor.sync="signature.bgColor" | |||||
| /> | |||||
| </div> | |||||
| <img src="../../assets/images/sunVillage_info/signature_icon_10.png" id="canvasTT" style="position:absolute;top: 50%;left: 50%;transform: translate(-50%, -50%) rotate(270deg)" alt=""> | |||||
| <div class="signature-footer"> | |||||
| <van-button @click="handleReset" class="clearBtn" type="info" plain size="small">清空画板</van-button> | |||||
| <!-- <van-button @click="handleGenerate" type="info" size="small">保存签字</van-button> --> | |||||
| </div> | |||||
| </van-cell-group> | |||||
| </div> | |||||
| <div style="padding: 16px 0;"> | |||||
| <van-row> | |||||
| <van-col span="24" align="center"> | |||||
| <van-button round block type="primary" class="submitButton" style="border: 0;background-image: linear-gradient(to right, #48CBFC , #2D6DF6);">保<i style="margin-right: 1em;"></i>存</van-button> | |||||
| </van-col> | |||||
| </van-row> | |||||
| <div class="clear"></div> | |||||
| </div> | |||||
| </van-form> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import {votedetailAdd} from "@/api/sunVillage_info/fixedAssets"; | |||||
| import $ from "jquery"; | |||||
| import vueEsign from 'vue-esign' | |||||
| import {getToken} from "@/utils/auth"; | |||||
| import axios from 'axios' | |||||
| export default { | |||||
| name: "votedetailAdd", | |||||
| data() { | |||||
| return { | |||||
| form:{ | |||||
| voteId: this.$route.query.id, | |||||
| voteBy: null, | |||||
| voteImg: null, | |||||
| voteResult: "1", | |||||
| remark: null, | |||||
| file: null, | |||||
| }, | |||||
| //电子签名 | |||||
| signature: { | |||||
| lineWidth: 6, // 画笔的线条粗细 | |||||
| lineColor: "#000000", // 画笔的颜色 | |||||
| bgColor: "", // 画布的背景颜色 | |||||
| resultImg: "", // 最终画布生成的base64图片 | |||||
| isCrop: false, // 是否裁剪,在画布设定尺寸基础上裁掉四周空白部分 | |||||
| }, | |||||
| }; | |||||
| }, | |||||
| created() { | |||||
| this.handleReset(); | |||||
| }, | |||||
| methods: { | |||||
| getError(e){ | |||||
| this.$notify({ type: 'danger', message: e.errors[0].message }); | |||||
| }, | |||||
| goBack(){ | |||||
| window.history.go(-1) | |||||
| }, | |||||
| canvasTTdown() { | |||||
| $('#canvasTT').css('display', 'none'); | |||||
| }, | |||||
| // 清空画板 | |||||
| handleReset() { | |||||
| this.$refs.esign.reset(); | |||||
| $('#canvasTT').css('display', 'block') | |||||
| }, | |||||
| // 生成签字图片 | |||||
| handleGenerate() { | |||||
| console.log("正在保存") | |||||
| this.$toast.loading({ | |||||
| message: "正在保存", | |||||
| forbidClick: true, | |||||
| duration: 0, | |||||
| }); | |||||
| this.$refs.esign | |||||
| .generate() // 使用生成器调用把签字的图片转换成为base64图片格式 | |||||
| .then((res) => { | |||||
| this.signature.resultImg = res; | |||||
| let wj = this.dataURLtoBlob(res); | |||||
| let param = new FormData() // 创建form对象 | |||||
| param.append('file', wj) // 通过append向form对象添加数据 | |||||
| param.append('voteId', this.form.voteId); | |||||
| param.append('voteBy', this.form.voteBy); | |||||
| param.append('voteResult', this.form.voteResult); | |||||
| param.append('remark', this.form.remark); | |||||
| votedetailAdd(param).then(response => { | |||||
| if (response.code === 200) { | |||||
| this.$toast({ | |||||
| icon: 'success', // 找到自己需要的图标 | |||||
| message: '保存成功', | |||||
| duration: "1000", | |||||
| onClose: () => { | |||||
| this.showSignPopup = false; | |||||
| this.goBack(); | |||||
| } | |||||
| }); | |||||
| } | |||||
| }); | |||||
| }) | |||||
| .catch((err) => { | |||||
| // 画布没有签字时会执行这里提示一下 | |||||
| this.$toast.fail('请签名后再保存'); | |||||
| }); | |||||
| }, | |||||
| dataURLtoBlob(dataurl, filename = 'file') { | |||||
| let arr = dataurl.split(',') | |||||
| let mime = arr[0].match(/:(.*?);/)[1] | |||||
| let suffix = mime.split('/')[1] | |||||
| let bstr = atob(arr[1]) | |||||
| let n = bstr.length | |||||
| let u8arr = new Uint8Array(n) | |||||
| while (n--) { | |||||
| u8arr[n] = bstr.charCodeAt(n) | |||||
| } | |||||
| return new File([u8arr], `${filename}.${suffix}`, { | |||||
| type: mime | |||||
| }) | |||||
| }, | |||||
| }, | |||||
| } | |||||
| </script> | |||||
| <style scoped lang="scss"> | |||||
| .app-container { | |||||
| padding-bottom: 2%; | |||||
| .header_main{ | |||||
| height: 116px; | |||||
| 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; | |||||
| margin-bottom: 2%; | |||||
| .return_btn{ | |||||
| width: 24px; | |||||
| height: 43.2px; | |||||
| background-size: 20px 36px; | |||||
| position: absolute; | |||||
| left: 38px; | |||||
| top: 36px; | |||||
| } | |||||
| } | |||||
| } | |||||
| .main_title{ | |||||
| font-size: 0.4rem; | |||||
| color: #1D6FE9; | |||||
| margin: 0.2rem 6%; | |||||
| margin-top: 0; | |||||
| position: relative; | |||||
| } | |||||
| .main_box{ | |||||
| width: 96%; | |||||
| margin: 0 auto; | |||||
| border-radius: 6px; | |||||
| box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .submitButton{ | |||||
| width: 80%; | |||||
| margin: 0 auto; | |||||
| background-color: #1D6FE9; | |||||
| } | |||||
| .addFamily{ | |||||
| position: absolute; | |||||
| top: -2px; | |||||
| right: 0; | |||||
| border-radius: 50%; | |||||
| } | |||||
| </style> | |||||