|
|
|
@ -4,6 +4,7 @@
|
|
|
|
|
class="dialog"
|
|
|
|
|
:title="dialogTitle"
|
|
|
|
|
:visible.sync="visible"
|
|
|
|
|
@close="close()"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
width="970px"
|
|
|
|
|
>
|
|
|
|
@ -11,196 +12,460 @@
|
|
|
|
|
<!-- 设备基础信息表单 -->
|
|
|
|
|
<div class="equipment_form">
|
|
|
|
|
<p>设备基础信息</p>
|
|
|
|
|
<el-form ref="equipmentForm" :model="equipmentForm">
|
|
|
|
|
<el-form-item label="企业名称">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="equipmentForm.company.villageName"
|
|
|
|
|
placeholder="请选择企业"
|
|
|
|
|
<el-form
|
|
|
|
|
ref="equipmentForm"
|
|
|
|
|
:model="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="企业名称" prop="companyName">
|
|
|
|
|
<el-select v-model="form.companyName" placeholder="请选择企业">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in equipmentForm.company"
|
|
|
|
|
:key="item.villageCode"
|
|
|
|
|
:label="item.villageName"
|
|
|
|
|
:value="item.villageCode"
|
|
|
|
|
v-for="item in list.company"
|
|
|
|
|
@click.native="companyNameselected(item.companyName, item.id)"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.companyName"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备名称">
|
|
|
|
|
<el-input v-model="equipmentForm.name"></el-input>
|
|
|
|
|
<el-form-item> </el-form-item>
|
|
|
|
|
<el-form-item label="设备名称" prop="deviceName">
|
|
|
|
|
<el-input v-model="form.deviceName"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备IP">
|
|
|
|
|
<el-input v-model="equipmentForm.ip"></el-input>
|
|
|
|
|
<el-form-item label="设备IP" prop="deviceIp">
|
|
|
|
|
<el-input v-model="form.deviceIp"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="登录账号">
|
|
|
|
|
<el-input v-model="equipmentForm.passUser"></el-input>
|
|
|
|
|
<el-form-item label="登录账号" prop="account">
|
|
|
|
|
<el-input v-model="form.account"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="登录密码">
|
|
|
|
|
<el-input v-model="equipmentForm.passNum"></el-input>
|
|
|
|
|
<el-form-item label="登录密码" prop="password">
|
|
|
|
|
<el-input v-model="form.password"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备大类">
|
|
|
|
|
<el-input v-model="equipmentForm.big"></el-input>
|
|
|
|
|
<el-form-item label="设备大类" prop="devicePerceptionParentTypeCn">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.devicePerceptionParentTypeCn"
|
|
|
|
|
placeholder="请选择设备大类"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in list.perception_type"
|
|
|
|
|
@click.native="parent_selected(item.dictLabel,item.dictValue)"
|
|
|
|
|
:key="item.dictValue"
|
|
|
|
|
:label="item.dictLabel"
|
|
|
|
|
:value="item.dictValue"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="是否卡口">
|
|
|
|
|
<el-input v-model="equipmentForm.mouse"></el-input>
|
|
|
|
|
<el-form-item label="是否卡口" prop="isDoorwayVideoCn">
|
|
|
|
|
<el-select
|
|
|
|
|
ref="isDoorwayVideoCn"
|
|
|
|
|
v-model="form.isDoorwayVideoCn"
|
|
|
|
|
placeholder="请选择是否卡口"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in list.isDoorwayVideoList"
|
|
|
|
|
@click.native="isDoorselected(item.id)"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备小类">
|
|
|
|
|
<el-input v-model="equipmentForm.small"></el-input>
|
|
|
|
|
<el-form-item label="设备小类" prop="devicePerceptionSubTypeCn">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.devicePerceptionSubTypeCn"
|
|
|
|
|
placeholder="请选择设备小类"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in list.video_type"
|
|
|
|
|
@click.native="perception_selected(item.dictLabel,item.dictValue)"
|
|
|
|
|
:key="item.dictValue"
|
|
|
|
|
:label="item.dictLabel"
|
|
|
|
|
:value="item.dictValue"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 视频通道信息表单 -->
|
|
|
|
|
<div class="video_form">
|
|
|
|
|
<p>视频通道信息</p>
|
|
|
|
|
<el-form ref="videoForm" :model="videoForm">
|
|
|
|
|
<el-form-item label="通道编码">
|
|
|
|
|
<el-input v-model="videoForm.channelCode"></el-input>
|
|
|
|
|
<el-form
|
|
|
|
|
ref="videoForm"
|
|
|
|
|
:model="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="通道编码" prop="gbsChannelNo">
|
|
|
|
|
<el-input v-model="form.gbsChannelNo"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="NVR编码">
|
|
|
|
|
<el-input v-model="videoForm.NVRCode"></el-input>
|
|
|
|
|
<el-form-item label="NVR编码" prop="gbsNvrNo">
|
|
|
|
|
<el-input v-model="form.gbsNvrNo"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="通道号">
|
|
|
|
|
<el-input v-model="videoForm.channelNum"></el-input>
|
|
|
|
|
<el-form-item label="通道号" prop="channelNo">
|
|
|
|
|
<el-input v-model="form.channelNo"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="RTSP流地址">
|
|
|
|
|
<el-input v-model="videoForm.address"></el-input>
|
|
|
|
|
<el-form-item label="RTSP流地址" prop="rtspAddress">
|
|
|
|
|
<el-input v-model="form.rtspAddress"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 设备位置信息表单 -->
|
|
|
|
|
<div class="equipment_address_form">
|
|
|
|
|
<p>设备位置信息</p>
|
|
|
|
|
<el-form ref="addressForm" :model="addressForm">
|
|
|
|
|
<el-form-item label="设备经度">
|
|
|
|
|
<el-input v-model="addressForm.longitude"></el-input>
|
|
|
|
|
<el-form
|
|
|
|
|
ref="addressForm"
|
|
|
|
|
:model="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="设备经度" prop="longitude">
|
|
|
|
|
<el-input v-model="form.longitude"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备纬度">
|
|
|
|
|
<el-input v-model="addressForm.latitude"></el-input>
|
|
|
|
|
<el-form-item label="设备纬度" prop="latitude">
|
|
|
|
|
<el-input v-model="form.latitude"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="U3D经度">
|
|
|
|
|
<el-input v-model="addressForm.U3D_longitude"></el-input>
|
|
|
|
|
<el-form-item label="U3D经度" prop="u3dLongitude">
|
|
|
|
|
<el-input v-model="form.u3dLongitude"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="U3D纬度">
|
|
|
|
|
<el-input v-model="addressForm.U3D_latitude"></el-input>
|
|
|
|
|
<el-form-item label="U3D纬度" prop="u3dLatitude">
|
|
|
|
|
<el-input v-model="form.u3dLatitude"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备高度">
|
|
|
|
|
<el-input v-model="addressForm.equipemnt_hight"></el-input>
|
|
|
|
|
<el-form-item label="设备高度" prop="deviceHeight">
|
|
|
|
|
<el-input v-model="form.deviceHeight"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="U3D高度">
|
|
|
|
|
<el-input v-model="addressForm.U3D_hight"></el-input>
|
|
|
|
|
<el-form-item label="U3D高度" prop="u3dHeight">
|
|
|
|
|
<el-input v-model="form.u3dHeight"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备方位">
|
|
|
|
|
<el-form-item label="进出方向" prop="directionCn">
|
|
|
|
|
<el-select v-model="form.directionCn" placeholder="请选择进出方向">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in list.directionList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.label"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备方位" prop="orientationCn">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="addressForm.equipment_orientation.orientationCode"
|
|
|
|
|
v-model="form.orientationCn"
|
|
|
|
|
placeholder="请选择设备方位"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in addressForm.equipment_orientation"
|
|
|
|
|
:key="item.orientationCode"
|
|
|
|
|
:label="item.orientation"
|
|
|
|
|
:value="item.orientationCode"
|
|
|
|
|
v-for="item in list.orientation_types"
|
|
|
|
|
:key="item.dictValue"
|
|
|
|
|
:label="item.dictLabel"
|
|
|
|
|
:value="item.dictValue"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="安装位置">
|
|
|
|
|
<el-input v-model="addressForm.equipment_position"></el-input>
|
|
|
|
|
<el-form-item
|
|
|
|
|
label="安装位置"
|
|
|
|
|
prop="deviceAddress"
|
|
|
|
|
class="deviceAddress_text"
|
|
|
|
|
>
|
|
|
|
|
<el-input v-model="form.deviceAddress"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 设备其他信息表单 -->
|
|
|
|
|
<div class="other_form">
|
|
|
|
|
<p>设备其他信息</p>
|
|
|
|
|
<el-form ref="otherForm" :model="otherForm">
|
|
|
|
|
<el-form-item label="设备品牌">
|
|
|
|
|
<el-input v-model="otherForm.brand"></el-input>
|
|
|
|
|
<el-form ref="otherForm" :model="form" :disabled="disabled">
|
|
|
|
|
<el-form-item label="设备品牌" prop="deviceBrand">
|
|
|
|
|
<el-input v-model="form.deviceBrand"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备厂家">
|
|
|
|
|
<el-input v-model="otherForm.manufacturer"></el-input>
|
|
|
|
|
<el-form-item label="设备厂家" prop="manufactor">
|
|
|
|
|
<el-input v-model="form.manufactor"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="厂家联系电话">
|
|
|
|
|
<el-input v-model="otherForm.manufacturer_phone"></el-input>
|
|
|
|
|
<el-form-item label="厂家联系电话" prop="manufactorPhone">
|
|
|
|
|
<el-input v-model="form.manufactorPhone"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="SN号">
|
|
|
|
|
<el-input v-model="otherForm.SN_num"></el-input>
|
|
|
|
|
<el-form-item label="SN号" prop="deviceSn">
|
|
|
|
|
<el-input v-model="form.deviceSn"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备MAC">
|
|
|
|
|
<el-input v-model="otherForm.MAC"></el-input>
|
|
|
|
|
<el-form-item label="设备MAC" prop="deviceMac">
|
|
|
|
|
<el-input v-model="form.deviceMac"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备端口">
|
|
|
|
|
<el-input v-model="otherForm.port"></el-input>
|
|
|
|
|
<el-form-item label="设备端口" prop="devicePort">
|
|
|
|
|
<el-input v-model="form.devicePort"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="saveFormData">保 存</el-button>
|
|
|
|
|
<el-button>取 消</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
@click="saveFormData('equipmentForm', 'videoForm', 'addressForm')"
|
|
|
|
|
>保 存</el-button
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-button @click="save()"></el-button> -->
|
|
|
|
|
<el-button @click="close()">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { debounce } from "@/utils/publicMethod_lxy/debounce.js";
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
commonDict,
|
|
|
|
|
getCompanyList,
|
|
|
|
|
addPerceptionList,
|
|
|
|
|
changePerceptionList,
|
|
|
|
|
} from "@/api/correlationEquipment";
|
|
|
|
|
// import { debounce } from "@/utils/publicMethod_lxy/debounce.js";
|
|
|
|
|
export default {
|
|
|
|
|
name: "addPerceptionDialog",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
visible: false,
|
|
|
|
|
dialogTitle: "新建",
|
|
|
|
|
equipmentForm: {
|
|
|
|
|
// 设备基础信息表单
|
|
|
|
|
dialogTitle: "",
|
|
|
|
|
list: {
|
|
|
|
|
company: [],
|
|
|
|
|
mouse:'',
|
|
|
|
|
video_type: [],
|
|
|
|
|
perception_type: [],
|
|
|
|
|
isDoorwayVideoList: [
|
|
|
|
|
{ label: "是", id: "1" },
|
|
|
|
|
{ label: "否", id: "2" },
|
|
|
|
|
],
|
|
|
|
|
directionList: [
|
|
|
|
|
{ label: "进", id: "1" },
|
|
|
|
|
{ label: "出", id: "2" },
|
|
|
|
|
],
|
|
|
|
|
orientation_types: [],
|
|
|
|
|
},
|
|
|
|
|
form: {
|
|
|
|
|
// 设备基础信息表单
|
|
|
|
|
companyId: "",
|
|
|
|
|
companyName: "",
|
|
|
|
|
deviceName: "",
|
|
|
|
|
deviceIp: "",
|
|
|
|
|
// deviceVideoParentType: "",
|
|
|
|
|
devicePerceptionSubType: "", // 小类码值
|
|
|
|
|
devicePerceptionSubTypeCn: "", // 小类
|
|
|
|
|
devicePerceptionParentType: "", // 大类码值
|
|
|
|
|
devicePerceptionParentTypeCn: "", // 大类
|
|
|
|
|
isDoorwayVideoCn: "",
|
|
|
|
|
isDoorwayVideo: "",
|
|
|
|
|
account: "",
|
|
|
|
|
password: "",
|
|
|
|
|
// 视频通道信息表单
|
|
|
|
|
videoForm: {
|
|
|
|
|
channelCode: "",
|
|
|
|
|
NVRCode: "",
|
|
|
|
|
channelNum: "",
|
|
|
|
|
address: "",
|
|
|
|
|
},
|
|
|
|
|
gbsChannelNo: "",
|
|
|
|
|
gbsNvrNo: "",
|
|
|
|
|
channelNo: "",
|
|
|
|
|
rtspAddress: "",
|
|
|
|
|
// 设备位置信息表单
|
|
|
|
|
addressForm: {
|
|
|
|
|
longitude: "",
|
|
|
|
|
latitude: "",
|
|
|
|
|
U3D_longitude: "",
|
|
|
|
|
U3D_latitude: "",
|
|
|
|
|
equipemnt_hight: "",
|
|
|
|
|
U3D_hight: "",
|
|
|
|
|
equipment_orientation: [],
|
|
|
|
|
equipment_position: "",
|
|
|
|
|
},
|
|
|
|
|
u3dLongitude: "",
|
|
|
|
|
u3dLatitude: "",
|
|
|
|
|
deviceHeight: "",
|
|
|
|
|
u3dHeight: "",
|
|
|
|
|
directionCn: "",
|
|
|
|
|
orientation: "",
|
|
|
|
|
orientationCn: "",
|
|
|
|
|
deviceAddress: "",
|
|
|
|
|
// 设备其他信息表单
|
|
|
|
|
otherForm: {
|
|
|
|
|
brand: "",
|
|
|
|
|
manufacturer: "",
|
|
|
|
|
manufacturer_phone: "",
|
|
|
|
|
SN_num: "",
|
|
|
|
|
MAC: "",
|
|
|
|
|
port: "",
|
|
|
|
|
deviceBrand: "",
|
|
|
|
|
manufactor: "",
|
|
|
|
|
manufactorPhone: "",
|
|
|
|
|
deviceSn: "",
|
|
|
|
|
deviceMac: "",
|
|
|
|
|
devicePort: "",
|
|
|
|
|
},
|
|
|
|
|
disabled: false, // 表单是否禁用
|
|
|
|
|
rules: {
|
|
|
|
|
companyName: [
|
|
|
|
|
{ required: true, message: "请选择企业", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
deviceName: [
|
|
|
|
|
{ required: true, message: "请填写设备名称", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
deviceIp: [
|
|
|
|
|
{ required: true, message: "请填写设备ip", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
devicePerceptionParentTypeCn: [
|
|
|
|
|
{ required: true, message: "请选择设备大类", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
devicePerceptionSubTypeCn: [
|
|
|
|
|
{ required: true, message: "请选择设备小类", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
gbsChannelNo: [
|
|
|
|
|
{ required: true, message: "请输入通道编码", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
gbsNvrNo: [
|
|
|
|
|
{ required: true, message: "请输入NVR编码", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
longitude: [
|
|
|
|
|
{ required: true, message: "请输入设备经度", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
latitude: [
|
|
|
|
|
{ required: true, message: "请输入设备经度", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
deviceAddress: [
|
|
|
|
|
{ required: true, message: "请输入安装位置", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
methods: {
|
|
|
|
|
open() {
|
|
|
|
|
open(num, row) {
|
|
|
|
|
if (num === "1") {
|
|
|
|
|
this.dialogTitle = "新建";
|
|
|
|
|
this.disabled = false;
|
|
|
|
|
} else if (num === "2") {
|
|
|
|
|
this.dialogTitle = "编辑";
|
|
|
|
|
this.form = row;
|
|
|
|
|
this.disabled = false;
|
|
|
|
|
console.log("row12345", row);
|
|
|
|
|
} else if (num === "5") {
|
|
|
|
|
this.dialogTitle = "详情";
|
|
|
|
|
this.form = row;
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
}
|
|
|
|
|
this.visible = true;
|
|
|
|
|
// 请求设备小类下拉
|
|
|
|
|
const params = {
|
|
|
|
|
dictType: "device_video_sub_type",
|
|
|
|
|
};
|
|
|
|
|
commonDict(params).then((res) => {
|
|
|
|
|
this.list.video_type = res.data;
|
|
|
|
|
});
|
|
|
|
|
// 请求设备大类下拉
|
|
|
|
|
const val = {
|
|
|
|
|
dictType: "device_perception_sub_type",
|
|
|
|
|
};
|
|
|
|
|
commonDict(val).then((res) => {
|
|
|
|
|
this.list.perception_type = res.data;
|
|
|
|
|
});
|
|
|
|
|
// 请求设备方位下拉
|
|
|
|
|
const param_op = {
|
|
|
|
|
dictType: "orientation",
|
|
|
|
|
};
|
|
|
|
|
commonDict(param_op).then((res) => {
|
|
|
|
|
this.list.orientation_types = res.data;
|
|
|
|
|
});
|
|
|
|
|
// 请求企业名称下拉
|
|
|
|
|
getCompanyList().then((res) => {
|
|
|
|
|
this.list.company = res.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
isDoorselected(value) {
|
|
|
|
|
this.form.isDoorwayVideo = value; // 是否卡口下拉码值
|
|
|
|
|
},
|
|
|
|
|
companyNameselected(name, value) {
|
|
|
|
|
this.form.companyName = name;
|
|
|
|
|
this.form.companyId = value; // 公司下拉码值
|
|
|
|
|
},
|
|
|
|
|
parent_selected(label,value) {
|
|
|
|
|
this.form.devicePerceptionParentTypeCn = label
|
|
|
|
|
this.form.devicePerceptionParentType = value; // 大类下拉码值
|
|
|
|
|
console.log("this.form3333", this.form);
|
|
|
|
|
},
|
|
|
|
|
perception_selected(label,value) {
|
|
|
|
|
this.form.devicePerceptionSubTypeCn = label
|
|
|
|
|
this.form.devicePerceptionSubType = value; // 小类下拉码值
|
|
|
|
|
console.log("this.form2222", this.form);
|
|
|
|
|
},
|
|
|
|
|
// 表单验证必填
|
|
|
|
|
saveFormData(formName1,formName2,formName3) {
|
|
|
|
|
if (this.dialogTitle === "新建") {
|
|
|
|
|
this.$refs[formName1].validate((valid1) => {
|
|
|
|
|
if (valid1) {
|
|
|
|
|
this.$refs[formName2].validate((valid2) => {
|
|
|
|
|
if (valid2) {
|
|
|
|
|
this.$refs[formName3].validate((valid3) => {
|
|
|
|
|
if (valid3) {
|
|
|
|
|
const params = this.form;
|
|
|
|
|
addPerceptionList(params)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.visible = false;
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}); // 视频通道信息必填验证
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
}
|
|
|
|
|
}); // 视频通道信息必填验证
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
}
|
|
|
|
|
}); // 设备基础必填验证
|
|
|
|
|
} else if (this.dialogTitle === "编辑") {
|
|
|
|
|
this.$refs[formName1].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.$refs[formName2].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.$refs[formName3].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
console.log('this.form123', JSON.stringify(this.form))
|
|
|
|
|
console.log('this.form124', JSON.parse(JSON.stringify(this.form)))
|
|
|
|
|
changePerceptionList(JSON.parse(JSON.stringify(this.form)))
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
console.log('this.form125', JSON.parse(JSON.stringify(this.form)))
|
|
|
|
|
this.visible = false;
|
|
|
|
|
this.$message.success("编辑成功");
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
this.$message.warning("编辑失败");
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
}
|
|
|
|
|
}); // 视频通道信息必填验证
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
}
|
|
|
|
|
}); // 视频通道信息必填验证
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// save() {
|
|
|
|
|
// console.log('this.form7777',this.form);
|
|
|
|
|
// },
|
|
|
|
|
// 关闭弹窗
|
|
|
|
|
close() {
|
|
|
|
|
this.visible = false;
|
|
|
|
|
// 重置表单
|
|
|
|
|
// 设备基础信息表单重置
|
|
|
|
|
this.$refs["equipmentForm"].resetFields();
|
|
|
|
|
// 视频通道信息表单重置
|
|
|
|
|
this.$refs["videoForm"].resetFields();
|
|
|
|
|
// 设备位置信息表单重置
|
|
|
|
|
this.$refs["addressForm"].resetFields();
|
|
|
|
|
// 设备其他信息表单重置
|
|
|
|
|
this.$refs["otherForm"].resetFields();
|
|
|
|
|
},
|
|
|
|
|
saveFormData: debounce(function () {
|
|
|
|
|
this.$message.success("232324234");
|
|
|
|
|
}, 300),
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
/deep/.el-dialog {
|
|
|
|
|
.el-dialog__title {
|
|
|
|
|
color: #fff;
|
|
|
|
|
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
background-image: url("~@/assets/companyFile/dialogBack.png");
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
height: 720px;
|
|
|
|
|
height: 750px;
|
|
|
|
|
|
|
|
|
|
/* 关闭弹窗叉号 */
|
|
|
|
|
.el-dialog__headerbtn {
|
|
|
|
@ -237,6 +502,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form_body {
|
|
|
|
|
margin-top: 3%;
|
|
|
|
|
height: 600px;
|
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
p {
|
|
|
|
@ -254,7 +520,9 @@ export default {
|
|
|
|
|
background: url("~@/assets/companyFile/242112.png") no-repeat !important;
|
|
|
|
|
background-size: 100% 100% !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.equipment_form {
|
|
|
|
|
margin-top: -2%;
|
|
|
|
|
}
|
|
|
|
|
.form_body::-webkit-scrollbar {
|
|
|
|
|
width: 6px;
|
|
|
|
|
background-color: #5e666a;
|
|
|
|
@ -302,5 +570,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.el-form-item.deviceAddress_text {
|
|
|
|
|
width: 900px !important;
|
|
|
|
|
.el-form-item__content {
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
width: 750px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|