Commit b09dfbf0 authored by Your Name's avatar Your Name

fix:修改地图图标

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