ming 3 лет назад
Родитель
Сommit
d938ebab5d

+ 4 - 2
common/common.scss

@@ -391,7 +391,7 @@ radio,checkbox {
 		width: 100%;
 		left:0;
 		bottom: 44rpx;
-		z-index: 999;
+		z-index: 9;
 		// background-color: #ffffff;
 	}
 	
@@ -935,5 +935,7 @@ radio,checkbox {
 	.info-content uni-view uni-text:last-child{
 		width:75%;
 		
-	}
+	}
+	
+	
 	

+ 3 - 21
pages/index/index.vue

@@ -136,8 +136,7 @@
 			
 			// start
 			
-			if(window.location.host.indexOf('localhost') != -1 ){
-			
+			if (window.location.host.indexOf('localhost') != -1  ||  (window.location.host.indexOf('localhost') == -1 && option.op)) {
 				this.getSearchList();
 				this.getHomeData({
 					'company_code': uni.getStorageSync('selectedCode') ? uni.getStorageSync('selectedCode') : this
@@ -147,25 +146,8 @@
 					'company_code': uni.getStorageSync('selectedCode') ? uni.getStorageSync('selectedCode') : this
 						.defaultSite
 				});
-			}else{
-			
-				if (option.op) {
-					// alert('op')
-					// 首页数据渲染
-					this.getSearchList();
-					this.getHomeData({
-						'company_code': uni.getStorageSync('selectedCode') ? uni.getStorageSync('selectedCode') : this
-							.defaultSite
-					});
-					this.getHandleData({
-						'company_code': uni.getStorageSync('selectedCode') ? uni.getStorageSync('selectedCode') : this
-							.defaultSite
-					});
-				
-				} else {
-					this.init()
-				}
-				
+			} else {
+				this.init()
 			}
 			// end
 

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

@@ -20,7 +20,7 @@
 					@touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index"
 					>
 					<view class="cu-avatar round lg">
-						<image class="image-bg" src="/static/device-icon.png"/>
+						<image class="image-bg" src="/static/funcList.png"/>
 					</view>
 					<view class="content">
 						<view class="pro-title">
@@ -35,7 +35,7 @@
 					</view>
 					<view class="nav-right num">
 						<view class="text-grey">
-							<text class="icon iconfont margin-right-xs margin-left-lg">&#xe629;</text>
+							<text class="icon iconfont margin-right-sm margin-left-lg">&#xe629;</text>
 						</view>
 					</view>
 					<view class="move">
@@ -116,10 +116,9 @@
 			
 			//编辑
 			editItem(item) {
-				// uni.redirectTo({
-				// 	url: '/pages/siteAdd/siteAdd?id=' + item.id + '',
-				// });
-				alert('编辑')
+				uni.redirectTo({
+					url: '/pages/setting/funReport/funcAdd/funcAdd?id=' + item.id + '',
+				});
 			},
 			
 			//删除

+ 99 - 74
pages/setting/funReport/funcAdd/funcAdd.vue

@@ -1,49 +1,90 @@
 <template>
 	<view class="appWrapper padding-top" style="height:calc(100vh - 250rpx);overflow:scroll">
 
-		<form action="">
-			<!-- <view class="form-item ">
+		<form action="" class="funcAdd">
+			<view class="form-item selectBox">
+				<view class="title"><text class="necessary">*</text>报备类型:</view>
+				<select name="" id="" placeholder=""clearable  v-model="repType">
+					<option value="">请选择</option>
+					<option value="1">单位</option>
+					<option value="2">类型</option>
+					<option value="3">设备</option>
+				</select>
+				<text class="icon iconfont margin-right-sm margin-left">&#xe63d;</text>
+			</view>
+			<view class="form-item selectBox" v-if="repType==2||repType==3">
+				<view class="title"><text class="necessary">*</text>设备类型:</view>
+				<select name="" id="" placeholder=""clearable  v-model="deviceType">
+					<option value="">请选择</option>
+					<option value="1">火系统</option>
+					<option value="2">水系统</option>
+					<option value="3">烟感系统</option>
+					<option value="4">消防栓</option>
+					<option value="5">液位</option>
+					<option value="6">RTU</option>
+					<option value="7">电气火灾</option>
+					<option value="16">视频监控</option>
+					<option value="128">井盖</option>
+					<option value="131">可燃气体</option>
+					<option value="130">门禁监测</option>
+					<option value="129">地磁监测</option>
+					<option value="17">电梯监测</option>
+				</select>
+				<text class="icon iconfont margin-right-sm margin-left">&#xe63d;</text>
+			</view>
+			
+			<view class="form-item" v-if="repType">
+				<view class="title">
+					<text class="necessary">*</text>
+					开始时间:
+				</view>
+				<view class="example-body">
+					<uni-datetime-picker v-model="startTime" :start="now"/>
+				</view>
+			</view>
+			<view class="form-item" v-if="repType">
 				<view class="title">
 					<text class="necessary">*</text>
-					设备编号:
+					结束时间:
+				</view>
+				<view class="example-body">
+					<uni-datetime-picker v-model="endTime" :start="startTime" />
 				</view>
-				<input name="input" v-model="device_code"></input>
-			</view> -->
+			</view>
 			
 			
+
 			
-			<!-- <view class="form-item ">
-				<view class="title"><text class="necessary">*</text>物联网卡号:</view>
-				<input name="input" v-model="sim"></input>
+			<view class="form-item " v-if="repType==3&&deviceType==6">
+				<view class="title"><text class="necessary">*</text>端口号:</view>
+				<input name="input" v-model="portId"></input>
 			</view>
-			<view class="form-item selectBox">
-				<view class="title"><text class="necessary">*</text>所属单位:</view>
-				<select name="" id="" filterable clearable v-model="company_code">
+			
+			<view class="form-item selectBox" v-if="repType==3&&deviceType==6">
+				<view class="title"><text class="necessary">*</text>端口类型:</view>
+				<select name="" id="" placeholder=""clearable  v-model="portType">
 					<option value="">请选择</option>
-					<option :value="item.owner_code" v-for="(item,index) in companyListData" 
-						style="width:80%">{{item.owner_name}}</option>
+					<option value="1">数字量</option>
+					<option value="2">模拟量</option>
 				</select>
 				<text class="icon iconfont margin-right-sm margin-left">&#xe63d;</text>
-			</view> -->
-			<view class="form-item selectBox">
-				<view class="title"><text class="necessary">*</text>报备类型:</view>
-				<select name="" id="" placeholder=""clearable  v-model="type">
+			</view>
+			
+			<view class="form-item selectBox" v-if="repType==3&&deviceType">
+				<view class="title"><text class="necessary">*</text>设备编号:</view>
+				<select name="" id="" placeholder=""clearable  v-model="deviceNo">
 					<option value="">请选择</option>
-					<option value="1">单位</option>
-					<option value="2">类型</option>
-					<option value="3">设备</option>
-					
+					<option value="1">编号1</option>
+					<option value="2">编号2</option>
 				</select>
 				<text class="icon iconfont margin-right-sm margin-left">&#xe63d;</text>
 			</view>
 			
-
-
-		
-			
-			
+			<view class="form-item " v-if="repType">
+				<view class="title"><text class="necessary"></text>备注:</view>
+				<input name="input" v-model="remark"></input>
+			</view>
 			
-
 			<view class="btn-area submitBottomBtn padding-lr-sm">
 				<button class="bg-blue round  margin-top" @tap="submit()">提 交 </button>
 			</view>
@@ -52,63 +93,52 @@
 
 	</view>
 </template>
+<style scoped>
+	/deep/ .funcAdd .uni-date-x--border, .uni-date-x{
+		border-radius:0!important
+	}
+	.funcAdd .example-body{
+		margin:0;
+		width:calc(100% - 200rpx)
+	}
+</style>
 
 <script>
-	// var graceChecker = require("../../common/graceChecker.js");
-	// import add from '../../common/select.js';
+
 	export default {
 
 		data() {
 			return {
 
-				companyListData: [],
-				index: -1,
-	
-
-				
-				
-				
-				"device_code":"",
-				"device_name":"",
-				"unitinfo":"",
-				"louyu": "",
-				"sim":"",
-				company_code: '',
-				
-				"type":'',
-				transfer_type: '',
-				
-				"owner_bl":"",//倍率
-				"is_top":"0", //是否顶楼
-				
-				"deviceType":"",
-				"manufacturerName":"",
-				"model":"",
-				"location":"",
-				"protocolType":"",
-				"manufacturerId":"",
-				
-				"min_level":"",
-				"max_level":"",
-				
-				"radioOne":0,
-				
-				"owner_xh_a":'z',
-				"owner_xh_b":'z',
-				"owner_xh_c":'z'
-
-				
-
-
+				repType:'',
+				deviceType:'',
+				startTime:'',
+				endTime:'',
+				remark:'',
+				portId:'',
+				portType:'',
+				deviceNo:'',
+				now:''
+			
 			}
 		},
 		onLoad: function(option) {
 			this.getSiteList();
+			
+			uni.setNavigationBarTitle({
+				title: option.id?"编辑":"新增",
+			});
+			
+			var nowTemp = new Date();
+			this.now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
 
 
 
 		},
 		watch: {
+			startTime:function(){
+				alert(this.startTime)
+			}
 			
 		},
 		methods: {
@@ -132,12 +162,7 @@
 						return
 					}
 				}
-				
-				
-				
-				
-		
-					
+
 					
 				if (!this.device_name.replace(/^\s*/g,'')) {
 					uni.showToast({

+ 1 - 1
pages/setting/setting.vue

@@ -38,7 +38,7 @@
 			
 			<view class="cu-item shadow" @tap="goFunReport()">
 				<view class="cu-avatar ">
-					<image class="image-bg" src="/static/building-icon.png"/>
+					<image class="image-bg" src="/static/funcReport.png"/>
 				</view>
 				<view class="content">
 					<view class="">功能报备</view>

BIN
static/funcList.png


BIN
static/funcReport.png