@@ -59,3 +59,12 @@ export function getVillageAffairs(id) { | |||||
method: 'get' | method: 'get' | ||||
}) | }) | ||||
} | } | ||||
//查询已上传附件 | |||||
export const attachmentList = (data) => { | |||||
return request({ | |||||
url: '/system/attachment/query', | |||||
method: 'get', | |||||
params: data | |||||
}) | |||||
} |
@@ -14,7 +14,7 @@ | |||||
<van-cell-group v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | <van-cell-group v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | ||||
<van-cell> | <van-cell> | ||||
<template #title> | <template #title> | ||||
<van-row style="margin-bottom:10px "> | |||||
<van-row style=""> | |||||
<van-col span="23" :offset="1"> | <van-col span="23" :offset="1"> | ||||
<h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | <h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;"> | ||||
@@ -26,16 +26,6 @@ | |||||
</van-col> | </van-col> | ||||
</van-row> | </van-row> | ||||
</template> | </template> | ||||
<template #label> | |||||
<van-row style="margin: 5px 0"> | |||||
<van-col span="15" :offset="1"> | |||||
<p style="font-size: 14px;">申请:</p> | |||||
</van-col> | |||||
<van-col span="6" :offset="2"> | |||||
<p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p> | |||||
</van-col> | |||||
</van-row> | |||||
</template> | |||||
</van-cell> | </van-cell> | ||||
<van-cell> | <van-cell> | ||||
<template #title> | <template #title> | ||||
@@ -43,8 +33,11 @@ | |||||
<van-col span="6" :offset="1"> | <van-col span="6" :offset="1"> | ||||
<p style="color: #878787">{{item.createTime?item.createTime.substring(0,10):item.startTime.substring(0,10)}}</p> | <p style="color: #878787">{{item.createTime?item.createTime.substring(0,10):item.startTime.substring(0,10)}}</p> | ||||
</van-col> | </van-col> | ||||
<van-col span="16" :offset="1"> | |||||
<p style="color: #878787">{{item.tableName}}</p> | |||||
<van-col span="10" :offset="1"> | |||||
<p style="color: #878787">{{item.formData.activityBusinessType}}</p> | |||||
</van-col> | |||||
<van-col span="5" :offset="1"> | |||||
<p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p> | |||||
</van-col> | </van-col> | ||||
</van-row> | </van-row> | ||||
</template> | </template> | ||||
@@ -71,10 +64,15 @@ | |||||
pageNum: 1, | pageNum: 1, | ||||
pageSize: 100, | pageSize: 100, | ||||
}, | }, | ||||
activityBusinessTypeOptions:[], | |||||
} | } | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getList(); | |||||
this.getDicts("activity_business_type").then((response) => { | |||||
this.activityBusinessTypeOptions = response.data; | |||||
this.getList(); | |||||
}); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
getList() { | getList() { | ||||
@@ -82,7 +80,6 @@ | |||||
this.$set(this.queryParams, "systemType", ''); | this.$set(this.queryParams, "systemType", ''); | ||||
if(this.activeName=='1'){ | if(this.activeName=='1'){ | ||||
ListTodo(this.queryParams).then((response) => { | ListTodo(this.queryParams).then((response) => { | ||||
console.log(response) | |||||
response.rows.map(res => { | response.rows.map(res => { | ||||
if(res.tableName?res.tableName.indexOf('house')>0:""){ | if(res.tableName?res.tableName.indexOf('house')>0:""){ | ||||
res.tableName = '来自农村宅基地管理系统' | res.tableName = '来自农村宅基地管理系统' | ||||
@@ -91,12 +88,18 @@ | |||||
}else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){ | }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){ | ||||
res.tableName = '来自银农直联审批管理系统' | res.tableName = '来自银农直联审批管理系统' | ||||
} | } | ||||
this.taskList.push(res) | |||||
if(this.activityBusinessTypeOptions){ | |||||
this.activityBusinessTypeOptions.map(t => { | |||||
if(t.dictValue == res.formData.activityBusinessType){ | |||||
res.formData.activityBusinessType = t.dictLabel | |||||
this.taskList.push(res) | |||||
} | |||||
}); | |||||
} | |||||
}) | }) | ||||
}) | }) | ||||
}else{ | }else{ | ||||
ListDone(this.queryParams).then((response) => { | ListDone(this.queryParams).then((response) => { | ||||
console.log(response) | |||||
response.rows.map(res => { | response.rows.map(res => { | ||||
if(res.tableName?res.tableName.indexOf('house')>0:""){ | if(res.tableName?res.tableName.indexOf('house')>0:""){ | ||||
res.tableName = '来自农村宅基地管理系统' | res.tableName = '来自农村宅基地管理系统' | ||||
@@ -105,7 +108,14 @@ | |||||
}else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){ | }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){ | ||||
res.tableName = '来自银农直联审批管理系统' | res.tableName = '来自银农直联审批管理系统' | ||||
} | } | ||||
this.taskList.push(res) | |||||
if(this.activityBusinessTypeOptions){ | |||||
this.activityBusinessTypeOptions.map(t => { | |||||
if(t.dictValue == res.formData.activityBusinessType){ | |||||
res.formData.activityBusinessType = t.dictLabel | |||||
this.taskList.push(res) | |||||
} | |||||
}); | |||||
} | |||||
}) | }) | ||||
}) | }) | ||||
} | } | ||||
@@ -40,8 +40,8 @@ | |||||
</van-col> | </van-col> | ||||
<van-col span="4"> | <van-col span="4"> | ||||
<h3 v-if="new Date(item.startTime) > new Date()" style="line-height: 50px;color: #1D6FE9" >未开始</h3> | <h3 v-if="new Date(item.startTime) > new Date()" style="line-height: 50px;color: #1D6FE9" >未开始</h3> | ||||
<h3 v-if="new Date(item.endTime) < new Date()" style="line-height: 50px;color: #1D6FE9" @click="go(item.id)">查看</h3> | |||||
<h3 v-if="new Date(item.startTime) <= new Date() && new Date(item.endTime) >= new Date()" style="line-height: 50px;color: #1D6FE9" @click="go(item.id)">投票</h3> | |||||
<h3 v-if="new Date(item.endTime) < new Date()" style="line-height: 50px;color: #1D6FE9" @click="go(item.id)">已结束</h3> | |||||
<h3 v-if="new Date(item.startTime) <= new Date() && new Date(item.endTime) >= new Date()" style="line-height: 50px;color: #1D6FE9" @click="go(item.id)">投票中</h3> | |||||
</van-col> | </van-col> | ||||
</van-row> | </van-row> | ||||
</van-list> | </van-list> | ||||
@@ -5,9 +5,9 @@ | |||||
left-arrow | left-arrow | ||||
@click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
> | > | ||||
<template #right> | |||||
<!--<template #right> | |||||
<van-image src=""></van-image> | <van-image src=""></van-image> | ||||
</template> | |||||
</template>--> | |||||
</van-nav-bar> | </van-nav-bar> | ||||
<van-row style="margin-top: 20px"> | <van-row style="margin-top: 20px"> | ||||
<van-col span="20" offset="2"> | <van-col span="20" offset="2"> | ||||
@@ -23,13 +23,13 @@ | |||||
<van-row style="margin-top: 10px"> | <van-row style="margin-top: 10px"> | ||||
<van-col span="9" offset="2"> | <van-col span="9" offset="2"> | ||||
<van-image | <van-image | ||||
v-if="form.anonymous==1" | |||||
v-if="form.anonymous!=1" | |||||
width="12" | width="12" | ||||
height="12" | height="12" | ||||
style="display: inline-block;" | style="display: inline-block;" | ||||
src="../../../static/images/onlineHome/vote1.png" | src="../../../static/images/onlineHome/vote1.png" | ||||
/> | /> | ||||
<p style="display: inline-block;color:#1D6FE9 ">实名</p> | |||||
<p style="display: inline-block;color:#1D6FE9" v-if="form.anonymous!=1">实名</p> | |||||
<van-image | <van-image | ||||
v-if="form.type==1" | v-if="form.type==1" | ||||
width="12" | width="12" | ||||
@@ -68,7 +68,7 @@ | |||||
src="../../../static/images/onlineHome/home3.png" | src="../../../static/images/onlineHome/home3.png" | ||||
/> | /> | ||||
</template> | </template> | ||||
<van-checkbox :name="item.id" style="float: right"/> | |||||
<van-checkbox :name="item.id" style="float: right" :disabled="!isPoll"/> | |||||
</van-cell> | </van-cell> | ||||
<van-row> | <van-row> | ||||
<van-col span="15" :offset="2" style="margin-top: 7px;"> | <van-col span="15" :offset="2" style="margin-top: 7px;"> | ||||
@@ -95,31 +95,39 @@ | |||||
src="../../../static/images/onlineHome/home3.png" | src="../../../static/images/onlineHome/home3.png" | ||||
/> | /> | ||||
</template> | </template> | ||||
<van-radio :name="item.id" style="float: right" /> | |||||
<van-radio :name="item.id" style="float: right" :disabled="!isPoll"/> | |||||
</van-cell> | </van-cell> | ||||
<van-row> | <van-row> | ||||
<van-col span="15" :offset="2" style="margin-top: 7px;"> | <van-col span="15" :offset="2" style="margin-top: 7px;"> | ||||
<van-progress v-if="result1!=item" :percentage="voteNum>0?((item.num/voteNum)*100).toFixed(2):0" :show-pivot="false"/> | |||||
<van-progress v-if="result1==item" :percentage="voteNum>0?(((item.num+1)/(voteNum+1))*100).toFixed(2):0" :show-pivot="false"/> | |||||
<van-progress v-if="result1!=item.id" :percentage="voteNum>0?((item.num/voteNum)*100).toFixed(2):0" :show-pivot="false"/> | |||||
<van-progress v-if="result1==item.id&&voteNum>0" :percentage="voteNum>0?(((item.num+1)/(voteNum+1))*100).toFixed(2):0" :show-pivot="false"/> | |||||
<van-progress v-if="result1==item.id&&voteNum==0" :percentage="voteNum==0?(((item.num+1)/(voteNum+1))*100).toFixed(2):0" :show-pivot="false"/> | |||||
</van-col> | </van-col> | ||||
<van-col span="5" :offset="2" v-if="result1!=item.id"> | <van-col span="5" :offset="2" v-if="result1!=item.id"> | ||||
{{item.num}}票 {{voteNum>0?((item.num/voteNum)*100).toFixed(2):0}}% | {{item.num}}票 {{voteNum>0?((item.num/voteNum)*100).toFixed(2):0}}% | ||||
</van-col> | </van-col> | ||||
<van-col span="5" :offset="2" v-if="result1==item.id"> | |||||
<van-col span="5" :offset="2" v-if="result1==item.id&&voteNum>0"> | |||||
{{item.num+1}}票 {{voteNum>0?(((item.num+1)/(voteNum+1))*100).toFixed(2):0}}% | {{item.num+1}}票 {{voteNum>0?(((item.num+1)/(voteNum+1))*100).toFixed(2):0}}% | ||||
</van-col> | </van-col> | ||||
<van-col span="5" :offset="2" v-if="result1==item.id&&voteNum==0"> | |||||
{{item.num+1}}票 {{voteNum==0?(((item.num+1)/(voteNum+1))*100).toFixed(2):0}}% | |||||
</van-col> | |||||
</van-row> | </van-row> | ||||
</van-cell-group> | </van-cell-group> | ||||
</van-radio-group> | </van-radio-group> | ||||
<van-row style="text-align: center;margin-top: 40px" v-if="isPoll"> | <van-row style="text-align: center;margin-top: 40px" v-if="isPoll"> | ||||
<van-button color="#1D6FE9" style="border-radius: 6px;width: 90%;margin: 0 auto" @click="submit">提交</van-button> | <van-button color="#1D6FE9" style="border-radius: 6px;width: 90%;margin: 0 auto" @click="submit">提交</van-button> | ||||
</van-row> | </van-row> | ||||
<van-row style="text-align: center;margin-top: 40px" v-if="!isPoll"> | |||||
<van-button color="#1D6FE9" style="border-radius: 6px;width: 90%;margin: 0 auto" @click="submit" :disabled="true">已投票</van-button> | |||||
</van-row> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import onlineHomeIndex from "../onlineHomeIndex"; | import onlineHomeIndex from "../onlineHomeIndex"; | ||||
import {getPoll, listPollVote, votePoll} from "../../api/onlineHome/poll"; | import {getPoll, listPollVote, votePoll} from "../../api/onlineHome/poll"; | ||||
import {getInfo} from "../../api/login"; | |||||
export default { | export default { | ||||
components: { | components: { | ||||
@@ -139,15 +147,23 @@ | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.form={} | |||||
this.getInfo(this.id); | this.getInfo(this.id); | ||||
listPollVote().then(res => { | listPollVote().then(res => { | ||||
if(res.rows.length>0){ | |||||
res.rows.map(r => { | |||||
if(r.pollId==this.id){ | |||||
this.isPoll=false | |||||
} | |||||
}) | |||||
} | |||||
console.log(this.$store) | |||||
getInfo().then(response => { | |||||
console.log(response) | |||||
if(res.rows.length>0){ | |||||
res.rows.map(r => { | |||||
if(r.pollId==this.id){ | |||||
if(r.userId == response.user.userId){ | |||||
this.isPoll = false | |||||
} | |||||
} | |||||
}) | |||||
} | |||||
}); | |||||
}) | }) | ||||
}, | }, | ||||
methods:{ | methods:{ | ||||
@@ -171,7 +187,7 @@ | |||||
let _this = this | let _this = this | ||||
if (this.form.type == 1) { | if (this.form.type == 1) { | ||||
if (this.result1 != "") { | if (this.result1 != "") { | ||||
list.push(this.pollRadioValue) | |||||
list.push(this.result1) | |||||
} else { | } else { | ||||
this.$toast({ | this.$toast({ | ||||
icon: 'error', // 找到自己需要的图标 | icon: 'error', // 找到自己需要的图标 | ||||
@@ -185,7 +201,7 @@ | |||||
} | } | ||||
} else { | } else { | ||||
if (this.result.length > 0) { | if (this.result.length > 0) { | ||||
list = this.result | |||||
list.push(this.result) | |||||
} else { | } else { | ||||
this.$toast({ | this.$toast({ | ||||
icon: 'error', // 找到自己需要的图标 | icon: 'error', // 找到自己需要的图标 | ||||
@@ -203,7 +219,7 @@ | |||||
message: '保存成功', | message: '保存成功', | ||||
duration:"1000", | duration:"1000", | ||||
onClose:function(){ | onClose:function(){ | ||||
_this.getInfo(this.id); | |||||
_this.$router.go(-1) | |||||
} | } | ||||
}) | }) | ||||
}); | }); | ||||
@@ -25,13 +25,17 @@ | |||||
</van-col> | </van-col> | ||||
</van-row> | </van-row> | ||||
<div id="content"></div> | <div id="content"></div> | ||||
<p style="margin-top:20px;">附件下载</p> | |||||
<van-cell v-for="(item,index) in fileList" :key="index"> | |||||
<a :href="item.fileUrl">{{index+1}}.{{item.fileName}}</a> | |||||
</van-cell> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import onlineHomeIndex from "../onlineHomeIndex"; | import onlineHomeIndex from "../onlineHomeIndex"; | ||||
import {getAffairs, listAffairs} from "../../api/onlineHome/threeAffairs"; | |||||
import {attachmentList, getAffairs, listAffairs} from "../../api/onlineHome/threeAffairs"; | |||||
import request from '@/utils/request' | |||||
export default { | export default { | ||||
components: { | components: { | ||||
@@ -53,7 +57,9 @@ | |||||
isWechat: null, | isWechat: null, | ||||
status: null, | status: null, | ||||
}, | }, | ||||
form:{} | |||||
form:{}, | |||||
fileList: [], //上传附件图片列表 | |||||
fileListData: [], //上传附件图片列表参数 | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -73,6 +79,17 @@ | |||||
getAffairs(this.id).then(response => { | getAffairs(this.id).then(response => { | ||||
this.form = response.data | this.form = response.data | ||||
document.getElementById('content').innerHTML = response.data.content; | document.getElementById('content').innerHTML = response.data.content; | ||||
let params = { | |||||
"fileType" : "0", | |||||
"tableName":"t_village_affairs", | |||||
"tableId":this.id, | |||||
} | |||||
attachmentList(params).then((res) => { | |||||
res.rows.map(r => { | |||||
r.fileUrl = location.protocol+"//"+location.host+request.defaults.baseURL+r.fileUrl | |||||
this.fileList.push(r) | |||||
}) | |||||
}); | |||||
}) | }) | ||||
}, | }, | ||||
}, | }, | ||||
@@ -25,13 +25,17 @@ | |||||
</van-col> | </van-col> | ||||
</van-row> | </van-row> | ||||
<div id="content"></div> | <div id="content"></div> | ||||
<p style="margin-top:20px;">附件下载</p> | |||||
<van-cell v-for="(item,index) in fileList" :key="index"> | |||||
<a :href="item.fileUrl">{{index+1}}.{{item.fileName}}</a> | |||||
</van-cell> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import onlineHomeIndex from "../onlineHomeIndex"; | import onlineHomeIndex from "../onlineHomeIndex"; | ||||
import {getAffairs, getVillageAffairs, listAffairs} from "../../api/onlineHome/threeAffairs"; | |||||
import {attachmentList, getAffairs, getVillageAffairs, listAffairs} from "../../api/onlineHome/threeAffairs"; | |||||
import request from '@/utils/request' | |||||
export default { | export default { | ||||
components: { | components: { | ||||
@@ -39,8 +43,6 @@ | |||||
name: "villageAffairsDetail", | name: "villageAffairsDetail", | ||||
data() { | data() { | ||||
return { | return { | ||||
loading: false, | |||||
finished: false, | |||||
id:null, | id:null, | ||||
type:"", | type:"", | ||||
// 查询参数 | // 查询参数 | ||||
@@ -53,7 +55,9 @@ | |||||
isWechat: null, | isWechat: null, | ||||
status: null, | status: null, | ||||
}, | }, | ||||
form:{} | |||||
form:{}, | |||||
fileList: [], //上传附件图片列表 | |||||
fileListData: [], //上传附件图片列表参数 | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -75,6 +79,18 @@ | |||||
getVillageAffairs(this.id).then(response => { | getVillageAffairs(this.id).then(response => { | ||||
this.form = response.data | this.form = response.data | ||||
document.getElementById('content').innerHTML = response.data.content; | document.getElementById('content').innerHTML = response.data.content; | ||||
let params = { | |||||
"fileType" : "0", | |||||
"tableName":"t_village_affairs", | |||||
"tableId":this.id, | |||||
} | |||||
attachmentList(params).then((res) => { | |||||
console.log(res) | |||||
res.rows.map(r => { | |||||
r.fileUrl = location.protocol+"//"+location.host+request.defaults.baseURL+r.fileUrl | |||||
this.fileList.push(r) | |||||
}) | |||||
}); | |||||
}) | }) | ||||
}, | }, | ||||
}, | }, | ||||
@@ -19,13 +19,15 @@ | |||||
</van-swipe-item> | </van-swipe-item> | ||||
</van-swipe> | </van-swipe> | ||||
<van-row style="margin:2%;width:96%;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); min-height: 100px;background: #fff;"> | <van-row style="margin:2%;width:96%;padding:20px 0;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); min-height: 100px;background: #fff;"> | ||||
<van-cell style="border-radius: 6px;"> | |||||
<van-cell style="border-radius: 6px;" is-link to="done"> | |||||
<template #title> | <template #title> | ||||
<p style="display:inline-block;background: #EC4B2C;height:20px;width: 20px;border-radius: 2px;margin-right: 10px;float: left"></p> | <p style="display:inline-block;background: #EC4B2C;height:20px;width: 20px;border-radius: 2px;margin-right: 10px;float: left"></p> | ||||
<p style="font-weight: bold;font-size: 18px;display: inline-block">待办</p> | |||||
<p style="font-weight: bold;font-size: 18px;display: inline-block;">待办</p> | |||||
</template> | </template> | ||||
<template #label> | <template #label> | ||||
<p>暂无代办</p> | |||||
<p style="padding-left: 10px;"> | |||||
{{taskList&&taskList.length>0?taskList[0].projectName+'等,共'+taskList.length+'条':'暂无待办事项'}} | |||||
</p> | |||||
</template> | </template> | ||||
</van-cell> | </van-cell> | ||||
</van-row> | </van-row> | ||||
@@ -410,6 +412,7 @@ | |||||
<script> | <script> | ||||
import onlineHomeIndex from "../onlineHomeIndex"; | import onlineHomeIndex from "../onlineHomeIndex"; | ||||
import {getInfo} from "../../api/login"; | import {getInfo} from "../../api/login"; | ||||
import {ListTodo} from "../../api/onlineHome/done"; | |||||
export default { | export default { | ||||
components: { | components: { | ||||
onlineHomeIndex | onlineHomeIndex | ||||
@@ -420,6 +423,11 @@ | |||||
list1: [], | list1: [], | ||||
images:['../../../static/images/onlineHome/tab.jpg'], | images:['../../../static/images/onlineHome/tab.jpg'], | ||||
deptName:"", | deptName:"", | ||||
queryParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
}, | |||||
taskList:[], | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
@@ -427,6 +435,9 @@ | |||||
console.log(response) | console.log(response) | ||||
this.deptName = response.user.deptName | this.deptName = response.user.deptName | ||||
}); | }); | ||||
ListTodo(this.queryParams).then((response) => { | |||||
this.taskList = response.rows | |||||
}) | |||||
}, | }, | ||||
} | } | ||||