Ming 3 years ago
parent
commit
630f42ccf6

+ 0 - 10
pages/authAdd/authAdd.vue

@@ -200,7 +200,6 @@
 			        }
 			return arr;
 			},
-			
 			
 			
 			//修改提交
@@ -391,7 +390,6 @@
 			
 			
 			// 站点多选下拉 end
-
 			getNotSelectItem() {
 				let ok1 = this.siteItemDataOrigin;
 				let ok2 = this.selectedData;
@@ -444,14 +442,6 @@
 				this.siteItemData = this.siteItemData.filter(item => item.siteName.indexOf(this.formMess.siteName) > -1);
 				this.unique(this.siteItemData)
 			},
-		
-			
-			
-			
-
-
-
-
 		}
 	}
 </script>

+ 1 - 1
pages/deviceAdd/deviceAdd.vue

@@ -1,4 +1,4 @@
-<template>
+ <template>
 	<view class="appWrapper">
 
 		<!-- 站点新增start -->

+ 15 - 7
pages/eleControl/controlReport/controlReport.vue

@@ -8,10 +8,10 @@
 					<view class="cu-avatar round lg" style="background-image:url(../../../static/controlReportIcon.png)"></view>
 					<view class="content" >
 						<view class="pro-title">
-							<view class="cut">{{item.title}}</view>
+							<view class="cut">{{item.supervision_title}}</view>
 						</view>
 		
-						<view class="pro-date ">{{item.time}}</view>
+						<view class="pro-date ">{{item.create_time}}</view>
 					</view>
 					<view class="nav-right num">
 						<view class="text-grey">
@@ -33,16 +33,16 @@
 </template>
 
 <script>
-	import json from '../../../data/json.js';
 	export default {
 		data() {
 			return {
-				controlReport: json.controlReport,
+				controlReport: [],
 				modalName: null,
 			};
 		},
 		
 		onLoad:function(option){
+			this.getDataList()
 			
 		},
 	
@@ -54,6 +54,17 @@
 					url: '/pages/eleControl/controlReport/controlReportAdd/controlReportAdd',
 				});
 			},
+			//数据请求
+			async getDataList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'MonitoringReporting/getMonitoringReportingList',
+					showLoading: true,
+					data: params
+				})
+				console.log('res.data.data')
+				console.log(res.data.data)
+				this.controlReport = res.data.data
+			}
 		}
 
 	}
@@ -63,7 +74,4 @@
 	.cu-item{
 		height:160rpx!important
 	}
-	.cu-list.menu-avatar > .cu-item .content {
-	    left: 110rpx;
-	}
 </style>

+ 105 - 37
pages/eleControl/controlReport/controlReportAdd/controlReportAdd.vue

@@ -1,37 +1,34 @@
 <template>
 	<view class="appWrapper">
-
 		<form action="">
 			<view style="height:30rpx"></view>
+			
 			<view class="form-item">
 				<view class="title">
 					<text class="necessary">*</text>
 					监察标题:
 				</view>
-				<select name="" id="">
-					<option value="">标题一</option>
-					<option value="">标题二</option>
-					<option value="">标题三</option>
+				<select name="" id="" filterable clearable v-model="supervision_title">
+					<option value="">请选择</option>
+					<option :value=item.supervision_name v-for="item in titleListData">{{ item.supervision_name}}</option>
 				</select>
 			</view>
+			
 			<view class="form-item">
-				<view class="title">所属站点:</view>
-				<select name="" id="">
-					<option value="">站点一</option>
-					<option value="">站点二</option>
-					<option value="">站点三</option>
+				<view class="title"><text class="necessary">*</text>所属站点:</view>
+				<select name="" id="" filterable clearable v-model="site_id">
+					<option value="">请选择</option>
+					<option :value=item.site_name v-for="item in siteListData">{{ item.site_name}}</option>
 				</select>
 			</view>
 
 			<view class="form-item">
-				<view class="title">监察内容:</view>
-				<textarea maxlength="-1"  @input="textareaAInput" placeholder="" width="250"></textarea>
-				
-				
+				<view class="title"><text class="necessary">*</text>监察内容:</view>
+				<textarea maxlength="-1"   width="250" v-model="supervision_content"></textarea>
 			</view>
 			
 			<view class="form-item">
-				<view class="title">上传图片:</view>
+				<view class="title"><text class="necessary">*</text>上传图片:</view>
 				<view style="width:500rpx">
 					<view class="cu-form-group" style="padding:0">
 						<view class="grid col-4 grid-square flex-sub">
@@ -50,11 +47,10 @@
 			</view>
 
 			<view class="btn-area submitBottomBtn padding-lr-sm">
-				<button class="bg-blue round  margin-top" @click="submit()">提 交 </button>
+				<button class="bg-blue round  margin-top" @click="addSubmit()">提 交 </button>
 			</view>
 		</form>
 
-
 	</view>
 </template>
 
@@ -63,27 +59,106 @@
 		data() {
 			return {
 				imgList: [],
-				isShow: false,
-				formMess: {
-					"userName": "sss",
-					"siteName": "",
-					"place": "",
-					"longitude": "",
-					"dimension": "",
-					"contactor": "",
-					"mobile": "",
-				},
+				
+				supervision_title:'',
+				site_id:'',
+				supervision_content:'',
+				
+				titleListData:[],
+				siteListData:[]
 			}
 		},
 		onLoad: function(option) {
+			this.getTitleList();
+			this.getSiteList()
 		},
 		methods: {
 			
-			radioChange(e) {
-				console.log('type:' + e.detail.value);
-				this.radioOne = e.detail.value;
+			//新增提交
+			async addSubmit() {
+				if (!this.supervision_title) {
+					uni.showToast({
+						title: "请选择监察标题",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.site_id) {
+					uni.showToast({
+						title: "请选择站点",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.supervision_content) {
+					uni.showToast({
+						title: "请输入监察内容",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.imgList.length>0) {
+					uni.showToast({
+						title: "请上传图片",
+						icon: "none"
+					});
+					return
+				}
+				
+				let res = await this.addReport({
+					"supervision_title": this.supervision_title,
+					"site_id": this.site_id,
+					"supervision_content": this.supervision_content,
+					"img":'ss'
+				})
+			
+				if (!res.data.flag) {
+					uni.showToast({
+						title: "添加失败",
+						icon: "none"
+					});
+				} else {
+					uni.showToast({
+						title: "添加成功",
+					});
+				}
+				setTimeout(() => {
+					uni.navigateTo({
+						url: '/pages/authManage/authManage',
+					});
+				}, 1000);
+			
+			},
+			addReport(params = {}) {
+				return this.$myRequest({
+					url: 'MonitoringReporting/addMonitoringReporting',
+					data: params
+				})
+			},
+			
+			
+			//监察标题下拉数据请求
+			async getTitleList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Archives/getsupervisionBox',
+					showLoading: true,
+					data: params
+				})
+				
+				this.titleListData = res.data.data
 			},
 			
+			//站带下拉数据请求
+			async getSiteList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'BlackoutPlan/getSiteBox',
+					showLoading: true,
+					data: params
+				})
+				this.siteListData = res.data.data
+			},
+		
+			
 			ChooseImage() {
 				uni.chooseImage({
 					count: 4, //默认9
@@ -129,14 +204,7 @@
 </script>
 
 <style lang="scss">
-	
-	
-
 	select {
-		// background: url(../../../../static/arrow.png) no-repeat scroll 98% center;
 		background-size: 6%;
 	}
-
-	
-
 </style>

+ 18 - 3
pages/eleControl/powerCut/calendar/calendar.vue

@@ -12,7 +12,7 @@
 			</picker>
 		</view>
 		<view class="form-item">
-			<view class="title">结束时间:</view>
+			<view class="title"><text class="necessary">*</text>结束时间:</view>
 			<picker mode="date" :value="start_date" :start="start_date" @change="bindDateChange2">
 				<view class="date">{{end_date}}</view>
 			</picker>
@@ -44,13 +44,28 @@
 <script>
 	export default {
 		name: 'calendar',
+		props: {
+			// bindData: {
+			// 	type: Object,
+			// 	default: ''
+			// },
+			bindStartTime: {
+				type: String,
+				default: ''
+			},
+			bindEndTime: {
+				type: String,
+				default: ''
+			}
+		},
 		data() {
+			console.log(this.bindStartTime)
 			const currentDate = this.getTime({
 				format: true
 			})
 			return {
-				start_date: '2021-07-06 16:05:48',
-				end_date: '2021-07-06 18:05:48',
+				start_date:this.bindStartTime,
+				end_date: this.bindEndTime,
 				other: '请输入'
 			}
 		},

+ 53 - 32
pages/eleControl/powerCut/powerCut.vue

@@ -5,10 +5,10 @@
 		<view class="ding">
 			<scroll-view scroll-x class="bg-white nav text-center">
 				<view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav"
-					:key="index" @tap="tabSelect" :data-id="index">
-					<view v-if="TabCur==index" class="cu-tag badge">
+					:key="index" @tap="tabSelect" :data-id="index" :data-status="index+1">
+					<!-- <view v-if="TabCur==index" class="cu-tag badge">
 						<block class="cu-tag badge">{{TabCur? unporcessList.length:porcessedList.length}} </block>
-					</view>
+					</view> -->
 					{{item}}
 				</view>
 			</scroll-view>
@@ -17,7 +17,7 @@
 			<view class="cu-bar search bg-gray filter-section">
 				<view class="search-form round bg-white">
 					<text class="cuIcon-search"></text>
-					<input class="" type="text" placeholder="请输入站点名称" confirm-type="search"></input>
+					<input class="" type="text" placeholder="请输入站点名称" confirm-type="search" v-model="site_name"></input>
 				</view>
 				<view class="action">
 					<button class="cu-btn bg-blue round" @click="searchSiteList">查询</button>
@@ -34,15 +34,15 @@
 				<view class="cu-list menu-avatar">
 					<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
 						@touchstart="ListTouchStart" @touchmove="ListTouchMove" @touchend="ListTouchEnd"
-						:data-target="'move-box-' + index" v-for="(item,index) in unporcessList" :key="index"
-						@tap="goDetail()">
+						:data-target="'move-box-' + index" v-for="(item,index) in planListData" :key="index"
+						 @tap="goDetail(item.id)">
 						<view class="cu-avatar lg" style="background-image:url(../../../static/unprocessIcon.png);">
 						</view>
 						<view class="content">
 							<view class="pro-title">
-								<view class="cut">{{item.title}}</view>
+								<view class="cut">{{item.site_name}}</view>
 							</view>
-							<view class="pro-date ">{{item.time}}</view>
+							<view class="pro-date ">{{item.start_time}}</view>
 						</view>
 						<view class="action" style="z-index:99">
 							<view class="unProcess" @tap="goUnprocessDetail(item.id)">未执行</view>
@@ -52,7 +52,7 @@
 							<view class="bg-red" @click.stop="deleteItem(item)">删除</view>
 						</view>
 					</view>
-					<view class=" text-center margin-top" v-if="unporcessList.length === 0">暂无数据...</view>
+					<view class=" text-center margin-top" v-if="planListData.length === 0">暂无数据...</view>
 				</view>
 			</view>
 		</block>
@@ -62,15 +62,15 @@
 				<view class="cu-list menu-avatar ">
 					<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
 						@touchstart="ListTouchStart" @touchmove="ListTouchMove" @touchend="ListTouchEnd"
-						:data-target="'move-box-' + index" v-for="(item,index) in porcessedList" :key="index"
-						@tap="goDetail()">
+						:data-target="'move-box-' + index" v-for="(item,index) in planListData" :key="index"
+						 @tap="goDetail(item.id)">
 						<view class="cu-avatar lg" style="background-image:url(../../../static/processingIcon.png);">
 						</view>
 						<view class="content">
 							<view class="pro-title">
-								<view class="cut">{{item.title}}</view>
+								<view class="cut">{{item.site_name}}</view>
 							</view>
-							<view class="pro-date ">{{item.time}}</view>
+							<view class="pro-date ">{{item.start_time}}</view>
 						</view>
 						<view class="action" style="z-index:99">
 							<view class="processing" @tap="goProcessedDetail(item.id)">执行中</view>
@@ -80,7 +80,7 @@
 							<view class="bg-red" @click.stop="deleteItem(item)">删除</view>
 						</view>
 					</view>
-					<view class="text-center margin-top" v-if="porcessedList.length === 0">暂无数据...</view>
+					<view class="text-center margin-top" v-if="planListData.length === 0">暂无数据...</view>
 				</view>
 			</view>
 		</block>
@@ -88,20 +88,20 @@
 		<block v-if="TabCur==2">
 			<view style="    height: calc(100vh - 400rpx);overflow: scroll;">
 				<view class="cu-list menu-avatar ">
-					<view class="cu-item" v-for="(item,index) in porcessedList" :key="index" @tap="goDetail()">
+					<view class="cu-item" v-for="(item,index) in planListData" :key="index" @tap="goDetail(item.id)">
 						<view class="cu-avatar lg" style="background-image:url(../../../static/processedIcon.png);">
 						</view>
 						<view class="content">
 							<view class="pro-title">
-								<view class="cut">{{item.title}}</view>
+								<view class="cut">{{item.site_name}}</view>
 							</view>
-							<view class="pro-date ">{{item.time}}</view>
+							<view class="pro-date ">{{item.start_time}}</view>
 						</view>
 						<view class="action" style="z-index:99">
 							<view class="processed" @tap="goProcessedDetail(item.id)">已执行</view>
 						</view>
 					</view>
-					<view class="text-center margin-top" v-if="porcessedList.length === 0">暂无数据...</view>
+					<view class="text-center margin-top" v-if="planListData.length === 0">暂无数据...</view>
 				</view>
 			</view>
 		</block>
@@ -134,36 +134,57 @@
 				CustomBar: this.CustomBar,
 				TabCur: 0,
 				tabNav: ['未执行', '执行中', '已执行', ],
+				
+				planListData:[],
+				site_name:'',
+				status_value:1
 
 
 			};
 		},
-		onLoad: function(option) {},
-
-		onNavigationBarButtonTap(e) {
-			console.log(e)
-			uni.navigateTo({
-				url: '/pages/export/export',
-				success: res => {},
-				fail: () => {},
-				complete: () => {}
-			});
+	
+		onLoad: function(option) {
+			this.getDataList({"status_value":1})
 		},
+		
 		methods: {
+			//筛选
+			searchSiteList() {
+				this.getDataList({
+					"site_name": this.site_name,
+					"status_value":this.status_value
+				})
+			},
+			
+			//数据请求
+			async getDataList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'BlackoutPlan/getBlackoutPlanList',
+					showLoading: true,
+					data: params
+				})
+				console.log('res.data.data')
+				console.log(res.data.data)
+				this.planListData = res.data.data
+			},
+			
+			
 			tabSelect(e) {
 				console.log(e.currentTarget);
 				this.TabCur = e.currentTarget.dataset.id;
-				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
-				this.modalName=null
+				// this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
+				this.status_value=e.currentTarget.dataset.status;
+				this.modalName=null;
+				this.getDataList({"status_value":e.currentTarget.dataset.status})
 			},
 			goAddPage(id) {
 				uni.navigateTo({
 					url: '/pages/eleControl/powerCut/powerCutAdd/powerCutAdd',
 				});
 			},
-			goDetail() {
+			goDetail(id) {
 				uni.navigateTo({
-					url: '/pages/eleControl/powerCut/powerCutDetail/powerCutDetail',
+					url: '/pages/eleControl/powerCut/powerCutDetail/powerCutDetail?id='+id+'&&status_value='+this.status_value,
 				});
 			},
 

+ 33 - 20
pages/eleControl/powerCut/powerCutAdd/powerCutAdd.vue

@@ -2,7 +2,7 @@
 	<view class="appWrapper">
 		<form action="">
 			<view style="height:30rpx"></view>
-			<calendar></calendar>
+			<calendar  :bindStartTime="formMess.start_time" :bindEndTime="formMess.end_time"></calendar>
 			<!-- <view class="form-item">
 				<view class="title">
 					<text class="necessary">*</text>
@@ -15,24 +15,25 @@
 				<input name="input" v-model="formMess.deviceName"></input>
 			</view> -->
 			<view class="form-item">
-				<view class="title">所属站点:</view>
-				<select name="" id="">
-					<option value="">站点一</option>
-					<option value="">站点二</option>
-					<option value="">站点三</option>
+				<view class="title"><text class="necessary">*</text>所属站点:</view>
+				<select name="" id="" filterable clearable v-model="formMess.site_id">
+					<option value="">请选择</option>
+					<option :value=item.supervision_name v-for="item in siteListData">{{ item.site_name}}</option>
 				</select>
 			</view>
 			
 			<view class="form-item">
-				<view class="title">计划类型:</view>
-				<select name="" id="">
-					<option value="">类型一</option>
-					<option value="">类型二</option>
-					<option value="">类型三</option>
+				<view class="title"><text class="necessary">*</text>计划类型:</view>
+				
+				<select name="" id="" filterable clearable v-model="formMess.plan_type">
+					<option value="">请选择</option>
+					<option value="1">计划检修停电</option>
+					<option value="2">计划施工停电</option>
+					<option value="3">客户申请停电</option>
 				</select>
 			</view>
 			
-			<view class="form-item">
+		<!-- 	<view class="form-item">
 				<view class="title">
 					<text class="necessary">*</text>
 					报备人:
@@ -46,7 +47,7 @@
 					手机号:
 				</view>
 				<input name="input" v-model="formMess.deviceNo" placeholder="18888888888"></input>
-			</view>
+			</view> -->
 
 			<view class="btn-area submitBottomBtn padding-lr-sm">
 				<button class="bg-blue round  margin-top" @click="submit()">提 交 </button>
@@ -67,19 +68,31 @@
 			return {
 				isShow: false,
 				formMess: {
-					"userName": "sss",
-					"siteName": "",
-					"place": "",
-					"longitude": "",
-					"dimension": "",
-					"contactor": "",
-					"mobile": "",
+					"site_id": "",
+					"plan_type": "",
+					"start_time": "2021-07-06 16:05:48",
+					"end_time": "2021-07-06 18:05:48",
 				},
+				siteListData:[],
+				planTypeData:[]
 			}
 		},
 		onLoad: function(option) {
+			this.getSiteList();
+			
 		},
 		methods: {
+			//站带下拉数据请求
+			async getSiteList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'BlackoutPlan/getSiteBox',
+					showLoading: true,
+					data: params
+				})
+				this.siteListData = res.data.data
+				// console.log(this.siteListData)
+			},
+			
 			submit() {
 				uni.navigateTo({
 					url: '/pages/accountManage/success/success',

+ 21 - 37
pages/eleControl/powerCut/powerCutDetail/powerCutDetail.vue

@@ -2,34 +2,16 @@
 	<view class="appWrapper">
 		<form action="">
 			<view style="height:30rpx"></view>
-			<calendar></calendar>
-			<!-- <view class="form-item">
-				<view class="title">
-					<text class="necessary">*</text>
-					开始时间:
-				</view>
-				<input name="input" v-model="formMess.deviceNo"></input>
-			</view>
-			<view class="form-item">
-				<view class="title">结束时间:</view>
-				<input name="input" v-model="formMess.deviceName"></input>
-			</view> -->
+			<calendar :bindStartTime="detailData.start_time" :bindEndTime="detailData.end_time" v-if="this.detailData.start_time"></calendar>
+			
 			<view class="form-item">
 				<view class="title">所属站点:</view>
-				<select name="" id="">
-					<option value="">站点一</option>
-					<option value="">站点二</option>
-					<option value="">站点三</option>
-				</select>
+				<input name="input" disabled ="true" v-model="detailData.site_name"></input>
 			</view>
 			
 			<view class="form-item">
 				<view class="title">计划类型:</view>
-				<select name="" id="">
-					<option value="">类型一</option>
-					<option value="">类型二</option>
-					<option value="">类型三</option>
-				</select>
+				<input name="input" disabled ="true" v-model="detailData.plan_type==1?'计划检修停电':detailData.plan_type==2?'计划施工停电':'客户申请停电'"></input>
 			</view>
 			
 			<view class="form-item">
@@ -37,7 +19,7 @@
 					<text class="necessary">*</text>
 					报备人:
 				</view>
-				<input name="input" v-model="formMess.deviceNo" placeholder="张三"></input>
+				<input name="input" v-model="detailData.contacts"></input>
 			</view>
 			
 			<view class="form-item">
@@ -45,7 +27,7 @@
 					<text class="necessary">*</text>
 					手机号:
 				</view>
-				<input name="input" v-model="formMess.deviceNo" placeholder="18888888888"></input>
+				<input name="input" v-model="detailData.phone" ></input>
 			</view>
 
 		</form>
@@ -63,24 +45,26 @@
 		data() {
 			return {
 				isShow: false,
-				formMess: {
-					"userName": "sss",
-					"siteName": "",
-					"place": "",
-					"longitude": "",
-					"dimension": "",
-					"contactor": "",
-					"mobile": "",
-				},
+				detailData:{},
+				start_time:'',
+				end_time:''
 			}
 		},
 		onLoad: function(option) {
+			
+			this.getDataList({"status_value":option.status_value,"id":option.id})
 		},
 		methods: {
-			submit() {
-				uni.navigateTo({
-					url: '/pages/accountManage/success/success',
-				});
+			//数据请求
+			async getDataList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'BlackoutPlan/getBlackoutPlanList',
+					showLoading: true,
+					data: params
+				})
+				console.log('res.data.data')
+				console.log(res.data.data[0])
+				this.detailData = res.data.data[0]
 			},
 		}
 	}

+ 2 - 2
pages/index/components/chart/chart.vue

@@ -96,11 +96,11 @@
 
 						data: [{
 								name: "电力监测",
-								value: this.bindData.smartElectricityCount
+								value: this.bindData.smartElectricityCount?this.bindData.smartElectricityCount:0
 							},
 							{
 								name: "视频监测",
-								value: this.bindData.videoMonitoringCount
+								value: this.bindData.videoMonitoringCount?this.bindData.videoMonitoringCount:0
 							},
 
 						],

+ 5 - 5
pages/index/index.vue

@@ -220,7 +220,7 @@
 					//使用code请求服务器接口,换取用户用户openID
 
 					uni.request({
-						url: 'https://qhome.usky.cn/USKYOF/USKYOF.php/Home/Com/getPageAuthorization', //仅为示例,并非真实接口地址。
+						url: 'http://124.71.174.104:8081/USKYOF/USKYOF.php/Home/Com/getPageAuthorization', //仅为示例,并非真实接口地址。
 						// data: {
 						//     text: 'uni.request'
 						// },
@@ -232,7 +232,7 @@
 							// alert(res.data.flag)
 							if (res.data.flag == 3000) {
 								// alert("3000授权失败,请重新登录");
-								window.location.href = 'https://qhome.usky.cn/index.html#/';
+								window.location.href = 'http://124.71.174.104:8081/index.html#/';
 							}
 
 							if (res.data.flag == 3003) {
@@ -246,7 +246,7 @@
 								uni.switchTab({
 									url: '/pages/index/index'
 								});
-								// window.location.href = 'https://qhome.usky.cn/index.html#/';
+								// window.location.href = 'http://124.71.174.104:8081/index.html#/';
 							}
 						}
 					});
@@ -356,7 +356,7 @@
 					if (res.data.flag == 3000) {
 
 						// alert("3000授权失败,");
-						window.location.href = 'https://qhome.usky.cn/index.html#/';
+						window.location.href = 'http://124.71.174.104:8081/index.html#/';
 					}
 
 					if (res.data.flag == 3003) {
@@ -545,4 +545,4 @@
 	.shadow {
 		box-shadow: 1px 1px 4px rgb(26 26 26 / 10%);
 	}
-</style>
+</style>

+ 31 - 0
pages/siteAdd/siteAdd.vue

@@ -36,6 +36,21 @@
 			<view class="form-item">
 				<view class="title"><text class="necessary">*</text>手机号码:</view>
 				<input name="input" v-model="phone"></input>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>所属线路:</view>
+				<select name="" id="">
+					<option value="">线路一</option>
+					<option value="">线路二</option>
+				</select>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>装机容量:</view>
+				<input name="input" ></input>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>流变变化:</view>
+				<input name="input" ></input>
 			</view>
 			
 
@@ -80,6 +95,22 @@
 			<view class="form-item">
 				<view class="title">手机号码:</view>
 				<input name="input" v-model="siteMessage.phone"></input>
+			</view>
+			
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>所属线路:</view>
+				<select name="" id="">
+					<option value="">线路一</option>
+					<option value="">线路二</option>
+				</select>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>装机容量:</view>
+				<input name="input" ></input>
+			</view>
+			<view class="form-item">
+				<view class="title"><text class="necessary">*</text>流变变化:</view>
+				<input name="input" ></input>
 			</view>
 		
 		

+ 63 - 57
pages/siteArchive/archiveDetail/archiveDetail.vue

@@ -9,27 +9,27 @@
 					<!-- <text class="necessary">*</text> -->
 					户号:
 				</view>
-				<input name="input" disabled ="true" v-model="formMess.userId" ></input>
+				<input name="input" disabled ="true" v-model="detailInfo.account_number" ></input>
 			</view>
 			<view class="form-item">
 				<view class="title">流变变比:</view>
-				<input name="input" disabled ="true" v-model="formMess.ratio"></input>
+				<input name="input" disabled ="true" v-model="detailInfo.rheological_change"></input>
 			</view>
 			<view class="form-item">
 				<view class="title" style="width:240rpx">单路电源容量:</view>
-				<input name="input" disabled ="true" v-model="formMess.volume"></input>
+				<input name="input" disabled ="true" v-model="detailInfo.power_capacity"></input>
 			</view>
 			<view class="form-item">
 				<view class="title">线路:</view>
-				<input name="input" disabled ="true" v-model="formMess.route"></input>
+				<input name="input" disabled ="true" v-model="detailInfo.route_name"></input>
 			</view>
 			<view class="form-item">
 				<view class="title">站点名称:</view>
-				<input name="input" disabled ="true" v-model="formMess.siteName"></input>
+				<input name="input" disabled ="true" v-model="detailInfo.site_name"></input>
 			</view>
 			<view class="form-item">
 				<view class="title">监察:</view>
-				<input name="input" disabled ="true" v-model="formMess.supervise"></input>
+				<input name="input" disabled ="true" v-model="detailInfo.supervision_name"></input>
 			</view>
 			
 			<view class="info-tit margin-left-xs">
@@ -40,10 +40,10 @@
 				<view class="title">电缆孔洞:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.cable_hole == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.cable_hole == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -51,10 +51,10 @@
 				<view class="title">门窗、墙壁破损:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.damage == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.damage == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -62,10 +62,10 @@
 				<view class="title">屋顶墙壁渗漏水:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.water_leakage == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.water_leakage == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -73,10 +73,10 @@
 				<view class="title">灭火器配置不足:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.annihilator_insufficient_configuration == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.annihilator_insufficient_configuration == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -84,10 +84,10 @@
 				<view class="title">灭火器超期:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.annihilator_overdue == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.annihilator_overdue == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -100,10 +100,10 @@
 				<view class="title">堆放杂物:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.pile_up_sundries == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.pile_up_sundries == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -111,10 +111,10 @@
 				<view class="title">积灰严重:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.serious_ash_deposition == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.serious_ash_deposition == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -122,10 +122,22 @@
 				<view class="title">配电房周围环境潮湿:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.around_environment_humid == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.around_environment_humid == 0'/><text>否</text>
+					</label>
+				</radio-group>
+			</view>
+			
+			<view class="form-item extraDis">
+				<view class="title">配电房周围环境潮湿:</view>
+				<radio-group name="gender">
+					<label class="margin-right-xl">
+						<radio disabled ="true" value="是" :checked='detailInfo.around_pile_up_sundries == 1' /><text>是</text>
+					</label>
+					<label>
+						<radio disabled ="true" value="否" :checked='detailInfo.around_pile_up_sundries == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -138,10 +150,10 @@
 				<view class="title">无电工:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.no_electrician == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.no_electrician == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -149,10 +161,10 @@
 				<view class="title">电工人数配置不足:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.electrician_lack == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.electrician_lack == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -160,10 +172,10 @@
 				<view class="title">电工证超期:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.overdue_electrician_certificate == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.overdue_electrician_certificate == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -178,10 +190,10 @@
 				<view class="title">电试超期:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.electric_test_overdue == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.electric_test_overdue == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -193,7 +205,7 @@
 			</view>
 			<view class="form-item extraDis">
 				<view class="title">设备老旧(标明出厂或投运日期):</view>
-				<input type="text" disabled ="true" v-model="formMess.date" style="width:35%">
+				<input type="text" disabled ="true" v-model="detailInfo.old_equipment" style="width:35%">
 			</view>
 			
 			<!-- 安全工器具 -->
@@ -205,10 +217,10 @@
 				<view class="title">配置不足(绝缘体):</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.blanket_insufficient_configuration == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.blanket_insufficient_configuration == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -216,10 +228,10 @@
 				<view class="title">接地线与存放位置编号:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.ground_wire == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.ground_wire == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -233,16 +245,16 @@
 				<view class="title">模拟屏:</view>
 				<radio-group name="gender">
 					<label class="margin-right-xl">
-						<radio disabled ="true" value="是" checked /><text>是</text>
+						<radio disabled ="true" value="是" :checked='detailInfo.analog_screen == 1' /><text>是</text>
 					</label>
 					<label>
-						<radio disabled ="true" value="否" /><text>否</text>
+						<radio disabled ="true" value="否" :checked='detailInfo.analog_screen == 0'/><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item">
 				<view class="title">备注:</view>
-				<input type="text" disabled="true" v-model="formMess.note">
+				<input type="text" disabled="true" v-model="detailInfo.remarks">
 			</view>
 			
 			<br>
@@ -254,32 +266,26 @@
 
 <script>
 	export default {
-
 		data() {
 			return {
-				index: -1,
-
-				type: '0',
-
-				isShow: false,
-				formMess: {
-					"userId": "0062089102",
-					"ratio": "20/5",
-					"volume": "315",
-					"route": "东4东路",
-					"siteName": "上海马陆葡萄公园有限公司",
-					"supervise": "潘学春13999999999",
-					"date":"1981",
-					"note":"电路老化"
-				},
-
-
+				detailInfo:{},
 			}
 		},
 		onLoad: function(option) {
-
+			this.getDataList({"site_id":option.id})
 		},
 		methods: {
+			//数据请求
+			async getDataList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Archives/getArchivesList',
+					showLoading: true,
+					data: params
+				})
+				console.log('res.data.data')
+				console.log(res.data.data[0])
+				this.detailInfo = res.data.data[0]
+			},
 	
 	
 

+ 19 - 12
pages/siteArchive/siteArchive.vue

@@ -3,12 +3,12 @@
 		
 		<view style="height: calc(100vh - 200rpx);overflow:scroll">
 			<view class="cu-list menu-avatar">
-				<view class="cu-item"  :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in controlReport"
-				 :key="index" :data-target="'move-box-' + index" @tap="goArchiveDetail(item)">
+				<view class="cu-item"  :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in siteArchiveData"
+				 :key="index" :data-target="'move-box-' + index" @tap="goArchiveDetail(item.id)">
 					<view class="cu-avatar round lg" style="background-image:url(../../../static/archiveIcon.png)"></view>
 					<view class="content" >
 						<view class="pro-title">
-							<view class="cut">{{item.title}}</view>
+							<view class="cut">{{item.site_name}} (现场档案)</view>
 						</view>
 					</view>
 					<view class="nav-right num">
@@ -26,30 +26,38 @@
 		</view>
 		<!-- 新增按钮end -->
 	</view>
-
 	
 </template>
 
 <script>
-	import json from '../../data/json.js';
 	export default {
 		data() {
 			return {
-				controlReport: json.archive,
 				modalName: null,
+				siteArchiveData:[]
 			};
 		},
-		
 		onLoad:function(option){
-			
+			this.getDataList()
 		},
 	
 		methods: {
-		
+			//数据请求
+			async getDataList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'Archives/getArchivesList',
+					showLoading: true,
+					data: params
+				})
+				console.log('res.data.data')
+				console.log(res.data.data)
+				this.siteArchiveData = res.data.data
+			},
+			
 			// 页面跳转
-			goArchiveDetail(){
+			goArchiveDetail(id){
 				uni.navigateTo({
-					url: '/pages/siteArchive/archiveDetail/archiveDetail',
+					url: '/pages/siteArchive/archiveDetail/archiveDetail?id='+id,
 				});
 			},
 			goAddPage(item) {
@@ -58,7 +66,6 @@
 				});
 			},
 		}
-
 	}
 </script>
 

+ 237 - 92
pages/siteArchive/siteArchiveAdd/siteArchiveAdd.vue

@@ -4,30 +4,33 @@
 			<view style="height:30rpx"></view>
 			<view class="form-item">
 				<view class="title">
-					<!-- <text class="necessary">*</text> -->
+					<text class="necessary">*</text>
 					户号:
 				</view>
-				<input name="input" v-model="formMess.deviceNo"></input>
+				<input name="input" v-model="formMess.account_number"></input>
 			</view>
 			<view class="form-item">
-				<view class="title">流变变比:</view>
-				<input name="input" v-model="formMess.deviceName"></input>
+				<view class="title"><text class="necessary">*</text>流变变比:</view>
+				<input name="input" v-model="formMess.rheological_change"></input>
 			</view>
 			<view class="form-item">
-				<view class="title" style="width:240rpx">单路电源容量:</view>
-				<input name="input" v-model="formMess.deviceName"></input>
+				<view class="title" style="width:240rpx"><text class="necessary">*</text>单路电源容量:</view>
+				<input name="input" v-model="formMess.power_capacity"></input>
 			</view>
 			<view class="form-item">
-				<view class="title">线路:</view>
-				<input name="input" v-model="formMess.deviceName"></input>
+				<view class="title"><text class="necessary">*</text>线路:</view>
+				<input name="input" v-model="formMess.route_id"></input>
 			</view>
 			<view class="form-item">
-				<view class="title">站点名称:</view>
-				<input name="input" v-model="formMess.deviceName"></input>
+				<view class="title"><text class="necessary">*</text>站点名称:</view>
+				<select name="" id="" v-model="formMess.site_id" filterable clearable>
+					<!-- <option value="0">请选择</option> -->
+					<option :value="item.id"  v-for="item in siteListData">{{ item.site_name}}</option>
+				</select>
 			</view>
 			<view class="form-item">
-				<view class="title">监察:</view>
-				<input name="input" v-model="formMess.deviceName"></input>
+				<view class="title"><text class="necessary">*</text>监察:</view>
+				<input name="input" v-model="formMess.supervision_department_id"></input>
 			</view>
 			
 			<view class="info-tit margin-left-xs">
@@ -35,57 +38,57 @@
 				四防一通
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">电缆孔洞:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>电缆孔洞:</view>
+				<radio-group name="formMess.cable_hole" @change="radioChange">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">门窗、墙壁破损:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>门窗、墙壁破损:</view>
+				<radio-group name="formMess.damage" @change="radioChange">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">屋顶墙壁渗漏水:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>屋顶墙壁渗漏水:</view>
+				<radio-group name="formMess.water_leakage" @change="radioChange">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">灭火器配置不足:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>灭火器配置不足:</view>
+				<radio-group name="formMess.annihilator_insufficient_configuration">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">灭火器超期:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>灭火器超期:</view>
+				<radio-group name="formMess.annihilator_overdue">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -95,35 +98,47 @@
 				室内环境
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">堆放杂物:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>堆放杂物:</view>
+				<radio-group name="formMess.pile_up_sundries">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">积灰严重:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>积灰严重:</view>
+				<radio-group name="formMess.serious_ash_deposition">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">配电房周围环境潮湿:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>配电房周围环境潮湿:</view>
+				<radio-group name="formMess.around_environment_humid">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
+					</label>
+				</radio-group>
+			</view>
+			
+			<view class="form-item extraDis">
+				<view class="title"><text class="necessary">*</text>配电房周围对方杂物:</view>
+				<radio-group name="formMess.around_pile_up_sundries">
+					<label class="margin-right-xl">
+						<radio value="1"/><text>是</text>
+					</label>
+					<label>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -133,35 +148,35 @@
 				电工
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">无电工:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>无电工:</view>
+				<radio-group name="formMess.no_electrician">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">电工人数配置不足:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>电工人数配置不足:</view>
+				<radio-group name="formMess.electrician_lack">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">电工证超期:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>电工证超期:</view>
+				<radio-group name="formMess.overdue_electrician_certificate">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -173,13 +188,13 @@
 				电试
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">电试超期:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>电试超期:</view>
+				<radio-group name="formMess.electric_test_overdue">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -191,7 +206,7 @@
 			</view>
 			<view class="form-item extraDis">
 				<view class="title">设备老旧(标明出厂或投运日期):</view>
-				<input type="text" style="width:35%">
+				<input type="text" style="width:35%" v-model="formMess.old_equipment">
 			</view>
 			
 			<!-- 安全工器具 -->
@@ -200,24 +215,24 @@
 				安全工器具
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">配置不足(绝缘体):</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>配置不足(绝缘体):</view>
+				<radio-group name="formMess.blanket_insufficient_configuration">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">接地线与存放位置编号:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>接地线与存放位置编号:</view>
+				<radio-group name="formMess.ground_wire">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
@@ -228,31 +243,26 @@
 				模拟屏
 			</view>
 			<view class="form-item extraDis">
-				<view class="title">模拟屏:</view>
-				<radio-group name="gender">
+				<view class="title"><text class="necessary">*</text>模拟屏:</view>
+				<radio-group name="formMess.analog_screen">
 					<label class="margin-right-xl">
-						<radio value="是" checked /><text>是</text>
+						<radio value="1"/><text>是</text>
 					</label>
 					<label>
-						<radio value="否" /><text>否</text>
+						<radio value="0" checked /><text>否</text>
 					</label>
 				</radio-group>
 			</view>
 			<view class="form-item">
 				<view class="title">备注:</view>
-				<input type="text">
+				<input type="text" v-model="formMess.remarks">
 			</view>
 			
-			
-			
-
 			<view class="btn-area submitBottomBtn padding-lr-sm  " style="position:static">
-				<button class="bg-blue round  margin-top" @click="submit()">提 交 </button>
+				<button class="bg-blue round  margin-top" @click="addSubmit">提 交 </button>
 			</view>
 			<br>
 		</form>
-
-
 	</view>
 </template>
 
@@ -261,28 +271,163 @@
 
 		data() {
 			return {
-				index: -1,
-
-				type: '0',
-
-				isShow: false,
+				siteListData:[],
+				radioOne: 1,
 				formMess: {
-					"userName": "sss",
-					"siteName": "",
-					"place": "",
-					"longitude": "",
-					"dimension": "",
-					"contactor": "",
-					"mobile": "",
+					"account_number": "",
+					"rheological_change": "",
+					"power_capacity": "",
+					"route_id": "",
+					"site_id": "",
+					"supervision_department_id": "",
+					
+					"cable_hole": "",
+					"damage": "",
+					"water_leakage": "",
+					"annihilator_insufficient_configuration": "",
+					"annihilator_overdue": "",
+					
+					"pile_up_sundries": "",
+					"serious_ash_deposition": "",
+					"around_environment_humid": "",
+					"around_pile_up_sundries": "",
+					
+					"no_electrician": "",
+					"electrician_lack": "",
+					"overdue_electrician_certificate": "",
+					
+					"electric_test_overdue": "",
+					
+					"old_equipment": "",
+					
+					"blanket_insufficient_configuration": "",
+					"ground_wire": "",
+					
+					
+					"analog_screen": "",
+					"remarks": "",
 				},
 
 
 			}
 		},
 		onLoad: function(option) {
+			this.getDataList()
 
 		},
 		methods: {
+			//数据请求
+			async getDataList(params = {}) {
+				const res = await this.$myRequest({
+					url: 'BlackoutPlan/getSiteBox',
+					showLoading: true,
+					data: params
+				})
+				console.log('res.data.data')
+				console.log(res.data.data)
+				this.siteListData = res.data.data
+			},
+			
+			radioChange(e) {
+				console.log('type:' + e.detail.value);
+				this.radioOne = e.detail.value;
+			},
+			
+			//新增提交
+			async addSubmit() {
+				
+				//提交验证
+				if (!this.formMess.account_number) {
+					uni.showToast({
+						title: "请输入户号",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.formMess.rheological_change) {
+					uni.showToast({
+						title: "请输入流变变化",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.formMess.power_capacity) {
+					uni.showToast({
+						title: "请输入单路电源容量",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.formMess.route_id) {
+					uni.showToast({
+						title: "请输入所属线路",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.formMess.site_id) {
+					uni.showToast({
+						title: "请选择所属站点",
+						icon: "none"
+					});
+					return
+				}
+				if (!this.formMess.supervision_department_id) {
+					uni.showToast({
+						title: "请输入所属监察",
+						icon: "none"
+					});
+					return
+				}
+				
+				
+				let res = await this.addArchive({
+					"account_number": this.formMess.account_number,
+					"rheological_change": this.formMess.rheological_change,
+					"power_capacity": this.formMess.power_capacity,
+					"route_id": this.formMess.route_id,
+					"site_id": this.formMess.site_id,
+					"supervision_department_id": this.formMess.supervision_department_id,
+					"cable_hole":this.radioOne,
+					"damage":this.radioOne,
+					"water_leakage":this.radioOne,
+					"annihilator_insufficient_configuration":this.radioOne,
+					
+					
+					"old_equipment": this.formMess.old_equipment,
+					"remarks": this.formMess.remarks,
+					
+			
+				})
+			
+				if (!res.data.flag) {
+					uni.showToast({
+						title: "添加失败",
+						icon: "none"
+					});
+				} else {
+					uni.showToast({
+						title: "添加成功",
+					});
+				}
+				setTimeout(() => {
+					uni.navigateTo({
+						url: '/pages/authManage/authManage',
+			
+					});
+				}, 1000);
+			
+			},
+			
+			addArchive(params = {}) {
+				return this.$myRequest({
+					url: 'Archives/addArchives',
+					data: params
+				})
+			},
+			
+			
+			
 	
 	
 

+ 0 - 1
pages/siteListAlarming/siteListAlarming.vue

@@ -48,7 +48,6 @@
 					url: 'IntegratedAlarm/getSiteList',
 					showLoading: true,
 					data: params
-
 				})
 				console.log(res.data.data)
 				this.siteListData = res.data.data

+ 7 - 7
pages/videoList/videoList.vue

@@ -2,10 +2,10 @@
 
 	<view class="">
 		<view v-if="loadingStatus" class="loadingMask">Loading...</view>
-		<view class="cu-list menu-avatar">
-			
-			<view v-if="!this.openId&&!this.onLineVideoList.length" class="text-center margin-top-lg">加载中...</view>
-		<view v-if="!this.matchedDeviceList.length&&this.onLineVideoList.length" class="text-center margin-top-lg">暂无数据</view>
+		<view class="cu-list menu-avatar">
+			
+			<view v-if="!this.openId&&!this.onLineVideoList.length" class="text-center margin-top-lg">加载中...</view>
+		<view v-if="!this.matchedDeviceList.length&&this.onLineVideoList.length" class="text-center margin-top-lg">暂无数据</view>
 			
 			<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in matchedDeviceList"
 			 :key="index" :data-target="'move-box-' + index">
@@ -115,7 +115,7 @@
 												url: '/pages/videoDetail/videoDetail?deviceType=2&companyCode=' + this.companyCode + '&deviceCode=' +
 													this.onLineVideoList[n].DEVICE +
 													'',
-												// url:'https://qhome.usky.cn/video.html?device='+this.onLineVideoList[n].DEVICE+'&companyid=' + this.companyCode + ''
+												// url:'http://124.71.174.104:8081/video.html?device='+this.onLineVideoList[n].DEVICE+'&companyid=' + this.companyCode + ''
 											});
 
 										} else {
@@ -176,7 +176,7 @@
 							uni.navigateTo({
 								url: '/pages/videoDetail/videoDetail?deviceType=2&companyCode=' + this.companyCode + '&deviceCode=' + item.DEVICE +
 									'',
-								// url:'https://qhome.usky.cn/video.html?device='+item.DEVICE+'&companyid=' + this.companyCode + ''
+								// url:'http://124.71.174.104:8081/video.html?device='+item.DEVICE+'&companyid=' + this.companyCode + ''
 							});
 							return;
 						}
@@ -237,4 +237,4 @@
 		padding-top: 100rpx;
 		font-size: 34rpx;
 	}
-</style>
+</style>

+ 7 - 7
util/api.js

@@ -1,6 +1,6 @@
-const BASE_URL = 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/' //(测试域名)  
-// const BASE_URL = 'http://124.71.174.104/USKYOF/USKYOF.php/Home/' //(测试域名新)  
-// const BASE_URL='https://qhome.usky.cn/USKYOF/USKYOF.php/Home/'
+// const BASE_URL = 'https://iot.usky.cn/USKYOF/USKYOF.php/Home/' //(测试域名)  
+const BASE_URL = 'http://124.71.174.104:8081/USKYOF/USKYOF.php/Home/' //(测试域名新)  
+// const BASE_URL='http://https://qhome.usky.cn/USKYOF/USKYOF.php/Home/'
 // 同时发送异步代码的次数,防止一次点击中有多次请求,用于处理
 let ajaxTimes = 0;
 
@@ -34,9 +34,9 @@ export const myRequest = (options) => {
 						let notIndexFail2 = ['Index/getDataStatistics'];
 						let ua = navigator.userAgent.toLowerCase();
 						if (notIndexFail2.includes(options.url) && ua.match(
-							/MicroMessenger/i) == "micromessenger") {
+								/MicroMessenger/i) == "micromessenger") {
 							// alert('数据拉取失败,请重新进入公众号')
-							// window.location.href = 'https://qhome.usky.cn/index.html#/pages/index/index';
+							// window.location.href = 'http://124.71.174.104:8081/index.html#/pages/index/index';
 						} else {
 
 							return uni.showToast({
@@ -60,7 +60,7 @@ export const myRequest = (options) => {
 				let notIndexFail = ['Index/getDataStatistics', 'Com/getAuthorizationUrl'];
 				if (notIndexFail.includes(options.url)) {
 					window.location.href =
-					'https://qhome.usky.cn/index.html#/pages/index/index';
+						'http://124.71.174.104:8081/index.html#/pages/index/index';
 				} else {
 					uni.showModal({
 						showCancel: false,
@@ -92,4 +92,4 @@ export const myRequest = (options) => {
 export default {
 	BASE_URL
 
-}
+}

+ 2 - 2
util/jssdk.js

@@ -10,7 +10,7 @@ export function configWeiXin(callback) {
 	console.log(BASE_URL.BASE_URL)
 	// start
 	uni.request({
-		url:"https://qhome.usky.cn/sign.php",	
+		url:"http://124.71.174.104:8081/sign.php",	
 		// url:"http://s.yxin.tech/sign.php",
 		
 		
@@ -49,4 +49,4 @@ export function configWeiXin(callback) {
 		}
 	});
 	// end
-}
+}