wzdxx1314@163.com 2 éve
szülő
commit
920ad8525e

+ 18 - 0
package-lock.json

@@ -11,6 +11,7 @@
         "core-js": "^3.8.3",
         "vant": "^2.12.54",
         "vue": "^2.6.14",
+        "vue-esign": "^1.1.4",
         "vue-router": "^3.5.1",
         "vuex": "^3.6.2"
       },
@@ -10533,6 +10534,15 @@
         "csstype": "^3.1.0"
       }
     },
+    "node_modules/vue-esign": {
+      "version": "1.1.4",
+      "resolved": "https://repo.ctbiyi.com/repository/npmall/vue-esign/-/vue-esign-1.1.4.tgz",
+      "integrity": "sha512-7Ix5PdcyyhVfsvrT9a+yp5+36gbQ0/bpDO+QSLT58IgJ5t164PEptOy5Nslw8bZbk3n3Hc7SP5B8eXQ8X8W+OA==",
+      "license": "MIT",
+      "dependencies": {
+        "vue": "^2.5.11"
+      }
+    },
     "node_modules/vue-hot-reload-api": {
       "version": "2.3.4",
       "resolved": "https://repo.ctbiyi.com/repository/npmall/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
@@ -18616,6 +18626,14 @@
         "csstype": "^3.1.0"
       }
     },
+    "vue-esign": {
+      "version": "1.1.4",
+      "resolved": "https://repo.ctbiyi.com/repository/npmall/vue-esign/-/vue-esign-1.1.4.tgz",
+      "integrity": "sha512-7Ix5PdcyyhVfsvrT9a+yp5+36gbQ0/bpDO+QSLT58IgJ5t164PEptOy5Nslw8bZbk3n3Hc7SP5B8eXQ8X8W+OA==",
+      "requires": {
+        "vue": "^2.5.11"
+      }
+    },
     "vue-hot-reload-api": {
       "version": "2.3.4",
       "resolved": "https://repo.ctbiyi.com/repository/npmall/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",

+ 1 - 0
package.json

@@ -10,6 +10,7 @@
     "core-js": "^3.8.3",
     "vant": "^2.12.54",
     "vue": "^2.6.14",
+    "vue-esign": "^1.1.4",
     "vue-router": "^3.5.1",
     "vuex": "^3.6.2"
   },

+ 3 - 0
public/index.html

@@ -8,6 +8,9 @@
       <link rel="stylesheet" href="//at.alicdn.com/t/font_2939460_fcaitngwfe8.css">
       <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4008559_je56nyzymj.css">
     <title>业主之家</title>
+      <div id='wx_pic' style='margin:0 auto;display:none;'>
+          <img style="width: 300px; height: 300px" src='./logo.png' />
+      </div>
   </head>
   <body>
     <noscript>

+ 10 - 0
src/App.vue

@@ -36,5 +36,15 @@ html,body{
   color: #FFFFFF;
   margin: 0 auto;
 }
+.van-notify--success{
+  background-color: #5DD8D0!important;
+}
+.van-notify--primary{
+  background-color: #6C5DD3!important;
+}
+.van-notify--error{
+  background-color: #F96569!important;
+}
+
 
 </style>

+ 8 - 1
src/api/api.js

@@ -8,6 +8,7 @@ const axios = require('axios');
 const qs = require('qs')
 import router from "../router";
 import { Dialog ,Notify } from 'vant';
+
 const instance = axios.create({
     // baseURL: 'api',
     baseURL: '/api/',
@@ -152,6 +153,9 @@ export default {
     getVoteResult(params){
         return fetch('vote/result',params,'get')
     },
+    addSuggestion(params){
+        return fetch('suggestion',params,'put')
+    },
     getSuggestion(params){
         return fetch('suggestion/s',params,'get')
     },
@@ -162,7 +166,10 @@ export default {
         return fetch('estates/',params,'get')
     },
     getUserHouses(params){
-        return fetch('passport/house/s',params,'get')
+        return fetch('proprietor/house/s',params,'get')
+    },
+    getSelfHouses(params){
+        return fetch('house/s/passport',params,'get')
     },
     getProxyPermission(params){
         return fetch('auth/proxy',params,'get')

+ 10 - 1
src/components/houseSelect.vue

@@ -36,7 +36,16 @@ export default {
     onChange(target){
       if(target.selectedOptions[target.tabIndex].leaf == true){
         // this.form.houseId = String(target.value)
-        this.$emit('on-select',String(target.value))
+
+
+        this.$nextTick(()=>{
+          let obj = {
+            name:this.fieldValue,
+            value:String(target.value)
+          }
+          this.$emit('on-select',obj)
+        })
+
       }else{
         let params = {
           estateUnitId:target.value

+ 87 - 0
src/components/signCom.vue

@@ -0,0 +1,87 @@
+<template>
+  <div class="esignBox">
+    <span class="title">请进行手动签名</span>
+    <vue-esign class="vue-esign" ref="esign" :isClearBgColor="false"  :width="width" :height="height"  :isCrop="isCrop" :lineWidth="lineWidth" :lineColor="lineColor" :bgColor="bgColor" />
+
+    <div class="btnBox">
+      <div class="cancel"  style="margin: 0 auto;" @click="cancel">取消</div>
+      <div class="btnSign"  style="margin: 0 auto;" @click="confirmSign">确定签名</div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+export default {
+  name: "signCom",
+  data(){
+    return {
+      width:window.innerWidth,
+      height:window.innerHeight-120,
+      lineWidth: 4,
+      lineColor: '#000000',
+      bgColor: '#ffffff',
+      resultImg: '',
+      isCrop: true,
+    }
+  },
+  mounted() {
+    this.$refs.esign.reset()
+  },
+  methods:{
+    cancel(){
+      this.$refs.esign.reset()
+      this.$emit('cancel')
+    },
+    confirmSign(){
+      this.$refs.esign.generate({quality:0.2,format:'image/jpeg'}).then(res=>{
+        this.$emit('confirmSign',res)
+        this.$refs.esign.reset()
+      }).catch(err=>{})
+    },
+  },
+}
+</script>
+
+<style scoped lang="less">
+
+.esignBox{
+  width: 100%;
+  height: 100%;
+  .title{
+    width: 100%;
+    display: inline-block;
+    height: 60px;
+    text-align: center;
+    line-height: 60px;
+    background-color: white;
+    font-size: 22px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #01040D;
+  }
+.btnBox{
+  width: 100%;
+  height: 60px;
+  display: flex;
+  .cancel{
+    width: 50%;
+    height: 60px;
+    background-color: #F4F5F6 ;
+    color: #6C5DD3;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  .btnSign{
+    width: 50%;
+    height: 60px;
+    background-color: #F4F5F6 ;
+    color: #6C5DD3;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+}
+}
+</style>

+ 2 - 1
src/main.js

@@ -5,7 +5,8 @@ import store from './store'
 import api from "@/api/api";
 import Vant from 'vant';
 import 'vant/lib/index.css';
-
+import vueEsign from 'vue-esign'
+Vue.use(vueEsign)
 Vue.use(Vant);
 Vue.config.productionTip = false
 Vue.prototype.$api = api

+ 5 - 1
src/router/index.js

@@ -50,6 +50,10 @@ const routes = [
     path: '/voteModel',
     name: 'voteModel',
     component: ()=>import('../views/fuzhu/voteModel')
+  },{
+    path: '/voteResult',
+    name: 'voteResult',
+    component: ()=>import('../views/fuzhu/voteResult')
   },
   {
     path: '/suggestion',
@@ -80,7 +84,7 @@ const router = new VueRouter({
 })
 router.beforeEach((to,from,next)=>{
   if(to.path=='/'){
-    next('/welcome')
+    next('/home')
   }else{
     next()
   }

+ 1 - 1
src/views/Home/module/cardItem.vue

@@ -22,7 +22,7 @@ export default {
   },
   methods:{
     goDetial(){
-      this.$router.push({name:'meetingDetial',query:{id:this.params.id}})
+      this.$router.push({name:'meetingDetial',query:{id:this.params.id,pTitle:this.params.title}})
     },
   }
 }

+ 1 - 1
src/views/Home/module/voteItem.vue

@@ -19,7 +19,7 @@ export default {
   },
   methods:{
     goDetial(){
-      this.$router.push({name:'voteDetial',query:{id:this.params.id,title:this.params.title,content:this.params.content}})
+      this.$router.push({name:'voteDetial',query:{pid:this.$route.query.id,pTitle:this.$route.query.pTitle,id:this.params.id,title:this.params.title,content:this.params.content}})
     },
   },
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 1
src/views/Home/my.vue


+ 46 - 19
src/views/fuzhu/agentVoteDetial.vue

@@ -11,6 +11,9 @@
       <houseSelect class="center" @on-select="onSelect"></houseSelect>
 
     </div>
+    <van-overlay :show="esignShow"  >
+      <signCom @confirmSign="confirmSign" @cancel="cancel"></signCom>
+    </van-overlay>
     <div class="btn" @click="goSubmit" >进行投票</div>
     <div class="btn btn1" @click="goSee">查看投票情况</div>
   </div>
@@ -19,18 +22,22 @@
 <script>
 import { Dialog,Notify  } from 'vant';
 import houseSelect from "@/components/houseSelect";
+import signCom from "@/components/signCom";
 export default {
   name: "agentVoteDetial",
   components:{
-    houseSelect
+    houseSelect,signCom
   },
   data(){
     return {
       radio:'',
       list:[],
+      listMap:{},
       houseId:'',
+      houseName:'',
       loading:false,
       show: false,
+      esignShow:false,
       actions: [{ name: '房产1' }, { name: '房产2' }, { name: '房产3' }],
     }
   },
@@ -38,24 +45,7 @@ export default {
     this.getVoteOptions()
   },
   methods:{
-    onSelect(v){
-      this.houseId = String(v)
-    },
-    getVoteOptions(){
-      this.loading = true
-      this.$api.getVoteOptions({voteId:this.$route.query.id}).then(res=>{
-        this.loading = false
-        this.list = res.content
-      })
-    },
-    goSee(){
-      this.$router.push({name:'voteModel',query:{id:this.$route.query.id}})
-    },
-    goSubmit(){
-      if(this.radio == ''){
-        Notify({ type: 'warning', message: '请选择投票项' });
-        return;
-      }
+    confirmSign(img){
       Dialog.confirm({
         title: '提示',
         message: '确认提交?提交后无法再修改提交结果。',
@@ -64,15 +54,52 @@ export default {
             let params = {
               optionId:this.radio,
               houseId:this.houseId,
+              signature:img,
             }
             this.$api.agentVote(params).then(res=>{
+              let voteDataDetial = {
+                signature:img,
+                houseName:this.houseName,
+                radioValue:this.listMap[this.radio],
+                ...this.$route.query,
+              }
+              localStorage.setItem('voteDataDetial',JSON.stringify(voteDataDetial))
               Notify({ type: 'success', message: '提交成功' });
+              this.esignShow = false
+              this.$router.push({name:'voteResult'})
             })
           })
           .catch(() => {
             // on cancel
           });
     },
+    cancel(){
+      this.esignShow = false
+    },
+    onSelect(item){
+      this.houseId = item.value
+      this.houseName = item.name
+    },
+    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(){
+      this.$router.push({name:'voteModel',query:{id:this.$route.query.id}})
+    },
+    goSubmit(){
+      if(this.radio == ''){
+        Notify({ type: 'warning', message: '请选择投票项' });
+        return;
+      }
+      this.esignShow = true
+    },
   }
 }
 </script>

+ 23 - 1
src/views/fuzhu/suggestion.vue

@@ -11,13 +11,35 @@
       placeholder="请输入意见详情"
       show-word-limit
   />
-  <div class="btn">提交建议</div>
+  <div class="btn" @click="submit">提交建议</div>
 </div>
 </template>
 
 <script>
+import {Dialog, Notify} from "vant";
+
 export default {
   name: "suggestion",
+  methods:{
+    submit(){
+      Dialog.confirm({
+        title: '提醒',
+        message: '确认提交此建议?',
+      })
+          .then(() => {
+            let params = {
+              content:this.message
+            }
+            this.$api.addSuggestion(params).then(res=>{
+              Notify({ type: 'success', message: '提交成功' });
+            })
+          })
+          .catch(() => {
+            // on cancel
+          });
+
+    },
+  },
   data(){
     return {
       message:''

+ 62 - 26
src/views/fuzhu/voteDetial.vue

@@ -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;

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 16 - 0
src/views/fuzhu/voteResult.vue


+ 11 - 4
src/views/signAndResiger/binding.vue

@@ -13,7 +13,7 @@
 
   <div class="label">
     <span class="small-title">产证信息</span>
-    <van-uploader :max-count="1"  v-model="fileList" :after-read="afterRead" />
+    <van-uploader :max-count="1"  v-model="fileList" :after-read="afterRead"  @delete="deleteImg"/>
   </div>
   <div class="btn" @click="submit">提交信息</div>
 </div>
@@ -41,10 +41,14 @@ export default {
     };
   },
   methods: {
-    onSelect(v){
-      this.form.houseId = v
+    deleteImg(){
+      console.log(11)
+      this.form.certificatePhoto = ''
+    },
+    onSelect(item){
+      this.form.houseId = item.value
       let params = {
-        houseId:String(v),
+        houseId:item.value,
         name:this.name,
         idNumber:this.idNumber,
       }
@@ -54,6 +58,7 @@ export default {
           message: '该房产的预留号码与该账号配对成功,无需审核,已绑定',
         })
             .then(() => {
+              Notify({ type: 'success', message: '已绑定成功' });
               this.$router.go(-1)
             })
             .catch(() => {
@@ -87,6 +92,8 @@ export default {
       formData.append('file',file.file)
       this.$api.upload(formData).then(res=>{
         this.form.certificatePhoto = res.content
+      }).catch(err=>{
+        this.fileList = []
       })
     },
 

+ 2 - 1
src/views/signAndResiger/login.vue

@@ -25,6 +25,7 @@
 
 <script>
 import reg from "@/util/reg";
+import {Notify} from "vant";
 export default {
   name: "login",
   methods:{
@@ -39,7 +40,7 @@ export default {
           type:this.type
         }
         this.$api.login(params).then(res=>{
-          console.log(res)
+          Notify({ type: 'success', message: '登录成功' });
           this.$router.push({name:'home'})
         })
       })

+ 1 - 1
vue.config.js

@@ -5,7 +5,7 @@ module.exports = defineConfig({
   devServer: {
     proxy: {
       '/api': {     //这里最好有一个 /
-        target: 'http://121.5.58.50:8080',  // 后台接口域名
+        target: 'http://matrix34.tpddns.cn:60001/api',  // 后台接口域名
         ws: true,        //如果要代理 websockets,配置这个参数
         secure: false,  // 如果是https接口,需要配置这个参数
         changeOrigin: true,  //是否跨域

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott