|
@@ -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"></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"></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"></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"></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({
|