From ee5bd20779565d6231c3b58374e431adb068ca7d Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Wed, 20 Mar 2024 13:47:51 +0800
Subject: [PATCH] 更新

---
 static/icon/menu-22.png                    |    0 
 static/img/tabbar-07.png                   |    0 
 static/icon/menu-24.png                    |    0 
 static/icon/menu-27.png                    |    0 
 pages/circle/index.vue                     |   10 +
 static/img/tabbar-07-selected.png          |    0 
 pages.json                                 |   17 ++++
 subPackage/police/onLine.vue               |   27 ++++--
 static/icon/menu-28.png                    |    0 
 static/icon/menu-23.png                    |    0 
 subPackage/workbench/views/editCscj.vue    |    6 
 subPackage/workbench/views/editExamine.vue |    6 
 pages/user/center.vue                      |   20 ++++-
 subPackage/people/people.vue               |   11 ++
 common/common.js                           |   52 ++++++++++++
 pages/statistics/index.vue                 |   25 +++++-
 pages/home/index.vue                       |   37 ++++----
 static/icon/menu-26.png                    |    0 
 static/icon/menu-25.png                    |    0 
 subPackage/workbench/views/cscj.vue        |    6 
 components/tabBar/tabBar.vue               |   22 ++---
 static/icon/menu-21.png                    |    0 
 22 files changed, 177 insertions(+), 62 deletions(-)

diff --git a/common/common.js b/common/common.js
index d47c565..aa55b4d 100644
--- a/common/common.js
+++ b/common/common.js
@@ -97,7 +97,27 @@
 
 
 export const getTabbarList = (roleType = 1) => {
-	if (roleType == 2) {
+	if (roleType == 1) { //居民
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-01-selected.png',
+				iconPath: '/static/img/tabbar-01.png',
+				url: '/pages/home/index'
+			},
+			{
+				name: '圈子',
+				iconPathSelected: '/static/img/tabbar-02-selected.png',
+				iconPath: '/static/img/tabbar-02.png',
+				url: '/pages/circle/index'
+			},
+			{
+				name: '我的',
+				iconPathSelected: '/static/img/tabbar-03-selected.png',
+				iconPath: '/static/img/tabbar-03.png',
+				url: '/pages/user/center'
+			}
+		]
+	} else if (roleType == 2) { //民警 
 		return [{
 				name: '首页',
 				iconPathSelected: '/static/img/tabbar-04-selected.png',
@@ -117,11 +137,10 @@
 				name: '我的',
 				iconPathSelected: '/static/img/tabbar-06-selected.png',
 				iconPath: '/static/img/tabbar-06.png',
-
 				url: '/pages/user/center'
 			}
 		]
-	} else {
+	} else if (roleType == 3) { // 网格员
 		return [{
 				name: '首页',
 				iconPathSelected: '/static/img/tabbar-01-selected.png',
@@ -136,6 +155,33 @@
 				url: '/pages/circle/index'
 			},
 			{
+				name: '驾驶舱',
+				iconPathSelected: '/static/img/tabbar-07-selected.png',
+				iconPath: '/static/img/tabbar-07.png',
+				url: '/pages/statistics/index'
+			},
+
+			{
+				name: '我的',
+				iconPathSelected: '/static/img/tabbar-03-selected.png',
+				iconPath: '/static/img/tabbar-03.png',
+				url: '/pages/user/center'
+			}
+		]
+	} else if (roleType == 4) { //系统管理员
+		return [{
+				name: '首页',
+				iconPathSelected: '/static/img/tabbar-01-selected.png',
+				iconPath: '/static/img/tabbar-01.png',
+				url: '/pages/home/index'
+			},
+			{
+				name: '驾驶舱',
+				iconPathSelected: '/static/img/tabbar-07-selected.png',
+				iconPath: '/static/img/tabbar-07.png',
+				url: '/pages/statistics/index'
+			},
+			{
 				name: '我的',
 				iconPathSelected: '/static/img/tabbar-03-selected.png',
 				iconPath: '/static/img/tabbar-03.png',
diff --git a/components/tabBar/tabBar.vue b/components/tabBar/tabBar.vue
index ac11e42..d8e8d2e 100644
--- a/components/tabBar/tabBar.vue
+++ b/components/tabBar/tabBar.vue
@@ -23,8 +23,8 @@
 		data() {
 			return {
 				tabbarList: [],
-				inactiveColor: '#AFB8C3',
-				activeColor: '#5086FA',
+				inactiveColor: '#C7CED7',
+				activeColor: '#017BFC',
 				// activeColor: '#003399'
 			}
 		},
@@ -32,21 +32,19 @@
 			list: {
 				handler(newVal) {
 					if (newVal && newVal.length > 0) {
-						this.tabbarList = newVal
+						this.tabbarList = newVal;
+						if (uni.getStorageSync("activeRole").roleName == "民警") {
+							this.inactiveColor = "#AFB8C3";
+							this.activeColor = "#003399";
+						} else {
+							this.inactiveColor = "#C7CED7"
+							this.activeColor = "#017BFC";
+						}
 					}
 				},
 				deep: true,
 				immediate: true
 			}
-		},
-
-		created() {
-			if (uni.getStorageSync("activeRole").roleName == "民警") {
-				this.activeColor = "#003399";
-			} else {
-				this.activeColor = "#5086FA";
-			}
-
 		},
 
 		methods: {
diff --git a/pages.json b/pages.json
index 8eecef4..8f27adf 100644
--- a/pages.json
+++ b/pages.json
@@ -945,7 +945,24 @@
 					}
 				}
 			]
+		},
+
+
+
+		{
+			"root": "subPackage/people",
+			"pages": [{
+				"path": "people",
+				"style": {
+					"navigationBarTitleText": "",
+					"navigationBarBackgroundColor": "#fff",
+					"navigationBarTextStyle": "black",
+					"enablePullDownRefresh": false
+				}
+			}]
 		}
+
+
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
diff --git a/pages/circle/index.vue b/pages/circle/index.vue
index 114c481..e1980f5 100644
--- a/pages/circle/index.vue
+++ b/pages/circle/index.vue
@@ -126,12 +126,16 @@
 		},
 
 		onLoad() {
-			this.tabList = getTabbarList(1);
+
+
 			let role = uni.getStorageSync('activeRole')
-			if (role.roleAlias == "inhabitant") {
+			if (role.roleName == "居民") {
+				this.tabList = getTabbarList(1);
 				this.roleType = 0
 			} else {
-
+				if (role.roleName == '网格员') {
+					this.tabList = getTabbarList(3);
+				}
 				this.roleType = 1;
 			}
 			// this.getCircleList()
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 1f07517..28d5bc9 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -28,27 +28,27 @@
 				</view>
 
 				<view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1">
-					<view @click="scan" class="block-item">
-						<image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
-						<view class="block-item-box flex a-i-c ">
-							<u-icon name="/static/icon/nav-05.png" width="70rpx" height="70rpx"></u-icon>
-							<view class="item-text flex f-d-c j-c-s-b">
+					<view @click="scan" class="module-item">
+						<image class="module-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
+						<view class="module-item-box flex a-i-c ">
+							<u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
+							<view class="module-text flex f-d-c j-c-s-b">
 								<text class="f-28 fw">扫一扫</text>
 								<text class="f-24 opacity">场所采集</text>
 							</view>
 						</view>
 					</view>
-					<view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
-						<image class="block-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
-						<view class="block-item-box flex a-i-c">
-							<u-icon name="/static/icon/nav-06.png" width="70rpx" height="70rpx"></u-icon>
-							<view class="item-text flex f-d-c j-c-s-b">
+					<view class="module-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
+						<image class="module-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
+						<view class="module-item-box flex a-i-c">
+							<u-icon name="/static/icon/nav-06.png" width="90rpx" height="90rpx"></u-icon>
+							<view class="module-text flex f-d-c j-c-s-b">
 								<text class="f-28 fw">打卡登记</text>
 								<text class="f-24 opacity">在线打卡</text>
 							</view>
 						</view>
 					</view>
-					<view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
+					<!-- <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
 						<image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
 						<view class="block-item-box flex a-i-c">
 							<u-icon name="/static/icon/nav-12.png" width="70rpx" height="70rpx"></u-icon>
@@ -57,7 +57,7 @@
 								<text class="f-24 opacity">数据统计</text>
 							</view>
 						</view>
-					</view>
+					</view> -->
 
 
 				</view>
@@ -640,10 +640,6 @@
 			// 	});
 			// },
 
-
-
-
-
 			//获取待办事项数量
 			getTaskCount() {
 				if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
@@ -753,11 +749,14 @@
 				let type = null
 				let roleName = this.selectRole.roleName
 				if (roleName == '网格员' || roleName == '系统管理员') {
-					this.tabList = getTabbarList(1);
+					if (roleName == '网格员') {
+						this.tabList = getTabbarList(3);
+					} else {
+						this.tabList = getTabbarList(4);
+					}
 					type = 1
 					this.roleType = 1;
 					this.roleTypeName = "街道社区网格"
-
 					this.$set(this.background, "top", "#017BFC");
 					this.$set(this.background, "banner",
 						"linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%)");
@@ -1046,7 +1045,7 @@
 			},
 
 			navigatorPage(path) {
-				if (path) {
+				if (path.trim()) {
 					if ((path == '/subPackage/bs/views/zhsb' || path == '/subPackage/bs/views/repair') && this
 						.curHouseCode === '') {
 						uni.showToast({
diff --git a/pages/statistics/index.vue b/pages/statistics/index.vue
index 8f938c2..97b3e5e 100644
--- a/pages/statistics/index.vue
+++ b/pages/statistics/index.vue
@@ -179,7 +179,7 @@
 			</view>
 
 		</view>
-		<tabBar :current="1" :list="tabList" />
+		<tabBar :current="tabbarIndex" :list="tabList" />
 	</view>
 </template>
 
@@ -287,7 +287,8 @@
 				gridData: {},
 				houseLabelData: [],
 				sexData: [],
-				tabList: []
+				tabList: [],
+				tabbarIndex: 1
 			}
 		},
 
@@ -296,8 +297,24 @@
 		// 	console.log(e)
 		// 	this.refreshData();
 		// },
-		onLoad() {
-			this.tabList = getTabbarList(2);
+		onShow() {
+			let {
+				roleName
+			} = uni.getStorageSync("activeRole");
+			if (roleName == "网格员") {
+				this.tabList = getTabbarList(3);
+				this.tabbarIndex = 2;
+			}
+			if (roleName == "民警") {
+				this.tabList = getTabbarList(2);
+				this.tabbarIndex = 1;
+			}
+
+			if (roleName == "系统管理员") {
+				this.tabList = getTabbarList(4);
+				this.tabbarIndex = 1;
+			}
+
 			this.refreshData();
 		},
 
diff --git a/pages/user/center.vue b/pages/user/center.vue
index 5320e33..1d8ac64 100644
--- a/pages/user/center.vue
+++ b/pages/user/center.vue
@@ -80,7 +80,7 @@
 		</view>
 
 
-		<tabBar :current="2" :list="tabbarList" />
+		<tabBar :current="tabbarIndex" :list="tabbarList" />
 	</view>
 </template>
 
@@ -117,7 +117,8 @@
 				addressType: 1,
 				user_info: {},
 				color: "#017BFC",
-				tabbarList: []
+				tabbarList: [],
+				tabbarIndex: 2
 			};
 		},
 
@@ -128,11 +129,22 @@
 				this.tabbarList = getTabbarList(1)
 				this.roleType = 1
 				this.color = "#017BFC"
-
-			} else {
+				this.tabbarIndex = 2;
+			} else if (role.roleName == "民警") {
 				this.tabbarList = getTabbarList(2)
 				this.roleType = 2;
 				this.color = "#003399"
+				this.tabbarIndex = 2;
+			} else if (role.roleName == "系统管理员") {
+				this.tabbarList = getTabbarList(4)
+				this.roleType = 1
+				this.color = "#017BFC";
+				this.tabbarIndex = 2;
+			} else if (role.roleName == "网格员") {
+				this.tabbarList = getTabbarList(3)
+				this.roleType = 1
+				this.color = "#017BFC";
+				this.tabbarIndex = 3;
 			}
 			this.addressType = uni.getStorageSync("siteInfo").addressType;
 		},
diff --git a/static/icon/menu-21.png b/static/icon/menu-21.png
new file mode 100644
index 0000000..bfd4e87
--- /dev/null
+++ b/static/icon/menu-21.png
Binary files differ
diff --git a/static/icon/menu-22.png b/static/icon/menu-22.png
new file mode 100644
index 0000000..aa093ca
--- /dev/null
+++ b/static/icon/menu-22.png
Binary files differ
diff --git a/static/icon/menu-23.png b/static/icon/menu-23.png
new file mode 100644
index 0000000..0a44441
--- /dev/null
+++ b/static/icon/menu-23.png
Binary files differ
diff --git a/static/icon/menu-24.png b/static/icon/menu-24.png
new file mode 100644
index 0000000..9ad6b0c
--- /dev/null
+++ b/static/icon/menu-24.png
Binary files differ
diff --git a/static/icon/menu-25.png b/static/icon/menu-25.png
new file mode 100644
index 0000000..943763d
--- /dev/null
+++ b/static/icon/menu-25.png
Binary files differ
diff --git a/static/icon/menu-26.png b/static/icon/menu-26.png
new file mode 100644
index 0000000..ee31fe3
--- /dev/null
+++ b/static/icon/menu-26.png
Binary files differ
diff --git a/static/icon/menu-27.png b/static/icon/menu-27.png
new file mode 100644
index 0000000..9cd58f6
--- /dev/null
+++ b/static/icon/menu-27.png
Binary files differ
diff --git a/static/icon/menu-28.png b/static/icon/menu-28.png
new file mode 100644
index 0000000..df87162
--- /dev/null
+++ b/static/icon/menu-28.png
Binary files differ
diff --git a/static/img/tabbar-07-selected.png b/static/img/tabbar-07-selected.png
new file mode 100644
index 0000000..99b9474
--- /dev/null
+++ b/static/img/tabbar-07-selected.png
Binary files differ
diff --git a/static/img/tabbar-07.png b/static/img/tabbar-07.png
new file mode 100644
index 0000000..8957470
--- /dev/null
+++ b/static/img/tabbar-07.png
Binary files differ
diff --git a/subPackage/people/people.vue b/subPackage/people/people.vue
new file mode 100644
index 0000000..cd26590
--- /dev/null
+++ b/subPackage/people/people.vue
@@ -0,0 +1,11 @@
+<template>
+	<view>
+
+	</view>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>
\ No newline at end of file
diff --git a/subPackage/police/onLine.vue b/subPackage/police/onLine.vue
index bbd6ccc..0732afa 100644
--- a/subPackage/police/onLine.vue
+++ b/subPackage/police/onLine.vue
@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 
-		<view class="row bgc-ff mt-20 flex  j-c-c">
+		<view class="row bgc-ff mt-20 flex f-d-c a-i-c  j-c-c">
 
 
 			<!-- <u-row customStyle="margin-bottom: 10px">
@@ -15,9 +15,11 @@
 				</u-col>
 			</u-row> -->
 
-
-			<view class="round bgc-main">
-				{{onLine?"离线":"在线"}}
+			<view class="f-32 mb-20">
+				当前状态 {{onLine?"在线 ":"离线"}}
+			</view>
+			<view class="round" :class="onLine?'bgc-main':' bgc-gray '" @click="asyncChange(!onLine)">
+				{{onLine?"在线 ":"离线"}}
 			</view>
 
 
@@ -51,7 +53,7 @@
 		data() {
 			return {
 				onLine: false,
-				// userInfo: {},
+				userInfo: {},
 				loading: false,
 			}
 		},
@@ -151,6 +153,7 @@
 		// padding: 20rpx;
 		// margin: 0 20rpx;
 		// border-radius: 4rpx;
+		padding-top: 200rpx;
 	}
 
 	.container {
@@ -177,10 +180,18 @@
 	}
 
 	.round {
-		width: 80rpx;
-		height: 80rpx;
+		width: 200rpx;
+		height: 200rpx;
+		line-height: 200rpx;
 		border-radius: 50%;
-		margin-top: 30%;
 
+		text-align: center;
+		color: #fff;
+		font-weight: bold;
+
+	}
+
+	.bgc-gray {
+		background: #949494;
 	}
 </style>
\ No newline at end of file
diff --git a/subPackage/workbench/views/cscj.vue b/subPackage/workbench/views/cscj.vue
index 5f859b8..2895086 100644
--- a/subPackage/workbench/views/cscj.vue
+++ b/subPackage/workbench/views/cscj.vue
@@ -241,7 +241,7 @@
 				<view class="info" v-for="(item, index) in personNumArr" :key="index">
 					<view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
 						<view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
-						<view v-if="(index+1) > 1">
+						<view>
 							<u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
 						</view>
 					</view>
@@ -653,8 +653,8 @@
 				genderValue: "",
 				showNationPicker: false,
 				showGenderPicker: false,
-				personNum: 1,
-				personNumArr: [1],
+				personNum: 0,
+				personNumArr: [],
 				isLegalSame: 1 //法人信息是否与负责人一致  1是  2否
 			}
 		},
diff --git a/subPackage/workbench/views/editCscj.vue b/subPackage/workbench/views/editCscj.vue
index 3e32e72..6f8543f 100644
--- a/subPackage/workbench/views/editCscj.vue
+++ b/subPackage/workbench/views/editCscj.vue
@@ -204,7 +204,7 @@
 				<view class="info" v-for="(item, index) in personNumArr" :key="index">
 					<view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
 						<view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
-						<view v-if="(index+1) > 1">
+						<view>
 							<u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
 						</view>
 					</view>
@@ -616,8 +616,8 @@
 				genderValue: "",
 				showNationPicker: false,
 				showGenderPicker: false,
-				personNum: 1,
-				personNumArr: [1],
+				personNum: 0,
+				personNumArr: [],
 			}
 		},
 		options: {
diff --git a/subPackage/workbench/views/editExamine.vue b/subPackage/workbench/views/editExamine.vue
index b0f6927..de0e529 100644
--- a/subPackage/workbench/views/editExamine.vue
+++ b/subPackage/workbench/views/editExamine.vue
@@ -146,7 +146,7 @@
 				<view class="info" v-for="(item, index) in personNumArr" :key="index">
 					<view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
 						<view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
-						<view v-if="(index+1) > 1">
+						<view>
 							<u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
 						</view>
 					</view>
@@ -277,7 +277,7 @@
 						}
 					]
 				},
-				personNum: 1,
+				personNum: 0,
 				curSelectSite: {},
 				jwd: "",
 				placeList: [],
@@ -300,7 +300,7 @@
 				genderValue: "",
 				showNationPicker: false,
 				showGenderPicker: false,
-				personNumArr: [1],
+				personNumArr: [],
 			}
 		},
 		onShow() {

--
Gitblit v1.9.3