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

燃气公司显示

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