Browse Source

优化修复,样式 ,改动前保存jssdk

Ming 4 năm trước cách đây
mục cha
commit
8a8a01e65b

+ 1 - 1
common/common.scss

@@ -614,7 +614,7 @@ radio,checkbox {
 	
 		input,
 		select {
-			width: 500rpx;
+			width: calc(100% - 200rpx);
 			font-size: 28rpx;
 		}
 	

+ 7 - 0
main.js

@@ -23,6 +23,13 @@ import JsonExcel from 'vue-json-excel'
 Vue.component('downloadExcel', JsonExcel)
 
 
+//#ifdef H5
+import wx from '@/node_modules/jweixin-module' 
+Vue.prototype.$wx = wx
+//#endif
+
+
+
 Vue.config.productionTip = false
 
 App.mpType = 'app'

+ 2 - 1
manifest.json

@@ -118,6 +118,7 @@
         "enable" : false
     },
     "h5" : {
+        "publicPath" : "./",
         "title" : "智慧消防",
         "router" : {
             "mode" : "hash",
@@ -136,6 +137,6 @@
                 }
             }
         },
-        "domain" : "https://s.yxin.tech/"
+        "domain" : ""
     }
 }

+ 20 - 20
pages/accountManage/accountManage.vue

@@ -1,27 +1,13 @@
 <template>
 	<view class="padding">
 		<view style="width:100%;overflow:auto;    height: calc(100vh - 156px);" >
-			<!-- <table style="width:200%;text-align:center" >
-				<tr>
-					<th>人员名称</th>
-					<th>联系方式</th>
-					<th>所在单位</th>
-					<th>角色权限</th>
-				</tr>
-				<tr v-for="(item,index) in getData" :key="index">
-					<td>{{item.username}}</td>
-					<td>{{item.phone}}</td>
-					<td>{{item.owner_name}}</td>
-					<td>{{item.statusid}}</td>
-				</tr>
-			</table>	 -->
+
 			
-			<view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /></view>
 			
-			<uni-table border stripe emptyText="暂无更多数据" >
+			<uni-table  stripe emptyText="暂无更多数据" >
 			    <!-- 表头行 -->
 			    <uni-tr>
-			        <uni-th align="center">人员名称</uni-th>
+			        <uni-th align="center" style="width:200rpx">人员名称</uni-th>
 			        <uni-th align="center">联系方式</uni-th>
 			        <uni-th align="center">所在单位</uni-th>
 					 <uni-th align="center" width="100">角色权限</uni-th>
@@ -41,8 +27,9 @@
 		
 		
 		
-		<view class="btn-area submitBottomBtn padding-lr-sm">
-			<button class="bg-blue round  margin-top" @click="goAddPer()">新 增</button>
+		<view class="btn-area submitBottomBtn  bg-white">
+			<view class="uni-pagination-box"><uni-pagination show-icon :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /></view>
+			<button class="bg-blue round " @click="goAddPer()">新 增</button>
 		</view>
 		
 	</view>
@@ -104,6 +91,19 @@
 	}
 </script>
 
-<style>
+<style lang="scss">
+	/deep/ .uni-pagination__btn{
+		background-color:rgba(0,0,0,0)!important
+	}
+	/deep/ .uni-pagination-box{
+		background:#fff;
+		border-top:1px solid #ddd
+	}
+	.submitBottomBtn{
+		padding:0px 32rpx 32rpx 32rpx
+	}
+	/deep/ .uni-pagination__num{
+		height:80rpx
+	}
 
 </style>

+ 14 - 10
pages/deviceDetail/deviceDetail.vue

@@ -51,7 +51,7 @@
 					<text class="cuIcon-titles margin-right-xs"></text>
 					图表
 				</view>
-				<view class="info-content">
+				<view class="info-content noborder">
 					<chart :bindData="staticData"></chart>
 				</view>
 			</view>
@@ -59,17 +59,17 @@
 
 
 
-			<!-- 报警主机图表start -->
+			<!-- 水系统图表start -->
 			<view class="processStatus" v-if="this.getData.dwtype==2">
 				<view class="info-tit margin-left-xs">
 					<text class="cuIcon-titles margin-right-xs"></text>
 					图表
 				</view>
-				<view class="info-content">
+				<view class="info-content noborder">
 					<water-chart :bindData="getData"></water-chart>
 				</view>
 			</view>
-			<!-- 报警主机图表end -->
+			<!-- 水系统图表end -->
 
 
 			<view class="processStatus" v-if="this.getData.dwtype!=1&&this.getData.dwtype!=2">
@@ -123,7 +123,7 @@
 				<!-- 烟感 end -->
 
 				<!-- 视频 start -->
-				<view v-if="this.getData.dwtype==16" class="info-content padding">
+				<view v-if="this.getData.dwtype==16" class="info-content noborder padding">
 					<table>
 						<tr>
 							<th>最后上传值</th>
@@ -139,7 +139,7 @@
 				<!-- 视频 end -->
 
 				<!-- 井盖 start -->
-				<view v-if="this.getData.dwtype==128" class="info-content padding">
+				<view v-if="this.getData.dwtype==128" class="info-content noborder padding">
 					<table>
 						<tr>
 							<th>最后上传值</th>
@@ -155,7 +155,7 @@
 				<!-- 井盖 end -->
 				
 				<!-- 消防栓 start -->
-				<view v-if="this.getData.dwtype==4" class="info-content padding">
+				<view v-if="this.getData.dwtype==4" class="info-content noborder padding">
 					<table>
 						<tr>
 							<th>报警内容</th>
@@ -172,7 +172,7 @@
 				<!-- 消防栓 end -->
 				
 				<!-- 液位 start -->
-				<view v-if="this.getData.dwtype==5" class="info-content padding">
+				<view v-if="this.getData.dwtype==5" class="info-content noborder padding">
 					<table>
 						<tr>
 							<th>液位水位值</th>
@@ -189,7 +189,7 @@
 				<!-- 液位 end -->
 				
 				<!-- 电梯 start -->
-				<view v-if="this.getData.dwtype==17" class="info-content padding">
+				<view v-if="this.getData.dwtype==17" class="info-content noborder padding">
 					<table>
 						<tr>
 							<th>告警内容</th>
@@ -279,5 +279,9 @@
 </script>
 
 <style lang="scss">
-
+.info-content.noborder> uni-view {
+   
+    border-bottom: 1px solid rgba(0,0,0,0);
+	}
+   
 </style>

+ 0 - 1
pages/deviceManage/deviceAdd/deviceAdd.vue

@@ -162,7 +162,6 @@
 				</view>
 				
 			</block>
-\
 			<!-- 电气火灾参数 start -->
 			<block v-if="this.type==7&&this.transfer_type=='4G'">
 				<view class="form-item">

+ 17 - 14
pages/index/components/chart2/chart2.vue

@@ -1,25 +1,26 @@
 <template>
 	<view class="content">
 
-		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts2" class="echarts"></view>
+		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts2"
+			class="echarts"></view>
 
 	</view>
 </template>
 
 <script>
-	 let title = '总数';
-	 
-	export default {
-		props:{
-			bindData:{
-				type:Object,
-				default: ''
-			}
+	let title = '总数';
+
+	export default {
+		props: {
+			bindData: {
+				type: Object,
+				default: ''
+			}
 		},
 		data() {
 			console.log('bindData')
 			console.log(this.bindData)
-			
+
 			return {
 				option: {
 					color: ['#F67F32', '#3BD2BD', '#1DABFE'],
@@ -29,12 +30,14 @@
 					},
 					tooltip: {
 						trigger: 'item',
-						// formatter: "{a} <br/>{b}: {c} ({d}%)"
+						// formatter: "{a} <br/>{b}: {c} ({d}%)"
 						formatter: "{b}: {c} "
 					},
 
 					title: [{ //aa标题
-						text: '{val|' +(parseInt(this.bindData.alarm_count)+parseInt(this.bindData.event_count)+ parseInt(this.bindData.hidden_danger_count))+ '}\n{name|' + title + '}',
+						text: '{val|' + (parseInt(this.bindData.alarm_count) + parseInt(this.bindData
+								.event_count) + parseInt(this.bindData.hidden_danger_count)) + '}\n{name|' +
+							title + '}',
 						top: '45%',
 						left: 'center',
 						textStyle: {
@@ -53,6 +56,7 @@
 						}
 					}],
 					legend: { //aa图例
+					    y:' bottom',
 						orient: 'horizontal',
 						icon: 'circle',
 						itemWidth: 12,
@@ -139,8 +143,7 @@
 				}
 			}
 		},
-		onLoad() {
-		},
+		onLoad() {},
 		methods: {
 			onViewClick(options) {
 				console.log(options)

+ 8 - 4
pages/index/index.vue

@@ -124,11 +124,11 @@
 				alert("你点击了扫一扫");
 				this.scanQRCode();
 			} else {
-				// alert("你点击了获取位置");
-				// this.getLocation()
+				alert("你点击了获取位置");
+				this.getLocation()
 
 
-				this.showTag()
+				// this.showTag()
 			}
 		},
 
@@ -168,7 +168,11 @@
 					alert(11)
 					console.log('wx')
 					console.log(wx)
-					console.log('wx')
+					console.log('wx.scanQRCode')
+					console.log(wx.scanQRCode)
+					
+					console.log('wx.getLocation')
+					console.log(wx.getLocation)
 					wx.scanQRCode({
 						needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
 						scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有

+ 6 - 4
pages/setting/building/building.vue

@@ -93,7 +93,7 @@
 				消防设施平面布置图
 			</view>
 			<view class="padding-lr">
-				<img v-if="!this.getDetailData.layout_plan" src="/static/defaultImg.jpg" style="width:100%"></img>
+				<img v-if="!this.getDetailData.layout_plan&&this.dataRes==1" src="/static/defaultImg.jpg" style="width:100%"></img>
 				<img v-else :src="this.getDetailData.layout_plan" style="width:100%"></img>
 			</view>
 		</view>
@@ -107,7 +107,7 @@
 			<view class="padding-lr padding-bottom-lg">
 				<!-- <img :src="this.getDetailData.build_plan" alt="" width="100%"> -->
 				
-				<img v-if="!this.getDetailData.build_plan" src="/static/defaultImg.jpg" style="width:100%"></img>
+				<img v-if="!this.getDetailData.build_plan&&this.dataRes==1" src="/static/defaultImg.jpg" style="width:100%"></img>
 				<img v-else :src="this.getDetailData.build_plan" style="width:100%"></img>
 				
 				
@@ -122,7 +122,8 @@
 	export default {
 		data() {
 			return {
-				getDetailData:{}
+				getDetailData:{},
+				dataRes:0
 			}
 		},
 		onLoad: function(option) {
@@ -137,7 +138,8 @@
 					showLoading: true
 				})
 				this.getDetailData = res.data.data[0];
-				console.log(this.getDetailData)
+				console.log(this.getDetailData);
+				this.dataRes=1
 			},
 		}
 	}

+ 1 - 0
pages/setting/setting.vue

@@ -153,6 +153,7 @@
 			margin-left:0;
 			.cu-avatar{
 				background-color:rgba(0,0,0,0);
+				background-size:100% 100%;
 				left:26rpx;
 			}
 			.content{

+ 100 - 40
pages/test/test.vue

@@ -1,52 +1,112 @@
 <template>
-	<download-excel class="export-excel-wrapper" :data="json_data" :fields="json_fields" footer='页脚' header='导出数据'
-		name="设备管理数据表.xls">
-		<!-- 上面可以自定义自己的样式,还可以引用其他组件button -->
-		<button type="primary" size="small">导出EXCEL</button>
-	</download-excel>
+
+	<view>
+
+		<button class="bg-blue" @click="scancode()">扫码</button>
+
+	</view>
+
 </template>
 
 <script>
 	export default {
+
 		data() {
-			return {
-				json_fields: {
-					"单位编号": "company", //常规字段
-					"状态": "device_state",
-					"设备编号": "owner_code", 
-					"设备名称": "owner_name",
-					"单元地址": "unitinfo",
-					"创建时间": "install_time",
-				},
-				json_data: [{
-						name: "Tony Peña",
-						city: "New York",
-						country: "United States",
-						birthdate: "1978-03-15",
-						phone: {
-							mobile: "1-541-754-3010",
-							landline: "(541) 754-3010"
-						}
-					},
-					{
-						name: "Thessaloniki",
-						city: "Athens",
-						country: "Greece",
-						birthdate: "1987-11-23",
-						phone: {
-							mobile: "+1 855 275 5071",
-							landline: "(2741) 2621-244"
+
+			return {}
+
+		},
+
+		onLoad() {
+
+			// #ifdef H5
+			let redirect_uri = location.href.split('#')[0]
+			this.$http.get('你的接口', {
+				sing_url: redirect_uri
+			}).then(res => {
+				this.wx_co(res.data)
+			}).catch(e => {
+				console.log('错误信息', e);
+			});
+
+			// #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) {
+						alert(2);
+						var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
+
 					}
-				],
-				json_meta: [
-					[{
-						" key ": " charset ",
-						" value ": " utf- 8 "
-					}]
-				]
-			};
+
+				});
+
+			}
+
 		}
 
 	}
 </script>
+
+
+
+<style lang="scss">
+
+</style>

+ 4 - 2
pages/weiBao/recordDetail/recordDetail.vue

@@ -72,7 +72,7 @@
 					维保图片
 				</view>
 				<view class="padding-lr padding-bottom-lg">
-					<img v-if="!this.getData.report_photos" src="/static/defaultImg.jpg" style="width:100%"></img>
+					<img v-if="!this.getData.report_photos&&this.dataRes==1" src="/static/defaultImg.jpg" style="width:100%"></img>
 					<img v-else :src="this.getData.report_photos" style="width:100%"></img>
 				</view>
 			</view>
@@ -99,7 +99,8 @@
 				flag:false,
 				companyCode:0,
 				
-				getData:{}
+				getData:{},
+				dataRes:0
 
 			}
 		},
@@ -119,6 +120,7 @@
 				})
 				this.getData = res.data.data[0];
 				console.log(this.getData);
+				this.dataRes=1
 			},
 			
 

+ 15 - 9
pages/xunJian/planDetail/planDetail.vue

@@ -9,19 +9,19 @@
 				</view>
 				<input type="text" v-model="reportName">
 			</view>
-			<view class="form-item margin-top">
+			<view class="form-item margin-top" style="margin-left:-6rpx">
 				<view class="title">
 					<text class="necessary">*</text>
 					巡检状态:
 				</view>
-				<radio-group name="gender" @change="radioChange">
-					<label class="margin-right-xs">
+				<radio-group name="gender" @change="radioChange" >
+					<label class="">
 						<radio value="0" checked /><text>正常</text>
 					</label>
-					<label class="margin-right-xs">
+					<label class="">
 						<radio value="1" /><text>异常</text>
 					</label>
-					<label class="margin-right-xs">
+					<label class="">
 						<radio value="2" /><text>故障</text>
 					</label>
 					<label>
@@ -34,8 +34,8 @@
 					<text class="necessary">*</text>
 					上传图片:
 				</view>
-				<view style="width:500rpx">
-					<view ref="input" class="input">
+				<view class="unload-box">
+					<view ref="input" class="input" >
 					</view>
 				</view>
 			</view>
@@ -44,7 +44,7 @@
 					<text class="necessary">*</text>
 					巡检描述:
 				</view>
-				<textarea maxlength="-1" @input="textareaAInput" placeholder="" v-model="msg" width="250"></textarea>
+				<textarea maxlength="-1" @input="textareaAInput" placeholder="" v-model="msg"></textarea>
 			</view>
 
 			<view class="btn-area submitBottomBtn padding-lr-sm">
@@ -164,5 +164,11 @@
 </script>
 
 <style lang="scss">
-
+.unload-box{
+	width:calc(100% - 200rpx)
+}
+.textarea{
+	width:calc(100% - 200rpx)
+	
+}
 </style>

+ 1 - 1
pages/xunJian/planDetailDone/planDetailDone.vue

@@ -40,7 +40,7 @@
 				</view>
 			
 				<!-- <img :src="`https://qhome.usky.cn${this.getData.report_photos}`" alt="" style="max-width:50%">  -->
-				<img :src="`${this.$BASE_URL}${this.getData.report_photos}`" alt="" style="max-width:50%">
+				<img :src="`${this.$websiteUrl}${this.getData.report_photos}`" alt="" style="max-width:50%">
 			</view>
 			
 			<view class="form-item">