xuhaoyun 1 year ago
commit 58684fb482

@ -5,7 +5,7 @@ import { getToken } from '@/utils/auth'
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const request = axios.create({
//baseURL: 'http://172.18.113.50:8080/zhapi',
baseURL: 'http://192.168.0.188:8118/zhapi',
baseURL: 'http://192.168.0.188:8888/zhapi',
//baseURL: `http://${window.location.host}/zhapi`,
timeout: 50000,
headers: { 'content-type': 'application/json' },

@ -6,7 +6,7 @@
<p>企业工商信息</p>
<!-- 为适应上传图片表单布局把企业工商表单拆分 -->
<div class="commerceMessage_one">
<el-form ref="commerceMessage_form" :model="form" class="commerceMessage_form">
<el-form ref="commerceMessage_form" :model="form" :rules="rules" class="commerceMessage_form">
<el-form-item label="企业名称" prop="companyName">
<el-input v-model="form.companyName"></el-input>
</el-form-item>
@ -48,7 +48,7 @@
</div>
<!-- 为适应上传图片表单布局把企业工商表单拆分,剩余部分 -->
<el-form ref="commerceMessage_form_two" :model="form" class="commerceMessage_form_two">
<el-form ref="commerceMessage_form_two" :model="form" :rules="rules" class="commerceMessage_form_two">
<el-form-item label="企业登记注册地" prop="registerAddress">
<el-input v-model="form.registerAddress"></el-input>
</el-form-item>
@ -79,7 +79,7 @@
<!-- 企业位置信息表单 -->
<div class="company_position">
<p>企业位置信息</p>
<el-form ref="company_position_form" :model="form" class="company_position_form">
<el-form ref="company_position_form" :model="form" :rules="rules" class="company_position_form">
<el-form-item label="省份名称" prop="provinceName">
<el-select v-model="form.provinceName" @change="checkCity" placeholder="请选择省份名称">
<el-option v-for="item in form.province" :key="item.areaCode" :label="item.areaName" :value="item.areaCode">
@ -157,7 +157,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() {
@ -216,10 +216,33 @@ export default {
belongingArea: "",
},
imageUrl: "",
upUrl: `http://192.168.0.188:8118/zhapi/safety/system/enterpriseList`, //
upUrl: `http://${window.location.host}/zhapi/safety/system/enterpriseList`, //
upheaders: {
Authorization: localStorage.getItem("AuthorizationToken"),
},
rules:{
companyName: [
{ required: true, message: "请选择企业", trigger: "change" },
],
companyTypes:[
{ type: 'array', required: true, message: '请至少选择一个企业类型', trigger: 'change' }
],
provinceName:[
{ required: true, message: "请选择省份名称", trigger: "change" },
],
cityName:[
{ required: true, message: "请选择城市名称", trigger: "change" },
],
areaName:[
{ required: true, message: "请选择区县名称", trigger: "change" },
],
blockName:[
{ required: true, message: "请选择街道/乡镇名称", trigger: "change" },
],
streetName:[
{ required: true, message: "请选择社区/村名称", trigger: "change" },
],
}
};
},
created() {
@ -261,15 +284,16 @@ export default {
policeDistrictCn: "",
policeDistrictCode: "",
belongingArea: "",
companyType:'',
companyTypes: [], // List,
values: [],
id: [],
id: '',
};
this.imageUrl = "";
Object.assign(this.form, newForm);
} else if (num === 3) {
this.dialogTitle = "编辑";
console.log("item", item);
console.log("item123", item);
this.imageUrl = item.picUrl;
this.form = Object.assign(this.form, item);
}
@ -363,17 +387,33 @@ export default {
this.form.picUrl = val
},
//
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;

@ -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["videoForm"].resetFields();
//
this.$refs['addressForm'].resetFields()
this.$refs["addressForm"].resetFields();
//
this.$refs['otherForm'].resetFields()
this.$refs["otherForm"].resetFields();
},
},
};

@ -6,7 +6,7 @@
<div v-if="display_search" class="equipment_data_search">
<el-form :inline="true" :model="search" class="search_data">
<el-form-item>
<el-input v-model="search.equipemnt" placeholder="输入设备名称搜索"></el-input>
<el-input v-model="search.equipment" placeholder="输入设备名称搜索"></el-input>
</el-form-item>
<el-form-item>
<el-form-item>
@ -14,7 +14,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-input v-model="search.equipemnt_ip" placeholder="输入设备IP搜索"></el-input>
<el-input v-model="search.equipment_ip" placeholder="输入设备IP搜索"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="onSubmitVideo"></el-button>
@ -27,7 +27,7 @@
<div v-else class="equipment_data_search">
<el-form :inline="true" :model="search" class="search_data">
<el-form-item>
<el-input v-model="search.equipemnt" placeholder="输入设备名称搜索"></el-input>
<el-input v-model="search.equipment" placeholder="输入设备名称搜索"></el-input>
</el-form-item>
<el-form-item>
<el-form-item>
@ -337,7 +337,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;

@ -21,7 +21,7 @@
<label slot="label"
>+&nbsp;&nbsp;&nbsp;{{ item.indexName }}&nbsp;&nbsp;&nbsp;×</label
>
<el-input v-model="item.rate"></el-input>
<el-input v-model="item.rate" oninput="value=value.replace(/^0+/,0)"></el-input>
</el-form-item>
</el-form>
<!-- 编辑表单 -->
@ -34,7 +34,7 @@
<label slot="label"
>+&nbsp;&nbsp;&nbsp;{{ item.indexName }}&nbsp;&nbsp;&nbsp;×</label
>
<el-input v-model="item.rate"></el-input>
<el-input v-model="item.rate" oninput="value=value.replace(/^0+/,0)"></el-input>
</el-form-item>
</el-form>
<div v-if="btn_flag" class="massage_btn">
@ -148,6 +148,7 @@ export default {
// console.log('this.all_data.toFixed(2)',this.all_data.toFixed(2));
}
}
if (isNaN(this.all_data) || this.all_data.toFixed(2) != 1) {
this.$message.warning("保存失败,各指标占比应大于等于0且总和应等于1");
} else {

@ -17,9 +17,11 @@
</div>
<el-table
v-if="is_flag"
max_height="310"
:header-cell-style="table_header"
:data="tableData_all"
:cell-style="{ background: 'revert', 'text-align': 'center' }"
key="1"
>
<el-table-column prop="level" :label="label">
<template slot-scope="scope">
@ -68,6 +70,7 @@
:header-cell-style="table_header"
:data="tableData_all"
:cell-style="{ background: 'revert', 'text-align': 'center' }"
key="2"
>
<el-table-column prop="scoreLowerLimit" label="分值设置" width="360">
</el-table-column>
@ -98,6 +101,7 @@
:header-cell-style="table_header"
:data="tableData_warn"
:cell-style="{ background: 'revert', 'text-align': 'center' }"
key="3"
>
<el-table-column prop="level" label="预警等级">
<template slot-scope="scope">
@ -190,6 +194,7 @@ export default {
mounted() {
bus.$on("send_three", (data) => {
console.log("data", data);
this.tableData_all = [];
this.three_level_id = data.safeRuleId; // id
this.safeRuleId = data.safeRuleId;
this.table_num = data.table_num; // 12

Loading…
Cancel
Save