Browse Source

系统模块

fanghuisheng 2 years ago
parent
commit
393c11315c
86 changed files with 1747 additions and 0 deletions
  1. 21 0
      src/pages/authority/authority.vue
  2. 129 0
      src/pages/export/export.vue
  3. 157 0
      src/pages/setting/building/building.vue
  4. 271 0
      src/pages/setting/funReport/funReport.vue
  5. 405 0
      src/pages/setting/funReport/funcAdd/funcAdd.vue
  6. 235 0
      src/pages/setting/messagePush/messagePush.vue
  7. 185 0
      src/pages/setting/setting.vue
  8. 77 0
      src/pages/test/export.vue
  9. 105 0
      src/pages/test/test-1.vue
  10. 36 0
      src/pages/test/test-select-picker.vue
  11. 126 0
      src/pages/test/test.vue
  12. BIN
      src/static/device-bg.png
  13. BIN
      src/static/images/alarming/alarming-mc.png
  14. BIN
      src/static/images/alarming/alarming-sp.png
  15. BIN
      src/static/images/alarming/alarming-water.png
  16. BIN
      src/static/images/alarming/alarming-xf.png
  17. BIN
      src/static/images/alarming/alarming-zj.png
  18. BIN
      src/static/images/calendar.png
  19. BIN
      src/static/images/defaultImg.jpg
  20. BIN
      src/static/images/dt/dt-alarmIcon.png
  21. BIN
      src/static/images/dt/dt-dcIcon.png
  22. BIN
      src/static/images/dt/dt-dqIcon.png
  23. BIN
      src/static/images/dt/dt-dtIcon.png
  24. BIN
      src/static/images/dt/dt-jgIcon.png
  25. BIN
      src/static/images/dt/dt-mjIcon.png
  26. BIN
      src/static/images/dt/dt-rtuIcon.png
  27. BIN
      src/static/images/dt/dt-trIcon.png
  28. BIN
      src/static/images/dt/dt-videoIcon.png
  29. BIN
      src/static/images/dt/dt-waterIcon.png
  30. BIN
      src/static/images/dt/dt-xfsIcon.png
  31. BIN
      src/static/images/dt/dt-ygIcon.png
  32. BIN
      src/static/images/dt/dt-ywIcon.png
  33. BIN
      src/static/images/dt/dt.png
  34. BIN
      src/static/images/export/process-icon.png
  35. BIN
      src/static/images/export/processed-icon.png
  36. BIN
      src/static/images/repair/repair1.png
  37. BIN
      src/static/images/repair/repair2.png
  38. BIN
      src/static/images/repair/repair3.png
  39. BIN
      src/static/images/repair/repair4.png
  40. BIN
      src/static/images/repair/repair5.png
  41. BIN
      src/static/images/setting/building-icon.png
  42. BIN
      src/static/images/setting/funcList.png
  43. BIN
      src/static/images/setting/funcReport.png
  44. BIN
      src/static/images/setting/personal-head.png
  45. BIN
      src/static/images/setting/plus.png
  46. BIN
      src/static/images/setting/push-icon.png
  47. BIN
      src/static/images/setting/setting-bg.png
  48. BIN
      src/static/images/setting/setting-icon1.png
  49. BIN
      src/static/images/setting/setting-icon2.png
  50. BIN
      src/static/images/setting/setting-icon3.png
  51. BIN
      src/static/images/setting/setting-icon4.png
  52. BIN
      src/static/images/square/square-alarm.png
  53. BIN
      src/static/images/square/square-bx.png
  54. BIN
      src/static/images/square/square-bz.png
  55. BIN
      src/static/images/square/square-dl.png
  56. BIN
      src/static/images/square/square-rl.png
  57. BIN
      src/static/images/square/square-sb.png
  58. BIN
      src/static/images/square/square-sp.png
  59. BIN
      src/static/images/square/square-video.png
  60. BIN
      src/static/images/square/square-wb.png
  61. BIN
      src/static/images/square/square-xf.png
  62. BIN
      src/static/images/square/square-xj.png
  63. BIN
      src/static/images/square/square-yh.png
  64. BIN
      src/static/images/square/square1.png
  65. BIN
      src/static/images/square/square2.png
  66. BIN
      src/static/images/video/video-icon-error.png
  67. BIN
      src/static/images/video/video-icon-off.png
  68. BIN
      src/static/images/video/video-icon-on.png
  69. BIN
      src/static/images/weibao/weiBao-icon1.png
  70. BIN
      src/static/images/weibao/weiBao-icon2.png
  71. BIN
      src/static/images/wt/account.png
  72. BIN
      src/static/images/wt/arrow.png
  73. BIN
      src/static/images/wt/arrow2.png
  74. BIN
      src/static/images/wt/bg.png
  75. BIN
      src/static/images/wt/logo.png
  76. BIN
      src/static/images/wt/password.png
  77. BIN
      src/static/images/wt/phone-icon.png
  78. BIN
      src/static/images/wt/phone.png
  79. BIN
      src/static/index/banner1.png
  80. BIN
      src/static/index/banner2.jpg
  81. BIN
      src/static/index/banner3.jpg
  82. BIN
      src/static/index/chart3-1.png
  83. BIN
      src/static/index/chart3-2.png
  84. BIN
      src/static/index/chart3-3.png
  85. BIN
      src/static/index/chart3-4.png
  86. BIN
      src/static/index/chart3-5.png

+ 21 - 0
src/pages/authority/authority.vue

@@ -0,0 +1,21 @@
+<template>
+  <view style="text-align: center; padding-top: 100rpx">
+    <image src="@/static/index/chart3-2.png" style="width: 100rpx; height: 100rpx"></image>
+    <br />
+    <br />
+    <view>该用户权限尚未开通,请联系管理员!</view>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {};
+  },
+
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style></style>

+ 129 - 0
src/pages/export/export.vue

@@ -0,0 +1,129 @@
+<template>
+  <view class="processWrapper exportBody">
+    <view style="height: 98rpx"></view>
+    <view class="ding">
+      <!-- <calendar></calendar> -->
+      <view class="example-body">
+        <uni-datetime-picker
+          v-model="datetimerange"
+          type="daterange"
+          start-placeholder="请选择开始时间"
+          end-placeholder="请选择结束时间"
+          start="2000-3-20 12:00:00"
+          end="2025-10-20 20:00:00"
+          rangeSeparator="至"
+        />
+      </view>
+    </view>
+
+    <block>
+      <view class="processList">
+        <view class="cu-list menu-avatar">
+          <view class="cu-item" v-for="(item, index) in getExportData" :key="index">
+            <view class="cu-avatar lg">
+              <image class="image-bg" :src="item.clzt == 0 ? '@/static/images/export/process-icon.png' : '@/static/images/export/processed-icon.png'" />
+            </view>
+            <view class="content">
+              <view class="pro-title">
+                <view class="cut">{{ keyWords == "人工督察单" ? item.artificial_code : item.supervise_code }}</view>
+              </view>
+              <view class="pro-des">
+                <view class="text-cut">{{ item.content }}</view>
+              </view>
+              <view class="pro-date">{{ item.timestamp }}</view>
+            </view>
+            <view class="action" style="z-index: 99">
+              <view class="unProcess" style="color: #ff4e00" v-if="item.clzt == 0">未处理</view>
+              <view class="processed" style="color: #08be04" v-else>已处理</view>
+            </view>
+          </view>
+          <view class="text-center margin-top" v-if="!this.getExportData.length && this.dataRes">暂无数据...</view>
+        </view>
+      </view>
+    </block>
+    <view v-if="this.getExportData.length > 0" class="padding-lr padding-bottom-lg bg-white" style="position: fixed; bottom: 0; width: 100%">
+      <view class="btn-area">
+        <button class="bg-blue round missReport margin-top" @tap="exportButton()">导 出</button>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+import json from "../../data/json.js";
+export default {
+  data() {
+    return {
+      getExportData: [],
+      dataRes: 0,
+      datetimerange: ["", ""],
+      keyWords: "",
+    };
+  },
+  onLoad: function (option) {
+    this.keyWords = option.keywords;
+    this.getData({
+      company_code: uni.getStorageSync("selectedCode"),
+      start_time: "",
+      end_time: "",
+    });
+  },
+  watch: {
+    datetimerange(newval) {
+      this.getData({
+        company_code: uni.getStorageSync("selectedCode"),
+
+        start_time: newval[0],
+        end_time: newval[1],
+      });
+    },
+  },
+
+  methods: {
+    async getData(params = {}) {
+      const res = await this.$myRequest({
+        // url: listUrl, //人员督察单渲染
+        url: this.keyWords == "人工督察单" ? "FireInspector/getManualInspectorList" : "FireInspector/getElectronicInspectorList",
+        data: params,
+        showLoading: true,
+      });
+      this.getExportData = res.data.data;
+      this.dataRes = 1;
+    },
+    exportButton() {
+      let url2 = "";
+      switch (this.keyWords) {
+        case "人工督察单":
+          url2 = "ExportModule/getManualInspectorListExpor";
+          break;
+        case "电子督察单":
+          url2 = "ExportModule/getElectronicInspectorListExpor";
+          break;
+        default:
+          break;
+      }
+
+      //#ifdef H5
+      var start_time = this.datetimerange[0] ? `start_time/${this.datetimerange[0]}/` : "";
+      var end_time = this.datetimerange[1] ? `end_time/${this.datetimerange[1]}/` : "";
+      let exportUrl = this.$BASE_URL + url2 + `/${start_time}${end_time}company_code/${uni.getStorageSync("selectedCode")}/`;
+      var ua = window.navigator.userAgent.toLowerCase();
+      // alert(exportUrl)
+      if (ua.match(/MicroMessenger/i) == "micromessenger") {
+        uni.showModal({
+          showCancel: false,
+          content: "如需下载,请在默认浏览器中操作",
+          success: function (res) {
+            window.location.href = exportUrl;
+          },
+        });
+      } else {
+        window.location.href = exportUrl;
+      }
+      //#endif
+    },
+  },
+};
+</script>
+
+<style lang="scss"></style>

+ 157 - 0
src/pages/setting/building/building.vue

@@ -0,0 +1,157 @@
+<template>
+  <view>
+    <view class="basic-info">
+      <view class="info-tit margin-left-xs">
+        <text class="cuIcon-titles margin-right-xs"></text>
+        基本信息
+      </view>
+      <view class="info-content padding-lr">
+        <table
+          style="border: 1px solid #ccc"
+          cellspacing="0"
+          cellpadding="0"
+          align="center"
+        >
+          <tr>
+            <td>建筑物名称</td>
+            <td>{{ this.getDetailData.build_name }}</td>
+          </tr>
+          <tr>
+            <td>建筑物类别</td>
+            <td>{{ this.getDetailData.build_type }}</td>
+          </tr>
+          <tr>
+            <td>建造日期</td>
+            <td>{{ this.getDetailData.build_time }}</td>
+          </tr>
+          <tr>
+            <td>使用性质</td>
+            <td>{{ this.getDetailData.nature_use }}</td>
+          </tr>
+          <tr>
+            <td>火灾危险级</td>
+            <td>{{ this.getDetailData.fire_risk_level }}</td>
+          </tr>
+          <tr>
+            <td>耐火等级</td>
+            <td>{{ this.getDetailData.fire_resistance_rating }}</td>
+          </tr>
+          <tr>
+            <td>结构类型</td>
+            <td>{{ this.getDetailData.structure_type }}</td>
+          </tr>
+          <tr>
+            <td>建筑高度</td>
+            <td>{{ this.getDetailData.build_height }}</td>
+          </tr>
+          <tr>
+            <td>建筑面积</td>
+            <td>{{ this.getDetailData.build_area }}</td>
+          </tr>
+          <tr>
+            <td>占地面积</td>
+            <td>{{ this.getDetailData.land_occupation_area }}</td>
+          </tr>
+
+          <tr>
+            <td>标准层面积</td>
+            <td>{{ this.getDetailData.standard_area }}</td>
+          </tr>
+          <tr>
+            <td>地上层数</td>
+            <td>{{ this.getDetailData.aboveground_layer }}</td>
+          </tr>
+          <tr>
+            <td>地上层面积</td>
+            <td>{{ this.getDetailData.aboveground_area }}</td>
+          </tr>
+
+          <tr>
+            <td>地下层数</td>
+            <td>{{ this.getDetailData.underground_floor }}</td>
+          </tr>
+          <tr>
+            <td>地下层面积</td>
+            <td>{{ this.getDetailData.underground_area }}</td>
+          </tr>
+          <tr>
+            <td>消防控制室位置</td>
+            <td>{{ this.getDetailData.control_room }}</td>
+          </tr>
+          <tr>
+            <td>避难层数量</td>
+            <td>{{ this.getDetailData.refuge_layer }}</td>
+          </tr>
+          <tr>
+            <td>消防电梯数量</td>
+            <td>{{ this.getDetailData.fire_elevator }}</td>
+          </tr>
+        </table>
+      </view>
+    </view>
+
+    <view class="processStatus">
+      <view class="info-tit margin-left-xs">
+        <text class="cuIcon-titles margin-right-xs"></text>
+        消防设施平面布置图
+      </view>
+      <view class="padding-lr imgPic">
+        <image
+          v-if="!this.getDetailData.build_plan && this.dataRes == 1"
+          mode="widthFix"
+          src="@/static/images/defaultImg.jpg"
+        />
+        <image v-else mode="widthFix" :src="this.getDetailData.layout_plan" />
+      </view>
+    </view>
+
+    <view class="processStatus">
+      <view class="info-tit margin-left-xs">
+        <text class="cuIcon-titles margin-right-xs"></text>
+        建筑平面图
+      </view>
+      <view class="padding-lr padding-bottom-lg imgPic">
+        <image
+          v-if="!this.getDetailData.build_plan && this.dataRes == 1"
+          mode="widthFix"
+          src="@/static/images/defaultImg.jpg"
+        />
+        <image v-else :src="this.getDetailData.build_plan" mode="widthFix" />
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      getDetailData: {},
+      dataRes: 0,
+    };
+  },
+  onLoad: function (option) {
+    this.getDetails({ company_code: uni.getStorageSync("selectedCode") });
+  },
+  methods: {
+    // 建筑基础数据请求
+    async getDetails(params = {}) {
+      const res = await this.$myRequest({
+        url: "BuildingInformation/getBuildingManagement",
+        data: params,
+        showLoading: true,
+      });
+      this.getDetailData = res.data.data[0];
+      console.log(this.getDetailData);
+      this.dataRes = 1;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .image-bg > div {
+  background-size: cover !important;
+}
+</style>
+

+ 271 - 0
src/pages/setting/funReport/funReport.vue

@@ -0,0 +1,271 @@
+<template>
+
+	<view class="">
+		
+		<!-- 筛选框start -->
+		<view style="height:98rpx"></view>
+		<view class="ding">
+			<!-- <calendar></calendar> -->
+			<view class="example-body">
+				<uni-datetime-picker v-model="datetimerange" type="daterange" start-placeholder="请选择开始时间"
+					end-placeholder="请选择结束时间" start="2000-3-20 12:00:00" end="2025-10-20 20:00:00" rangeSeparator="至" />
+			</view>
+		</view>
+		<!-- 筛选框end -->
+		<view  class="site-items" style="margin-top:0;height: calc(100vh - 286rpx)">
+			<view class="cu-list menu-avatar" >
+				<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
+					v-for="(item,index) in funcReport" :key="index" 
+					@touchstart="ListTouchStart"
+					@touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index"
+					>
+					<view class="cu-avatar round lg">
+						<image class="image-bg" src="@/static/images/setting/funcList.png"/>
+					</view>
+					<view class="content">
+						<view class="pro-title">
+							<view class="cut">{{item.report_name}}</view>
+						</view>
+						<view class="pro-des  ">
+							<view class="text-cut">
+								{{item.remarks  }}
+							</view>
+						</view>
+						<view class="pro-date ">{{item.add_time}}</view>
+					</view>
+					<view class="nav-right num">
+						<view class="text-grey">
+							<text class="icon iconfont margin-right-sm margin-left-lg">&#xe629;</text>
+						</view>
+					</view>
+					<view class="move">
+						<view class="bg-grey" @click.stop="editItem(item)">编辑</view>
+						<view class="bg-red" @click.stop="deleteItem(item)">删除</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="!funcReport.length&&authListRes==1" class="text-center margin-top"> 暂无数据</view>
+			<view v-show="isLoadMore&&this.pages>1" style="padding-bottom:60px">
+				<uni-load-more :status="loadStatus"></uni-load-more>
+			</view>
+			
+			<view  style="padding-bottom:60px"></view>
+			
+			
+		</view>
+		
+		
+		
+		<!-- 新增按钮start -->
+			<view style="width: 100%;
+		position: fixed;
+		bottom: 0px;
+		right: 0px;
+		height: 64px;
+		background: #fff;">
+				<view class="plus">
+					<image src="@/static/images/setting/plus.png" style="width:100rpx;height:100rpx" @tap="goAddPage()"></image>
+				</view>
+			</view>
+			
+			<!-- 新增按钮end -->
+	</view>
+</template>
+
+<script>
+	import json from '../../../data/json.js';
+	export default {
+		data() {
+			return {
+				funcReport: [],
+				modalName: null,
+				getData:[],
+				dwtype:0,
+				datetimerange: ['', ''],
+				
+				listTouchStart: 0,
+				listTouchDirection: null,
+				
+				
+				flag:false,
+				
+				authListRes:0,
+				
+				
+				pages: 1,
+				size: 12,
+				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
+				isLoadMore: false, //是否加载中
+				deleteStatus:false,
+			};
+		},
+		
+		onReachBottom() { //上拉触底函数
+			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
+				this.isLoadMore = true
+				this.pages += 1;
+				this.loadData()
+			}
+		},
+
+		onLoad: function(option) {
+			this.dwtype=option.dwtype
+			this.loadData()
+
+		},
+		onNavigationBarButtonTap(e) {
+			console.log(e)
+			uni.navigateTo({
+				url: './export/export?dwtype='+this.dwtype,
+
+			});
+		},
+		watch: {
+			
+			
+			datetimerange:function(){
+				this.funcReport=[];
+				this.pages = 1;
+				this.authListRes=[]
+				this.loadData()
+			},
+			
+			
+		},
+		methods: {
+			
+			loadData(){
+			
+				this.getDeviceList({
+					'company_code':uni.getStorageSync('selectedCode'),
+					'start_time':this.datetimerange[0],
+					'end_time':this.datetimerange[1],
+					'pages': this.pages,
+					'size': this.size
+				})
+				
+			},
+
+		
+			
+			// 设备类型数据请求
+			async getDeviceList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'AlarmReport/index',
+					data:params,
+					showLoading: true
+				})
+				
+				if(this.deleteStatus){
+					this.funcReport=[];
+					this.deleteStatus=false;
+				}
+				this.authListRes = 1;
+				
+			
+				if (res.data.totalcount) {
+					this.funcReport = this.funcReport.concat(res.data.data)
+					if (res.data.data.length < this.size) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
+			
+						this.isLoadMore = true
+						this.loadStatus = 'nomore'
+					} else {
+						this.isLoadMore = false
+					}
+				} else {
+					this.isLoadMore = true
+					this.loadStatus = 'nomore'
+				}
+				
+	
+			},
+			
+			//编辑
+			editItem(item) {
+				uni.redirectTo({
+					url: '/pages/setting/funReport/funcAdd/funcAdd?id=' + item.id + '',
+				});
+			},
+			
+			//删除
+			deleteItem(item) {
+				 let deleteT=0;
+				 this.deleteStatus=true
+				 uni.showModal({	
+				     title: '确认删除吗?',
+				     content: '',
+				     success: function (result) {
+				         if (result.confirm) {
+							  this.deleteAlarm({
+							 	"id": item.id
+							 });
+				         } else if (result.cancel) {
+				             console.log('用户点击取消');
+				         }
+				     }.bind(this)
+				 }); 
+			},
+			
+			
+			// 删除请求接口
+			async deleteAlarm(ming = {}) {
+				let res = await  this.$myRequest({
+					url: 'AlarmReport/del ',
+					data: ming
+				})
+				if (!res.data.flag) {
+					alert('删除失败');
+					return;
+				}
+				this.getDeviceList({'company_code':uni.getStorageSync('selectedCode')})
+				
+				return res;
+			},
+			
+			// 新增
+			goAddPage(type) {
+				uni.redirectTo({
+					url: '/pages/setting/funReport/funcAdd/funcAdd',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			
+			
+			
+			// ListTouch触摸开始
+			ListTouchStart(e) {
+				this.listTouchStart = e.touches[0].pageX
+			},
+			
+			// ListTouch计算方向
+			ListTouchMove(e) {
+				this.listTouchDirection = e.touches[0].pageX - this.listTouchStart < -80 ? 'left' : 'right'
+			},
+			
+			// ListTouch计算滚动
+			ListTouchEnd(e) {
+				if (this.listTouchDirection == 'left') {
+					this.modalName = e.currentTarget.dataset.target
+				} else {
+					this.modalName = null
+				}
+				this.listTouchDirection = null
+			}
+			
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	.cu-item {
+		height: 180rpx !important
+	}
+	.plus {
+	    position: fixed;
+	    bottom: 3px;
+	    right: 3px;
+	}
+</style>

+ 405 - 0
src/pages/setting/funReport/funcAdd/funcAdd.vue

@@ -0,0 +1,405 @@
+<template>
+  <view
+    class="appWrapper padding-top"
+    style="height: calc(100vh - 250rpx); overflow: scroll"
+  >
+    <form action="" class="funcAdd">
+      <view class="form-item selectBox">
+        <view class="title"><text class="necessary">*</text>报备类型:</view>
+        <el-select v-model="report_type" name="" id="" placeholder="" clearable>
+          <el-option value="">请选择</el-option>
+          <el-option value="1">单位</el-option>
+          <el-option value="2">类型</el-option>
+          <el-option value="3">设备</el-option>
+        </el-select>
+        <text class="icon iconfont margin-right-sm margin-left">&#xe63d;</text>
+      </view>
+      <view
+        class="form-item selectBox"
+        v-if="report_type == 2 || report_type == 3"
+      >
+        <view class="title"><text class="necessary">*</text>设备类型:</view>
+        <el-select v-model="device_type" name="" id="" placeholder="" clearable>
+          <el-option value="">请选择</el-option>
+          <el-option value="1">火系统</el-option>
+          <el-option value="2">水系统</el-option>
+          <el-option value="3">烟感系统</el-option>
+          <el-option value="4">消防栓</el-option>
+          <el-option value="5">液位</el-option>
+          <el-option value="6">RTU</el-option>
+          <el-option value="7">电气火灾</el-option>
+          <el-option value="16">视频监控</el-option>
+          <el-option value="128">井盖</el-option>
+          <el-option value="131">可燃气体</el-option>
+          <el-option value="130">门禁监测</el-option>
+          <el-option value="129">地磁监测</el-option>
+          <el-option value="17">电梯监测</el-option>
+        </el-select>
+        <text class="icon iconfont margin-right-sm margin-left">&#xe63d;</text>
+      </view>
+
+      <view class="form-item" v-if="report_type">
+        <view class="title">
+          <text class="necessary">*</text>
+          开始时间:
+        </view>
+        <view class="example-body">
+          <uni-datetime-picker
+            v-model="start_time"
+            :start="this.id ? '' : now"
+          />
+        </view>
+      </view>
+      <view class="form-item" v-if="report_type">
+        <view class="title">
+          <text class="necessary">*</text>
+          结束时间:
+        </view>
+        <view class="example-body">
+          <uni-datetime-picker v-model="end_time" :start="start_time" />
+        </view>
+      </view>
+
+      <view class="form-item" v-if="report_type == 3 && device_type == 6">
+        <view class="title"><text class="necessary">*</text>端口号:</view>
+        <input name="input" v-model="device_port" />
+      </view>
+
+      <view
+        class="form-item selectBox"
+        v-if="report_type == 3 && device_type == 6"
+      >
+        <view class="title"><text class="necessary">*</text>端口类型:</view>
+        <el-select v-model="port_type" name="" id="" placeholder="" clearable>
+          <el-option value="">请选择</el-option>
+          <el-option value="1">数字量</el-option>
+          <el-option value="2">模拟量</el-option>
+        </el-select>
+        <text class="icon iconfont margin-right-sm margin-left">&#xe63d;</text>
+      </view>
+
+      <view class="form-item selectBox" v-if="report_type == 3 && device_type">
+        <view class="title"><text class="necessary">*</text>报备设备:</view>
+        <el-select v-model="device_code" name="" id="" placeholder="" clearable>
+          <el-option value="">请选择</el-option>
+          <el-option
+            :value="item.owner_code"
+            v-for="(item, index) in deviceListData"
+            :key="index"
+          >
+            {{ item.owner_name }}
+          </el-option>
+        </el-select>
+        <text class="icon iconfont margin-right-sm margin-left">&#xe63d;</text>
+      </view>
+
+      <view class="form-item" v-if="report_type">
+        <view class="title"><text class="necessary"></text>备注:</view>
+        <input name="input" v-model="remarks" />
+      </view>
+
+      <view class="btn-area submitBottomBtn padding-lr-sm">
+        <button class="bg-blue round margin-top" @tap="submit()">提 交</button>
+      </view>
+    </form>
+  </view>
+</template>
+<style scoped>
+::v-deep .funcAdd .uni-date-x--border,
+.uni-date-x {
+  border-radius: 0 !important;
+}
+.funcAdd .example-body {
+  margin: 0;
+  width: calc(100% - 200rpx);
+}
+</style>
+
+<script>
+export default {
+  data() {
+    return {
+      id: "",
+
+      report_type: "",
+      device_type: "",
+      start_time: "",
+      end_time: "",
+      remarks: "",
+      device_port: "",
+      port_type: "",
+      device_code: "",
+      now: "",
+
+      deviceListData: [],
+      detailsData: "",
+    };
+  },
+  onLoad: function (option) {
+    this.id = option.id;
+    uni.setNavigationBarTitle({
+      title: option.id ? "编辑" : "新增",
+    });
+
+    var nowTemp = new Date();
+    this.now = new Date(
+      nowTemp.getFullYear(),
+      nowTemp.getMonth(),
+      nowTemp.getDate(),
+      0,
+      0,
+      0,
+      0
+    );
+
+    if (option.id) {
+      this.getDetailsData({ id: option.id });
+    }
+  },
+  watch: {
+    start_time: function () {
+      // alert(this.start_time)
+    },
+    report_type: function (newVal) {
+      if (newVal) {
+        var array123 = [
+          "",
+          "1",
+          "2",
+          "3",
+          "4",
+          "5",
+          "6",
+          "7",
+          "16",
+          "128",
+          "131",
+          "130",
+          "129",
+          "17",
+        ];
+        if (array123.indexOf(this.device_type) == -1) {
+          this.device_type = "";
+        }
+      }
+    },
+    device_type: function (newVal) {
+      if (newVal) {
+        this.deviceList({
+          company_code: uni.getStorageSync("selectedCode"),
+          device_type: this.device_type,
+        });
+      }
+    },
+  },
+  methods: {
+    // 回显信息请求
+    async getDetailsData(params = {}) {
+      const res = await this.$myRequest({
+        url: "AlarmReport/editData",
+        data: params,
+        showLoading: true,
+      });
+
+      this.detailsData = res.data.data[0];
+      console.log(this.detailsData);
+      this.report_type = this.detailsData.report_type;
+      this.device_type = this.detailsData.device_type;
+      this.start_time = this.detailsData.start_time;
+      this.end_time = this.detailsData.end_time;
+      this.remarks = this.detailsData.remarks;
+      this.port_type = this.detailsData.port_type;
+      this.device_port = this.detailsData.device_port;
+      this.device_code = this.detailsData.device_code;
+    },
+
+    async submit() {
+      //提交验证
+
+      if (!this.report_type) {
+        uni.showToast({
+          title: "请输入报备类型",
+          icon: "none",
+        });
+        return;
+      }
+      if (this.report_type == 1) {
+        if (!this.start_time.replace(/^\s*/g, "")) {
+          uni.showToast({
+            title: "请选择开始时间",
+            icon: "none",
+          });
+          return;
+        }
+        if (!this.end_time.replace(/^\s*/g, "")) {
+          uni.showToast({
+            title: "请选择结束时间",
+            icon: "none",
+          });
+          return;
+        }
+      }
+      if (this.report_type == 2 || this.report_type == 3) {
+        if (!this.device_type) {
+          uni.showToast({
+            title: "请选择设备类型",
+            icon: "none",
+          });
+          return;
+        }
+        if (!this.start_time.replace(/^\s*/g, "")) {
+          uni.showToast({
+            title: "请输入开始时间",
+            icon: "none",
+          });
+          return;
+        }
+        if (!this.end_time.replace(/^\s*/g, "")) {
+          uni.showToast({
+            title: "请输入结束时间",
+            icon: "none",
+          });
+          return;
+        }
+      }
+
+      if (this.report_type == 3 && this.device_type) {
+        if (this.device_type == 6) {
+          if (!this.device_port.replace(/^\s*/g, "")) {
+            uni.showToast({
+              title: "请输入端口号",
+              icon: "none",
+            });
+            return;
+          }
+          if (!this.port_type) {
+            uni.showToast({
+              title: "请选择端口类型",
+              icon: "none",
+            });
+            return;
+          }
+          if (!this.device_code) {
+            uni.showToast({
+              title: "请选择报备设备",
+              icon: "none",
+            });
+            return;
+          }
+        }
+        if (!this.device_code) {
+          uni.showToast({
+            title: "请选择报备设备",
+            icon: "none",
+          });
+          return;
+        }
+      }
+
+      let queryParam = {};
+      if (this.id) {
+        queryParam.id = this.id;
+      }
+      queryParam.report_type = this.report_type;
+      queryParam.company_code = uni.getStorageSync("selectedCode");
+      queryParam.remarks = this.remarks;
+      queryParam.start_time = this.start_time;
+      queryParam.end_time = this.end_time;
+
+      if (this.id) {
+        queryParam.id = this.id;
+      }
+
+      if (this.report_type == 1) {
+        this.addDevice(queryParam);
+        return;
+      }
+      if (this.report_type == 2) {
+        queryParam.device_type = this.device_type;
+        this.addDevice(queryParam);
+        return;
+      }
+      if (this.report_type == 3) {
+        queryParam.device_type = this.device_type;
+        if (this.device_type == 6) {
+          queryParam.port_type = this.port_type;
+          queryParam.device_port = this.device_port;
+        }
+        queryParam.device_code = this.device_code;
+        this.addDevice(queryParam);
+        return;
+      }
+
+      this.addDevice(queryParam);
+    },
+
+    async addDevice(params = {}) {
+      const res = await this.$myRequest({
+        url: this.id ? "AlarmReport/edit" : "AlarmReport/add",
+        data: params,
+      });
+
+      if (!res.data.flag) {
+        uni.showToast({
+          title: "提交失败",
+          icon: "none",
+        });
+      } else {
+        uni.showToast({
+          title: "提交成功",
+        });
+      }
+      setTimeout(() => {
+        uni.redirectTo({
+          url: "/pages/setting/funReport/funReport",
+        });
+      }, 1000);
+    },
+
+    radioChange(e) {
+      console.log("type:" + e.detail.value);
+      this.radioOne = e.detail.value;
+    },
+
+    //报备设备下拉请求数据
+    async deviceList(params = {}) {
+      const res = await this.$myRequest({
+        url: "AlarmReport/deviceList",
+        data: params,
+      });
+      this.deviceListData = res.data.data;
+
+      var arr = [];
+      this.deviceListData.forEach(function (item) {
+        arr.push(item.owner_code);
+      });
+      if (arr.indexOf(this.device_code) == -1) {
+        this.device_code = "";
+      }
+    },
+  },
+};
+</script>
+
+
+
+
+<style lang="scss">
+input,
+select,
+option {
+  line-height: 70rpx;
+  padding: 0 20rpx;
+  height: 70rpx;
+  border: 1px solid #ededed;
+  // width:500rpx!important;
+  background-color: #fff;
+  box-sizing: border-box;
+  appearance: none;
+  -moz-appearance: none;
+  -webkit-appearance: none;
+  color: #999;
+}
+
+/* 站点多选下拉样式end */
+</style>

+ 235 - 0
src/pages/setting/messagePush/messagePush.vue

@@ -0,0 +1,235 @@
+<template>
+	<view class="padding-sm messagePush">
+
+		<form action="">
+
+			<checkbox-group class="block" @change="CheckboxChange">
+				<view class="margin-top  ">
+					<view class="flex align-center checkItems" v-for="(item,index) in checkbox">
+						<checkbox class="blue" :class="item.checked==1?'checked':''"
+							:checked="item.checked==1?true:false" :value="item.value"></checkbox>
+						<view class="title">{{item.title}}</view>
+
+
+					</view>
+				</view>
+			</checkbox-group>
+
+			<view class="btn-area submitBottomBtn padding-lr-sm">
+				<button class="bg-blue round  margin-top" @click="$noMultipleClicks(btnSubmit)">提 交 </button>
+			</view>
+
+		</form>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				noClick: true,
+				flag: false,
+				getData: {},
+				checkedValue: [],
+				checkbox: [{
+						value: 'm1',
+						checked: false,
+						title: '火警报警'
+					},
+					{
+						value: 'm2',
+						checked: false,
+						title: '火警故障'
+					},
+					{
+						value: 'm3',
+						checked: false,
+						title: '水压越线'
+					},
+					{
+						value: 'm4',
+						checked: false,
+						title: '开关变化'
+					},
+					{
+						value: 'm5',
+						checked: false,
+						title: '设备离线'
+					},
+					{
+						value: 'm6',
+						checked: false,
+						title: '烟感报警'
+					},
+					{
+						value: 'm7',
+						checked: false,
+						title: '电气火灾'
+					},
+					{
+						value: 'm8',
+						checked: false,
+						title: '视频报警'
+					},
+					{
+						value: 'm9',
+						checked: false,
+						title: '电梯监测'
+					},
+					{
+						value: 'm10',
+						checked: false,
+						title: '井盖监测'
+					}
+				],
+
+			}
+		},
+		onLoad: function(option) {
+			this.getCheckList();
+		},
+		methods: {
+			CheckboxChange(e) {
+				this.flag = true;
+				var items = this.checkbox,
+					values = e.detail.value;
+				this.checkedValue = values;
+				// console.log(values)
+
+				// console.log('点击复选框时this.checkedValue')
+				// console.log(this.checkedValue)
+				for (var i = 0, lenI = items.length; i < lenI; ++i) {
+					items[i].checked = false;
+					for (var j = 0, lenJ = values.length; j < lenJ; ++j) {
+						if (items[i].value == values[j]) {
+							items[i].checked = true;
+							break
+						}
+					}
+				}
+			},
+
+
+			// 回显数据请求
+			async getCheckList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'PushSettings/setperm',
+					data: params,
+					showLoading: true
+				})
+				this.getData = res.data.data[0];
+
+
+
+				// 遍历checkbox数组对象
+				for (let i = 0; i < this.checkbox.length; i++) {
+					//判断value是否存在于返回对象中.存在的话checked重新赋值
+					if (this.getData.hasOwnProperty(this.checkbox[i].value)) {
+						// console.log(this.checkbox[i].value)
+						this.checkbox[i].checked = true
+					}
+				}
+			},
+
+
+			//提交
+			async btnSubmit() {
+
+				// 提交验证
+				// alert(this.aa);
+				// alert(this.checkedValue)
+				// if (!this.aa.length) {
+				// 	uni.showToast({
+				// 		title: "请选择推送选项",
+				// 		icon: "none"
+				// 	});
+				// 	return
+				// }
+
+
+				let mingParams = {};
+				if (!this.flag) {
+					//不点击默认传参
+					var obgj = this.getData;
+					console.log('不点击默认传参obgj')
+					console.log(obgj);
+					var arr = [];
+					for (var key in obgj) {
+						console.log(key)
+						console.log(obgj[key])
+						arr.push([key][0])
+					}
+					arr.map((e) => {
+						mingParams[e] = true;
+					});
+				} else {
+					//点击复选框后传参
+					var arr = this.checkedValue;
+					console.log('自由选中复选框后传参arr')
+					console.log(arr)
+
+
+					arr.map((e) => {
+						mingParams[e] = true;
+					});
+					console.log('mingParams')
+					console.log(mingParams)
+
+
+				}
+
+
+
+				let res = await this.PushSettings(mingParams);
+				// let res = await this.PushSettings({'m1':true,"m2":true,"m6":true});
+
+				if (!res.data.flag) {
+					uni.showToast({
+						title: "添加失败",
+						icon: "none"
+					});
+				} else {
+					uni.showToast({
+						title: "添加成功",
+					});
+					setTimeout(() => {
+						uni.switchTab({
+							url: '/pages/setting/setting',
+						});
+					}, 1000);
+					
+				}
+				
+				
+
+			},
+			PushSettings(params = {}) {
+				return this.$myRequest({
+					url: 'PushSettings/setperm',
+					data: params
+				})
+			},
+
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	.checkItems {
+		width: 50%;
+		display: inline-block;
+		text-align: center;
+		margin-bottom: 40rpx;
+
+		.title {
+			display: inline-block;
+			margin-left: 10rpx;
+		}
+	}
+	
+	.padding-sm{
+		
+	}
+</style>

+ 185 - 0
src/pages/setting/setting.vue

@@ -0,0 +1,185 @@
+<template>
+  <view class="setting-wrapper">
+    <view class="top-banner justify-center align-center text-center">
+      <view>
+        <image width="130" src="@/static/images/setting/personal-head.png"></image>
+        <view class="userName">{{ useStores.$state.userName }}</view>
+        <!-- <view>上海永天科技股份有限公司</view> -->
+      </view>
+    </view>
+    <view class="cu-list menu-avatar padding-lr-sm padding-top-sm">
+      <view class="cu-item margin-bottom-sm" @tap="goMessagePush()">
+        <view class="cu-avatar">
+          <image class="image-bg" src="@/static/images/setting/push-icon.png" />
+        </view>
+        <view class="content">
+          <view class="">推送设置</view>
+        </view>
+        <view class="nav-right">
+          <view class="text-grey">
+            <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+          </view>
+        </view>
+      </view>
+
+      <view class="cu-item margin-bottom-sm" @tap="goBuilding()">
+        <view class="cu-avatar">
+          <image class="image-bg" src="@/static/images/setting/building-icon.png" />
+        </view>
+        <view class="content">
+          <view class="">建筑管理</view>
+        </view>
+        <view class="nav-right">
+          <view class="text-grey">
+            <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+          </view>
+        </view>
+      </view>
+
+      <view class="cu-item margin-bottom-sm" @tap="goFunReport()">
+        <view class="cu-avatar">
+          <image class="image-bg" src="@/static/images/setting/funcReport.png" />
+        </view>
+        <view class="content">
+          <view class="">功能报备</view>
+        </view>
+        <view class="nav-right">
+          <view class="text-grey">
+            <text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+          </view>
+        </view>
+      </view>
+
+      <view class="margin-bottom-sm">
+        <u-button @click="loginOut()" text="退出登录"></u-button>
+      </view>
+
+      <!-- <view class="cu-item" @tap="goSiteManage" v-if="permissionLabel==1">
+				<view class="cu-avatar " style="background-image:url(@/static/images/setting/setting-icon2.png)"></view>
+				<view class="content">
+					<view class="">站点管理</view>
+				</view>
+				<view class="nav-right">
+					<view class="text-grey">
+						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+					</view>
+				</view>
+			</view>
+			<view class="cu-item" @tap="goAuthManage" v-if="permissionLabel==1">
+				<view class="cu-avatar " style="background-image:url(@/static/images/setting/setting-icon4.png)"></view>
+				<view class="content">
+					<view class="">权限管理</view>
+				</view>
+				<view class="nav-right">
+					<view class="text-grey">
+						<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+					</view>
+				</view>
+			</view> -->
+    </view>
+  </view>
+</template>
+
+<script setup>
+import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
+import { ref, onMounted, inject, shallowRef } from "vue";
+
+import useStore from "@/store/modules/user";
+import useXunJianStore from "@/store/modules/xunJian";
+const useStores = useStore(); //全局用户信息Store
+const settingsStore = useXunJianStore(); //全局变量值Store
+
+const permissionLabel = ref(0);
+
+async function getAuthorization(params) {
+  const res = await this.$myRequest({
+    url: "Com/getAuthorization",
+    showLoading: true,
+    data: params,
+  });
+
+  this.permissionLabel = res.data.permissionLabel;
+}
+
+function goMessagePush() {
+  uni.navigateTo({
+    url: "/pages/setting/messagePush/messagePush",
+    success: (res) => {},
+    fail: () => {},
+    complete: () => {},
+  });
+}
+function goBuilding() {
+  uni.navigateTo({
+    url: "/pages/setting/building/building",
+    success: (res) => {},
+    fail: () => {},
+    complete: () => {},
+  });
+}
+function goFunReport() {
+  uni.navigateTo({
+    url: "/pages/setting/funReport/funReport",
+    success: (res) => {},
+    fail: () => {},
+    complete: () => {},
+  });
+}
+
+/**
+ * @退出登录
+ */
+function loginOut() {
+  //销毁存储的token
+  uni.clearStorage();
+  //关闭当前页面 返回指定页面
+  uni.redirectTo({
+    url: "/pages/login/login",
+  });
+}
+
+onLoad(() => {});
+</script>
+
+<style lang="scss">
+.setting-wrapper {
+  .top-banner {
+    width: 100%;
+    height: 380rpx;
+    background: url(@/static/images/setting/setting-bg.png) no-repeat;
+    background-size: cover;
+    color: #fff;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    image {
+      width: 130rpx;
+      height: 130rpx;
+    }
+    .userName {
+      margin-top: 30rpx;
+      margin-bottom: 10rpx;
+    }
+  }
+
+  .cu-list.menu-avatar .cu-item {
+    border-radius: 5px;
+    padding: 30rpx 0;
+    box-shadow: 1px 1px 4px rgb(26 26 26 / 10%);
+    .cu-avatar {
+      background-color: rgba(0, 0, 0, 0);
+      background-size: 100% 100%;
+      left: 26rpx;
+    }
+    .content {
+      left: 130rpx;
+      font-size: 32rpx;
+    }
+  }
+}
+</style>
+<style>
+body {
+  background: #fff;
+}
+</style>

+ 77 - 0
src/pages/test/export.vue

@@ -0,0 +1,77 @@
+<template>
+	<view>
+		<!-- 多个复选框,带全选 -->
+		<view>
+			<checkbox-group class="block" @change="changeCheckbox">
+				<view v-for="item in newDeviceManage" :key="item.id">				
+					<checkbox :value="String(item.id)" :checked="checkedArr.includes(String(item.id))" :class="{'checked':checkedArr.includes(String(item.id))}"></checkbox>
+					<text>{{item.title}}</text>
+				</view>
+			</checkbox-group>
+		</view>
+		<view>
+			<checkbox-group @change="allChoose">
+				<label>
+					<checkbox value="all" :class="{'checked':allChecked}" :checked="allChecked?true:false"></checkbox> 全选
+				</label>
+			</checkbox-group>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				isChecked:false,
+				newDeviceManage:[
+					{'id':0,'title':'选项一'},
+					{'id':1,'title':'选项二'},
+					{'id':2,'title':'选项三'},
+					{'id':3,'title':'选项四'},
+					{'id':4,'title':'选项五'},
+					{'id':5,'title':'选项六'},
+					{'id':6,'title':'选项七'},
+					{'id':7,'title':'选项八'},
+					{'id':8,'title':'选项九'},
+					{'id':9,'title':'选项十'}
+				],
+				checkedArr:[], //复选框选中的值
+				allChecked:false //是否全选
+			}
+		},
+		methods: {
+			// 多选复选框改变事件
+			changeCheckbox(e){
+				this.checkedArr = e.detail.value;
+				// 如果选择的数组中有值,并且长度等于列表的长度,就是全选
+				if(this.checkedArr.length>0 && this.checkedArr.length==this.newDeviceManage.length){
+					this.allChecked=true;
+				}else{
+					this.allChecked=false;
+				}
+			},
+			// 全选事件
+			allChoose(e){
+				let chooseItem = e.detail.value;
+				// 全选
+				if(chooseItem[0]=='all'){
+					this.allChecked=true;
+					for(let item of this.newDeviceManage){
+						let itemVal=String(item.id);
+						if(!this.checkedArr.includes(itemVal)){
+							this.checkedArr.push(itemVal);
+						}
+					}					
+				}else{
+					// 取消全选
+					this.allChecked=false;
+					this.checkedArr=[];
+				}
+			}
+		}
+	}
+</script>
+
+<style>
+</style>

+ 105 - 0
src/pages/test/test-1.vue

@@ -0,0 +1,105 @@
+<template>
+  <view>
+    <button class="bg-blue" @click="scancode()">扫码</button>
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {};
+  },
+
+  onLoad() {
+    // #ifdef H5
+    let redirect_uri = location.href.split("#")[0];
+    uni.request({
+      url: "https://qhome.usky.cn/USKYZHAF/sign.php",
+      header: {
+        "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+      },
+      data: {
+        url: redirect_uri,
+      },
+      method: "GET",
+      success: (res) => {
+        let apiList = [
+          // 可能需要用到的能力 需要啥就写啥。多写也没有坏处
+          "openLocation",
+          "getLocation",
+          "scanQRCode",
+        ];
+        let info = {
+          debug: true, // 调试,发布的时候改为false
+          appId: res.data.appid,
+          nonceStr: res.data.nonceStr,
+          timestamp: parseInt(res.data.timestamp),
+          signature: res.data.sha_str,
+          jsApiList: apiList,
+        };
+        this.wx_co(info);
+      },
+    });
+
+    // #endif
+  },
+
+  methods: {
+    wx_co: function (wx_co) {
+      this.$wx.config({
+        debug: false, // 开启调试模式
+
+        appId: wx_co.appId, // 必填,公众号的唯一标识
+
+        timestamp: wx_co.timestamp, // 必填,生成签名的时间戳
+
+        nonceStr: wx_co.nonceStr, // 必填,生成签名的随机串
+
+        signature: wx_co.signature, // 必填,签名,见附录1
+
+        jsApiList: ["onMenuShareAppMessage", "scanQRCode"], // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+      });
+
+      this.$wx.ready(function () {
+        //需在用户可能点击分享按钮前就先调用
+
+        this.$wx.checkJsApi({
+          jsApiList: ["scanQRCode"], // 需要检测的JS接口列表,所有JS接口列表见附录2,
+
+          success: function (res) {
+            // 以键值对的形式返回,可用的api值true,不可用为false
+            // 如:{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
+          },
+        });
+      });
+
+      this.$wx.error(function (res) {
+        console.log(res, "this.$wx.error"); // config信息验证失败会执行error函数
+      });
+    },
+
+    scancode: function () {
+      alert(1);
+      this.$wx.scanQRCode({
+        needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+
+        scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
+
+        success: function (res) {
+          setTimeout(function () {
+            /* 放200ms后执行的代码 */
+            alert(2);
+          }, 1000);
+
+          var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
+        },
+      });
+    },
+  },
+};
+</script>
+
+
+
+<style lang="scss">
+</style>

+ 36 - 0
src/pages/test/test-select-picker.vue

@@ -0,0 +1,36 @@
+<template>
+    <view>
+        <view class="uni-title uni-common-pl">地区选择器</view>
+        <view class="uni-list">
+            <view class="uni-list-cell">
+                <view class="uni-list-cell-db">
+                    <picker @change="bindPickerChange" :value="index" :range="array">
+                        <view class="uni-input">{{array[index]}}</view>
+                    </picker>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+	export default {
+    data() {
+        return {
+            array: ['中国', '美国', '巴西', '日本'],
+            index: 0,
+        }
+    },
+    computed: {
+    },
+    methods: {
+        bindPickerChange: function(e) {
+            console.log('picker发送选择改变,携带值为', e.target.value)
+            this.index = e.target.value
+        },
+    }
+}
+</script>
+
+<style>
+</style>

+ 126 - 0
src/pages/test/test.vue

@@ -0,0 +1,126 @@
+<template>
+	<view>
+		<view @tap="goCamera()" class="cameraButton">
+			拍照按钮
+		</view>
+		
+		<view class="uni-list list-pd">
+			<view class="uni-uploader__files">
+				<view v-for="(image, index) in imageList" :key="index" class="abc">
+					<view class="uni-uploader__file" style="inline-block">
+						<view class="delete " :style="{'z-index': 99}" @tap="onDeleteClick(index)">x</view>
+						<view class=" images-one">
+							<image class="uni-uploader__img image-bg" :src="image" :data-src="image"
+								@tap="previewImage"></image>
+						</view>
+
+					</view>
+				</view>
+				<view class="uni-uploader__input-box" v-show="imageList.length > 0">
+					<view class="uni-uploader__input" @tap="onGetImgClick"></view>
+				</view>
+			</view>
+		</view>
+
+
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+				imageList: [],
+
+			}
+		},
+		mounted() {
+
+		},
+
+
+		//拍照
+		methods: {
+
+			// 删除图片
+			onDeleteClick(index) {
+				this.imageList.splice(index, 1)
+			},
+			// previewImage() {
+			// 	// 预览功能,相关博客有
+			// },
+
+
+
+			goCamera() {
+				const that = this
+				uni.chooseImage({
+					count: 2, // 最多可以选择的图片张数,默认9
+					sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
+					sourceType: ['camera'], //album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
+					success: function(res) {
+						
+						var tempFilePaths = res.tempFilePaths[0]
+						alert(1)
+						alert(tempFilePaths)
+						const len = that.imageList.length
+						if (len >= 2) {
+							uni.showToast({
+								title: '图片最多上传2张'
+							})
+						} else {
+							for (let i = 0; i < 2 - len; i++) {
+								if (res.tempFilePaths[i]) that.imageList.push(res.tempFilePaths[i])
+							}
+						}
+					}
+				})
+
+			},
+
+
+
+
+		}
+
+	}
+</script>
+
+<style>
+	.cameraButton {
+		border: 1px solid red;
+		display: inline-block;
+		border-radius: 10rpx;
+		padding: 10rpx
+	}
+
+	.images-one {
+		white-space: nowrap;
+		position: relative;
+		width: 150rpx;
+		height: 150rpx;
+		background-size: cover;
+		background-position: center;
+		vertical-align: middle;
+		font-size: 1.5em;
+		display: inline-block;
+		margin-right: 20rpx
+	}
+
+	.image-bg {
+		position: absolute;
+		z-index: -1;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		right: 0;
+		width: 100%;
+		height: 100%;
+	}
+
+	.abc {
+		display: inline-block
+	}
+</style>

BIN
src/static/device-bg.png


BIN
src/static/images/alarming/alarming-mc.png


BIN
src/static/images/alarming/alarming-sp.png


BIN
src/static/images/alarming/alarming-water.png


BIN
src/static/images/alarming/alarming-xf.png


BIN
src/static/images/alarming/alarming-zj.png


BIN
src/static/images/calendar.png


BIN
src/static/images/defaultImg.jpg


BIN
src/static/images/dt/dt-alarmIcon.png


BIN
src/static/images/dt/dt-dcIcon.png


BIN
src/static/images/dt/dt-dqIcon.png


BIN
src/static/images/dt/dt-dtIcon.png


BIN
src/static/images/dt/dt-jgIcon.png


BIN
src/static/images/dt/dt-mjIcon.png


BIN
src/static/images/dt/dt-rtuIcon.png


BIN
src/static/images/dt/dt-trIcon.png


BIN
src/static/images/dt/dt-videoIcon.png


BIN
src/static/images/dt/dt-waterIcon.png


BIN
src/static/images/dt/dt-xfsIcon.png


BIN
src/static/images/dt/dt-ygIcon.png


BIN
src/static/images/dt/dt-ywIcon.png


BIN
src/static/images/dt/dt.png


BIN
src/static/images/export/process-icon.png


BIN
src/static/images/export/processed-icon.png


BIN
src/static/images/repair/repair1.png


BIN
src/static/images/repair/repair2.png


BIN
src/static/images/repair/repair3.png


BIN
src/static/images/repair/repair4.png


BIN
src/static/images/repair/repair5.png


BIN
src/static/images/setting/building-icon.png


BIN
src/static/images/setting/funcList.png


BIN
src/static/images/setting/funcReport.png


BIN
src/static/images/setting/personal-head.png


BIN
src/static/images/setting/plus.png


BIN
src/static/images/setting/push-icon.png


BIN
src/static/images/setting/setting-bg.png


BIN
src/static/images/setting/setting-icon1.png


BIN
src/static/images/setting/setting-icon2.png


BIN
src/static/images/setting/setting-icon3.png


BIN
src/static/images/setting/setting-icon4.png


BIN
src/static/images/square/square-alarm.png


BIN
src/static/images/square/square-bx.png


BIN
src/static/images/square/square-bz.png


BIN
src/static/images/square/square-dl.png


BIN
src/static/images/square/square-rl.png


BIN
src/static/images/square/square-sb.png


BIN
src/static/images/square/square-sp.png


BIN
src/static/images/square/square-video.png


BIN
src/static/images/square/square-wb.png


BIN
src/static/images/square/square-xf.png


BIN
src/static/images/square/square-xj.png


BIN
src/static/images/square/square-yh.png


BIN
src/static/images/square/square1.png


BIN
src/static/images/square/square2.png


BIN
src/static/images/video/video-icon-error.png


BIN
src/static/images/video/video-icon-off.png


BIN
src/static/images/video/video-icon-on.png


BIN
src/static/images/weibao/weiBao-icon1.png


BIN
src/static/images/weibao/weiBao-icon2.png


BIN
src/static/images/wt/account.png


BIN
src/static/images/wt/arrow.png


BIN
src/static/images/wt/arrow2.png


BIN
src/static/images/wt/bg.png


BIN
src/static/images/wt/logo.png


BIN
src/static/images/wt/password.png


BIN
src/static/images/wt/phone-icon.png


BIN
src/static/images/wt/phone.png


BIN
src/static/index/banner1.png


BIN
src/static/index/banner2.jpg


BIN
src/static/index/banner3.jpg


BIN
src/static/index/chart3-1.png


BIN
src/static/index/chart3-2.png


BIN
src/static/index/chart3-3.png


BIN
src/static/index/chart3-4.png


BIN
src/static/index/chart3-5.png