|
|
@ -4,6 +4,7 @@
|
|
|
|
class="dialog"
|
|
|
|
class="dialog"
|
|
|
|
:title="dialogTitle"
|
|
|
|
:title="dialogTitle"
|
|
|
|
:visible.sync="visible"
|
|
|
|
:visible.sync="visible"
|
|
|
|
|
|
|
|
@close="close()"
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
width="970px"
|
|
|
|
width="970px"
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -11,183 +12,447 @@
|
|
|
|
<!-- 设备基础信息表单 -->
|
|
|
|
<!-- 设备基础信息表单 -->
|
|
|
|
<div class="equipment_form">
|
|
|
|
<div class="equipment_form">
|
|
|
|
<p>设备基础信息</p>
|
|
|
|
<p>设备基础信息</p>
|
|
|
|
<el-form ref="equipmentForm" :model="equipmentForm">
|
|
|
|
<el-form
|
|
|
|
<el-form-item label="企业名称">
|
|
|
|
ref="equipmentForm"
|
|
|
|
<el-select
|
|
|
|
:model="form"
|
|
|
|
v-model="equipmentForm.company.villageName"
|
|
|
|
:rules="rules"
|
|
|
|
placeholder="请选择企业"
|
|
|
|
:disabled="disabled"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-form-item label="企业名称" prop="companyName">
|
|
|
|
|
|
|
|
<el-select v-model="form.companyName" placeholder="请选择企业">
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in equipmentForm.company"
|
|
|
|
v-for="item in list.company"
|
|
|
|
:key="item.villageCode"
|
|
|
|
@click.native="companyNameselected(item.companyName, item.id)"
|
|
|
|
:label="item.villageName"
|
|
|
|
:key="item.id"
|
|
|
|
:value="item.villageCode"
|
|
|
|
:label="item.companyName"
|
|
|
|
|
|
|
|
:value="item.id"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备名称">
|
|
|
|
<el-form-item> </el-form-item>
|
|
|
|
<el-input v-model="equipmentForm.name"></el-input>
|
|
|
|
<el-form-item label="设备名称" prop="deviceName">
|
|
|
|
|
|
|
|
<el-input v-model="form.deviceName"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备IP">
|
|
|
|
<el-form-item label="设备IP" prop="deviceIp">
|
|
|
|
<el-input v-model="equipmentForm.ip"></el-input>
|
|
|
|
<el-input v-model="form.deviceIp"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="登录账号">
|
|
|
|
<el-form-item label="登录账号" prop="account">
|
|
|
|
<el-input v-model="equipmentForm.passUser"></el-input>
|
|
|
|
<el-input v-model="form.account"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="登录密码">
|
|
|
|
<el-form-item label="登录密码" prop="password">
|
|
|
|
<el-input v-model="equipmentForm.passNum"></el-input>
|
|
|
|
<el-input v-model="form.password"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备大类">
|
|
|
|
<el-form-item label="设备大类" prop="devicePerceptionParentTypeCn">
|
|
|
|
<el-input v-model="equipmentForm.big"></el-input>
|
|
|
|
<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>
|
|
|
|
<el-form-item label="是否卡口">
|
|
|
|
<el-form-item label="是否卡口" prop="isDoorwayVideoCn">
|
|
|
|
<el-input v-model="equipmentForm.mouse"></el-input>
|
|
|
|
<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>
|
|
|
|
<el-form-item label="设备小类">
|
|
|
|
<el-form-item label="设备小类" prop="devicePerceptionSubTypeCn">
|
|
|
|
<el-input v-model="equipmentForm.small"></el-input>
|
|
|
|
<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-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 视频通道信息表单 -->
|
|
|
|
<!-- 视频通道信息表单 -->
|
|
|
|
<div class="video_form">
|
|
|
|
<div class="video_form">
|
|
|
|
<p>视频通道信息</p>
|
|
|
|
<p>视频通道信息</p>
|
|
|
|
<el-form ref="videoForm" :model="videoForm">
|
|
|
|
<el-form
|
|
|
|
<el-form-item label="通道编码">
|
|
|
|
ref="videoForm"
|
|
|
|
<el-input v-model="videoForm.channelCode"></el-input>
|
|
|
|
: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>
|
|
|
|
<el-form-item label="NVR编码">
|
|
|
|
<el-form-item label="NVR编码" prop="gbsNvrNo">
|
|
|
|
<el-input v-model="videoForm.NVRCode"></el-input>
|
|
|
|
<el-input v-model="form.gbsNvrNo"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="通道号">
|
|
|
|
<el-form-item label="通道号" prop="channelNo">
|
|
|
|
<el-input v-model="videoForm.channelNum"></el-input>
|
|
|
|
<el-input v-model="form.channelNo"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="RTSP流地址">
|
|
|
|
<el-form-item label="RTSP流地址" prop="rtspAddress">
|
|
|
|
<el-input v-model="videoForm.address"></el-input>
|
|
|
|
<el-input v-model="form.rtspAddress"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 设备位置信息表单 -->
|
|
|
|
<!-- 设备位置信息表单 -->
|
|
|
|
<div class="equipment_address_form">
|
|
|
|
<div class="equipment_address_form">
|
|
|
|
<p>设备位置信息</p>
|
|
|
|
<p>设备位置信息</p>
|
|
|
|
<el-form ref="addressForm" :model="addressForm">
|
|
|
|
<el-form
|
|
|
|
<el-form-item label="设备经度">
|
|
|
|
ref="addressForm"
|
|
|
|
<el-input v-model="addressForm.longitude"></el-input>
|
|
|
|
: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>
|
|
|
|
<el-form-item label="设备纬度">
|
|
|
|
<el-form-item label="设备纬度" prop="latitude">
|
|
|
|
<el-input v-model="addressForm.latitude"></el-input>
|
|
|
|
<el-input v-model="form.latitude"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="U3D经度">
|
|
|
|
<el-form-item label="U3D经度" prop="u3dLongitude">
|
|
|
|
<el-input v-model="addressForm.U3D_longitude"></el-input>
|
|
|
|
<el-input v-model="form.u3dLongitude"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="U3D纬度">
|
|
|
|
<el-form-item label="U3D纬度" prop="u3dLatitude">
|
|
|
|
<el-input v-model="addressForm.U3D_latitude"></el-input>
|
|
|
|
<el-input v-model="form.u3dLatitude"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备高度">
|
|
|
|
<el-form-item label="设备高度" prop="deviceHeight">
|
|
|
|
<el-input v-model="addressForm.equipemnt_hight"></el-input>
|
|
|
|
<el-input v-model="form.deviceHeight"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="U3D高度">
|
|
|
|
<el-form-item label="U3D高度" prop="u3dHeight">
|
|
|
|
<el-input v-model="addressForm.U3D_hight"></el-input>
|
|
|
|
<el-input v-model="form.u3dHeight"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</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
|
|
|
|
<el-select
|
|
|
|
v-model="addressForm.equipment_orientation.orientationCode"
|
|
|
|
v-model="form.orientationCn"
|
|
|
|
placeholder="请选择设备方位"
|
|
|
|
placeholder="请选择设备方位"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in addressForm.equipment_orientation"
|
|
|
|
v-for="item in list.orientation_types"
|
|
|
|
:key="item.orientationCode"
|
|
|
|
:key="item.dictValue"
|
|
|
|
:label="item.orientation"
|
|
|
|
:label="item.dictLabel"
|
|
|
|
:value="item.orientationCode"
|
|
|
|
:value="item.dictValue"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="安装位置">
|
|
|
|
<el-form-item
|
|
|
|
<el-input v-model="addressForm.equipment_position"></el-input>
|
|
|
|
label="安装位置"
|
|
|
|
|
|
|
|
prop="deviceAddress"
|
|
|
|
|
|
|
|
class="deviceAddress_text"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-input v-model="form.deviceAddress"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 设备其他信息表单 -->
|
|
|
|
<!-- 设备其他信息表单 -->
|
|
|
|
<div class="other_form">
|
|
|
|
<div class="other_form">
|
|
|
|
<p>设备其他信息</p>
|
|
|
|
<p>设备其他信息</p>
|
|
|
|
<el-form ref="otherForm" :model="otherForm">
|
|
|
|
<el-form ref="otherForm" :model="form" :disabled="disabled">
|
|
|
|
<el-form-item label="设备品牌">
|
|
|
|
<el-form-item label="设备品牌" prop="deviceBrand">
|
|
|
|
<el-input v-model="otherForm.brand"></el-input>
|
|
|
|
<el-input v-model="form.deviceBrand"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备厂家">
|
|
|
|
<el-form-item label="设备厂家" prop="manufactor">
|
|
|
|
<el-input v-model="otherForm.manufacturer"></el-input>
|
|
|
|
<el-input v-model="form.manufactor"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="厂家联系电话">
|
|
|
|
<el-form-item label="厂家联系电话" prop="manufactorPhone">
|
|
|
|
<el-input v-model="otherForm.manufacturer_phone"></el-input>
|
|
|
|
<el-input v-model="form.manufactorPhone"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="SN号">
|
|
|
|
<el-form-item label="SN号" prop="deviceSn">
|
|
|
|
<el-input v-model="otherForm.SN_num"></el-input>
|
|
|
|
<el-input v-model="form.deviceSn"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备MAC">
|
|
|
|
<el-form-item label="设备MAC" prop="deviceMac">
|
|
|
|
<el-input v-model="otherForm.MAC"></el-input>
|
|
|
|
<el-input v-model="form.deviceMac"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备端口">
|
|
|
|
<el-form-item label="设备端口" prop="devicePort">
|
|
|
|
<el-input v-model="otherForm.port"></el-input>
|
|
|
|
<el-input v-model="form.devicePort"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { debounce } from "@/utils/publicMethod_lxy/debounce.js";
|
|
|
|
import {
|
|
|
|
|
|
|
|
commonDict,
|
|
|
|
|
|
|
|
getCompanyList,
|
|
|
|
|
|
|
|
addPerceptionList,
|
|
|
|
|
|
|
|
changePerceptionList,
|
|
|
|
|
|
|
|
} from "@/api/correlationEquipment";
|
|
|
|
|
|
|
|
// import { debounce } from "@/utils/publicMethod_lxy/debounce.js";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "addPerceptionDialog",
|
|
|
|
name: "addPerceptionDialog",
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
visible: false,
|
|
|
|
visible: false,
|
|
|
|
dialogTitle: "新建",
|
|
|
|
dialogTitle: "",
|
|
|
|
equipmentForm: {
|
|
|
|
list: {
|
|
|
|
// 设备基础信息表单
|
|
|
|
|
|
|
|
company: [],
|
|
|
|
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: {
|
|
|
|
gbsChannelNo: "",
|
|
|
|
channelCode: "",
|
|
|
|
gbsNvrNo: "",
|
|
|
|
NVRCode: "",
|
|
|
|
channelNo: "",
|
|
|
|
channelNum: "",
|
|
|
|
rtspAddress: "",
|
|
|
|
address: "",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 设备位置信息表单
|
|
|
|
// 设备位置信息表单
|
|
|
|
addressForm: {
|
|
|
|
|
|
|
|
longitude: "",
|
|
|
|
longitude: "",
|
|
|
|
latitude: "",
|
|
|
|
latitude: "",
|
|
|
|
U3D_longitude: "",
|
|
|
|
u3dLongitude: "",
|
|
|
|
U3D_latitude: "",
|
|
|
|
u3dLatitude: "",
|
|
|
|
equipemnt_hight: "",
|
|
|
|
deviceHeight: "",
|
|
|
|
U3D_hight: "",
|
|
|
|
u3dHeight: "",
|
|
|
|
equipment_orientation: [],
|
|
|
|
directionCn: "",
|
|
|
|
equipment_position: "",
|
|
|
|
orientation: "",
|
|
|
|
},
|
|
|
|
orientationCn: "",
|
|
|
|
|
|
|
|
deviceAddress: "",
|
|
|
|
// 设备其他信息表单
|
|
|
|
// 设备其他信息表单
|
|
|
|
otherForm: {
|
|
|
|
deviceBrand: "",
|
|
|
|
brand: "",
|
|
|
|
manufactor: "",
|
|
|
|
manufacturer: "",
|
|
|
|
manufactorPhone: "",
|
|
|
|
manufacturer_phone: "",
|
|
|
|
deviceSn: "",
|
|
|
|
SN_num: "",
|
|
|
|
deviceMac: "",
|
|
|
|
MAC: "",
|
|
|
|
devicePort: "",
|
|
|
|
port: "",
|
|
|
|
},
|
|
|
|
|
|
|
|
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: {
|
|
|
|
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;
|
|
|
|
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>
|
|
|
|
</script>
|
|
|
@ -195,12 +460,12 @@ export default {
|
|
|
|
/deep/.el-dialog {
|
|
|
|
/deep/.el-dialog {
|
|
|
|
.el-dialog__title {
|
|
|
|
.el-dialog__title {
|
|
|
|
color: #fff;
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
background-image: url("~@/assets/companyFile/dialogBack.png");
|
|
|
|
background-image: url("~@/assets/companyFile/dialogBack.png");
|
|
|
|
background-size: 100% 100%;
|
|
|
|
background-size: 100% 100%;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
height: 720px;
|
|
|
|
height: 750px;
|
|
|
|
|
|
|
|
|
|
|
|
/* 关闭弹窗叉号 */
|
|
|
|
/* 关闭弹窗叉号 */
|
|
|
|
.el-dialog__headerbtn {
|
|
|
|
.el-dialog__headerbtn {
|
|
|
@ -237,6 +502,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.form_body {
|
|
|
|
.form_body {
|
|
|
|
|
|
|
|
margin-top: 3%;
|
|
|
|
height: 600px;
|
|
|
|
height: 600px;
|
|
|
|
overflow-y: scroll;
|
|
|
|
overflow-y: scroll;
|
|
|
|
p {
|
|
|
|
p {
|
|
|
@ -254,7 +520,9 @@ export default {
|
|
|
|
background: url("~@/assets/companyFile/242112.png") no-repeat !important;
|
|
|
|
background: url("~@/assets/companyFile/242112.png") no-repeat !important;
|
|
|
|
background-size: 100% 100% !important;
|
|
|
|
background-size: 100% 100% !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.equipment_form {
|
|
|
|
|
|
|
|
margin-top: -2%;
|
|
|
|
|
|
|
|
}
|
|
|
|
.form_body::-webkit-scrollbar {
|
|
|
|
.form_body::-webkit-scrollbar {
|
|
|
|
width: 6px;
|
|
|
|
width: 6px;
|
|
|
|
background-color: #5e666a;
|
|
|
|
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>
|
|
|
|
</style>
|