|
|
@@ -4,7 +4,7 @@
|
|
|
<span class="des">{{ $route.query.content }}</span>
|
|
|
<div class="voteBox">
|
|
|
<van-skeleton :row="3" :loading="loading">
|
|
|
- <van-radio-group v-model="radio" :label-position="'left'" >
|
|
|
+ <van-radio-group v-model="radio" :label-position="'left'">
|
|
|
<van-radio class="van-radio" :name="item.id" checked-color="#5DD8D0" v-for="(item,index) in list" :key="index">{{ item.value }}</van-radio>
|
|
|
</van-radio-group>
|
|
|
</van-skeleton>
|
|
|
@@ -21,62 +21,92 @@
|
|
|
cancel-text="取消"
|
|
|
close-on-click-action
|
|
|
/>
|
|
|
+ <van-overlay :show="esignShow" >
|
|
|
+ <signCom @confirmSign="confirmSign" @cancel="cancel"></signCom>
|
|
|
+ </van-overlay>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { Dialog,Notify } from 'vant';
|
|
|
+import signCom from "@/components/signCom";
|
|
|
export default {
|
|
|
name: "voteDetial",
|
|
|
+ components:{
|
|
|
+ signCom
|
|
|
+ },
|
|
|
data(){
|
|
|
return {
|
|
|
radio:'',
|
|
|
list:[],
|
|
|
+ listMap:{},
|
|
|
loading:false,
|
|
|
show: false,
|
|
|
+ esignShow: false,
|
|
|
actions: [],
|
|
|
isPermissionShow:false,
|
|
|
+ houseId:'',
|
|
|
+ houseName:'',
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getVoteOptions()
|
|
|
this.getProxyPermission()
|
|
|
- this.el = this.$el
|
|
|
},
|
|
|
|
|
|
methods:{
|
|
|
- getProxyPermission(){
|
|
|
- this.$api.getProxyPermission().then(res=>{
|
|
|
- this.isPermissionShow = res.content.have
|
|
|
- })
|
|
|
- },
|
|
|
- goAgentVote(){
|
|
|
- this.$router.push({name:'agentVoteDetial',query:this.$route.query})
|
|
|
+ cancel(){
|
|
|
+ this.esignShow = false
|
|
|
},
|
|
|
- onSelect(item){
|
|
|
+ confirmSign(img){
|
|
|
Dialog.confirm({
|
|
|
- title: '提示',
|
|
|
+ title: '签名已生成',
|
|
|
message: '确认提交?提交后无法再修改提交结果。',
|
|
|
})
|
|
|
.then(() => {
|
|
|
let params = {
|
|
|
optionId:this.radio,
|
|
|
- houseId:item.houseId,
|
|
|
+ houseId:this.houseId,
|
|
|
+ signature:img
|
|
|
}
|
|
|
this.$api.voteItem(params).then(res=>{
|
|
|
Notify({ type: 'success', message: '提交成功' });
|
|
|
+ let voteDataDetial = {
|
|
|
+ signature:img,
|
|
|
+ houseName:this.houseName,
|
|
|
+ radioValue:this.listMap[this.radio],
|
|
|
+ ...this.$route.query,
|
|
|
+ }
|
|
|
+ localStorage.setItem('voteDataDetial',JSON.stringify(voteDataDetial))
|
|
|
+ this.$router.push({name:'voteResult'})
|
|
|
+ this.esignShow = false
|
|
|
})
|
|
|
})
|
|
|
.catch(() => {
|
|
|
// on cancel
|
|
|
});
|
|
|
-
|
|
|
+ },
|
|
|
+ getProxyPermission(){
|
|
|
+ this.$api.getProxyPermission().then(res=>{
|
|
|
+ this.isPermissionShow = res.content.have
|
|
|
+ })
|
|
|
+ },
|
|
|
+ goAgentVote(){
|
|
|
+ this.$router.push({name:'agentVoteDetial',query:this.$route.query})
|
|
|
+ },
|
|
|
+ onSelect(item){
|
|
|
+ this.esignShow = true
|
|
|
+ this.houseId = item.houseId
|
|
|
+ this.houseName = item.houseName
|
|
|
},
|
|
|
getVoteOptions(){
|
|
|
this.loading = true
|
|
|
this.$api.getVoteOptions({voteId:this.$route.query.id}).then(res=>{
|
|
|
this.loading = false
|
|
|
this.list = res.content
|
|
|
+ res.content.forEach(x=>{
|
|
|
+ this.listMap[x.id] = x.value
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
goSee(){
|
|
|
@@ -100,27 +130,33 @@ export default {
|
|
|
.catch(() => {
|
|
|
// on cancel
|
|
|
});
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.actions = res.content.map(x=>{
|
|
|
- return {
|
|
|
- ...x,
|
|
|
- name:x.houseName,
|
|
|
- disabled:!x.enabled
|
|
|
+ }else if(res.content.length == 1){
|
|
|
+ if(res.content[0].enabled == true){
|
|
|
+ this.houseName = res.content[0].houseName
|
|
|
+ this.houseId = res.content[0].houseId
|
|
|
+ this.esignShow = true
|
|
|
+ }else{
|
|
|
+ Notify({ type: 'warning', message: '当前房产已投过' });
|
|
|
}
|
|
|
- })
|
|
|
- this.show = true
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
|
|
|
+ }else {
|
|
|
+ this.actions = res.content.map(x=>{
|
|
|
+ return {
|
|
|
+ ...x,
|
|
|
+ name:x.houseName,
|
|
|
+ disabled:!x.enabled
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.show = true
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
+
|
|
|
input{
|
|
|
width: 299px;
|
|
|
padding: 0 10px;
|