Commit 0e64fad7 authored by xiexingan's avatar xiexingan

tj

parent 41bb57b3
......@@ -7,9 +7,9 @@ CONFIG.TITLE = '拉灵线-山南站AI节能系统'
// CONFIG.requestPath = 'http://localhost:8046'
CONFIG.requestPath = 'http://10.20.72.31:8046'
// CONFIG.requestPath = 'http://59.110.43.122:8046'
// CONFIG.requestPath = 'http://10.20.72.31:8046'
CONFIG.requestPath = 'http://59.110.43.122:8046'
// 文件上传
CONFIG.urlPath = 'http://10.20.72.31/'
// CONFIG.urlPath = 'http://59.110.43.122/'
// CONFIG.urlPath = 'http://10.20.72.31/'
CONFIG.urlPath = 'http://59.110.43.122/'
......@@ -10,7 +10,11 @@
<div class="d2-layout-header-aside-content" flex="dir:top">
<!-- 顶栏 -->
<div class="d2-theme-header" flex-box="0" flex>
<div class="logo-group" :style="{ width: asideWidth }" flex-box="0">
<div
class="logo-group"
:style="{ width: asideWidth }"
flex-box="0"
>
<img src="./imgs/logo2.png" />
</div>
<div style="width: 100%">
......@@ -18,8 +22,12 @@
<!-- 顶栏右侧 -->
<div class="d2-header-right">
<div class="time-container">
<div class="current-time">{{ time | formatDate }}</div>
<div class="current-date">{{ time | formatDate2 }}</div>
<div class="current-time">
{{ time | formatDate }}
</div>
<div class="current-date">
{{ time | formatDate2 }}
</div>
</div>
<div class="weather-container">
<div class="user-img">室内</div>
......@@ -59,23 +67,45 @@
<div class="d2-theme-container" flex-box="1" flex>
<!-- 主体 侧边栏 -->
<div
v-if="isShow"
flex-box="0"
ref="aside"
class="d2-theme-container-aside"
:style="{
width: asideWidth,
opacity: this.searchActive ? 0.5 : 1
opacity: this.searchActive ? 0.5 : 1,
}"
>
<d2-menu-side />
</div>
<div
class="semi-circle"
:style="{ left: isShow ? '256px' : '1px' }"
@click="isShow = !isShow"
>
<i
:class="[
isShow
? 'el-icon-caret-left'
: 'el-icon-caret-right',
]"
></i>
</div>
<!-- <el-button circle size="mini" :style="{left:isShow?'240px':'1px'}" :class="[isShow?'el-icon-caret-left':'el-icon-caret-right' ,'openOrClose']" @click='isShow=!isShow' ></el-button> -->
<!-- 主体 -->
<div class="d2-theme-container-main" flex-box="1" flex>
<!-- 内容 -->
<transition name="fade-scale">
<div class="d2-theme-container-main-layer" flex="dir:top">
<div
class="d2-theme-container-main-layer"
flex="dir:top"
>
<!-- 页面 -->
<div class="d2-theme-container-main-body" flex-box="1">
<div
class="d2-theme-container-main-body"
flex-box="1"
>
<!-- <bim></bim> -->
<keep-alive :include="keepAlive">
<router-view />
......@@ -85,9 +115,12 @@
</transition>
</div>
</div>
<div style="z-index: 9999 !important; user-select: none" class="mfooter">
Copyright (C) 2021-2022. XXXXX信息工程有限公司 蜀ICP备1202XXXX号-1
电话:86-028-689XXXX 传真:86-028-6893XXXX
<div
style="z-index: 9999 !important; user-select: none"
class="mfooter"
>
Copyright (C) 2021-2022. XXXXX信息工程有限公司
蜀ICP备1202XXXX号-1 电话:86-028-689XXXX 传真:86-028-6893XXXX
</div>
</div>
</div>
......@@ -108,6 +141,8 @@ export default {
},
data() {
return {
awidth: '250px',
isShow: true,
drawer: false,
// [侧边栏宽度] 正常状态
asideWidth: '256px',
......@@ -128,7 +163,7 @@ export default {
this.countNum = this.size
},
filters: {
formatDate: function (value) {
formatDate: function(value) {
let date = new Date(value)
let h = date.getHours()
h = h < 10 ? '0' + h : h
......@@ -138,7 +173,7 @@ export default {
s = s < 10 ? '0' + s : s
return ` ${h}:${m}:${s}`
},
formatDate2: function (value) {
formatDate2: function(value) {
let date = new Date(value)
let y = date.getFullYear()
let MM = date.getMonth() + 1
......@@ -376,4 +411,23 @@ export default {
font-weight: 400;
color: rgba(255, 255, 255, 0.75);
}
.semi-circle {
position: absolute;
top: 40%;
z-index: 99;
width: 10px;
height: 20px;
line-height: 20px;
background-color: #fff;
border: 1px solid #d8d4d4;
border-radius: 0 50px 50px 0; /* 左上、右上、右下、左下 */
text-align: left;
cursor: pointer;
i{
color: #1190da;
transform: scale(.5);
transform: translateX(-3px);
}
}
</style>
......@@ -3,6 +3,8 @@ div(:id="id", :style="{ width: '100%', height: '90%' }")
</template>
<script>
import elementResizeDetectorMaker from 'element-resize-detector'
export default {
props: ['data', 'id'],
watch: {
......@@ -12,6 +14,16 @@ export default {
},
mounted() {
this.initPie()
const erd = elementResizeDetectorMaker()
erd.listenTo(document.getElementById(this.id), () => {
this.$nextTick(() => {
//监听到事件后执行的业务逻辑
this.initPie()
})
})
},
destroyed() {
window.onresize = null
},
methods: {
initPie() {
......@@ -55,6 +67,10 @@ export default {
]
}
myCharts.setOption(option)
myCharts.resize()
window.addEventListener('resize', function() {
myCharts.resize()
})
}
}
}
......
......@@ -3,6 +3,8 @@ div(:id="id", :style="{ width: '100%', height: '90%' }")
</template>
<script>
import elementResizeDetectorMaker from 'element-resize-detector'
export default {
props: ['data', 'id', 'legendData'],
data() {
......@@ -18,6 +20,16 @@ export default {
mounted() {
this.initPie2()
const erd = elementResizeDetectorMaker()
erd.listenTo(document.getElementById(this.id), () => {
this.$nextTick(() => {
//监听到事件后执行的业务逻辑
this.initPie2()
})
})
},
destroyed() {
window.onresize = null
},
methods: {
initPie2() {
......@@ -75,6 +87,10 @@ export default {
]
}
myCharts.setOption(option)
myCharts.resize()
window.addEventListener('resize', function() {
myCharts.resize()
})
}
}
}
......
......@@ -164,7 +164,7 @@ export default {
flex-wrap: wrap;
height: calc(100vh - 350px);
> div {
width: 48%;
width: 47%;
height: calc(90% / 2);
margin: 3px;
padding: 13px;
......
// 曲线图 ==》 (首页,数据分析)
<template lang='pug'>
<template lang="pug">
div(:id="id", :style="{ width: '100%', height: '90%' }")
</template>
<script>
import elementResizeDetectorMaker from 'element-resize-detector'
export default {
props: ['id', 'data', 'title', 'color', 'yAxisName'],
watch: {
......@@ -17,6 +19,16 @@ export default {
},
mounted() {
this.initChart()
const erd = elementResizeDetectorMaker()
erd.listenTo(document.getElementById(this.id), () => {
this.$nextTick(() => {
//监听到事件后执行的业务逻辑
this.initChart()
})
})
},
destroyed() {
window.onresize = null
},
methods: {
initChart() {
......@@ -48,7 +60,6 @@ export default {
{
type: 'value',
name: this.yAxisName
}
],
series: [
......@@ -63,7 +74,12 @@ export default {
// },
areaStyle: {
normal: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
color: new this.$echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: this.color // 0% 处的颜色
......@@ -72,7 +88,8 @@ export default {
offset: 1,
color: '#fff' // 100% 处的颜色
}
])
]
)
}
},
lineStyle: {
......@@ -91,10 +108,14 @@ export default {
]
}
myCharts.setOption(option, true)
myCharts.resize()
window.addEventListener('resize', function() {
myCharts.resize()
})
}
}
}
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>
......@@ -3,6 +3,8 @@
</template>
<script>
import elementResizeDetectorMaker from 'element-resize-detector'
export default {
name: 'myPies',
data() {
......@@ -13,8 +15,14 @@ export default {
mounted() {
this.initPie()
const erd = elementResizeDetectorMaker()
erd.listenTo(document.getElementById('myPies'), () => {
this.$nextTick(() => {
//监听到事件后执行的业务逻辑
this.initPie()
})
})
},
methods: {
initPie() {
let myPie = document.getElementById('myPies')
......@@ -39,7 +47,7 @@ export default {
itemGap: 35,
icon: 'circle',
data: data,
formatter: function (name) {
formatter: function(name) {
var total = 0
var target
var value
......@@ -50,7 +58,12 @@ export default {
target = data[i].value
}
}
return name + ' ' + ((target / total) * 100).toFixed(0) + '%'
return (
name +
' ' +
((target / total) * 100).toFixed(0) +
'%'
)
},
textStyle: {
rich: {
......@@ -89,7 +102,7 @@ export default {
normal: {
show: true,
position: 'center',
formatter: function () {
formatter: function() {
return `\r\n20000`
},
textStyle: {
......@@ -113,7 +126,9 @@ export default {
}
]
}
this.myPies.setOption(option)
this.myPies.resize()
}
}
}
......
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