19124812874 преди 5 години
родител
ревизия
ec282b6429

+ 11 - 0
assets/colorui/app.css

@@ -202,4 +202,15 @@
 	width: 100%;
 	bottom: 0;
 	left: 0;
+}
+
+.bottom-bar{
+	/* position: fixed;
+	top: 88%; */
+	width: 100%;
+	height: 150rpx;
+	display: flex;
+	flex-direction: row;
+	justify-content: center;
+	padding: 30rpx;
 }

+ 10 - 2
assets/http/api.js

@@ -49,10 +49,12 @@ const wxApi = {
 
 //园区api
 let agencyUrl={
-	page:'/agency/agency/getAgencyList'
+	page:'/agency/agency/getAgencyList',
+	submit:'/agency/agency/submit'
 }
 const agency = {
 	page:p => http.get(agencyUrl.page, {params:p}),
+	submit:p => http.post(agencyUrl.submit, p),
 }
 //区域api
 let residentialUrl={
@@ -101,10 +103,12 @@ let CMS={
 //消防设备
 let fireDeviceUrl={
 	page:'/smartapplication/smartdevice/list',
+	agencyPage:'/smartapplication/smartdevice/getDeviceList',
 	alarmRecord:'/smartapplication/smartdevice/getAlarmRecord'
 }
 let fireDevice={
 	page:p => http.get(fireDeviceUrl.page, {params:p}),
+	agencyPage:p => http.get(fireDeviceUrl.agencyPage, {params:p}),
 	alarmRecord:p => http.get(fireDeviceUrl.alarmRecord, {params:p}),
 }
 //用户反馈
@@ -116,10 +120,14 @@ const feedback = {
 }
 //园区公告
 let noticeUrl={
-	page:'/estate/parknotice/list'
+	page:'/estate/parknotice/list',
+	remove:'/estate/parknotice/remove',
+	submit:'/estate/parknotice/save'
 }
 const notice = {
 	page:p => http.get(noticeUrl.page, {params:p}),
+	remove:p => http.post(noticeUrl.remove+p),
+	submit:p => http.post(noticeUrl.submit, p),
 }
 
 //测温记录

+ 1 - 1
assets/http/service.js

@@ -5,7 +5,7 @@ import Request from '../../utils/my-request/index.js'
 // let baseURL='http://192.168.0.101:9527/'
 //思奇特
 // let baseURL='http://192.168.2.200:9527/'
-
+// let baseURL='http://192.168.2.229:9527/'
 //远程
 // let baseURL='http://139.9.103.171:9527/'
 let baseURL='https://park.58fo.com/api/'

+ 20 - 0
components/pagination/iconfont.css

@@ -0,0 +1,20 @@
+@font-face {font-family: "iconfont";
+  src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALUAAsAAAAABtwAAAKFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCfgqBQIE1ATYCJAMMCwgABCAFhG0HRBsBBhEVjCOyrw7sYPj4I0QqzNq3zfnzDrGGnxGGLSGIJLifI6jWsJ7dDaIDIM/lo6IIVFyEAVaJdC8Ma5KsX18DIvAAvNrML65E6KwwVPnjwadURdk9jquzLCnj43Q3FiERMuvuW6CtkLIwkLa2RJ8WB1673A9cYIWJ1mV/lpeyxOTL57kc310BZdH8QIGltvZ+PiZgggWyN0aRFViUecPYBS/wPoFG/WbFduUD1CvsZYG41DlCfSGsKCxXL9Q27C3iTY369JLe4zX6fPyzHJHUZPZDOxcuwfrP5M0rFXuZ6+WcYIfImEUhdhvTO7JgjKwxXYxyrGnBz/RX/EwCqzgqMxF/nVvdDCahKj2RxFN7NAk8IIEMapPsCjYQvTsQUof9hYqOoxqqWHWbqJ9LAh/W3Mq8UOvnzz9Gr1/8fZwsnhvGHNLy5fPH0Q1H/TAu1g7uN/MIVHJPFhG/fhEIau4W/277/5oK+Govv4JgpdC81J/RE/w9ycCuYshsSy6a2BNb3mx4ojMBhdynmu3v9GO6tmdwNaFeT4akTh+yeqNEoc+iRpNV1KonXkOjGfXhJl3YXpQGTPsACO0+kbR6h6zdQhT6ihq9/lGrPfZotBtdZzYZD33YYmwEe2jfQXfBk2uTQ1x7hWq2DedlEesOedIxKNK8nKvRIy+xYXpRpQgBcXBQgcfQ2gCRw4idpINIPGcZNb0o7YLbHGxhqCFQD7TeAa0TeBQMFofK+68gZWY1uKOuzn8HsYkeHhRS+QCiVvtBdY/yzOSFUhKCAMICB1RgFrKsAMTmWSPUEalhQjI6y5x+NFSdbq91P1DEmrDX5EiRo2g8a/yovQUS5ourYW68Kpg2GwAAAA==') format('woff2')
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-danjiantou:before {
+  content: "\e62d";
+}
+
+.icon-shuangjiantou:before {
+  content: "\e62e";
+}
+

+ 455 - 0
components/pagination/pagination.vue

@@ -0,0 +1,455 @@
+<template>
+	<view class="wyb-pagination-box" :style="{
+		paddingLeft: padding + 'rpx',
+		paddingRight: padding + 'rpx',
+		'--hover': autoHover}">
+		<view class="wyb-pagination-left" :style="{opacity: currentPage === 1 ? 0.5 : 1}">
+			<view
+			 v-if="showFirst"
+			 :class="'wyb-pagination-first-page-' + (showIcon ? 'i' : 't')"
+			 :style="btnStyleStr" 
+			 :hover-class="currentPage === 1 ? '' : 'wyb-pagination-hover'"
+			 @tap="onPageBtnTap('first-page')">
+				<view v-if="showIcon" class="iconfont icon-shuangjiantou left-arrow" />
+				<text v-else>{{firstText}}</text>
+			</view>
+			<view 
+			 :class="'wyb-pagination-prev-page-' + (showIcon ? 'i' : 't')"
+			 :style="btnStyleStr"
+			 :hover-class="currentPage === 1 ? '' : 'wyb-pagination-hover'"
+			 @tap="onPageBtnTap('prev-page')">
+				<view v-if="showIcon" class="iconfont icon-danjiantou left-arrow" />
+				<text v-else>{{prevText}}</text>
+			</view>
+		</view>
+		<view class="wyb-pagination-info" @tap.stop="onInfoTap">
+			<view class="wyb-pagination-num" v-if="!infoClick">
+				<text :style="{color: currentColor}">{{currentPage}}</text>
+				<text class="wyb-pagination-span" :style="{color: pageInfoColor}">/</text>
+				<text :style="{color: pageInfoColor}">{{totalPage}}</text>
+				<text 
+				 v-if="showTotalItem"
+				 class="wyb-pagination-info-total"
+				 :style="{color: RGBChange(pageInfoColor, 0.5, 'light')}">
+					({{totalItems}})
+				</text>
+			</view>
+			<!-- #ifndef MP-WEIXIN || APP-VUE || APP-NVUE || APP-PLUS || APP-PLUS-NVUE -->
+			<view class="wyb-pagination-input" v-else>
+				<input 
+				 type="number" 
+				 v-model="inputPage" 
+				 :onpaste="false"
+				 :focus="infoFocus" 
+				 :value="currentPage"
+				 :style="{color: currentColor}"
+				 :cursor-spacing="cursorSpacing"
+				 @confirm="onInfoConfirm" 
+				 @blur="onInfoBlur" />
+			</view>
+			<!-- #endif -->
+			<!-- #ifdef MP-WEIXIN || APP-VUE || APP-NVUE || APP-PLUS || APP-PLUS-NVUE -->
+			<view class="wyb-pagination-input" v-else>
+				<input 
+				 type="number" 
+				 v-model="inputPage" 
+				 :focus="infoFocus" 
+				 :name="currentPage"
+				 :style="{color: currentColor}"
+				 :cursor-spacing="cursorSpacing"
+				 @confirm="onInfoConfirm" 
+				 @blur="onInfoBlur" />
+			</view>
+			<!-- #endif -->
+		</view>
+		<view class="wyb-pagination-right" :style="{opacity: currentPage === totalPage ? 0.5 : 1}">
+			<view
+			 :class="'wyb-pagination-next-page-' + (showIcon ? 'i' : 't')"
+			 :style="btnStyleStr"
+			 :hover-class="currentPage === totalPage ? '' : 'wyb-pagination-hover'"
+			 @tap="onPageBtnTap('next-page')">
+				<view v-if="showIcon" class="iconfont icon-danjiantou right-arrow" />
+				<text v-else>{{nextText}}</text>
+			</view>
+			<view
+			 v-if="showLast"
+			 :class="'wyb-pagination-last-page-' + (showIcon ? 'i' : 't')"
+			 :style="btnStyleStr"
+			 :hover-class="currentPage === totalPage ? '' : 'wyb-pagination-hover'"
+			 @tap="onPageBtnTap('last-page')">
+				<view v-if="showIcon" class="iconfont icon-shuangjiantou right-arrow" />
+				<text v-else>{{lastText}}</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				currentPage: this.current || 1,
+				inputPage: '',
+				infoClick: false,
+				infoFocus: false
+			}
+		},
+		computed: {
+			totalPage() {
+				return Math.ceil(parseFloat(this.totalItems) / parseFloat(this.pageItems))
+			},
+			autoHover() {
+				if (this.btnStyle.backgroundColor) {
+					return this.RGBChange(this.btnStyle.backgroundColor, 0.1, 'dark')
+				} else {
+					return this.RGBChange('#f8f8f8', 0.05, 'dark')
+				}
+			},
+			btnStyleStr() {
+				let styleStr = ''
+				for (let key in this.btnStyle) {
+					styleStr += `${this.sortFieldMatch(key)}: ${this.btnStyle[key]}; `
+				}
+				return styleStr
+			}
+		},
+		watch: {
+			current(val) {
+				const oPage = this.currentPage
+				if (!Object.is(oPage, val)) {
+					this.currentPage = val
+					this.$emit('change', {
+						type: 'prop-page', 
+						current: this.currentPage,
+					})
+				}
+			}
+		},
+		props: {
+			totalItems: {
+				type: [String, Number],
+				default: 20
+			},
+			pageItems: {
+				type: [String, Number],
+				default: 5
+			},
+			current: {
+				type: Number,
+				default: 1
+			},
+			prevText: {
+				type: String,
+				default: '上一页'
+			},
+			nextText: {
+				type: String,
+				default: '下一页'
+			},
+			firstText: {
+				type: String,
+				default: '首页'
+			},
+			lastText: {
+				type: String,
+				default: '尾页'
+			},
+			pageInfoColor: {
+				type: String,
+				default: '#494949'
+			},
+			currentColor: {
+				type: String,
+				default: '#007aff'
+			},
+			padding: {
+				type: [String, Number],
+				default: 15
+			},
+			btnStyle: {
+				type: Object,
+				default () {
+					return {}
+				}
+			},
+			showIcon: {
+				type: Boolean,
+				default: false
+			},
+			showTotalItem: {
+				type: Boolean,
+				default: false
+			},
+			showFirst: {
+				type: Boolean,
+				default: true
+			},
+			showLast: {
+				type: Boolean,
+				default: true
+			},
+			couldInput: {
+				type: Boolean,
+				default: true
+			},
+			cursorSpacing: {
+				type: Number,
+				default: 0
+			}
+		},
+		methods: {
+			onPageBtnTap(type) {
+				switch (type) {
+					case 'first-page':
+						if (!Object.is(this.currentPage, 1)) {
+							this.currentPage = 1
+							this.$emit('change', {type, current: this.currentPage})
+						}
+						break
+					case 'prev-page':
+						if (!Object.is(this.currentPage, 1)) {
+							this.currentPage--
+							this.$emit('change', {type, current: this.currentPage})
+						}
+						break
+					case 'next-page':
+						if (!Object.is(this.currentPage, this.totalPage)) {
+							this.currentPage++
+							this.$emit('change', {type, current: this.currentPage})
+						}
+						break
+					case 'last-page':
+						if (!Object.is(this.currentPage, this.totalPage)) {
+							this.currentPage = this.totalPage
+							this.$emit('change', {type, current: this.currentPage})
+						}
+						break
+				}
+			},
+			onInfoTap() {
+				if (this.couldInput) {
+					this.infoClick = true
+					this.inputPage = this.currentPage
+					setTimeout(() => {
+						this.infoFocus = true
+					}, 10)
+				}
+			},
+			onInfoConfirm(e) {
+				let input = e.detail.value
+				const oPage = this.currentPage
+				if (parseFloat(input) > this.totalPage) {
+					this.currentPage = this.totalPage
+				} else if (parseFloat(input) < 1) {
+					this.currentPage = 1
+				} else if (input === '') {
+					this.currentPage = oPage
+				} else {
+					this.currentPage = parseFloat(input)
+				}
+				if (!Object.is(oPage, this.currentPage)) {
+					this.$emit('change', {
+						type: 'input-page', 
+						current: this.currentPage,
+					})
+				}
+				this.infoClick = false
+				this.$nextTick(() => {
+					this.infoFocus = false
+				})
+			},
+			onInfoBlur(e) {
+				let input = e.detail.value
+				const oPage = this.currentPage
+				if (parseFloat(input) > this.totalPage) {
+					this.currentPage = this.totalPage
+				} else if (parseFloat(input) < 1) {
+					this.currentPage = 1
+				} else if (input === '') {
+					this.currentPage = oPage
+				} else {
+					this.currentPage = parseFloat(input)
+				}
+				if (!Object.is(oPage, this.currentPage)) {
+					this.$emit('change', {
+						type: 'input-page', 
+						current: this.currentPage,
+					})
+				}
+				this.infoClick = false
+				this.$nextTick(() => {
+					this.infoFocus = false
+				})
+			},
+			RGBChange(color, level, type) {
+				// 判断颜色类型
+				let r = 0,
+					g = 0,
+					b = 0,
+					hasAlpha = false,
+					alpha = 1
+				if (color.indexOf('#') !== -1) {
+					// hex转rgb
+					if (color.length === 4) {
+						let arr = color.split('')
+						color = '#' + arr[1] + arr[1] + arr[2] + arr[2] + arr[3] + arr[3]
+					}
+					let color16List = [color.substring(1, 3), color.substring(3, 5), color.substring(5, 7)]
+					r = parseInt(color16List[0], 16)
+					g = parseInt(color16List[1], 16)
+					b = parseInt(color16List[2], 16)
+
+				} else {
+					hasAlpha = color.indexOf('a') !== -1
+					let root = color.slice()
+					let idx = root.indexOf('(') + 1
+					root = root.substring(idx)
+					let firstDotIdx = root.indexOf(',')
+					r = parseFloat(root.substring(0, firstDotIdx))
+					root = root.substring(firstDotIdx + 1)
+					let secondDotIdx = root.indexOf(',')
+					g = parseFloat(root.substring(0, secondDotIdx))
+					root = root.substring(secondDotIdx + 1)
+					if (hasAlpha) {
+						let thirdDotIdx = root.indexOf(',')
+						b = parseFloat(root.substring(0, thirdDotIdx))
+						alpha = parseFloat(root.substring(thirdDotIdx + 1))
+					} else {
+						b = parseFloat(root)
+					}
+				}
+
+				let rgbc = [r, g, b]
+				// 减淡或加深
+				for (var i = 0; i < 3; i++)
+					type === 'light' ? rgbc[i] = Math.floor((255 - rgbc[i]) * level + rgbc[i]) : rgbc[i] = Math.floor(rgbc[i] * (1 -
+						level))
+
+				if (hasAlpha) {
+					return `rgba(${rgbc[0]}, ${rgbc[1]}, ${rgbc[2]}, ${alpha})`
+				} else {
+					return `rgb(${rgbc[0]}, ${rgbc[1]}, ${rgbc[2]})`
+				}
+			},
+			sortFieldMatch(field) {
+				const stringArray = field.split('')
+				let newField = field
+				stringArray.forEach(t => {
+					if (/[A-Z]/.test(t)) {
+						newField = field.replace(t, `-${t.toLowerCase()}`)
+					}
+				})
+				return newField
+			}
+		}
+	}
+</script>
+
+<style>
+	@import 'iconfont.css';
+	.wyb-pagination-box {
+		width: 100%;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		box-sizing: border-box;
+		justify-content: space-between;
+		flex-wrap: nowrap;
+	}
+	
+	.wyb-pagination-left {
+		flex: 1;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		flex-wrap: nowrap;
+		justify-content: flex-start;
+	}
+	
+	.wyb-pagination-right {
+		flex: 1;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		flex-wrap: nowrap;
+		justify-content: flex-end;
+	}
+
+	.wyb-pagination-first-page-t,
+	.wyb-pagination-prev-page-t,
+	.wyb-pagination-next-page-t,
+	.wyb-pagination-last-page-t {
+		font-size: 27rpx;
+		padding: 14rpx 25rpx;
+		box-sizing: border-box;
+		background-color: #f8f8f8;
+		border: 1px solid #e5e5e5;
+		white-space: nowrap;
+	}
+	
+	.wyb-pagination-first-page-i,
+	.wyb-pagination-prev-page-i,
+	.wyb-pagination-next-page-i,
+	.wyb-pagination-last-page-i {
+		font-size: 27rpx;
+		padding: 14rpx 33rpx;
+		box-sizing: border-box;
+		background-color: #f8f8f8;
+		border: 1px solid #e5e5e5;
+		white-space: nowrap;
+	}
+
+	.wyb-pagination-first-page-t,
+	.wyb-pagination-first-page-i {
+		margin-right: 15rpx;
+	}
+
+	.wyb-pagination-last-page-t,
+	.wyb-pagination-last-page-i {
+		margin-left: 15rpx;
+	}
+
+	.wyb-pagination-info {
+		font-size: 33rpx;
+		white-space: nowrap;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		flex: 1;
+	}
+	
+	.wyb-pagination-input input {
+		text-align: center;
+	}
+
+	.wyb-pagination-span {
+		margin: 0 2rpx;
+	}
+	
+	.wyb-pagination-info-total {
+		margin-left: 10rpx;
+	}
+	
+	.wyb-pagination-first-page-t:active,
+	.wyb-pagination-prev-page-t:active,
+	.wyb-pagination-next-page-t:active,
+	.wyb-pagination-last-page-t:active,
+	.wyb-pagination-first-page-i:active,
+	.wyb-pagination-prev-page-i:active,
+	.wyb-pagination-next-page-i:active,
+	.wyb-pagination-last-page-i:active {
+		background-color: var(--hover) !important;
+	}
+	
+	.left-arrow {
+		transform: scale(0.9);
+		margin-right: 5rpx;
+	}
+	
+	.right-arrow {
+		margin-left: 5rpx;
+		transform: scale(0.9) rotate(180deg);
+		-webkit-transform: scale(0.8) rotate(180deg);
+	}
+</style>

+ 11 - 1
main.js

@@ -26,7 +26,8 @@ Vue.prototype.$cache = simpleCache
 //登陆类型
 Vue.prototype.$loginType={
 	STAFF:'staff',
-	ENTERPRISE:'enterprise'
+	ENTERPRISE:'enterprise',
+	AGENCY:'agency'
 }
 //设备类型【通过前缀查找】
 Vue.prototype.$device_prefix={
@@ -62,6 +63,15 @@ Vue.prototype.$showModel = (content,isShowCancel=true,title='提示',)=>{
         });
     })
 }
+//封装提示框
+Vue.prototype.$showToast=function(title,type,position){
+	this.$refs.uToast.show({
+		title: title,
+		position:position||'top',
+		type: type ||'success'
+	})
+}
+
 //是否认证登陆
 Vue.prototype.$isAuth=()=>{
 	return simpleCache.get('loginType')

+ 38 - 12
pages.json

@@ -230,18 +230,6 @@
                 "enablePullDownRefresh": false
             }
             
-        }
-        ,{
-            "path" : "pages/index/staff-temperature/staff-temperature",
-			"name" :"staff-temperature",
-            "style" :                                                                                    
-            {
-				"navigationBarTextStyle":"white",
-				"navigationBarBackgroundColor":"#59a5f0",
-				"navigationBarTitleText": "员工测温",
-				"enablePullDownRefresh": false
-            }
-            
         }
         ,{
             "path" : "pages/index/staff-temperature/detail",
@@ -322,6 +310,44 @@
             }
             
         }
+        ,{
+            "path" : "pages/index/agency/agency",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "园区信息",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/index/notice/list",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "公告管理",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/index/notice/add",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "发布公告",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/index/staff-temperature/list",
+            "style" :                                                                                    
+            {
+               "navigationBarTextStyle":"white",
+               "navigationBarBackgroundColor":"#59a5f0",
+               "navigationBarTitleText": "测温记录",
+               "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"tabBar": {
 		  "list": [

+ 0 - 4
pages/auth/auth.vue

@@ -425,9 +425,6 @@
 				this.model.agencyName=this.ganderSelectList[this.ganderSelectIndex].agencyName
 				this.model.agencyId=this.ganderSelectList[this.ganderSelectIndex].id
 				//加载区域
-				
-				
-				
 				this.fetchResidentialList(this.model.agencyId)
 			},
 		//园区 end
@@ -476,7 +473,6 @@
 				this.model.residentialName=this.residentialSelectList[this.residentialSelectIndex].name
 				this.model.residentialId=this.residentialSelectList[this.residentialSelectIndex].id
 				//加载区域下的企业
-				
 				this.fetchEnterpriseList(this.residentialId)
 			},
 		//区域 end

+ 166 - 0
pages/index/agency/agency.vue

@@ -0,0 +1,166 @@
+<template>
+	<view>
+		<swiper   class="screen-swiper square-dot "  :indicator-dots="true" :circular="true"
+		 :autoplay="true" interval="5000" duration="500">
+			<swiper-item v-for="(item,index) in bannerList" :key="index">
+				<image   :src="item.image" mode="aspectFill" ></image>
+			</swiper-item>
+		</swiper>
+		
+		<view class="card">
+			<view class="flex flex-direction justify-center padding-left-20">
+				<text class="text-bold  text-lg" style="padding-bottom: 12rpx;">{{detail.agencyName}}</text>
+			</view>
+		</view>
+		<view class="bg-white text-black">
+			<text class="text-lg text-bold " style="padding:0 30rpx;">其他信息</text>
+			<view class="cu-list menu text-df padding-top-20">
+				<view class="cu-item">
+					<view class="content">
+						<text class="cuIcon-profile" style="font-size: 32rpx;"></text>
+						<text class="">法定代表人</text>
+					</view>
+					<view class="action">
+						<text>{{detail.personName}}</text>
+					</view>
+				</view>
+				
+				<view class="cu-item">
+					<view class="content">
+						<text class="cuIcon-mobile" style="font-size: 32rpx;"></text>
+						<text class="">联系方式</text>
+					</view>
+					<view class="action">
+						<text>{{detail.personPhone}}</text>
+					</view>
+				</view>
+				<view class="cu-item flex">
+					<view class="content" style="flex-basis: 45%;">
+						<text class="cuIcon-location" style="font-size: 32rpx;"></text>
+						<text class="">公司地址</text>
+					</view>
+					<view class="action">
+						<text>{{detail.address}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id:this.$cache.get('agency'),
+				detail:{},
+				bannerList: [],
+			}
+		},
+		onLoad() {
+			this.fetchDeatil()
+			this.fetchStaticData()
+		},
+		methods: {
+			fetchDeatil(){
+				this.$api.agency.page({id:this.id}).then(res=>{
+					this.detail=res.data[0]
+				})
+			},
+			fetchStaticData(){
+				this.bannerList=[
+					{
+					  'image': "http://139.9.103.171:1888/miniofile/xlyq/banner01.jpg"
+					},
+				]
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #FFFFFF;
+	}
+	
+	.card{
+		padding: 20rpx;
+		background-color: #FFFFFF;
+		margin: 10rpx;
+		border-radius: 10rpx;
+		display: flex;
+		box-shadow: 0 10rpx rgba(248, 248, 248,.9) , -10rpx 0rpx rgba(248, 248, 248,.9) ,10rpx 0rpx rgba(248, 248, 248,.9);
+		image{
+			border: 1rpx solid #f1f1f1;
+			width:100rpx;
+			height: 100rpx;
+			border-radius: 50%;
+		}
+	}
+	
+	.desc{
+		background-color: #FFFFFF;
+		padding:40rpx 30rpx;
+		.sub-title{
+			padding-top: 40rpx;
+			font-size: 28rpx;
+			line-height: 50rpx;
+		}
+	}
+	
+	.history{
+		background-color: #FFFFFF;
+		margin-top: 20rpx;
+		padding: 40rpx 20rpx 20rpx 50rpx;
+	}
+	
+	.top{
+		padding-bottom: 30rpx;
+		display: flex;
+		justify-content: space-between;
+	}
+	
+	.address{
+		margin-top: 20rpx;
+		background-color: #FFFFFF;
+		padding: 30rpx;
+		
+		
+		.item{
+			padding-top: 40rpx;
+			.sub-address{
+				padding-left: 70rpx;font-size: 26rpx;color: #bababa;
+			}
+		}
+	}
+	
+	
+	.u-node {
+			width: 44rpx;
+			height: 44rpx;
+			border-radius: 100rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			background: #d0d0d0;
+		}
+		
+		.u-order-title {
+			color: #333333;
+			font-weight: bold;
+			font-size: 32rpx;
+		}
+		
+		.u-order-desc {
+			padding-top: 20rpx;
+			color: #8d8d8d;
+			font-size: 26rpx;
+			line-height: 48rpx;
+			margin-bottom: 6rpx;
+		}
+		
+		.u-order-time {
+			color: rgb(200, 200, 200);
+			font-size: 26rpx;
+		}
+</style>

+ 29 - 12
pages/index/fire/list/item.vue

@@ -25,7 +25,7 @@
 				mescroll: null, // mescroll 对象
 				// 上拉配置参数
 				up: {
-					noMoreSize: 5, 
+					noMoreSize: 2, 
 					auto: true,
 					page: {
 						page: 0,
@@ -63,15 +63,26 @@
 				this.mescroll = mescroll
 			},
 			/**
+			 * 企业通过 page接口查询,园区通过agencyPage接口查询
+			 * 烟感和燃气通过设备前缀查询
+			 * 消防栓通过设备类型查询
 			 * @param {Object} mescroll 上拉回调
 			 */
-			upFn(mescroll) {
+			async upFn(mescroll) {
 				let that=this
+				let loginType=this.$cache.get('loginType')
 				let params={
-					creditCode:this.$cache.get('creditCode'),	//公司统一信用代码
 					current:mescroll.num,
 					size:mescroll.size,
 				}
+				if (loginType==this.$loginType.ENTERPRISE) {
+					//公司统一信用代码
+					params.creditCode=this.$cache.get('creditCode')
+				}else if (loginType==this.$loginType.AGENCY) {
+					//园区tenantId
+					params.tenantId=this.$cache.get('agencyTenantId')
+				}
+				
 				if (this.fireType==0) {
 					//烟感报警
 					params.prefix=this.$device_prefix.SMOKE
@@ -82,19 +93,25 @@
 					//消防水压
 					params.deviceType=this.$device_type.FIRE_HYDRANT
 				}
-				
 				if (!this.$isEmpty(this.item.value)) {
 					params.deviceStatus=this.item.value	//设备状态
 				}
 				try{
-					this.$api.fireDevice.page(params).then(res=>{
-						let data=res.data.records
-						let length=data.length
-						let total=res.data.total
-						mescroll.endBySize(length, total);
-						if(mescroll.num == 1) that.list = []; //如果是第一页需手动制空列表
-						that.list=that.list.concat(data); //追加新数据
-					})
+					let res=null;
+					if (loginType==this.$loginType.ENTERPRISE) {
+						//企业设备接口
+						res=await this.$api.fireDevice.page(params)
+					}else if (loginType==this.$loginType.AGENCY) {
+						//园区设备接口
+						res=await this.$api.fireDevice.agencyPage(params)
+					}
+					let data=res.data.records
+					let length=data.length
+					let total=res.data.total
+					mescroll.endBySize(length, total);
+					if(mescroll.num == 1) that.list = []; //如果是第一页需手动制空列表
+					that.list=that.list.concat(data); //追加新数据
+					
 				}catch(e){
 					mescroll.endErr();
 				}

+ 2 - 8
pages/index/fire/list/list.vue

@@ -33,7 +33,7 @@
 				fireType:0,
 				//是否第一次进入页面
 				isfirst:false,
-				//动态让item主动刷新
+				//让item主动刷新
 				refresh:false,
 				scrollLeft:0,
 				current: 0,
@@ -63,12 +63,7 @@
 			}
 		},
 		onShow(){
-			if (this.isfirst) {
-				this.isfirst=false
-			}else{
-				//刷新列表
-				this.refresh=!this.refresh
-			}
+			
 		},
 		onLoad(options) {
 			this.fireType=options.fireType || 0
@@ -82,7 +77,6 @@
 				    title: '消防栓'
 				});
 			}
-			this.isfirst=true
 		},
 		methods:{
 			tabChange(index) {

+ 34 - 12
pages/index/index.vue

@@ -47,7 +47,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="bg-white" v-if="loginType=='enterprise'">
+			<view class="bg-white" v-if="loginType!='staff'">
 				<view  style="padding: 30rpx 30rpx 0 30rpx; ">
 					<text class="cuIcon-titles text-blue"></text>
 					<text class="text-bold text-lg">消防服务</text>
@@ -163,6 +163,8 @@ export default {
 					getApp().globalData.userInfo=res.data
 					this.$cache.put("residentialId",res.data.residentialId)
 				})
+		   }else if (this.loginType==this.$loginType.AGENCY) {
+				this.gander=this.$cache.get('agency')
 		   }
 		},
 		/**
@@ -170,12 +172,14 @@ export default {
 		 */
 		fetchWaitAuditNum(){
 			let that=this
-			let obj={
-				enterpriseId:this.$cache.get('enterpriseId'),
-				size:300,
+			let params={
+				size:99,
 				examine:0
 			}
-			this.$api.enterprisestaff.page(obj).then(res=>{
+			if (this.loginType==this.$loginType.ENTERPRISE) {
+				params.enterpriseId=this.$cache.get('enterpriseId')
+			}
+			this.$api.enterprisestaff.page(params).then(res=>{
 				if (!that.$isEmpty(res.data.records)) {
 					that.elements.forEach(item=>{
 						if (item.url=='/pages/index/staffAudit/list') {
@@ -247,7 +251,16 @@ export default {
 					icon: '../../static/index/gander/qiye.png',
 					url:'/pages/company/company',
 					count:0,
-					show:true
+					show:this.loginType!=this.$loginType.AGENCY
+				},
+				{
+					title: '园区信息',
+					name: 'Campus information',
+					color: '#f9f4f1',
+					icon: '../../static/index/gander/qiye.png',
+					url:'/pages/index/agency/agency',
+					count:0,
+					show:this.loginType==this.$loginType.AGENCY
 				},
 				{
 					title: '我的资料',
@@ -266,25 +279,25 @@ export default {
 					icon: '../../static/index/gander/renzheng.png',
 					url:'/pages/index/staffAudit/list',
 					count:0,
-					show:this.loginType==this.$loginType.ENTERPRISE
+					show:this.loginType!=this.$loginType.STAFF
 				},
 				{
 					title: '我的测温',
 					name: 'My temperature',
 					color: '#f0f3ff',
 					icon: '../../static/index/gander/cewen1.png',
-					url:'/pages/index/my-temperature/my-temperature',
+					url:'/pages/index/staff-temperature/list',
 					count:0,
 					show:this.loginType==this.$loginType.STAFF
 				}, 
 				{
-					title: '员工测温',
+					title: '测温记录',
 					name: 'Staff temperature',
 					color: '#f0f3ff',
 					icon: '../../static/index/gander/cewen1.png',
-					url:'/pages/index/staff-temperature/staff-temperature',
+					url:'/pages/index/staff-temperature/list',
 					count:0,
-					show:this.loginType==this.$loginType.ENTERPRISE
+					show:this.loginType!=this.$loginType.STAFF
 				}, 
 				{
 					title: '通行记录',
@@ -294,13 +307,22 @@ export default {
 					url:'/pages/index/access-record/access-record',
 					count:0,
 					show:true
+				},
+				{
+					title: '公告管理',
+					name: 'Notice managerment',
+					color: '#eaebf9',
+					icon: '../../static/index/gander/notice.png',
+					url:'/pages/index/notice/list',
+					count:0,
+					show:this.loginType==this.$loginType.AGENCY
 				}
 			]
 			this.fireList=[
 				{
 					title: '烟感报警',
 					name: 'Smoke alarm',
-					color: '#f2f0fd',
+					color: '#e5f0f5',
 					icon: '../../static/index/fire/yangan.png',
 					url:"/pages/index/fire/list/list?fireType=0"
 				},

+ 68 - 0
pages/index/notice/add.vue

@@ -0,0 +1,68 @@
+<template>
+	<view class="">
+		<u-toast ref="uToast"/>
+		<view class="content">
+			<u-form :model="model"  label-position="top" ref="uForm">
+				<u-form-item :required="true" label="公告标题">
+					<u-input :border="true" v-model="model.title" placeholder="请输入公告标题"/>
+				</u-form-item>
+				<u-form-item  :required="true" label="公告内容">
+					<u-input :border="true" type="textarea" height="500" placeholder="请输入公告内容" v-model="model.notice" />
+				</u-form-item>
+			</u-form>
+		</view>
+		<view @click="confirm" class="bottom-bar" style="position: fixed;bottom:40rpx;">
+			<view class="cu-btn bg-blue radius" style="width: 80%;height: 84rpx;">
+				提交
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				model:{}
+			}
+		},
+		methods: {
+			confirm(){
+				let agencyId=this.$cache.get('agencyId')
+				if (this.$isEmpty(agencyId)) {
+					this.$showToast('系统错误','error')
+					return
+				}
+				if (this.$isEmpty(this.model.title)) {
+					this.$showToast('请输入标题','error')
+					return
+				}
+				if (this.$isEmpty(this.model.notice)) {
+					this.$showToast('请输入内容','error')
+					return
+				}
+				this.model.agencyId=agencyId
+				this.$api.notice.submit(this.model).then(res=>{
+					if (res.success) {
+						this.$showModel('发布成功',false).then(res=>{
+							uni.navigateBack({
+								delta:1
+							})
+						})
+					}else{
+						this.$showToast('发布失败')
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #FFFFFF;
+	}
+	.content{
+		padding: 30rpx;
+	}
+</style>

+ 161 - 0
pages/index/notice/list.vue

@@ -0,0 +1,161 @@
+<template>
+	<view>
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view @click="goDetail(item)" class="card" v-for="(item,index) in dataList" :key="index">
+				<view class="title">
+					<view class="text-cut-1">
+						<text class="text-bold">标题:</text>
+						<text class="">{{item.title}}</text>
+					</view>
+					<view class="time">
+						<text class="cuIcon-time padding-right-10"></text>
+						<text>{{new Date(item.createTime).getTime() | date('yyyy-mm-dd') }}</text>
+					</view>
+				</view>
+				<view class="content  ">
+					<text class="text-cut-2">{{item.notice | formatHtml}}</text>
+				</view>
+				<view class="bottom">
+					<view @click.stop="delItem(item)" class="cu-btn line-red round sm">
+						<u-icon top="-1" name="trash-fill" size="25"></u-icon>
+						<text class="padding-left-10">删除公告</text>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+		<view @click="add" style="position: fixed;bottom: 25%;right: 20rpx;">
+			<view class="cuIcon cu-btn bg-blue" style="width: 80rpx;height: 80rpx;">
+				<text class="cuIcon-add" style="font-size: 60rpx;"></text>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
+	export default {
+		mixins:[MescrollMixin],
+		data() {
+			return {
+				agencyId:'',
+				isFirst:false,
+				
+				dataList:[],
+				downOption: { 
+					use: true,
+					auto: false
+				},
+				upOption: {
+					auto: false,
+					page: {
+						page: 0,
+						size: 10
+					},
+					noMoreSize: 3, 
+					empty: {
+						tip: '暂无相关数据'
+					}
+				},
+			}
+		},
+		filters: {
+			formatHtml (str) {
+				return str.replace(/<[^>]+>/g, "");
+			}
+		},
+		onShow() {
+			this.mescroll.resetUpScroll()
+		},
+		onLoad() {
+		},
+		methods: {
+			goDetail(item){
+				getApp().globalData.noticeDetail=item
+				uni.navigateTo({
+					url:"/pages/index/notice/detail",
+				})
+			},
+			delItem(item){
+				let params="?ids="+item.id
+				this.$showModel('确定要删除该公告吗?').then(res=>{
+					this.$api.notice.remove(params).then(res=>{
+						if (res.success) {
+							this.$showModel('删除成功',false).then(res=>{
+								this.mescroll.resetUpScroll()
+							})
+						}else{
+							this.$showToast('删除失败','error')
+						}
+					})
+				})
+			},
+			add(){
+				uni.navigateTo({
+					url:"/pages/index/notice/add"
+				})
+			},
+			/**
+			 * 下拉回调
+			 */
+			downCallback(){
+				setTimeout(()=>{
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+			/**
+			 * 上拉回调
+			 * @param {Object} mescroll
+			 */
+			upCallback(mescroll) {
+				try{
+					let params={
+						agencyId:this.$cache.get('agencyId'),
+						current:mescroll.num,
+						size:mescroll.size
+					}
+					this.$api.notice.page(params).then(res=>{
+						let data=res.data.records
+						let length=data.length
+						let total=res.data.total
+						mescroll.endBySize(length, total);
+						if(mescroll.num == 1) this.dataList = []; 
+						this.dataList=this.dataList.concat(data); 
+					})
+				}catch(e){
+					mescroll.endErr();
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.card{
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		margin: 20rpx;
+		.title{
+			display: flex;
+			justify-content: space-between;
+			padding: 20rpx;
+			font-size: 30rpx;
+			border-bottom: 0.5rpx solid  #e6e5e8;
+			
+			.time{
+				padding-top: 8rpx;
+				font-size: 28rpx;
+				color: #8d8d8d;
+			}
+		}
+		.content{
+			height: 150rpx;
+			padding:30rpx 20rpx;
+			border-bottom: 1rpx dashed  #e6e5e8;
+		}
+		
+		.bottom{
+			padding: 20rpx;
+			display: flex;
+			justify-content: flex-end;
+		}
+	}
+</style>

+ 2 - 2
pages/index/notice/notice.vue

@@ -120,13 +120,13 @@
 				// 此处用到 ES6 的 Promise 知识,不懂的请自行学习。
 				return new Promise((done,fail)=>{
 					// 无数据请求接口,由 setTimeout 模拟,正式项目替换为 ajax 即可。
-					
 					setTimeout(()=>{
 						let params={
 							agencyId:that.$cache.get('agencyId')
 						}
 						that.$api.notice.page(params).then(res=>{
-							done(res.data.records);
+							let data=res.data.records
+							done(data.reverse());
 						})
 					},800);
 				})

+ 66 - 0
pages/index/staff-temperature/card.vue

@@ -0,0 +1,66 @@
+<template>
+	<view class="">
+		<view  v-for="(item,index) in list" :key="index"  @click="goDetail(item)" class="mine_order_statue" >
+			<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
+				<view class="flex">
+					<image  :src="item.faceUrl"  ></image>
+					<view  class="flex flex-direction justify-around padding-left-30">
+						<view class="">
+							<text class="text-bold">姓名:</text>
+							<text>{{item.personName}}</text>
+						</view>
+						<view class="">
+							<text class="text-bold">温度:</text>
+							<text>{{item.temperature}} ℃ </text>
+						</view>
+						<view class="">
+							<text class="text-bold">测温时间:</text>
+							<text>{{item.recogTime}}</text>
+						</view>
+					</view>
+				</view>
+				<view class="flex align-center justify-center">
+					<text class="cuIcon-right"></text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props:{
+		list:Array
+	},
+	data() {
+		return {
+			
+		};
+	},
+	onLoad() {
+		
+	},
+	methods:{
+		goDetail(item){
+			getApp().globalData.staffTemperature=item
+			uni.navigateTo({
+				url:"/pages/index/staff-temperature/detail"
+			})
+		},
+	}
+};
+</script>
+
+<style lang="scss">
+	.mine_order_statue {
+		margin: 18upx 14upx 0;
+		background: #fff;
+		padding: 10upx 20upx;
+		border-radius: 20rpx;
+		image{
+			background-color: #FFFFFF;
+			width: 160rpx;
+			height: 160rpx;
+		}
+	}
+</style>

+ 118 - 0
pages/index/staff-temperature/item.vue

@@ -0,0 +1,118 @@
+<template>
+	<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+		<card  :list="list" ></card>
+	</MeScroll>
+</template>
+<script>
+	import MeScroll from '@/components/mescroll-body/mescroll-uni.vue'
+	import card from './card.vue'
+	var app=getApp()
+	export default {
+		components:{
+			MeScroll,card
+		},
+		props: {
+			type: Number,
+			i: Number,
+			item:Object
+		},
+		data() {
+			return {
+				loginType:'',
+				
+				isInit: false, // 是否初始化
+				list: [], // 列表数据
+				mescroll: null, // mescroll 对象
+				// 上拉配置参数
+				up: {
+					noMoreSize: 2, 
+					auto: true,
+					page: {
+						page: 0,
+						size: 10
+					}
+				},
+				// 下拉配置参数
+				down: {
+					use: true, 
+					auto: false
+				}
+			}
+		},
+		watch:{
+			type(val) {
+				if(!this.isInit && val === this.i) {
+					this.mescroll.resetUpScroll()
+				}
+			}
+		},
+		mounted() {
+			if(!this.isInit && this.i === 0) {
+				this.mescroll.resetUpScroll()
+			}
+		},
+		created() {
+			this.loginType=this.$cache.get('loginType')
+		},
+		methods: {
+			/**
+			 * @param {Object} mescroll 初始化组件
+			 */
+			initMeScroll(mescroll) {
+				this.mescroll = mescroll
+			},
+			/**
+			 * @param {Object} mescroll 上拉回调
+			 */
+			upFn(mescroll) {
+				let params={
+					current:mescroll.num,
+					size:mescroll.size
+				}
+				if (!this.$isEmpty(this.item.value)) {
+					params.age=100
+				}
+				if (this.loginType==this.$loginType.AGENCY) {
+					//园区登陆
+					let tenantId=this.$cache.get('agencyTenantId')
+					params.tenantId=tenantId
+				}else if (this.loginType==this.$loginType.ENTERPRISE) {
+					//企业
+					let creditCode=this.$cache.get('creditCode')
+					params.enterpriseCreditCode=creditCode
+				}else if (this.loginType==this.$loginType.STAFF) {
+					//员工
+					let phone=this.$cache.get('phone')
+					params.phone=phone
+				}
+				
+				try{
+					this.$api.temperatureRecord.page(params).then(res=>{
+						let data=res.data.records
+						let length=data.length
+						let total=res.data.total
+						mescroll.endBySize(length, total);
+						if(mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
+						this.list=this.list.concat(data); //追加新数据
+					})
+				}catch(e){
+					mescroll.endErr();
+				}
+			},
+			/**
+			 * 下拉回调
+			 * */
+			downFn(mescroll) {
+				setTimeout(()=>{
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	view{
+		box-sizing: border-box;
+	}
+</style>

+ 100 - 0
pages/index/staff-temperature/list.vue

@@ -0,0 +1,100 @@
+<template>
+	<view class="container">
+		<view class="tabs" style="width: 420rpx;margin: 0rpx  auto;padding-top: 20rpx;">
+			<scroll-view scroll-x class="nav" >
+				<view class="flex text-center">
+					<view  style="border: 1rpx solid #59a5f0;padding:15rpx 20rpx;" class="flex-sub" 
+					:class="index==current?'nav-checked':'nav-unchecked'" 
+					v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
+						{{item.name}}
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+		<view style="height: 100%;">
+			<swiper style="height: 100%;" :current="current"  @change="swiperChange"
+				@animationfinish="animationfinish">
+				<swiper-item >
+					<scroll-view scroll-y style="height: 100%;">
+						<item  :i="0" :item="tabs[0]" :type="0"></item>
+						<!-- <item  :i="index" :item="item" :type="current"></item> -->
+					</scroll-view>
+				</swiper-item>
+				<swiper-item>
+					<scroll-view scroll-y style="height: 100%;">
+						<u-empty marginTop="-100"  text="暂无异常记录" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</view>
+	</view>
+</template>
+<script>
+	import item from "./item.vue"
+	export default {
+		components: {
+			item
+		},
+		data() {
+			return {
+				scrollLeft:0,
+				current: 0,
+				swiperCurrent:0,
+				tabs: [
+					{
+						name: '全部记录',
+						value:''
+					},
+					{
+						name: '异常记录',
+						value:1
+					}
+				],
+			}
+		},
+		methods:{
+			tabChange(index) {
+				this.current = index
+			},
+			swiperChange(e) {
+			  uni.pageScrollTo({
+			      scrollTop: 0,
+			      duration: 0
+			  });
+			  this.current = e.detail.current
+			},
+			animationfinish({detail: { current }}) {
+				this.swiperCurrent = current;
+				this.current = current;
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		  height: calc(100vh);
+		  background-color: #F6F6F6;
+		  padding: 100rpx 0rpx 0rpx;
+		 .tabs {
+			 height: 100rpx;
+		    position: fixed;
+		    top: 0rpx;
+			left: 0;
+			right: 0;
+			width: 100%;
+			z-index: 3;
+		  }
+	}
+	
+	.nav-checked{
+		background-color: #59a5f0;
+		color: #FFFFFF;
+		font-weight: 800;
+	}
+	
+	.nav-unchecked{
+		background-color: #FFFFFF;
+		color: #59a5f0;
+	}
+</style>

+ 0 - 189
pages/index/staff-temperature/staff-temperature.vue

@@ -1,189 +0,0 @@
-<template>
-	<view class="container">
-		<view class="tabs" style="width: 420rpx;margin: 0rpx  auto;padding-top: 20rpx;">
-			<scroll-view scroll-x class="nav" >
-				<view class="flex text-center">
-					<view  style="border: 1rpx solid #59a5f0;padding:15rpx 20rpx;" class="flex-sub" :class="index==subsectionCurrent?'nav-checked':'nav-unchecked'" v-for="(item,index) in subsectionList" :key="index" @tap="subsectionChange(index)" >
-						{{item.name}}
-					</view>
-				</view>
-			</scroll-view>
-		</view>
-		<view style="height: 100%;">
-			<swiper style="height: 100%;" :current="subsectionCurrent"  @change="swiperChange"
-				@animationfinish="animationfinish">
-				<swiper-item >
-					<scroll-view scroll-y style="height: 100%;">
-						<view class="" v-if="!this.$isEmpty(dataList)">
-							<view v-for="(item,index) in dataList" :key="index"  @click="goDetail(item)" class="mine_order_statue" >
-								<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
-									<view class="flex">
-										<image  :src="item.faceUrl"  ></image>
-										<view  class="flex flex-direction justify-around padding-left-30">
-											<view class="">
-												<text class="text-bold">姓名:</text>
-												<text>{{item.personName}}</text>
-											</view>
-											<view class="">
-												<text class="text-bold">温度:</text>
-												<text>{{item.temperature}} ℃ </text>
-											</view>
-											<view class="">
-												<text class="text-bold">测温时间:</text>
-												<text>{{item.recogTime}}</text>
-											</view>
-										</view>
-									</view>
-									<view class="flex align-center justify-center">
-										<text class="cuIcon-right"></text>
-									</view>
-								</view>
-							</view>
-							<u-divider bgColor="#f1f1f1" height="80">到底了</u-divider>
-						</view>
-						<u-empty v-else marginTop="-100"  text="暂无记录" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
-					</scroll-view>
-				</swiper-item>
-				<swiper-item >
-					<scroll-view scroll-y style="height: 100%;">
-						<u-empty marginTop="-100"  text="暂无异常记录" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
-					</scroll-view>
-				</swiper-item>
-			</swiper>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		components:{
-		},
-		data() {
-			return {
-				subsectionCurrent:0,
-				swiperCurrent:0,
-				subsectionList:[
-					{
-						name: '全部记录'
-					},
-					{
-						name: '异常记录'
-					}
-				],
-				dataList:[]
-				
-			}
-		},
-		onLoad() {
-			this.fetchStaffTemperature()
-		},
-		methods: {
-			fetchStaffTemperature(){
-				let creditCode=this.$cache.get('creditCode')
-				if (this.$isEmpty(creditCode)) {
-					this.$showModel('系统异常').then(res=>{
-						uni.navigateBack({
-							delta:1
-						})
-					})
-				}
-				this.$api.temperatureRecord.page({enterpriseCreditCode:creditCode,size:300}).then(res=>{
-					this.dataList=res.data.records
-				})
-			},
-			goDetail(item){
-				getApp().globalData.staffTemperature=item
-				uni.navigateTo({
-					url:"/pages/index/staff-temperature/detail"
-				})
-			},
-			subsectionChange(index){
-				this.subsectionCurrent=index
-			},
-			swiperChange(e) {
-			  uni.pageScrollTo({
-			      scrollTop: 0,
-			      duration: 0
-			  });
-			  this.subsectionCurrent = e.detail.current
-			},
-			animationfinish({detail: { current }}) {
-				this.swiperCurrent = current;
-				this.subsectionCurrent = current;
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.container {
-		  height: calc(100vh);
-		  background-color: #F6F6F6;
-		  padding: 90rpx 0rpx 0rpx;
-		 .tabs {
-			 height: 90rpx;
-		    position: fixed;
-		    top: 0rpx;
-			left: 0;
-			right: 0;
-			width: 100%;
-			z-index: 3;
-		  }
-	}
-	
-	.nav-checked{
-		background-color: #59a5f0;
-		color: #FFFFFF;
-		font-weight: 800;
-	}
-	
-	.nav-unchecked{
-		background-color: #FFFFFF;
-		color: #59a5f0;
-	}
-	
-	.text-checked{
-		font-weight: 800;
-		background-color: #FFFFFF;
-		color: #2f7ff5;
-		font-size: 800;
-	}
-	
-	view{
-		box-sizing: border-box;
-	}
-	.scroll-view {
-		height: 150rpx;
-		white-space: nowrap;
-		width: 100%;
-		position: relative;
-		top: -30rpx;
-	}
-	.scroll-view-item {
-		color: #FFFFFF;
-		background-image: linear-gradient(to right, #2f7ff5, #2f7ff5);
-		display: inline-block;
-		text-align: left;
-		padding: 20rpx 40rpx;
-		margin:0 8rpx;
-		width:24%;
-		border-radius: 12rpx;
-	}
-	.scroll-view-item:first-child{
-		margin-left: 30rpx;
-	}
-	.scroll-view-item:last-child{
-		margin-right: 30rpx;
-	}
-.mine_order_statue {
-	margin: 18upx 14upx 0;
-	background: #fff;
-	padding: 10upx 20upx;
-	border-radius: 20rpx;
-	image{
-		background-color: #FFFFFF;
-		width: 160rpx;
-		height: 160rpx;
-	}
-}
-</style>

+ 12 - 1
pages/index/staffAudit/detail.vue

@@ -111,6 +111,9 @@ export default {
 		this.id=options.id
 		this.fetchDetail()
 	},
+	onShow() {
+		this.setPreData(false)
+	},
 	methods:{
 		call(phone){
 			uni.makePhoneCall({
@@ -164,6 +167,13 @@ export default {
 				this.dataDetail=res.data
 			})
 		},
+		setPreData(data){
+			let pages = getCurrentPages();
+			let prevPage = pages[pages.length - 2]; 
+			prevPage.setData({
+				"flag":data
+			})
+		},
 		pass(){
 			let that=this
 			this.$showModel("确定审核通过该员工信息?").then(res=>{
@@ -178,7 +188,8 @@ export default {
 					}
 					that.send(msgData)
 					that.$showModel(res.msg,false).then(res=>{
-						that.$Router.back()
+						this.setPreData(true)
+						uni.navigateBack();
 					})
 				})
 			})

+ 32 - 24
pages/index/staffAudit/item.vue

@@ -1,15 +1,7 @@
 <template>
-	<view class="">
-		<u-modal  :show-cancel-button="true" @confirm="submitFailAudit" v-model="modelShow" >
-			<view class="slot-content margin-10 " style="background-color: #f5f5f5;">
-				<textarea placeholder-style="color:#bababa" v-model="opinion" placeholder="请输入审核意见" />
-			</view>
-		</u-modal>
-		<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
-			<card @pass="pass" @fail="fail" :list="list" ></card>
-		</MeScroll>
-	</view>
-	
+	<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+		<card @pass="pass" @fail="fail" :list="list" ></card>
+	</MeScroll>
 </template>
 <script>
 	import MeScroll from '@/components/mescroll-body/mescroll-uni.vue'
@@ -20,9 +12,11 @@
 			MeScroll,card
 		},
 		props: {
-			refresh:Boolean,
+			realName:String,
+			phone:String,
 			type: Number,
 			i: Number,
+			fireType: Number,
 			item:Object
 		},
 		data() {
@@ -35,13 +29,17 @@
 				
 				//所属公司
 				enterpriseId:'',
+				//登录类型
+				loginType:'',
+				//园区id
+				agencyId:'',
 				
 				isInit: false, // 是否初始化
 				list: [], // 列表数据
 				mescroll: null, // mescroll 对象
 				// 上拉配置参数
 				up: {
-					noMoreSize: 3, 
+					noMoreSize: 2, 
 					auto: true,
 					page: {
 						page: 0,
@@ -55,11 +53,12 @@
 				}
 			}
 		},
+		created() {
+			this.enterpriseId= this.$cache.get('enterpriseId')
+			this.loginType=this.$cache.get('loginType')
+			this.agencyId=this.$cache.get('agencyId')
+		},
 		watch:{
-			refresh() {
-				console.log("我要刷新了");
-				this.mescroll.resetUpScroll()
-			},
 			type(val) {
 				if(!this.isInit && val === this.i) {
 					this.mescroll.resetUpScroll()
@@ -71,9 +70,6 @@
 				this.mescroll.resetUpScroll()
 			}
 		},
-		created() {
-			this.enterpriseId= this.$cache.get('enterpriseId')
-		},
 		methods: {
 			/**
 			 * 通过审核
@@ -174,16 +170,26 @@
 			upFn(mescroll) {
 				let that=this
 				let obj={
-					enterpriseId:this.enterpriseId,
+					realName:this.realName,
+					phone:this.phone,
 					current:mescroll.num,
-					size:mescroll.size,
+					size:mescroll.size
+				}
+				if (this.loginType==this.$loginType.ENTERPRISE) {
+					//企业登录
+					obj.enterpriseId=this.enterpriseId
+					
+				}else if(this.loginType==this.$loginType.AGENCY){
+					//园区管理员登陆
+					obj.agencyId=this.agencyId
 				}
+				
+				
 				if (this.item.value!=-1) {
 					//不是查询全部就传examine
 					obj.examine=this.item.value
 				}
 				try{
-					let enterpriseId=
 					this.$api.enterprisestaff.page(obj).then(res=>{
 						let data=res.data.records
 						let length=data.length
@@ -209,5 +215,7 @@
 </script>
 
 <style lang="scss" scoped>
-	
+	view{
+		box-sizing: border-box;
+	}
 </style>

+ 250 - 0
pages/index/staffAudit/item1.vue

@@ -0,0 +1,250 @@
+<template>
+	<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+		<u-modal :show-cancel-button="true" @cancel="filterReset" cancel-text="重置" cancel-color="#000000"  @confirm="filterConfirm" title="筛选" :mask-close-able="true" v-model="filterShow" >
+			<view class="slot-content" style="margin: 20rpx;">
+				<u-form label-width="150"  ref="uForm">
+					<u-form-item label="姓名"><u-input v-model="realName" /></u-form-item>
+					<u-form-item :border-bottom="false" label="手机号"><u-input type="number"  v-model="phone" /></u-form-item>
+				</u-form>
+			</view>
+		</u-modal>
+		<card @pass="pass" @fail="fail" :list="list" ></card>
+	</MeScroll>
+</template>
+<script>
+	import MeScroll from '@/components/mescroll-body/mescroll-uni.vue'
+	import card from './card.vue'
+	var app=getApp()
+	export default {
+		components:{
+			MeScroll,card
+		},
+		props: {
+			refresh:Boolean,
+			type: Number,
+			i: Number,
+			fireType: Number,
+			item:Object
+		},
+		data() {
+			return {
+				realName:'',
+				phone:'',
+				filterShow:false,
+				
+				//审核不通过时展示
+				modelShow:false,
+				//审核不通过的原因
+				opinion:'',
+				dataDetail:{},
+				
+				//所属公司
+				enterpriseId:'',
+				//登录类型
+				loginType:'',
+				//园区id
+				agencyId:'',
+				
+				isInit: false, // 是否初始化
+				list: [], // 列表数据
+				mescroll: null, // mescroll 对象
+				// 上拉配置参数
+				up: {
+					noMoreSize: 2, 
+					auto: true,
+					page: {
+						page: 0,
+						size: 10
+					}
+				},
+				// 下拉配置参数
+				down: {
+					use: true, 
+					auto: false
+				}
+			}
+		},
+		created() {
+			this.enterpriseId= this.$cache.get('enterpriseId')
+			this.loginType=this.$cache.get('loginType')
+			this.agencyId=this.$cache.get('agencyId')
+		},
+		watch:{
+			refresh() {
+				console.log("我要刷新了");
+				this.mescroll.resetUpScroll()
+			},
+			type(val) {
+				if(!this.isInit && val === this.i) {
+					this.mescroll.resetUpScroll()
+				}
+			}
+		},
+		mounted() {
+			if(!this.isInit && this.i === 0) {
+				this.mescroll.resetUpScroll()
+			}
+		},
+		methods: {
+			show(){
+				this.filterShow=!this.filterShow
+			},
+			filterConfirm(){
+				this.mescroll.resetUpScroll()
+			},
+			filterReset(){
+				this.realName=''
+				this.phone=''
+				this.mescroll.resetUpScroll()
+			},
+			/**
+			 * 通过审核
+			 */
+			pass(item){
+				let that=this
+				this.$showModel("确定审核通过该员工信息吗?").then(res=>{
+					item.examine=1
+					item.auditTime=this.$createDateTime()
+					this.$api.enterprisestaff.submit(item).then(res=>{
+						that.$u.toast(res.msg)
+						let msgData={
+							openId:item.openId,
+							content:"审核已通过",
+							remarks:"已审核",
+							enterpriseName:item.enterpriseName
+						}
+						that.send(msgData)
+						that.mescroll.resetUpScroll()
+					})
+				})
+			},
+			/**
+			 * 审核不通过
+			 * @param {Object}
+			 */
+			submitFailAudit(){
+				let item=this.dataDetail
+				let that=this
+				item.examine=2
+				item.opinion=that.opinion
+				item.auditTime=this.$createDateTime()
+				this.$api.enterprisestaff.submit(item).then(res=>{
+					let msgData={
+						openId:item.openId,
+						content:"审核不通过",
+						remarks:that.opinion || '审核不通过',
+						enterpriseName:item.enterpriseName
+					}
+					that.send(msgData)
+					that.$u.toast(res.msg)
+					that.mescroll.resetUpScroll()
+				})
+			},
+			/**
+			 * 显示审核不通过的意见框
+			 * @param {Object} item
+			 */
+			fail(item){
+				this.dataDetail=item
+				this.modelShow=true
+			},
+			async send(msgData){
+				let tokenData={
+					grantType:this.$api.wxData.subscribe_grant_type,
+					appId:this.$api.wxData.appId,
+					secret:this.$api.wxData.secret
+				}
+				let res=await this.$api.wxApi.getAccessToken(tokenData)
+				let token=JSON.parse(res.data).access_token
+				let subscribeData={
+					accessToken:token,
+					touser:msgData.openId,
+					lang:"zh_CN",
+					page:'/pages/index/index',
+					miniprogramState:this.$miniprogramState.FORMAL,
+				    templateId: this.$tmplIds[0],
+					  "data": {
+						  "thing13": {
+							  "value": msgData.enterpriseName
+						  },
+						  "thing9":{
+							  "value": "员工认证信息审核"
+						  },
+						  "phrase2": {
+							  "value": msgData.content
+						  },
+						  "thing3": {
+							  "value": msgData.remarks
+						  },
+						}
+				}
+				this.$api.wxApi.subscribe(subscribeData).then(res=>{
+					console.log(res);
+				}).catch(err=>{
+					console.error(err);
+				})
+			},
+			/**
+			 * @param {Object} mescroll 初始化组件
+			 */
+			initMeScroll(mescroll) {
+				this.mescroll = mescroll
+			},
+			/**
+			 * @param {Object} mescroll 上拉回调
+			 */
+			upFn(mescroll) {
+				let that=this
+				let obj={
+					realName:this.realName,
+					phone:this.phone,
+					current:mescroll.num,
+					size:mescroll.size
+				}
+				if (this.loginType==this.$loginType.ENTERPRISE) {
+					//企业登录
+					obj.enterpriseId=this.enterpriseId
+					
+				}else if(this.loginType==this.$loginType.AGENCY){
+					//园区管理员登陆
+					obj.agencyId=this.agencyId
+				}
+				
+				
+				if (this.item.value!=-1) {
+					//不是查询全部就传examine
+					obj.examine=this.item.value
+				}
+				try{
+					this.$api.enterprisestaff.page(obj).then(res=>{
+						let data=res.data.records
+						let length=data.length
+						let total=res.data.total
+						mescroll.endBySize(length, total);
+						if(mescroll.num == 1) that.list = []; //如果是第一页需手动制空列表
+						that.list=that.list.concat(data); //追加新数据
+					})
+				}catch(e){
+					mescroll.endErr();
+				}
+			},
+			/**
+			 * 下拉回调
+			 * */
+			downFn(mescroll) {
+				setTimeout(()=>{
+					this.phone=''
+					this.realName=''
+					this.list=[]
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	view{
+		box-sizing: border-box;
+	}
+</style>

+ 84 - 28
pages/index/staffAudit/list.vue

@@ -1,20 +1,34 @@
 <template>
 	<view class="container">
-		<view class="tabs" >
-			<scroll-view scroll-x class="bg-white nav">
-				<view class="flex text-center">
-					<view class="cu-item flex-sub" :class="index==current?'text-blue text-xl text-bold':'text-lg'" v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
-						{{item.name}}
+		<u-modal cancel-text="重置" cancel-color="#000000" @cancel="filterReset" :show-cancel-button="true"  @confirm="filterConfirm" title="筛选" :mask-close-able="true" v-model="filterShow" >
+			<view class="slot-content" style="margin: 20rpx;">
+				<u-form label-width="150"  ref="uForm">
+					<u-form-item label="员工姓名"><u-input v-model="realName" /></u-form-item>
+					<u-form-item :border-bottom="false" label="手机号"><u-input v-model="phone" type="number"  /></u-form-item>
+				</u-form>
+			</view>
+		</u-modal>
+		<view class="tabs flex flex-direction">
+			<view class="flex">
+				<scroll-view scroll-x class="bg-white nav" style="width: 90%;">
+					<view class="flex text-center">
+						<view class="cu-item flex-sub" :class="index==current?'text-blue text-xl text-bold ':'text-lg'" v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
+							{{item.name}}
+						</view>
 					</view>
+				</scroll-view>
+				<view class="flex justify-center align-center"  @click="show">
+					<text class="cuIcon-filter "  style="font-size: 40rpx;"></text>
+					<u-badge size="mini" type="error" :count="filterCount"></u-badge>
 				</view>
-			</scroll-view>
+			</view>
 		</view>
 		<view style="height: 100%;">
 			<swiper style="height: 100%;" :current="current"  @change="swiperChange"
 				@animationfinish="animationfinish">
 				<swiper-item  v-for="(item, index) in tabs" :key="index">
 					<scroll-view scroll-y style="height: 100%;">
-						<item :refresh="refresh" :i="index" :item="item" :type="current"></item>
+						<item ref="mescrollItem" :realName="realName" :phone="phone" :refresh="refresh" :i="index" :item="item" :type="current"></item>
 					</scroll-view>
 				</swiper-item>
 			</swiper>
@@ -29,17 +43,14 @@
 		},
 		data() {
 			return {
-				//是否第一次进入页面
-				isfirst:false,
-				//动态让item主动刷新
-				refresh:false,
-				scrollLeft:0,
+				filterCount:0,
+				filterShow:false,
+				realName:'',
+				phone:'',
+				
 				current: 0,
 				swiperCurrent:0,
 				tabs: [
-					//数据库数据状态- 
-					//工单状态 -1 已取消  0:待处理  1:已处理
-					//评价 estimateStatus 待评价0  已评价 1
 					{
 						name: '全部',
 						value:-1
@@ -60,20 +71,69 @@
 			}
 		},
 		onShow(){
-			if (this.isfirst) {
-				this.isfirst=false
-			}else{
-				//刷新列表
-				this.refresh=!this.refresh
+			let pages = getCurrentPages();  //获取所有页面栈实例列表
+			let currPage = pages[ pages.length - 1];  //当前页页面实例
+			if (currPage.data.flag==true) {
+				this.realName=''
+				this.phone=''
+				this.refreshMescroll()
 			}
 		},
 		onLoad() {
-			this.isfirst=true
+			
 		},
 		methods:{
+			show(){
+				this.filterShow=true
+				console.log("111");
+			},
+			/**
+			 * 筛选
+			 */
+			filterConfirm(){
+				this.refreshMescroll()
+				let n=0
+				if (!this.$isEmpty(this.realName)) {
+					n++
+				}
+				if (!this.$isEmpty(this.phone)) {
+					n++
+				}
+				this.filterCount=n
+			},
+			/**
+			 * 重置筛选项
+			 */
+			filterReset(){
+				this.filterCount=0
+				this.realName=''
+				this.phone=''
+				this.$nextTick(() => {
+					this.refreshMescroll()
+				})
+			},
+			/**
+			 * 刷新列表
+			 */
+			refreshMescroll(){
+				let curMescroll = this.getMescroll(this.current)
+				curMescroll && curMescroll.resetUpScroll()
+			},
+			/**
+			 * 获取Mescroll对象
+			 * @param {Object} i
+			 */
+			getMescroll(i){
+				let mescrollItems = this.$refs.mescrollItem;
+				if(mescrollItems){
+					let item = mescrollItems[i]
+					if(item) return item.mescroll
+				}
+				return null
+			},
+			
 			tabChange(index) {
 				this.current = index
-				// this.scrollLeft = (index - 1) * 60
 			},
 			swiperChange(e) {
 			  uni.pageScrollTo({
@@ -81,7 +141,6 @@
 			      duration: 0
 			  });
 			  this.current = e.detail.current
-			  // this.scrollLeft = (this.current - 1) * 60
 			},
 			animationfinish({detail: { current }}) {
 				this.swiperCurrent = current;
@@ -95,24 +154,21 @@
 	.text-blue{
 		color: #59a5f0;
 	}
-	
 	.text-xl{
 		font-size: 34rpx;
 	}
-	
 	.container {
-	  height: calc(100vh );
+	  height: calc(100vh);
 	  background-color: #F6F6F6;
 	  padding: 78rpx 0rpx 0rpx;
 	 .tabs {
 	    position: fixed;
 	    top: -10rpx;
 		left: 0;
-		display: flex;
-		align-items: center;
 		width: 100%;
 		background-color: #FFFFFF;
 		box-sizing: border-box;
+		z-index: 3;
 	  }
 }
 </style>

+ 125 - 0
pages/index/staffAudit/list1.vue

@@ -0,0 +1,125 @@
+<template>
+	<view class="container">
+		<view class="tabs flex">
+			<scroll-view scroll-x class="bg-white nav" style="width: 90%;">
+				<view class="flex text-center">
+					<view class="cu-item flex-sub" :class="index==current?'text-blue text-xl text-bold ':'text-lg'" v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
+						{{item.name}}
+					</view>
+				</view>
+			</scroll-view>
+			<view class="" @click="tapFilterShow">
+				<text class="cuIcon-filter" style="font-size: 40rpx;"></text>
+			</view>
+		</view>
+		<view style="height: 100%;">
+			<swiper style="height: 100%;" :current="current"  @change="swiperChange"
+				@animationfinish="animationfinish">
+				<swiper-item  v-for="(item, index) in tabs" :key="index">
+					<scroll-view scroll-y style="height: 100%;">
+						<item ref="mescrollItem"  :refresh="refresh" :i="index" :item="item" :type="current"></item>
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</view>
+	</view>
+</template>
+<script>
+	import item from "./item.vue"
+	export default {
+		components: {
+			item
+		},
+		data() {
+			return {
+				//让item主动刷新
+				refresh:false,
+				scrollLeft:0,
+				current: 0,
+				swiperCurrent:0,
+				tabs: [
+					{
+						name: '全部',
+						value:-1
+					},
+					{
+						name: '待审核',
+						value:0
+					},
+					{
+						name: '已通过',
+						value:1
+					},
+					{
+						name:'未通过',
+						value:2
+					}
+				],
+			}
+		},
+		onShow(){
+			if(this.canReset){
+				let curMescroll = this.getMescroll(this.current)
+				// curMescroll.scrosllTo(0, 100); 
+				curMescroll && curMescroll.resetUpScroll()
+			}
+			this.canReset = true
+		},
+		methods:{
+			tapFilterShow(){
+				let mescrollItems = this.$refs.mescrollItem;
+				if(mescrollItems){
+					let item = mescrollItems[this.current]
+					item.show()
+				}
+			},
+			tabChange(index) {
+				this.current = index
+			},
+			swiperChange(e) {
+			  uni.pageScrollTo({
+			      scrollTop: 0,
+			      duration: 0
+			  });
+			  this.current = e.detail.current
+			},
+			animationfinish({detail: { current }}) {
+				this.swiperCurrent = current;
+				this.current = current;
+			},
+			getMescroll(i){
+				let mescrollItems = this.$refs.mescrollItem;
+				if(mescrollItems){
+					let item = mescrollItems[i]
+					if(item) return item.mescroll
+				}
+				return null
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.text-blue{
+		color: #59a5f0;
+	}
+	.text-xl{
+		font-size: 34rpx;
+	}
+	.container {
+	  height: calc(100vh);
+	  background-color: #F6F6F6;
+	  padding: 78rpx 0rpx 0rpx;
+	 .tabs {
+	    position: fixed;
+	    top: -10rpx;
+		left: 0;
+		display: flex;
+		align-items: center;
+		width: 100%;
+		background-color: #FFFFFF;
+		box-sizing: border-box;
+		z-index: 3;
+	  }
+}
+</style>

+ 97 - 18
pages/login/login.vue

@@ -10,29 +10,47 @@
 			<!-- 标题 -->
 			<view class="t-b">欢迎回来!</view>
 			<form class="cl">
-				<view class="t-a" v-if="typeIndex==0">
-					<image   src="@/static/login/sj.png"></image>
-					<input class="input"  type="number"  placeholder="请输入手机号" maxlength="11" v-model="phone" />
-				</view>
-				<view class="t-a" v-else>
-					<image  style="width: 50rpx;height: 54rpx;padding-bottom: 6rpx;" src="@/static/login/qiye1.png"></image>
-					<input class="input" disabled  type="text" @click="enterpriseShow = true"  placeholder="请选择企业" v-model="enterpriseName" />
-				</view>
-				<view class="t-a" v-if="typeIndex==0">
-					<image  src="@/static/login/yz.png"></image>
-					<input class="input" type="number"  maxlength="6" placeholder="请输入验证码" v-model="yzm" />
-					<view :style="showText?'':'background-color: #A7A7A7;'"  class="t-c" @click="getCode()">{{tips}}</view>
+				<!-- 员工登陆 -->
+				<block v-if="typeIndex==0">
+					<view class="t-a" >
+						<image   src="@/static/login/sj.png"></image>
+						<input class="input"  type="number"  placeholder="请输入手机号" maxlength="11" v-model="phone" />
+					</view>
+					<view class="t-a" >
+						<image  src="@/static/login/yz.png"></image>
+						<input class="input" type="number"  maxlength="6" placeholder="请输入验证码" v-model="yzm" />
+						<view :style="showText?'':'background-color: #A7A7A7;'"  class="t-c" @click="getCode()">{{tips}}</view>
+					</view>
+				</block>
+				<!-- 企业登陆 -->
+				<block v-if="typeIndex==1">
+					<view class="t-a">
+						<image  style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/qiye1.png"></image>
+						<input class="input" disabled  type="text" @click="enterpriseShow = true"  placeholder="请选择企业" v-model="enterpriseName" />
+					</view>
+					<view class="t-a" >
+						<image  src="@/static/login/yz.png"></image>
+						<input class="input" type="password"  maxlength="6" placeholder="请输入登录密码" v-model="password" />
+					</view>
+				</block>
+				<!-- 管理员登录 -->
+				<view class="t-a" v-if="typeIndex==2">
+					<image  style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/yuanqu.png"></image>
+					<input class="input" disabled  type="text" @click="ganderSelectShow = true"  placeholder="请选择园区" v-model="ganderInfo.agencyName" />
 				</view>
-				<view class="t-a" v-else>
+				<view class="t-a" v-if="typeIndex==2">
 					<image  src="@/static/login/yz.png"></image>
-					<input class="input" type="password"  maxlength="6" placeholder="请输入登录密码" v-model="password" />
+					<input class="input" type="password"  maxlength="8" placeholder="请输入登录密码" v-model="inputGanderPsw" />
 				</view>
+				
+				<!-- 登录类型 -->
 				<view  class="flex padding-bottom-50" style="text-align: left">
 					<view @click="typeShow=true" style="border: 1px solid #e9e9e9;background-color: #f8f7fc;" class="cu-btn   df  round">
 						<text class="text-black">{{typeList[typeIndex].text}}</text>
 						<text class="text-black cuIcon-triangledownfill " style="font-size: 40rpx;padding-left: 4rpx;"></text>
 					</view>
 				</view>
+				<!-- 七天免登录 -->
 				<view class="checkbox">
 					<u-checkbox 
 					@change="checkboxChange" 
@@ -69,6 +87,9 @@
 				<u-empty v-else name="search"></u-empty>
 			</u-popup>
 			
+			<!-- 园区列表 -->
+			<u-picker v-model="ganderSelectShow" @confirm="ganderSelectCallback" :range="ganderSelectList" range-key="agencyName" mode="selector"></u-picker>
+			
 			<u-action-sheet @click="typeClick" :list="typeList" v-model="typeShow"></u-action-sheet>
 			<u-verification-code seconds="60" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
 		</view>
@@ -86,7 +107,7 @@ export default {
 			checked:false,//七天免登录
 			
 			//登录类型
-			typeList:[{text:'员工登录',value:'0'},{text:'企业登录',value:'1'}],
+			typeList:[{text:'员工登录',value:'0'},{text:'企业登录',value:'1'},{text:'管理员登录',value:'2'}],
 			typeShow:false,
 			typeIndex:0,
 			
@@ -103,6 +124,12 @@ export default {
 			creditCode:'',
 			password:'',
 			
+			//园区管理员登陆
+			ganderInfo:'',//选择的园区对象信息
+			inputGanderPsw:'',//输入的密码
+			ganderSelectList: [],//园区列表
+			ganderSelectShow: false,
+			
 			//微信快速登陆
 			openId:'',
 			
@@ -203,8 +230,26 @@ export default {
 			if (this.typeIndex==1) {
 				//企业登录,加载企业数据
 				this.fetchEnterpriseList()
+			}else if (this.typeIndex==2) {
+				//园区管理员登陆
+				this.fetchAgencyList()
 			}
 		},
+		/**
+		 * 获取园区列表
+		 */
+		fetchAgencyList(){
+			this.$api.agency.page().then(res=>{
+				this.ganderSelectList=res.data
+			})
+		},
+		/**
+		 * 选择园区后的回调
+		 */
+		ganderSelectCallback(e) {
+			let index=e[0]
+			this.ganderInfo=this.ganderSelectList[index]
+		},
 		/**
 		 * 获取验证码
 		 */
@@ -269,6 +314,9 @@ export default {
 			}else if (this.typeIndex==1) {
 				//企业登录
 				this.enterpriseLogin()
+			}else if (this.typeIndex==2) {
+				//管理员登陆
+				this.ganderLogin()
 			}
 		},
 		/**
@@ -308,7 +356,7 @@ export default {
 					})
 				}
 				
-			  },1500)
+			  },1200)
 		},
 		//员工登录
 		async staffLogin(){
@@ -438,8 +486,39 @@ export default {
 					this.handelSuccessLogin('enterprise')
 				}
 			})
+		},
+		/**
+		 * 管理员登陆
+		 */
+		ganderLogin(){
+			if (this.$isEmpty(this.ganderInfo)) {
+				this.$u.toast('请选择园区')
+				return
+			}
+			if (this.$isEmpty(this.inputGanderPsw)) {
+				this.$u.toast('请输入密码')
+				return
+			}
+			/**
+			 * 后台直接返回了明文的园区密码,也没写密码校验的接口
+			 * 就直接在前端校验好了
+			 * 安全性差!!!!
+			 */
+			if (this.inputGanderPsw==this.ganderInfo.password) {
+				//输入密码成功
+				//园区信息
+				this.$cache.put('agencyId',this.ganderInfo.id)
+				this.$cache.put('agency',this.ganderInfo.agencyName)
+				this.$cache.put('agencyTenantId',this.ganderInfo.tenantId)
+				getApp().globalData.userInfo=this.ganderInfo
+				this.handelSuccessLogin('agency')
+			}else{
+				this.$u.toast('登录失败,密码错误')
+				return
+			}
 		}
 		
+		
 	}
 };
 </script>
@@ -512,8 +591,8 @@ page{
 	width: 40rpx;
 	height: 42rpx;
 	position: absolute;
-	left: 20rpx;
-	top: 28rpx;
+	left: 30rpx;
+	top: 26rpx;
 	padding-right:4rpx;
 }
 

+ 47 - 16
pages/mine/changePass/changePass.vue

@@ -3,13 +3,13 @@
 		<view class="bg-white padding-left-40 padding-right-40">
 			<u-form   ref="uForm" >
 				<u-form-item   label="旧密码"  :label-width="labelWidth">
-					<u-input maxlength="12" placeholder="请输入旧密码"   v-model="password"  type="password"></u-input>
+					<u-input maxlength="8" placeholder="请输入旧密码"   v-model="password"  type="password"></u-input>
 				</u-form-item>
 				<u-form-item   label="新密码"  :label-width="labelWidth">
-					<u-input maxlength="12" placeholder="请输入新密码"   v-model="newPass"  type="password"></u-input>
+					<u-input maxlength="8" placeholder="请输入新密码"   v-model="newPass"  type="password"></u-input>
 				</u-form-item>
 				<u-form-item   label="确认新密码"  :label-width="labelWidth">
-					<u-input maxlength="12" placeholder="再次输入新密码"   v-model="confirmPass"  type="password"></u-input>
+					<u-input maxlength="8" placeholder="再次输入新密码"   v-model="confirmPass"  type="password"></u-input>
 				</u-form-item>
 			</u-form>
 		</view>
@@ -23,7 +23,8 @@
 	export default {
 		data() {
 			return {
-				//企业信息
+				loginType:'',
+				
 				dataDetail:{},
 				
 				labelWidth:180,
@@ -33,18 +34,33 @@
 		},
 		onShow() {
 			let dataDetail=getApp().globalData.userInfo
+			this.loginType=this.$cache.get('loginType')
 			if (this.$isEmpty(dataDetail)) {
-				this.fetchUserInfo()
+				if (this.$loginType.AGENCY==this.loginType) {
+					//加载园区信息
+					this.fetchAgencyInfo()
+				}else if(this.$loginType.ENTERPRISE==this.loginType){
+					//加载企业信息
+					this.fetchEnterpriseInfo()
+				}
 			}else{
 				this.dataDetail=dataDetail
 			}
 		},
 		methods: {
+			/**
+			 * 加载园区信息
+			 */
+			fetchAgencyInfo(){
+				let agencyId=this.$cache.get('agencyId')
+				this.$api.agency.page({id:agencyId}).then(res=>{
+					this.dataDetail=res.data[0]
+				})
+			},
 			/**
 			 * 加载企业信息
-			 * getApp().globalData.userInfo正常都会有值,一般不会来到这一步
 			 */
-			fetchUserInfo(){
+			fetchEnterpriseInfo(){
 				let creditCode=this.$cache.get('creditCode')
 				this.$api.enterprise.detail({creditCode:creditCode}).then(res=>{
 					this.dataDetail=res.data
@@ -67,7 +83,7 @@
 					return
 				}
 				if (this.newPass.length<6) {
-					this.$u.toast('新密码密码不能少于6位')
+					this.$u.toast('新密码不能少于6位')
 					return
 				}
 				if (this.$isEmpty(this.confirmPass)) {
@@ -79,14 +95,29 @@
 					return
 				}
 				this.dataDetail.password=this.newPass
-				this.$api.enterprise.submit(this.dataDetail).then(res=>{
-					if (res.success) {
-						this.$showModel('修改成功,请重新登陆!',false).then(res=>{
-							this.$cache.clear()
-							this.$Router.push('login')
-						})
-					}
-				})
+				
+				if (this.loginType==this.$loginType.AGENCY) {
+					//修改园区密码
+					this.$api.agency.submit(this.dataDetail).then(res=>{
+						if (res.success) {
+							this.$showModel('修改成功,请重新登陆!',false).then(res=>{
+								this.$cache.clear()
+								this.$Router.push('login')
+							})
+						}
+					})
+					
+				}else if (this.loginType==this.$loginType.ENTERPRISE) {
+					//修改企业密码
+					this.$api.enterprise.submit(this.dataDetail).then(res=>{
+						if (res.success) {
+							this.$showModel('修改成功,请重新登陆!',false).then(res=>{
+								this.$cache.clear()
+								this.$Router.push('login')
+							})
+						}
+					})
+				}
 			}
 		}
 	}

+ 42 - 1
pages/mine/mine.vue

@@ -32,6 +32,15 @@
 				</view>
 			</view>
 		</view>
+		<view class="item_list" style="margin-top: 0;" v-if="loginType=='agency'">
+			<view class="flex justify-between" style="padding: 50rpx 25rpx 60rpx 40rpx;">
+				<view class="text-bold">我的园区</view>
+				<view class="" @click="goAgencyDetail">
+					<text class="text-black">{{agencyInfo.agencyName}}</text>
+					<text class="cuIcon-right text-gray padding-left-20" style="font-size: 24rpx;"></text>
+				</view>
+			</view>
+		</view>
 		
 		
 		
@@ -84,6 +93,8 @@ export default {
 			staffInfo:{},
 			//企业信息
 			enterpriseInfo:{},
+			//园区信息
+			agencyInfo:{},
 			
 			//功能列表
 			systemItemList:[],
@@ -100,6 +111,8 @@ export default {
 			this.fetchStaffInfo()
 		}else if (this.loginType==this.$loginType.ENTERPRISE) {
 			this.fetchEnterpriseInfo()
+		}else if (this.loginType==this.$loginType.AGENCY) {
+			this.fetchAgencyInfo()
 		}
 	},
 	methods: {
@@ -127,7 +140,7 @@ export default {
 					itemName: '修改密码',
 					itemIcon: '/static/index/blue/changePsw.png',
 					name:'changePsw',
-					show:this.loginType==this.$loginType.ENTERPRISE
+					show:this.loginType!=this.$loginType.STAFF
 				},
 				{
 					itemName: '问题反馈',
@@ -202,23 +215,51 @@ export default {
 			   }
 			})
 		},
+		/**
+		 * 加载员工信息
+		 */
 		fetchStaffInfo(){
 			let phone= this.$cache.get('phone')
 			this.$api.enterprisestaff.detail({phone:phone}).then(res=>{
 				this.staffInfo=res.data
 			})
 		},
+		/**
+		 * 加载企业信息
+		 */
 		fetchEnterpriseInfo(){
 			let creditCode=this.$cache.get('creditCode')
 			this.$api.enterprise.detail({creditCode:creditCode}).then(res=>{
 				this.enterpriseInfo=res.data
 			})
 		},
+		/**
+		 * 加载园区信息
+		 */
+		fetchAgencyInfo(){
+			console.log(getApp().globalData.userInfo);
+			
+			let agencyId=this.$cache.get('agencyId')
+			this.$api.agency.page({id:agencyId}).then(res=>{
+				this.agencyInfo=res.data[0]
+			})
+		},
+		/**
+		 * 企业详情
+		 */
 		goEnterpriseDetail(){
 			uni.navigateTo({
 				url:"/pages/company/company"
 			})
 		},
+		/**
+		 * 园区详情
+		 */
+		goAgencyDetail(){
+			uni.navigateTo({
+				url:"/pages/index/agency/agency"
+			})
+		},
 		//功能跳转
 		tapToMenu(name){
 			let url=''

+ 0 - 1
router.js

@@ -13,7 +13,6 @@ let STAFF=['auth','editPhone']
 //企业页面,只可以企业权限的用户访问
 let ENTERPRISE=['staffAuditList',
 				'staffAuditDetail',
-				'staff-temperature',
 				'smoke-alarm',
 				'gas-alarm',
 				'fire-hydrant',

BIN
static/index/gander/notice.png


BIN
static/login/yuanqu.png