pull/49/head
lukeyan 1 year ago
parent e4099fd591
commit 091e404621

@ -51,7 +51,6 @@
class="avatar-uploader"
accept=".jpg,.jpeg,.png,.gif,.JPG,.JPEG"
:action="upUrl"
:headers="upheaders"
:show-file-list="false"
:on-success="handleAvatarSuccess"
>
@ -252,7 +251,7 @@ import {
postCompanyList,
putCompanyList,
} from "@/api/systemManagement";
import defaultImage from "@/assets/companyFile/defaultimage.png";
import defaultImage from "@/assets/companyFile/default.png";
export default {
name: "CompanyDataDialog",
data() {
@ -311,7 +310,7 @@ export default {
belongingArea: "",
},
imageUrl: "",
upUrl: `http://172.18.113.50:8080/zhapi/safety/system/enterpriseList`, //
upUrl: `http://${window.location.host}/zhapi/safety/system/enterpriseList`, //
upheaders: {
Authorization: localStorage.getItem("AuthorizationToken"),
},
@ -379,9 +378,10 @@ export default {
policeDistrictCn: "",
policeDistrictCode: "",
belongingArea: "",
companyType:'',
companyTypes: [], // List,
values: [],
id: [],
id: '',
};
this.imageUrl = "";
Object.assign(this.form, newForm);
@ -477,17 +477,33 @@ export default {
}
},
//
saveFormData() {
async saveFormData() {
delete this.form.city
delete this.form.community
delete this.form.companyTypes
delete this.form.county
delete this.form.township
delete this.form.jurisdiction
delete this.form.province
delete this.form.values
const params = this.form;
console.log("this.form3", this.form);
if (this.dialogTitle === "新建") {
postCompanyList(params).then((res) => {
await postCompanyList(params).then((res) => {
console.log(res);
this.$message.success("新建成功");
this.visible = false;
});
} else if (this.dialogTitle === "编辑") {
putCompanyList(params).then((res) => {
// const params_again = {
// // pageSize: this.pageSize,
// // pageNum: this.pageNum,
// companyName: this.searchCompany, //
// };
// await getCompanyList(params_again).then(res=>{
// console.log('res_again',res);
// })
await putCompanyList(params).then((res) => {
console.log(res);
this.$message.success("编辑成功");
this.visible = false;
@ -653,7 +669,7 @@ export default {
font-size: 28px;
position: relative;
color: #8c939d;
width: 220px;
width: 220px;
height: 220px;
background: url("~@/assets/companyFile/uploadicon.png") center no-repeat !important;
background-size: 40% 40% !important;

@ -34,7 +34,7 @@
shewei: val == '剧毒' || val == '易制毒',
zhongdian: val == '消防重点' || val == '所管消防',
zhibao: val == '放射源' || val == '易制爆',
zhian: val == '治安重点' || val == '创安单位',
zhian: val == '治安重点' || val == '创安单位' || val == '外资合资',
}" v-for="(val, index) in item.companyTypes" :key="index">
{{ val }}
</div>
@ -106,13 +106,13 @@ export default {
}
},
//
getData() {
async getData() {
const params = {
pageSize: this.pageSize,
pageNum: this.pageNum,
companyName: this.searchCompany, //
};
getCompanyList(params).then((res) => {
await getCompanyList(params).then((res) => {
if (res.code === 200) {
console.log("res.data", res);
this.company_data = res.data;
@ -303,12 +303,13 @@ export default {
color: #fff;
text-shadow: 0 0 9px #ffe6d9;
left: 10px;
bottom: 70px;
bottom: 100px;
font-size: 18px;
}
.company_label {
display: flex;
flex-wrap: wrap;
position: absolute;
z-index: 2;
left: 10px;
@ -317,7 +318,7 @@ export default {
.shewei {
height: 26px;
line-height: 26px;
width: auto;
width: 60px;
background: url("~@/assets/companyFile/编组 11991.png") no-repeat;
padding: 0 5px;
font-size: 14px;
@ -325,13 +326,15 @@ export default {
letter-spacing: 0.44px;
font-weight: 400;
background-size: 100% 100%;
margin-right: 10px;
margin-right: 5px;
margin-bottom: 5px;
text-align: center;
}
.zhongdian {
height: 26px;
line-height: 26px;
width: auto;
width: 80px;
background: url("~@/assets/companyFile/编组 11222221.png") no-repeat;
padding: 0 5px;
font-size: 14px;
@ -339,13 +342,15 @@ export default {
letter-spacing: 0.44px;
font-weight: 400;
background-size: 100% 100%;
margin-right: 10px;
margin-right: 5px;
margin-bottom: 5px;
text-align: center;
}
.zhibao {
height: 26px;
line-height: 26px;
width: auto;
width: 60px;
background: url("~@/assets/companyFile/编组 11991备份 10.png") no-repeat;
padding: 0 5px;
font-size: 14px;
@ -353,13 +358,15 @@ export default {
letter-spacing: 0.44px;
font-weight: 400;
background-size: 100% 100%;
margin-right: 10px;
margin-right: 5px;
margin-bottom: 5px;
text-align: center;
}
.zhian {
height: 26px;
line-height: 26px;
width: auto;
width: 80px;
background: url("~@/assets/companyFile/编组 11991备份 21.png") no-repeat;
padding: 0 5px;
font-size: 14px;
@ -367,7 +374,9 @@ export default {
letter-spacing: 0.44px;
font-weight: 400;
background-size: 100% 100%;
margin-right: 10px;
margin-right: 5px;
margin-bottom: 5px;
text-align: center;
}
}

@ -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();
},
},
};

@ -7,7 +7,7 @@
<el-form :inline="true" :model="search" class="search_data">
<el-form-item>
<el-input
v-model="search.equipemnt"
v-model="search.equipment"
placeholder="输入设备名称搜索"
></el-input>
</el-form-item>
@ -21,7 +21,7 @@
</el-form-item>
<el-form-item>
<el-input
v-model="search.equipemnt_ip"
v-model="search.equipment_ip"
placeholder="输入设备IP搜索"
></el-input>
</el-form-item>
@ -37,7 +37,7 @@
<el-form :inline="true" :model="search" class="search_data">
<el-form-item>
<el-input
v-model="search.equipemnt"
v-model="search.equipment"
placeholder="输入设备名称搜索"
></el-input>
</el-form-item>
@ -375,7 +375,7 @@ export default {
width: calc(100% - 30px);
margin-top: 12px;
margin-left: 12px;
height: 30vh;
height: 27vh;
.el-table,
.el-table__expanded-cell {

@ -155,7 +155,7 @@ export default {
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
deviceVideoSubTypes: "1,2,3,4,5,6,7,8,9",
// deviceVideoSubTypes: "1,2,3,4,5,6,7,8,9",
};
await getVideoList(this.pushValue.search_params).then((res) => {
console.log("resVideoList1", res.rows);
@ -171,7 +171,7 @@ export default {
this.pushValue.search_params = {
pageSize: 4,
pageNum: 1,
devicePerceptionSubTypes: "1,2,3,4,6,7,8,10,11",
// devicePerceptionSubTypes: "1,2,3,4,6,7,8,10,11",
};
await getPerceptionList(this.pushValue.search_params).then((res) => {
// res.row

@ -355,7 +355,7 @@ export default {
}
//
.el-tree /deep/ .el-icon-caret-right:before {
background: url("~@/assets/companyFile/minus.png") no-repeat;
background: url("~@/assets/companyFile/add.png") no-repeat;
content: "";
display: block;
width: 23px;
@ -367,7 +367,7 @@ export default {
.el-tree
/deep/
.el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
background: url("~@/assets/companyFile/minus.png") no-repeat;
background: url("~@/assets/companyFile/add.png") no-repeat;
content: "";
display: block;
width: 23px;
@ -375,9 +375,9 @@ export default {
font-size: 23px;
background-size: 23px;
}
//
// minus
.el-tree /deep/.el-tree-node__expand-icon.is-leaf::before {
background: url("~@/assets/companyFile/add.png") no-repeat;
background: url("~@/assets/companyFile/minus.png") no-repeat;
content: "";
display: block;
width: 23px;

@ -194,7 +194,7 @@ export default {
mounted() {
bus.$on("send_three", (data) => {
console.log("data", data);
this.tableData_all = []
this.tableData_all = [];
this.three_level_id = data.safeRuleId; // id
this.safeRuleId = data.safeRuleId;
this.table_num = data.table_num; // 12

Loading…
Cancel
Save