|
|
@ -18,7 +18,7 @@
|
|
|
|
:disabled="disabled"
|
|
|
|
:disabled="disabled"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-form-item label="企业名称" prop="companyName">
|
|
|
|
<el-form-item label="企业名称" prop="companyName">
|
|
|
|
<el-select v-model="form.companyName" placeholder="请选择企业">
|
|
|
|
<el-select ref="companySelect" v-model="form.companyName" placeholder="请选择企业">
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in form.company"
|
|
|
|
v-for="item in form.company"
|
|
|
|
:key="item.id"
|
|
|
|
:key="item.id"
|
|
|
@ -34,9 +34,9 @@
|
|
|
|
<el-form-item label="设备IP" prop="deviceIp">
|
|
|
|
<el-form-item label="设备IP" prop="deviceIp">
|
|
|
|
<el-input v-model="form.deviceIp"></el-input>
|
|
|
|
<el-input v-model="form.deviceIp"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="设备大类" prop="deviceParentType">
|
|
|
|
<el-form-item label="设备大类" prop="deviceVideoParentType">
|
|
|
|
<el-select
|
|
|
|
<el-select
|
|
|
|
v-model="form.deviceParentType"
|
|
|
|
v-model="form.deviceVideoParentType"
|
|
|
|
placeholder="请选择设备大类"
|
|
|
|
placeholder="请选择设备大类"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
@ -102,11 +102,11 @@
|
|
|
|
:rules="rules"
|
|
|
|
:rules="rules"
|
|
|
|
:disabled="disabled"
|
|
|
|
:disabled="disabled"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-form-item label="设备经度">
|
|
|
|
<el-form-item label="设备经度" prop="longitude">
|
|
|
|
<el-input v-model="form.longitude" prop="longitude"></el-input>
|
|
|
|
<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="form.latitude" prop="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经度">
|
|
|
|
<el-input v-model="form.u3dLongitude"></el-input>
|
|
|
|
<el-input v-model="form.u3dLongitude"></el-input>
|
|
|
@ -162,7 +162,12 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button @click="saveFormData('equipmentForm','videoForm','addressForm','otherForm')">保 存</el-button>
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
@click="
|
|
|
|
|
|
|
|
saveFormData('equipmentForm', 'videoForm', 'addressForm', 'otherForm')
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
>保 存</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-button>取 消</el-button>
|
|
|
|
<el-button>取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
@ -230,7 +235,7 @@ export default {
|
|
|
|
deviceIp: [
|
|
|
|
deviceIp: [
|
|
|
|
{ required: true, message: "请填写设备ip", trigger: "blur" },
|
|
|
|
{ required: true, message: "请填写设备ip", trigger: "blur" },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
deviceParentType: [
|
|
|
|
deviceVideoParentType: [
|
|
|
|
{ required: true, message: "请选择设备大类", trigger: "change" },
|
|
|
|
{ required: true, message: "请选择设备大类", trigger: "change" },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
deviceVideoSubType: [
|
|
|
|
deviceVideoSubType: [
|
|
|
@ -288,50 +293,48 @@ export default {
|
|
|
|
} else if (num === "5") {
|
|
|
|
} else if (num === "5") {
|
|
|
|
this.dialogTitle = "详情";
|
|
|
|
this.dialogTitle = "详情";
|
|
|
|
this.form = row;
|
|
|
|
this.form = row;
|
|
|
|
this.disabled = true
|
|
|
|
this.disabled = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
saveFormData: debounce(function (formName1,formName2,formName3) {
|
|
|
|
saveFormData: debounce(function (formName1, formName2, formName3) {
|
|
|
|
this.$refs[formName1].validate((valid1) => {
|
|
|
|
this.$refs[formName1].validate((valid1) => {
|
|
|
|
console.log('valid1',valid1);
|
|
|
|
|
|
|
|
if (valid1) {
|
|
|
|
if (valid1) {
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}); // 设备基础必填验证
|
|
|
|
|
|
|
|
this.$refs[formName2].validate((valid2) => {
|
|
|
|
this.$refs[formName2].validate((valid2) => {
|
|
|
|
console.log('valid2',valid2);
|
|
|
|
|
|
|
|
if (valid2) {
|
|
|
|
if (valid2) {
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}); // 视频通道信息必填验证
|
|
|
|
|
|
|
|
this.$refs[formName3].validate((valid3) => {
|
|
|
|
this.$refs[formName3].validate((valid3) => {
|
|
|
|
console.log('valid3',valid3);
|
|
|
|
|
|
|
|
if (valid3) {
|
|
|
|
if (valid3) {
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}); // 视频通道信息必填验证
|
|
|
|
|
|
|
|
delete this.form.company;
|
|
|
|
delete this.form.company;
|
|
|
|
delete this.form.video_type;
|
|
|
|
delete this.form.video_type;
|
|
|
|
delete this.form.perception_type;
|
|
|
|
delete this.form.perception_type;
|
|
|
|
delete this.form.orientation_types;
|
|
|
|
delete this.form.orientation_types;
|
|
|
|
|
|
|
|
this.form.companyId = this.$refs.companySelect.selected.value // 企业对应id
|
|
|
|
const params = this.form;
|
|
|
|
const params = this.form;
|
|
|
|
console.log("this.form", this.form);
|
|
|
|
console.log("this.form", this.form);
|
|
|
|
if (this.dialogTitle === "新建") {
|
|
|
|
if (this.dialogTitle === "新建") {
|
|
|
|
addVideoList(params).then((res) => {
|
|
|
|
addVideoList(params)
|
|
|
|
console.log("res78", res);
|
|
|
|
.then((res) => {
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
|
|
this.visible = false;
|
|
|
|
this.visible = false;
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: res.msg,
|
|
|
|
|
|
|
|
type: "success",
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.warning("新建失败");
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}); // 视频通道信息必填验证
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}); // 视频通道信息必填验证
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.warning("请填入必填项");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}); // 设备基础必填验证
|
|
|
|
}, 300),
|
|
|
|
}, 300),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|