zouling vor 2 Monaten
Ursprung
Commit
a4382bba41

+ 2 - 1
user_ui/api/login.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 
 // 登录方法
-export function login(username, password, code, uuid,tenantId,clientId,grantType,phonenumber,smsCode) {
+export function login(username, password, code, uuid,tenantId,clientId,grantType,clientKey,phonenumber,smsCode) {
   const data = {
     username,
     password,
@@ -10,6 +10,7 @@ export function login(username, password, code, uuid,tenantId,clientId,grantType
 	tenantId,
 	clientId,
 	grantType,
+	clientKey,
 	phonenumber,smsCode
   }
   return request({//

+ 3 - 3
user_ui/components/box/popup.vue

@@ -17,8 +17,8 @@
 			<image :src="closeimg" class="closeimg" @click="getClose"></image>
 		</view>
 		<!-- 信息弹窗 -->
-		<view class="bgbox" style="z-index: 100;" v-if="initFace=='Y'"></view>
-		<view class="fixedbox" style="z-index: 101;" v-if="initFace=='Y'">
+		<view class="bgbox" style="z-index: 100;" v-if="initFace=='1'||initFace=='3'"></view>
+		<view class="fixedbox" style="z-index: 101;" v-if="initFace=='1'||initFace=='3'">
 			<image :src="tiptit" class="imga"></image>
 			<view  class="boxs">
 				<view class="ztit">您的信息暂未完善,请前去完善</view>
@@ -49,7 +49,7 @@
 			initFace:{
 				type: [String,Number],
 				default () {
-					return 'N'
+					return ''
 				}
 			},
 			phoneList:{

+ 1 - 1
user_ui/config.js

@@ -4,7 +4,7 @@ module.exports = {
   // baseUrl: 'https://zhsqhf.qs163.cn/prod-api',
   // baseUrl: 'http://47.99.82.249:5011/prod-api',
   baseUrl: 'http://192.168.101.245:8077',
-  // baseUrl: 'http://192.168.101.168:8074',
+  // baseUrl: 'http://192.168.101.86:8077',
   // baseUrl: 'http://10.90.90.52:8065',
   // baseUrl: 'http://10.90.90.53:8065',
   // baseUrlimg: 'http://114.99.127.243:2001',

+ 1 - 1
user_ui/mine/pages/house/housedetail.vue

@@ -283,7 +283,7 @@
 			getSubmit(){
 				this.$refs.form.validate().then(res => {
 					var params=JSON.parse(JSON.stringify(this.datainfo))
-					// if(!params.portalId){
+					// if(!params.houseId{
 					// 	this.$toast("请选择来访门户")
 					// 	return
 					// }

+ 8 - 1
user_ui/mine/pages/house/index.vue

@@ -36,7 +36,7 @@
 						<view class="tit">{{ite.location}}</view>
 						<image :src="adrs" class="adrs"></image>
 						<view class="flex1"></view>
-						<view class="edit flexc flex0" @click.stop="getEdit(ite.houseId)">
+						<view class="edit flexc flex0" v-if="ite.residentType=='1'" @click.stop="getEdit(ite.houseId)">
 							<image :src="edit"></image>
 							编辑
 						</view>
@@ -211,8 +211,15 @@
 								this.wtdt = '到底了~';
 							}
 						}
+						
 						var newArr=JSON.parse(JSON.stringify(res.rows))
 						newArr.forEach(ite=>{
+							if(ite.residentInfoList&&ite.residentInfoList.length){
+								var arr=ite.residentInfoList;
+								var info=arr[0]
+								ite.residentType=info.residentType;
+								
+							}
 							ite.right=0;
 						})
 						if (this.pageNum == 1) {

+ 1 - 1
user_ui/mine/pages/house/people.vue

@@ -138,7 +138,7 @@
 				var params={
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
-					residentPhone:this.phonenumber,
+					// residentPhone:this.phonenumber,
 					userId:this.userId
 				}
 				if(this.houseId){

+ 4 - 4
user_ui/mine/pages/info/authenadd.vue

@@ -3,7 +3,7 @@
 		<uni-forms ref="form" :model="datainfo" :rules="rules">
 			<view class="cbox">
 				<view class="chmain">
-					<picker range-key='dictLabel' :disabled="ptype=='edit'?true:false" :value="rylxidx" :range="rylxList"   @change='bindDateChangee'>
+					<picker range-key='dictLabel' :disabled="ptype=='edit'&&datainfo.examine!='3'?true:false" :value="rylxidx" :range="rylxList"   @change='bindDateChangee'>
 						<uni-forms-item label="人员类型" required name="residentType">
 							<view class="flexc mh35">
 								<view class="flex1 txr f13 co27" v-if="datainfo.residentType&&!rylx">{{statusFormats(datainfo.residentType,rylxList,'rylx')}}</view>
@@ -32,7 +32,7 @@
 						      keyName="dictValue"
 							  :valuea="datainfo.tenantId"
 							  :chosevalue="tenantName?tenantName:statusFormats(datainfo.tenantId,voList,'tenant')"
-							  :isdisabled="ptype=='edit'?true:false"
+							  :isdisabled="(ptype=='edit'&&datainfo.examine!='3')?true:false"
 							  :filterable="filterable"
 						      @change='getchangea'
 						    >
@@ -790,7 +790,7 @@
 
 									setTimeout(function(){
 										uni.$emit("residentInfoList")
-										var initFace='N';
+										var initFace='';
 										that.$store.dispatch('checkInitFace', initFace).then(() => {
 											
 										})
@@ -809,7 +809,7 @@
 									this.$toast("修改成功")
 									setTimeout(function(){
 										uni.$emit("residentInfoList")
-										var initFace='N';
+										var initFace='';
 										that.$store.dispatch('checkInitFace', initFace).then(() => {
 											
 										})

+ 1 - 0
user_ui/mine/pages/tlogin.vue

@@ -139,6 +139,7 @@
 				code: "",
 				password:'',
 				clientId:config.Clientid,
+				clientKey:config.userType,
 			},
 			//sms
 			voList:[],

+ 4 - 4
user_ui/news/pages/complaint/add.vue

@@ -134,10 +134,10 @@
 				if(phofile&&phofile.length){
 					params.images=this.phofile.join(',');
 				}
-				if(!params.title){
-					this.$toast("请输入标题")
-					return
-				}
+				// if(!params.title){
+				// 	this.$toast("请输入标题")
+				// 	return
+				// }
 				suggestionAdd(params).then(res=>{
 					if(res.code==200){
 						this.$toast("新增成功")

+ 4 - 2
user_ui/news/pages/news/detail.vue

@@ -14,7 +14,7 @@
 			</view>
 			<view class="ndbox mb12 plr15">
 				<view class="flext mb15">
-					<view class="pltit flex0">评论<text>({{commenttotal}})</text></view>
+					<view class="pltit flex0">评论<text>({{datainfo.userComment}})</text></view>
 					<view class="flex1"></view>
 					<view class="pltitnum"><text>{{datainfo.userLikes}}</text>赞<text class="line">|</text><text>{{datainfo.userShare}}</text> 分享</view>
 
@@ -90,7 +90,7 @@
 				datainfo:{
 					
 				},
-				communityContent:'<span>hello uni-app x!</span><br/><span>uni-app x,终极跨平台方案</span>',
+				communityContent:'',
 				text:'',
 				id:"",
 				commentlist:[],//评论列表
@@ -195,6 +195,7 @@
 					parentId:list.id,
 					pageSize:list.pageSize,
 					pageNum: list.pageNum,
+					tenantId:this.tenantId
 				}
 				getParentComment(params).then(res=>{
 					if(res.code==200){
@@ -369,6 +370,7 @@
 					communityId:this.id,
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
+					tenantId:this.tenantId
 				}
 				// userid,头像,nickname,标题(或者评论对象的内容)  点赞收藏评论,   
 				getRootComment(params).then(res=>{

+ 2 - 0
user_ui/news/pages/news/djdetail.vue

@@ -57,6 +57,7 @@
 				userId:this.$store.state.user.userId,
 				nickName:this.$store.state.user.nickName,
 				avatar:this.$store.state.user.avatar,
+				tenantId:this.$store.state.user.tenantId
 			}
 		},
 		onLoad: function(e) {
@@ -91,6 +92,7 @@
 					targetType:'2',//目标类型(1:社区 2:党建 )
 					targetId:this.id,
 					targetTitle:this.datainfo.partyTitle,
+					tenantId:this.tenantId
 				}
 				getStarsDj(params).then(res=>{
 					if(res.code==200){

+ 2 - 0
user_ui/news/pages/news/newsdj.vue

@@ -37,6 +37,7 @@
 				nickName:this.$store.state.user.nickName,
 				avatar:this.$store.state.user.avatar,
 				baseUrl:config.baseUrl,
+				tenantId:this.$store.state.user.tenantId
 			}
 		},
 		onUnload() {
@@ -101,6 +102,7 @@
 					targetId:info.partyId,
 					status:'1',
 					targetType:'2',//目标类型(1:社区 2:党建 )
+					tenantId:this.tenantId
 				}
 				getStarsDj(params).then(res=>{
 					if(res.code==200){

+ 1 - 1
user_ui/pages.json

@@ -3,7 +3,7 @@
 	  // {
 	  //   "path": "pages/down",
 	  //   "style": {
-	  //     "navigationBarTitleText": "智慧社区管理平台",
+	  //     "navigationBarTitleText": "千栗智慧社区",
 	  // 	"h5":{"titleNView":false}
 	  //   }
 	  // },

+ 3 - 3
user_ui/pages/down.vue

@@ -15,9 +15,9 @@
 						<view class="tit">产品介绍</view>
 						<view class="tita">PRODUCT INTRODUCTION</view>
 						<view class="line"><image :src="line"></image></view>
-						<view class="txt">智慧社区管理平台是一款集房产管理、车辆管理、社区服务于一体的综合型智慧社区管理软件。</view>
+						<view class="txt">千栗智慧社区管理平台是一款集房产管理、车辆管理、社区服务于一体的综合型千栗智慧社区管理软件。</view>
 						<view class="txt">通过该软件,业主可以轻松管理自己的房产和车辆信息,实时查看社区内车位和充电桩位情况,同时关注家人的健康状况,并享受便捷的社区商城服务。</view>
-						<view class="txt">对于物业公司而言,智慧社区管理平台则提供了全面的社区人员管理、房产管理、进出记录监控、门禁控制、车位及充电桩管理以及物业费收缴等功能,极大的提升了物业管理效率和服务质量。
+						<view class="txt">对于物业公司而言,千栗智慧社区管理平台则提供了全面的社区人员管理、房产管理、进出记录监控、门禁控制、车位及充电桩管理以及物业费收缴等功能,极大的提升了物业管理效率和服务质量。
 						</view>
 					</view>
 				</view>
@@ -87,7 +87,7 @@
 .box{position: relative;height: 100vh;overflow: auto;background: url(../static/images/down/bg.png) no-repeat;background-size: 100% 100%;
 	.bgimg{width: 100%;min-height: 100vh;position: absolute;left: 0;right: 0;bottom: 0;top: 0;z-index: 0;}
 	.main{padding: 40rpx 0 76rpx;position: relative;
-		.topimg{width: 312rpx;height: 34rpx;margin-left: 40rpx;margin-bottom: 44rpx;}
+		.topimg{width: 240rpx;height: 32rpx;margin-left: 40rpx;margin-bottom: 44rpx;}
 		.topa{margin:0 auto;padding-left: 28rpx;width: 734rpx;box-sizing: border-box;
 			image{width: 706rpx;height: 388rpx;}
 		}

+ 3 - 3
user_ui/pages/index/index.vue

@@ -237,7 +237,7 @@ import store from "@/store"
 			listb:require("@/static/images/home/listb.png"),
 			listc:require("@/static/images/home/listc.png"),
 			more:require("@/static/images/home/more.png"),
-			initFace:'N',//initFace Y需要,N不需要人脸认证
+			initFace:'',//initFace 1:双端都未认证 2:只认证了业主端 3:只认证了物业端 4:双端都认证过
 			type:'',//wygj
 			wtdt:"加载更多",
 			yhbg:require("@/static/images/home/yhbg.png"),
@@ -369,7 +369,7 @@ import store from "@/store"
 			// this.$tab.navigateTo(`/people/pages/people/staffadd?type=${type}`) 
 		},
 		getClose(){
-			this.initFace='N';
+			this.initFace='';
 		},
 		getDataFn(){
 			var params={
@@ -431,7 +431,7 @@ import store from "@/store"
 		},
 		getClose(){
 			this.type='';
-			this.initFace='N';
+			this.initFace='';
 		},
 		getXxwsFn(){
 			var type='rz'

BIN
user_ui/static/images/down/top.png


+ 3 - 1
user_ui/store/modules/user.js

@@ -128,10 +128,11 @@ const user = {
 	  const tenantId = ''
 	  const clientId = Clientid
 	  const grantType = userInfo.grantType
+	  const clientKey = userInfo.clientKey
 	  const phonenumber=userInfo.username.trim()
 	  const smsCode=userInfo.code
       return new Promise((resolve, reject) => {
-        login(username, password, code, uuid,tenantId,clientId,grantType,phonenumber,smsCode).then(res => {
+        login(username, password, code, uuid,tenantId,clientId,grantType,clientKey,phonenumber,smsCode).then(res => {
           setToken(res.data.access_token)
           commit('SET_TOKEN', res.data.access_token)
 		  // setToken(res.token)
@@ -180,6 +181,7 @@ const user = {
 		  const userId = (user == null || user.userId == "" || user.userId == null) ? "" : user.userId
 		   const tenantId = (user == null || user.tenantId == "" || user.tenantId == null) ? "" : user.tenantId
 		  const phonenumber = (user == null || user.phonenumber == "" || user.phonenumber == null) ? "" : user.phonenumber
+		  // 1:双端都未认证 2:只认证了业主端 3:只认证了物业端 4:双端都认证过
 		   const initFace = (res == null || res.authenticationUser == "" || res.authenticationUser == null) ? "" : res.authenticationUser
 		  const deptId = (user == null || user.deptId == "" || user.deptId == null) ? "" : user.deptId
 		  const deptName = (user == null || user.dept == "" || user.dept == null||user.dept.deptName==''||user.dept.deptName==null) ? "" : user.dept.deptName

+ 3 - 3
user_ui/work/pages/service/warrantyadd.vue

@@ -22,7 +22,7 @@
 							<view class="rimg"></view>
 						</view>
 					</uni-forms-item> -->
-					<uni-forms-item label="报修门户" name="portalId">
+					<uni-forms-item label="报修门户" name="houseId">
 						<w-select
 						      style="margin-left: 20rpx;" 
 						     v-model="chooseValue"
@@ -101,7 +101,7 @@
 				del:require('@/work/static/service/rdel.png'),
 				datainfo:{
 					// "repairId":"",//报修ID
-					 "portalId":"",//门户id
+					 "houseId":"",//门户id
 					 "houseAddress":"",//详细门牌号
 					 "repairTime":"",//报修时间
 					 "phoneNumber":this.$store.state.user.phonenumber,//报修用户手机号码
@@ -166,7 +166,7 @@
 				return aite.actions;
 			},
 			getchange(e){
-				this.datainfo.portalId=e.value;
+				this.datainfo.houseId.value;
 				this.datainfo.houseAddress=e.label;
 				// this.datainfo.detailAddress=e.location;
 			},

+ 291 - 95
user_ui/work/pages/visitor/vadd.vue

@@ -47,8 +47,9 @@
 						</view>
 					</uni-forms-item>
 					<uni-forms-item label="来访时间" name="visitorTime">
+						<!-- :hide-second='true' -->
 						<view class="flexc">
-							<uni-datetime-picker  :disabled="isdisabled" :class="datainfo.visitorTime?'co27':'coa'" type="date" placeholder="请选择来访时间" :border="false" :hide-second='true' v-model="datainfo.visitorTime" @change="changeLog" />
+							<uni-datetime-picker type="datetime" :disabled="isdisabled" :class="datainfo.visitorTime?'co27':'coa'"  placeholder="请选择来访时间" :border="false"  v-model="datainfo.visitorTime" @change="changeLog" />
 							<view class="rimg"><image :src="rimg"></image></view>
 						</view>
 						<!-- <picker range-key='dictLabel' :value="vxlbidx" :range="vxlbList"   @change='bindDateChangea'>
@@ -62,7 +63,7 @@
 					<uni-forms-item label="来访事由" name="reason">
 						<view class="flexc ">
 							<view class="flex1"></view>
-							<view class="sylist flexcc" :class="syidx==ite.value?'act':''" v-for="(ite,idx) in sylist" :key="idx" @click="getSyFn(ite.value)">{{ite.label}}</view>
+							<view class="sylist flexcc" :class="syidx==ite.dictValue?'act':''" v-for="(ite,idx) in sylist" :key="idx" @click="getSyFn(ite.dictValue)">{{ite.dictLabel}}</view>
 							<!-- <uni-easyinput  :disabled="isdisabled" v-model="datainfo.reason" :inputBorder='false' placeholder="请输入来访事由" /> -->
 							<view class="rimg"><image :src="rimg"></image></view>
 							<!-- <picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
@@ -70,7 +71,7 @@
 							</picker> -->
 						</view>
 					</uni-forms-item>
-					<uni-forms-item label="来访门户" name="portalId">
+					<uni-forms-item label="来访门户" name="houseId">
 						<w-select
 						      style="margin-left: 20rpx;" 
 						     v-model="chooseValue"
@@ -101,11 +102,26 @@
 					<uni-forms-item label="车牌号码" name="plateNumber" v-if="datainfo.isCar=='Y'">
 						<view class="flexc">
 							<!-- disabled -->
-							<uni-easyinput :disabled="isdisabled" v-model="datainfo.plateNumber" :inputBorder='false' placeholder="请输入车牌号" />
-							<!-- <view class="aphoto" @click="getaddImage">
-								<image :src="aphoto"></image>
-							</view> -->
-							
+							<!-- <uni-easyinput :disabled="isdisabled" v-model="datainfo.plateNumber" :inputBorder='false' placeholder="请输入车牌号" /> -->
+							<view class="flex1"></view>
+							<view class="carinput-input">
+								<view class="carinput-input-i" :class="{'input-active':carIndex == i}" @tap.stop="inputKey" :data-index="i" v-for="(v,i) in carInput" :key="i" v-if="i < 2">
+									{{carInput[i].val}}
+								</view>
+								<!-- 塞个点 -->
+								<view class="cir"></view>
+								<view class="carinput-input-i" :class="{'input-active':carIndex == i}" @tap.stop="inputKey" :data-index="i" v-for="(v,i) in carInput" :key="i" v-if="i < 7&&i>1">
+									{{carInput[i].val}}
+								</view>
+								<view class="carinput-input-i " :class="{'input-active':carIndex == 7}" @tap.stop="inputKey" data-index="7">
+									<block v-if="carInput[7].val">{{carInput[7].val}}</block>
+									<view v-else class="newtit flexccc">
+										<image :src="addnew"></image>
+										新能源
+									</view>
+									<!-- {{carInput[7].val?carInput[7].val:'+新能源'}} -->
+								</view>
+							</view>
 						</view>
 					</uni-forms-item>
 					<uni-forms-item label="手机号码" name="mobileNumber">
@@ -125,7 +141,7 @@
 			<view class="rhbtn" @click="getEditFn" v-if="isdisabled">修改</view>
 			<view class="rhbtn" @click="getSubmit" v-else>确定</view>
 		</view>
-
+		<tki-float-keyboard ref="keybd" :mode="'car'" :type="keyType" :title="'车牌键盘'" @del="keyCbDel" @val="keyCbVal" @hide="keyCbHide"></tki-float-keyboard>
 		<loading></loading>
 	</view>
 </template>
@@ -133,12 +149,24 @@
 <script>
 	import config from '@/config'
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
-	import {uploadIdentify,uploadmore} from '@/utils/common.js'
+	import {uploadIdentify,uploadmore,geocodeAddress} from '@/utils/common.js'
 	import {reservAdd,reservDet,reservPut} from "@/api/work/people.js"
+	import {getDictionaryFn} from "@/api/system/user.js"
 	import {houseInfolistNoPage} from "@/api/work/work.js"
 	import wSelect from "@/work/components/w-select/w-select.vue"
+	import tkiFloatKeyboard from "@/mine/components/tki-float-keyboard/tki-float-keyboard.vue";
+	var key='';
+	// #ifdef H5
+	key='8de52b560193f01932ad997dba3e76c0'
+	// #endif
+	// #ifdef APP-PLUS
+	key='8de52b560193f01932ad997dba3e76c0'
+	// #endif
+	// #ifdef MP-WEIXIN
+	key='8de52b560193f01932ad997dba3e76c0'
+	// #endif
 	export default {
-		components: {wSelect},
+		components: {wSelect,tkiFloatKeyboard},
 		data() {
 			return {
 				rimg: require('@/static/images/rimg.png'),
@@ -151,7 +179,7 @@
 				checkflag:true,
 				datainfo: {
 					// "visitorManageId":"",//来访主键
-					 "portalId":"",//门户id
+					 "houseId":"",//门户id
 					 "houseAddress":"",//详细门牌号
 					 "name":"",//访客姓名
 					 "num":"",//来访人数
@@ -173,7 +201,7 @@
 					value: 1
 				}],
 				rules:{name: {rules: [{required: true,errorMessage: '请输入访客姓名' }]},
-				  portalId: {rules: [{required: true,errorMessage: '请选择来访门户' }]},
+				  houseId: {rules: [{required: true,errorMessage: '请选择来访门户' }]},
 				  mobileNumber: {rules: [{required: true,errorMessage: '请输入手机号'}, {pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,errorMessage:'请输入正确的手机号码'}]},},
 				phofile:[],
 				filterable:true,
@@ -186,8 +214,23 @@
 				userId:this.$store.state.user.userId,
 				syidx:'',
 				rsidx:'',
-				sylist:[{label:'其他',value:'1'},{label:'拜访',value:'2'},{label:'办事',value:'3'}],
-				rslist:[{label:'1',value:'1'},{label:'2',value:'2'},{label:'3',value:'3'},{label:'4',value:'4'},{label:'5',value:'5'},{label:'6',value:'6'},{label:'7',value:'7'},{label:'8',value:'8'},{label:'9',value:'9'},{label:'10及以上',value:'10'}]
+				sylist:[],
+				rslist:[{label:'1',value:'1'},{label:'2',value:'2'},{label:'3',value:'3'},{label:'4',value:'4'},{label:'5',value:'5'},{label:'6',value:'6'},{label:'7',value:'7'},{label:'8',value:'8'},{label:'9',value:'9'},{label:'10及以上',value:'10'}],
+				
+				carIndex: -1,
+				carInput: [
+					{ type: 2, val: "皖" },
+					{ type: 4, val: "A" },
+					{ type: 1, val: "" },
+					{ type: 1, val: "" },
+					{ type: 1, val: "" },
+					{ type: 1, val: "" },
+					{ type: 3, val: "" },
+					{ type: 1, val: "" }
+				],
+				keyType: 0,
+				isPower: false, // 新能源
+				addnew:require('@/mine/static/house/add.png'),
 			}
 		},
 		onLoad: function(e) {
@@ -210,6 +253,21 @@
 			},
 			changeLog(){
 				
+			},
+			async getLocation(address) {
+				var that=this;
+			      if (!address) {
+			        uni.showToast({ title: '请输入地址', icon: 'none' });
+			        return;
+			      }
+			
+			      try { 
+			        const { latitude, longitude } = await geocodeAddress(address, key);
+					this.datainfo.lat=latitude;
+					this.datainfo.lgt=longitude;
+			      } catch (error) {
+			        // uni.showToast({ title: '获取经纬度失败', icon: 'none' });
+			      }
 			},
 			time() {
 				var date = new Date();
@@ -220,13 +278,15 @@
 				var min = date.getMinutes();
 				var s = date.getSeconds();
 				var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
-				// var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
-				// 	'0' + s) : s);
-				// var kaTime = yearStr + ' ' + timeStr;
-				this.datainfo.visitorTime=yearStr
+				var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
+					'0' + s) : s);
+				var kaTime = yearStr + ' ' + timeStr;
+				console.log(kaTime)
+				this.datainfo.visitorTime=kaTime
 			},
 			getSyFn(e){
-				this.syidx=e
+				this.syidx=e;
+				this.datainfo.reason=e;
 			},
 			getRsFn(e){
 				this.rsidx=e.value;
@@ -250,6 +310,17 @@
 						})
 					}
 				})
+				// 获取事由
+				getDictionaryFn('visit_reason').then(res=>{
+					if(res.code==200){
+						this.sylist = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
 			},
 			bindDateChange(e){
 				var val=e.detail.value;
@@ -270,31 +341,33 @@
 				reservDet(this.id).then(res=>{
 					if(res.code==200){
 						this.datainfo=res.data;
-						this.chooseValue=res.data.portalId
+						this.chooseValue=res.data.houseId
 					}
 				})
 			},
 			getSubmit(){
+				var num=this.toBind()
 				this.$refs.form.validate().then(res => {
 					var params=JSON.parse(JSON.stringify(this.datainfo))
-					if(!params.portalId){
+					if(!params.houseId){
 						this.$toast("请选择来访门户")
 						return
 					}
-					if(params.isCar=='Y'&&!params.plateNumber){
-						this.$toast("请输入车牌号")
-						return
-					}
 					if(!params.visitorTime){
 						this.$toast("请选择来访时间")
 						return
 					}
-					// var lng = '117.211954';
-					// var lat = '31.839676';
-					// params.lgt=lng;
-					// params.lat=lat;
+					if(params.isCar=='Y'&&!params.plateNumber){
+						this.$toast("请输入车牌号")
+						return
+					}
 					if(params.isCar!='Y'){
 						params.plateNumber=''
+					}else{
+						if(num=='-1'){
+							this.$toast('请输入完整的车牌号')
+							return
+						}
 					}
 					if(this.ptype=='add'){
 						reservAdd(params).then(res=>{
@@ -324,9 +397,10 @@
 				})
 			},
 			getchange(e){
-				this.datainfo.portalId=e.value;
+				this.datainfo.houseId=e.value;
 				this.datainfo.houseAddress=e.label;
 				this.datainfo.detailAddress=e.location;
+				this.getLocation(e.location)
 			},
 			getaddImage(e) {
 				let that = this;
@@ -351,70 +425,179 @@
 					}
 				});
 			},
-			// getaddImage(e) {
-			// 	let that = this;
-			// 	// var rs=['D:\\idcard.png']
-			// 	// if(rs&&rs.length>0){
-			// 	// 	var obj={
-			// 	// 		type:e,
-			// 	// 		// url:baseUrl+rs.join(',')
-			// 	// 		url:rs.join(',')
-			// 	// 	}
-			// 	// 	that.getOcrIdCard(obj)
-			// 	// }
-			// 	// return
-			// 	let file = [],
-			// 		count = 9
-			// 	uni.chooseImage({
-			// 		count: 1,
-			// 		success: function(res) {
-			// 			let img = res.tempFilePaths;
-			// 			if (img.length + file.length > count) {
-			// 				uni.showToast({
-			// 					title: '最多上传' + count + '张图片',
-			// 					icon: 'none',
-			// 					duration: 2000
-			// 				})
-			// 			} else {
-			// 				let imglen = res.tempFilePaths.length;
-			// 				var fuwufile = [];
-			// 				uploadIdentify('/common/upload', img, 0, 0, 0, imglen, fuwufile, function(rs) {
-			// 					var resurl = rs[0];
-			// 					if (e == 'front') {
-			// 						that.datainfo.front = resurl.fileName;
-			// 					} else {
-			// 						that.datainfo.back = resurl.fileName;
-			// 					}
-			// 					if (rs && rs.length > 0) {
-			// 						var obj = {
-			// 							type: e,
-			// 							url: resurl.urlOnline
-			// 						}
-			// 						that.getOcrIdCard(obj)
-			// 					}
-			// 				})
-			// 			}
-			// 		}
-			// 	});
-			// },
-			// getOcrIdCard(obj) {
-			// 	var params = {
-			// 		image: obj.url,
-			// 		idCardSide: obj.type
-			// 	}
-			// 	getOcrIdCard(params).then(res => {
-			// 		if (res.code == 200) {
-			// 			var datainfo = res.data;
-			// 			if (obj.type == 'front') {
-			// 				this.datainfo.realName = datainfo.realName;
-			// 				this.datainfo.idCard = datainfo.idCard;
-			// 				this.datainfo.address = datainfo.address;
-			// 			} else {
-			// 				this.datainfo.expirationDate = datainfo.expirationDate
-			// 			}
-			// 		}
-			// 	})
-			// }
+			// 车牌
+			// 判定是否为空
+			empty(v) {
+				let tp = typeof v,
+					rt = false;
+				if (tp == "number" && String(v) == "") {
+					rt = true
+				} else if (tp == "undefined") {
+					rt = true
+				} else if (tp == "object") {
+					if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+				} else if (tp == "string") {
+					if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+				} else if (tp == "function") {
+					rt = false
+				}
+				return rt
+			},
+			inputKey(e) {
+				let that = this;
+				let data = e.currentTarget.dataset;
+				that.carIndex = data.index;
+				if (data.index >= 7) {
+					that.isPower=true;
+					that.carIndex = 7;
+					// if (!that.isPower) {
+					// 	return false;
+					// } else {
+					// 	that.carIndex = 7;
+					// }
+				} else {
+					that.carIndex = data.index;
+				}
+				that.upKeyType();
+				that.keyShow();
+			},
+			keyCbVal(e) {
+				let that = this;
+				let index = Number(that.carIndex);
+				if (index >= 0 && index < 6) {
+					that.carInput[index].val = e;
+					that.carIndex = index + 1;
+				} else if (index == 6) {
+					that.carInput[index].val = e;
+					if (that.isPower) {
+						// 新能源
+						that.carIndex = 7;
+					} else {
+						// 不是新能源出输入结束
+						that.keyHide();
+						that.carIndex = -2;
+						console.log('非新能源车输入完毕')
+					}
+				} else if (index == 7) {
+					// 新能源车输入完毕
+					that.carInput[index].val = e;
+					that.keyHide();
+					that.carIndex = -3;
+					console.log('新能源车输入完毕')
+				}
+				that.upKeyType();
+			},
+			keyCbDel(e) {
+				let index = this.carIndex;
+				console.log(index,1)
+				if (index > 0) {
+					if (!this.empty(this.carInput[index].val)) {
+						this.carInput[index].val = "";
+						this.carIndex = index;
+					} else {
+						this.carInput[index - 1].val = "";
+						this.carIndex = index - 1;
+					}
+					if(index==7){
+						var obj={ type: 1, val: "" }
+						this.carInput.splice(index,1,obj)
+						this.isPower=false;
+					}
+					console.log(this.carInput)
+				}
+				this.upKeyType();
+			},
+			upKeyType() {
+				if (!this.empty(this.carInput[this.carIndex])) {
+					this.keyType = this.carInput[this.carIndex].type;
+				}
+			},
+			keyShow() {
+				this.$refs.keybd._keyShow();
+			},
+			keyHide() {
+				this.$refs.keybd._keyHide();
+			},
+			keyCbHide() {
+				if (this.carIndex != -3 || this.carIndex != -2) {
+					this.carIndex = -1;
+				}
+			},
+			powerChange(e) {
+				let that = this
+				let i = that.checkCar().i
+				if (e.detail.value.length > 0) {
+					that.isPower = true;
+					if (i == -1) {
+						that.carIndex = 7;
+					} else {
+						that.carIndex = i;
+					}
+					that.keyShow();
+				} else {
+					that.isPower = false;
+					that.carInput[7].val = "";
+					if (that.carIndex == 7) {
+						that.keyHide();
+						that.carIndex = -2;
+					}
+				}
+				that.upKeyType();
+			},
+			checkCar() {
+				// 检查车牌是否输入完成
+				let that = this;
+				let i = 7;
+				let rt = { i: -1, isempty: false, val: "" };
+				if (that.isPower) {
+					i = 8;
+				}
+				for (let index = 0; index < i; index++) {
+					const obj = that.carInput[index];
+					if (this.empty(String(obj.val))) {
+						rt.i = index;
+						rt.isempty = true;
+						rt.val = "";
+						break;
+					}
+					rt.val += that.carInput[index].val;
+				}
+				return rt;
+			},
+			toBind() {
+				let that = this
+				let ck = that.checkCar();
+				if (ck.i == -1 && !ck.isempty) {
+					that.datainfo.plateNumber=ck.val;
+					// if(this.isPower){
+					// 	this.datainfo.vehicleEnergy='新能源'
+					// }else{
+					// 	this.datainfo.vehicleEnergy='燃油车'
+					// }
+					return ck.val
+				} else {
+					// 显示键盘输入
+					// that.keyShow();
+					// that.carIndex = ck.i;
+					// that.keyType = that.carInput[ck.i].type;
+					return '-1'
+				}
+			},
+			//分解车牌
+			toCarCode(code){
+				var list=JSON.parse(JSON.stringify(this.carInput))
+				var newArr=[]
+				if(code){
+					newArr=code.split('')
+				}
+				list.forEach((ite,idx)=>{
+					ite.val=newArr[idx]
+				})
+				if(newArr.length==8){
+					this.isPower=true;
+				}
+				this.carInput=JSON.parse(JSON.stringify(list))
+			}
 		}
 	}
 </script>
@@ -422,6 +605,19 @@
 	page{background: #F3F3F0;}
 </style>
 <style lang="scss" scoped>
+.carinput-input{display: flex;justify-content: center;align-items: center;
+	.input-active {color: #0256FD;border: 2rpx solid #0256FD;}
+	.cir{width: 14rpx;height: 14rpx;background: #8D8D8D;border-radius: 50%;margin-right: 4rpx;}
+}
+	
+.carinput-input-i{width: 52rpx;height: 80rpx;background: #F5F4F7;border-radius: 10rpx;font-weight: bold;font-size: 26rpx;color: #272727;margin-right: 4rpx;text-align: center;box-sizing: border-box;display: flex;flex-direction: column;align-items: center;justify-content: center;
+	.newtit{
+		font-weight: bold;font-size: 16rpx;color: #0256FD;
+		image{width: 20rpx;height: 20rpx;margin-bottom: 4rpx;}
+	}
+}
+.check /deep/ .uni-date-editor--x__disabled{opacity: 1;}
+.carinput-input-i:nth-last-child(1) {margin-right: 0}
 .coa /deep/ .uni-date__x-input{text-align: right;color: #AAAAAA;}
 .check /deep/ .select-wrap{border: none;width: 100%;}
 .check /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}

+ 49 - 14
user_ui/work/pages/visitor/vdetail.vue

@@ -17,7 +17,7 @@
 					<view class="list"><text>来访时间:</text>{{datainfo.visitorTime}}</view>
 					<view class="flexc">
 						<view class="list mw50"><text>来访人数:</text>{{datainfo.num}}人</view>
-						<view class="list mw50"><text>来访事由:</text>{{datainfo.reason}}</view>
+						<view class="list mw50"><text>来访事由:</text>{{kaType(datainfo.reason,sylist)}}</view>
 					</view>
 					<view class="flexc">
 						<view class="list mw50"><text>车牌号码:</text>{{datainfo.plateNumber||''}}</view>
@@ -83,19 +83,21 @@
 <script>
 	import config from '@/config'
 	const baseUrl = config.baseUrl
-	import {geocodeAddress} from '@/utils/common.js'
+	// import {geocodeAddress} from '@/utils/common.js'
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 	import {reservDet} from "@/api/work/people.js"
-	var key='';
-	// #ifdef H5
-	key='8de52b560193f01932ad997dba3e76c0'
-	// #endif
-	// #ifdef APP-PLUS
-	key='8de52b560193f01932ad997dba3e76c0'
-	// #endif
-	// #ifdef MP-WEIXIN
-	key='8de52b560193f01932ad997dba3e76c0'
-	// #endif
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {selectDictValue} from "@/utils/common.js"
+	// var key='';
+	// // #ifdef H5
+	// key='8de52b560193f01932ad997dba3e76c0'
+	// // #endif
+	// // #ifdef APP-PLUS
+	// key='8de52b560193f01932ad997dba3e76c0'
+	// // #endif
+	// // #ifdef MP-WEIXIN
+	// key='8de52b560193f01932ad997dba3e76c0'
+	// // #endif
 	export default{
 		components:{},
 		data(){
@@ -114,6 +116,7 @@
 					lat:'',
 				},
 				covers:[],
+				sylist:[],
 				// covers: [{
 				// 	id:0,
 				// 	latitude: '31.839676',
@@ -133,6 +136,7 @@
 					this.nvaHeight = Number(e.statusBarHeight)+44;
 				}
 			})
+			this.init()
 			if(e.id){
 				this.id=e.id;
 				this.getDetail()
@@ -170,6 +174,22 @@
 		},
 		methods:{
 			checkPermi, checkRole,
+			kaType(data, list) {
+				return selectDictValue(list, data);
+			},
+			init(){
+				// 获取事由
+				getDictionaryFn('visit_reason').then(res=>{
+					if(res.code==200){
+						this.sylist = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
 			getcreateMap(){
 				//mapId 就是你在 map 标签中定义的 id
 				this.mapContext = uni.createMapContext('container', this);
@@ -236,12 +256,27 @@
 			      }
 			},
 			getDetail(){
+				var that=this;
 				reservDet(this.id).then(res=>{
 					if(res.code==200){
 						this.datainfo=res.data;
-						this.chooseValue=res.data.portalId;
+						this.chooseValue=res.data.houseId;
 						if(res.data.detailAddress){
-							this.getLocation(res.data.detailAddress)
+							// this.getLocation(res.data.detailAddress)
+							var latitude=res.data.lat
+							var longitude=res.data.lgt
+							this.center.lat = latitude;
+							this.center.lng = longitude;
+							that.covers = [];
+							that.covers = [{
+								id:3,
+								width:18,   //宽
+								height:19,   //高
+								latitude: latitude,
+								longitude: longitude,
+								iconPath: that.mapimg,
+								anchor:{x: 0.5, y: 0.5}
+							}]
 						}
 					}
 				})

+ 1 - 1
user_ui/work/pages/visitor/vlist.vue

@@ -128,7 +128,7 @@
 				var params={
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
-					portalId:this.tabval
+					houseId:this.tabval
 				}
 				reservList(params).then(res=>{
 					if(res.code==200){

+ 1 - 1
user_ui/work/pages/visitor/vshare.vue

@@ -178,7 +178,7 @@
 				reservDet(this.id).then(res=>{
 					if(res.code==200){
 						this.datainfo=res.data;
-						this.chooseValue=res.data.portalId;
+						this.chooseValue=res.data.houseId;
 						console.log(res.data.detailAddress&&this.checkflag)
 						if(res.data.detailAddress&&this.checkflag){
 							console.log(11)