Commit b09dfbf0 authored by Your Name's avatar Your Name

fix:修改地图图标

parent 3234e8d6
......@@ -2,7 +2,6 @@
<template>
<div class="my-map">
<el-amap
ref="map"
vid="amapDemo"
......@@ -13,8 +12,8 @@
:events="events"
class="amap-demo"
>
<div class="tuli" ><slot name="leftTop"></slot></div>
<div class="tuli"><slot name="leftTop"></slot></div>
<!-- <el-amap-search-box :on-search-result="onSearchResult" :events='searchEvents'/> -->
<!--marker -->
......@@ -114,7 +113,7 @@ import { AMapManager, lazyAMapApiLoaderInstance } from "vue-amap";
let amapManager = new AMapManager();
export default {
name: "MapList",
name: "MapList",
props: {
value: {
type: Boolean,
......@@ -140,23 +139,20 @@ export default {
},
},
created() {
this.refresh( this.markersData)
this.refresh(this.markersData);
},
methods: {
formatterDate,
contentRender(h, params){
let value="el-icon-location-information"
let style="font-size:40px,color-red"
return (<i class={value} style="font-size:40px;color:deepskyblue" />)
contentRender(h, params) {
return <img src={require("../assets/images/d.png")} />;
},
getDeviceDetial(){
this.$emit("choose", this.info, (val) => {
getDeviceDetial() {
this.$emit("choose", this.info, (val) => {
console.log("callback:" + val);
});
},
refresh(data) {
// console.log("刷新数据", data);
// console.log("刷新数据", data);
this.markersData = data;
this.markersData.map((item) => {
this.setMarker(item);
......@@ -178,11 +174,11 @@ export default {
extData: item,
events: {
click: (e) => {
// console.log("getExtData", e.target.getExtData());
// console.log("getExtData", e.target.getExtData());
let exData = e.target.getExtData();
this.info = exData.extData;
this.window.position = exData.position;
this.window.visible = false;
this.$nextTick(() => {
this.window.visible = true; //点击点坐标,出现信息窗体
......@@ -326,6 +322,8 @@ export default {
});
},
},
// 单位按钮
showButton: false,
},
// {
// // 工具栏
......@@ -371,13 +369,13 @@ export default {
</script>
<style lang="less">
.tuli{
.tuli {
width: 300px;
top: 20px;
left: 34px;
position: absolute;
float: left;
background-color:rgba(255, 255, 255, 0.7);
background-color: rgba(255, 255, 255, 0.7);
}
.amap-info-content {
position: relative;
......
......@@ -7,6 +7,7 @@
vid="amapDetail"
:amap-manager="amapManager"
:center="center"
expandZoomRange
:zoom="20"
:pitch="65"
:rotation="45"
......@@ -72,10 +73,9 @@ export default {
formatterDate,
contentRender(h, params) {
//console.log(params.extData.extData.productId)
let value =
"el-icon-location-information location" +
params.extData.extData.productId;
return <i class={value} />;
let value = params.extData.extData.productName;
console.log(">>>", params);
return <img src={require(`../assets/images/${value}.png`)} />;
},
getDeviceDetial() {
//获取设备列表
......@@ -182,7 +182,7 @@ export default {
}
.my-map {
width: 100%;
height: 100vh;
height: 93vh;
.amap-demo {
position: relative;
width: 100%;
......
......@@ -369,13 +369,18 @@
:gutter="20"
>
<el-col :span="12">
<!-- 设备总量 -->
<!-- 设备数据 -->
<el-card class="box-card">
<div id="deviceTotal" style="width: 100%; height: 300px"></div>
<!-- 天数选择 -->
<el-select class="change-day" size="mini" placeholder="请选择">
<el-option label="近15天" :value="day15"> </el-option>
<el-option label="近30天" :value="day30"> </el-option>
<el-select
class="change-day"
v-model="myEchartsDay"
size="mini"
placeholder="请选择"
>
<el-option label="近15天" :value="15"> </el-option>
<el-option label="近30天" :value="30"> </el-option>
</el-select>
</el-card>
</el-col>
......@@ -384,9 +389,14 @@
<el-card class="box-card">
<div id="deviceStat" style="width: 100%; height: 300px"></div>
<!-- 天数选择 -->
<el-select class="change-day" size="mini" placeholder="请选择">
<el-option label="近15天" :value="day15"> </el-option>
<el-option label="近30天" :value="day30"> </el-option>
<el-select
class="change-day"
size="mini"
placeholder="请选择"
v-model="deviceStatEchartsDay"
>
<el-option label="近15天" :value="15"> </el-option>
<el-option label="近30天" :value="30"> </el-option>
</el-select>
</el-card>
</el-col>
......@@ -402,9 +412,14 @@
<div id="deviceAlarm" style="width: 70%; height: 300px"></div>
<div id="PieEcharts" style="width: 30%; height: 300px"></div>
<!-- 天数选择 -->
<el-select class="change-day" size="mini" placeholder="请选择">
<el-option label="近15天" :value="day15"> </el-option>
<el-option label="近30天" :value="day30"> </el-option>
<el-select
class="change-day"
v-model="deviceAlarmEchartsDay"
size="mini"
placeholder="请选择"
>
<el-option label="近15天" :value="15"> </el-option>
<el-option label="近30天" :value="30"> </el-option>
</el-select>
</el-card>
</el-col>
......@@ -413,9 +428,14 @@
<el-card class="box-card">
<div id="devicePush" style="width: 100%; height: 300px"></div>
<!-- 天数选择 -->
<el-select class="change-day" size="mini" placeholder="请选择">
<el-option label="近15天" :value="day15"> </el-option>
<el-option label="近30天" :value="day30"> </el-option>
<el-select
class="change-day"
v-model="devicePushEchartsDay"
size="mini"
placeholder="请选择"
>
<el-option label="近15天" :value="15"> </el-option>
<el-option label="近30天" :value="30"> </el-option>
</el-select>
</el-card>
</el-col>
......@@ -430,13 +450,13 @@ export default {
return this.$store.state.userData.currUserName;
},
// 近15天时间
day15() {
return this.$moment().add(-15, "d").format("YYYY-MM-DD HH:mm:ss");
},
// day15() {
// return this.$moment().add(-15, "d").format("YYYY-MM-DD HH:mm:ss");
// },
// 近30天时间
day30() {
return this.$moment().add(-30, "d").format("YYYY-MM-DD HH:mm:ss");
},
// day30() {
// return this.$moment().add(-30, "d").format("YYYY-MM-DD HH:mm:ss");
// },
},
mounted() {
this.timer = setInterval(this.syncDeviceStat, 1000 * 120);
......@@ -1128,6 +1148,10 @@ export default {
},
dict: {},
value: new Date(),
myEchartsDay: 15, // 设备数据天数选择
deviceStatEchartsDay: 15, // 设备状态天数选择
deviceAlarmEchartsDay: 15, // 设备告警天数选择
devicePushEchartsDay: 15, // 消息推送天数选择
};
},
};
......
<template>
<div :style="menuPageCss" class="pages page-layout">
<LayoutHeader v-if="menuPage!=='left'"></LayoutHeader>
<LayoutHeaderLeft @toggle="toggle" :isOpen="isOpen" v-if="menuPage==='left'" />
<div :style="menuPageCss" class="pages page-layout">
<LayoutHeader v-if="menuPage !== 'left'"></LayoutHeader>
<LayoutHeaderLeft
@toggle="toggle"
:isOpen="isOpen"
v-if="menuPage === 'left'"
/>
<router-view :class="{'active': !isOpen}" />
</div>
<router-view :class="{ active: !isOpen }" />
</div>
</template>
<script>
import LayoutHeader from "../components/Header";
......@@ -16,48 +18,48 @@ const isPC = /(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent);
const MenuPage = "top";
export default {
components: {
LayoutHeader,
LayoutHeaderLeft,
},
data() {
return {
isOpen: isPC,
menuPage: MenuPage,
};
},
computed: {
menuPageCss() {
//左面和顶面菜单切换时,动态计划相关css参数
return {
"--padding-top": this.menuPage === "left" ? "60px" : "0px",
"--margin-left": this.menuPage === "left" ? "200px" : "0px",
};
},
components: {
LayoutHeader,
LayoutHeaderLeft,
},
data() {
return {
isOpen: isPC,
menuPage: MenuPage,
};
},
computed: {
menuPageCss() {
//左面和顶面菜单切换时,动态计划相关css参数
return {
"--padding-top": this.menuPage === "left" ? "60px" : "0px",
"--margin-left": this.menuPage === "left" ? "200px" : "0px",
};
},
methods: {
toggle() {
this.isOpen = !this.isOpen;
},
},
methods: {
toggle() {
this.isOpen = !this.isOpen;
},
},
};
</script>
<style lang="less">
.page {
min-height: calc(100vh - 100px);
width: 100%;
min-height: calc(100vh - 100px);
width: 100%;
position: relative;
background: #fff;
padding: var(--padding-top) 5px 5px 5px;
margin-left: 60px;
&.active {
margin-left: var(--margin-left);
}
position: relative;
background: #fff;
padding: var(--padding-top) 5px 5px 5px;
margin-left: 60px;
&.active {
margin-left: var(--margin-left);
}
}
.page-layout {
background: #eee;
background: #eee;
}
</style>
......
......@@ -432,7 +432,12 @@ export default {
},
],
columns: [
{ type: "selection", reserveSelection: true, width: 60 },
{
type: "selection",
align: "center",
reserveSelection: true,
width: 60,
},
{ type: "index", label: "序号", align: "center", width: 50 },
{ label: "设备名称", align: "center", prop: "deviceName" },
......@@ -453,7 +458,7 @@ export default {
align: "center",
prop: "deviceFirmId",
formatter: this.formatter,
width: 150,
width: 250,
},
{ label: "负责人", align: "center", prop: "leadingOfficial" },
{
......
......@@ -165,7 +165,12 @@ export default {
},
],
columns: [
{ type: "selection", reserveSelection: true, width: 60 },
{
type: "selection",
align: "center",
reserveSelection: true,
width: 60,
},
{
type: "index",
align: "center",
......
......@@ -140,19 +140,17 @@
style="border-bottom: 1px solid #e8eaec; padding: 10px"
justify="space-between"
>
<i
style="font-size: 20px"
v-bind:class="[true ? 'location' + value : '']"
class="el-icon-location-information"
></i>
<!-- <img src="../../assets/images/排队机.png" alt="" /> -->
<img :src="require(`../../assets/images/${label}.png`)" />
<!-- <i style="font-size: 20px" class="el-icon-location-information"></i> -->
<span style="font-size: 12px">{{ label }}</span>
<el-switch
v-model="items[index]"
:active-value="value"
:inactive-value="0"
@change="switchChange"
active-color="#13ce66"
inactive-color="#ff4949"
active-color="#2882ED"
inactive-color="#8C8B8E"
>
</el-switch>
</el-row>
......@@ -252,7 +250,6 @@ export default {
afterRender(data) {
console.log("tableData", data);
if (!this.sync) {
console.log("sync");
this.$nextTick(() => {
var count = 0;
for (var i in data.dict.productId) {
......
......@@ -17,7 +17,7 @@ module.exports = {
hot: true,//自动保存
proxy: {
'/m': {
target: 'http://192.168.0.98:11091',
target: 'http://192.168.0.98:11078',
changeOrigin: true,
secure: false,
cookieDomainRewrite: 'plm.testnew.com',
......
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