Commit 1bfba0f4 authored by jianqian's avatar jianqian

新增

parent bc40851a
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="ioc-danger" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="ioc" target="1.8" />
<module name="ioc-danger" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/zzz2017-ioc-ioc-master" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/zzz2017-ioc-ioc-master/ioc-danger" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/zzz2017-ioc-ioc-master/pom.xml" />
</list>
</option>
<option name="ignoredFiles">
<set>
<option value="$PROJECT_DIR$/zzz2017-ioc-ioc-master/pom.xml" />
</set>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -341,6 +341,27 @@ export const defalutRouterMap = [
},
]
},
{
path: '/Guaranteebise',
name: 'Guaranteebise',
component: Layout,
redirect: '/guarantee',
meta: {
title: '应急综合保障',
icon: 'iconfont iconqiye',
},
children: [
{
path: '/guarantee',
name: 'guarantee',
meta: {
title: '应急资源管理',
icon: '',
},
component: () => import('@/views/guarantee/guarantee1.vue')
}
]
},
{
path: '/System',
component: Layout,
......
export default {
URL:'http://192.168.2.8:60018/danger',
// URL:'http://127.0.0.1:60018/danger',
URL:'http://127.0.0.1:60018/danger',
// URL:'http://127.0.0.1:60018/dang127.0.0.1
//URL:'http://36.148.23.59:8901/danger',
titleArray: [],
enterpriseId:'',
......@@ -25,7 +25,10 @@ export default {
MenuMg: "System",
RoleMg: "System",
UserMg: "System",
VideoList: "Video"
VideoList: "Video",
guarantee: "guarantee",
TypeList: "guarantee",
},
deleteFun(that: any, url: any, callback: any) {
(that as any)
......
<template>
<div class="wrapper enseDetail">
<div class="flexBox">
<div class="flexBox-item">
<div class="enterDetail">
<h3>*企业注册信息*</h3>
<div class="enterDetail-item">
<span class="itit">单位名称必填:</span>
{{ editForm.unitName }}
</div>
<div class="enterDetail-item">
<span class="itit">统一社会信用代码:</span>
{{ editForm.orgCode }}
</div>
<div class="enterDetail-item">
<span class="itit">法定代表人:</span>
{{ editForm.legalPerson }}
</div>
<div class="enterDetail-item">
<span class="itit">法人邮箱:</span>
{{ editForm.legalPersonEmail }}
</div>
<div class="enterDetail-item">
<span class="itit">所属区域:</span>
<City :valueqv="cityval" :disabled="true"></City>
</div>
<div class="enterDetail-item">
<span class="itit">所属街道:</span>
{{ editForm.streetName }}
</div>
<div class="enterDetail-item">
<span class="itit">单位注册地址:</span>
{{ editForm.regAddress }}
</div>
<div class="enterDetail-item">
<span class="itit">生产经营地址:</span>
{{ editForm.runAddress }}
</div>
<div class="enterDetail-item">
<span class="itit">法人手机:</span>
{{ editForm.legalPersonPhone }}
</div>
<div class="enterDetail-item">
<span class="itit">营业执照:</span>
<span class="dbtn sd qiCr" v-if="editForm.viewOrgFilePath" @click="checkFile(editForm.viewOrgFilePath)">
<i class="el-icon el-icon-view"></i>查看
</span>
</div>
<div class="enterDetail-item">
<span class="itit">授权书:</span>
<span class="dbtn sd qiCr" v-if="editForm.viewAuthorizeFile" @click="checkFile(editForm.viewAuthorizeFile)">
<i class="el-icon el-icon-view"></i>查看
</span>
</div>
<div class="enterDetail-item">
<span class="itit">管理员姓名:</span>
{{ editForm.userName }}
</div>
<div class="enterDetail-item">
<span class="itit">管理员身份证:</span>
{{ editForm.idCard }}
</div>
<div class="enterDetail-item">
<span class="itit">管理员Email:</span>
{{ editForm.email }}
</div>
<div class="enterDetail-item">
<span class="itit">管理员手机:</span>
{{ editForm.mobliePhone }}
</div>
<h3>
<span class="dbtn dg fr" @click="$router.go(-1)">
<i class="el-icon-d-arrow-left"></i> 返回上一页
</span>
</h3>
</div>
</div>
<div class="flexBox-item">
<el-row>
<el-checkbox @change="handleCheckAllChange" :indeterminate="isIndeterminate" v-model="checkAll">全选</el-checkbox>
<el-checkbox-group v-model="checkList" @change="CheckChange">
<el-checkbox label="1">
企业辅料
<img src="@/assets/mark/mark05.png" width="25" />
</el-checkbox>
<el-checkbox label="2">
生产设备
<img src="@/assets/mark/mark03.png" width="25" />
</el-checkbox>
<el-checkbox label="3">
企业产品
<img src="@/assets/mark/mark01.png" width="25" />
</el-checkbox>
<el-checkbox label="4">
应急物资
<img src="@/assets/mark/mark02.png" width="25" />
</el-checkbox>
<el-checkbox label="5">
监控设备
<img src="@/assets/mark/markjk.png" width="25" />
</el-checkbox>
<el-checkbox label="6">
传感设备
<img src="@/assets/mark/markcgq.png" width="25" />
</el-checkbox>
</el-checkbox-group>
</el-row>
<div id="mapbox">
<Search :MAP="MAP" :Mutil="Mutil" v-if="mapLoadDone"></Search>
<DrawTool :MAP="MAP" v-if="mapLoadDone"></DrawTool>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import {
Component,
Vue,
Provide,
Prop,
Watch
} from "vue-property-decorator";
import {
State,
Getter,
Mutation,
Action
} from "vuex-class";
import METHOD from "@/utils/methods";
import City from "@/components/city.vue";
import "@/utils/VamapLoad.ts";
import DrawTool from "@/components/drawTool.vue";
import Search from "@/components/search.vue";
import Mutil from "@/utils/mapUtil.js";
@Component({
components: {
City,
DrawTool,
Search,
},
})
export default class EnseListDetail extends Vue {
@Provide() Mutil: any;
@Provide() mapLoadDone = false;
@Provide() MAP: any;
@Provide() enterpriseId: string = "";
@Provide() cityval: any = [];
@Provide() editForm: any = {};
@Provide() checkList: any = ["1", "2", "3", "4", "5", "6"];
@Provide() checkListOpt: any = ["1", "2", "3", "4", "5", "6"];
@Provide() isIndeterminate: boolean = false;
@Provide() checkAll: boolean = true;
/* 地图 */
@Provide() mapOption = {
plugin: [{
pName: "MapType",
defaultType: 1,
},
{
pName: "ToolBar",
},
],
center: [115, 28],
zoom: 10,
events: {},
};
@Provide() markers: any = [];
@Provide() deviceDataArr: any = [];
@Provide() goodsDataArr: any = [];
@Provide() mapData: any = [];
@Provide() windowsArr: any = [];
@Provide() currentWindow: any = "";
@Provide() toolobj: any;
@Provide() mouseTool: any; //测量工具
@Provide() toolVisble: boolean = false;
/*获取物品*/
getMapDataA() {
let that = this;
return new Promise((resolve, reject) => {
METHOD.axiosPost(
that,
`/enterpriseGoods/selectEnterpriseGoodsList/${that.enterpriseId}`, {
page: 1,
size: 10000,
},
(res: any) => {
if (res.code == 0) {
resolve(res.data.pageData);
}
}
);
});
}
/*获取安全设备*/
getMapDataB() {
let that = this;
return new Promise((resolve, reject) => {
METHOD.axiosPost(
that,
`/safetyDeviceInfo/selectSafetyDeviceInfoList/${that.enterpriseId}`, {
page: 1,
size: 10000,
},
(res: any) => {
if (res.code == 0) {
let mapData = res.data.pageData;
resolve(res.data.pageData);
}
}
);
});
}
addMarksToMap() {
let that = this;
Promise.all([that.getMapDataA(), that.getMapDataB()]).then(
(iter) => {
let res1: any = iter[0];
let res2: any = iter[1];
let mapData = [...res1, ...res2]
that.mapData = [...res1, ...res2];
if (mapData.length > 0) {
let latSum = 0;
let lngSum = 0;
mapData.forEach((ele: any, index: any) => {
that.addMark(ele, index);
lngSum += ele.longitude;
latSum += ele.latitude;
});
let mapcenter = [lngSum / mapData.length, latSum / mapData.length];
that.Mutil.setViewF({
center: mapcenter,
});
} else {
that.$message.warning("没有设备及物品信息!");
}
}
);
}
addMark(obj: any, index: any) {
let icon,
that = this;
switch (obj.dataType) {
case "3":
icon = require("@/assets/mark/mark01.png");
break;
case "4":
icon = require("@/assets/mark/mark02.png");
break;
case "2":
icon = require("@/assets/mark/mark03.png");
break;
case "1":
icon = require("@/assets/mark/mark05.png");
break;
case "5":
icon = require("@/assets/mark/markjk.png");
break;
case "6":
icon = require("@/assets/mark/markcgq.png");
break;
}
that.Mutil.addMarkerToMap(
obj.dataType,
obj.goodsName,
icon,
[obj.longitude, obj.latitude],
0.5,
obj.id
);
}
getDetail() {
let that = this;
METHOD.axiosGet(
that,
`/enterpriseInfo/queryEnterpriseInfoById/${that.enterpriseId}`,
function (res: any) {
if (res.code == 0) {
that.editForm = res.data;
if (that.editForm.provinceId) {
that.cityval = [
that.editForm.provinceId,
that.editForm.cityId,
that.editForm.countyId,
];
}
that.$nextTick(() => {
console.log(that.editForm.boundary)
if (that.editForm.boundary) {
that.Mutil.drawPloygon(JSON.parse(that.editForm.boundary));
}
});
}
}
);
}
checkFile(url: any) {
window.open(METHOD.URL + url, "_blank");
}
/*radio group*/
CheckChange(val: any) {
let that = this;
that.checkListOpt.forEach((ele: any) => {
if (val.indexOf(ele) == -1) that.Mutil.visibleMarks(false, ele);
else that.Mutil.visibleMarks(true, ele);
});
let len = that.checkListOpt.length;
that.checkAll = val.length == len;
that.isIndeterminate = val.length > 0 && val.length < len;
}
handleCheckAllChange(val: any) {
let that = this;
that.checkList = val ? [...that.checkListOpt] : [];
that.isIndeterminate = false;
that.checkListOpt.forEach((ele: any) => {
if (val) that.Mutil.visibleMarks(true, ele);
else that.Mutil.visibleMarks(false, ele);
});
}
creatWindowHtml(obj: any) {
console.log(obj);
let htmlA =
`<div class="windowDg"><h3>详细信息</h3>` +
`<p><span>名称:</span>${obj.goodsName}</p>` +
`<p><span>编号:</span>${obj.number}</p>` +
`<p><span>介绍:</span>${obj.goodsInfo}</p>` +
`<p><span>物品类型:</span>${obj.category}</p>` +
`<p><span>是否是重大危险源:</span>${
obj.isBigDanger == 1 ? "是" : "否"
}</p>` +
`<p><span>联系人:</span>${obj.contacts}</p>` +
`<p><span>联系电话:</span>${obj.phone}</p>` +
`<p><span>库存数量:</span>${obj.stockNum}</p>` +
`<p><span>类型:</span>${obj.category}</p>` +
`<p><span>仓库编号:</span>${obj.warehouseNum}</p>` +
`<p><span>危险等级:</span>${obj.dangerGrade}</p>` +
`<p><span>所在厂区位置:</span>${obj.factoryLocation}</p></div>`;
let htmlB =
`<div class="windowDg"><h3>详细信息</h3>` +
`<p><span>设备名称:</span>${obj.deviceName}</p>` +
`<p><span>设备编号:</span>${obj.deviceNumber}</p>` +
`<p><span>设备短号:</span>${obj.shortNum}</p>` +
`<p><span>设备介绍:</span>${obj.deviceInfo}</p>` +
`<p><span>设备IP:</span>${obj.deviceIp}</p>` +
`<p><span>是否是重大危险源:</span>${
obj.isBigDanger == 1 ? "是" : "否"
}</p>` +
`<p><span>联系人:</span>${obj.contacts}</p>` +
`<p><span>危险等级:</span>${obj.dangerGrade}</p>` +
`<p><span>所在位置:</span>${obj.factoryLocation}</p></div>`;
let html = obj.dataType == 5 || obj.dataType == 6 ? htmlB : htmlA;
return html;
}
getPopcon(id: any) {
let that = this,
aimArr = that.mapData.filter((ele: any) => ele.id == id);
let htmlcon = that.creatWindowHtml(aimArr[0]);
that.Mutil.addPopup(htmlcon, id, aimArr[0].longitude, aimArr[0].latitude);
}
created() {
(this as any).enterpriseId = this.$route.query.enterpriseId;
this.getDetail();
this.addMarksToMap();
}
mounted() {
let that = this;
that.mapLoadDone = true;
that.Mutil = new Mutil("mapbox");
that.MAP = that.Mutil.MAP;
that.Mutil.mapSelectBind((evt: any) => {
let id = evt.selected[0].get('did');
if (id) that.getPopcon(id);
})
}
}
</script>
<style lang="scss">
@import "@/utils/public.scss";
#mapbox {
width: 100%;
position: relative;
}
@media screen and (min-width: 1500px) {
#mapbox {
height: calc(100% - 46px);
}
}
@media screen and (max-width: 1500px) {
#mapbox {
height: calc(100% - 80px);
}
}
.enterDetail {
.el-row {
height: 100%;
}
}
main>div {
padding: 10px;
box-sizing: border-box;
}
.flexBox .flexBox-item:nth-child(2) {
padding-left: 10px;
border-left: 1px solid #eeeeee;
}
</style><style lang="scss" scoped>
.enterDetail {
border: none;
}
.enterDetail .enterDetail-item {
width: 100%;
}
</style>
<template>
<div class="camerasMg">
<el-row class="topBar">
<el-col>
<el-form :inline="true" :model="searchData">
<el-form-item label>
<el-input v-model="searchData.planTitle" placeholder="资源名称"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchFun()">
<i class="el-icon-search"></i> 搜索
</el-button>
<el-button type="primary" @click="resetFun()">
<i class="el-icon-refresh"></i> 重置
</el-button>
</el-form-item>
<el-form-item class="fr" v-if="qyvisble">
<el-button plain type="primary" @click="addFun()">
<i class="el-icon-plus"></i> 添加资源分类
</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="false">
<el-table-column width="50" type="index" label="序号"></el-table-column>
<el-table-column prop="planTitle" label="资源分类名称"></el-table-column>
<!--<el-table-column prop="planType" label="预案分类"></el-table-column>-->
<el-table-column prop="isReported" label="创建时间" v-if="qyvisble">
2021-10-20 11:11:22
</el-table-column>
<!-- <el-table-column prop="createTime" label="创建时间"></el-table-column> -->
<el-table-column label="操作" width="260" align="center">
<template slot-scope="scope">
<el-button @click="editFun(scope.row)" size="small" v-if="scope.row.checkStatus != 1">
<i class="el-icon-edit-outline"></i> 编辑
</el-button>
<el-button type="danger" @click="delFun(scope.row)" size="small" v-if="scope.row.checkStatus != 1">
<i class="el-icon-delete"></i> 删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="total,sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="PAGE.page"
:page-size="PAGE.size"
></el-pagination>
<PlansMgEdit
v-if="dialogVisible"
:dialogVisible="dialogVisible"
:editForm="formData"
:title="dialogTit"
@dialogFun="closeDialog"
@refreshTableData="getTableData"
:key="zjKey"
></PlansMgEdit>
</div>
</template>
<script lang="ts">
import { Component, Vue, Provide } from "vue-property-decorator";
import PlansMgEdit from "./guaranteeEdit.vue";
import PlansMgCheck from "./PlansMgCheck.vue";
import METHOD from "@/utils/methods";
@Component({
components: { PlansMgEdit}
})
export default class CamerasMg extends Vue {
@Provide() enterpriseId: String = "";
@Provide() signId: String = "";
@Provide() tableData: Object = { pageData: [], total: 0 };
@Provide() PAGE: any = { page: 1, size: 10 };
@Provide() searchData: any = {};
@Provide() loading: Boolean = false;
//编辑组件
@Provide() dialogVisible: Boolean = false;
@Provide() dialogTit: String = "新增预案";
@Provide() formData: Object = {};
@Provide() zjKey: any = 0;
@Provide() qyvisble: boolean = true;//政府端隐藏项
getTableData() {
let that = this,
param = Object.assign({enterpriseId: that.enterpriseId}, that.PAGE, that.searchData);
that.loading = true;
METHOD.axiosPost(
that,
`/planInfo/selectPlanInfoList`,
param,
function(res: any) {
that.loading = false;
if (res.code == 0) {
that.tableData = res.data;
}
}
);
}
searchFun() {
this.PAGE = { page: 1, size: 10 };
this.getTableData();
}
resetFun() {
this.PAGE = { page: 1, size: 10 };
this.searchData = {};
this.getTableData();
}
addFun() {
this.dialogTit = "新增预案";
this.zjKey++;
this.dialogVisible = true;
}
editFun(row: any) {
this.dialogTit = "编辑预案";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
detailFun(row: any){
this.dialogTit = "详情";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
delFun(row: any) {
let that = this as any;
METHOD.deleteFun(
that,
`/planInfo/deletePlanInfoById/${row.id}`,
function() {
that.getTableData();
}
);
}
handleSizeChange(val: any) {
this.PAGE.size = val;
this.getTableData();
}
handleCurrentChange(val: any) {
this.PAGE.page = val;
this.getTableData();
}
closeDialog() {
//关闭窗口
this.dialogVisible = false;
this.formData = {};
}
checkFile(url: any) {
window.open(METHOD.URL + url,'_blank')
}
fileUrl(url: any){
url = METHOD.URL + url;
}
created() {
this.enterpriseId = METHOD.enterpriseId;
// if( this.enterpriseId ){
// this.qyvisble = true;
// }else{
// this.qyvisble = false;
// }
this.getTableData();
}
}
</script>
<style lang="scss">
@import "@/utils/public.scss";
</style>
\ No newline at end of file
<template>
<div class="EnseList">
<div class="EnseList">
<el-row class="topBar">
<el-col>
<el-form :inline="true" :model="searchData">
<el-form-item>
<el-input v-model="searchData.unitName" placeholder="请输入企业名称"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="searchData.userName" placeholder="请输入用户名"></el-input>
<el-form-item label="">
<el-select v-model="searchData.materialType" placeholder="请选择资源类型">
<el-option label="救援物资" value="救援物资"></el-option>
<el-option label="专家资源" value="专家资源"></el-option>
<el-option label="救援队伍" value="救援队伍"></el-option>
<el-option label="避难场所" value="避难场所"></el-option>
<el-option label="防护目标" value="防护目标"></el-option>
<el-option label="医疗卫生单位" value="医疗卫生单位"></el-option>
<el-option label="通信保障机构" value="通信保障机构"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input v-model="searchData.orgCode" placeholder="请输入统一社会信用代码"></el-input>
</el-form-item>
<el-form-item>
<City @changeFun="changeFun" :valueqv="cityval"></City>
<el-form-item label="">
<el-input v-model="searchData.materialName" placeholder="请输入资源名称"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchFun()">
<i class="el-icon-search"></i> 搜索
......@@ -23,98 +26,139 @@
<i class="el-icon-refresh"></i> 重置
</el-button>
</el-form-item>
<el-form-item class="fr">
<el-button plain type="primary" @click="addFun()">
<i class="el-icon-plus"></i> 新增资源
</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="loading">
<el-table-column width="50" type="index" label="序号"></el-table-column>
<el-table-column prop="unitName" label="企业名称"></el-table-column>
<el-table-column prop="legalPerson" label="企业法人"></el-table-column>
<el-table-column prop="orgCode" label="统一社会信用代码"></el-table-column>
<el-table-column prop="legalPersonEmail" label="法人邮箱"></el-table-column>
<el-table-column prop="userName" label="管理员名称"></el-table-column>
<el-table-column prop="account" label="管理员账号"></el-table-column>
<el-table-column prop="status" label="账号状态">
<template slot-scope="scope">
<font v-if="scope.row.accountStatus === '0'" class="colorM">
<i class="iconfont iconzhengchang"></i> 正常
</font>
<font v-else-if="scope.row.accountStatus == 2" class="colorP">
<i class="iconfont iconsuoding"></i> 已锁定
</font>
<font v-else-if="scope.row.accountStatus == 1" class="colorR">
<i class="iconfont iconicon_huabanfuben"></i> 已删除
</font>
<font v-else-if="scope.row.accountStatus == 3" class="colorP">
<i class="iconfont iconshenhe"></i> 审核中
</font>
<font v-else-if="scope.row.accountStatus == 4" class="colorR">
<i class="iconfont iconweitongguo"></i> 审核未通过
</font>
</template>
<el-table-column prop="materialName" label="资源名称"></el-table-column>
<el-table-column prop="materialType" label="资源类型">
</el-table-column>
<el-table-column label="操作" width="170" align="center">
<el-table-column prop="num" label="资源数量"></el-table-column>
<el-table-column prop="address" label="地址"></el-table-column>
<el-table-column prop="contacts" label="联系人"></el-table-column>
<el-table-column prop="phone" label="电话"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<!-- <el-table-column prop="stockNum" label="库存数量"></el-table-column> -->
<!-- <el-table-column prop="dangerGrade" label="危险等级"></el-table-column> -->
<el-table-column label="操作" width="220" align="center">
<template slot-scope="scope">
<el-button type="success" size="small" @click="checkDetal(scope.row)">
<i class="el-icon-view"></i>查看详细
</el-button>
<el-button @click="editFun(scope.row)" size="small">编辑</el-button>
<el-button type="danger" @click="delFun(scope.row)" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="total,sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="PAGE.page"
:page-size="PAGE.size"
></el-pagination>
</div>
<el-pagination background layout="total,sizes, prev, pager, next, jumper" :total="tableData.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="PAGE.page" :page-size="PAGE.size"></el-pagination>
<SafetyDeviceMgEdit :dialogVisible="dialogVisible" :editForm="formData" :title="dialogTit" @dialogFun="closeDialog" @refreshTableData="getTableData" :key="zjKey"></SafetyDeviceMgEdit>
</div>
</template>
<script lang="ts">
import { Component, Vue, Provide } from "vue-property-decorator";
import City from "@/components/city.vue";
import {
Component,
Vue,
Provide
} from "vue-property-decorator";
import SafetyDeviceMgEdit from "./guaranteeEdit.vue";
import METHOD from "@/utils/methods";
@Component({
components: { City }
components: {
SafetyDeviceMgEdit
}
})
export default class EnterprisesMg extends Vue {
@Provide() tableData: Object = { pageData: [], total: 0 };
@Provide() PAGE: any = { page: 1, size: 10 };
@Provide() searchData: any = {};
export default class SafetyDeviceMg extends Vue {
@Provide() tableData: Object = {
pageData: [],
total: 0
};
@Provide() PAGE: any = {
page: 1,
size: 10
};
@Provide() searchData: any = {
deviceName: "",
deviceNumber: "",
shortNum: "",
dataType: '',
};
@Provide() loading: Boolean = false;
@Provide() cityval: any = [];
//编辑组件
@Provide() dialogVisible: Boolean = false;
@Provide() formData: any = { dataType: "", enterpriseId: "" };
@Provide() dialogTit: String = "新增";
@Provide() formData: any = {
dataType: "",
enterpriseId: ""
};
@Provide() zjKey: any = 0;
@Provide() enterpriseId: string = "all";
@Provide() dataType: string = "";
getTableData() {
let that = this,
param = Object.assign({accountStatus:'0'}, that.PAGE, that.searchData);
param = Object.assign({}, that.PAGE, that.searchData);
that.enterpriseId="all";
that.loading = true;
METHOD.axiosPost(
that,
`/enterpriseInfo/queryEnterpriseInfo`,
`/material/materialInfoList`,
param,
function(res: any) {
function (res: any) {
that.loading = false;
if (res.code == 0) {
that.tableData = res.data;
console.log(res.data)
}
}
);
}
searchFun() {
this.PAGE = { page: 1, size: 10 };
this.PAGE = {
page: 1,
size: 10
};
this.getTableData();
}
resetFun() {
this.PAGE = { page: 1, size: 10 };
this.searchData = { unitName: "" };
this.PAGE = {
page: 1,
size: 10
};
this.searchData = {
deviceName: "",
deviceNumber: "",
shortNum: "",
dataType: ''
};
this.getTableData();
this.cityval = [];
}
addFun() {
this.zjKey++;
this.dialogVisible = true;
//this.formData.dataType = this.searchData.dataType;
if(METHOD.enterpriseId){
this.formData.enterpriseId = METHOD.enterpriseId;
}
}
editFun(row: any) {
this.dialogTit = "编辑";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
delFun(row: any) {
let that = this as any;
METHOD.deleteFun(
this,
`/material/deleteMaterial/${row.id}`,
function () {
that.getTableData();
}
);
}
handleSizeChange(val: any) {
this.PAGE.size = val;
......@@ -133,21 +177,13 @@ export default class EnterprisesMg extends Vue {
this.searchData.dataType = val;
this.getTableData();
}
checkDetal(row: any) {
this.$router.push({path: '/EnDetail', query:{enterpriseId: row.enterpriseId} })
}
/*选择城市*/
changeFun(v: any) {
this.searchData.provinceId = v[0];
this.searchData.cityId = v[1];
this.searchData.countyId = v[2];
}
created() {
this.enterpriseId = METHOD.enterpriseId;
this.getTableData();
}
}
</script>
<style lang="scss" scoped>
@import "@/utils/public.scss";
<style lang="scss">
@import "@/utils/public.scss";
</style>
<template>
<div class="camerasMg">
<el-row class="topBar">
<el-col>
<el-form :inline="true" :model="searchData">
<el-form-item label>
<el-input v-model="searchData.materialName" placeholder="资源名称"></el-input>
</el-form-item>
<el-form-item label>
<el-select v-model="searchData.materialType" placeholder="资源分类">
<el-option label="救援物资" value="Ⅰ"></el-option>
<el-option label="专家资源" value="Ⅱ"></el-option>
<el-option label="救援队伍" value="Ⅲ"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchFun()">
<i class="el-icon-search"></i> 搜索
</el-button>
<el-button type="primary" @click="resetFun()">
<i class="el-icon-refresh"></i> 重置
</el-button>
</el-form-item>
<el-form-item class="fr" v-if="qyvisble">
<el-button plain type="primary" @click="addFun()">
<i class="el-icon-plus"></i> 添加应急资源
</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table :data="tableData.pageData" stripe border style="width:100%;" :loading="false">
<el-table-column width="50" type="index" label="序号"></el-table-column>
<el-table-column prop="materialName" label="资源名称"></el-table-column>
<el-table-column prop="materialType" label="资源分类">
</el-table-column>
<el-table-column prop="address" label="资源地址"></el-table-column>
<el-table-column prop="contacts" label="联系人"></el-table-column>
<el-table-column prop="phone" label="电话"></el-table-column>
<!--<el-table-column prop="planType" label="预案分类"></el-table-column>-->
<el-table-column prop="num" label="物资仓库数量">
</el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column> -->
<el-table-column label="操作" width="260" align="center">
<template slot-scope="scope">
<el-button type="primary" plain @click="detailFun(scope.row)" size="small" v-if="scope.row.checkStatus == 1">
<i class="el-icon-view"></i> 详情
</el-button>
<el-button @click="editFun(scope.row)" size="small" v-if="scope.row.checkStatus != 1">
<i class="el-icon-edit-outline"></i> 编辑
</el-button>
<el-button type="danger" @click="delFun(scope.row)" size="small" v-if="scope.row.checkStatus != 1">
<i class="el-icon-delete"></i> 删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="total,sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="PAGE.page"
:page-size="PAGE.size"
></el-pagination>
<PlansMgEdit
v-if="dialogVisible"
:dialogVisible="dialogVisible"
:editForm="formData"
:title="dialogTit"
@dialogFun="closeDialog"
@refreshTableData="getTableData"
:key="zjKey"
></PlansMgEdit>
</div>
</template>
<script lang="ts">
import { Component, Vue, Provide } from "vue-property-decorator";
import PlansMgEdit from "./guaranteeEdit.vue";
import PlansMgCheck from "./PlansMgCheck.vue";
import METHOD from "@/utils/methods";
@Component({
components: { PlansMgEdit}
})
export default class CamerasMg extends Vue {
@Provide() enterpriseId: String = "";
@Provide() signId: String = "";
@Provide() tableData: Object = { pageData: [], total: 0 };
@Provide() PAGE: any = { page: 1, size: 10 };
@Provide() searchData: any = {};
@Provide() loading: Boolean = false;
//编辑组件
@Provide() dialogVisible: Boolean = false;
@Provide() dialogTit: String = "新增应急物资";
@Provide() formData: Object = {};
@Provide() zjKey: any = 0;
@Provide() qyvisble: boolean = true;//政府端隐藏项
getTableData() {
let that = this,
param = Object.assign({enterpriseId: that.enterpriseId}, that.PAGE, that.searchData);
that.loading = true;
METHOD.axiosPost(
that,
`/material/materialInfoList`,
param,
function(res: any) {
that.loading = false;
if (res.code == 0) {
that.tableData = res.data;
console.log(that.tableData)
}
}
);
}
searchFun() {
this.PAGE = { page: 1, size: 10 };
this.getTableData();
}
resetFun() {
this.PAGE = { page: 1, size: 10 };
this.searchData = {};
this.getTableData();
}
addFun() {
this.dialogTit = "新增应急物资";
this.zjKey++;
this.dialogVisible = true;
}
editFun(row: any) {
this.dialogTit = "编辑应急物资";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
detailFun(row: any){
this.dialogTit = "详情";
this.formData = Object.assign({}, row);
this.zjKey++;
this.dialogVisible = true;
}
delFun(row: any) {
let that = this as any;
METHOD.deleteFun(
that,
`/planInfo/deletePlanInfoById/${row.id}`,
function() {
that.getTableData();
}
);
}
handleSizeChange(val: any) {
this.PAGE.size = val;
this.getTableData();
}
handleCurrentChange(val: any) {
this.PAGE.page = val;
this.getTableData();
}
closeDialog() {
//关闭窗口
this.dialogVisible = false;
this.formData = {};
}
checkFile(url: any) {
window.open(METHOD.URL + url,'_blank')
}
fileUrl(url: any){
url = METHOD.URL + url;
}
created() {
this.enterpriseId = METHOD.enterpriseId;
// if( this.enterpriseId ){
// this.qyvisble = true;
// }else{
// this.qyvisble = false;
// }
this.getTableData();
}
}
</script>
<style lang="scss">
@import "@/utils/public.scss";
</style>
\ No newline at end of file
<template>
<div class="wrapper editwrap">
<el-dialog
:visible.sync="dialogVisible"
:title="title"
:show-close="false"
:close-on-click-modal="false"
>
<el-form ref="editForm" :model="editForm" :rules="rules" label-width="106px">
<el-form-item label="资源名称" prop="materialName">
<el-input v-model="editForm.materialName"></el-input>
</el-form-item>
<!--<el-form-item label="资源类型" prop="materialType">-->
<!--<el-input v-model="editForm.materialType"></el-input>-->
<!--</el-form-item>-->
<el-form-item label="资源类型" prop="materialType">
<el-select v-model="editForm.materialType" placeholder="请选择资源类型">
<el-option label="救援物资" value="救援物资"></el-option>
<el-option label="专家资源" value="专家资源"></el-option>
<el-option label="救援队伍" value="救援队伍"></el-option>
<el-option label="避难场所" value="避难场所"></el-option>
<el-option label="防护目标" value="防护目标"></el-option>
<el-option label="医疗卫生单位" value="医疗卫生单位"></el-option>
<el-option label="通信保障机构" value="通信保障机构"></el-option>
</el-select>
</el-form-item>
<el-form-item label="资源数量" prop="num">
<el-input v-model="editForm.num"></el-input>
</el-form-item>
<p style="color: #F56C6C;float: left;position: relative;left: 45px;">*</p>
<el-form-item label="经纬度">
<el-row>
<el-col :span="8">
<!--<el-input v-model="editForm.longitude"></el-input>-->
<el-form-item prop="longitude" style="margin-right: 9px">
<el-input v-model="editForm.longitude"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="latitude" style="margin-right: 9px">
<el-input v-model="editForm.latitude"></el-input>
</el-form-item>
<!--<el-input v-model="editForm.latitude"></el-input>-->
</el-col>
<el-col :span="6">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="详细地址" prop="address">
<el-input v-model="editForm.address"></el-input>
</el-form-item>
<el-form-item label="联系人" prop="contacts">
<el-input v-model="editForm.contacts"></el-input>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="editForm.phone"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="confirmFun('editForm')">确定</el-button>
<el-button @click="$emit('dialogFun')" size="small">取消</el-button>
</span>
</el-dialog>
<Mapdialog
v-if="loadmap"
:dialogTableVisible="dialogTableVisible"
@dialogcancelFun="dialogcancelFun"
:slat="editForm.latitude"
:slng="editForm.longitude"
@confirm="qrFun"
/>
</div>
</template>
<style lang="scss">
</style>
<script lang="ts">
import { Component, Vue, Provide, Prop, Watch } from "vue-property-decorator";
import { State, Getter, Mutation, Action } from "vuex-class";
import Mapdialog from "@/components/maplnglat.vue";
import METHOD from "@/utils/methods";
@Component({
components: { Mapdialog }
})
export default class SafetyDeviceMgEdit extends Vue {
//属性或参数中使用!:表示强制解析(告诉typescript编译器,这里一定有值),常用于vue-decorator中的@Prop
@Prop(Boolean) dialogVisible!: Boolean;
@Provide() loading: Boolean = false;
@Prop(Object) editForm!: {
deviceName: String;
longitude: Number;
latitude: Number;
dataType: String;
enterpriseId: String;
};
@Prop(String) title!: String;
// @Provide() editForm: any = {};
@Provide() enterpriseList: any = [];
@Provide() qvvalue: any = []; //区域值
@Provide() signsArr: any = []; //图例list
@Provide() dialogTableVisible: Boolean = false;
@Provide() rules: any = {
materialName: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
materialType: [
{ required: true, trigger: "blur", message: "该项为必填项!" }
],
contacts: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
num: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
/*isBigDanger: [
{ required: true, trigger: "blur", message: "该项为必填项!" }
],
dangerGrade: [
{ required: true, trigger: "blur", message: "该项为必填项!" }
],*/
phone: [
{ required: true, trigger: "blur", message: "该项为必填项!" }
],
longitude: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
latitude: [{ required: true, trigger: "blur", message: "该项为必填项!" }]
};
@Provide() loadmap: Boolean = false;
@Provide() play: Boolean = false;
@Provide() enterpriseId: string = "dbe0c3268a3c4911913f35a2fdcd0e3e";
qrFun(v: any) {
//确认选择经纬度
this.editForm.longitude = v.lng;
this.editForm.latitude = v.lat;
}
MapdialogFun() {
this.loadmap = false;
this.$nextTick(() => {
this.loadmap = true;
});
this.dialogTableVisible = true;
}
dialogcancelFun() {
this.dialogTableVisible = false;
}
//取消事件要在父级取消是所以用到 $emit
confirmFun(formName: string) {
let that = this,
params = that.editForm;
(that as any).$refs[formName].validate((valid: boolean) => {
if (valid) {
METHOD.axiosPost(
that,
`/material/addMaterInfo`,
params,
function(res: any) {
if (res.code == 0) {
(that as any).$emit("dialogFun");
(that as any).$message({
message: "操作成功!",
type: "success"
});
that.$emit("refreshTableData"); //刷新表格
}
}
);
} else {
return false;
}
});
}
getnterpriseListInfo() {
let that = this,
param ={accountStatus:'0'};
that.loading = true;
METHOD.axiosPost(
that,
`/enterpriseInfo/queryEnterpriseListInfo`,
param,
function(res: any) {
that.loading = false;
if (res.code == 0) {
that.enterpriseList = res.data;
}
}
);
}
getnterpriseListInfo() {
let that = this,
param ={accountStatus:'0'};
that.loading = true;
METHOD.axiosPost(
that,
`/enterpriseInfo/queryEnterpriseListInfo`,
param,
function(res: any) {
that.loading = false;
if (res.code == 0) {
that.enterpriseList = res.data;
}
}
);
}
seletChange(enterpriseId: any) {
let that = this,
arr;
arr = that.enterpriseList.filter((ele: any) => enterpriseId == ele.enterpriseId);
that.editForm.enterpriseListId = arr[0].enterpriseId;
}
created() {
//this.editForm = this.editFormData;
if(METHOD.enterpriseId){
this.enterpriseId = METHOD.enterpriseId;
}else{
//政府用户
this.play = true;
this.getnterpriseListInfo();
}
}
}
</script>
<style lang="scss">
@import "@/utils/public.scss";
</style>
......@@ -24,7 +24,20 @@
style="width: 500px;height: 100%;z-index: 11;background-color: rgba(2, 40, 90, 0.7);position: absolute;top: 0;left: 10px;float: left;">
<QyMapone></QyMapone>
</div>
<div class="markBox">
<div class="markBox" style="height: 300px">
<div class="markbox-div">
<el-tooltip content="应急资源" placement="left" effect="light">
<div class="markbox-click" ref="maimg" @click="mapma" style="position: relative;">
<img width="15px" style="margin-top: 10px;" src="@/assets/mark/markjk.png" />
<img src="@/assets/mark/selected.png" alt=""
style="position: absolute;width: 16px; top: 0;right: 0">
</div>
</el-tooltip>
</div>
<div class="markbox-span">
<span>{{materialData.total}}</span>
</div>
<div class="markbox-div">
<el-tooltip content="企业注册" placement="left" effect="light">
<div class="markbox-click" ref="qyimg" @click="mapqiye" style="position: relative;">
......@@ -174,6 +187,10 @@
@Provide() MAP: any;
@Provide() isShowVideo: boolean = false;
@Provide() player: any;
@Provide() PAGE: any = {
page: 1,
size: 1000
};
@Provide() mapOption = {
plugin: [{
pName: "MapType",
......@@ -195,11 +212,14 @@
@Provide() markers1: any = [];
@Provide() markers2: any = [];
@Provide() markers3: any = [];
@Provide() markers4: any = [];
@Provide() mapData: any = [];
@Provide() windowsArr: any = [];
@Provide() windowsArr1: any = [];
@Provide() windowsArr2: any = [];
@Provide() windowsArr3: any = [];
@Provide() windowsArr4: any = [];
@Provide() materialData: any = [];
@Provide() currentWindow: any = "";
// @Provide() searchOption: any = {
// city: "石家庄",
......@@ -215,6 +235,7 @@
@Provide() tjNumberObj: any = {};
@Provide() deviceVideo: any = {};
@Provide() qiyeVisble: boolean = true;
@Provide() maVisble: boolean = true;
@Provide() wxyVisble: boolean = true;
@Provide() shipinVisble: boolean = true;
@Provide() weihaiVisble: boolean = true;
......@@ -298,6 +319,31 @@
}
);
}
getMaterialWindow(id: string) {
let that = this;
console.log('----------------------'+id);
(window as any).checkDetail = function (param: string) {
that.$router.push({
path: "/EnDetail",
query: {
enterpriseId: param
}
});
};
let obj = that.materialData.pageData[id-1],
html =
`<div class="windowDg"><h3>应急资源详细信息</h3>` +
`<p><span>资源名称:</span>${obj.materialName}</p>` +
`<p><span>资源类型:</span>${obj.materialType}</p>` +
`<p><span>数量:</span>${obj.num}</p>` +
`<p><span>地址:</span>${obj.address}</p>` +
`<p><span>联系人:</span>${obj.contacts}</p>` +
`<p><span>联系方式:</span>${obj.phone}</p>` +
`</div>`;
that.Mutil.addPopup(html, obj.id, obj.longitude, obj.latitude)
}
getWxyWindowInfo(goodsId: string) {
let that = this;
(window as any).dialogVisible1Change = function () {
......@@ -376,6 +422,42 @@
}
this.isShowVideo = false;
}
addMaterialMark(obj: any, index: any) {
let icon,
that = this;
icon = require("@/assets/mark/markjk.png");
let option = {
position: [Number(obj.longitude), Number(obj.latitude)],
content: ` <img src="${icon}" width="25">`,
label: {
content: obj.materialName,
offset: [28, -7]
},
offset: [-13, -2],
events: {
click: (e: any) => {
that.windowsArr4.forEach((ele: any) => {
// console.log(ele,"ele")
ele.visible = false;
});
that.$nextTick(() => {
// console.log(ele,"ele")
that.currentWindow = that.windowsArr4[index];
that.currentWindow.visible = true;
});
},
},
visible: true,
};
that.Mutil.addMarkerToMap(
'material',
obj.materialName,
icon,
[obj.longitude, obj.latitude],
0.4,
index+1
);
}
addMark(obj: any, index: any) {
let icon,
that = this;
......@@ -523,6 +605,13 @@
that.markers[index].visible = false;
}
});
that.matermapData.forEach((ele: any, index: any) => {
if (ele.dataType == v || v == 0) {
that.markers4[index].visible = true;
} else {
that.markers4[index].visible = false;
}
});
that.wxymapData.forEach((ele: any, index: any) => {
if (ele.dataType == v || v == 0) {
that.markers1[index].visible = true;
......@@ -571,6 +660,10 @@
let that = this;
that.getWindowInfo(qyid);
}
getMaterialinfo(maid: any) {
let that = this;
that.getMaterialWindow(maid);
}
getWxyPopcon(wxyid: any) {
let that = this;
that.getWxyWindowInfo(wxyid);
......@@ -585,6 +678,7 @@
}
created() {
this.getMapData();
this.getMaterial();
}
cancel(){
this.goods={};
......@@ -662,6 +756,7 @@
that.Mutil = new Mutil("mapbox");
that.MAP = that.Mutil.MAP;
that.Mutil.mapSelectBind((evt: any) => {
console.log(evt.selected[0].get("type"))
//这是地图marker点击回调监听
if (evt.selected[0].get('type') === 'qiye') {
that.Mutil.closeAllOverlays();
......@@ -679,6 +774,10 @@
that.Mutil.closeAllOverlays();
let id = evt.selected[0].get('did');
if (id) that.getyinhuanPopcon(id);
}else if(evt.selected[0].get('type') === 'material'){
that.Mutil.closeAllOverlays();
let id = evt.selected[0].get('did');
if (id) that.getMaterialinfo(id);
}
......@@ -699,6 +798,19 @@
this.$refs.qyimg.lastChild.style.display = "block";
}
}
mapma(){
if (this.maVisble) {
this.Mutil.visibleMarks(false, "material");
this.maVisble = false;
this.$refs.maimg.lastChild.style.display = "none";
} else {
this.Mutil.visibleMarks(true, "material");
this.maVisble = true;
this.$refs.maimg.lastChild.style.display = "block";
}
}
// mapbox(){
// let that = this;
......@@ -743,6 +855,36 @@
// this.zjKey++;
// this.dialogVisible = true;
// }
getMaterial(){
let that = this;
var param = Object.assign({}, that.PAGE, );
METHOD.axiosPost(
that,
`/material/materialInfoList`,
param,
function (res: any) {
that.materialData = res.data;
if (res.code == 0&& res.data.pageData.length > 0) {
that.matermapData = res.data.pageData;
let latSum = 0;
let lngSum = 0;
that.matermapData.forEach((ele: any, index: any) => {
that.addMaterialMark(ele, index);
//that.addMark(ele,index);
lngSum += ele.longitude;
latSum += ele.latitude;
});
let center = [
lngSum / that.matermapData.length,
latSum / that.matermapData.length,
];
that.Mutil.setViewF({
center: center
})
}
}
);
}
getStatiData() {
let that = this;
METHOD.axiosPost(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment