Commit 7b28d70e authored by 纪泽龙's avatar 纪泽龙

燃气公司显示

parent 785cd613
......@@ -5,10 +5,10 @@ ENV = 'development'
VUE_APP_BASE_API = '/dev-api'
#地图中心
VUE_APP_MAP_CENTER = '石家庄'
VUE_APP_MAP_CENTER = '平山'
#代理地址
VUE_APP_TARGET = 'http://36.148.23.59:8901/gassafety'
VUE_APP_TARGET = 'http://36.148.1.253:8092/gassafety'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
......@@ -8,6 +8,6 @@ VUE_APP_BASE_API = '/prod-api'
VUE_APP_MAP_CENTER = '平山'
#代理地址
VUE_APP_TARGET = 'http://36.148.23.59:8905/gassafety'
VUE_APP_TARGET = 'http://36.148.1.253:8092/gassafety'
port = 8092
......@@ -150,12 +150,12 @@
<div class="comp-wrapper">
<div
class="comp"
:class="{ active: compChangeArr.indexOf(item) >= 0 }"
:class="{ active: compChangeArr.indexOf(item.infoId) >= 0 }"
v-for="item in comp"
:key="item"
@click="compChange(item)"
:key="item.infoId"
@click="compChange(item.infoId)"
>
{{ item }}
{{ item.unitName }}
</div>
</div>
......@@ -182,7 +182,7 @@
{{ item.label }}
</div>
<!-- 有多少设备 -->
<div class="diviceNum">({{allList[index].length}})个设备</div>
<div class="diviceNum">({{ allList[index].length }})个设备</div>
<!-- 对钩 -->
<i class="el-icon-check bingo"></i>
<!-- <i class="ju"></i> -->
......@@ -360,6 +360,7 @@ import Right from "./components/Right.vue";
import CreateWork from "./components/CreateWork.vue";
import CreateWorkTrouble from "./components/CreateWorkTrouble.vue";
import { getInspectorLocations } from "@/api/inspectorLocation/location";
import { listInfo } from "@/api/enterprise/info";
import { lineColor } from "@/utils/mapCommon.js";
export default {
......@@ -389,7 +390,7 @@ export default {
createValue: 0,
createLabel: "新增",
//所有燃气公司
comp: ["公司A", "公司B", "公司C", "公司C", "123"],
comp: [{ infoId: 123, unitName: "公司A" }],
// 公司被选中状态
compChangeArr: [],
......@@ -504,6 +505,8 @@ export default {
this.onResize();
window.removeEventListener("resize", this.onResize);
window.addEventListener("resize", this.onResize);
// 公司列表
this.getCompList();
this.initMap();
// });
},
......@@ -549,6 +552,7 @@ export default {
this.rightBottomData();
// this.backFlag = false;
},
// 更改卫星图
mapChange(num) {
if (num == 1) {
......@@ -558,7 +562,19 @@ export default {
}
this.gaoMap.changeMap(this.mapStyle);
},
// 获取燃气公司列表
getCompList() {
listInfo().then((res) => {
console.log("公司列表", res.rows);
this.comp=res.rows.map((item) => {
const { infoId, unitName } = item;
return {
infoId,
unitName
};
});
});
},
// 获取地图上的资源
getResource() {
this.getDeviceInfo()
......@@ -1945,7 +1961,7 @@ input[type="radio"] {
// position: fixed;
width: 340px;
// margin-left: 20px;
margin-top: 35px;
margin-top: 15px;
// box-sizing: border-box;
.box-wrapper {
width: 340px;
......
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