|
|
|
@ -33,8 +33,7 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item> </el-form-item>
|
|
|
|
|
<el-form-item label="设备名称" prop="deviceName">
|
|
|
|
|
<el-input v-model="form.deviceName"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -168,7 +167,7 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<div v-show="btn_flag" slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button
|
|
|
|
|
@click="
|
|
|
|
|
saveFormData('equipmentForm', 'videoForm', 'addressForm', 'otherForm')
|
|
|
|
@ -264,49 +263,99 @@ export default {
|
|
|
|
|
{ required: true, message: "请输入安装位置", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
btn_flag: true, // 控制表单底部按钮显示与隐藏
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
// 请求设备小类下拉
|
|
|
|
|
const params = {
|
|
|
|
|
dictType: "device_video_sub_type",
|
|
|
|
|
};
|
|
|
|
|
commonDict(params).then((res) => {
|
|
|
|
|
this.form.video_type = res.data;
|
|
|
|
|
});
|
|
|
|
|
const val = {
|
|
|
|
|
dictType: "device_perception_sub_type",
|
|
|
|
|
};
|
|
|
|
|
// 请求设备大类下拉
|
|
|
|
|
commonDict(val).then((res) => {
|
|
|
|
|
this.form.perception_type = res.data;
|
|
|
|
|
});
|
|
|
|
|
// 请求设备方位下拉
|
|
|
|
|
const param_op = {
|
|
|
|
|
dictType: "orientation",
|
|
|
|
|
};
|
|
|
|
|
commonDict(param_op).then((res) => {
|
|
|
|
|
this.form.orientation_types = res.data;
|
|
|
|
|
});
|
|
|
|
|
// 请求企业名称下拉
|
|
|
|
|
getCompanyList().then((res) => {
|
|
|
|
|
this.form.company = res.data;
|
|
|
|
|
});
|
|
|
|
|
this.obtain_select_list();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
open(num, row) {
|
|
|
|
|
this.visible = true;
|
|
|
|
|
if (num === "1") {
|
|
|
|
|
this.dialogTitle = "新建";
|
|
|
|
|
(this.form = {
|
|
|
|
|
// 设备基础信息表单
|
|
|
|
|
companyId: "",
|
|
|
|
|
companyName: "",
|
|
|
|
|
company: [],
|
|
|
|
|
deviceName: "",
|
|
|
|
|
deviceIp: "",
|
|
|
|
|
deviceVideoParentType: "",
|
|
|
|
|
deviceParentType: "", // 大类
|
|
|
|
|
video_type: [],
|
|
|
|
|
deviceVideoSubType: "", // 小类
|
|
|
|
|
perception_type: [],
|
|
|
|
|
account: "",
|
|
|
|
|
password: "",
|
|
|
|
|
// 视频通道信息表单
|
|
|
|
|
gbsChannelNo: "",
|
|
|
|
|
gbsNvrNo: "",
|
|
|
|
|
channelNo: "",
|
|
|
|
|
rtspAddress: "",
|
|
|
|
|
// 设备位置信息表单
|
|
|
|
|
longitude: "",
|
|
|
|
|
latitude: "",
|
|
|
|
|
u3dLongitude: "",
|
|
|
|
|
u3dLatitude: "",
|
|
|
|
|
deviceHeight: "",
|
|
|
|
|
u3dHeight: "",
|
|
|
|
|
orientation: "",
|
|
|
|
|
orientation_types: [],
|
|
|
|
|
deviceAddress: "",
|
|
|
|
|
// 设备其他信息表单
|
|
|
|
|
deviceBrand: "",
|
|
|
|
|
manufactor: "",
|
|
|
|
|
manufactorPhone: "",
|
|
|
|
|
deviceSn: "",
|
|
|
|
|
deviceMac: "",
|
|
|
|
|
devicePort: "",
|
|
|
|
|
isDoorwayVideo: "",
|
|
|
|
|
isShowVideo: "",
|
|
|
|
|
}),
|
|
|
|
|
this.obtain_select_list()((this.btn_flag = true));
|
|
|
|
|
this.disabled = false;
|
|
|
|
|
} else if (num === "2") {
|
|
|
|
|
this.dialogTitle = "编辑";
|
|
|
|
|
this.form = row;
|
|
|
|
|
this.form = Object.assign(this.form,row);
|
|
|
|
|
this.obtain_select_list()
|
|
|
|
|
this.btn_flag = true;
|
|
|
|
|
this.disabled = false;
|
|
|
|
|
} else if (num === "5") {
|
|
|
|
|
this.dialogTitle = "详情";
|
|
|
|
|
this.form = row;
|
|
|
|
|
this.form = Object.assign(this.form,row);
|
|
|
|
|
this.obtain_select_list()
|
|
|
|
|
this.disabled = true;
|
|
|
|
|
this.btn_flag = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
obtain_select_list() {
|
|
|
|
|
// 请求设备小类下拉
|
|
|
|
|
const params = {
|
|
|
|
|
dictType: "device_video_sub_type",
|
|
|
|
|
};
|
|
|
|
|
commonDict(params).then((res) => {
|
|
|
|
|
this.form.video_type = res.data;
|
|
|
|
|
});
|
|
|
|
|
const val = {
|
|
|
|
|
dictType: "device_perception_sub_type",
|
|
|
|
|
};
|
|
|
|
|
// 请求设备大类下拉
|
|
|
|
|
commonDict(val).then((res) => {
|
|
|
|
|
this.form.perception_type = res.data;
|
|
|
|
|
});
|
|
|
|
|
// 请求设备方位下拉
|
|
|
|
|
const param_op = {
|
|
|
|
|
dictType: "orientation",
|
|
|
|
|
};
|
|
|
|
|
commonDict(param_op).then((res) => {
|
|
|
|
|
this.form.orientation_types = res.data;
|
|
|
|
|
});
|
|
|
|
|
// 请求企业名称下拉
|
|
|
|
|
getCompanyList().then((res) => {
|
|
|
|
|
this.form.company = res.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 表单验证必填
|
|
|
|
|
saveFormData: debounce(function (formName1, formName2, formName3) {
|
|
|
|
|
this.$refs[formName1].validate((valid1) => {
|
|
|
|
@ -353,13 +402,13 @@ export default {
|
|
|
|
|
this.visible = false;
|
|
|
|
|
// 重置表单
|
|
|
|
|
// 设备基础信息表单重置
|
|
|
|
|
this.$refs['equipmentForm'].resetFields()
|
|
|
|
|
this.$refs["equipmentForm"].resetFields();
|
|
|
|
|
// 视频通道信息表单重置
|
|
|
|
|
this.$refs['videoForm'].resetFields()
|
|
|
|
|
// 设备位置信息表单重置
|
|
|
|
|
this.$refs['addressForm'].resetFields()
|
|
|
|
|
this.$refs["videoForm"].resetFields();
|
|
|
|
|
// 设备位置信息表单重置
|
|
|
|
|
this.$refs["addressForm"].resetFields();
|
|
|
|
|
// 设备其他信息表单重置
|
|
|
|
|
this.$refs['otherForm'].resetFields()
|
|
|
|
|
this.$refs["otherForm"].resetFields();
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|