yujialong 9 months ago
parent 84c8412fe9
commit 3bf5c1b98a
  1. 166
      src/pages/screen/list/index.vue
  2. 2
      src/setting.js

@ -1,7 +1,10 @@
<template>
<div class="wrap">
<!-- 全屏 -->
<img class="full" src="@/assets/img/screen/full.png" alt="" @click="fullScreen">
<img class="full"
src="@/assets/img/screen/full.png"
alt=""
@click="fullScreen">
<!--header-->
<div class="header">
<div class="bg_header">
@ -34,10 +37,13 @@
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_1.png" alt="">
<img src="@/assets/img/screen/t_1.png"
alt="">
中国宏观杠杆率
</div>
<div id="chart1" class="chart" style="height: 280px;"></div>
<div id="chart1"
class="chart"
style="height: 280px;"></div>
</div>
<div class="item">
<div class="t_line_box">
@ -57,10 +63,13 @@
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_2.png" alt="">
<img src="@/assets/img/screen/t_2.png"
alt="">
新增信贷数据
</div>
<div id="chart5" class="chart t_btn9" style="height: 280px;"></div>
<div id="chart5"
class="chart t_btn9"
style="height: 280px;"></div>
</div>
<div class="item">
<div class="t_line_box">
@ -80,7 +89,8 @@
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_7.png" alt="">
<img src="@/assets/img/screen/t_7.png"
alt="">
{{ goodsSell.length ? goodsSell[0].operation_time.substr(0, 4) : 2021 }}年商品零售价格指数
</div>
<div class="main_table">
@ -93,10 +103,13 @@
</thead>
</table>
</div>
<div class="main_table" ref="tableWrap" style="height: 196px;margin-top: 0;overflow: auto">
<div class="main_table"
ref="tableWrap"
style="height: 196px;margin-top: 0;overflow: auto">
<table>
<tbody>
<tr v-for="(item, i) in goodsSell" :key="i">
<tr v-for="(item, i) in goodsSell"
:key="i">
<td width="70%">{{ item.hct }}</td>
<td>{{ item.rcpi }}</td>
</tr>
@ -106,7 +119,8 @@
</div>
</div>
<div class="middle">
<div class="item" style="height: 350px">
<div class="item"
style="height: 350px">
<!--左上边框-->
<div class="t_line_box">
<i class="t_l_line"></i>
@ -128,7 +142,8 @@
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_3.png" alt="">
<img src="@/assets/img/screen/t_3.png"
alt="">
中国GDP年率报告
</div>
<div class="main_table">
@ -141,11 +156,14 @@
</thead>
</table>
</div>
<div class="main_table" ref="gdpList" style="max-height: 260px;margin-top: 0;overflow: auto;">
<div class="main_table"
ref="gdpList"
style="max-height: 260px;margin-top: 0;overflow: auto;">
<table>
<tbody>
<template v-for="(item, i) in gdps">
<tr v-if="item.value != '0'" :key="i">
<tr v-if="item.value != '0'"
:key="i">
<td width="50%">{{ item.date_index }}</td>
<td width="50%">${{ item.value }}</td>
</tr>
@ -154,7 +172,8 @@
</table>
</div>
</div>
<div class="item" style="height: 520px;">
<div class="item"
style="height: 520px;">
<!--左上边框-->
<div class="t_line_box">
<i class="t_l_line"></i>
@ -176,15 +195,24 @@
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_3.png" alt="">
<img src="@/assets/img/screen/t_3.png"
alt="">
主要央行利率
</div>
<div class="earth">
<img class="lbx" src="@/assets/img/screen/lbx.png" alt="">
<img class="jt" src="@/assets/img/screen/jt.png" alt="">
<img class="map" src="@/assets/img/screen/map.png" alt="">
<img class="lbx"
src="@/assets/img/screen/lbx.png"
alt="">
<img class="jt"
src="@/assets/img/screen/jt.png"
alt="">
<img class="map"
src="@/assets/img/screen/map.png"
alt="">
</div>
<div class="chart" id="chart7" style="height: 500px"></div>
<div class="chart"
id="chart7"
style="height: 500px"></div>
</div>
</div>
<div class="right">
@ -210,10 +238,13 @@
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_4.png" alt="">
<img src="@/assets/img/screen/t_4.png"
alt="">
全国税收收入
</div>
<div id="chart3" class="echart t_btn7" style="height: 280px;"></div>
<div id="chart3"
class="echart t_btn7"
style="height: 280px;"></div>
</div>
<div class="item">
<!--左上边框-->
@ -237,10 +268,12 @@
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_5.png" alt="">
<img src="@/assets/img/screen/t_5.png"
alt="">
央行货币当局资产负债
</div>
<div id="chart4" style="height: 280px;"></div>
<div id="chart4"
style="height: 280px;"></div>
</div>
<div class="item">
<div class="t_line_box">
@ -260,10 +293,13 @@
<i class="b_r_line"></i>
</div>
<div class="main_title">
<img src="@/assets/img/screen/t_7.png" alt="">
<img src="@/assets/img/screen/t_7.png"
alt="">
以美元计算进口年率
</div>
<div id="chart6" class="chart" style="height: 270px;"></div>
<div id="chart6"
class="chart"
style="height: 270px;"></div>
</div>
</div>
</div>
@ -278,7 +314,7 @@ import SockJS from 'sockjs-client'
import Stomp from 'stompjs'
import map from './map'
export default {
data() {
data () {
return {
stompClientMarket: null,
stompClient: null,
@ -287,32 +323,32 @@ export default {
gdps: []
}
},
mounted() {
mounted () {
this.getList()
this.renderChart()
this.renderMap()
},
methods: {
// gdp
getList() {
getList () {
this.$get(`${this.api.visualPreview}?tableName=hg_zg_gm_zhongguogdpnianlvbaogao&tableId=17`).then(({ comment, data }) => {
this.gdps = data
}).catch(res => {})
}).catch(res => { })
},
//
getCrypto() {
getCrypto () {
this.$get(`${this.api.getTopList}`).then(res => {
this.userCount = res.totalCount
}).catch(res => {})
}).catch(res => { })
},
// websocket
connect() {
connect () {
const socket = new SockJS(`${Setting.cryptoBaseURL}currency/websocket`) //广
// STOMP
this.stompClientMarket = new Stomp.over(socket)
this.stompClientMarket.debug = null
var this_ = this
this.stompClientMarket.connect({}, function(event) {
this.stompClientMarket.connect({}, function (event) {
//
if (this_.subObjMarket == null) {
this_.subscribeMarket()
@ -323,7 +359,7 @@ export default {
});
},
//
subscribeMarket() {
subscribeMarket () {
const this_ = this
this.subObjMarket = this.stompClientMarket.subscribe(
this_.api.market,
@ -342,11 +378,11 @@ export default {
}
);
},
disconnect() {
disconnect () {
this.stompClient && this.stompClient.disconnect()
},
//
fullScreen() {
fullScreen () {
//
if (document.fullscreenElement ||
document.mozFullScreenElement ||
@ -367,10 +403,10 @@ export default {
}
},
//
renderChart() {
renderChart () {
const animateChart = (chart, option, data, num = 6) => {
//
if (option.dataZoom[0].endValue == data.length ) {
if (option.dataZoom[0].endValue == data.length) {
option.dataZoom[0].endValue = num
option.dataZoom[0].startValue = 0
}
@ -402,7 +438,7 @@ export default {
},
legend: {
data: comment.map(e => e.comment),
textStyle:{
textStyle: {
color: '#fff'
},
top: '8%'
@ -423,7 +459,7 @@ export default {
endValue: 6 // 6
}
],
color: ['#6188e9','#9032f3','#a57de3','#4BF0FF','#44AFF0','#4E82FF','#584BFF','#BE4DFF','#F845F1'],
color: ['#6188e9', '#9032f3', '#a57de3', '#4BF0FF', '#44AFF0', '#4E82FF', '#584BFF', '#BE4DFF', '#F845F1'],
xAxis: {
type: 'category',
boundaryGap: ['20%', '20%'],
@ -459,7 +495,7 @@ export default {
setInterval(function () {
animateChart(chart[0], option, series)
}, 1500)
}).catch(res => {})
}).catch(res => { })
//
this.$get(`${this.api.visualPreview}?tableName=hg_zg_jr_quanguoshuishoushouru&tableId=33`).then(res => {
@ -497,10 +533,10 @@ export default {
}
}
},
color: ['#4BF0FF','#44AFF0','#4E82FF','#584BFF','#BE4DFF','#F845F1'],
color: ['#4BF0FF', '#44AFF0', '#4E82FF', '#584BFF', '#BE4DFF', '#F845F1'],
legend: {
data: ['税收收入合计'],
textStyle:{
textStyle: {
color: '#fff'
},
top: '8%'
@ -542,7 +578,7 @@ export default {
setInterval(function () {
animateChart(chart[1], option, data)
}, 1500)
}).catch(res => {})
}).catch(res => { })
//
this.$get(`${this.api.previewData}?tableName=hg_zg_jr_guojilvyouwaihuishourugoucheng&tableId=52`).then(res => {
@ -583,7 +619,7 @@ export default {
//[0, 360]
// startAngle: 0,
//
radius : '45%',
radius: '45%',
//
center: ['50%', '65%'],
//
@ -592,7 +628,7 @@ export default {
// roseType: 'radius',
// false
// avoidLabelOverlap: false,
color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab','#06b4ab','#06c8ab','#06dcab','#06f0ab'],
color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab', '#06b4ab', '#06c8ab', '#06dcab', '#06f0ab'],
label: {
normal: {
show: true,
@ -614,7 +650,7 @@ export default {
data: series
}]
})
}).catch(res => {})
}).catch(res => { })
//
this.$get(`${this.api.previewData}?tableName=hg_zg_jr_yanghanghuobidangjuzichanfuzhai&tableId=55`).then(res => {
@ -774,7 +810,7 @@ export default {
setInterval(function () {
animateChart(chart[3], option, data, 3)
}, 1500)
}).catch(res => {})
}).catch(res => { })
//
this.$get(`${this.api.previewData}?tableName=hg_zg_jr_shangpinlingshoujiagezhishu&tableId=60`).then(res => {
@ -788,7 +824,7 @@ export default {
})
})
this.goodsSell = [...goodsSell, ...goodsSell]
}).catch(res => {})
}).catch(res => { })
//
this.$get(`${this.api.previewData}?tableName=hg_zg_jr_xinzengxindaishuju&tableId=34`).then(res => {
@ -934,7 +970,7 @@ export default {
setInterval(function () {
animateChart(chart[4], option, data, 3)
}, 1500)
}).catch(res => {})
}).catch(res => { })
//
this.$get(`${this.api.visualPreview}?tableName=hg_zg_my_yimeiyuanjisuanjinkounianlv&tableId=22`).then(res => {
@ -1039,7 +1075,7 @@ export default {
setInterval(function () {
animateChart(chart[5], option, data)
}, 1500)
}).catch(res => {})
}).catch(res => { })
this.scrollTable()
@ -1051,20 +1087,20 @@ export default {
})
},
//
async renderMap() {
async renderMap () {
// idname
const param = [
{tableId: 2, tableName: 'll_yh_usa'},
{tableId: 3, tableName: 'll_yh_euro'},
{tableId: 4, tableName: 'll_yh_newzealand'},
{tableId: 5, tableName: 'll_yh_china'},
{tableId: 6, tableName: 'll_yh_switzerland'},
{tableId: 7, tableName: 'll_yh_english'},
{tableId: 8, tableName: 'll_yh_australia'},
{tableId: 9, tableName: 'll_yh_japan'},
{tableId: 10, tableName: 'll_yh_russia'},
{tableId: 11, tableName: 'll_yh_india'},
{tableId: 12, tableName: 'll_yh_brazil'}
{ tableId: 2, tableName: 'll_yh_usa' },
{ tableId: 3, tableName: 'll_yh_euro' },
{ tableId: 4, tableName: 'll_yh_newzealand' },
{ tableId: 5, tableName: 'll_yh_china' },
{ tableId: 6, tableName: 'll_yh_switzerland' },
{ tableId: 7, tableName: 'll_yh_english' },
{ tableId: 8, tableName: 'll_yh_australia' },
{ tableId: 9, tableName: 'll_yh_japan' },
{ tableId: 10, tableName: 'll_yh_russia' },
{ tableId: 11, tableName: 'll_yh_india' },
{ tableId: 12, tableName: 'll_yh_brazil' }
]
this.$post(this.api.multipleTablePreview, param).then(res => {
//
@ -1219,10 +1255,10 @@ export default {
index = -1
}
}, 2000)
}).catch(res => {})
}).catch(res => { })
},
//
scrollTable() {
scrollTable () {
const dom = this.$refs.tableWrap
const dom1 = this.$refs.gdpList
setInterval(() => {
@ -1238,5 +1274,5 @@ export default {
</script>
<style lang="scss" scoped>
@import "../../../styles/page/screen.scss";
@import '../../../styles/page/screen.scss';
</style>

@ -12,7 +12,7 @@ const dev = process.env.NODE_ENV === 'development' // 本地
let host = `${location.origin}/`
if (dev) {
host = 'http://121.37.12.51/'
// host = 'http://192.168.31.51:9000/'
host = 'http://192.168.31.217:9000/'
}
const Setting = {

Loading…
Cancel
Save