pull/46/head
xuhaoyun 2 years ago
parent 933dbe6d79
commit e91d7fc979

@ -0,0 +1,9 @@
import request from '@/utils/request'
//基本信息
export function epidemicTrend(params) {
return request({
url: '/safety/signboard/epidemic/trend',
method: 'post',
params
})
}

@ -95,6 +95,7 @@ export default {
this.$store.dispatch("Login", param) this.$store.dispatch("Login", param)
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
sessionStorage.setItem('activeIndex', '1')
this.$router.push({ this.$router.push({
path: '/home/safetyIndex' path: '/home/safetyIndex'
}) })

@ -32,7 +32,7 @@
<div class="block"> <div class="block">
<el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true" <el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true"
@size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"
:page-sizes="[3]" layout="total, sizes, prev, pager, next, jumper" :total="total"> :page-sizes="[5]" layout="total, sizes, prev, pager, next, jumper" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<el-dialog title="案件详情" :visible.sync="diaVisible" class="picForm" v-if="anjianDetail"> <el-dialog title="案件详情" :visible.sync="diaVisible" class="picForm" v-if="anjianDetail">
@ -107,7 +107,7 @@ export default {
data() { data() {
return { return {
formInline: {}, formInline: {},
pageSize: 3, pageSize: 5,
pageNum: 1, pageNum: 1,
total: 0, total: 0,
diaVisible: false, diaVisible: false,
@ -160,7 +160,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.mainBox { .mainBox {
width: 100%; width: 100%;
height: 320px; height: 420px;
background: url('~@/assets/companyFile/背景22136.png') no-repeat; background: url('~@/assets/companyFile/背景22136.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding: 70px 20px 60px; padding: 70px 20px 60px;

@ -48,7 +48,7 @@
<div class="block"> <div class="block">
<el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true" <el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true"
@size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"
:page-sizes="[6]" layout="total, sizes, prev, pager, next, jumper" :total="total"> :page-sizes="[5]" layout="total, sizes, prev, pager, next, jumper" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<div class="bottomZS"></div> <div class="bottomZS"></div>
@ -61,7 +61,7 @@ export default {
data() { data() {
return { return {
formInline: {}, formInline: {},
pageSize: 6, pageSize: 5,
pageNum: 1, pageNum: 1,
total: 0, total: 0,
isShow: [{ show: false }, { show: false }, { show: false }, { show: false }, { show: false }], isShow: [{ show: false }, { show: false }, { show: false }, { show: false }, { show: false }],
@ -118,7 +118,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.mainBox { .mainBox {
width: 100%; width: 100%;
height: 550px; height: 470px;
background: url('~@/assets/companyFile/背景22136.png') no-repeat; background: url('~@/assets/companyFile/背景22136.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding: 70px 20px 60px; padding: 70px 20px 60px;

@ -104,16 +104,16 @@ export default {
this.getList() this.getList()
}, },
mounted() { mounted() {
this.$nextTick(() => { // this.$nextTick(() => {
this.chooseTime = [this.timeDefault + ' 00:00:00', this.timeDefault + ' 23:59:59'] // this.chooseTime = [this.timeDefault + ' 00:00:00', this.timeDefault + ' 23:59:59']
}) // })
}, },
computed: { computed: {
timeDefault() { // timeDefault() {
const date = new Date(); // const date = new Date();
let s1 = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate()); // let s1 = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate());
return s1; // return s1;
} // }
}, },
methods: { methods: {
getList() { getList() {

@ -53,7 +53,7 @@
<div class="block"> <div class="block">
<el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true" <el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true"
@size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"
:page-sizes="[6]" layout="total, sizes, prev, pager, next, jumper" :total="total"> :page-sizes="[5]" layout="total, sizes, prev, pager, next, jumper" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<div class="bottomZS"></div> <div class="bottomZS"></div>
@ -66,7 +66,7 @@ export default {
data() { data() {
return { return {
formInline: {}, formInline: {},
pageSize: 6, pageSize: 5,
pageNum: 1, pageNum: 1,
total: 0, total: 0,
tableData: [], tableData: [],
@ -149,7 +149,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.mainBox { .mainBox {
width: 100%; width: 100%;
height: 720px; height: 620px;
background: url('~@/assets/companyFile/背景22136.png') no-repeat; background: url('~@/assets/companyFile/背景22136.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding: 70px 20px 60px; padding: 70px 20px 60px;

@ -48,7 +48,7 @@
<div class="block"> <div class="block">
<el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true" <el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true"
@size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum"
:page-sizes="[6]" layout="total, sizes, prev, pager, next, jumper" :total="total"> :page-sizes="[5]" layout="total, sizes, prev, pager, next, jumper" :total="total">
</el-pagination> </el-pagination>
</div> </div>
<el-dialog :title="detailItem.goodsName" :visible.sync="diaVisible" class="picForm"> <el-dialog :title="detailItem.goodsName" :visible.sync="diaVisible" class="picForm">
@ -93,7 +93,7 @@ export default {
data() { data() {
return { return {
formInline: {}, formInline: {},
pageSize: 6, pageSize: 5,
pageNum: 1, pageNum: 1,
DetailpageSize: 5, DetailpageSize: 5,
detailpageNum: 1, detailpageNum: 1,
@ -203,7 +203,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.mainBox { .mainBox {
width: 100%; width: 100%;
height: 550px; height: 460px;
background: url('~@/assets/companyFile/背景22136.png') no-repeat; background: url('~@/assets/companyFile/背景22136.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding: 70px 20px 60px; padding: 70px 20px 60px;

@ -1,20 +1,165 @@
<template> <template>
<div class="fangyi"> <div class="fangyi">
<div class="title"><img src="../../assets/safetyIndex/装饰009991.png" alt="">防疫安全</div> <div class="title"><img src="../../assets/safetyIndex/装饰009991.png" alt="">防疫安全</div>
<div class="fytb" id="fytb"></div>
<div class="bottomBtns"></div> <div class="bottomBtns"></div>
</div> </div>
</template> </template>
<script> <script>
import * as echarts from 'echarts';
import "echarts-gl";
import { epidemicTrend } from '@/api/companyCanban'
export default { export default {
props: ['companyId'], props: ['companyId'],
data() { data() {
return { return {
companyID: this.companyId,
fangyiList: {},
dateList: [],
jingneiList: [],
jingwaiList: [],
} }
}, },
created() { created() {
console.log(this.companyID, 'this.companyID');
epidemicTrend({ companyId: this.companyID }).then(res => {
this.fangyiList = res.data
this.initfytb()
})
},
methods: {
initfytb() {
let myChart = echarts.init(document.getElementById("fytb"));
const dateList = this.fangyiList.list_12.map(item => {
return item.statisticsDate
})
const jingnwaiList = this.fangyiList.list_12.map(item => {
return item.numValue
})
const jingnneiList = this.fangyiList.list_13.map(item => {
return item.numValue
})
const option = {
tooltip: {
trigger: "axis",
},
grid: {
top: "5%",
right: "5%",
bottom: "15%",
left: "15%",
},
legend: [{
data: ['这是一个小标题'],
top: '5%',
width: 100,
selectedMode: false,
textStyle: {
color: 'rgba(255, 255, 255, 0.7)'
},
}, {
top: '5%',
right: 'center',
width: 200,
data: ['境外', '境内'],
textStyle: {
color: 'rgba(255, 255, 255, 0.7)'
},
},],
xAxis: {
type: "category",
show: true,
minInterval: 1,
splitLine: {
show: false,
},
axisLabel: {
show: true, //
color: "#D0DEEE", //
},
minorTick: { show: false },
data: dateList,
},
yAxis: {
type: "value",
show: true,
minInterval: 1,
splitLine: {
show: false,
},
minorTick: { show: false },
axisLabel: {
show: true, //
color: "#FFF", //
},
},
series: [
{
name: "境外",
type: "line",
showSymbol: false,
stack: "Total",
emphasis: {
focus: "series",
},
areaStyle: {
opacity: 0.8,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgb(128, 255, 165)",
},
{
offset: 1,
color: "rgb(1, 191, 236)",
},
]),
},
smooth: true,
itemStyle: {
normal: {
color: "#00d2c4",
},
},
data: jingnwaiList,
},
{
name: "境内",
type: "line",
showSymbol: false,
stack: "Total",
emphasis: {
focus: "series",
},
areaStyle: {
opacity: 0.8,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgb(255, 191, 0)",
},
{
offset: 1,
color: "rgb(224, 62, 76)",
},
]),
},
smooth: true,
itemStyle: {
normal: {
color: "#FFCB6A",
},
},
data: jingnneiList,
},
],
};
option && myChart.setOption(option);
},
}, },
} }
</script> </script>
@ -47,9 +192,18 @@ export default {
} }
} }
.fytb {
width: 100%;
height: calc(100% - 93px);
padding: 0 15px;
}
.bottomBtns { .bottomBtns {
width: 100%; width: 100%;
height: 50px; height: 50px;
margin-bottom: 10px;
padding: 0 15px;
} }
} }
</style> </style>

@ -341,7 +341,7 @@ export default {
} }
.zongshu { .zongshu {
width: 350px; width: 400px;
height: 26px; height: 26px;
margin: 5px auto; margin: 5px auto;
background: url('~@/assets/safetyIndex/7691.png') no-repeat; background: url('~@/assets/safetyIndex/7691.png') no-repeat;

Loading…
Cancel
Save