Commit 6963add5 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 5fa8f6f0 be651873
...@@ -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,8 +12,8 @@ ...@@ -13,8 +12,8 @@
: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'/> -->
<!--marker --> <!--marker -->
...@@ -114,7 +113,7 @@ import { AMapManager, lazyAMapApiLoaderInstance } from "vue-amap"; ...@@ -114,7 +113,7 @@ import { AMapManager, lazyAMapApiLoaderInstance } from "vue-amap";
let amapManager = new AMapManager(); let amapManager = new AMapManager();
export default { export default {
name: "MapList", name: "MapList",
props: { props: {
value: { value: {
type: Boolean, type: Boolean,
...@@ -140,23 +139,20 @@ export default { ...@@ -140,23 +139,20 @@ 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);
this.markersData = data; this.markersData = data;
this.markersData.map((item) => { this.markersData.map((item) => {
this.setMarker(item); this.setMarker(item);
...@@ -178,11 +174,11 @@ export default { ...@@ -178,11 +174,11 @@ export default {
extData: item, extData: item,
events: { events: {
click: (e) => { click: (e) => {
// console.log("getExtData", e.target.getExtData()); // console.log("getExtData", e.target.getExtData());
let exData = e.target.getExtData(); let exData = e.target.getExtData();
this.info = exData.extData; this.info = exData.extData;
this.window.position = exData.position; this.window.position = exData.position;
this.window.visible = false; this.window.visible = false;
this.$nextTick(() => { this.$nextTick(() => {
this.window.visible = true; //点击点坐标,出现信息窗体 this.window.visible = true; //点击点坐标,出现信息窗体
...@@ -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>
...@@ -431,13 +451,13 @@ export default { ...@@ -431,13 +451,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);
...@@ -1104,6 +1124,10 @@ export default { ...@@ -1104,6 +1124,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 }" />
</div>
<router-view :class="{'active': !isOpen}" />
</div>
</template> </template>
<script> <script>
import LayoutHeader from "../components/Header"; import LayoutHeader from "../components/Header";
...@@ -16,48 +18,48 @@ const isPC = /(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent); ...@@ -16,48 +18,48 @@ const isPC = /(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent);
const MenuPage = "top"; const MenuPage = "top";
export default { export default {
components: { components: {
LayoutHeader, LayoutHeader,
LayoutHeaderLeft, LayoutHeaderLeft,
}, },
data() { data() {
return { return {
isOpen: isPC, isOpen: isPC,
menuPage: MenuPage, menuPage: MenuPage,
}; };
}, },
computed: { computed: {
menuPageCss() { menuPageCss() {
//左面和顶面菜单切换时,动态计划相关css参数 //左面和顶面菜单切换时,动态计划相关css参数
return { return {
"--padding-top": this.menuPage === "left" ? "60px" : "0px", "--padding-top": this.menuPage === "left" ? "60px" : "0px",
"--margin-left": this.menuPage === "left" ? "200px" : "0px", "--margin-left": this.menuPage === "left" ? "200px" : "0px",
}; };
},
}, },
methods: { },
toggle() { methods: {
this.isOpen = !this.isOpen; toggle() {
}, this.isOpen = !this.isOpen;
}, },
},
}; };
</script> </script>
<style lang="less"> <style lang="less">
.page { .page {
min-height: calc(100vh - 100px); min-height: calc(100vh - 100px);
width: 100%; width: 100%;
position: relative; position: relative;
background: #fff; background: #fff;
padding: var(--padding-top) 5px 5px 5px; padding: var(--padding-top) 5px 5px 5px;
margin-left: 60px; margin-left: 60px;
&.active { &.active {
margin-left: var(--margin-left); margin-left: var(--margin-left);
} }
} }
.page-layout { .page-layout {
background: #eee; background: #eee;
} }
</style> </style>
......
...@@ -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,11 @@ module.exports = { ...@@ -17,7 +17,11 @@ module.exports = {
hot: true,//自动保存 hot: true,//自动保存
proxy: { proxy: {
'/m': { '/m': {
<<<<<<< HEAD
target: 'http://192.168.0.98:11078',
=======
target: 'http://localhost:18222', target: 'http://localhost:18222',
>>>>>>> ad2b523910bb4a6a40f0558c71647fb6ec299e09
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