5 changed files with 523 additions and 39 deletions
After Width: | Height: | Size: 1.4 KiB |
@ -1,48 +1,530 @@ |
|||||
<template> |
<template> |
||||
<section class="app-main" style="height: calc(100vh - 140px);"> |
<div> |
||||
<transition name="fade-transform" mode="out-in"> |
<section v-show="path!= '/index'" class="app-main" style="height: calc(100vh - 140px);"> |
||||
<keep-alive :include="cachedViews"> |
<transition name="fade-transform" mode="out-in"> |
||||
<router-view :key="key" /> |
<keep-alive :include="cachedViews"> |
||||
</keep-alive> |
<router-view :key="key" /> |
||||
</transition> |
</keep-alive> |
||||
</section> |
</transition> |
||||
|
|
||||
|
</section> |
||||
|
|
||||
|
<div v-show="path == '/index'"> |
||||
|
|
||||
|
<div class="index" style="height: calc(100vh - 200px);overflow-x: hidden;overflow-y: auto;"> |
||||
|
|
||||
|
<div class="index_top"> |
||||
|
|
||||
|
<div style="flex: 1;"> |
||||
|
<span class="index_top_text" @click="show">数据总览</span> |
||||
|
<el-date-picker v-model="params.date" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"> |
||||
|
</el-date-picker> |
||||
|
</div> |
||||
|
|
||||
|
<div class="index_top_right">{{info.notice}}</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div class="index_content"> |
||||
|
|
||||
|
<div class="index_content_top"> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: row; padding: 30px 20px; flex: 1;"> |
||||
|
|
||||
|
<img src="../../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
||||
|
|
||||
|
<div style="display: flex;flex-direction: column; margin-left: 10px;"> |
||||
|
<span style="font-size: 20px;">¥27608927.45</span> |
||||
|
<div style="margin-top: 10px;"> |
||||
|
<span style="font-size: 14px;color: #999;">常规商品销售额</span> |
||||
|
<span style="font-size: 14px; margin-left: 10px; color: #13BDA0 ;">↑ 25.6%</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div style="flex: 0.3;"></div> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: row; padding: 30px 20px; flex: 1;"> |
||||
|
|
||||
|
<img src="../../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
||||
|
|
||||
|
<div style="display: flex;flex-direction: column; margin-left: 10px;"> |
||||
|
<span style="font-size: 20px;">¥1244255.22</span> |
||||
|
<div style="margin-top: 10px;"> |
||||
|
<span style="font-size: 14px;color: #999;">烟草商品销售额</span> |
||||
|
<span style="font-size: 14px; margin-left: 10px; color: #13BDA0 ;">↑ 9.8%</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div style="flex: 0.3;"></div> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: row; padding: 30px 20px; flex: 1;"> |
||||
|
|
||||
|
<img src="../../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
||||
|
|
||||
|
<div style="display: flex;flex-direction: column; margin-left: 10px;"> |
||||
|
<span style="font-size: 20px;">¥636449.84</span> |
||||
|
<div style="margin-top: 10px;"> |
||||
|
<span style="font-size: 14px;color: #999;">库存总价值</span> |
||||
|
<span style="font-size: 14px; margin-left: 10px; color: #FF4747 ;">↓ 15.6%</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div style="flex: 0.3;"></div> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: row; padding: 30px 20px; flex: 1;"> |
||||
|
|
||||
|
<img src="../../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
||||
|
|
||||
|
<div style="display: flex;flex-direction: column; margin-left: 10px;"> |
||||
|
<span style="font-size: 20px;">¥3822945.45</span> |
||||
|
<div style="margin-top: 10px;"> |
||||
|
<span style="font-size: 14px;color: #999;">在途货物总价值</span> |
||||
|
<span style="font-size: 14px; margin-left: 10px; color: #FF4747 ;">↓ 15.6%</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="index_content_bottom"> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 1;"> |
||||
|
<span style="font-weight: 600;">阀值分析</span> |
||||
|
<div id="main1" class="middle"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div style="flex: 0.1;"></div> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 1;"> |
||||
|
<span style="font-weight: 600;">在途货物分析</span> |
||||
|
<div id="main2" class="middle"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="index_bottom"> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 0.4;"> |
||||
|
<div style="display: flex;flex-direction: row; justify-content: space-between; align-items: center;"> |
||||
|
<span style="font-weight: 600;">快捷操作</span> |
||||
|
<span style="color: #4386FF; font-size: 13px; text-decoration: underline;">查看更多</span> |
||||
|
</div> |
||||
|
|
||||
|
<div style="display: flex;align-items: center; margin-top: 10px;"> |
||||
|
<img src="../../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
||||
|
<span style="font-weight: 500;margin-left: 10px;">采购申请</span> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div style="display: flex;align-items: center; margin-top: 10px;"> |
||||
|
<img src="../../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
||||
|
<span style="font-weight: 500;margin-left: 10px;">用款申请</span> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div style="display: flex;align-items: center; margin-top: 10px;"> |
||||
|
<img src="../../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
||||
|
<span style="font-weight: 500;margin-left: 10px;">供应商管理</span> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div style="display: flex;align-items: center; margin-top: 10px;"> |
||||
|
<img src="../../assets/images/cgsp.png" style="width: 54px;height: 54px;" /> |
||||
|
<span style="font-weight: 500;margin-left: 10px;">数据上报</span> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div style="flex: 0.1;"></div> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 1;"> |
||||
|
<div style="display: flex;flex-direction: row; justify-content: space-between; align-items: center;"> |
||||
|
<span style="font-weight: 600;">最新消息</span> |
||||
|
<span style="color: #4386FF; font-size: 13px; text-decoration: underline;">查看更多</span> |
||||
|
</div> |
||||
|
|
||||
|
<div style="margin-top: 20px;" v-for="(item, index) in newMessageList" :key="index"> |
||||
|
<div |
||||
|
style="display: flex;flex-direction: row; justify-content: space-between; align-items: center; padding-top: 20px;" |
||||
|
@click="companyInfo(item.sid)"> |
||||
|
<span style="font-size: 16px;color: #444;overflow: hidden;margin-right:20px;flex: 1; |
||||
|
text-overflow: ellipsis; |
||||
|
display: -webkit-box; |
||||
|
-webkit-line-clamp: 1 ; |
||||
|
-webkit-box-orient: vertical;">{{ item.name }}</span> |
||||
|
<span style="font-size: 13px;color: #999;">{{ item.date }}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
<div style="flex: 0.1;"></div> |
||||
|
|
||||
|
<div class="item_border" style="display: flex;flex-direction: column; padding: 20px 20px; flex: 1;"> |
||||
|
<div style="display: flex;flex-direction: row; justify-content: space-between; align-items: center;"> |
||||
|
<span style="font-weight: 600;">警报中心</span> |
||||
|
<span style="color: #4386FF; font-size: 13px; text-decoration: underline;">查看更多</span> |
||||
|
</div> |
||||
|
|
||||
|
<div style="margin-top: 20px;" v-for="(item, index) in larmCenterList" :key="index"> |
||||
|
<div |
||||
|
style="display: flex;flex-direction: row; justify-content: space-between; align-items: center; padding-top: 20px;" |
||||
|
@click="companyInfo(item.sid)"> |
||||
|
<span style="font-size: 16px;color: #444;overflow: hidden;margin-right:20px;flex: 1; |
||||
|
text-overflow: ellipsis; |
||||
|
display: -webkit-box; |
||||
|
-webkit-line-clamp: 1 ; |
||||
|
-webkit-box-orient: vertical;">{{ item.name }}</span> |
||||
|
<span style="font-size: 13px;color: #999;">{{ item.date }}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default { |
import * as echarts from 'echarts'; |
||||
name: 'AppMain', |
export default { |
||||
computed: { |
name: 'AppMain', |
||||
cachedViews() { |
data() { |
||||
return this.$store.state.tagsView.cachedViews |
return { |
||||
|
path: "", |
||||
|
params: { |
||||
|
date: null |
||||
|
}, |
||||
|
info: { |
||||
|
date: "", |
||||
|
notice: "通知:请于2023年3月3日16点向***3189帐户回款1231234元。[点击回款]" |
||||
|
}, |
||||
|
newMessageList: [{ |
||||
|
sid: "1", |
||||
|
name: "[消息]您的订单已经审核完毕等待放款。", |
||||
|
date: "2023-01-01" |
||||
|
|
||||
|
}, { |
||||
|
sid: "2", |
||||
|
name: "[通知]通知仓库商品产生1级风险,请及时做出回复。", |
||||
|
date: "2023-01-01" |
||||
|
|
||||
|
}, { |
||||
|
sid: "3", |
||||
|
name: "[消息]您的订单由于商品不存在被退回。", |
||||
|
date: "2023-01-01" |
||||
|
|
||||
|
}, { |
||||
|
sid: "4", |
||||
|
name: "[消息]请于2023年3月3日16点向***3189帐户回款231234元。", |
||||
|
date: "2023-01-01" |
||||
|
|
||||
|
}], |
||||
|
larmCenterList: [{ |
||||
|
sid: "1", |
||||
|
name: "仓库于2023年3月3日产生1级风险。", |
||||
|
date: "2023-01-01" |
||||
|
|
||||
|
}, { |
||||
|
sid: "2", |
||||
|
name: "[通知]通知仓库商品产生1级出回复。", |
||||
|
date: "2023-01-01" |
||||
|
|
||||
|
}, { |
||||
|
sid: "3", |
||||
|
name: "[消息]您的订单由于商品不存在被退回。", |
||||
|
date: "2023-01-01" |
||||
|
|
||||
|
}, { |
||||
|
sid: "4", |
||||
|
name: "[消息]请于2**3189帐户回款231234元。", |
||||
|
date: "2023-01-01" |
||||
|
|
||||
|
} |
||||
|
|
||||
|
] |
||||
|
|
||||
|
} |
||||
}, |
}, |
||||
key() { |
computed: { |
||||
return this.$route.path |
cachedViews() { |
||||
|
return this.$store.state.tagsView.cachedViews |
||||
|
}, |
||||
|
key() { |
||||
|
this.path = this.$route.path |
||||
|
return this.$route.path |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
created() { |
||||
|
// this.drawLine1(); |
||||
|
// this.drawLine2(); |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
show() { |
||||
|
this.drawLine1(); |
||||
|
this.drawLine2(); |
||||
|
}, |
||||
|
drawLine1() { |
||||
|
|
||||
|
var myChart = echarts.init(document.getElementById('main1')); |
||||
|
// 绘制图表 |
||||
|
myChart.setOption({ |
||||
|
tooltip: { |
||||
|
trigger: 'axis', |
||||
|
axisPointer: { |
||||
|
type: 'cross', |
||||
|
crossStyle: { |
||||
|
color: '#999' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
toolbox: { |
||||
|
feature: { |
||||
|
dataView: { |
||||
|
// 数据视图 |
||||
|
show: false, |
||||
|
readOnly: false |
||||
|
}, |
||||
|
magicType: { |
||||
|
// 切换图形 |
||||
|
show: false, |
||||
|
type: ['line', 'bar'] |
||||
|
}, |
||||
|
// 还原 |
||||
|
restore: { |
||||
|
show: false |
||||
|
}, |
||||
|
// 下载 |
||||
|
saveAsImage: { |
||||
|
show: false |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
grid: { |
||||
|
height: 220 |
||||
|
}, |
||||
|
legend: { |
||||
|
data: ['Evaporation', 'Precipitation', 'Temperature'] |
||||
|
}, |
||||
|
xAxis: [{ |
||||
|
type: 'category', |
||||
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], |
||||
|
axisPointer: { |
||||
|
type: 'shadow' |
||||
|
} |
||||
|
}], |
||||
|
yAxis: [{ |
||||
|
type: 'value', |
||||
|
name: '人民币/万元', |
||||
|
min: 0, |
||||
|
max: 250, |
||||
|
interval: 50, |
||||
|
axisLabel: { |
||||
|
formatter: '{value}' |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
type: 'value', |
||||
|
name: '百分比', |
||||
|
min: 0, |
||||
|
max: 25, |
||||
|
interval: 5, |
||||
|
axisLabel: { |
||||
|
formatter: '{value}' |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
series: [{ |
||||
|
name: 'Evaporation', |
||||
|
type: 'bar', |
||||
|
tooltip: { |
||||
|
valueFormatter: function(value) { |
||||
|
return value + ' 万元'; |
||||
|
} |
||||
|
}, |
||||
|
data: [ |
||||
|
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3 |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
name: 'Precipitation', |
||||
|
type: 'bar', |
||||
|
tooltip: { |
||||
|
valueFormatter: function(value) { |
||||
|
return value + ' 万元'; |
||||
|
} |
||||
|
}, |
||||
|
data: [ |
||||
|
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
name: 'Temperature', |
||||
|
type: 'line', |
||||
|
yAxisIndex: 1, |
||||
|
tooltip: { |
||||
|
valueFormatter: function(value) { |
||||
|
return value + ' %'; |
||||
|
} |
||||
|
}, |
||||
|
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2] |
||||
|
} |
||||
|
] |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 饼状图图初始化 |
||||
|
drawLine2() { |
||||
|
// 基于准备好的dom,初始化echarts实例 |
||||
|
var myChart = echarts.init(document.getElementById('main2')); |
||||
|
// 绘制图表 |
||||
|
// console.log('option', obj) |
||||
|
myChart.setOption({ |
||||
|
legend: { |
||||
|
top: 'bottom' |
||||
|
}, |
||||
|
toolbox: { |
||||
|
show: true, |
||||
|
feature: { |
||||
|
mark: { |
||||
|
show: true |
||||
|
}, |
||||
|
// 数据图标 |
||||
|
dataView: { |
||||
|
show: false, |
||||
|
readOnly: false |
||||
|
}, |
||||
|
// 刷新图标 |
||||
|
restore: { |
||||
|
show: false |
||||
|
}, |
||||
|
// 下载图标 |
||||
|
saveAsImage: { |
||||
|
show: false |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
tooltip: { |
||||
|
show: true, |
||||
|
trigger: "item" |
||||
|
}, |
||||
|
series: [{ |
||||
|
name: 'Nightingale Chart', |
||||
|
type: 'pie', |
||||
|
radius: [20, 100], |
||||
|
center: ['50%', '40%'], |
||||
|
roseType: 'area', |
||||
|
itemStyle: { |
||||
|
borderRadius: 8 |
||||
|
}, |
||||
|
data: [{ |
||||
|
"value": 2313123, |
||||
|
"name": "订单总额" |
||||
|
}, |
||||
|
{ |
||||
|
"value": 4359354, |
||||
|
"name": "实际到货价值" |
||||
|
}, |
||||
|
{ |
||||
|
"value": 2313123, |
||||
|
"name": "在途货价值" |
||||
|
}, |
||||
|
{ |
||||
|
"value": 2313123, |
||||
|
"name": "超出价值" |
||||
|
} |
||||
|
] |
||||
|
}] |
||||
|
}) |
||||
|
}, |
||||
} |
} |
||||
} |
} |
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped> |
<style lang="scss"> |
||||
.app-main { |
.item_border { |
||||
/*50 = navbar */ |
border-radius: 10px; |
||||
height: calc(100vh - 140px); |
border: 1px solid #CDDBF7; |
||||
position: relative; |
} |
||||
background-color: #FFFFFF; |
|
||||
/* margin-left:10px; */ |
.middle { |
||||
/*padding: 0 20px;*/ |
justify-content: center; |
||||
overflow-x: hidden; |
width: 100%; |
||||
overflow-y: hidden; |
height: 300px; |
||||
} |
|
||||
.fixed-header+.app-main { |
} |
||||
padding-top: 50px; |
|
||||
} |
|
||||
</style> |
|
||||
|
|
||||
<!-- <style lang="scss"> |
.index { |
||||
// fix css style bug in open el-dialog |
padding: 40px 80px; |
||||
.el-popup-parent--hidden { |
background: #FFFFFF; |
||||
.fixed-header { |
|
||||
padding-right: 15px; |
.index_top { |
||||
|
|
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
|
||||
|
.index_top_text { |
||||
|
font-size: 25px; |
||||
|
font-weight: bold; |
||||
|
color: #000; |
||||
|
margin-right: 20px; |
||||
|
} |
||||
|
|
||||
|
.index_top_right { |
||||
|
font-size: 14px; |
||||
|
font-weight: bold; |
||||
|
color: #FF5046; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.index_content { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
margin-top: 30px; |
||||
|
|
||||
|
.index_content_top { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
} |
||||
|
|
||||
|
.index_content_bottom { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
margin-top: 30px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.index_bottom { |
||||
|
margin-top: 20px; |
||||
|
display: flex; |
||||
|
} |
||||
} |
} |
||||
} |
</style> |
||||
</style> --> |
|
||||
|
Loading…
Reference in new issue