Browse Source

数据对接bugxiuf

Ming 4 years ago
parent
commit
1c58f788cc

+ 80 - 63
pages/analyse/buildingCheck/buildingCheck.vue

@@ -1,10 +1,10 @@
 <template>
 	<view>
-		
+
 		<!-- 筛选框start -->
 		<view class="ding">
 			<view class="cu-bar search bg-gray filter-section" style="with:50%;">
-				<view class="search-form round bg-white" >
+				<view class="search-form round bg-white">
 					<select name="" id="" placeholder="" style="width:98%;background-size: 4%;font-size:28rpx">
 						<option value="">请选择建筑</option>
 						<option value="">建筑1</option>
@@ -13,7 +13,7 @@
 				</view>
 			</view>
 			<view class="cu-bar search bg-gray filter-section">
-				 <calendar></calendar>
+				<calendar></calendar>
 				<!-- <view class="search-form round bg-white" style="margin-bottom:26rpx">
 					<input class="" @focus="InputFocus" v-model="siteName" @blur="InputBlur" :adjust-position="false" type="text"
 					 placeholder="请选择时间" confirm-type="search"></input>
@@ -24,24 +24,24 @@
 			</view>
 		</view>
 		<!-- 筛选框end -->
-		
+
 		<view class="processStatus  bg-white margin-bottom-sm" style="margin-top:206rpx">
 			<view class="info-tit margin-left-xs">
 				<text class="cuIcon-titles margin-right-xs"></text>
 				安全分析
 			</view>
-			<view class="padding-lr padding-bottom-lg">
-				<chart :bindData="this.staticData"></chart>
+			<view class="padding-lr padding-bottom-lg" style="min-height:500rpx">
+				<chart :bindData="this.getDetailData" v-if="this.getDetailData.address"></chart>
 			</view>
 		</view>
-		
-		<view class="basic-info  bg-white margin-bottom-sm" >
+
+		<view class="basic-info  bg-white margin-bottom-sm">
 			<view class="info-tit margin-left-xs">
 				<text class="cuIcon-titles margin-right-xs"></text>
 				消防各子系统安装情况
 			</view>
 			<view class="info-content padding-lr padding-bottom">
-				<table style="border:1px solid #ccc"  cellspacing="0" cellpadding="0" align="center">
+				<table style="border:1px solid #ccc" cellspacing="0" cellpadding="0" align="center">
 					<tr>
 						<td>子系统安装情况</td>
 						<td>报警数</td>
@@ -59,7 +59,7 @@
 					</tr>
 					<tr>
 						<td>消防给水系统</td>
-						<td>报警数量1414,处理1252  </td>
+						<td>报警数量1414,处理1252 </td>
 						<td>1% </td>
 					</tr>
 					<tr>
@@ -70,7 +70,7 @@
 					<tr>
 						<td>自动喷水灭火系统</td>
 						<td>报警数量36351,处理9</td>
-						<td>  23%</td>
+						<td> 23%</td>
 					</tr>
 					<tr>
 						<td>防排烟系统</td>
@@ -80,14 +80,14 @@
 				</table>
 			</view>
 		</view>
-		
+
 		<view class="processStatus  bg-white margin-bottom-sm">
 			<view class="info-tit margin-left-xs">
 				<text class="cuIcon-titles margin-right-xs"></text>
 				告警频发点位统计分析
 			</view>
 			<view class="info-content padding-lr padding-bottom">
-				<table style="border:1px solid #ccc"  cellspacing="0" cellpadding="0" align="center">
+				<table style="border:1px solid #ccc" cellspacing="0" cellpadding="0" align="center">
 					<tr>
 						<td>子系统 </td>
 						<td>报警点位 </td>
@@ -99,22 +99,22 @@
 						<td>12</td>
 					</tr>
 					<tr>
-						
+
 						<td>二楼茶水间</td>
 						<td>10</td>
 					</tr>
 					<tr>
-						
+
 						<td>厨房</td>
 						<td>8</td>
 					</tr>
 					<tr>
 						<td rowspan="3"> 电气火灾监控系统</td>
-						<td> 二楼卫生间  </td>
+						<td> 二楼卫生间 </td>
 						<td> 7</td>
 					</tr>
 					<tr>
-						
+
 						<td>二楼茶水间</td>
 						<td>6</td>
 					</tr>
@@ -122,7 +122,7 @@
 						<td>三楼大厅</td>
 						<td>5</td>
 					</tr>
-					
+
 					<tr>
 						<td>消防给水系统</td>
 						<td>二楼接待室</td>
@@ -147,12 +147,12 @@
 						<td>一楼展厅</td>
 						<td>1</td>
 					</tr>
-					
+
 				</table>
 			</view>
 		</view>
-		
-		
+
+
 		<view class="processStatus  bg-white margin-bottom-sm">
 			<view class="info-tit margin-left-xs">
 				<text class="cuIcon-titles margin-right-xs"></text>
@@ -169,7 +169,7 @@
 				<view>可燃气体监测该类设备隐患极高或存在故障,建议尽早进行排查;</view>
 			</view>
 		</view>
-		
+
 		<view class="processStatus  bg-white margin-bottom-sm">
 			<view class="info-tit margin-left-xs">
 				<text class="cuIcon-titles margin-right-xs"></text>
@@ -190,10 +190,12 @@
 	export default {
 		components: {
 			chart,
-		
+
 		},
 		data() {
 			return {
+				
+				getDetailData:{},
 				// deviceOffLineData:json.deviceOffLineData,
 				siteListRes: 0,
 				siteName: '',
@@ -203,41 +205,57 @@
 				listTouchStart: 0,
 				listTouchDirection: null,
 				CustomBar: this.CustomBar,
-				
+
 				staticData: {
-	"msg": "\u64cd\u4f5c\u6210\u529f",
-	"flag": true,
-	"companyCode": "1,2,3,4,5,6,7,8,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39",
-	"data": [{
-		"statisticalPeriod": "2021-03-16~2021-04-16",
-		"smartElectricityCount": "178",
-		"videoMonitoringCount": "12456",
-		"alarmCount": 12627,
-		"eventCount": 2,
-		"hiddenDangerCount": 4,
-		"offlineCount": 20,
-		"faultCount": 30,
-		"earlyWarningCount": 100,
-		"otherCount": 99,
-		"normalCount": 66,
-		"integratedAlarmCount": 12627,
-		"unprocessedCount": 0
-	}]
-}
-				
-			
+					"msg": "\u64cd\u4f5c\u6210\u529f",
+					"flag": true,
+					"companyCode": "1,2,3,4,5,6,7,8,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39",
+					"data": [{
+						"statisticalPeriod": "2021-03-16~2021-04-16",
+						"smartElectricityCount": "178",
+						"videoMonitoringCount": "12456",
+						"alarmCount": 12627,
+						"eventCount": 2,
+						"hiddenDangerCount": 4,
+						"offlineCount": 20,
+						"faultCount": 30,
+						"earlyWarningCount": 100,
+						"otherCount": 99,
+						"normalCount": 66,
+						"integratedAlarmCount": 12627,
+						"unprocessedCount": 0
+					}]
+				}
+
+
 			}
 		},
+		
+		onLoad: function(option) {
+			this.getDetails({'company_code':uni.getStorageSync('selectedCode')})
+		},
+		
 		methods: {
+			// 建筑体检数据请求
+			async getDetails(params = {}) {
+				const res = await this.$myRequest({
+					url: 'PhysicalExamination/getPhysicalExamination',
+					data: params,
+					showLoading: true
+				})
+				this.getDetailData = res.data.data[0];
+				
+			},
+			
 			InputFocus(e) {
 				this.InputBottom = e.detail.height
 			},
 			InputBlur(e) {
 				this.InputBottom = 0
 			},
-			
 
-			
+
+
 
 
 		}
@@ -245,26 +263,25 @@
 </script>
 
 <style lang="scss">
-	
-	
-
-page {
+	page {
 		background: #EDEDED;
 	}
-/deep/ .leave_cont .ul .li{
-		width:42%!important;
-		
+
+	/deep/ .leave_cont .ul .li {
+		width: 42% !important;
+
 	}
-/deep/ .leave_cont .ul{
-		background:#fff;
-		
+
+	/deep/ .leave_cont .ul {
+		background: #fff;
+
 	}
-/deep/	.date{font-size:28rpx;}
-/deep/	.leave_cont{
-	width:76%
-}
-	
 
+	/deep/ .date {
+		font-size: 28rpx;
+	}
 
+	/deep/ .leave_cont {
+		width: 76%
+	}
 </style>
-

+ 18 - 18
pages/analyse/buildingCheck/components/chart/chart.vue

@@ -1,7 +1,7 @@
 <template>
-	<view class="content">
+	<view class="content" >
 
-		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts2" class="echarts"></view>
+		<view @click="echarts.onClick"  :change:prop="echarts.updateEcharts" id="echarts2" class="echarts" ></view>
 
 	</view>
 </template>
@@ -10,12 +10,12 @@
 
 	 let title = '安全评分';
 	export default {
-		// props:{
-		// 	bindData:{
-		// 		type:Object,
-		// 		default: ''	
-		// 	}
-		// },
+		props:{
+			bindData:{
+				type:Object,
+				default: ''	
+			}
+		},
 		data() {
 			return {
 				option: {
@@ -31,8 +31,8 @@
 					},
 
 					title: [{ //aa标题
-						// text: '{val|121}',
-						text: '{val|121}\n{name|' + title + '}',
+	
+						text: '{val|'+this.bindData.score+'}\n{name|' + title + '}',
 						top: '45%',
 						left: 'center',
 						textStyle: {
@@ -83,32 +83,32 @@
 							},
 						},
 						data: [{
-								name: "TTU",
-								value: '11'
+								name: "RTU",
+								value: this.bindData.count_rtu
 							},
 							{
 								name: "电气火灾",
-								value: 22
+								value: this.bindData.count_dqhz
 							},
 							{
 								name: "视频监测",
-								value: 8
+								value: this.bindData.count_spjc
 							},
 							{
 								name: "水系统",
-								value:3
+								value: this.bindData.count_sj
 							},
 							{
 								name: "烟感",
-								value: 11
+								value: this.bindData.count_yg
 							},
 							{
 								name: "消防栓",
-								value: 23
+								value: this.bindData.count_xfs
 							},
 							{
 								name: "液位",
-								value: 21
+								value: this.bindData.count_rtu
 							},
 						],
 					

+ 8 - 11
pages/index/index.vue

@@ -12,6 +12,7 @@
 				</view>
 			</view>
 			<view class="select-items">
+				<view class=" site-item" v-if="!searchList.length" style="text-align:center">暂无结果</view>
 				<view class="select-item" v-for="(item,index) in searchList" @click="clickSelectItem(item,index)"
 					:key="index">{{item.owner_name}}</view>
 			</view>
@@ -239,6 +240,10 @@
 					this.searchList.push(item)
 					this.searchList2.push(item);
 				});
+				console.log('this.searchList')
+				console.log(this.searchList)
+				
+				
 			},
 			
 			showTag() {
@@ -249,24 +254,16 @@
 			// 下拉选择
 			clickSelectItem(item, index) {
 				this.selectedCode=item.owner_code;
-				this.getSearchList({
-					"owner_code": item.owner_code
-				});
-				
-				
 				uni.setStorageSync('selectedCode',item.owner_code);
 				uni.setStorageSync('selectedName',item.owner_name);
-				
-				
 				this.searchInput=item.owner_name;
-				
 				uni.setNavigationBarTitle({
 					title: this.searchInput
 				});
 				this.flag = false
 			},
 			handleInput() {
-				var newlist = this.searchList2.filter(item => item.indexOf(this.searchInput) > -1)
+				var newlist = this.searchList2.filter(item => item.owner_name.indexOf(this.searchInput) > -1);
 				this.searchList = newlist
 			},
 
@@ -289,8 +286,8 @@
 					url: 'Index/getHomePageData',
 					data: param
 				})
-				console.log('首页请求staticData')
-				console.log(res.data.data[0])
+				// console.log('首页请求staticData')
+				// console.log(res.data.data[0])
 				this.staticData=res.data.data[0]
 				
 			},

+ 24 - 71
pages/info/fireBase/fireBase.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="fireBashWrapper">
 		
-		<block v-if="TabCur==0">
+		<block>
 			<view class="" style="margin-top:0">
 				<view class="cu-list menu-avatar ">
-					<view class="cu-item" v-for="(item,index) in unporcessList" :key="index"  @tap="goFireBaseDetail">
+					<view class="cu-item" v-for="(item,index) in this.getData" :key="index"  @tap="goDetail(item)">
 						<view class="cu-avatar" style="background-image:url(../../../static/fire-base1.png);"></view>
 						<view class="content">
 							<view class="pro-title">
@@ -12,10 +12,10 @@
 							</view>
 							<view class="pro-des  ">
 								<view class="text-cut">
-									{{item.subtit}}
+									{{item.author}}
 								</view>
 							</view>
-							<view class="pro-date">{{item.time}}</view>
+							<view class="pro-date">{{item.release_time}}</view>
 						</view>
 						
 					</view>
@@ -29,80 +29,33 @@
 	export default {
 		data() {
 			return {
-				unporcessList:[{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},
-				{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},
-				{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},
-				{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				},
-				{
-					title:'火灾逃生九大要诀',
-					time:'2020-02-12',
-					subtit:'admin'
-				}],
-				
-				
-				modalName: null,
-				listTouchStart: 0,
-				listTouchDirection: null,
-				CustomBar: this.CustomBar,
-				TabCur: 0,
-				
-				tabNav: ['未处理', '已处理']
+				getData:[]
 			};
 		},
+		onLoad:function(option){
+			this.getFireBaseList({'company_code':uni.getStorageSync('selectedCode')})
+		
+		},
 		methods: {
-			tabSelect(e) {
-				this.TabCur = e.currentTarget.dataset.id;
-				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
+			
+			
+			// 列表数据请求
+			async getFireBaseList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'KnowledgeBase/getKnowledgeBaseList',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data;
+				console.log(this.getData)
 			},
+
 			
 			// 页面跳转
-			goFireBaseDetail() {
-				uni.navigateTo({
-					url: '/pages/info/fireBashDetail/fireBashDetail',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			},
-			goProcessedDetail(){
+			
+			goDetail(item){
 				uni.navigateTo({
-					url: '/pages/processedDetail/processedDetail',
+					url: '/pages/info/fireBashDetail/fireBashDetail?id='+item.id,
 					success: res => {},
 					fail: () => {},
 					complete: () => {}

+ 24 - 6
pages/info/fireBashDetail/fireBashDetail.vue

@@ -1,13 +1,13 @@
 <template>
 	<view class="padding fireBashDetailWrapper">
-		<view class="margin-bottom fireD-tit">火灾逃生十大要诀火灾逃生十大要诀</view>
+		<view class="margin-bottom fireD-tit">{{this.getData.title}}</view>
 		<view class="flex justify-between align-center">
 			<view>
 				<view class="cu-avatar round" style="background-image:url(../../static/fireBase.png)"></view>
-				<text class="margin-left-sm margin-right-sm text-sm">admin</text>
-				<text>2020-01-08</text>
+				<text class="margin-left-sm margin-right-sm text-sm">{{this.getData.author}}</text>
+				<text>{{this.getData.release_time}}</text>
 			</view>
-			<view style="color:#999">阅读:1568</view>
+			<view style="color:#999">阅读:{{this.getData.frequency}}</view>
 		</view>
 
 		<view class="fireD-content margin-top padding-top-xs">
@@ -63,11 +63,29 @@
 		data() {
 			return {
 				praise:false,
-				zan:false
-
+				zan:false,
+				getData:{}
 			}
 		},
+		
+		onLoad:function(option){
+			this.getFireBaseDetail({'company_code':uni.getStorageSync('selectedCode'),"id":option.id})
+		},
+		
 		methods: {
+			
+			// 详情页数据请求
+			async getFireBaseDetail(params = {}) {
+				const res = await this.$myRequest({
+					url: 'KnowledgeBase/getKnowledgeBaseDetails',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data[0];
+				console.log(this.getData)
+			},
+			
+			
 			clickPraise() {
 		
 				this.praise = !this.praise;

+ 57 - 6
pages/repair/repair.vue

@@ -18,7 +18,7 @@
 		
 		<block>
 			<view>
-				<view class="cu-list menu-avatar ">
+				<!-- <view class="cu-list menu-avatar ">
 					<view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
 						<view class="cu-avatar " :style="`background-image:url(${item.imgUrl})`"  style="width:82rpx;height:82rpx"></view>
 						<view class="content">
@@ -33,14 +33,40 @@
 							<view class="pro-date ">{{item.time}}</view>
 						</view>
 						<view class="action margin-right-sm" style="text-align:right">
-							<view style="color:#FDCA60" v-if="item.status==0">未处理</view>
-							<view style="color:#59D1EA" v-if="item.status==1">未审核</view>
-							<view style="color:#F77070" v-if="item.status==2">未通过</view>
-							<view style="color:#72D06A" v-if="item.status==3">已完成</view>
-							<view style="color:#F7895E" v-if="item.status==4">超时完成</view>
+							
+							<view style="color:#FDCA60" v-if="item.status==0">未处理</view>
+							<view style="color:#59D1EA" v-if="item.status==1">未审核</view>
+							<view style="color:#F77070" v-if="item.status==2">未通过</view>
+							<view style="color:#72D06A" v-if="item.status==3">已完成</view>
+							<view style="color:#F7895E" v-if="item.status==4">超时完成</view>
+						</view>
+					</view>
+				</view> -->
+				
+				
+				<view class="cu-list menu-avatar ">
+					<view class="cu-item" v-for="(item,index) in getDataList" :key="index">
+						<view class="cu-avatar " :style="`background-image:url(${item.imgUrl})`"
+							style="width:82rpx;height:82rpx"></view>
+						<view class="content">
+							<view class="pro-title">
+								<view class="cut">{{item.wx_name}}</view>
+							</view>
+							<view class="pro-des  ">
+								<view class="text-cut">
+									{{item.sj_type==1?'故障':item.sj_type==2?'隐患':'其他'}}
+								</view>
+							</view>
+						</view>
+						<view class="action margin-right-sm" style="text-align:right">
+							<view style="color:#FDCA60">未处理</view>
 						</view>
 					</view>
 				</view>
+				
+				
+				
+				
 			</view>
 		</block>
 		
@@ -65,11 +91,36 @@
 				listTouchStart: 0,
 				listTouchDirection: null,
 				CustomBar: this.CustomBar,
+				
+				getData:{},
+				getDataList:{}
 		
 			
 			};
 		},
+		onLoad:function(option){
+			this.goRepairList({'company_code':uni.getStorageSync('selectedCode')})
+		},
 		methods: {
+			
+			// 保修列表数据请求
+			async goRepairList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Repair/getRepairList',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data;
+				this.getDataList=res.data.data;
+				this.repairSquare[0].num=res.data.repair_count;
+				this.repairSquare[1].num=res.data.unprocessed_count;
+				this.repairSquare[2].num=res.data.not_reviewed_count;
+				this.repairSquare[3].num=res.data.failed_count;
+				this.repairSquare[4].num=res.data.completed_count;
+				this.repairSquare[5].num=res.data.overtime_count;
+				console.log(this.getData);
+			},
+					
 			
 			
 			// 页面跳转

+ 46 - 26
pages/safeGuard/safeGuard.vue

@@ -1,57 +1,53 @@
 <template>
 	<view>
-	
+
 		<view class="basic-info">
-		
+
 			<view class="info-content">
 				<view class="info-one-info ">
 					<text>单位名称:</text>
-					<text>虹泾总部园</text>
+					<text>{{this.getData.company}}</text>
 				</view>
 				<view>
 					<text>维保单位:</text>
-					<text>永天科技</text>
+					<text>{{this.getData.maintenance_company}}</text>
 				</view>
 				<view>
 					<text style="width:auto!important">开始日期:</text>
-					<text>2020-06-08</text>
+					<text>{{this.getData.start_time}}</text>
 				</view>
 				<view>
 					<text>结束日期:</text>
-					<text>2020-06-26</text>
+					<text>{{this.getData.end_time}}</text>
 				</view>
 				<view>
 					<text>销售人员:</text>
-					<text>张三</text>
+					<text>{{this.getData.salesman}}</text>
 				</view>
 				<view>
 					<text>联系电话:</text>
-					<text>13659595955</text>
+					<text>{{this.getData.salesman_phone}}</text>
 				</view>
 				<view>
 					<text>客户联系人:</text>
-					<text>李四</text>
-				</view>
-				<view>
-					<text>联系电话:</text>
-					<text>13659595955</text>
+					<text>{{this.getData.customer}}</text>
 				</view>
 				<view>
 					<text>客户电话:</text>
-					<text>15689898989</text>
+					<text>{{this.getData.customer_phone}}</text>
 				</view>
 				<view>
 					<text>合同状态:</text>
-					<text class="online">启用</text>
+					<text class="online">启用{{this.getData.status}}</text>
 				</view>
 				<view>
 					<text>详细内容:</text>
-					<text class="viewDetail">点击下载查看详情</text>
+					<a :href="`${this.getData.url}`" download>点击下载查看详情</a>
 				</view>
 			</view>
 		</view>
 
-	
+
 
 	</view>
 </template>
@@ -60,8 +56,9 @@
 	export default {
 		data() {
 			return {
-				
-			
+				getData: {}
+
+
 			}
 		},
 		onNavigationBarButtonTap(e) {
@@ -73,11 +70,35 @@
 				complete: () => {}
 			});
 		},
+		onLoad: function(option) {
+			this.getSafeGuardData({
+				'company_code': uni.getStorageSync('selectedCode')
+			})
+
+		},
 		methods: {
-			
-			
+			// 视频列表数据请求
+			async getSafeGuardData(params = {}) {
+				const res = await this.$myRequest({
+					url: 'RiskProtection/getRiskProtectionData',
+					data: params,
+					showLoading: true
+				})
+				this.getData = res.data.data[0];
+				console.log(this.getData.url)
+			},
+			//下载文件
+			downLoadFile() {
+				alert(this.getData.url)
+				uni.redirectTo({
+					url: 'http://47.103.74.123/fileUpload/火灾公众责任保险投保单-2009.doc'
+				})
+			}
+
+
+
+
 
-			
 
 
 		}
@@ -85,11 +106,10 @@
 </script>
 
 <style lang="scss">
-	
 
-	
-	
 
 
-</style>
 
+
+
+</style>

+ 38 - 22
pages/setting/building/building.vue

@@ -10,77 +10,77 @@
 				<table style="border:1px solid #ccc"  cellspacing="0" cellpadding="0" align="center">
 					<tr>
 						<td>建筑物名称</td>
-						<td>虹泾总部园</td>
+						<td>{{this.getDetailData.build_name}}</td>
 					</tr>
 					<tr>
 						<td>建筑物类别</td>
-						<td>办公</td>
+						<td>{{this.getDetailData.build_type}}</td>
 					</tr>
 					<tr>
 						<td>建造日期</td>
-						<td>1999年3月21日</td>
+						<td>{{this.getDetailData.build_time}}</td>
 					</tr>
 					<tr>
 						<td>使用性质</td>
-						<td> 办公  </td>
+						<td>{{this.getDetailData.nature_use}} </td>
 					</tr>
 					<tr>
 						<td>火灾危险级</td>
-						<td> 一级</td>
+						<td>{{this.getDetailData.fire_risk_level}}</td>
 					</tr>
 					<tr>
 						<td>耐火等级</td>
-						<td>一级 </td>
+						<td>{{this.getDetailData.fire_resistance_rating}} </td>
 					</tr>
 					<tr>
-						<td> 结构类型</td>
-						<td>砖混结构</td>
+						<td>结构类型</td>
+						<td>{{this.getDetailData.structure_type}}</td>
 					</tr>
 					<tr>
 						<td>建筑高度</td>
-						<td> 100m</td>
+						<td>{{this.getDetailData.build_height}}</td>
 					</tr>
 					<tr>
 						<td> 建筑面积</td>
-						<td>15698.3㎡</td>
+						<td>{{this.getDetailData.build_area}}</td>
 					</tr>
 					<tr>
 						<td>占地面积</td>
-						<td>15698.3㎡</td>
+						<td>{{this.getDetailData.land_occupation_area}}</td>
 					</tr>
 	
 					<tr>
 						<td>标准层面积</td>
-						<td>5000㎡</td>
+						<td>{{this.getDetailData.standard_area}}</td>
 					</tr>
 					<tr>
 						<td>地上层数  </td>
-						<td>3</td>
+						<td>{{this.getDetailData.aboveground_layer}}</td>
 					</tr>
 					<tr>
 						<td>地上层面积  </td>
-						<td>5000㎡</td>
+						<td>{{this.getDetailData.aboveground_area}}</td>
 					</tr>
 					
 					<tr>
 						<td>地下层数 </td>
-						<td> 0</td>
+						<td>{{this.getDetailData.underground_floor}}</td>
 					</tr>
 					<tr>
 						<td>地下层面积 </td>
-						<td>-</td>
+						<td>{{this.getDetailData.underground_area}}</td>
 					</tr>
 					<tr>
 						<td>消防控制室位置</td>
-						<td>一楼</td>
+						<td>{{this.getDetailData.control_room}}</td>
 					</tr>
 					<tr>
 						<td> 避难层数量</td>
-						<td>2</td>
+						<td>{{this.getDetailData.refuge_layer}}</td>
 					</tr>
 					<tr>
 						<td> 消防电梯数量</td>
-						<td>2</td>
+						<td>{{this.getDetailData.fire_elevator}}</td>
 					</tr>
 				</table>
 			</view>
@@ -93,7 +93,8 @@
 				消防设施平面布置图
 			</view>
 			<view class="padding-lr">
-				<img src="../../../static/building1.png" alt="" width="100%">
+				<!-- <img src="../../../static/building1.png" alt="" width="100%"> -->
+				<img :src="this.getDetailData.layout_plan" alt="" width="100%">
 			</view>
 		</view>
 		
@@ -104,7 +105,7 @@
 				建筑平面图
 			</view>
 			<view class="padding-lr padding-bottom-lg">
-				<img src="../../../static/building2.png" alt="" width="100%">
+				<img :src="this.getDetailData.build_plan" alt="" width="100%">
 				<br><br>
 			</view>
 		</view>
@@ -116,12 +117,27 @@
 	export default {
 		data() {
 			return {
-				
+				getDetailData:{}
 			
 			}
 		},
+		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)
+				
+			},
+			
 			
 
 			

+ 16 - 0
pages/videoList/videoList.vue

@@ -53,7 +53,23 @@
 
 			};
 		},
+		onLoad:function(option){
+			this.getVideoList({'company_code':uni.getStorageSync('selectedCode')})
+		
+		},
 		methods: {
+			
+			// 视频列表数据请求
+			async getVideoList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'VideoMonitoring/getVideoList',
+					data:params,
+					showLoading: true
+				})
+				this.getData=res.data.data;
+				console.log(this.getData)
+			},
+			
 			goVideoDetail() {
 				uni.navigateTo({
 					url: '/pages/videoList/videoDetail/videoDetail',

+ 5 - 5
pages/xunJian/plan/plan.vue

@@ -18,8 +18,8 @@
 					</view>
 					<view class="nav-right num">
 						<view class="text-grey">
-							<span class="online" v-if="item.data3==1">已执行</span>
-							<span class="error" v-if="item.data3==0">未执行</span>
+							<span class="online" v-if="item.data3==2">已执行</span>
+							<span class="error" v-if="item.data3==1">未执行</span>
 							<text class="icon iconfont margin-right-xs ">&#xe629;</text>
 						</view>
 					</view>
@@ -67,14 +67,14 @@
 			
 			
 			goDetailPage(item){
-				if(item.data3){
+				if(item.data3==2){
 					uni.navigateTo({
 						
-						url:  "/pages/xunJian/planDetailDone/planDetailDone"
+						url:  "/pages/xunJian/planDetailDone/planDetailDone?id="+item.id,
 					})
 				}else{
 					uni.navigateTo({
-						url:  "/pages/xunJian/planDetail/planDetail",
+						url:  "/pages/xunJian/planDetail/planDetail?id="+item.id,
 					})
 				}
 				

+ 232 - 133
pages/xunJian/planDetail/planDetail.vue

@@ -1,137 +1,236 @@
-<template>
-	<view>
-		
+<template>
+	<view>
+
 		<form action="">
-			<view style='height:30rpx'></view>
-			
-			<view class="form-item" >
-				<view class="title">
-					<text class="necessary">*</text>
-					上报名称:
-				</view>
-				<input type="text">
-			</view>
-			
-			<view class="form-item margin-top">
-				<view class="title">
-					<text class="necessary">*</text>
-					巡检状态:
-				</view>
-				<radio-group name="gender" @change="radioChange">
-					<label class="margin-right-xs">
-						<radio value="2" checked /><text>正常</text>
-					</label>
-					<label class="margin-right-xs">
-						<radio value="3" /><text>异常</text>
-					</label>
-					<label class="margin-right-xs">
-						<radio value="2" /><text>故障</text>
-					</label>
-					<label>
-						<radio value="3" /><text>其他</text>
-					</label>
-				</radio-group>
-				
-			</view>
-			
-			<view class="form-item margin-top">
-				<view class="title">
-					<text class="necessary">*</text>
-					上传图片:
-				</view>
-				
-				<view style="width:500rpx">
-					<view class="cu-form-group">
-						<view class="grid col-4 grid-square flex-sub">
-							<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
-							 <image :src="imgList[index]" mode="aspectFill"></image>
-								<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
-									<text class='cuIcon-close'></text>
-								</view>
-							</view>
-							<view class="solids" @tap="ChooseImage" v-if="imgList.length<4">
-								<text class='cuIcon-cameraadd'></text>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-			
-			<view class="form-item margin-top">
-				<view class="title">
-					<text class="necessary">*</text>
-					巡检描述:
-				</view>
-				<textarea maxlength="-1"  @input="textareaAInput" placeholder="" width="250"></textarea>
-			</view>
-		
-			<view class="btn-area submitBottomBtn padding-lr-sm">
-				<button class="bg-blue round  margin-top" @click="addSubmit">提 交 </button>
-			</view>
-			
-		</form>
-
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-				imgList: [],
-
-			}
-		},
-		methods: {
-			radioChange(e) {
-				console.log('type:' + e.detail.value);
-				this.radioOne = e.detail.value;
-			},
-			
-			ChooseImage() {
-				uni.chooseImage({
-					count: 4, //默认9
-					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-					sourceType: ['album'], //从相册选择
-					success: (res) => {
-						if (this.imgList.length != 0) {
-							this.imgList = this.imgList.concat(res.tempFilePaths)
-						} else {
-							this.imgList = res.tempFilePaths
-						}
-					}
-				});
-			},
-			
-			ViewImage(e) {
-				uni.previewImage({
-					urls: this.imgList,
-					current: e.currentTarget.dataset.url
-				});
-			},
-			DelImg(e) {
-				uni.showModal({
-					title: '删除',
-					content: '确定要删除此图片吗?',
-					cancelText: '取消',
-					confirmText: '确定',
-					success: res => {
-						if (res.confirm) {
-							this.imgList.splice(e.currentTarget.dataset.index, 1)
-						}
-					}
-				})
-			},
-			
-		}
-	}
-</script>
-
+			<view style='height:30rpx'></view>
+
+			<view class="form-item">
+				<view class="title">
+					<text class="necessary">*</text>
+					上报名称:
+				</view>
+				<input type="text" v-model="reportName">
+			</view>
+
+			<view class="form-item margin-top">
+				<view class="title">
+					<text class="necessary">*</text>
+					巡检状态:
+				</view>
+				<radio-group name="gender" @change="radioChange">
+					<label class="margin-right-xs">
+						<radio value="0" checked /><text>正常</text>
+					</label>
+					<label class="margin-right-xs">
+						<radio value="1" /><text>异常</text>
+					</label>
+					<label class="margin-right-xs">
+						<radio value="2" /><text>故障</text>
+					</label>
+					<label>
+						<radio value="3" /><text>其他</text>
+					</label>
+				</radio-group>
+
+			</view>
+
+			<view class="form-item margin-top">
+				<view class="title">
+					<text class="necessary">*</text>
+					上传图片:
+				</view>
+
+				<view style="width:500rpx">
+					<view ref="input" class="input">
+					</view>
+					<!-- <view class="cu-form-group">
+						<view class="grid col-4 grid-square flex-sub">
+							<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage"
+								:data-url="imgList[index]">
+								<image :src="imgList[index]" mode="aspectFill"></image>
+								<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
+									<text class='cuIcon-close'></text>
+								</view>
+							</view>
+							<view class="solids" @tap="ChooseImage" v-if="imgList.length<4">
+								<text class='cuIcon-cameraadd'></text>
+							</view>
+						</view>
+					</view> -->
+				</view>
+			</view>
+
+			<view class="form-item margin-top">
+				<view class="title">
+					<text class="necessary">*</text>
+					巡检描述:
+				</view>
+				<textarea maxlength="-1" @input="textareaAInput" placeholder="" v-model="msg" width="250"></textarea>
+			</view>
+
+			<view class="btn-area submitBottomBtn padding-lr-sm">
+				<button class="bg-blue round  margin-top" @click="addSubmit">提 交 </button>
+			</view>
+
+		</form>
+
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+				imgList: [],
+				msg: '',
+				id: '',
+				reportName: '',
+				radioOne: 0,
+
+			}
+		},
+
+		onLoad: function(option) {
+			this.id = option.id;
+
+		},
+
+		mounted() {
+			// 创建附件上传
+			var _self = this;
+			var input = document.createElement('input'); //创建元素
+			input.type = 'file' //添加file类型
+			input.onchange = (event) => {
+				_self.upFile(input, event)
+			}
+			this.$refs.input.$el.appendChild(input)
+
+		},
+		methods: {
+			radioChange(e) {
+				console.log('type:' + e.detail.value);
+				this.radioOne = e.detail.value;
+			},
+
+			upFile(input, event) {
+				var _self = this;
+				uni.uploadFile({
+					url: 'https://wx.ewoogi.com/wx/USKYOF/USKYOF.php/Home/MonitoringReporting/setUpload',
+					files: [{
+						file: input.files[0],
+						uri: event.srcElement.value
+					}],
+					success: (uploadFileRes) => {
+						var data = JSON.parse(uploadFileRes.data)
+						this.img = data.img_url;
+						console.log(this.img)
+					},
+					fail: (err) => {
+
+						console.log(err)
+					}
+				});
+			},
+
+			addSubmit() {
+				if (!this.reportName) {
+					uni.showToast({
+						title: "请输入上报名称",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.msg) {
+					uni.showToast({
+						title: "请输入巡检描述",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.img) {
+					uni.showToast({
+						title: "请上传图片",
+						icon: "none"
+					});
+					return
+				}
+
+
+				this.powerSubmitRes({
+					// "zb_id": this.getData.id,  ??????
+					"zb_id":'6172484',
+					"spot_id": this.id,
+					"report_name": this.reportName,
+					"spot_abnormal": this.radioOne,
+					"img": this.img,
+					"dwsb_remarks": this.msg,
+				})
+
+			},
+			async powerSubmitRes(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Inspection/setInspection',
+					data: params
+				})
+				if (res.data.flag) {
+					uni.showToast({
+						title: "提交成功",
+					});
+					setTimeout(() => {
+						uni.navigateTo({
+							url: '/pages/inspectList/processList/processList?type=' + this.type,
+						});
+					}, 1000);
+				}
+			},
+
+
+			ChooseImage() {
+				uni.chooseImage({
+					count: 4, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album'], //从相册选择
+					success: (res) => {
+						if (this.imgList.length != 0) {
+							this.imgList = this.imgList.concat(res.tempFilePaths)
+						} else {
+							this.imgList = res.tempFilePaths
+						}
+					}
+				});
+			},
+
+			ViewImage(e) {
+				uni.previewImage({
+					urls: this.imgList,
+					current: e.currentTarget.dataset.url
+				});
+			},
+			DelImg(e) {
+				uni.showModal({
+					title: '删除',
+					content: '确定要删除此图片吗?',
+					cancelText: '取消',
+					confirmText: '确定',
+					success: res => {
+						if (res.confirm) {
+							this.imgList.splice(e.currentTarget.dataset.index, 1)
+						}
+					}
+				})
+			},
+			textareaAInput(e) {
+				this.textareaAValue = e.detail.value
+			},
+
+		}
+	}
+</script>
+
 <style lang="scss">
-	
 
-	
+
+
 </style>
-

+ 14 - 0
pages/xunJian/planDetailDone/planDetailDone.vue

@@ -60,11 +60,25 @@
 			return {
 
 			}
+		},
+		onload(option){
+			this.getAuthority({"id":option.phone,"company_code": uni.getStorageSync('selectedCode')})
 		},
 		methods: {
 			radioChange(e) {
 				console.log('type:' + e.detail.value);
 				this.radioOne = e.detail.value;
+			},
+			
+			// 回显信息请求
+			async getAuthority(params={}) {
+				const res = await this.$myRequest({
+					url: 'Inspection/getInspectionDetails',
+					data:params
+				})
+				this.authorityData=res.data.data[0]
+				this.selectedData=res.data.data[0].siteIdData;				
+			
 			},
 			
 		

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

@@ -73,7 +73,7 @@
 					巡检图片
 				</view>
 				<view class="padding-lr padding-bottom-lg"> 
-					<img v-if="!this.getData.report_photos&&this.getData" src="/static/defaultImg.jpg" style="width:100%"></img>
+					<img v-if="!this.getData.report_photos" src="/static/defaultImg.jpg" style="width:100%"></img>
 					<img v-else :src="this.getData.report_photos" style="width:100%"></img>
 				</view>
 			</view>