Explorar o código

多租户认证

zouling hai 2 meses
pai
achega
f71d24b159

+ 1 - 0
property_ui/1.txt

@@ -6,6 +6,7 @@
 
 MD5: 88:6B:3A:CF:1E:7C:E5:E1:68:1B:11:9F:12:4A:4C:97
 SHA1: 2D:05:E4:2C:E2:00:0A:BF:03:58:2A:94:94:38:65:BE:5B:1C:F1:1B
+SHA256: 85:03:9B:CE:FF:A4:57:D6:E3:EE:8E:D8:33:E4:4D:73:33:98:EE:24:B1:59:D0:A6:FE:AD:F4:8F:E7:6D:41:57
 
 高德key:c99089913eec7e8472a6f7cb228c22eb
 

+ 8 - 2
property_ui/api/login.js

@@ -92,8 +92,14 @@ export function logout() {
     'method': 'post'
   })
 }
-
-// 获取验证码
+// 切换租户
+export function gettenantCheck(data) {
+  return request({
+    'url': '/system/tenant/dynamic/'+data,
+    'method': 'get',
+  })
+}
+// 获取验证码 
 export function getCodeImg() {
   return request({
     'url': '/auth/code',

+ 47 - 0
property_ui/api/work/people.js

@@ -117,6 +117,53 @@ export function staffDel(data) {
     method: 'get',
   })
 }
+// 员工管理-管理员新增wuYe:staffManage:authentication
+export function staffAddgly(data) {
+  return request({
+    url: '/wuYe/staffManage/authentication',
+    method: 'post',
+	'data':data
+  })
+}
+// 员工管理-管理员修改wuYe:staffManage:editAuthentication
+export function staffPutgly(data) {
+  return request({
+    url: '/wuYe/staffManage/put/authentication',
+    method: 'post',
+	'data':data
+  })
+}
+// 员工管理-认证新增/审核,wuYe:staffManage:examine
+export function examineStaff(data) {
+  return request({
+    url: '/wuYe/staffManage/examineStaff',
+    method: 'post',
+    data: data
+  })
+}
+// 员工管理-详情根据用户id 
+export function staffrzDet(data) {
+  return request({
+    url: '/wuYe/staffManage/getInfoByUserId/'+data,
+    method: 'get',
+  })
+}
+// 员工管理-删除员工信息和权限wuYe:staffManage:deleteStaffManage
+export function staffglyDel(data) {
+  return request({
+    url: '/wuYe/staffManage/deleteStaffManage',
+    method: 'post',
+	'data': data
+  })
+}
+// 员工管理-认证列表wuYe:staffManage:listAuthentication
+export function listAuthentication(data) {
+  return request({
+    url: '/wuYe/staffManage/listAuthentication',
+    method: 'get',
+	'data': data
+  })
+}
 // 员工管理-列表不分页wuYe:staffManage:listNoPage
 export function stafflistNoPage(data) {
   return request({

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

@@ -1,8 +1,8 @@
 <template>
 	<view>
 		<!-- 信息弹窗 -->
-		<view class="bgbox" style="z-index: 100;" v-if="initFace=='N'"></view>
-		<view class="fixedbox" style="z-index: 101;" v-if="initFace=='N'">
+		<view class="bgbox" style="z-index: 100;" v-if="initFace=='Y'"></view>
+		<view class="fixedbox" style="z-index: 101;" v-if="initFace=='Y'">
 			<image :src="tiptit" class="imga"></image>
 			<view  class="boxs">
 				<view class="ztit">您的信息暂未完善,请前去完善</view>
@@ -96,7 +96,7 @@
 		.btns{width: 192rpx;height: 70rpx;border-radius: 36rpx;font-weight: bold;
 font-size: 26rpx;display: flex;align-items: center;justify-content: center;box-sizing: border-box;
 			// &.btn1{color: #00A9F0;border: 2rpx solid #00A9F0;margin-right: 24rpx;}
-			&.btn2{background: #DAF3FF;color: #5f94fb;border: 2rpx solid #5f94fb;}
+			&.btn2{background: #DAF3FF;color: #5f94fb;border: 2rpx solid #7aa3f3;}
 		}
 		
 	}

+ 2 - 1
property_ui/config.js

@@ -3,13 +3,14 @@ module.exports = {
   // baseUrl: 'https://zhsq.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.86:8077',
+  // baseUrl: 'http://192.168.101.86:8074',
   // baseUrl: 'http://10.90.90.52:8065',
   // baseUrl: 'http://10.90.90.53:8065',
   // baseUrlimg: 'http://114.99.127.243:2001',
   baseName:'智慧社区物管端',
   Clientid:'428a8310cd442757ae699df5d894f051',//
   grantType:'password',//
+  userType:'app_staff',//app_user:用户端,app_staff:物管端
   // 应用信息
   appInfo: {
     // 应用名称

+ 3 - 1
property_ui/manifest.json

@@ -19,7 +19,9 @@
         },
         "modules" : {
             "Maps" : {},
-            "OAuth" : {}
+            "OAuth" : {},
+            "Camera" : {},
+            "Speech" : {}
         },
         "distribute" : {
             "android" : {

+ 243 - 0
property_ui/mine/pages/info/authen.vue

@@ -0,0 +1,243 @@
+<template>
+	<view class="car">
+		<!-- 列表 -->
+		<view class="carlists">
+			<car-list :datainfo="list" :ygztList="ygztList" :yglbList="yglbList" :wtdt="wtdt" type='staff' @getDetail="getDetail" @getDelFn="getDelFn" @getShFn="getShFn"></car-list>
+		</view>
+		<block>
+			<view style="height: 100rpx;"></view>
+			<view class="rfbtn" @click="getAddFn">添加认证信息</view>
+		</block>
+		
+		<loading></loading>
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import carList from "@/people/components/car/list.vue"
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {staffDel,listAuthentication} from "@/api/work/people.js"
+	import {getDictionaryFn} from "@/api/system/user.js"
+	export default{
+		components:{carList},
+		data(){
+			return{
+				reset:require('@/car/static/car/reset.png'),
+				up:require('@/car/static/car/up.png'),
+				car:require('@/car/static/car/car.png'),
+				cara:require('@/car/static/car/cara.png'),
+				carb:require('@/car/static/car/carb.png'),
+				search:require('@/car/static/car/search.png'),
+				sfxx:"",
+				sfxxid:'',
+				text:'',
+				yglbList:[],
+				ygztList:[],
+				list:[],
+				pageSize: 10,
+				pageNum: 1,
+				reachflag: true,
+				wtdt:'',
+				userId:this.$store.state.user.userId,
+			}
+		},
+		onUnload() {
+			uni.$off('refStaffList')
+		},
+		onLoad: function() {
+			uni.$on('refStaffList',(res)=>{
+				this.getrefreshData()
+			})
+			this.init();
+			this.getDataFn();
+		},
+		// 上拉触底加载更多触发事件
+		onReachBottom() {
+			if (this.reachflag) {
+				this.pageNum++
+				this.getDataFn()
+			}
+		},
+		methods:{
+			checkPermi, checkRole,
+			getTabFn(val){
+				this.tabval=val;
+				this.getrefreshData()
+			},
+			init(){
+				// 员工类别
+				getDictionaryFn('yaungong').then(res=>{
+					if(res.code==200){
+						this.yglbList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				//状态
+				getDictionaryFn('technician_status').then(res=>{
+					if(res.code==200){
+						this.ygztList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
+			getShFn(data){
+				var that=this;
+				var info=JSON.parse(JSON.stringify(data))
+				var ite=JSON.parse(JSON.stringify(info.ite))
+				var params={
+					staffId:ite.staffId,
+					userId:ite.userId,
+					examine:info.sh
+				}
+				// params.examine=info.sh;
+				examineStaff(params).then(res=>{
+					if(res.code==200){
+						this.$toast('审核成功')
+						setTimeout(function(){
+							that.getrefreshData()
+						},1200)
+					}
+				})
+			},
+			getAddFn(){
+				var type='rzadd';
+				this.$tab.navigateTo(`/people/pages/people/staffadd?type=${type}`) 
+			},
+			getDetail(e){
+				this.$tab.navigateTo("/people/pages/people/staffadd?id="+e)
+			},
+			getConfirm(){
+				this.getrefreshData()
+			},
+			getReset(){
+				this.sfxx='';
+				this.text='';
+				this.getrefreshData()
+			},
+			getrefreshData(){
+				this.pageNum=1;
+				this.list=[];
+				this.reachflag=true;
+				this.getDataFn()
+			},
+			bindDateChangea(e){
+				var val=e.detail.value;
+				this.sfxx=this.yglbList[val].dictLabel;
+				this.sfxxid=this.yglbList[val].dictValue;
+				this.getrefreshData()
+			},
+			getDataFn(){
+				var params={
+					pageSize:this.pageSize,
+					pageNum: this.pageNum,
+					userId:this.userId
+				}
+				if(this.text){
+					params.staffName=this.text
+				}
+				if(this.sfxx){
+					params.staffCategory=this.sfxxid
+				}
+				listAuthentication(params).then(res=>{
+					if(res.code==200){
+						if (res.rows.length < this.pageSize) {
+							this.reachflag = false
+							this.wtdt = '到底了~';
+						} else {
+							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+							if (num < res.total) {
+								this.reachflag = true
+								this.wtdt = ''
+							} else {
+								this.reachflag = false
+								this.wtdt = '到底了~';
+							}
+						}
+						var arr=JSON.parse(JSON.stringify((res.rows)))
+						arr.forEach(ite=>{
+							ite.hideflag=true;
+							if(ite.phoneNumber){
+								ite.phoneNumbera=this.HideType(ite.phoneNumber)
+							}
+							if(ite.idCard){
+								ite.idCarda=this.HideType(ite.idCard)
+							}
+						})
+						if (this.pageNum == 1) {
+							this.list = arr;
+						} else {
+							this.list = this.list.concat(arr)
+						}
+					}else{
+						this.$toast(res.msg)
+					}
+				})
+			},
+			getDelFn(data){
+				var that=this;
+				var info=JSON.parse(JSON.stringify(data))
+				var params={
+					staffId:info.staffId,
+					userId:info.userId,
+					tenantId:info.tenantId,
+				}
+				staffDel(params).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
+			HideType(data,flag,type){
+				const firstPart = data.slice(0, 1);  
+				  // 生成中间8位的星号  
+				  const middlePart = '*'.repeat(data.length-2);  
+				  // 获取后4位  
+				  const lastPart = data.slice(data.length-1); 
+				  var s= firstPart + middlePart + lastPart;
+				  return s
+			},
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.car{padding: 12rpx 0 10rpx;}
+.cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
+	.topa{padding: 20rpx 20rpx 32rpx;
+		.resetimg{width: 36rpx;height: 36rpx;margin-right: 24rpx;flex: 0 0 auto;}
+		.chekt{width: 150rpx;overflow: hidden;
+			view{font-weight: 500;font-size: 26rpx;color: #272727;flex: 1;}
+			image{width: 24rpx;height: 16rpx;margin-left: 18rpx;flex: 0 0 auto;}
+		}
+		.search{flex: 1;margin-left: 16rpx;height: 64rpx;background: #EEEEEE;border-radius: 32rpx;border: 2rpx solid #E6E6E6;padding-left: 24rpx;box-sizing: border-box;
+		image{width: 32rpx;height: 34rpx;margin-right: 22rpx;flex: 0 0 auto;}
+		input{flex: 1;font-size: 26rpx;color: #272727;}
+		.btn{width: 100rpx;height: 64rpx;background: #3565ED;border-radius: 32rpx;flex: 0 0 auto;font-weight: bold;text-align: center;line-height: 64rpx;
+font-size: 26rpx;
+color: #FFFFFF;}
+		}
+	}
+	.tablst{background: #F3F3F0;padding:24rpx 16rpx 26rpx 30rpx;overflow: auto;
+		.tabs{height: 48rpx;background: #DADADA;border-radius: 24rpx;margin-right: 30rpx;font-weight: 500;display: flex;align-items: center;justify-content: center;padding: 0 24rpx;font-size: 26rpx;box-sizing: border-box;flex: 0 0 auto;color: #666666;
+			&.act{border: 2rpx solid #0256FD;background: #FFFFFF;color: #0256FD;}
+		}
+	}
+
+}
+.carlists{padding: 0 6rpx;}
+</style>

+ 1 - 1
property_ui/mine/pages/pwd/resetpwd.vue

@@ -62,7 +62,7 @@
 		var that = this;
         this.$refs.form.validate().then(res => {
 			var params={
-				phone:this.phone,
+				phonenumber:this.phone,
 				code:this.code,
 				password:this.user.newPassword
 			}

+ 5 - 0
property_ui/pages.json

@@ -209,6 +209,11 @@
 			    "navigationBarTitleText": "修改头像"
 			  }
 			}, {
+			  "path": "pages/info/authen",
+			  "style": {
+			    "navigationBarTitleText": "个人信息"
+			  }
+			},{
 			  "path": "pages/info/index",
 			  "style": {
 			    "navigationBarTitleText": "个人信息"

+ 74 - 7
property_ui/pages/index/index.vue

@@ -9,13 +9,14 @@
 						<view class="over">{{city}}</view>
 					</view>
 					<view style="flex: 0 1 auto;overflow: hidden;">
-						<picker range-key='dictLabel' :value="voindex" :range="xxList"	@change='bindDateChangeb'>
+						<!-- <picker range-key='dictLabel' :value="voindex" :range="xxList"	@change='bindDateChangeb'>
 							<view class="pay_btn flexcc" >
 								<view class="tit over">
 									{{companyName||"请选择物业"}}</view>
 								<image :src="aupimg" class="rimgs"></image>
 							</view>
-						</picker>
+						</picker> -->
+						
 					</view>
 					</view>
 				</block>
@@ -27,7 +28,20 @@
 			<view class="adrbox">
 				<view class="flexc mb14">
 					<image :src="adraimg" class="adr"></image>
-					<view class="adrtit">智慧<text>社区</text></view>
+					<view class="adrtit flex0">智慧<text>社区</text></view>
+					<view style="height: 100rpx;">
+						<w-select
+						      style="margin-left: 20rpx;" 
+						     v-model="chooseValue"
+						      :list='voList'
+						      valueName='dictLabel' 
+						      keyName="dictValue"
+							  :chosevalue="tenantId"
+							  :filterable='filterable'
+						      @change='getchange'
+						    >
+						    </w-select>
+					</view>
 				</view>
 				<view class="adrtxt flexc mb4">
 					<view class="over">嗨~{{nickName}}!</view><text v-if="postGroup">{{postGroup}}</text>
@@ -234,11 +248,13 @@ import notice from '@/components/swiper/notice.vue'
 import popUp from "@/components/box/popup.vue"
 import {getUserProfile} from "@/api/system/user.js"
 import {repairList} from "@/api/work/service.js"
+import {gettenantList,gettenantCheck} from "@/api/login.js"
 import self from '@/utils/location.js';
+import wSelect from "@/people/components/w-select/w-select.vue"
 import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 import {getCount,getCountTips} from "@/api/work/index.js"
   export default {
-	components:{footers,notice,popUp},
+	components:{footers,notice,popUp,wSelect},
 	data(){
 		return{
 			footerindex:'home',
@@ -274,7 +290,7 @@ import {getCount,getCountTips} from "@/api/work/index.js"
 			upimg:require("@/static/images/home/up.png"),
 			aupimg: require('@/static/images/aup.png'),
 			city:'合肥市',
-			initFace:'N',//initFace Y需要,N需要人脸认证
+			initFace:'N',//initFace Y需要,N需要人脸认证
 			deptName:this.$store.state.user.deptName,
 			nickName:this.$store.state.user.nickName,
 			postGroup:'',//岗位
@@ -286,6 +302,11 @@ import {getCount,getCountTips} from "@/api/work/index.js"
 			countTips:'',//红点
 			userId:this.$store.state.user.userId,
 			noticelist:[],
+			chooseValue:'',
+			tenantId:'',
+			tenantName:'',
+			voList:[],
+			filterable:true,
 		}
 	},
 	onPageScroll(e) {
@@ -296,6 +317,9 @@ import {getCount,getCountTips} from "@/api/work/index.js"
 			this.backgroundColor = 'transparent'
 		}
 	},
+	onShow() {
+		this.initFace=this.$store.state.user.initFace;
+	},
     onLoad: function() {
 		var that=this;
 		uni.getSystemInfo({
@@ -303,6 +327,7 @@ import {getCount,getCountTips} from "@/api/work/index.js"
 				this.nvaHeight = Number(e.statusBarHeight)+44;
 			}
 		})
+		this.gettenantList()
 		if(checkPermi(['wuYe:statistics:num:app'])){
 			this.getCount()
 		}
@@ -324,11 +349,52 @@ import {getCount,getCountTips} from "@/api/work/index.js"
     },
 	methods:{
 		checkPermi, checkRole,
+		// 获取租户列表
+		gettenantList(){
+			gettenantList().then(res=>{
+				if(res.code==200){
+					if(res.data.voList&&res.data.voList.length){
+						this.voList = res.data.voList.map(v => {
+							return {
+								dictLabel: v.companyName,
+								dictValue: v.tenantId
+							}
+						})
+					}
+					
+				}else{
+					this.$toast(res.msg)
+				}
+			})
+		},
+		getchange(e){
+			var tenantId=e.dictValue;
+			gettenantCheck(tenantId).then(res=>{
+				this.$store.dispatch('GetInfo').then(res => {
+					
+				})
+				// var data=res.data;
+				// 切换token
+				// this.$store.dispatch('checkToken', data.access_token).then(() => {
+				// 	that.getClassFn('GetInfo');
+				// 	// 刷新其余的页面
+				// 	var newArr=[false,true,true,true,true]
+				// 	that.$store.dispatch('checkRefresh', newArr).then(() => {
+						
+				// 	}).catch(() => {
+					 
+				// 	})
+				// }).catch(() => {
+							 
+				// })
+			})
+		},
 		getXxwsFn(){
-			// this.$tab.navigateTo(`/mine/pages/house/addhouse`) 
+			var type='rz'
+			this.$tab.navigateTo(`/people/pages/people/staffadd?type=${type}`) 
 		},
 		getClose(){
-			this.initFace='Y';
+			this.initFace='N';
 		},
 		bindDateChangeb(e){
 			var that=this;
@@ -458,6 +524,7 @@ import {getCount,getCountTips} from "@/api/work/index.js"
   }
 </script>
 <style lang="scss" scoped>
+/deep/	.uni-navbar__header-btns{overflow: auto;}
 .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;	}
 .navbg{width: 100%;height: 782rpx;}
 .wymain{z-index: 2;position: relative;padding: 0 24rpx;}

+ 12 - 0
property_ui/pages/mine/index.vue

@@ -60,6 +60,13 @@
 				</view>
 			</view>
 			<view class="mbgbox">
+				<view class="flexc mine_list" @click="getAuthFn" >
+					<view class="limg">
+						<image :src="listimgr" class="imgh"></image>
+					</view>
+					<view class="tit flex1">认证信息</view>
+					<image :src="rimg" class="rimg"></image>
+				</view>
 				<view class="flexc mine_list" @click="getWarrantyFn" v-if="checkPermi(['wuYe:repair:list'])">
 					<view class="limg">
 						<image :src="listimge" class="imga"></image>
@@ -182,6 +189,7 @@
 				listimgo: require('@/static/images/mine/mtabo.png'),
 				listimgp: require('@/static/images/mine/mtabp.png'),
 				listimgq: require('@/static/images/mine/mtabq.png'),
+				listimgr: require('@/static/images/mine/mtabr.png'),
 				// avatar:'',
 				head:require('@/static/images/mine/head.png'),
 				wrimg:require("@/static/images/mine/wrimg.png"),
@@ -255,6 +263,9 @@
 			handTsFn(){//投诉回复
 				this.$tab.navigateTo('/service/pages/service/complaint')
 			},
+			getAuthFn(){//认证信息
+				this.$tab.navigateTo('/mine/pages/info/authen')
+			},
 			getWarrantyFn(){//报修管理
 				this.$tab.navigateTo('/service/pages/service/warranty')
 			},
@@ -418,6 +429,7 @@ page{background-color: #ffffff;}
 					.imgc{width: 30rpx;height: 32rpx;}
 					.imgd{width: 26rpx;height: 32rpx;}
 					.imgg{width: 32rpx;height: 30rpx;}//16 15
+					.imgh{width: 28rpx;height: 32rpx;}//16 15
 				}
 				.tit{font-weight: bold;font-size: 26rpx;color: #272727;}
 				.txt{font-weight: 500;font-size: 26rpx;color: #666666;margin-left: 20rpx;flex: 0 0 auto;}

+ 3 - 5
property_ui/pages/register.vue

@@ -57,7 +57,7 @@
 		    </view>
 	  </view>
 	  <loading></loading>
-	  <view class="rtxt" @click="getregister">还没账号?去申请注册</view>
+	  <!-- <view class="rtxt" @click="getregister">还没账号?去申请注册</view> -->
   </view>
 </template>
 
@@ -88,10 +88,9 @@
 			datainfo: {
 				phonenumber: "",
 				code: "",
-				tenantId:'',
 				clientId:config.Clientid,
 				grantType:'sms',
-				userType:'app_user'
+				userType:config.userType
 			},
 			timer:""
 		}
@@ -99,7 +98,7 @@
 	
 	methods:{
 		getlogin(){
-			this.$tab.redirectTo(`/pages/tlogin`)
+			this.$tab.redirectTo(`/pages/tlogin?type=1`)
 		},
 		handlePrivacy(){
 			this.$tab.navigateTo(`/pages/agreement`)  
@@ -169,7 +168,6 @@
 					// 	return
 					// }
 					params.code=this.duancode;
-					params.tenantId='';
 					register(params).then(res=>{
 						if(res.code==200){
 							that.$toast("注册成功")

+ 16 - 6
property_ui/people/components/car/list.vue

@@ -111,14 +111,17 @@
 		<view v-if="type=='staff'" class="flecw">
 			<view class="stafflist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.staffId)">
 				<view class="statop">
-					<image class="head" :src="man" v-if="ite.gender==1"></image>
-					<image class="head" :src="woman" v-else></image>
+					<image class="head" :src="baseUrl+ite.avatarPhoto" v-if="ite.avatarPhoto"></image>
+					<block v-else>
+						<image class="head" :src="man" v-if="ite.gender==1"></image>
+						<image class="head" :src="woman" v-else></image>
+					</block>
 					<view class="flex1">
 						<view class="statit">{{ite.staffName}}</view>
 						<view class="statxt flexc" :class="{'co06':ite.status==1,'coff':ite.status==2}"><text class="cir" :class="{'bga':ite.status==1,'bgb':ite.status==2}"></text>{{kaType(ite.status,ygztList)}}</view>
 						<!-- <view class="statxt flexc cof6"><text class="cir bgb"></text>指派中</view> -->
 					</view>
-					<image :src="pdel" class="stadel" v-if="checkPermi(['wuYe:staffManage:remove'])" @click.stop="getDelFn(ite.staffId)"></image>
+					<image :src="pdel" class="stadel" v-if="checkPermi(['wuYe:staffManage:remove'])" @click.stop="getDelFn(ite)"></image>
 				</view>
 				<view class="stalist">
 					<view class="imgs"><image :src="gzlx" class="gzlximg"></image></view>{{kaType(ite.staffCategory,yglbList)}}
@@ -135,9 +138,9 @@
 					<view class="imgs"><image :src="sfz" class="sfz"></image></view>{{ite.hideflag?ite.idCarda:ite.idCard}}
 				</view>
 				<view style="height: 20rpx;"></view>
-				<view class="pshbox flexc">
-					<view class="btna">拒绝</view>
-					<view class="btnb">同意</view>
+				<view class="pshbox flexc" v-if="ite.examine==1&&checkPermi(['wuYe:staffManage:examine'])">
+					<view class="btna" @click.stop="getShFn(ite,'3')">拒绝</view>
+					<view class="btnb" @click.stop="getShFn(ite,'2')">同意</view>
 				</view>
 			</view>
 		</view>
@@ -301,6 +304,13 @@
 					return age;
 				}         
 			 },
+			getShFn(ite,e){
+				var obj={
+					ite:ite,
+					sh:e
+				}
+				this.$emit('getShFn',obj)
+			},
 			getDetail(e){
 				this.$emit('getDetail',e)
 			},

+ 34 - 7
property_ui/people/pages/people/staff.vue

@@ -22,7 +22,7 @@
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :ygztList="ygztList" :yglbList="yglbList" :wtdt="wtdt" type='staff' @getDetail="getDetail" @getDelFn="getDelFn"></car-list>
+			<car-list :datainfo="list" :ygztList="ygztList" :yglbList="yglbList" :wtdt="wtdt" type='staff' @getDetail="getDetail" @getDelFn="getDelFn" @getShFn="getShFn"></car-list>
 		</view>
 		<block v-if="checkPermi(['wuYe:staffManage:add'])">
 			<view style="height: 100rpx;"></view>
@@ -38,7 +38,7 @@
 	const baseUrl = config.baseUrl
 	import carList from "@/people/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
-	import {staffList,staffDel} from "@/api/work/people.js"
+	import {staffList,staffDel,examineStaff,staffglyDel} from "@/api/work/people.js"
 	import {getDictionaryFn} from "@/api/system/user.js"
 	export default{
 		components:{carList},
@@ -60,8 +60,8 @@
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
-				tabval:0,
-				tablist:[{tit:'待审核',val:0},{tit:'已审核',val:1},]
+				tabval:'2',
+				tablist:[{tit:'员工信息',val:'2'},{tit:'待审核',val:'1'},{tit:'已拒绝',val:'3'},]
 			}
 		},
 		onUnload() {
@@ -84,7 +84,8 @@
 		methods:{
 			checkPermi, checkRole,
 			getTabFn(val){
-				this.tabval=val
+				this.tabval=val;
+				this.getrefreshData()
 			},
 			init(){
 				// 员工类别
@@ -110,11 +111,30 @@
 					}
 				})
 			},
+			getShFn(data){
+				var that=this;
+				var info=JSON.parse(JSON.stringify(data))
+				var params=JSON.parse(JSON.stringify(info.ite))
+				// var params={
+				// 	staffId:ite.staffId,
+				// 	userId:ite.userId,
+				// 	examine:info.sh
+				// }
+				params.examine=info.sh;
+				examineStaff(params).then(res=>{
+					if(res.code==200){
+						this.$toast('审核成功')
+						setTimeout(function(){
+							that.getrefreshData()
+						},1200)
+					}
+				})
+			},
 			getAddFn(){
 				this.$tab.navigateTo("/people/pages/people/staffadd")
 			},
 			getDetail(e){
-				this.$tab.navigateTo("/people/pages/people/staffadd?id="+e)
+				this.$tab.navigateTo("/people/pages/people/staffadd?type=gyy&id="+e)
 			},
 			getConfirm(){
 				this.getrefreshData()
@@ -140,6 +160,7 @@
 				var params={
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
+					examine:this.tabval
 				}
 				if(this.text){
 					params.staffName=this.text
@@ -184,7 +205,13 @@
 			},
 			getDelFn(data){
 				var that=this;
-				staffDel(data).then(res=>{
+				var info=JSON.parse(JSON.stringify(data))
+				var params={
+					staffId:info.staffId,
+					userId:info.userId,
+					tenantId:info.tenantId,
+				}
+				staffglyDel(params).then(res=>{
 					if(res.code==200){
 						this.$toast("删除成功");
 						setTimeout(function(){

+ 285 - 83
property_ui/people/pages/people/staffadd.vue

@@ -4,15 +4,61 @@
 			<view class="cbox">
 				<view class="chtop flexc">
 					<image :src="line"></image>
-					<view>员工信息</view>
+					<view>{{rzflag?'完善':'员工'}}信息</view>
 				</view>
 				<view class="chmain">
+					<view class="plr6 mt12">
+						<view class="rztit">请上传身份证照片</view>
+						<view class="flexcj mb10">
+							<view class="carbox" @click="getaddImagea('front')">
+								<image :src="baseUrl+datainfo.idCardBack" class="img" v-if="datainfo.idCardBack"></image>
+								<image :src="cardz" class="img" v-else></image>
+								<view class="tit">拍摄人像面</view>
+							</view>
+							<view class="carbox" @click="getaddImagea('back')">
+								<image :src="baseUrl+datainfo.idCardFront" class="img" v-if="datainfo.idCardFront"></image>
+								<image :src="cardf" class="img" v-else></image>
+								<view class="tit">拍摄国徽面</view>
+							</view>
+						</view>
+						<view class="mb4">
+							<view class="cardtip">身份信息会根据上传的证件照片自动识别,支持手动输入。</view>
+							<view class="cardtip">如果识别错误,可尝试再次拍照。</view>
+						</view>
+					</view>
+					<uni-forms-item label="物业小区" name="tenantId">
+						<w-select
+						      style="margin-left: 20rpx;" 
+						     v-model="chooseValue"
+						      :list='voList'
+						      valueName='dictLabel' 
+						      keyName="dictValue"
+							  :chosevalue="tenantName?tenantName:statusFormats(datainfo.tenantId,voList,'tenant')"
+							  :filterable='filterable'
+						      @change='getchange'
+						    >
+						    </w-select>
+					</uni-forms-item>
 					<uni-forms-item label="人员姓名" name="staffName">
 						<view class="flexc">
 							<uni-easyinput :disabled="isdisabled" v-model="datainfo.staffName" :inputBorder='false' placeholder="请输入人员姓名" />
 							<view class="rimg"><image :src="rimg"></image></view>
 						</view>
 					</uni-forms-item>
+					<uni-forms-item label="上传头像" name="facePhoto">
+						<view class="addimgs">
+							<block v-if="datainfo.avatarPhoto">
+								<view class="assimg"  @click="getPreview(datainfo.avatarPhoto)">
+									<image :src="baseUrl+datainfo.avatarPhoto" class="img"></image>
+									<image :src="rdelimg" class="delimg" @click.stop="getDelFn()"></image>
+								</view>
+							</block>
+							<view class="addbox" @click="getaddImagea('avatar')">
+								<image :src="aphoto"></image>
+								<view>添加图片</view>
+							</view>
+						</view>
+					</uni-forms-item>
 					<uni-forms-item label="人员性别" name="gender">
 						<view class="flexc">
 							<view class="flex1"></view>
@@ -69,12 +115,16 @@
 
 <script>
 	import config from '@/config'
+	const userType=config.userType;
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
-	import {staffAdd,staffPut,staffDet} from "@/api/work/people.js"
+	import {staffAdd,staffPut,staffDet,staffAddgly,staffrzDet,staffPutgly} from "@/api/work/people.js"
 	import {getDictionaryFn} from "@/api/system/user.js"
-	import {selectValueKey} from "@/utils/common.js"
+	import {selectValueKey,uploadIdentify} from "@/utils/common.js"
+	import wSelect from "@/people/components/w-select/w-select.vue"
+	import {gettenantList} from "@/api/login.js"
+	import {getOcrIdCard} from "@/api/system/card.js"
 	export default {
-		components: {},
+		components: {wSelect},
 		data() {
 			return {
 				line: require('@/car/static/car/line.png'),
@@ -83,6 +133,10 @@
 				aphoto: require('@/people/static/people/aphoto.png'),
 				check: require('@/people/static/people/check.png'),
 				ncheck: require('@/people/static/people/ncheck.png'),
+				cardz:require('@/health/static/health/cardz.png'),
+				cardf:require('@/health/static/health/cardf.png'),
+				aphoto: require('@/service/static/service/photo.png'),
+				rdelimg: require('@/service/static/service/rdel.png'),
 				baseUrl: config.baseUrl,
 				checkflag:true,
 				datainfo: {
@@ -93,10 +147,12 @@
 					"staffCategory":"",//员工类别,1:保安 2:维修人员 3:物业管理
 					"maintenanceCategory":"",//维修分类
 					"phoneNumber":"",//手机号码
-					// "avatarPhoto":"",//头像
+					"tenantId":"",//租户id
+					"avatarPhoto":"",//头像
 					"idCard":"",//身份证号码
-					// "idCardFront":"",//身份证正面
-					// "idCardBack":"",//身份证反面
+					// "examine":'',//审核状态 1:未审核 2:审核通过 3:审核未通过
+					"idCardFront":"",//身份证正面,国徽面
+					"idCardBack":"",//身份证反面,人像面
 					// "certificate":"",//相关证件
 				},
 				rules: {
@@ -116,10 +172,26 @@
 				id:'',
 				ptype:'add',
 				isdisabled:false,
+				rzflag:false,
+				tenantName:'',
+				chooseValue:'',
+				voList:[],
+				filterable:true,
+				rztype:'',
 			}
 		},
 		onLoad: function(e) {
 			this.init()
+			// 认证过来的,需要审核
+			if(e.type){
+				this.rztype=e.type
+				this.rzflag=true;
+				this.datainfo.phoneNumber=this.$store.state.user.phonenumber;
+				this.datainfo.userId=this.$store.state.user.userId;
+				var userId=this.$store.state.user.userId;
+				this.staffrzDet(userId)
+			}
+			this.gettenantList();
 			if(e.id){
 				this.id=e.id;
 				this.ptype='edit';
@@ -139,9 +211,29 @@
 					this.yglbidx=aite.key
 				}else if(type=='vxlb'){
 					this.vxlbidx=aite.key;
+				}else if(type=='tenant'){
+					this.tenantName=aite.actions
 				}
 				return aite.actions;
 			},
+			// 获取租户列表
+			gettenantList(){
+				gettenantList().then(res=>{
+					if(res.code==200){
+						if(res.data.voList&&res.data.voList.length){
+							this.voList = res.data.voList.map(v => {
+								return {
+									dictLabel: v.companyName,
+									dictValue: v.tenantId
+								}
+							})
+						}
+						
+					}else{
+						this.$toast(res.msg)
+					}
+				})
+			},
 			init(){
 				// 员工类别
 				getDictionaryFn('yaungong').then(res=>{
@@ -177,6 +269,14 @@
 					}
 				})
 			},
+			getchange(e){
+				console.log(e)
+				this.datainfo.tenantId=e.dictValue;
+				// this.datainfo.houseAddress=e.dictLabel;
+				// if(this.tabval=='1'){
+				// 	this.datainfo.detailAddress=e.location;
+				// }
+			},
 			bindDateChange(e){
 				var val=e.detail.value;
 				var vala=this.yglbList[val].dictValue;
@@ -213,33 +313,74 @@
 						return
 					}
 					if(this.ptype=='add'){
-						staffAdd(params).then(res=>{
-							if(res.code==200){
-								this.$toast("新增成功")
-								setTimeout(function(){
-									uni.$emit("refStaffList")
-									uni.navigateBack({
-										delta:1
-									})
-								},1500)
-							}
-						})
+						if(this.rzflag){
+							staffAdd(params).then(res=>{
+								if(res.code==200){
+									this.$toast("新增成功,请等待审核")
+									setTimeout(function(){
+										uni.$emit("refStaffList")
+										var initFace='N';
+										that.$store.dispatch('checkInitFace', initFace).then(() => {
+											
+										})
+										uni.navigateBack({
+											delta:1
+										})
+									},1500)
+								}
+							})
+						}else{
+							// params.examine=2;
+							params.userType=userType;
+							staffAddgly(params).then(res=>{
+								if(res.code==200){
+									this.$toast("新增成功")
+									setTimeout(function(){
+										uni.$emit("refStaffList")
+										uni.navigateBack({
+											delta:1
+										})
+									},1500)
+								}
+							})
+						}
 					}else{
-						staffPut(params).then(res=>{
-							if(res.code==200){
-								this.$toast("修改成功")
-								setTimeout(function(){
-									uni.$emit("refStaffList")
-									uni.navigateBack({
-										delta:1
-									})
-								},1500)
-							}
-						})
+						if(this.rzflag){
+							staffPut(params).then(res=>{
+								if(res.code==200){
+									this.$toast("修改成功")
+									setTimeout(function(){
+										uni.$emit("refStaffList")
+										var initFace='N';
+										that.$store.dispatch('checkInitFace', initFace).then(() => {
+											
+										})
+										uni.navigateBack({
+											delta:1
+										})
+									},1500)
+								}
+							})
+						}else{
+							// 管理员修改
+							staffPutgly(params).then(res=>{
+								if(res.code==200){
+									this.$toast("修改成功")
+									setTimeout(function(){
+										uni.$emit("refStaffList")
+										uni.navigateBack({
+											delta:1
+										})
+									},1500)
+								}
+							})
+						}
+						
 					}
 					
 				})
 			},
+			// 员工信息详情
 			getDetailFn(){
 				staffDet(this.id).then(res=>{
 					if(res.code==200){
@@ -247,60 +388,94 @@
 					}
 				})
 			},
-			// getaddImage(e) {
-			// 	let that = this;
-			// 	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
-			// 			}
-			// 		}
-			// 	})
-			// }
+			// 认证信息详情 ,admin,首页切换到幸福里,修改
+			staffrzDet(id){
+				staffrzDet(id).then(res=>{
+					if(res.code==200&&res.data){
+						if(this.rztype=='rzadd'){
+							// this.datainfo=res.data.filter()
+						}else{
+							this.ptype='edit';
+							this.datainfo=res.data;
+						}
+					}
+				})
+			},
+			// 头像
+			getPreview(url) {
+				var newArr=[];
+				var ds=this.baseUrl+url
+				newArr.push(ds)
+				uni.previewImage({
+					urls: newArr,
+					current:0,
+					success: function(data) {},
+					fail: function(err) {}
+				});
+			},
+			getDelFn(){
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							that.datainfo.avatarPhoto=''
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
+			getaddImagea(e) {
+				let that = this;
+				let file = []
+				uni.chooseImage({
+					count: 1,
+					success: function(res) {
+						let img = res.tempFilePaths;
+						let imglen = res.tempFilePaths.length;
+						var fuwufile = [];
+						uploadIdentify('/common/upload', img, 0, 0, 0, imglen, fuwufile, function(rs) {
+							var resurl = rs[0];
+							console.log(resurl)
+							if (e == 'front') {
+								that.datainfo.idCardBack = resurl.fileName;
+								if (rs && rs.length > 0) {
+									var obj = {
+										type: e,
+										url: resurl.urlOnline
+									}
+									that.getOcrIdCard(obj)
+								}
+							} else if(e=='back') {
+								that.datainfo.idCardFront = resurl.fileName;
+							}else if(e=='avatar'){
+								that.datainfo.avatarPhoto = resurl.fileName;
+							}
+						})
+					}
+				});
+			},
+			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.staffName = datainfo.realName;
+							this.datainfo.idCard = datainfo.idCard;
+							// this.datainfo.idCardAddress = datainfo.address;
+						// } else {
+						// 	this.datainfo.expirationDate = datainfo.expirationDate
+						}
+					}
+				})
+			}
 		}
 	}
 </script>
@@ -308,6 +483,7 @@
 	page{background: #F3F3F0;}
 </style>
 <style lang="scss" scoped>
+.check /deep/ .select-wrap{border: none;width: 100%;}
 .check /deep/ .uni-forms-item__error{left:auto;right: 0;margin-top: 10rpx;z-index: 1;}
 .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;}
 .check .cbox /deep/ .uni-forms-item:last-child{border: none;}
@@ -343,4 +519,30 @@
 	}
 	
 }
+.rztit{font-weight: bold;font-size: 30rpx;color: #222327;margin-bottom: 30rpx;}
+	.carbox{width: 300rpx;border-radius: 14rpx;overflow: hidden;
+		.img{width: 300rpx;height: 208rpx;}
+		.tit{width: 100%;height: 56rpx;background: #7CC2A8;text-align: center;font-weight: 500;
+font-size: 26rpx;line-height: 56rpx;
+color: #FFFFFF;}
+	}
+	.cardtip{font-weight: 500;font-size: 24rpx;color: #999999;line-height: 40rpx;}
+.addimgs{display: flex;align-items: center;flex-wrap: wrap;justify-content: flex-end;
+	
+	.assimg{width: 128rpx;height: 128rpx;position: relative;overflow: hidden;margin: 0 0 20rpx 24rpx;
+		.img{width: 100%;height: 100%;}
+		.delimg{width: 24rpx;height: 24rpx;position: absolute;right: 0;top: 0;}
+	}
+}
+.addimgs{display: flex;align-items: center;flex-wrap: wrap;justify-content: flex-end;
+	
+	.assimg{width: 128rpx;height: 128rpx;position: relative;overflow: hidden;margin: 0 0 20rpx 24rpx;
+		.img{width: 100%;height: 100%;}
+		.delimg{width: 24rpx;height: 24rpx;position: absolute;right: 0;top: 0;}
+	}
+}
+.addbox{width: 160rpx;height: 128rpx;background: #F0F0F0;border-radius: 20rpx;display: flex;flex-direction: column;align-items: center;justify-content: center;margin-left: 24rpx;flex: 0 0 auto;
+		image{width: 48rpx;height: 42rpx;margin-bottom: 12rpx;}
+		view{font-weight: 500;font-size: 24rpx;color: #666666;}
+	}
 </style>

BIN=BIN
property_ui/static/images/mine/mtabr.png


+ 1 - 0
property_ui/store/getters.js

@@ -14,5 +14,6 @@ const getters = {
   deptId: state => state.user.deptId,
   loading: state => state.user.loading,
   tenantId: state => state.user.tenantId,
+  initFace: state => state.user.initFace,
 }
 export default getters

+ 13 - 1
property_ui/store/modules/user.js

@@ -25,6 +25,7 @@ const user = {
 	deptName: storage.get(constant.deptName),
 	loading: false,
 	tenantId:storage.get(constant.tenantId),
+	initFace: storage.get(constant.initFace),
   },
 
   mutations: {
@@ -92,6 +93,10 @@ const user = {
 	  state.phonenumber = phonenumber
 	  storage.set(constant.phonenumber, phonenumber)
 	},
+	SET_INITFACE: (state, initFace) => {
+	  state.initFace = initFace
+	  storage.set(constant.initFace, initFace)
+	},
   },
 
   actions: {
@@ -99,6 +104,10 @@ const user = {
 	SetwgtFn({ commit}, code ){
 		commit('SET_WGTCODE',code)
 	},
+	//修改认证状态
+	checkInitFace({commit},data){
+		commit('SET_INITFACE', data)
+	},
     // 登录
     Login({ commit }, userInfo) {
       const username = userInfo.username.trim()
@@ -162,6 +171,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
+		   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
 		   // 根据角色来储存权限
@@ -178,9 +188,10 @@ const user = {
 		   }
           if (res.roles && res.roles.length > 0) {
             commit('SET_ROLES', res.roles)
-            commit('SET_PERMISSIONS', res.permissions)
+            commit('SET_PERMISSIONS', res.permissions||[])
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
+			commit('SET_PERMISSIONS', [])
           }
           commit('SET_NAME', username)
 		  commit('SET_NICKNAME', nickName)
@@ -188,6 +199,7 @@ const user = {
 		  commit('SET_USERID', userId)
 		  commit('SET_TENANID', tenantId)
 		  commit('SET_PHONENUMBER', phonenumber)
+		  commit('SET_INITFACE', initFace)
 		  commit('SET_DEPTID', deptId)
 		  commit('SET_DEPNAME', deptName)
           resolve(res)

+ 1 - 2
property_ui/utils/common.js

@@ -147,10 +147,9 @@ export function uploadIdentify(api, filePaths, successUp, failUp, i, length, fil
 			let result = JSON.parse(resp.data)
 			const code = result.code || 200
 			const msg = errorCode[code] || result.msg || errorCode['default']
-			// console.log(result.fileName,8)
 			if (result.code == 200) {
 				successUp++;
-				files[i] = result;
+				files[i] = result.data;
 			} else if(result.code==401) {
 				showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
 				  if (res.confirm) {

+ 1 - 0
property_ui/utils/constant.js

@@ -11,6 +11,7 @@ const constant = {
    phonenumber:'vuex_phonenumber',
    deptId: 'vuex_deptId',
    deptName: 'vuex_deptName',
+   initFace:'vuex_initFace',
  }
 
  export default constant

+ 10 - 7
property_ui/utils/request.js

@@ -118,13 +118,16 @@ const request = config => {
           		})
           	}else{
           		uni.hideLoading()
-          		showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
-          		  if (res.confirm) {
-          		    store.dispatch('LogOut').then(res => {
-          		      uni.reLaunch({ url: '/pages/login' })
-          		    })
-          		  }
-          		})
+				store.dispatch('LogOut').then(res => {
+				  uni.reLaunch({ url: '/pages/login' })
+				})
+          		// showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
+          		//   if (res.confirm) {
+          		//     store.dispatch('LogOut').then(res => {
+          		//       uni.reLaunch({ url: '/pages/login' })
+          		//     })
+          		//   }
+          		// })
           	}
           confirmflag = false;
           },2000)

+ 1 - 1
property_ui/utils/storage.js

@@ -4,7 +4,7 @@ import constant from './constant'
 let storageKey = 'storage_data'
 
 // 存储节点变量名
-let storageNodeKeys = [constant.avatar, constant.name,constant.nickName, constant.roles,constant.roleName,constant.permissions,constant.autologin,constant.wgtcode,constant.userId,constant.phonenumber,constant.deptId,constant.deptName,]
+let storageNodeKeys = [constant.avatar, constant.name,constant.nickName, constant.roles,constant.roleName,constant.permissions,constant.autologin,constant.wgtcode,constant.userId,constant.phonenumber,constant.deptId,constant.deptName,constant.initFace,]
 
 const storage = {
   set: function(key, value) {