From db9cf0e24e4d0a3953a98eb222a643eece4a6748 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sun, 04 Jul 2021 08:32:29 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android

---
 pages.json                        |   18 +-
 pages/alarm_list/alarm_list.vue   |   13 -
 pages/article/article.vue         |   95 +++++++++++--
 pages/clockSignIn/clockSignIn.vue |   96 ++++++++-----
 pages/myself/childen/genxin.vue   |   93 +-----------
 pages/myself/myself.vue           |   30 +++
 pages/reported/reported.vue       |   31 ++-
 7 files changed, 209 insertions(+), 167 deletions(-)

diff --git a/pages.json b/pages.json
index 3e15d70..f05d561 100644
--- a/pages.json
+++ b/pages.json
@@ -36,7 +36,8 @@
 			"name": "aboutUs",
 			"style": {
 				"navigationBarTitleText": "关于我们",
-				"navigationBarBackgroundColor": "#F56968"
+				"navigationBarBackgroundColor": "#0BB9C8",
+				"navigationBarTextStyle":"white"
 			}
 		},
 		{
@@ -44,7 +45,8 @@
 			"name": "shezhi",
 			"style": {
 				"navigationBarTitleText": "系统设置",
-				"navigationBarBackgroundColor": "#F56968"
+				"navigationBarBackgroundColor": "#0BB9C8",
+				"navigationBarTextStyle":"white"
 			}
 		},
 		{
@@ -59,8 +61,9 @@
 			"path": "pages/myself/childen/genxin",
 			"name": "genxin",
 			"style": {
-				"navigationBarTitleText": "版本信息",
-				"navigationBarBackgroundColor": "#F56968"
+				"navigationBarTitleText": "隐私政策",
+				"navigationBarBackgroundColor": "#0BB9C8",
+				"navigationBarTextStyle":"white"
 			}
 		},
 		{
@@ -238,10 +241,9 @@
 			"path": "pages/alarm_list/alarm_list",
 			"name": "alarm_list",
 			"style": {
-				"navigationBarTitleText": "我要查",
-				"app-plus":{
-					"titleNView":false
-				}
+				"navigationBarTitleText": "群防任务",
+				"navigationBarBackgroundColor": "#0cd7e5",
+				"navigationBarTextStyle":"white"
 			}
 		},
 		{
diff --git a/pages/alarm_list/alarm_list.vue b/pages/alarm_list/alarm_list.vue
index 26bbe2f..99595d5 100644
--- a/pages/alarm_list/alarm_list.vue
+++ b/pages/alarm_list/alarm_list.vue
@@ -2,12 +2,12 @@
 	<view class="alarm-list">
 		<!-- 自定义顶部导航栏 -->
 		<!-- <navBarTop :title="'我要查'"></navBarTop> -->
-		<uni-nav-bar class="uni-nav-bar-info" :fixed="true" :status-bar="true">
+		<!-- <uni-nav-bar class="uni-nav-bar-info" :fixed="true" :status-bar="true">
 			<view class="title" slot="default">群防任务</view>
 			<view slot="left" class="uni-nav-bar-left" @click="goBack()">
 				<image src="../../static/images/nav/back02.png"></image>
 			</view>
-		</uni-nav-bar>
+		</uni-nav-bar> -->
 		<view class="navigation-bar">
 			<view class="alarm-bar-total" :style="{color:totalColor,borderBottom:totalBoder}"
 				@click="getAlarmListInfo(1)">全部({{totalNumber}})</view>
@@ -27,7 +27,7 @@
 						</view>
 						<view class="alarm-status" :style="{color:processedColor}"
 							v-if="item.securityId!='' && item.jtype==1">处理中</view>
-						<view class="alarm-status" :style="{color:finishColor}" v-if="item.jtype==2">已处理</view>
+						<view class="alarm-status" :style="{color:finishColor}" v-if="item.jtype==2 && item.securityId!=''">已处理</view>
 					</view>
 					<view class="alarm-position-time">
 						<view class="image-place">
@@ -311,7 +311,7 @@
 	page {
 		width: 100%;
 		height: 100%;
-		background-color: rgba(243, 243, 243, 1);
+		background-color: #F7F7F7;
 		z-index: 999;
 	}
 </style>
@@ -334,6 +334,7 @@
 	}
 
 	.uni-nav-bar-info {
+		background-color: #0BB9C8;
 		// font-weight: 550;
 
 		.title {
@@ -367,8 +368,6 @@
 				top: 0.2rem;
 			}
 		}
-
-
 	}
 
 	.alarm-list {
@@ -376,7 +375,7 @@
 		flex-direction: column;
 
 		.navigation-bar {
-			border-top: 1rpx solid #C8C7CC;
+			// border-top: 1rpx solid #C8C7CC;
 			background-color: #FFFFFF;
 			width: 100%;
 			height: 43px;
diff --git a/pages/article/article.vue b/pages/article/article.vue
index f287511..c731603 100644
--- a/pages/article/article.vue
+++ b/pages/article/article.vue
@@ -7,8 +7,8 @@
 		</view> -->
 
 		<view class="article-tab">
-			<view :class="{'article-tab-title':true,'cccc':index == articleTabNum}" @click="goArticleTab(index)" v-for="(item,index) in articleTabArr"
-				:style="articleTabNum==index?'color:#000000':'color:#808080'">{{item}}</view>
+			<view :class="{'article-tab-title':true,'cccc':index == articleTabNum}" @click="goArticleTab(index,item.dictKey)" v-for="(item,index) in articleTabArr"
+				:style="articleTabNum==index?'color:#000000':'color:#808080'">{{item.dictValue}}</view>
 			<image src="../../static/images/article/menu.png"></image>
 		</view>
 		
@@ -16,7 +16,7 @@
 		    <view class="search-ico-wapper">
 				<image src="../../static/images/search/search.png" class="search-ico" mode=""></image>
 		    </view>
-		    <input type="text" value="" placeholder="搜索" class="search-text" maxlength="10" focus/>
+		    <input type="text" v-on:input ="getKeyword" v-model="keyword" placeholder="搜索" class="search-text" maxlength="10" focus/>
 			<view class="search-ico-wapper1">
 				<image src="../../static/images/article/microphone.png" class="search-ico-1" mode=""></image>
 			</view>
@@ -61,33 +61,78 @@
 				isLoadMore: false, //是否加载中
 				isFlash: false, //是否刷新
 				data: [],
-				titleList: ['推荐', '要闻', '新思想'],
 				titleNum: 0,
-				articleTabArr: ['全部', '视频', '社会', '经济', '热点'],
+				articleTabArr: [],
 				articleTabNum: 0,
 				navbarTopHeight: "10px",
-				tabbar:this.$store.state.tabbar
+				tabbar:this.$store.state.tabbar,
+				tabInfo:"0",
+				keyword:''
 			}
 		},
 		mounted() {
 			// this.getArtcilePageList();
 		},
 		onLoad() {
-			this.getArtcilePageList();
-			uni.stopPullDownRefresh();
+			//获取资讯类型
+			this.getArticleTypeListInfo();
+			//获取新闻数据
+			this.getArtcilePageList("0");
+			
 		},
 		//上拉加载更多
 		onReachBottom() {
-			// 
 			if (this.status=='nomore') return;
 			this.page = ++this.page;
 			setTimeout(() => {
-				this.getArtcilePageList();
-			}, 2000);
+				this.getArtcilePageList(this.tabInfo);
+			}, 1000);
 		},
 		methods: {
-			goArticleTab(index) {
+			//获取资讯类型信息
+			getArticleTypeListInfo(){
+				var that = this;
+				uni.request({
+					url: this.$store.state.piAPI + '/blade-system/dict-biz/dictionary?code=articleType',
+					method: 'GET',
+					data: {
+						current: this.page,
+						size: this.pagesize
+					},
+					success:(res) =>{
+						if(res.data.code==200){
+							const item = {
+								dictKey:"0",
+								dictValue:"全部"
+							}
+							that.articleTabArr.push(item);
+							//判断长度
+							if(res.data.data.length<=4){
+								res.data.data.forEach((item)=>{
+									that.articleTabArr.push(item);
+								})
+							}else{
+								//只取前4个
+								that.articleTabArr.push(res.data.data[0]);
+								that.articleTabArr.push(res.data.data[1]);
+								that.articleTabArr.push(res.data.data[2]);
+								that.articleTabArr.push(res.data.data[3]);
+							}
+							console.log(res,111);
+							console.log(that.articleTabArr,222);
+						}
+					},
+				})
+			},
+			
+			//根据资讯类型查询数据
+			goArticleTab(index,dictKey) {
+				this.tabInfo = dictKey;
 				this.articleTabNum = index;
+				//先清空数据
+				this.data=[];
+				//查询数据
+				this.getArtcilePageList(dictKey);
 			},
 			goTabDetail(index) {
 				this.titleNum = index;
@@ -102,23 +147,39 @@
 					url: './article_detail?detailData=' + JSON.stringify(detail)
 				});
 			},
-
+			//on input 通过 keyword 关键字查询
+			getKeyword(){
+				this.getArtcilePageList(this.tabInfo);
+			},
 			//获取资讯信息
 			getArtcilePageList(tab) {
 				var that = this;
+				var paramData = null;
+				if(Number(tab)==""){
+					paramData = {
+						current: this.page,
+						size: this.pagesize,
+						keyword:this.keyword
+					}
+				}else{
+					paramData = {
+						current: this.page,
+						size: this.pagesize,
+						keyword:this.keyword,
+						articleType:that.tabInfo
+					}
+				}
 				uni.request({
 					url: this.$store.state.piAPI + '/article/article/page',
 					method: 'GET',
-					data: {
-						current: this.page,
-						size: this.pagesize
-					},
+					data: paramData,
 					success: (res) => {
 						if (res.data.code == 200) {
 							if (res.data.data.records) {
 								//如果总数小于pageSize,不做其他操作
 								if (res.data.data.total < this.pagesize) {
 									that.data = res.data.data.records;
+									that.status='nomore';
 								} else {
 									if (res.data.data.records.length < this.pagesize) {
 										//如果数量小于分页数量,则为最后一页
diff --git a/pages/clockSignIn/clockSignIn.vue b/pages/clockSignIn/clockSignIn.vue
index 62975b8..48527fa 100644
--- a/pages/clockSignIn/clockSignIn.vue
+++ b/pages/clockSignIn/clockSignIn.vue
@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<!-- 自定义顶部导航栏 -->
-		<view class="uni-nav-bar-info" :fixed="true" :status-bar="true">
+		<!-- <view class="uni-nav-bar-info" :fixed="true" :status-bar="true">
 			<view class="uni-nav-bar-left" @click="goBack()">
 				<image src="../../static/images/nav/back02.png" />
 			</view>
@@ -9,7 +9,16 @@
 			<view class="right">
 				<view class="title-right">打卡记录</view>
 			</view>
-		</view>
+		</view> -->
+		<u-navbar 
+			:is-back="true" 
+			title="考勤打卡" 
+			:background="background"
+			back-icon-color="#FFF"
+			title-color="#FFF"
+			>
+			<view class="navbar-right" slot="right">考勤记录</view>	
+		</u-navbar>
 		<view class="clock-time-background"></view>
 		<view class="clock-time">
 			<view class="clock-info">
@@ -51,7 +60,10 @@
 				name:'',
 				jd:'',
 				wd:'',
-				address:''
+				address:'',
+				background:{
+					backgroundColor:"#0BB9C8"
+				}
 			}
 		},
 		mounted() {
@@ -105,38 +117,36 @@
 			//去打卡
 			goClock() {
 			    var that = this;
-			    axios({
-			        method: "POST",
-			        url: this.$store.state.piAPI + `/attendance/AppSave`,
-			        params: {
-			            number: this.$store.state.puserID,
-			            name: this.name,
-			            clockTime: this.getNowTime(1),
-			            jd: this.jd,
-			            wd: this.wd,
-			            address: this.address
-			        },
-			    }).then((resdata) => {
-			        //不在考勤范围内
-			        if (resdata.data.code == 400) {
-			            layui.use('layer', function() {
-			                var layer = layui.layer;
-			                layer.msg('打卡失败,不在考勤范围', {
-			                    icon: 0
-			                });
-			            });
-			        }
-			        //打卡成功
-			        if (resdata.data.code == 200) {
-			            layui.use('layer', function() {
-			                var layer = layui.layer;
-			                layer.msg('打卡成功!', {
-			                    icon: 1
-			                });
-			            });
-			        }
-			
-			    });
+			    uni.request({
+			    	url: this.$store.state.piAPI + `/attendance/AppSave`,
+					method: "POST",
+					data:{
+					    number: this.$store.state.puserID,
+					    name: this.name,
+					    clockTime: this.getNowTime(1),
+					    jd: this.jd,
+					    wd: this.wd,
+					    address: this.address
+					},
+					success(resdata) {
+						//不在考勤范围内
+						if (resdata.data.code == 400) {
+							uni.showToast({
+							    title: '不在考勤范围,打卡失败!',
+								icon:'none',
+							    duration: 2000
+							});
+						}
+						//打卡成功
+						if (resdata.data.code == 200) {
+							uni.showToast({
+							    title: '打卡成功!',
+								icon:'success',
+							    duration: 2000
+							});
+						}
+					}
+			    })
 			},
 			
 			//获取当前时间
@@ -185,7 +195,8 @@
 	page{
 		width: 100%;
 		height: 100%;
-		background-color: #FCFBFC;
+		/* background-color: #FCFBFC; */
+		background-color: #F7f7f7;
 	}
 </style>
 
@@ -211,6 +222,14 @@
 		display: flex;
 		align-items: center;
 		justify-content: center;
+	}
+	
+	
+	.navbar-right{
+		color: #fff;
+		font-size: 0.7rem;
+		margin-right: 1.5rem;
+		margin-top: 0.2rem;
 	}
 	
 	.content{
@@ -266,7 +285,8 @@
 		.clock-time-background{
 			width: 100%;
 			height: 15rem;
-			background-color: #F5F5F5;
+			// background-color: #F5F5F5;
+			background-color: #F3F3F3;
 		}
 		
 		
@@ -343,7 +363,7 @@
 							height: 6rem;
 							border-radius: 100px;
 							color: #FFFFFF;
-							background-image: linear-gradient(to bottom,#65CBA9,#66D0AC);
+							background-image: linear-gradient(to bottom,#0FD0E1,#0FD0E1);
 							display: flex;
 							flex-direction: column;
 							align-items: center;
diff --git a/pages/myself/childen/genxin.vue b/pages/myself/childen/genxin.vue
index f33c59f..dfabdd6 100644
--- a/pages/myself/childen/genxin.vue
+++ b/pages/myself/childen/genxin.vue
@@ -1,90 +1,21 @@
 <template>
-	<view class="aboutUs">
-		<image src="../../../static/users.png" mode=""></image>
-		<view class="a">
-			6.4.1
-		</view>
-		<!-- <view class="b">
-			2020.02.29
-		</view> -->
-		<!-- <view class="genxinBut">
-			<button class="custom-btn btn-3" @click="upMain"><span>点击更新</span></button>
-		</view> -->
+	<view class="shezhi">
+		更多功能即将上线······
 	</view>
 </template>
 
 <script>
-	export default {
-		methods: {
-			upMain() {
-				uni.showLoading({
-					title: "正在检查更新...",
-					mask: true
-				})
-				var time = setTimeout(() => {
-					wx.showToast({
-						title: '您当前是最新版!',
-						icon: "success",
-						duration: 1000
-					})
-					time = null
-				}, 1000)
-			}
-		}
-	}
 </script>
 
 <style lang="scss" scoped>
-	.aboutUs {
-		width: 100%;
-		height: 100%;
-		display: flex;
-		align-items: center;
-		flex-direction: column;
-
-		image {
-			width: 4rem;
-			height: 4rem;
-			position: relative;
-			top: 450rpx;
-		}
-
-		.a {
-			position: relative;
-			top: 450rpx;
-			padding-top: 1rem;
-		}
-
-		.genxinBut {
-			.custom-btn {
-				width: 130px;
-				height: 40px;
-				color: #fff;
-				border-radius: 5px;
-				padding: 10px 25px;
-				font-family: 'Lato', sans-serif;
-				font-weight: 500;
-				background: transparent;
-				cursor: pointer;
-				transition: all 0.3s ease;
-				position: relative;
-				display: inline-block;
-				box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, .5),
-					7px 7px 20px 0px rgba(0, 0, 0, .1),
-					4px 4px 5px 0px rgba(0, 0, 0, .1);
-				outline: none;
-			}
-
-			.btn-3 {
-				background: rgb(0, 172, 238);
-				background: linear-gradient(0deg, rgba(0, 172, 238, 1) 0%, rgba(2, 126, 251, 1) 100%);
-				width: 130px;
-				height: 40px;
-				line-height: 42px;
-				padding: 0;
-				border: none;
-
-			}
-		}
-	}
+.shezhi{
+	width: 100%;
+	height: 100%;
+	display: flex;
+	align-items: center;
+	// justify-content: center;
+	position: absolute;
+	top: 45%;
+	flex-direction: column;
+}
 </style>
diff --git a/pages/myself/myself.vue b/pages/myself/myself.vue
index 4af6745..78f056a 100644
--- a/pages/myself/myself.vue
+++ b/pages/myself/myself.vue
@@ -4,8 +4,8 @@
 		<view class="m-top">
 			<view class="my-user-info">
 				<view class="user-name-id">
-					<view class="user-name">{{userName}}</view>
-					<view class="user-id">ID: &nbsp;4120552252</view>
+					<view class="user-name">{{name}}</view>
+					<view class="user-id">ID: &nbsp;{{id}}</view>
 				</view>
 				<view class="userImg">
 					<img class="img" :src="useimg" @click="ChooseImage">
@@ -13,7 +13,7 @@
 			</view>
 			<view class="my-dept-info">
 				<view class="dept-info">
-					<view class="dept-name">所属组织:&nbsp;**派出所--**警务站</view>
+					<view class="dept-name">所属组织:&nbsp;{{tenantName}}</view>
 				</view>
 			</view>
 		</view>
@@ -94,7 +94,10 @@
 					},
 
 				],
-				tabbar:this.$store.state.tabbar
+				tabbar:this.$store.state.tabbar,
+				name:'',
+				id:'',
+				tenantName:''
 			}
 		},
 		components: {
@@ -109,6 +112,10 @@
 			}
 		},
 		onLoad() {
+			if(this.$store.state.puserID){
+				//获取个人信息
+				this.getOneselfInFo();
+			}
 			if(this.$store.state.avatar!=null && this.$store.state.avatar!=''){
 				this.useimg = this.$store.state.avatar;
 			}
@@ -166,6 +173,20 @@
 					animationType: 'slide-in-top',
 					animationDuration: 20000
 				});
+			},
+			//登录成功后,获取个人信息
+			getOneselfInFo(){
+				var that = this;
+				//保安信息查询
+				uni.request({
+					url:'http://s16s652780.51mypc.cn/api/blade-user/details?id='+this.$store.state.puserID,
+					method:'POST',
+					success(resdata) {
+						that.name = resdata.data.data.realName;
+						that.id = resdata.data.data.id;
+						that.tenantName = resdata.data.data.tenantName;
+					}
+				})
 			},
 			operation(e) {
 				let that = this;
@@ -392,7 +413,6 @@
 						font-weight: 550;
 					}
 				}
-				
 			}
 
 
diff --git a/pages/reported/reported.vue b/pages/reported/reported.vue
index 4256c84..8c19247 100644
--- a/pages/reported/reported.vue
+++ b/pages/reported/reported.vue
@@ -1,16 +1,15 @@
 <template>
 	<view class="policeDetails">
 		<!-- 自定义顶部导航栏 -->
-		<!-- <navBarTop :title="'我要报'"></navBarTop> -->
-		<uni-nav-bar class="uni-nav-bar-info" :fixed="true" :status-bar="true">
-			<view class="title" slot="default">{{title}}</view>
-			<view slot="left" class="uni-nav-bar-left" @click="goBack()">
-				<image :src="backImage"></image>
-			</view>
-			<view class="right" slot="right">
-				<view class="title-right">历史上报</view>
-			</view>
-		</uni-nav-bar>
+		<u-navbar
+			:is-back="true" 
+			title="事件上报" 
+			:background="background"
+			back-icon-color="#FFF"
+			title-color="#FFF"
+			>
+			<view class="navbar-right" slot="right">历史上报</view>	
+		</u-navbar>
 		<!-- <view class="row address">
 			<view class="title">地址</view>
 			<input v-model="place" placeholder="请输入地址" />
@@ -67,7 +66,10 @@
 				imgs: [],
 				videos: [],
 				title: '事件上报',
-				backImage: '../../static/images/nav/back02.png'
+				backImage: '../../static/images/nav/back02.png',
+				background:{
+					backgroundColor:"#0BB9C8"
+				}
 			}
 		},
 		methods: {
@@ -243,6 +245,13 @@
 </script>
 
 <style lang="scss">
+	
+	.navbar-right{
+		color: #fff;
+		font-size: 0.7rem;
+		margin-right: 1.5rem;
+		margin-top: 0.2rem;
+	}
 
 	.uni-nav-bar-info {
 		// font-weight: 550;

--
Gitblit v1.9.3