zouling vor 1 Jahr
Ursprung
Commit
13a993cdd0

+ 24 - 0
api/mine/order.js

@@ -96,6 +96,22 @@ export function getCameraList(data) {
 	'data':data
   })
 }
+// 控制设备列表-打开
+export function getVideoOpenDz(data) {
+  return request({
+    'url': '/camera/video/openDz',
+    'method': 'get',
+	'data':data
+  })
+}
+// 控制设备列表-关闭
+export function getVideoCloseDz(data) {
+  return request({
+   'url': '/camera/video/closeDz',
+   'method': 'get',
+   'data':data
+  })
+}
 // 设备列表接口
 export function getCameraVideo(data) {
   return request({
@@ -103,4 +119,12 @@ export function getCameraVideo(data) {
     'method': 'get',
   })
 }
+// APP首页统计预约和订餐
+export function getYydcCont(data) {
+  return request({
+    'url': '/statistics/app/yydc',
+    'method': 'get',
+	'data':data
+  })
+}
 // 新的end

+ 2 - 2
config.js

@@ -1,8 +1,8 @@
 // 应用全局配置
 module.exports = {
   // baseUrl: 'https://vue.ruoyi.vip/prod-api',
-  // baseUrl: 'https://lyyy.qs163.cn/prod-api',
-  baseUrl: 'http://192.168.101.168:8065',
+  // baseUrl: 'https://zxyyq.qs163.cn/prod-api',
+  // baseUrl: 'http://192.168.101.168:8065',
   // baseUrl: 'http://192.168.101.245:8065',
   // baseUrlimg: 'http://114.99.127.243:2001',
   Clientid:'428a8310cd442757ae699df5d894f051',//

+ 3 - 4
pages.json

@@ -20,8 +20,8 @@
 	  "path": "pages/order/info",
 	  "style": {
 	    "navigationBarTitleText": "信息录入",
-				"h5":{
-					"titleNView":false
+			"h5":{
+				"titleNView":false
 			}
 		}
 	},
@@ -272,8 +272,7 @@
 			{
 				"path": "pages/record/visitor",
 				"style": {
-					"navigationBarTitleText": "访客记录",
-					"navigationStyle": "custom"
+					"navigationBarTitleText": "访客记录"
 				}
 			}
 		]

+ 89 - 86
pages/index/index.vue

@@ -10,7 +10,7 @@
 			<!-- 顶部 -->
 			<view class="yqtop flexcj">
 				<view class="yqtopl">
-					<view class="tit mb10">潜山经济开发区</view>
+					<view class="tit mb10">{{city||'潜山经济开发区'}}</view>
 					<view class="txt">安徽中新云智慧园区服务平台</view>
 				</view>
 				<view class="yqtopr">
@@ -58,7 +58,7 @@
 						</view>
 						<view class="yqcba" v-if="checkPermi(['system:management:list'])" @click="getLimitFn">
 							<view class="aimg"><image :src="htabfimg" class="imgf"></image></view>
-							<view class="atit">访客管理</view>
+							<view class="atit">人员权限</view>
 						</view>
 						<view class="yqcba" v-if="checkPermi(['system:record:list'])" @click="getVistotFn">
 							<view class="aimg"><image :src="htabgimg" class="imgg"></image></view>
@@ -75,96 +75,100 @@
 			<view class="mb10">
 				<notice :noticelist="noticelist" :activeColor="activeColor" :nactiveColor="nactiveColor" :autoplay='autoplay' @getNoticeDet="getNoticeDet"></notice>
 			</view>
-			<!-- 统计 -->
-			<view class="yqcont yqconta">
-				<view class="yqcl">
-					<view class="yqcla">
-						<image :src="hbgaimg" class="cbgimg"></image>
-						<view class="cbox">
-							<view class="tit mb5">来访数</view>
-							<view class="tit"><text>613</text>位</view>
-						</view>
-					</view>
-					<view class="yqcla">
-						<image :src="hbgbimg" class="cbgimg"></image>
-						<view class="cbox">
-							<view class="tit mb5">本月预约</view>
-							<view class="tit"><text>613</text>位</view>
+			<!-- 普通用户看到的 -->
+			<template v-if="!checkRole(['manager'])">
+				<view class="yqcont" >
+					<view class="yqcb">
+						<image :src="hbgfimg" class="cbgimg"></image>
+						<view class="cbox flexc">
+							<view class="cboxb flexc pl10">
+								<image :src="dayimg" class="dayimg"></image>
+								<view class="num pr4">{{conuntinfo.dczs}}</view>
+							</view>
+							<view class="cboxb">
+								<view class="tit"><view class="tita">中餐</view><text>{{conuntinfo.dcwc}}</text>位</view>
+								<view class="tit"><view class="tita">晚餐</view><text>{{conuntinfo.dcDinner}}</text>位</view>
+							</view>
 						</view>
 					</view>
-					<view class="yqcla">
-						<image :src="hbgcimg" class="cbgimg"></image>
-						<view class="cbox">
-							<view class="tit mb5">今日来访</view>
-							<view class="tit"><text>613</text>位</view>
-						</view>
+				</view>
+				<view class="yylists">
+					<view class="yyltab flexcj">
+						<view class="left flexc">本周打卡记录<image :src="listline"></image></view>
+						<view class="right" @click="getmClockFn">查看更多 >></view>
 					</view>
-					<view class="yqcla">
-						<image :src="hbgdimg" class="cbgimg"></image>
-						<view class="cbox">
-							<view class="tit mb5">今日预约</view>
-							<view class="tit"><text>613</text>位</view>
-						</view>
+					<view>
+						<y-list type='record' :datalist="list" :wtdt="wtdt" @getDetail='getClockDetailFn' :adrlist="adrlist" @getDelFn="getDelFn" @gettypeFn="gettypeFn"></y-list>
 					</view>
 				</view>
-				<view class="yqcr">
-					<image :src="hbgeimg" class="cbgimg"></image>
-					<view class="cbox">
-						<view class="cboxa flexc">
-							<image :src="dayimg" class="dayimg"></image>
-							<view class="num">1,037</view>
+			</template>
+			<template v-else>
+				<!-- 统计 -->
+				<view class="yqcont yqconta">
+					<view class="yqcl">
+						<view class="yqcla">
+							<image :src="hbgaimg" class="cbgimg"></image>
+							<view class="cbox">
+								<view class="tit mb5">本月来访数</view>
+								<view class="tit"><text>{{conuntinfo.bylf}}</text>位</view>
+							</view>
 						</view>
-						<view class="flexcc">
-							<view class="cboxb">
-								<view class="tit mb5">中餐</view>
-								<view class="tit"><text>732</text>位</view>
+						<view class="yqcla">
+							<image :src="hbgbimg" class="cbgimg"></image>
+							<view class="cbox">
+								<view class="tit mb5">本月预约</view>
+								<view class="tit"><text>{{conuntinfo.byyy}}</text>位</view>
 							</view>
-							<view class="cboxb">
-								<view class="tit mb5">晚餐</view>
-								<view class="tit"><text>732</text>位</view>
+						</view>
+						<view class="yqcla">
+							<image :src="hbgcimg" class="cbgimg"></image>
+							<view class="cbox">
+								<view class="tit mb5">今日来访</view>
+								<view class="tit"><text>{{conuntinfo.jrlf}}</text>位</view>
 							</view>
 						</view>
-					</view>
-				</view>
-			</view>
-			<!-- 普通用户看到的 -->
-			<view class="yqcont">
-				<view class="yqcb">
-					<image :src="hbgfimg" class="cbgimg"></image>
-					<view class="cbox flexc">
-						<view class="cboxb flexc pl10">
-							<image :src="dayimg" class="dayimg"></image>
-							<view class="num pr4">1,037</view>
+						<view class="yqcla">
+							<image :src="hbgdimg" class="cbgimg"></image>
+							<view class="cbox">
+								<view class="tit mb5">今日预约</view>
+								<view class="tit"><text>{{conuntinfo.jryy}}</text>位</view>
+							</view>
 						</view>
-						<view class="cboxb">
-							<view class="tit"><view class="tita">中餐</view><text>732</text>位</view>
-							<view class="tit"><view class="tita">晚餐</view><text>732</text>位</view>
+					</view>
+					<view class="yqcr">
+						<image :src="hbgeimg" class="cbgimg"></image>
+						<view class="cbox">
+							<view class="cboxa flexc">
+								<image :src="dayimg" class="dayimg"></image>
+								<view class="num">{{conuntinfo.dczs}}</view>
+							</view>
+							<view class="flexcc">
+								<view class="cboxb">
+									<view class="tit mb5">中餐</view>
+									<view class="tit"><text>{{conuntinfo.dcwc}}</text>位</view>
+								</view>
+								<view class="cboxb">
+									<view class="tit mb5">晚餐</view>
+									<view class="tit"><text>{{conuntinfo.dcDinner}}</text>位</view>
+								</view>
+							</view>
 						</view>
 					</view>
 				</view>
-			</view>
-			<!-- 普通用户 -->
-			<view class="yylists" v-if="!checkRole(['manager'])">
-				<view class="yyltab flexcj">
-					<view class="left flexc">本周打卡记录<image :src="listline"></image></view>
-					<view class="right" @click="getmClockFn">查看更多 >></view>
-				</view>
-				<!-- 列表 -->
-				<view>
-					<y-list type='record' :datalist="list" :wtdt="wtdt" @getDetail='getClockDetailFn' :adrlist="adrlist" @getDelFn="getDelFn" @gettypeFn="gettypeFn"></y-list>
-				</view>
-			</view>
-			<!-- 管理员 -->
-			<view class="yylists" v-else>
-				<view class="yyltab flexcj">
-					<view class="left flexc">待审批列表<image :src="listline"></image></view>
-					<view class="right" @click="getMoreFn">查看更多 >></view>
-				</view>
-				<!-- 列表 -->
-				<view>
-					<y-list type='order' :datalist="list" :wtdt="wtdt" @getDetail='getDetail' :adrlist="adrlist" @getDelFn="getDelFn" @gettypeFn="gettypeFn"></y-list>
+				
+				<!-- 管理员 -->
+				<view class="yylists">
+					<view class="yyltab flexcj">
+						<view class="left flexc">待审批列表<image :src="listline"></image></view>
+						<view class="right" @click="getMoreFn">查看更多 >></view>
+					</view>
+					<!-- 列表 -->
+					<view>
+						<y-list type='order' :datalist="list" :wtdt="wtdt" @getDetail='getDetail' :adrlist="adrlist" @getDelFn="getDelFn" @gettypeFn="gettypeFn"></y-list>
+					</view>
 				</view>
-			</view>
+			</template>
+			
 		</view>
 	
 	<footers v-if="isfootflag"  :footerindex="footerindex"></footers>
@@ -177,7 +181,7 @@
 	import yList from "@/components/order/list.vue"
 	import notice from "@/components/swiper/notice.vue"
 	let { calendar } = require("@/components/lunc-calendar/calendar.js");
-	import {getReservatcountl,getReservatList,getReservatDel,getReservatSh} from "@/api/mine/order.js"
+	import {getReservatcountl,getReservatList,getReservatDel,getReservatSh,getYydcCont} from "@/api/mine/order.js"
 	import {getDictionaryFn} from "@/api/mine/register.js"
 	import {getNoticeList} from "@/api/common.js"
 	import {getClockList} from "@/api/mine/work.js"
@@ -235,6 +239,7 @@
 			startDate:'',
 			endDate:'',
 			kaTime:'',
+			conuntinfo:{},
 		}
 	},
 	onPageScroll(e) {
@@ -256,19 +261,17 @@
 				this.marTop=692-Number(this.nvaHeight*2)-16;
 			}
 		})
-		this.getNoticeList()
-		return
 		uni.$on('refreshdatalist',(e) => {
 			this.reachflag=false;
 			this.pageNum=1;
 			this.list=[];
 			this.getDataFn();
-			// this.getcount();
+			this.getcount();
 		})
 		
 		this.init()
 		this.getNoticeList()
-		// this.getcount()
+		this.getcount()
 		
 		uni.getSystemInfo({
 			success: (e) => {
@@ -390,7 +393,7 @@
 						that.pageNum=1;
 						that.list=[];
 						that.getDataFn();
-						// that.getcount();
+						that.getcount();
 					},1500)
 					
 				}else{
@@ -412,7 +415,7 @@
 						that.pageNum=1;
 						that.list=[];
 						that.getDataFn();
-						// that.getcount();
+						that.getcount();
 					},1500)
 					
 				}else{
@@ -465,7 +468,7 @@
 			return year + '-' + month + '-' + day;
 		},
 		getcount(){
-			getReservatcountl().then(res=>{
+			getYydcCont().then(res=>{
 				if(res.code==200){
 					this.conuntinfo=res.data
 				}else{

+ 3 - 4
pages/mine/index.vue

@@ -58,13 +58,13 @@
 					<view class="tit flex1">我的订餐记录</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
-				<view class="flexc mine_list" v-if="checkPermi(['system:reservat:add'])" @click="handleToAddYy" >
+				<!-- <view class="flexc mine_list" v-if="checkPermi(['system:reservat:add'])" @click="handleToAddYy" >
 					<view class="limg">
 						<image :src="listimgf" class="imgc"></image>
 					</view>
 					<view class="tit flex1">访客预约</view>
 					<image :src="rimg" class="rimg"></image>
-				</view>
+				</view> -->
 				<view class="flexc mine_list" @click="handleToSetting">
 					<view class="limg">
 						<image :src="listimgg" class="imga"></image>
@@ -72,7 +72,7 @@
 					<view class="tit flex1">设置</view>
 					<image :src="rimg" class="rimg"></image>
 				</view>
-				
+				<!-- #ifdef APP-PLUS -->
 				<view class="flexc mine_list"@click="onlineWgt">
 					<view class="limg">
 						<image :src="listimgi" class="imga"></image>
@@ -81,7 +81,6 @@
 					 <view  class="txt">{{wgtcode}}</view>
 					 <image :src="rimg" class="rimg"></image>
 				</view>
-				<!-- #ifdef APP-PLUS -->
 				<!-- #endif -->
 				<view class="flexc mine_list" @click="handleLogout">
 					<view class="limg">

+ 3 - 1
pages/order/come.vue

@@ -343,8 +343,10 @@
 			}
 		},
 		clearboth(){
-			// var time=this.datainfo.visitDate
+			var time=this.datainfo.visitDate
 			this.datainfo={};
+			this.datainfo.visitDate=time;
+			this.timeid='';
 			this.adrtype='';
 			
 			// this.getReservatTime(this.changetime)

+ 52 - 12
pages/video/index.vue

@@ -5,7 +5,7 @@
 				<block slot="left">
 					<picker range-key='name' :value="adridx" :range="adrlist"    @change='bindDateChangea'>
 						<view class="chekt">
-							<view class="over">{{address|| "南大门"}}</view>
+							<view class="over">{{address|| ""}}</view>
 							<image :src="upimg"></image>
 						</view>
 					</picker>
@@ -36,11 +36,11 @@
 				</view> -->
 			</view>
 			<view class="openbox flexcj">
-				<view class="btns bga">
+				<view class="btns bga" @click="getOpenFn">
 					<image :src="openimg"></image>
 					开门
 				</view>
-				<view class="btns bgb">
+				<view class="btns bgb" @click="getCloseFn">
 					<image :src="openimg"></image>
 					关门
 				</view>
@@ -87,7 +87,7 @@
 	import self from '@/utils/location.js';
 	import yList from "@/components/order/list.vue"
 	let { calendar } = require("@/components/lunc-calendar/calendar.js");
-	import {getCameraList,getCameraVideo} from "@/api/mine/order.js"
+	import {getCameraList,getCameraVideo,getVideoOpenDz,getVideoCloseDz} from "@/api/mine/order.js"
 	import {column1} from '@/components/zb-table/all.js'
 	import {getDictionaryFn} from "@/api/mine/register.js"
 	import footers from '@/components/footer/footer.vue'
@@ -141,6 +141,7 @@
             windowHeight: '',
             flvPlayer: null,
             player: null,
+			isloading:false,
 		}
 	},
 	onPageScroll(e) {
@@ -161,7 +162,7 @@
 			this.reachflag=false;
 			this.pageNum=1;
 			this.list=[];
-			this.getDataFn();
+			 this.getDataFn();
 		})
 		this.time()
 		this.init()
@@ -196,6 +197,42 @@
 	},
 	methods:{
 		checkPermi, checkRole,
+		getOpenFn(){
+			var that=this
+			if(this.isloading){
+				return
+			}
+			this.isloading=true;
+			var params={
+				equipmentName:this.address
+			}
+			getVideoOpenDz(params).then(res=>{
+				this.isloading=false
+				if(res.code==200){
+					this.$toast('已开门')
+				}
+			}).catch(error=>{
+				this.isloading=false
+			})
+		},
+		getCloseFn(){
+			var that=this
+			if(this.isloading){
+				return
+			}
+			this.isloading=true;
+			var params={
+				equipmentName:this.address
+			}
+			getVideoCloseDz(params).then(res=>{
+				this.isloading=false
+				if(res.code==200){
+					this.$toast('已关门')
+				}
+			}).catch(error=>{
+				this.isloading=false
+			})
+		},
 		time() {
 			var date = new Date();
 			var y = date.getFullYear();
@@ -267,12 +304,15 @@
 		flv_destroy() {
 			console.log(23)
 		    //停止
-		    this.flvPlayer.pause();
-		    this.flvPlayer.unload();
-		    this.flvPlayer.detachMediaElement();
-		    this.flvPlayer.destroy();
-		    this.flvPlayer = null;
-			this.player=null;
+			if(this.flvPlayer){
+				this.flvPlayer.pause();
+				this.flvPlayer.unload();
+				this.flvPlayer.detachMediaElement();
+				this.flvPlayer.destroy();
+				this.flvPlayer = null;
+				this.player=null;
+			}
+		    
 		},
 		flv_seekto() {
 		    // 复制其他人的  我还没用这个
@@ -334,7 +374,7 @@
 		init(){
 			// 设备
 			var params={
-				pageSize:100,
+				pageSize:1000,
 				pageNo: 1,
 			}
 			getCameraList(params).then(res=>{

+ 14 - 6
work/components/ba-tree-picker/ba-tree-pickerfixed.vue

@@ -156,6 +156,7 @@
 				let selectedList = []; //如果子集全部选中,只返回父级 id
 				let selectedNames;
 				let currentLevel = -1;
+				var multiple=this.multiple;//是否多选
 				this.treeList.forEach((item, index) => {
 					// console.log(item,1)
 					if (currentLevel >= 0 && item.level > currentLevel) {
@@ -165,7 +166,7 @@
 						if (item.checkStatus === 2) {
 							// 判断有无子元素
 							currentLevel = item.level;
-							if(item.children&&item.children.length){
+							if(item.children&&item.children.length&&multiple){
 								var children=item.children;
 								
 								children.forEach(ite=>{
@@ -231,12 +232,16 @@
 						childCheckCount: 0,
 						childCheckPCount: 0
 					};
-					if (this.selectedData.indexOf(itemT.id) >= 0) {
-						itemT.checkStatus = 2;
-						itemT.orCheckStatus = 2;
-						itemT.childCheckCount = itemT.children ? itemT.children.length : 0;
-						this._onItemParentSelect(itemT, nextIndex);
+					// console.log(this.selectedData,itemT.id)
+					if(this.selectedData&&this.selectedData.length){
+						if (this.selectedData.indexOf(itemT.id) >= 0) {
+							itemT.checkStatus = 2;
+							itemT.orCheckStatus = 2;
+							itemT.childCheckCount = itemT.children ? itemT.children.length : 0;
+							this._onItemParentSelect(itemT, nextIndex);
+						}
 					}
+					
 
 					this.treeList.splice(nextIndex, 0, itemT);
 					nextIndex++;
@@ -401,6 +406,9 @@
 			localdata() {
 				this._initTree();
 			},
+			selectedData() {
+				this._initTree();
+			},
 			localTreeList() {
 				this.treeList = this.localTreeList;
 			}

+ 11 - 0
work/pages/yyorder/eat.vue

@@ -111,6 +111,7 @@
 				this.datainfo.orderFoodUserId=this.userId;
 				this.datainfo.orderFoodDept=this.deptName;
 				this.datainfo.orderFoodDeptId=this.deptId;
+				this.time()
 			}
 			
 			this.init()
@@ -155,6 +156,16 @@
 					}
 				})
 			},
+			time() {
+				var date = new Date();
+				var y = date.getFullYear();
+				var m = date.getMonth() + 1;
+				var d = date.getDate();
+				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);
+				this.datainfo.orderFoodTime= yearStr
+			},
 			bindTimeChangea(e){
 				var val=e.detail.value;
 				this.datainfo.orderFoodTime=val

+ 3 - 3
work/pages/yyorder/limit.vue

@@ -76,10 +76,10 @@
 			}
 		},
 		onUnload() {
-			uni.$off('refreshfoodlist')
+			uni.$off('refreshlimitlist')
 		},
 		onLoad: function() {
-			uni.$on('refreshfoodlist',(e) => {
+			uni.$on('refreshlimitlist',(e) => {
 				this.getConfirm()
 			})
 			this.init()
@@ -129,7 +129,7 @@
 					id:id,
 					type:'edit'
 				}
-				this.$tab.navigateTo('/work/pages/yyorder/eat?data='+encodeURIComponent(JSON.stringify(obj)))
+				this.$tab.navigateTo('/work/pages/yyorder/limitdetail?data='+encodeURIComponent(JSON.stringify(obj)))
 			},
 			getDetailDay(){
 				this.$tab.navigateTo('/work/pages/yyorder/eatlistday')

+ 48 - 35
work/pages/yyorder/limitdetail.vue

@@ -23,7 +23,7 @@
 							<uni-forms-item label="门禁权限" name="guard">
 								<view class="pickbox" @click="getRecorddwFn">
 									<view class="flexc flex1">
-										<view class="flex1 f14" v-if="datainfo.guard&&!mjtxt">{{statusFormats(datainfo.guard,mjlist,'dblx')}}</view>
+										<view class="flex1 f14" v-if="datainfo.guard&&!mjtxt">{{}}</view>
 										<view class="flex1 f14" v-else :class="mjtxt?'':'coa'">{{mjtxt||"请选择门禁"}}</view>
 										<image :src="hupimg" class="hupimg"></image>
 									</view>
@@ -52,12 +52,12 @@
 				</uni-forms>
 			</view>
 		</view>
-		<!-- 选择担保类型 -->
+		<!-- 选择门禁类型 -->
 		<bartree-pickerfixed ref="treePickerzrdw" deptType='1' :multiple='true' @select-change="selectChangezrdw" title="选择门禁"
-		:localdata="mjlist" :checkVal='datainfo.guard'  valueKey="value" textKey="label" childrenKey="children"></bartree-pickerfixed>
+		:localdata="mjlist" :selectedData="selectedData" :checkVal='datainfo.guard'  valueKey="value" textKey="label" childrenKey="children"></bartree-pickerfixed>
 		<!-- 选择部门 -->
 		<bartree-pickerfixed ref="treePickerbm" deptType='1' :multiple='false' @select-change="selectChangebm" title="选择部门"
-		:localdata="depTree" :checkVal='datainfo.deptName'  valueKey="id" textKey="label" childrenKey="children"></bartree-pickerfixed>
+		:localdata="depTree" :selectedData="selectedDatabm" :checkVal='datainfo.deptName'  valueKey="id" textKey="label" childrenKey="children"></bartree-pickerfixed>
 	</view>
 </template>
 
@@ -90,6 +90,8 @@
 				},
 				mjtxt:'',
 				qylist:[{text:'是',value:'0'},{text:'否',value:'1'}],
+				selectedData:[],
+				selectedDatabm:[],
 				actcolor:'#00A9F0',
 				qyidx:[],
 				sfqy:'',
@@ -112,6 +114,7 @@
 			}
 		},
 		onLoad: function(e) {
+			this.init()
 			if(e.data){
 				var data=JSON.parse(decodeURIComponent(e.data))
 				if(data.type){
@@ -119,14 +122,7 @@
 					this.id=data.id;
 					this.getDetail()
 				}
-			}else{
-				this.datainfo.orderFoodUser=this.name;
-				this.datainfo.orderFoodUserId=this.userId;
-				this.datainfo.orderFoodDept=this.deptName;
-				this.datainfo.orderFoodDeptId=this.deptId;
 			}
-			
-			this.init()
 			// this.getDataFn()
 			uni.getSystemInfo({
 				success: (e) => {
@@ -154,20 +150,27 @@
 				return aite.actions;
 			},
 			statusFormats(ite,list,type){//多选匹配
-				if(ite){
+				if(ite&&list&&list.length){
 					var actions = [];
+					var newArr=[];
 					list.forEach(s => {
-						if(ite.indexOf(s.dictValue)>-1){
-							actions.push(s.dictLabel);
+						if(ite.indexOf(s.value)>-1){
+							actions.push(s.label);
+							// var obj={
+							// 	deptId:s.value,
+							// 	deptName:s.label
+							// }
+							newArr.push(s.value)
 						}
 					})
+					this.selectedData=newArr
 					return actions.join(',')
 				}else{
 					return ''
 				}	
 			},
 			init() {
-				// 就餐类型
+				// 门禁
 				getDictionaryFn('menj').then(res=>{
 					if(res.code==200){
 						this.mjlist = res.data.map(v => {
@@ -203,16 +206,8 @@
 			},
 			selectChangebm(e){
 				var val=e;
-				console.log(e)
-			},
-			bindTimeChangea(e){
-				var val=e.detail.value;
-				this.datainfo.orderFoodTime=val
-			},
-			bindTimeChangeb(e){
-				var val=e.detail.value;
-				this.datainfo.orderFoodType=this.jclxlist[val].value
-				this.jclx=this.jclxlist[val].label
+				this.datainfo.deptId=e[0].deptId
+				this.datainfo.deptName=e[0].deptName
 			},
 			getHeightFn() {
 				let query = uni.createSelectorQuery().in(this);
@@ -234,24 +229,37 @@
 			getSubmit() {
 				var that=this;
 				var params = JSON.parse(JSON.stringify(this.datainfo))
-				if(!params.orderFoodTime){
-					this.$toast("请选择就餐日期")
+				if(!params.personneName){
+					this.$toast("请输入人员姓名")
+					return
+				}
+				if(!params.personnePhone){
+					this.$toast("请输入联系方式")
+					return
+				}
+				if(!this.mjtxt){
+					this.$toast("请选择门禁权限")
+					return
+				}
+				if(!params.deptName){
+					this.$toast("请选择部门")
 					return
 				}
-				if(!this.jclx){
-					this.$toast("请选择就餐类型")
+				let regphone = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
+				if (params.personnePhone && !regphone.test(params.personnePhone)) {
+					that.$toast("请输入正确的手机号")
 					return
 				}
 				uni.showLoading({
 					title:"加载中"
 				})
 				if(this.ptype=='add'){
-					getFoodAdd(params).then(res => {
+					getManagementAdd(params).then(res => {
 						uni.hideLoading()
 						if (res.code == 200) {
-							this.$toast("预约成功")
+							this.$toast("新增成功")
 							setTimeout(function(){
-								uni.$emit('refreshfoodlist')
+								uni.$emit('refreshlimitlist')
 								uni.navigateBack({
 									delta:1
 								})
@@ -261,12 +269,12 @@
 						}
 					})
 				}else{
-					getFoodPut(params).then(res => {
+					getManagementPut(params).then(res => {
 						uni.hideLoading()
 						if (res.code == 200) {
 							this.$toast("修改成功")
 							setTimeout(function(){
-								uni.$emit('refreshfoodlist')
+								uni.$emit('refreshlimitlist')
 								uni.navigateBack({
 									delta:1
 								})
@@ -278,9 +286,14 @@
 				}
 			},
 			getDetail(){
-				getFoodDetail(this.id).then(res=>{
+				getManagementDetail(this.id).then(res=>{
 					if(res.code==200){
 						this.datainfo=JSON.parse(JSON.stringify(res.data))
+						this.mjtxt=this.statusFormats(res.data.guard,this.mjlist)
+						var deptId=res.data.deptId;
+						var newArr=[];
+						newArr.push(deptId)
+						this.selectedDatabm=newArr
 					}
 				})
 			}