Parcourir la source

Merge branch 'master' of http://116.63.33.55/git/read_opc

FinalYu il y a 2 ans
Parent
commit
0742a66f8f

+ 25 - 0
reado-app/App.vue

@@ -1,7 +1,32 @@
 <script>
+	import {
+		getToken
+	} from './utils/auth.js'
 	export default {
 		onLaunch: function() {
 			console.log('App Launch')
+			const token = getToken()
+			if (token) {
+				// #ifdef APP-PLUS
+				uni.reLaunch({
+					url: "/pages/reportForm/index",
+					success: () => {
+						// #ifdef APP-PLUS
+						plus.navigator.closeSplashscreen();
+						// #endif
+					}
+				})
+				// #endif
+			} else {
+				uni.reLaunch({
+					url: "/pages/login/index",
+					success: () => {
+						// #ifdef APP-PLUS
+						plus.navigator.closeSplashscreen();
+						// #endif
+					}
+				})
+			}
 		},
 		onShow: function() {
 			console.log('App Show')

+ 5 - 2
reado-app/manifest.json

@@ -14,11 +14,14 @@
         "nvueStyleCompiler" : "uni-app",
         "compilerVersion" : 3,
         "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
+            "alwaysShowBeforeRender" : false,
             "waiting" : true,
-            "autoclose" : true,
+            "autoclose" : false,
             "delay" : 0
         },
+        "compatible" : {
+            "ignoreVersion" : true
+        },
         /* 模块配置 */
         "modules" : {},
         /* 应用发布信息 */

+ 2 - 2
reado-app/pages.json

@@ -86,9 +86,9 @@
 	},
 	"tabBar": {
 		"iconfontSrc": "static/fonts/iconfont.ttf",
-		"fontSize":"16px",
+		"fontSize":"13px",
 		"height":"56px",
-		"iconWidth":"30px",
+		"iconWidth":"29px",
 		"list": [{
 			"pagePath": "pages/reportForm/index",
 			"text": "报表",

+ 7 - 5
reado-app/pages/message/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="content">
-		<uni-list :key="key">
+		<uni-list>
 			<uni-list-item v-for="item in msgList" :key="item.id" :title="item.noticeTitle" :note="item.createTime" link
 				ellipsis="1" :to="`/pages/message/msg-detail/index?id=${item.id}&state=${item.readState}`">
 				<template v-slot:header v-if="item.readState===0">
@@ -25,14 +25,16 @@
 					limit: 20
 				},
 				// 列表数据
-				msgList: [],
-				key:0
+				msgList: []
 			};
 		},
 		onShow() {
 			this.queryParams.limit = 20
 			this.getMsgList()
-			this.key++
+			uni.pageScrollTo({
+				scrollTop: 0,
+				duration: 0
+			})
 		},
 		onPullDownRefresh() {
 			this.queryParams.limit = 20
@@ -40,7 +42,7 @@
 		},
 		onReachBottom() {
 			this.queryParams.limit += 10
-			this.getAllReport()
+			this.getMsgList()
 		},
 		methods: {
 			// 获取消息数据

+ 6 - 4
reado-app/pages/reportForm/index.vue

@@ -1,6 +1,6 @@
 <template>
-	<view class="content" :key="key">
-		<uni-list >
+	<view class="content">
+		<uni-list>
 			<uni-list-item v-for="item in reportList" :key="item.id" :title="item.reportTableName"
 				:note="item.createTime" link ellipsis="1"
 				:to="`/pages/reportForm/report-detail/index?id=${item.id}&title=${item.reportTableName}`" />
@@ -21,13 +21,15 @@
 				},
 				// 列表数据
 				reportList: [],
-				key:0
 			};
 		},
 		onShow() {
 			this.queryParams.limit = 20
 			this.getAllReport()
-			this.key++
+			uni.pageScrollTo({
+				scrollTop: 0,
+				duration: 0
+			})
 		},
 		onPullDownRefresh() {
 			this.queryParams.limit = 20

+ 18 - 10
reado-app/static/webview/report-wv.html

@@ -11,11 +11,17 @@
 		<link rel='stylesheet' href='../luckysheet/dist/assets/iconfont/iconfont.css' />
 		<link rel="stylesheet" href="../dist/css/layui.css">
 		<style>
-			.la-btn {
+			.la-btn{
 				position: absolute;
-				bottom: 20px;
-				left: 50%;
-				margin-left: -35px
+				bottom: 35px;
+				width: 96%;
+				padding:0 2%;
+			}
+			.btn{
+				width:100%;
+			}
+			.layui-laypage-em{
+				background-color: #1e9fff !important;
 			}
 		</style>
 	</head>
@@ -25,7 +31,9 @@
 
 		<table id="demo" lay-filter="test"></table>
 
-		<button id="recordBtn" type="button" class="layui-btn layui-btn-normal layui-btn-sm la-btn">运行记录</button>
+		<div class="la-btn">
+			<button id="recordBtn" type="button" class="layui-btn layui-btn-normal layui-btn-sm btn">运行记录</button>
+		</div>
 
 		<script src="../jquery.min.js"></script>
 		<script src="../dist/layui.js"></script>
@@ -80,16 +88,16 @@
 								}
 							});
 
-							//第一个实例
 							var tableReload = table.render({
 								elem: '#demo',
-								height: 312,
 								width: 300,
+								page: {
+									elem: '#demo',
+									layout: ['prev', 'page', 'next', 'count']
+								},
 								url: 'http://192.168.0.40:8081/reportTable/getAutoChReportTable',
 								where: {
-									autoTableId: id,
-									page: 1,
-									limit: 10,
+									autoTableId: id
 								},
 								text: {
 									none: '暂无数据' //默认:无数据。