فهرست منبع

Merge branch '165' of uskycloud/usky-web-mobile into master

gez 2 سال پیش
والد
کامیت
95a7d5456a
44فایلهای تغییر یافته به همراه1571 افزوده شده و 673 حذف شده
  1. 3 0
      src/App.vue
  2. 0 20
      src/components/export.vue
  3. 176 197
      src/components/list-test/list-test.vue
  4. 38 0
      src/components/pages-harder/index.vue
  5. 21 26
      src/components/zzlb-mutiselect/zzlb-mutiselect.vue
  6. 12 5
      src/config.js
  7. 15 1
      src/pages.json
  8. 0 7
      src/pages/analyse/analyse.vue
  9. 0 13
      src/pages/business/mhxf/coordination/index.vue
  10. 1 8
      src/pages/business/mhxf/fireReport/components/detailed.vue
  11. 1 8
      src/pages/business/mhxf/fireReport/components/detailedPath.vue
  12. 4 5
      src/pages/business/mhxf/fireReport/index.vue
  13. 742 0
      src/pages/business/mhxf/informationSelect-test/index.vue
  14. 2 26
      src/pages/business/mhxf/needMatter/index.vue
  15. 6 0
      src/pages/business/mhxf/unitInfoCollection/index.vue
  16. 6 6
      src/pages/business/mhxf/xunJian/collect/components/collectDetail.vue
  17. 6 6
      src/pages/business/mhxf/xunJian/collect/components/collectRecord.vue
  18. 1 13
      src/pages/business/mhxf/xunJian/plan/components/content.vue
  19. 1 11
      src/pages/business/mhxf/xunJian/plan/components/report.vue
  20. 2 12
      src/pages/business/mhxf/xunJian/plan/components/siteDetails.vue
  21. 4 16
      src/pages/business/mhxf/xunJian/plan/components/upload.vue
  22. 3 12
      src/pages/business/mhxf/xunJian/plan/index.vue
  23. 1 10
      src/pages/business/mhxf/xunJian/xunJian.vue
  24. 3 1
      src/pages/common/textview/index.vue
  25. 43 0
      src/pages/common/textview/index1.vue
  26. 28 31
      src/pages/index.vue
  27. 0 4
      src/pages/info/info.vue
  28. 161 132
      src/pages/login.vue
  29. 0 4
      src/pages/mine/about/index.vue
  30. 0 4
      src/pages/mine/help/index.vue
  31. 2 6
      src/pages/mine/index.vue
  32. 3 1
      src/pages/mine/info/edit.vue
  33. 3 1
      src/pages/mine/pwd/index.vue
  34. 7 5
      src/pages/mine/setting/index.vue
  35. 146 62
      src/pages/serveConfig.vue
  36. 1 1
      src/pages/setting/building/building.vue
  37. 6 5
      src/pages/setting/setting.vue
  38. 1 1
      src/permission.js
  39. 4 0
      src/plugins/index.js
  40. 88 0
      src/plugins/setting.js
  41. 3 2
      src/static/scss/colorui.css
  42. 6 1
      src/static/scss/public.scss
  43. 12 10
      src/store/modules/public.js
  44. 9 0
      src/utils/request.js

+ 3 - 0
src/App.vue

@@ -38,6 +38,9 @@ onHide(() => {
 
 onLaunch(() => {
   console.log("App Launch");
+  // #ifdef APP-PLUS
+  plus.screen.lockOrientation("portrait-primary");//设置不可横屏
+  // #endif
   initApp();
 });
 </script>

+ 0 - 20
src/components/export.vue

@@ -1,20 +0,0 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		name:"export",
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style>
-
-</style>

+ 176 - 197
src/components/list-test/list-test.vue

@@ -1,205 +1,184 @@
 <template>
-	<view  class="site-wrapper" ref="contentWrapper">
-		
-		<!-- 筛选框start -->
-		<view class="ding">
-			<view class="cu-bar search bg-gray filter-section">
-				<view class="search-form round bg-white">
-					<text class="cuIcon-search"></text>
-					<input class="" @focus="InputFocus" @blur="InputBlur" :adjust-position="false" type="text" placeholder="请输入站点名称"
-					 confirm-type="search" v-model="nowSiteName"></input>
-				</view>
-				<view class="action">
-					<button class="cu-btn bg-blue round" @click="searchData">查询</button>
-				</view>
-			</view>
-		</view>
-		<!-- 筛选框end -->
-		
-		<!-- 站点列表start -->
-		<view class="site-items">
-			<view class="cu-list menu-avatar">
-				<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in bindData"
-				 :key="index" :data-target="'move-box-' + index">
-					<view class="cu-avatar round lg"  v-bind:style="{ 'background-image': 'url(' + nowIcon+ ')' }"></view>
-					
-					
-					<view class="content" v-if="nowType==1"  @tap="goNowUrl(item)" >
-						<view class="text-grey site-tit">
-							<text style="width:260rpx;" class="inOneLine">{{item.siteName}}</text>
-							
-							<text style="font-size:28rpx;text-align:right"> 
-							   ( 共{{item.siteAlarmCount}}个未处理告警 )
-							</text>
-						</view>
-					</view>
-					
-					<view class="content" v-else  @tap="goNowUrl" @longpress="showDetail(item)">
-						<view class="text-grey site-tit">
-							{{item.siteName}}
-							<text>(共3个设备)</text>
-						</view>
-						<view class="showDetail" v-if="item.isShow" @tap.stop="goNowDetailUrl" >查看详情</view>
-					</view>
-					
-					
-					
-					
-					<view class="nav-right num">
-						<view class="text-grey">
-							<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 站点列表end -->
-	
-		
-	</view>
+  <view class="site-wrapper" ref="contentWrapper">
+    <!-- 筛选框start -->
+    <view class="ding">
+      <view class="cu-bar search bg-gray filter-section">
+        <view class="search-form round bg-white">
+          <text class="cuIcon-search"></text>
+          <input class="" @focus="InputFocus" @blur="InputBlur" :adjust-position="false" type="text" placeholder="请输入站点名称" confirm-type="search" v-model="nowSiteName" />
+        </view>
+        <view class="action">
+          <button class="cu-btn bg-blue round" @click="searchData">查询</button>
+        </view>
+      </view>
+    </view>
+    <!-- 筛选框end -->
+
+    <!-- 站点列表start -->
+    <view class="site-items">
+      <view class="cu-list menu-avatar">
+        <view class="cu-item" :class="modalName == 'move-box-' + index ? 'move-cur' : ''" v-for="(item, index) in bindData" :key="index" :data-target="'move-box-' + index">
+          <view class="cu-avatar round lg" v-bind:style="{ 'background-image': 'url(' + nowIcon + ')' }"></view>
+
+          <view class="content" v-if="nowType == 1" @tap="goNowUrl(item)">
+            <view class="text-grey site-tit">
+              <text style="width: 260rpx" class="inOneLine">{{ item.siteName }}</text>
+
+              <text style="font-size: 28rpx; text-align: right"> ( 共{{ item.siteAlarmCount }}个未处理告警 ) </text>
+            </view>
+          </view>
+
+          <view class="content" v-else @tap="goNowUrl" @longpress="showDetail(item)">
+            <view class="text-grey site-tit">
+              {{ item.siteName }}
+              <text>(共3个设备)</text>
+            </view>
+            <view class="showDetail" v-if="item.isShow" @tap.stop="goNowDetailUrl">查看详情</view>
+          </view>
+
+          <view class="nav-right num">
+            <view class="text-grey">
+              <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <!-- 站点列表end -->
+  </view>
 </template>
 
 <script>
-	export default {
-		// name: 'listTest',
-		props:{
-			bindType:{
-				type:Number,
-				default: ''
-			},
-			bindData:{
-				type:Array,
-				default: ''
-			},
-			bindUrl:{
-				type:String,
-				default: ''
-			},
-			bindDetailUrl:{
-				type:String,
-				default: ''
-			},
-			bindIcon:{
-				type:String,
-				default: ''
-			},
-			bindNum:{
-				type:String,
-				default: ''
-			},
-			bindSiteName:{
-				type:String,
-				default: ''
-			}
-		},
-		data() {
-			return {
-				modalName: null,
-				nowData:this.bindData,
-				nowUrl:this.bindUrl,
-				nowDetailUrl:this.bindDetailUrl,
-				nowIcon:this.bindIcon,
-				nowNum:this.bindNum,
-				nowType:this.bindType,
-				nowSiteName:this.bindSiteName,
-				
-			};
-		},
-		onPullDownRefresh() {
-			console.log('refresh');
-			setTimeout(function() {
-				uni.stopPullDownRefresh();
-			}, 1000);
-		},
-		
-		computed: {
-			newSiteListData() {
-				return this.nowData.map(item => {
-					this.$set(item, "isShow", false)
-					return item
-				})
-			}
-		
-		},
-		
-		mounted() {
-			document.addEventListener('click', (e) => {
-				if (e.target.className != 'showDetail') {
-					this.nowData.forEach(item => {
-						item.isShow = false
-					})
-				}
-			})
-		},
-		methods:{
-			
-			searchData(){
-				// console.log("a: "+val, oldVal);
-				this.$parent.getDataList({
-					"siteName":this.nowSiteName
-				})
-			},
-			
-			
-			// 隐藏显示
-			showDetail(e) {
-				// alert(1);
-				// 存储点击那一项的状态
-				const nowStatu = e.isShow;
-				// 将每一项列表的isShow设置为false,让所有的列表都隐藏
-				this.nowData.forEach(item => {
-					item.isShow = false
-				})
-				// 用于再次点击该项的取反
-				e.isShow = !nowStatu
-			},
-			
-			
-			
-			// 页面跳转
-			goNowUrl(item) {
-				if(item.siteAlarmCount){
-					uni.navigateTo({
-						url: this.nowUrl+'?companyCode='+item.companyCode,
-						success: res => {},
-						fail: () => {},
-						complete: () => {}
-					});
-				}
-				
-			},
-			
-			goNowDetailUrl() {
-				uni.navigateTo({
-					url: this.nowDetailUrl,
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			},
-			InputFocus(e) {
-				this.InputBottom = e.detail.height
-			},
-			InputBlur(e) {
-				this.InputBottom = 0
-			},
-		}
-	}
+export default {
+  // name: 'listTest',
+  props: {
+    bindType: {
+      type: Number,
+      default: "",
+    },
+    bindData: {
+      type: Array,
+      default: "",
+    },
+    bindUrl: {
+      type: String,
+      default: "",
+    },
+    bindDetailUrl: {
+      type: String,
+      default: "",
+    },
+    bindIcon: {
+      type: String,
+      default: "",
+    },
+    bindNum: {
+      type: String,
+      default: "",
+    },
+    bindSiteName: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      modalName: null,
+      nowData: this.bindData,
+      nowUrl: this.bindUrl,
+      nowDetailUrl: this.bindDetailUrl,
+      nowIcon: this.bindIcon,
+      nowNum: this.bindNum,
+      nowType: this.bindType,
+      nowSiteName: this.bindSiteName,
+    };
+  },
+  onPullDownRefresh() {
+    console.log("refresh");
+    setTimeout(function () {
+      uni.stopPullDownRefresh();
+    }, 1000);
+  },
+
+  computed: {
+    newSiteListData() {
+      return this.nowData.map((item) => {
+        this.$set(item, "isShow", false);
+        return item;
+      });
+    },
+  },
+
+  mounted() {
+    document.addEventListener("click", (e) => {
+      if (e.target.className != "showDetail") {
+        this.nowData.forEach((item) => {
+          item.isShow = false;
+        });
+      }
+    });
+  },
+  methods: {
+    searchData() {
+      // console.log("a: "+val, oldVal);
+      this.$parent.getDataList({
+        siteName: this.nowSiteName,
+      });
+    },
+
+    // 隐藏显示
+    showDetail(e) {
+      // alert(1);
+      // 存储点击那一项的状态
+      const nowStatu = e.isShow;
+      // 将每一项列表的isShow设置为false,让所有的列表都隐藏
+      this.nowData.forEach((item) => {
+        item.isShow = false;
+      });
+      // 用于再次点击该项的取反
+      e.isShow = !nowStatu;
+    },
+
+    // 页面跳转
+    goNowUrl(item) {
+      if (item.siteAlarmCount) {
+        uni.navigateTo({
+          url: this.nowUrl + "?companyCode=" + item.companyCode,
+          success: (res) => {},
+          fail: () => {},
+          complete: () => {},
+        });
+      }
+    },
+
+    goNowDetailUrl() {
+      uni.navigateTo({
+        url: this.nowDetailUrl,
+        success: (res) => {},
+        fail: () => {},
+        complete: () => {},
+      });
+    },
+    InputFocus(e) {
+      this.InputBottom = e.detail.height;
+    },
+    InputBlur(e) {
+      this.InputBottom = 0;
+    },
+  },
+};
 </script>
 
 <style>
-	
-	.showDetail {
-		position: absolute;
-		background: #fff;
-		box-shadow: 0 1px 6px 0 rgb(32 33 36 / 28%);
-		padding: 0rpx 32rpx;
-		border-radius: 10rpx;
-		top: 42rpx;
-		right: 0%;
-		z-index: 3000000;
-		font-size: 28rpx;
-	
-	}
-
+.showDetail {
+  position: absolute;
+  background: #fff;
+  box-shadow: 0 1px 6px 0 rgb(32 33 36 / 28%);
+  padding: 0rpx 32rpx;
+  border-radius: 10rpx;
+  top: 42rpx;
+  right: 0%;
+  z-index: 3000000;
+  font-size: 28rpx;
+}
 </style>

+ 38 - 0
src/components/pages-harder/index.vue

@@ -0,0 +1,38 @@
+<template>
+  <view :style="{ paddingTop: statusBarHeight + 'px' }"></view>
+  <view v-if="navbarShow" style="margin-bottom: 44px">
+    <u-navbar leftText="返回" :title="navbar_title" :safeAreaInsetTop="true">
+      <template #left>
+        <view class="u-nav-slot" style="display: flex">
+          <u-icon name="arrow-left" size="19"></u-icon>
+          <u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
+          <u-icon name="home" size="20"></u-icon>
+        </view>
+      </template>
+    </u-navbar>
+  </view>
+</template>
+<script setup>
+import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";
+
+const props = defineProps({
+  navbarShow: {
+    type: Boolean,
+    default: false,
+  },
+  navbarTitle: {
+    type: String,
+    default: "",
+  },
+});
+
+const navbar_title = ref(props.navbarTitle);
+const navbar_show = ref(props.navbarShow);
+const statusBarHeight = ref(0);
+
+onLoad((option) => {
+  let systemInfo = uni.getSystemInfoSync();
+  statusBarHeight.value = systemInfo.statusBarHeight; //获取刘海屏高度
+});
+</script>

+ 21 - 26
src/components/zzlb-mutiselect/zzlb-mutiselect.vue

@@ -1,15 +1,15 @@
 <template>
-  <view class="" style="width: 100%;">
-    <view class=" flex flex-wrap">
-      <view v-for="(item, index) in items" class="cu-tag bg-cyan radius">
+  <view class="" style="width: 100%">
+    <view class="flex flex-wrap">
+      <view v-for="(item, index) in items" :key="index" class="cu-tag bg-cyan radius">
         <slot name="default" v-bind:item="item">{{ item }}</slot>
         <text class="margin-left line-blue cuIcon-close round bg-red" @click="onremove(index)"></text>
       </view>
-      <view class="flex ">
+      <view class="flex">
         <input style1="width: 60px;" placeholder="输入..." type="text" v-model="query" @input="onshuru" @click="onquery" @keyup="onquery" />
         <text
           v-if="query"
-          class=" cuIcon-close "
+          class="cuIcon-close"
           @click="
             query = '';
             onquery();
@@ -23,12 +23,7 @@
         <button class="cu-btn " @click="visible = 0">取消</button>
         <button class="cu-btn " @click="onqueren">确认</button>
       </view> -->
-      <picker-view
-        class="picker-view"
-        @change="e => (pvvalue = mlist[e.detail.value[0]])"
-        indicator-style1="height:40px"
-        :style1="{ height: (mlist.length > 6 ? 6 : mlist.length / 2) * 34 + 'px' }"
-      >
+      <picker-view class="picker-view" @change="(e) => (pvvalue = mlist[e.detail.value[0]])" indicator-style1="height:40px" :style1="{ height: (mlist.length > 6 ? 6 : mlist.length / 2) * 34 + 'px' }">
         <picker-view-column>
           <view class="item" v-for="(item, index) in mlist" :key="index">
             <slot name="option" v-bind:item="item">{{ item }}</slot>
@@ -41,34 +36,34 @@
 <script>
 export default {
   props: {
-    url: { type: String, default: '' },
+    url: { type: String, default: "" },
     list: {
       type: Array,
-      default: function() {
+      default: function () {
         return [];
-      }
+      },
     },
     value: {
       type: Array,
-      default: function() {
+      default: function () {
         return [];
-      }
-    }
+      },
+    },
   },
   data() {
     return {
       visible: 0,
       items: [],
-      query: '',
+      query: "",
       mlist: [],
-      pvvalue: []
+      pvvalue: [],
     };
   },
   computed: {},
   watch: {
     value() {
       this.items = this.value || [];
-    }
+    },
   },
   methods: {
     onquery() {
@@ -77,14 +72,14 @@ export default {
       this.pvvalue = this.mlist[0];
 
       if (this.list && this.list.length > 0) {
-        const l = this.list.filter(f => f.indexOf(this.query) > -1);
+        const l = this.list.filter((f) => f.indexOf(this.query) > -1);
         if (l.indexOf(this.pvvalue) === -1) {
           this.pvvalue = l[0];
         }
         this.mlist = l;
         return;
       }
-      this.$http.get(this.url, { params: { title: this.query } }).then(r => {
+      this.$http.get(this.url, { params: { title: this.query } }).then((r) => {
         r.data.list;
         this.mlist = r.data.list;
         this.pvvalue = this.mlist[0];
@@ -92,7 +87,7 @@ export default {
     },
     onremove(index) {
       this.items.splice(index, 1);
-      this.$emit('input', this.items);
+      this.$emit("input", this.items);
     },
     onshuru() {
       this.visible = 1;
@@ -100,9 +95,9 @@ export default {
     onqueren() {
       this.visible = 0;
       if (this.pvvalue) this.items.push(this.pvvalue);
-      this.$emit('input', this.items);
-    }
-  }
+      this.$emit("input", this.items);
+    },
+  },
 };
 </script>
 <style>

+ 12 - 5
src/config.js

@@ -1,8 +1,13 @@
 // 应用全局配置
 export default {
-  // baseUrl: 'https://vue.ruoyi.vip/prod-api',
-   baseUrl: import.meta.env.MODE=== "production" ? "http://mobile.usky.cn:8099/prod-api" : "http://172.16.120.165:13200/prod-api",
-  // baseUrl: "http://mobile.usky.cn:8099/prod-api",
+  //#ifdef H5
+  baseUrl: import.meta.env.MODE === "production" ? "http://mobile.usky.cn:8099/prod-api" : "http://172.16.120.165:13200/prod-api",
+  //#endif
+
+  //#ifdef APP-PLUS
+  baseUrl: "http://" + uni.getStorageSync("serveUrl") + "/prod-api",
+  //#endif
+
   websiteUrl: "https://qhome.usky.cn",
   // NODE_ENV=devlopment
   // 应用信息
@@ -18,11 +23,13 @@ export default {
     // 政策协议
     agreements: [
       {
-        title: "隐私政策",
+        title: "用户服务协议",
+        content: "暂无数据",
         url: "https://ruoyi.vip/protocol.html",
       },
       {
-        title: "用户服务协议",
+        title: "隐私政策",
+        content: "暂无数据",
         url: "https://ruoyi.vip/protocol.html",
       },
     ],

+ 15 - 1
src/pages.json

@@ -11,7 +11,8 @@
     {
       "path": "pages/serveConfig",
       "style": {
-        "navigationBarTitleText": "服务器配置"
+        "navigationBarTitleText": "服务器配置",
+        "navigationStyle": "custom"
       }
     },
     {
@@ -101,6 +102,12 @@
         "navigationBarTitleText": "浏览文本"
       }
     },
+    {
+      "path": "pages/common/textview/index1",
+      "style": {
+        "navigationBarTitleText": "浏览文本"
+      }
+    },
     {
       "path": "pages/export/export",
       "style": {
@@ -242,6 +249,13 @@
         "enablePullDownRefresh": false
       }
     },
+    {
+      "path": "pages/business/mhxf/informationSelect-test/index",
+      "style": {
+        "navigationBarTitleText": "信息查询",
+        "enablePullDownRefresh": false
+      }
+    },
     //信息查询 结束
 
     //设备管理 开始

+ 0 - 7
src/pages/analyse/analyse.vue

@@ -54,13 +54,6 @@ export default {
 };
 </script>
 
-<style scoped>
-uni-page-body,
-uni-page-refresh {
-  background-color: #f5f6f7;
-}
-</style>
-
 <style lang="scss">
 //消息页面
 .image-bg {

+ 0 - 13
src/pages/business/mhxf/coordination/index.vue

@@ -39,16 +39,3 @@ onMounted(() => {});
   color: #1989fa;
 }
 </style>
-
-<style scoped>
-body,
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
-.whiteBackgroundColor {
-  background-color: transparent;
-  height: 100%;
-}
-</style>

+ 1 - 8
src/pages/business/mhxf/fireReport/components/detailed.vue

@@ -545,11 +545,4 @@ onMounted(() => {});
     }
   }
 }
-</style>
-
-<style scoped>
-uni-page-body,
-uni-page-refresh {
-  background-color: #f5f6f7;
-}
-</style>
+</style>

+ 1 - 8
src/pages/business/mhxf/fireReport/components/detailedPath.vue

@@ -56,11 +56,4 @@ onMounted(() => {});
   .detailedContent {
   }
 }
-</style>
-
-<style scoped>
-uni-page-body,
-uni-page-refresh {
-  background-color: #f5f6f7;
-}
-</style>
+</style>

+ 4 - 5
src/pages/business/mhxf/fireReport/index.vue

@@ -217,9 +217,8 @@ onMounted(() => {});
 }
 </style>
 
-<style scoped>
-uni-page-body,
-uni-page-refresh {
-  background-color: #f5f6f7;
-}
+<style>
+/* page {
+  background-color: #ffffff;
+} */
 </style>

+ 742 - 0
src/pages/business/mhxf/informationSelect-test/index.vue

@@ -0,0 +1,742 @@
+<template>
+  <u-sticky bgColor="#fff" style="box-shadow: 1px 1px 4px rgb(26 26 26 / 10%)">
+    <u-tabs :list="list" @click="tabsClick" :current="current"></u-tabs>
+  </u-sticky>
+
+  <view class="informationSelect" @touchstart="fingerstart" @touchend="fingerend" style="background-color: #ffffff">
+    <uni-swipe-action>
+      <uni-swipe-action-item>
+        <!-- 各类查询 start -->
+        <view class="content">
+          <u-input style="border-radius: 50px; margin-bottom: 10px" @blur="blur" v-model="dataInput" prefixIcon="search" prefixIconStyle="color: #0c7bf9" :placeholder="placeholderText"> </u-input>
+          <u-empty v-if="!dataRes" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
+          <view v-if="current == 8">
+            <view class="con">
+              <view class="time">{{ newTime }}</view>
+              <video src="https://mbsvod.oss-cn-beijing.aliyuncs.com/cy-video.mp4" autoplay :controls="false" :show-center-play-btn="false" :loop="true" style="width: 100%"></video>
+            </view>
+          </view>
+          <view v-else>
+            <u-row v-for="po in classifyData" :key="po">
+              <u-col span="4">
+                <view style="text-align: right; padding: 0px 5px 0px 5px">{{ po.title }}</view>
+              </u-col>
+              <u-col span="8">
+                <view style="text-align: left; padding: 0px 5px 0px 5px">{{ po.value }}</view>
+              </u-col>
+            </u-row>
+          </view>
+        </view>
+        <!-- 各类查询 end -->
+      </uni-swipe-action-item>
+    </uni-swipe-action>
+  </view>
+</template>
+
+<script setup>
+import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance } from "vue";
+import publicStore from "@/store/modules/public";
+
+import { dataList } from "@/api/business/mhxf/informationSelect";
+
+const { proxy } = getCurrentInstance();
+
+const publicStores = publicStore(); //全局公共Store
+
+const dataInput = ref("");
+const current = ref(0);
+const classifyUrl = ref("");
+const classifyCode = ref("");
+const placeholderText = ref("");
+const dataRes = ref(1);
+
+const list = ref([
+  {
+    id: 1,
+    name: "警情查询",
+  },
+  {
+    id: 2,
+    name: "火灾查询",
+  },
+  {
+    id: 3,
+    name: "人员查询",
+    badge: {
+      // isDot: true,
+      // value: 5,
+    },
+  },
+  {
+    id: 4,
+    name: "车辆查询",
+    badge: {
+      // value: 5,
+    },
+  },
+  {
+    id: 5,
+    name: "站点查询",
+    badge: {
+      // value: 5,
+    },
+  },
+  {
+    id: 6,
+    name: "消火栓",
+    badge: {
+      // value: 5,
+    },
+  },
+
+  {
+    id: 7,
+    name: "重点单位",
+    badge: {
+      // value: 5,
+    },
+  },
+  {
+    id: 8,
+    name: "消防检查信息",
+    badge: {
+      // value: 5,
+    },
+  },
+  {
+    id: 9,
+    name: "视频监控",
+    badge: {
+      // value: 5,
+    },
+  },
+]);
+
+const startData = ref({
+  clientX: "",
+  clientY: "",
+});
+const updDistance = ref(100);
+const lrDistance = ref(50);
+const topMed = ref("");
+const bottomMed = ref("");
+const leftMed = ref("");
+const rightMed = ref("");
+const classifyData = ref([]); //警情查询数据存储
+
+/**
+ * @当按下去的时候
+ */
+function fingerstart(e) {
+  // 记录 距离可视区域左上角 左边距 和 上边距
+  startData.value.clientX = e.changedTouches[0].clientX;
+  startData.value.clientY = e.changedTouches[0].clientY;
+}
+/**
+ * @当抬起来的时候
+ */
+function fingerend(e) {
+  // 当前位置 减去 按下位置 计算 距离
+  const subX = e.changedTouches[0].clientX - startData.value.clientX;
+  const subY = e.changedTouches[0].clientY - startData.value.clientY;
+  if (subY > updDistance.value || subY < -updDistance.value) {
+    if (subY > updDistance.value) {
+      bottomscroll(subY);
+    } else if (subY < -updDistance.value) {
+      topscroll(subY);
+    }
+  } else {
+    if (subX > lrDistance.value) {
+      rightscroll(subX);
+    } else if (subX < -lrDistance.value) {
+      leftscroll(subX);
+    } else {
+      console.log("无效操作");
+    }
+  }
+}
+/**
+ * @上滑触发
+ */
+function topscroll(dista) {
+  topMed.value ? (topMed.value = dista) : (topMed.value = null);
+  console.log("触发了上滑方法!");
+}
+/**
+ * @下滑触发
+ */
+function bottomscroll(dista) {
+  bottomMed.value ? (bottomMed.value = dista) : (bottomMed.value = null);
+  console.log("触发了下滑方法!");
+}
+/**
+ * @右滑触发
+ */
+function rightscroll(dista) {
+  rightMed.value ? (rightMed.value = dista) : (rightMed.value = null);
+  console.log("触发了右滑方法!");
+  if (current.value >= 1) {
+    current.value--;
+  } else {
+    current.value = list.value.length - 1;
+  }
+}
+/**
+ * @左滑触发
+ */
+function leftscroll(dista) {
+  leftMed.value ? (leftMed.value = dista) : (leftMed.value = null);
+  console.log("触发了左滑方法!");
+  if (current.value < list.value.length - 1) {
+    current.value++;
+  } else {
+    current.value = 0;
+  }
+}
+
+function blur(e) {
+  if (dataInput.value) {
+    goSearch();
+  }
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  current.value = e.index;
+  console.log(current.value);
+  dataInput.value = "";
+  dataRes.value = 1;
+}
+
+function goSearch() {
+  if (current.value == 0) {
+    //警情查询
+    classifyUrl.value = "/service-fire/demPoliceInfo/page";
+    placeholderText.value = "请输入案件编号";
+    classifySearch(classifyUrl.value, {
+      caseCode: dataInput.value,
+    });
+  } else if (current.value == 1) {
+    //火灾查询
+    placeholderText.value = "请输入火灾地址";
+    classifyUrl.value = "/service-fire/demFireStatisticsAttach/page";
+    classifySearch(classifyUrl.value, {
+      address: dataInput.value,
+    });
+  } else if (current.value == 2) {
+    //人员查询
+    placeholderText.value = "请输入值班人员名称";
+    classifyUrl.value = "/service-fire/unitBeOnDuty/list";
+    classifySearch(classifyUrl.value, {
+      name: dataInput.value,
+    });
+  } else if (current.value == 3) {
+    //车辆信息
+    placeholderText.value = "请输入车牌号";
+    classifyUrl.value = "/service-fire/unitBeOnDuty/vehiclelist";
+    classifySearch(classifyUrl.value, {
+      licensePlate: dataInput.value,
+    });
+  } else if (current.value == 4) {
+    //站点查询
+    placeholderText.value = "请输入站点名称";
+    classifyUrl.value = "/service-fire/unitBeOnDuty/page";
+    classifySearch(classifyUrl.value, {
+      stationName: dataInput.value,
+    });
+  } else if (current.value == 5) {
+    //消火栓
+    placeholderText.value = "请输入水源名称";
+    classifyUrl.value = "/service-fire/demWaterSource/waterSourceList";
+    classifySearch(classifyUrl.value, {
+      waterName: dataInput.value,
+    });
+  } else if (current.value == 6) {
+    //重点单位
+    placeholderText.value = "请输入单位名称";
+    classifyUrl.value = "/service-fire/baseCompany/companyList";
+    classifySearch(classifyUrl.value, {
+      companyName: dataInput.value,
+    });
+  } else if (current.value == 7) {
+    //消防检查信息
+    placeholderText.value = "请输入单位ID";
+    classifyUrl.value = "/service-fire/demFireInspect/fireInspectList";
+    classifySearch(classifyUrl.value, {
+      companyId: dataInput.value,
+    });
+  } else if (current.value == 8) {
+    //消防检查信息
+    placeholderText.value = "";
+    // classifyUrl.value = "/service-fire/demFireInspect/fireInspectList";
+    // classifySearch(classifyUrl.value, {
+    //   companyId: dataInput.value,
+    // });
+  }
+}
+
+//分类信息查询 start
+async function classifySearch(URL, params) {
+  proxy.$modal.loading("加载中");
+  classifyData.value = [];
+  dataList(URL, params).then((res) => {
+    proxy.$modal.closeLoading();
+    if (res.status == "SUCCESS") {
+      if (current.value == 2) {
+        if (res.data.length) {
+          dataRes.value = 1;
+        } else {
+          dataRes.value = 0;
+        }
+        var records = res.data[0][0];
+      } else if (current.value == 3) {
+        if (res.data.length) {
+          dataRes.value = 1;
+        } else {
+          dataRes.value = 0;
+        }
+
+        var records = res.data[0];
+      } else {
+        //  console.log('111111111')
+        // console.log(res.data.records.length)
+        //  console.log('111222')
+        if (res.data.total) {
+          dataRes.value = 1;
+        } else {
+          dataRes.value = 0;
+        }
+        var records = res.data.records[0];
+      }
+
+      console.log(dataRes.value + "------1");
+
+      switch (current.value) {
+        case 0: //警情查询
+          var classifyTitle = [
+            "案件编号",
+            "主管支队",
+            "案件时间段",
+            "通知到场时间",
+            "通知出水时间",
+            "通知控制时间",
+            "通知熄火时间",
+            "通知返队时间",
+            "区域",
+            "案件类型",
+            "案发地址",
+            "立案时间",
+            "立案日期",
+            "处置对象",
+            "案件等级",
+            "主管中队",
+            "区县",
+            "案件状态",
+            "案件性质",
+            "填表时间",
+            "街镇",
+            "创建时间",
+          ];
+          var classifyValue = [
+            records.caseCode,
+            records.branch,
+            records.timeSlot,
+            records.noticeArrivalTime,
+            records.noticeEffluentTime,
+            records.controlTime,
+            records.quenchTime,
+            records.returnTime,
+            records.caseArea,
+            records.caseTypeCode,
+            records.address,
+            records.filingTime,
+            records.filingDate,
+            records.handleObject,
+            records.caseLevel,
+            records.squadron,
+            records.district,
+            records.caseStatus,
+            records.caseNature,
+            records.bdpAudit,
+            records.streetTown,
+            records.createTime,
+          ];
+          break;
+        case 1: //火灾查询
+          var classifyTitle = [
+            "地区",
+            "街镇",
+            "经度",
+            "维度",
+            "平台ID",
+            "火灾地址",
+            "过火面积",
+            "直接财产损失",
+            "死亡人数",
+            "受伤人数",
+            "受灾户数",
+            "火灾原因",
+            "火灾等级",
+            "场所一级",
+            "场所二级",
+            "起火物一级",
+            "起火物二级",
+            "性质",
+          ];
+          var classifyValue = [
+            records.district,
+            records.street,
+            records.longitude,
+            records.latitude,
+            records.id,
+            records.address,
+            records.burnedArea,
+            records.propertyLoss,
+            records.deathToll,
+            records.nonFatal,
+            records.disasterHome,
+            records.fireCause,
+            records.fireLevel,
+            records.placeOne,
+            records.placeTwo,
+            records.fireGoodsOne,
+            records.fireGoodsTwo,
+            records.nature,
+          ];
+          break;
+        case 2: //人员查询
+          var classifyTitle = ["值班人员信息", "岗位名称", "机构名称", "机构简称", "机构地址", "值班日期"];
+          var classifyValue = [records.name, records.postName, records.organizationName, records.organizationShort, records.organizationAddress, records.time];
+          break;
+        case 3: //车辆查询
+          var classifyTitle = [
+            "车辆信息",
+            "单件装备编码",
+            "装备名称",
+            "装备编码",
+            "上级装备编码",
+            "所属消防机构",
+            "车牌号码",
+            "资产编号",
+            "商标",
+            "颜色",
+            "生产厂家名称",
+            "有效期至",
+            "车架号",
+            "发动机编号",
+            "批次号",
+            "电台呼号",
+            "车辆简称",
+            "电台频道",
+            "指挥员姓名",
+            "驾驶员",
+          ];
+          var classifyValue = [
+            records.vehicleId,
+            records.singleEquipCode,
+            records.equipName,
+            records.equipCode,
+            records.superiorEquipCode,
+            records.fireOrga,
+            records.licensePlate,
+            records.assetCode,
+            records.assetCode,
+            records.colour,
+            records.productName,
+            records.validityTime,
+            records.frameCode,
+            records.engineCode,
+            records.batchCode,
+            records.radioCallSign,
+            records.vehicleAbbreviat,
+            records.radioChannel,
+            records.commanderName,
+            records.driver,
+          ];
+          break;
+        case 4: //站点查询
+          var classifyTitle = [
+            "平台ID",
+            "支队名称",
+            "所属辖区中队",
+            "消防站名称",
+            "单位性质",
+            "地址",
+            "所在位置",
+            "联动固定电话",
+            "负责人姓名",
+            "负责人手机号码",
+            "备注",
+            "消防站类型",
+            "经度",
+            "维度",
+            "创建时间",
+            "更新时间",
+            "支队id",
+            "中队id",
+            "编号",
+            "原单位性质",
+          ];
+          var classifyValue = [
+            records.id,
+            records.branchName,
+            records.squadron,
+            records.stationName,
+            records.companyNature,
+            records.address,
+            records.location,
+            records.fixedPhone,
+            records.chargeName,
+            records.chargePhone,
+            records.remark,
+            records.stationType,
+            records.longitude,
+            records.dimension,
+            records.createTime,
+            records.updateTime,
+            records.branchId,
+            records.squadronId,
+            records.number,
+            records.primaryCompanyNature,
+          ];
+          break;
+        case 5: //消火栓
+          var classifyTitle = [
+            "可用状态名称",
+            "消防站简介",
+            "水源地址",
+            "建造时间",
+            "消火栓接口形式",
+            "水源类型",
+            "管辖机构名称",
+            "取水形式",
+            "联系方式",
+            "可用状态",
+            "水源性质",
+            "水源名称",
+            "管网单位",
+            "管网压力",
+          ];
+          var classifyValue = [
+            records.availableStatusName,
+            records.fireAbbreviat,
+            records.waterAddress,
+            records.buildTime,
+            records.hydrantInterface,
+            records.waterType,
+            records.organizateName,
+            records.waterForm,
+            records.contactMode,
+            records.availableStatus,
+            records.waterNature,
+            records.waterName,
+            records.pipeCompany,
+            records.pipePressure,
+          ];
+          break;
+        case 6: //重点单位
+          var classifyTitle = [
+            "单位联系电话",
+            "单位详细地址",
+            "职工人数",
+            "单位类型",
+            "消防安全责任人姓名",
+            "法人代表姓名",
+            "单位名称",
+            "消防安全管理人姓名",
+            "单位主属性",
+            "建筑面积",
+            "行政区域",
+            "单位成立时间",
+            "占地面积",
+            "火灾危险性",
+            "创建时间",
+            "单位性质",
+            "固定资产(单位:万元)",
+          ];
+          var classifyValue = [
+            records.linkPhone,
+            records.address,
+            records.employeeNum,
+            records.companyType,
+            records.fireDutyName,
+            records.delegateName,
+            records.companyName,
+            records.fireManageName,
+            records.mainAttribute,
+            records.buildArea,
+            records.administrativeDivision,
+            records.foundTimecoverArea,
+            records.coverArea,
+            records.fireHazard,
+            records.createTime,
+            records.companyNature,
+            records.fixedAssets,
+          ];
+          break;
+        case 7: //消防检查信息
+          var classifyTitle = ["单位ID", "检查人员ID", "计划生成时间", "检查结果", "创建人", "创建时间", "检查员名称", "检查员职位", "单位电话"];
+          var classifyValue = [
+            records.companyId,
+            records.personId,
+            records.planTime,
+            records.inspectResult,
+            records.creator,
+            records.createTime,
+            records.personName,
+            records.personPosition,
+            records.linkPhone,
+          ];
+          break;
+        // default:
+        //    默认代码块
+      }
+
+      for (var i = 0; i < classifyTitle.length; i++) {
+        var obj = {};
+        obj.title = classifyTitle[i];
+        obj.value = classifyValue[i];
+        classifyData.value.push(obj);
+
+        // console.log(classifyData.value);
+      }
+    } else {
+    }
+  });
+}
+// end
+
+watchEffect(() => {
+  goSearch();
+});
+
+// start
+
+const newTime = ref("");
+function getNowTime() {
+  var date = new Date();
+  var time =
+    addZero(date.getFullYear()) +
+    "-" +
+    addZero(date.getMonth() + 1) +
+    "-" +
+    addZero(date.getDate()) +
+    " " +
+    addZero(date.getHours()) +
+    ":" +
+    addZero(date.getMinutes()) +
+    ":" +
+    addZero(date.getSeconds());
+  newTime.value = time;
+}
+//根据自己的需求,看要不要在时间不大于10的时候在前面补0,如果需要直接addZero(date.getMinutes()),其它与之相同,如果不需要删掉addZero()方法即可。
+//小于10的拼接上0字符串
+function addZero(s) {
+  return s < 10 ? "0" + s : s;
+}
+
+// end
+
+// 自定义导航事件
+onNavigationBarButtonTap((e) => {
+  if (e.float == "right") {
+    uni.navigateTo({
+      url: "/pages/business/mhxf/xunJian/collect/components/collectRecord",
+    });
+  } else {
+  }
+});
+
+onLoad((options) => {
+  getNowTime(); //进入页面调用该方法获取当前时间
+  clearInterval(myTimeDisplay); //销毁之前定时器
+  var myTimeDisplay = setInterval(() => {
+    getNowTime(); //每秒更新一次时间
+  }, 1000);
+});
+
+onReady(() => {});
+
+onMounted(() => {});
+</script>
+
+<style lang="scss">
+.uni-swipe {
+  overflow: visible;
+}
+body {
+  background: #fff;
+}
+.is-selected {
+  color: #1989fa;
+}
+
+.informationSelect {
+  height: calc(100vh - 88px);
+  background-color: #ffffff;
+  .content {
+    padding: 10px;
+    .u-row {
+      height: 36px;
+      line-height: 36px;
+      .u-col {
+        border: 1px #e4e3e3 solid;
+        border-right: 0px;
+        border-bottom: 0px;
+        text-align: center;
+
+        view {
+          padding: 0 10px;
+          min-height: 36px;
+          overflow: hidden; //超出的文本隐藏
+          // text-overflow: ellipsis; //溢出用省略号显示
+          overflow: auto;
+          white-space: nowrap; // 默认不换行;
+          font-size: 14px;
+        }
+      }
+
+      .u-col:last-child {
+        border-right: 1px #e4e3e3 solid;
+      }
+    }
+
+    .u-row:last-child {
+      .u-col {
+        border-bottom: 1px #e4e3e3 solid;
+      }
+    }
+  }
+}
+</style>
+
+<style scoped>
+body,
+uni-page-body,
+uni-page-refresh,
+.grayBackgroundColor {
+  background: rgb(241, 241, 241);
+}
+
+.time {
+  position: absolute;
+  z-index: 99999;
+  top: 3px;
+  left: 3px;
+  display: inline-block;
+  color: #fff;
+}
+.con {
+  text-align: center;
+  position: relative;
+}
+.whiteBackgroundColor {
+  background-color: #ffffff;
+}
+body {
+  background: #fff;
+}
+</style>

+ 2 - 26
src/pages/business/mhxf/needMatter/index.vue

@@ -3,7 +3,7 @@
     <u-tabs :list="list" @click="tabsClick" :current="current"></u-tabs>
   </u-sticky>
 
-  <view class="needMatter" @touchstart="fingerstart" @touchend="fingerend" style="background-color: #f7f7f7">
+  <view class="needMatter" @touchstart="fingerstart" @touchend="fingerend">
     <u-empty v-if="classifyData.length <= 0" text="暂无数据" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> </u-empty>
 
     <view class="content" v-else>
@@ -65,7 +65,7 @@
               <u-steps current="0" dot>
                 <u-steps-item style="text-align: center" title="已接收" :desc="cl.sendTime ? cl.sendTime.replace(' ', '\n') : ''"> </u-steps-item>
                 <u-steps-item style="text-align: center" title="整改中" :desc="cl.reformTime ? cl.reformTime.replace(' ', '\n') : ''"></u-steps-item>
-                <u-steps-item style="text-align: center" title="审核通过" :desc="cl.reviewTime ? cl.reviewTime.replace(' ', '\n') : ''"></u-steps-item>
+                <u-steps-item style="text-align: center" title="审核" :desc="cl.reviewTime ? cl.reviewTime.replace(' ', '\n') : ''"></u-steps-item>
               </u-steps>
 
               <view style="font-size: 14px; line-height: 20px; margin-top: 10px">
@@ -489,7 +489,6 @@ onMounted(() => {});
 
 .needMatter {
   height: calc(100vh - 88px);
-  background-color: #ffffff;
   .content {
     // padding: 10px;
     .u-collapse {
@@ -507,26 +506,3 @@ onMounted(() => {});
   }
 }
 </style>
-
-<style scoped>
-uni-page-body,
-uni-page-refresh {
-  background-color: #f5f6f7;
-}
-
-.time {
-  position: absolute;
-  z-index: 99999;
-  top: 3px;
-  left: 3px;
-  display: inline-block;
-  color: #fff;
-}
-.con {
-  text-align: center;
-  position: relative;
-}
-.whiteBackgroundColor {
-  background-color: #ffffff;
-}
-</style>

+ 6 - 0
src/pages/business/mhxf/unitInfoCollection/index.vue

@@ -891,6 +891,12 @@ onLoad((options) => {
 });
 </script>
 
+<style>
+/* page {
+  background-color: #ffffff;
+} */
+</style>
+
 <style lang="scss">
 #unitInfoCollection {
   .centerOne,

+ 6 - 6
src/pages/business/mhxf/xunJian/collect/components/collectDetail.vue

@@ -94,13 +94,13 @@ onMounted(() => {});
 }
 </style>
 
+<style>
+/* page {
+  background-color: #ffffff;
+} */
+</style>
+
 <style scoped>
-body,
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
 .whiteBackgroundColor {
   background-color: #ffffff;
 }

+ 6 - 6
src/pages/business/mhxf/xunJian/collect/components/collectRecord.vue

@@ -96,13 +96,13 @@ onMounted(() => {
 }
 </style>
 
+<style>
+/* page {
+  background-color: #f5f6f7;
+} */
+</style>
+
 <style scoped>
-body,
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
 .whiteBackgroundColor {
   background-color: #ffffff;
 }

+ 1 - 13
src/pages/business/mhxf/xunJian/plan/components/content.vue

@@ -1,5 +1,5 @@
 <template>
-  <scroll-view scroll-y class="grayBackgroundColor">
+  <scroll-view scroll-y>
     <view>
       <view class="whiteBackgroundColor" style="padding: 15px; margin-bottom: 15px" v-for="(con, index) in contentList" :key="index">
         <view class="siteHeader">
@@ -228,18 +228,6 @@ onLoad((options) => {
 onMounted(() => {});
 </script>
 
-<style scoped>
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
-
-.whiteBackgroundColor {
-  background-color: #ffffff;
-}
-</style>
-
 <style lang="scss">
 .siteHeader {
   display: flex;

+ 1 - 11
src/pages/business/mhxf/xunJian/plan/components/report.vue

@@ -1,5 +1,5 @@
 <template>
-  <scroll-view scroll-y class="grayBackgroundColor">
+  <scroll-view scroll-y>
     <view class="whiteBackgroundColor" style="display: flex; padding: 15px 0px 15px 15px; margin-bottom: 15px" v-for="cu in currentDateList" :key="cu">
       <view class="reportLeft" @click="pulicClick(cu)">
         <u-image style="margin: auto" width="40" height="40" src="@/static/images/xunjian/scan.png" v-if="cu.siteType == 1" shape="circle"></u-image>
@@ -190,16 +190,6 @@ onMounted(() => {});
 </style>
 
 <style scoped>
-body,
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
-.whiteBackgroundColor {
-  background-color: #ffffff;
-}
-
 .reportLeft {
   margin-right: 15px;
   display: flex;

+ 2 - 12
src/pages/business/mhxf/xunJian/plan/components/siteDetails.vue

@@ -1,5 +1,5 @@
 <template>
-  <scroll-view scroll-y class="grayBackgroundColor">
+  <scroll-view scroll-y>
     <view>
       <view class="whiteBackgroundColor" style="display: flex; padding: 15px; margin-bottom: 15px">
         <view style="margin-right: 15px; display: flex">
@@ -180,16 +180,6 @@ onMounted(() => {});
 </script>
 
 <style scoped>
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
-
-.whiteBackgroundColor {
-  background-color: #ffffff;
-}
-
 .siteHeader {
   display: flex;
   height: 20px;
@@ -260,7 +250,7 @@ uni-page-refresh,
   border: 1px dashed #409eff;
 }
 
-::v-deep .uploadDisabled {
+:deep(.uploadDisabled) {
   display: none !important;
 }
 </style>

+ 4 - 16
src/pages/business/mhxf/xunJian/plan/components/upload.vue

@@ -2,11 +2,7 @@
   <scroll-view scroll-y>
     <el-upload
       v-model:file-list="siteList.recordPictureList"
-      :class="
-        settingsStore.inspectionStatus == 2
-          ? 'avatar-uploader uploadDisabled'
-          : 'avatar-uploader'
-      "
+      :class="settingsStore.inspectionStatus == 2 ? 'avatar-uploader uploadDisabled' : 'avatar-uploader'"
       :headers="{ Authorization: Authorization }"
       :action="uploadUrl"
       :on-success="uploadSuccess"
@@ -17,11 +13,7 @@
         <div :id="file.url">
           <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
           <span class="el-upload-list__item-actions">
-            <span
-              v-if="!disabled"
-              class="el-upload-list__item-delete"
-              @click="handleRemove(file)"
-            >
+            <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
               <el-icon><Delete /></el-icon>
             </span>
           </span>
@@ -46,10 +38,7 @@ const Authorization = uni.getStorageSync("Authorization");
 const disabled = ref(false);
 function handleRemove(file) {
   document.getElementById(file.url).parentNode.remove();
-  siteList.value.recordPictureList.splice(
-    siteList.value.recordPictureList.indexOf(file),
-    1
-  );
+  siteList.value.recordPictureList.splice(siteList.value.recordPictureList.indexOf(file), 1);
 }
 /**
  * @upload图片上传
@@ -65,9 +54,8 @@ onLoad((options) => {});
 onMounted(() => {});
 </script>
 
-
 <style scoped>
-::v-deep .uploadDisabled .el-upload--picture-card {
+:deep(.uploadDisabled .el-upload--picture-card) {
   display: none;
 }
 </style>

+ 3 - 12
src/pages/business/mhxf/xunJian/plan/index.vue

@@ -1,6 +1,6 @@
 <template>
-  <scroll-view scroll-y class="grayBackgroundColor">
-    <view class="grayBackgroundColor">
+  <scroll-view scroll-y>
+    <view>
       <view>
         <el-calendar id="calendar" ref="calendar" v-model="currentDatevalue" @touchstart="touchStart" @touchend="touchEnd">
           <template #header="{ date }">
@@ -430,13 +430,4 @@ onMounted(() => {});
 .is-selected {
   color: #1989fa;
 }
-</style>
-
-<style scoped>
-body,
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
-</style>
+</style>

+ 1 - 10
src/pages/business/mhxf/xunJian/xunJian.vue

@@ -1,5 +1,5 @@
 <template>
-  <scroll-view scroll-x class="grayBackgroundColor">
+  <scroll-view scroll-x>
     <view class="padding-sm">
       <!-- 图表 -->
       <view class="section1 section bg-white padding-xs">
@@ -107,12 +107,3 @@ onLoad(() => {
 </script>
 
 <style lang="scss"></style>
-
-<style scoped>
-body,
-uni-page-body,
-uni-page-refresh,
-.grayBackgroundColor {
-  background: rgb(241, 241, 241);
-}
-</style>

+ 3 - 1
src/pages/common/textview/index.vue

@@ -26,11 +26,13 @@ onLoad((options) => {
 });
 </script>
 
-<style scoped>
+<style>
 page {
   background-color: #ffffff;
 }
+</style>
 
+<style scoped>
 .view-title {
   font-weight: bold;
 }

+ 43 - 0
src/pages/common/textview/index1.vue

@@ -0,0 +1,43 @@
+<template>
+  <view class="view-text">
+    <u-parse class="uni-body view-content" :content="content"></u-parse>
+  </view>
+</template>
+
+<script setup>
+import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
+
+const data = reactive({
+  title: "",
+  content: "",
+});
+
+const { title, content } = toRefs(data);
+
+onLoad((options) => {
+  title.value = options.title;
+  content.value = options.content;
+  uni.setNavigationBarTitle({
+    title: options.title,
+  });
+});
+</script>
+
+<style>
+page {
+  background-color: #ffffff;
+}
+</style>
+
+<style lang="scss" scoped>
+.view-text {
+  padding: 5px;
+  .view-content {
+    font-size: 26rpx;
+    color: #333;
+    line-height: 24px;
+    word-wrap: break-word;
+  }
+}
+</style>

+ 28 - 31
src/pages/index.vue

@@ -1,8 +1,10 @@
 <template>
   <!-- <u-sticky bgColor="#fff"> </u-sticky> -->
 
+  <!-- <pagesHarder></pagesHarder> -->
+
   <scroll-view scroll-x>
-    <view>
+    <view style="margin-bottom:50px">
       <!-- 下拉选择 -->
       <!-- <view class="searchSelect shadow" v-if="flag">
         <view class="cu-bar search bg-white">
@@ -124,7 +126,7 @@
             <!-- <view class="cu-tag badge" v-if="item.badge != 0">
               <block v-if="item.badge != 0">{{ item.badge > 99 ? "99+" : item.badge }}</block>
             </view> -->
-            <text style="font-size: 13px">{{ item.meta.title }}</text>
+            <text style="font-size: 12px">{{ item.meta.title }}</text>
           </view>
         </view>
       </view>
@@ -139,7 +141,7 @@
             <!-- <view class="cu-tag badge" v-if="item.badge != 0">
               <block v-if="item.badge != 0">{{ item.badge > 99 ? "99+" : item.badge }}</block>
             </view> -->
-            <text style="font-size: 13px">{{ item.meta.title }}</text>
+            <text style="font-size: 12px">{{ item.meta.title }}</text>
           </view>
         </view>
       </view>
@@ -150,13 +152,13 @@
 
 <script setup>
 import searchSelect from "@/components/searchSelect/searchSelect.vue";
+import pagesHarder from "@/components/pages-harder/index.vue";
 
 import json from "@/static/js/json.js"; //引入api请求封装方法
 import * as jwx from "@/utils/jssdk.js"; //引入js sdk的封装
 
 import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";
-import { getToken, setToken, removeToken } from "@/utils/auth";
 import useStores from "@/store/modules/user.js";
 import publicStore from "@/store/modules/public";
 
@@ -165,6 +167,7 @@ import { scan_push, getHomePageData, getFunctionalModuleStatistics, getAppRouter
 const useStore = useStores();
 const publicStores = publicStore(); //全局公共Store
 const BASE_URL = inject("$BASE_URL");
+const { proxy } = getCurrentInstance();
 
 const arrayList = reactive({
   InputBottom: 0,
@@ -225,8 +228,6 @@ async function init() {
 function scanQRCode() {
   // console.log(1);
   // scanCode();
-  // 将this赋值给that
-  let that = this;
   // 微信公众号获取位置
   jwx.configWeiXin((jweixin) => {
     jweixin.scanQRCode({
@@ -236,7 +237,7 @@ function scanQRCode() {
         setTimeout(function () {
           /* 放1000ms后执行的代码 */
           alert(res.resultStr);
-          that.getCodeResult({
+          getCodeResult({
             ercode: res.resultStr,
           });
         }, 1000);
@@ -451,10 +452,6 @@ onNavigationBarButtonTap((e) => {
 </script>
 
 <style lang="scss">
-page {
-  background-color: #f5f6f7;
-}
-
 .select-items {
   overflow: auto;
   height: 80vh;
@@ -463,31 +460,31 @@ page {
 .static-tabs {
   border-radius: 50rpx;
   border: 1rpx solid #4074e7;
-}
 
-.static-tabs > view {
-  color: #4074e7;
-  font-size: 30rpx;
-}
+  > view {
+    color: #4074e7;
+    font-size: 30rpx;
+  }
 
-.static-tabs > view.active {
-  color: #fff;
-  background: #4074e7;
-}
+  > view.active {
+    color: #fff;
+    background: #4074e7;
+  }
 
-.static-tabs > view:first-child {
-  border-top-left-radius: 50rpx;
-  border-bottom-left-radius: 50rpx;
-}
+  > view:first-child {
+    border-top-left-radius: 50rpx;
+    border-bottom-left-radius: 50rpx;
+  }
 
-.static-tabs > view:nth-child(2) {
-  border-left: 1px solid #4074e7;
-  border-right: 1px solid #4074e7;
-}
+  > view:nth-child(2) {
+    border-left: 1px solid #4074e7;
+    border-right: 1px solid #4074e7;
+  }
 
-.static-tabs > view:last-child {
-  border-top-right-radius: 50rpx;
-  border-bottom-right-radius: 50rpx;
+  > view:last-child {
+    border-top-right-radius: 50rpx;
+    border-bottom-right-radius: 50rpx;
+  }
 }
 
 /* 检测时间 */

+ 0 - 4
src/pages/info/info.vue

@@ -67,10 +67,6 @@ function goPushList() {
 </script>
 
 <style lang="scss">
-page {
-  background-color: #f5f6f7;
-}
-
 //消息页面
 .image-bg {
   width: 100%;

+ 161 - 132
src/pages/login.vue

@@ -18,40 +18,53 @@
       <view class="content">
         <text class="title">请登录</text>
 
-        <!-- #ifdef APP-PLUS || H5 -->
-        <view id="okay">首次账号登录请先配置服务器</view>
+        <!-- #ifdef APP-PLUS -->
+        <view id="okay" v-if="!linkUrl">首次账号登录请先配置服务器</view>
         <!-- <u-icon class="icons" name="scan" color="gray" size="22"></u-icon> -->
         <view class="setting" @tap="goSeverConfig"> 配置服务器 </view>
         <!--#endif-->
       </view>
 
-      <view id="login-input" style="margin-top: 20px" v-if="switchText == '账号密码登录'">
+      <view id="login-input" v-if="switchText == '账号密码登录'">
         <u-input v-model="phone" prefixIcon="phone" placeholder="请输入手机号码" />
       </view>
 
-      <view id="login-input" style="display: flex; margin-top: 20px" v-if="switchText == '账号密码登录'">
-        <u-input style="width: 60%" v-model="verify" prefixIcon="email" placeholder="请输入验证码" />
-
-        <u-button @click="getVerifyCode">{{ !codeTime ? "获取验证码" : codeTime + "s" }}</u-button>
+      <view id="login-input" v-if="switchText == '账号密码登录'">
+        <u-input v-model="verify" prefixIcon="email" placeholder="请输入验证码">
+          <template #suffix>
+            <u-button @click="getVerifyCode">{{ !codeTime ? "获取验证码" : codeTime + "s" }}</u-button>
+          </template>
+        </u-input>
       </view>
 
-      <view id="login-input" style="margin-top: 20px" v-if="switchText == '验证码登录'">
+      <view id="login-input" v-if="switchText == '验证码登录'">
         <u-input type="text" v-model="username" prefixIcon="account" placeholder="请输入账号" />
 
-        <u-input style="margin-top: 20px" v-model="password" prefixIcon="lock" placeholder="请输入密码" :password="inputIconBool">
+        <u-input v-model="password" prefixIcon="lock" placeholder="请输入密码" :password="inputIconBool">
           <template #suffix>
-            <text class="iconfont ucicon-eye" @click="inputIcon()" v-if="!inputIconBool"></text>
-            <text class="iconfont ucicon-eye-close" @click="inputIcon()" v-if="inputIconBool"></text>
+            <text :class="!inputIconBool ? 'iconfont ucicon-eye' : 'iconfont ucicon-eye-close'" @click="inputIconBool = !inputIconBool"></text>
           </template>
         </u-input>
       </view>
 
       <!--  -->
+      <button class="submit" @click="submitRes">登 录</button>
 
       <view class="switchText" @click="switchMode">
         <text>{{ switchText }}</text>
       </view>
-      <button class="submit" @click="submitRes">登 录</button>
+
+      <!-- #ifdef APP-PLUS -->
+      <view class="xieyi text-center">
+        <u-checkbox-group>
+          <u-checkbox v-model="userChecked" shape="circle" inactiveColor="#0081ff" size="13"></u-checkbox>
+        </u-checkbox-group>
+        <text>我已阅读并同意</text>
+        <text @click="handleUserAgrement" class="text-blue">用户协议</text>
+        <text>和</text>
+        <text @click="handlePrivacy" class="text-blue">隐私协议</text>
+      </view>
+      <!--#endif-->
     </view>
     <view class="bottom">
       <div class="title">{{ bottomTitle }}</div>
@@ -61,7 +74,7 @@
 
 <script setup>
 import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
-import { reactive, getCurrentInstance, toRefs, inject } from "vue";
+import { reactive, getCurrentInstance, toRefs, inject, watchEffect } from "vue";
 import { getToken, setToken, removeToken } from "@/utils/auth";
 import { Lock, User, Cellphone } from "@element-plus/icons-vue";
 import { getCodeImg, getMobileTenantConfig } from "@/api/login";
@@ -89,17 +102,20 @@ const data = reactive({
   username: undefined,
   password: undefined,
   inputIconBool: true,
+  /** 服务器配置数据 */
+  linkUrl: uni.getStorageSync("serveUrl"),
+  /** 用户隐私协议数据 */
+  userChecked: false,
 
   // VerificationCodeOne
 });
 
-const { title, bg, bottomTitle, logo, phone, verify, codeTime, switchText, username, password, tenantId, inputIconBool } = toRefs(data);
+const { title, bg, bottomTitle, logo, phone, verify, codeTime, switchText, username, password, tenantId, inputIconBool, linkUrl, userChecked } = toRefs(data);
 
 function goSeverConfig() {
-  uni.navigateTo({
-    url: "/pages/serveConfig",
-  });
+  proxy.$tab.navigateTo("/pages/serveConfig");
 }
+
 /**登录方式切换 */
 function switchMode() {
   if (switchText.value == "验证码登录") {
@@ -108,32 +124,40 @@ function switchMode() {
     switchText.value = "验证码登录";
   }
 }
+
 /** 点击发送验证码 */
 function getVerifyCode() {
+  //#ifdef APP-PLUS
+  if (!uni.getStorageSync("serveUrl")) {
+    proxy.$modal.msg("首次登录请先进行服务器配置");
+    return;
+  }
+  //#endif
+
   if (!phone.value) {
-    uni.showToast({
-      title: "请输入手机号码...",
-      icon: "none",
-    });
+    proxy.$modal.msg("请输入手机号码");
     return;
   }
   if (!/^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/.test(phone.value)) {
-    uni.showToast({
-      title: "请输入正确的手机号码...",
-      icon: "none",
-    });
+    proxy.$modal.msg("请输入正确的手机号码");
     return;
   }
+
+  //#ifdef APP-PLUS
+  if (userChecked.value) {
+    proxy.$modal.msg("请在阅读并同意 用户协议和隐私协议后登录");
+    return;
+  }
+  //#endif
+
   verify.value = undefined;
-  getSendSms({
+  getCodeImg({
     phone: phone.value,
+  }).then((res) => {
+    console.log(res);
   });
-  //
   if (codeTime.value > 0) {
-    uni.showToast({
-      title: "不能重复获取",
-      icon: "none",
-    });
+    proxy.$modal.msg("不能重复获取");
     return;
   } else {
     codeTime.value = 60;
@@ -146,12 +170,6 @@ function getVerifyCode() {
     }, 1000);
   }
 }
-/** 获取验证码 */
-async function getSendSms(params) {
-  getCodeImg(params).then((res) => {
-    console.log(res);
-  });
-}
 
 /**
  * 判断运行环境
@@ -164,13 +182,10 @@ function env() {
   // }
 
   //#ifdef H5
-  var linkUrl = window.location.host;
-  // var linkUrl='ces.cn';
-  // var linkUrl='172.16.120.165:13203'
-  //#endif
-
-  //#ifdef APP-PLUS
-  var linkUrl = newPublicStore.serveUrl;
+  linkUrl.value = window.location.host;
+  // linkUrl.value='ces.cn';
+  // linkUrl.value='172.16.120.165:13203'
+  getMobileTenantConfigApi({ url: linkUrl.value });
   //#endif
 
   //  uni.showToast({
@@ -178,8 +193,6 @@ function env() {
   //   icon: "none",
   // })
 
-  getMobileTenantConfigApi({ url: linkUrl });
-
   //  let port = uni.getSystemInfoSync().platform;
   // switch (port) {
   //   case "android":
@@ -200,88 +213,67 @@ function env() {
 }
 
 /** 点击提交按钮 */
-async function submitRes() {
+function submitRes() {
   //#ifdef APP-PLUS
-  var linkUrl = newPublicStore.serveUrl;
-  if (!newPublicStore.serveUrl) {
-    uni.showToast({
-      title: "首次登录请先进行服务器配置...",
-      icon: "none",
-    });
+  if (!uni.getStorageSync("serveUrl")) {
+    proxy.$modal.msg("首次登录请先进行服务器配置");
     return;
   }
   //#endif
 
   if (switchText.value == "账号密码登录") {
     if (!phone.value) {
-      uni.showToast({
-        title: "请输入手机号码...",
-        icon: "none",
-      });
+      proxy.$modal.msg("请输入手机号码");
       return;
     }
     if (!/^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/.test(phone.value)) {
-      uni.showToast({
-        title: "请输入正确的手机号码...",
-        icon: "none",
-      });
+      proxy.$modal.msg("请输入正确的手机号码");
       return;
     }
     if (!verify.value) {
-      uni.showToast({
-        title: "请输入验证码...",
-        icon: "none",
-      });
+      proxy.$modal.msg("请输入验证码");
       return;
     }
-    login({
-      phone: phone.value,
-      verify: verify.value,
-      tenantId: tenantId.value,
-    });
   } else {
     if (!username.value) {
-      uni.showToast({
-        title: "请输入账户",
-        icon: "none",
-      });
+      proxy.$modal.msg("请输入账户");
       return;
     }
     if (!password.value) {
-      uni.showToast({
-        title: "请输入密码",
-        icon: "none",
-      });
+      proxy.$modal.msg("请输入密码");
       return;
     }
+  }
 
-    login({
-      username: username.value,
-      password: password.value,
-      tenantId: tenantId.value,
-    });
+  //#ifdef APP-PLUS
+  if (userChecked.value) {
+    proxy.$modal.msg("请在阅读并同意 用户协议和隐私协议后登录");
+    return;
   }
+  //#endif
+
+  login({
+    username: username.value,
+    password: password.value,
+    tenantId: tenantId.value,
+  });
 }
 
 /** 获取登录数据 */
-async function login(data) {
-  // proxy.$modal.loading("登录中,请耐心等待...");
+function login(data) {
+  proxy.$modal.loading("登录中,请耐心等待...");
 
   useStore.Login(data).then(() => {
-    info();
-  });
-}
-
-/** 获取用户信息 */
-async function info() {
-  proxy.$modal.closeLoading();
-  useStore.GetInfo().then((res) => {
-    proxy.$tab.reLaunch("/pages/index");
+    /** 获取用户信息 */
+    proxy.$modal.closeLoading();
+    useStore.GetInfo().then((res) => {
+      proxy.$tab.reLaunch("/pages/index");
+    });
   });
 }
 
 /** 获取登录页数据 */
-async function getMobileTenantConfigApi(params) {
+function getMobileTenantConfigApi(params) {
   getMobileTenantConfig(params).then((res) => {
     if (res.data.length > 0) {
       let data = res.data[0];
@@ -295,14 +287,26 @@ async function getMobileTenantConfigApi(params) {
   });
 }
 
-/**
- * @密码显示隐藏icon图标事件
- * @icon点击事件
- */
-function inputIcon() {
-  inputIconBool.value = !inputIconBool.value;
+// 用户协议
+function handleUserAgrement() {
+  let site = getApp().globalData.config.appInfo.agreements[0];
+  proxy.$tab.navigateTo(`/pages/common/textview/index1?title=${site.title}&content=${site.content}`);
+}
+// 隐私协议
+function handlePrivacy() {
+  let site = getApp().globalData.config.appInfo.agreements[1];
+  proxy.$tab.navigateTo(`/pages/common/textview/index1?title=${site.title}&content=${site.content}`);
 }
 
+watchEffect(() => {
+  //#ifdef APP-PLUS
+  if (uni.getStorageSync("serveUrl")) {
+    linkUrl.value = uni.getStorageSync("serveUrl");
+    getMobileTenantConfigApi({ url: linkUrl.value });
+  }
+  //#endif
+});
+
 /**
  * @onLoad
  */
@@ -318,9 +322,10 @@ onLoad(() => {
   }
 });
 </script>
+
 <style>
-.uni-input {
-  color: red !important;
+page {
+  background-color: #ffffff;
 }
 </style>
 
@@ -338,7 +343,6 @@ onLoad(() => {
     left: 0;
     right: 0;
     z-index: 0;
-    background: #fff;
     .bgImage {
       width: 100%;
       height: 100%;
@@ -361,20 +365,17 @@ onLoad(() => {
         border: 0 !important;
         // border-color: #000 !important;
         // border-color: gray !important;
-        background-color: rgba(255, 255, 255, 0.1) !important;
+        // background-color: rgba(255, 255, 255, 0.1) !important;
         background-color: #f5f6fa !important;
+        margin-bottom: 20px;
       }
 
-      :deep(.uni-input-wrapper) {
-        font-size: 16px;
-        color: #a0a4af;
+      :deep(.input-placeholder) {
+        color: #96a6b5 !important;
       }
 
-      :deep(uni-input) {
-        color: #000 !important;
-        background-color: rgba(255, 255, 255, 0) !important;
-        border: 0px solid #ededed !important;
-        padding-left: 0 !important;
+      :deep(.uni-input-wrapper) {
+        font-size: 16px;
       }
 
       :deep(.u-icon__icon) {
@@ -387,27 +388,27 @@ onLoad(() => {
         color: gray !important;
       }
 
-      :deep(.u-button) {
-        width: 35%;
-        height: 45px;
-        line-height: 45px;
-        color: #2a98ff;
-        border-radius: 24px;
-        margin: 0 0 0 5%;
-        font-size: 17px !important;
-        white-space: nowrap;
-        border-color: #2a98ff !important;
-        background-color: rgba(255, 255, 255, 0.1) !important;
-      }
-
       :deep(:-webkit-autofill) {
-        caret-color: #a0a4af; // 设置光标颜色
+        caret-color: #000; // 设置光标颜色
         // -webkit-text-fill-color: gray !important;
         -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
         background-color: transparent;
         background-image: none;
         transition: background-color 50000s ease-in-out 0s; //背景色透明  生效时长  过渡效果  启用时延迟的时间
       }
+
+      :deep(.u-button) {
+        color: #2a98ff;
+        font-size: 16px !important;
+        white-space: nowrap;
+        border: 0;
+        border-color: #2a98ff !important;
+        background-color: rgba(255, 255, 255, 0) !important;
+
+        &:before {
+          opacity: 0;
+        }
+      }
     }
 
     .top {
@@ -418,6 +419,8 @@ onLoad(() => {
 
       :deep(uni-image) {
         height: 40px;
+        // width:40px;
+        width: auto;
       }
       .logo {
         margin-right: 10px;
@@ -433,14 +436,15 @@ onLoad(() => {
     .content {
       display: flex;
       position: relative;
+      margin: 30px 0 30px 0;
       .title {
         margin: auto auto auto 0;
         color: #000;
-        font-size: 17px;
+        font-size: 18px;
       }
 
       .icons {
-        margin: auto 5px 0 0;
+        margin: auto 5px auto 0;
       }
 
       .setting {
@@ -472,10 +476,10 @@ onLoad(() => {
     }
 
     .switchText {
-      color: #a0a4af;
-      margin-top: 20px;
+      color: #96a6b5;
       width: 100%;
       display: block;
+      margin-top: 20px;
     }
 
     .submit {
@@ -484,9 +488,34 @@ onLoad(() => {
       border-radius: 24px;
       background: #2a98ff;
       color: #fff;
-      margin-top: 30px;
       border: 0px;
     }
+
+    .xieyi {
+      color: #96a6b5;
+      margin-top: 30px;
+      display: flex;
+      justify-content: center;
+      > uni-view {
+        margin: auto 0;
+      }
+      > uni-text {
+        margin: auto 0;
+      }
+      // animation: roundRule 0.5s linear infinite;
+    }
+
+    @keyframes roundRule {
+      0% {
+        transform: translateX(0);
+      }
+      50% {
+        transform: translateX(-5px);
+      }
+      100% {
+        transform: translateX(0);
+      }
+    }
   }
 
   .bottom {

+ 0 - 4
src/pages/mine/about/index.vue

@@ -55,10 +55,6 @@ const version = ref(getApp().globalData.config.appInfo.version);
 </script>
 
 <style lang="scss">
-page {
-  background-color: #f8f8f8;
-}
-
 .copyright {
   margin-top: 50rpx;
   text-align: center;

+ 0 - 4
src/pages/mine/help/index.vue

@@ -66,10 +66,6 @@ function handleText(item) {
 </script>
 
 <style lang="scss" scoped>
-page {
-  background-color: #f8f8f8;
-}
-
 .help-container {
   margin-bottom: 100rpx;
   padding: 30rpx;

+ 2 - 6
src/pages/mine/index.vue

@@ -14,7 +14,7 @@
           </view>
         </view>
         <view @click="handleToInfo" class="flex align-center">
-          <text>个人信息</text>
+          <text style="white-space: nowrap">个人信息</text>
           <view class="iconfont icon-right"></view>
         </view>
       </view>
@@ -131,17 +131,13 @@ function handleBuilding() {
 </script>
 
 <style lang="scss">
-page {
-  background-color: #f5f6f7;
-}
-
 .mine-container {
   width: 100%;
   height: 100%;
 
   .header-section {
     padding: 15px 15px 45px 15px;
-    background-color: #3c96f3;
+    background-color: #149eff;
     color: white;
 
     .login-tip {

+ 3 - 1
src/pages/mine/info/edit.vue

@@ -110,11 +110,13 @@ onReady(() => {
 });
 </script>
 
-<style lang="scss">
+<style>
 page {
   background-color: #ffffff;
 }
+</style>
 
+<style lang="scss">
 .example {
   padding: 15px;
   background-color: #fff;

+ 3 - 1
src/pages/mine/pwd/index.vue

@@ -83,11 +83,13 @@ onReady(() => {
 });
 </script>
 
-<style lang="scss">
+<style>
 page {
   background-color: #ffffff;
 }
+</style>
 
+<style lang="scss">
 .pwd-retrieve-container {
   padding-top: 36rpx;
   padding: 15px;

+ 7 - 5
src/pages/mine/setting/index.vue

@@ -51,7 +51,13 @@ function handleToUpgrade() {
   proxy.$modal.showToast("模块建设中~");
 }
 function handleCleanTmp() {
-  proxy.$modal.showToast("模块建设中~");
+  // #ifdef H5
+  proxy.$modal.showToast("H5暂不支持此功能");
+  // #endif
+
+  // #ifdef APP-PLUS
+  proxy.$setting.clearCache();
+  // #endif
 }
 function handleLogout() {
   proxy.$modal.confirm("确定注销并退出系统吗?").then(() => {
@@ -63,10 +69,6 @@ function handleLogout() {
 </script>
 
 <style lang="scss" scoped>
-.page {
-  background-color: #f8f8f8;
-}
-
 .item-box {
   background-color: #ffffff;
   margin: 30rpx;

+ 146 - 62
src/pages/serveConfig.vue

@@ -1,100 +1,184 @@
 <template>
-    <view id="serveConfig">
-        <view style="padding: 10px 40px 20px 40px;">
-            <u--form :model="form" ref="uForm" :rules="rules" labelWidth="80">
-                <u-form-item label="链接地址" prop="linkUrl" required :borderBottom="true">
-                    <u-input class="configInput" v-model="form.linkUrl" :placeholder='newPublicStore.serveUrl?newPublicStore.serveUrl:"请输入链接地址"' border="none">
-                    </u-input>
-                </u-form-item>
-                <view >
-                    <u-button type="primary" style="width: 50%; height: 36px; font-size: 14px;margin-top:20px" @click="handleSubmit()"
-                        shape="circle"> 保 存</u-button>
-                </view>
-            </u--form>
-        </view>
+  <view id="serveConfig">
+    <view class="top">
+      <u-icon name="arrow-left" size="17px" color="#000" :bold="true" @click="navigateTo"></u-icon>
     </view>
+
+    <view class="content">
+      <text class="title">设置服务器地址</text>
+      <u-icon class="icons" name="scan" color="#2a98ff" size="22"></u-icon>
+      <text class="setting" @tap="scanClick"> 扫码添加 </text>
+    </view>
+
+    <view class="bottom">
+      <u-input style="margin-bottom: 15px" v-model="linkUrl" placeholder="服务器地址(必填)" border="none" clearable> </u-input>
+
+      <u-input v-model="port" type="number" placeholder="端口号(必填)" border="none" maxlength="5" clearable> </u-input>
+
+      <u-button type="primary" style="width: 100%; height: 45px; font-size: 17px; margin-top: 20px" @click="handleSubmit()" shape="circle"> 保 存</u-button>
+    </view>
+  </view>
 </template>
 
 <script setup>
+import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
 import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
+import { getToken, setToken, removeToken } from "@/utils/auth";
 import publicStore from "@/store/modules/public.js";
 const newPublicStore = publicStore();
+
+const { proxy } = getCurrentInstance();
+
 const dataList = reactive({
-    form: {
-        linkUrl: "", //链接地址
-       
-    },
-    rules: {
-    linkUrl: [
-      {
-        required: true,
-        message: "请输入链接地址",
-        trigger: ["blur"],
-      },
-    //   {
-    //     type: "string",
-    //     required: true,
-    //     message: "请输入正确的链接地址",
-    //     pattern: /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/,
-    //     trigger: ["blur", "change"],
-    //   },
-    ],
-  
-  },
+  linkUrl: "", //链接地址
+  port: "",
 });
 
 const uForm = ref(null);
-const { form, baseBuildListForm, rules, baseBuildListRules, noticeBarText, pagingBool, actionTitle, actionIndex, actionsList, actionShow, showTime, timeValue, timeTitle, timeIndex, modalShow } =
-    toRefs(dataList);
+const { linkUrl, port } = toRefs(dataList);
+
+/**
+ * @扫一扫
+ * @按钮点击事件
+ */
+function scanClick() {
+  uni.scanCode({
+    success: async (e) => {
+      uni.showToast({
+        title: "扫码成功",
+        icon: "none",
+      });
+
+      linkUrl.value = e.result.split(":")[0];
+
+      port.value = e.result.split(":")[1];
+    },
+    fail: (err) => {
+      uni.showToast({
+        title: "扫码失败",
+        icon: "none",
+      });
+      console.log("扫码失败", err);
+    },
+    complete: () => {
+      // uni.showToast({
+      //   title: "扫码结束",
+      //   icon: "none",
+      // });
+      console.log("扫码结束");
+    },
+  });
+}
 
 /**
  * @提交
  * @按钮点击事件
  */
 function handleSubmit() {
-    uForm.value
-    .validate()
-    .then((res) => {
-        newPublicStore.serveUrl=form.value.linkUrl
-      uni.navigateTo({
-            url: '/pages/login'
-        })
-    })
+  if (!linkUrl.value) {
+    proxy.$modal.msg("请输入链接地址");
+    return;
+  }
 
+  if (!/^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z0-9]{2,})+$/.test(linkUrl.value)) {
+    proxy.$modal.msg("请输入正确的链接地址");
+    return;
+  }
+
+  if (!port.value) {
+    proxy.$modal.msg("请输入端口号");
+    return;
+  }
+
+  uni.setStorageSync("serveUrl", linkUrl.value + ":" + port.value);
+  navigateTo();
 }
+
+/**
+ * @跳转登录
+ */
+function navigateTo() {
+  proxy.$tab.redirectTo("/pages/login");
+}
+
+onLoad((options) => {
+  if (uni.getStorageSync("serveUrl")) {
+    linkUrl.value = uni.getStorageSync("serveUrl").split(":")[0];
+    port.value = uni.getStorageSync("serveUrl").split(":")[1];
+  }
+});
 </script>
 
-<style lang="scss" scoped>
-body {
-    background: #fff;
+<style>
+page {
+  background-color: #ffffff;
 }
+</style>
 
+<style lang="scss" scoped>
 #serveConfig {
-    background: #fff;
+  position: relative;
+  z-index: 1;
+  width: 100%;
+  padding: 0 40px;
+  margin: auto;
+  padding-top: 20%;
+
+  .top {
+  }
+
+  .content {
+    display: flex;
+    margin: 30px 0;
 
-    ::v-deep .u-input__content__field-wrapper__field {
-        height: 30px;
-        line-height: 30px
+    .title {
+      margin: auto auto auto 0;
+      color: #000;
+      font-size: 18px;
     }
-    ::v-deep .u-button--circle{
-        border-radius:5px
+
+    .icons {
+      margin: auto 5px auto 0;
     }
 
-    .configInput {
-        border: 1px solid gray;
+    .setting {
+      color: #2a98ff;
+      margin: auto 0;
+    }
+  }
 
+  .bottom {
+    :deep(.u-input) {
+      height: 45px;
+      border-radius: 8px;
+      padding: 5px 12px !important;
+      border: 0 !important;
+      //   border-color: #000 !important;
+      //   border-color: gray !important;
+      //   background-color: rgba(255, 255, 255, 0.1) !important;
+      background-color: #f5f6fa !important;
     }
-    ::v-deep .uni-input-input{
-        // padding:8px
+
+    :deep(.input-placeholder) {
+      color: #a0a4af;
+    }
+
+    :deep(.uni-input-wrapper) {
+      font-size: 16px;
     }
 
-    ::v-deep .u-input {
-        padding:0 5px!important;
+    :deep(.u-input__content__field-wrapper__field) {
+      height: 30px;
+      line-height: 30px;
     }
 
-    ::v-deep .u-line {
-        display: none !important
+    :deep(.uni-input-input) {
+      // padding:8px
     }
 
+    :deep(.u-line) {
+      display: none !important;
+    }
+  }
 }
-</style>
+</style>

+ 1 - 1
src/pages/setting/building/building.vue

@@ -132,7 +132,7 @@ onload((option) => {
 </script>
 
 <style lang="scss" scoped>
-::v-deep .image-bg > div {
+:deep(.image-bg > div) {
   background-size: cover !important;
 }
 </style>

+ 6 - 5
src/pages/setting/setting.vue

@@ -140,6 +140,12 @@ function loginOut() {
 onLoad(() => {});
 </script>
 
+<style>
+page {
+  background-color: #ffffff;
+}
+</style>
+
 <style lang="scss">
 .setting-wrapper {
   .top-banner {
@@ -177,8 +183,3 @@ onLoad(() => {});
   }
 }
 </style>
-<style>
-body {
-  background: #fff;
-}
-</style>

+ 1 - 1
src/permission.js

@@ -4,7 +4,7 @@ import { getToken } from "@/utils/auth";
 const loginPage = "/pages/login";
 
 // 页面白名单
-const whiteList = ["/pages/login", "/pages/serveConfig", "/pages/common/webview/index", "/pages/business/mhxf/unitInfoCollection/index"];
+const whiteList = ["/pages/login", "/pages/serveConfig", "/pages/common/textview/index1", "/pages/common/webview/index", "/pages/business/mhxf/unitInfoCollection/index"];
 
 // 检查地址白名单
 function checkWhite(url) {

+ 4 - 0
src/plugins/index.js

@@ -2,6 +2,7 @@ import tab from "./tab";
 import auth from "./auth";
 import modal from "./modal";
 import common from "./common";
+import setting from "./setting";
 
 export default {
   install(app) {
@@ -17,5 +18,8 @@ export default {
     // 数据处理
     app.provide("$common", common);
     app.config.globalProperties.$common = common;
+    // 公共设置方法
+    app.provide("$setting", setting);
+    app.config.globalProperties.$setting = setting;
   },
 };

+ 88 - 0
src/plugins/setting.js

@@ -0,0 +1,88 @@
+/**
+ * @获取缓存
+ */
+const formatSize = () => {
+  let currentSize = "";
+  plus.cache.calculate(function (size) {
+    let sizeCache = parseInt(size);
+    if (sizeCache == 0) {
+      currentSize = "0B";
+    } else if (sizeCache < 1024) {
+      currentSize = sizeCache + "B";
+    } else if (sizeCache < 1048576) {
+      currentSize = (sizeCache / 1024).toFixed(2) + "KB";
+    } else if (sizeCache < 1073741824) {
+      currentSize = (sizeCache / 1048576).toFixed(2) + "MB";
+    } else {
+      v = (sizeCache / 1073741824).toFixed(2) + "GB";
+    }
+  });
+  return currentSize;
+};
+
+/**
+ * @清理缓存
+ */
+const clearCache = () => {
+  let os = plus.os.name;
+  if (os == "Android") {
+    let main = plus.android.runtimeMainActivity();
+    let sdRoot = main.getCacheDir();
+    let files = plus.android.invoke(sdRoot, "listFiles");
+    let len = files.length;
+
+    if (len <= 0) {
+      uni.showToast({
+        title: "暂无缓存可清理",
+        icon: "none",
+        duration: 2000,
+        mask: true,
+      });
+    }
+
+    for (let i = 0; i < len; i++) {
+      let filePath = "" + files[i]; // 没有找到合适的方法获取路径,这样写可以转成文件路径
+      plus.io.resolveLocalFileSystemURL(
+        filePath,
+        function (entry) {
+          if (entry.isDirectory) {
+            entry.removeRecursively(
+              function (entry) {
+                //递归删除其下的所有文件及子目录
+                uni.showToast({
+                  title: "缓存清理完成",
+                  duration: 2000,
+                  mask: true,
+                });
+                formatSize(); // 重新计算缓存
+              },
+              function (e) {
+                console.log(e.message);
+              }
+            );
+          } else {
+            entry.remove();
+          }
+        },
+        function (e) {
+          console.log("文件路径读取失败");
+        }
+      );
+    }
+  } else {
+    // ios
+    plus.cache.clear(function () {
+      uni.showToast({
+        title: "缓存清理完成",
+        duration: 2000,
+        mask: true,
+      });
+      formatSize();
+    });
+  }
+};
+
+export default {
+  formatSize,
+  clearCache,
+};

+ 3 - 2
src/static/scss/colorui.css

@@ -11,7 +11,7 @@
         初始化
  ==================== */
 body {
-	background-color: #f1f1f1;
+	background-color: #f5f6f7;
 	font-size: 28upx;
 	color: #333333;
 	font-family: Helvetica Neue, Helvetica, sans-serif;
@@ -1284,7 +1284,8 @@ button.cuIcon.lg {
 	min-height: 100upx;
 	background-color: #ffffff;
 	justify-content: space-between;
-	align-items: center
+	align-items: center;
+	margin: 0.625rem;
 }
 
 .cu-list.menu>.cu-item:last-child:after {

+ 6 - 1
src/static/scss/public.scss

@@ -1,3 +1,9 @@
+//全局背景颜色 开始
+.whiteBackgroundColor {
+  background-color: #ffffff;
+}
+//全局背景颜色 结束
+
 /*
  * @日期选择器样式 开始
  */
@@ -137,7 +143,6 @@ uni-input {
  * @全局input样式 结束
  */
 
- 
 //折叠面板样式 开始
 .u-cell__body {
   padding: 10px 10px !important;

+ 12 - 10
src/store/modules/public.js

@@ -4,7 +4,7 @@ const publicStore = defineStore("public", {
   state: () => ({
     leftBtn: true, //左侧收起按钮
     rightBtn: true, //右侧收起按钮
-    serveUrl:null,//链接地址
+    serveUrl: null, //链接地址
 
     mapBool: 1, //1.高德 2.测绘院
     streetTownList: [
@@ -130,15 +130,17 @@ const publicStore = defineStore("public", {
   }),
   persist: {
     // 自定义数据持久化方式
-    // key: 'store-key', //指定key进行存储,此时非key的值不会持久化,刷新就会丢失
-    storage: window ? window.localStorage : uni.setStorageSync(), // 指定换成地址
-    // paths: ['nested.data'],// 指定需要持久化的state的路径名称
-    beforeRestore: (context) => {
-      console.log("Before" + context);
-    },
-    afterRestore: (context) => {
-      console.log("After" + context);
-    },
+    enabled: true,
+    // key: 'public-key', //指定key进行存储,此时非key的值不会持久化,刷新就会丢失
+    strategies: [
+      // 指定存储的位置以及存储的变量都有哪些,该属性可以不写,
+      //在不写的情况下,默认存储到 sessionStorage 里面,默认存储 state 里面的所有数据。
+      {
+        storage: window ? window.localStorage : uni.setStorageSync(),
+        // paths: ["count"]
+      },
+      // paths 是一个数组,如果写了 就会只存储 count 变量,当然也可以写多个。
+    ],
   },
   actions: {
     getDate() {

+ 9 - 0
src/utils/request.js

@@ -50,6 +50,15 @@ const request = (config) => {
           });
           modal.closeLoading();
           reject("无效的会话,或者会话已过期,请重新登录。");
+        } else if (code === 404 || res.statusCode === 404) {
+          if (res.data.msg.indexOf(":") !== -1) {
+            modal.msg(res.data.msg.split(":")[1]);
+            reject(res.data.msg.split(":")[1]);
+          } else {
+            modal.msg(res.data.msg);
+            reject(res.data.msg);
+          }
+          modal.closeLoading();
         } else if (code === 500 || res.statusCode === 500) {
           if (res.data.msg.indexOf(":") !== -1) {
             modal.msg(res.data.msg.split(":")[1]);