Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
王兴琳 3 weeks ago
parent
commit
206dbfb441
  1. 3
      ruoyi-ui/codehelp_readme.md
  2. BIN
      ruoyi-ui/src/assets/images/carbon/active.png
  3. BIN
      ruoyi-ui/src/assets/images/carbon/btn_active.png
  4. BIN
      ruoyi-ui/src/assets/images/carbon/btn_normal.png
  5. BIN
      ruoyi-ui/src/assets/images/carbon/data_bg1.png
  6. BIN
      ruoyi-ui/src/assets/images/carbon/data_bg2.png
  7. BIN
      ruoyi-ui/src/assets/images/carbon/head_logo.png
  8. BIN
      ruoyi-ui/src/assets/images/carbon/head_out.png
  9. BIN
      ruoyi-ui/src/assets/images/carbon/head_setting.png
  10. BIN
      ruoyi-ui/src/assets/images/carbon/head_title.png
  11. BIN
      ruoyi-ui/src/assets/images/carbon/head_user.png
  12. BIN
      ruoyi-ui/src/assets/images/carbon/header_bg.png
  13. BIN
      ruoyi-ui/src/assets/images/carbon/icon_gf.png
  14. BIN
      ruoyi-ui/src/assets/images/carbon/item_title.png
  15. BIN
      ruoyi-ui/src/assets/images/carbon/tb_row_bg.png
  16. 9
      ruoyi-ui/src/common/menuData.js
  17. 76
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/RadioGroup/RadioCustom1.vue
  18. 12
      ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/RadioGroup/index.vue
  19. 6
      ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue
  20. 589
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/carbon.vue
  21. 67
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/btn/index.vue
  22. 83
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/contentItem/index.vue
  23. 346
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/RingChart.vue
  24. 271
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/SortBarChart.vue
  25. 192
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/SplitBarChart.vue
  26. 264
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/lineCharts.vue
  27. 56
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/mixins/resize.js
  28. 1954
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/realData.js
  29. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue
  30. 22
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue
  31. 193
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue
  32. 125
      ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue

3
ruoyi-ui/codehelp_readme.md

@ -13,7 +13,8 @@
- 通用视频组件,用户接入视频流`src\views\JiHeExpressway\components\VideoMulti\index.vue`
3. 较为复杂的页面只有首页的地图和缩略图相关。地图采用高速提供的接口,缩略图采用antv/x6。
- 地图文档:【腾讯文档】SuperMap-GIS组件使用文档 https://docs.qq.com/doc/DY3FYV1RaV2lLeXhO
- 地图文档:【腾讯文档】SuperMap-GIS组件使用文档
https://docs.qq.com/doc/DY2R2ZnBacUJjR1Rm
- 缩略图文档:[X6 图编辑引擎 | AntV](https://x6.antv.vision/zh)

BIN
ruoyi-ui/src/assets/images/carbon/active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
ruoyi-ui/src/assets/images/carbon/btn_active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

BIN
ruoyi-ui/src/assets/images/carbon/btn_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

BIN
ruoyi-ui/src/assets/images/carbon/data_bg1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
ruoyi-ui/src/assets/images/carbon/data_bg2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
ruoyi-ui/src/assets/images/carbon/head_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
ruoyi-ui/src/assets/images/carbon/head_out.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

BIN
ruoyi-ui/src/assets/images/carbon/head_setting.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

BIN
ruoyi-ui/src/assets/images/carbon/head_title.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
ruoyi-ui/src/assets/images/carbon/head_user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

BIN
ruoyi-ui/src/assets/images/carbon/header_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
ruoyi-ui/src/assets/images/carbon/icon_gf.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
ruoyi-ui/src/assets/images/carbon/item_title.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
ruoyi-ui/src/assets/images/carbon/tb_row_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

9
ruoyi-ui/src/common/menuData.js

@ -307,7 +307,7 @@ export default [
},
],
},
{
/*{
title: "安全生产",
name: "safe",
position: "right",
@ -320,6 +320,13 @@ export default [
component: "safe/files/index.vue",
},
]
},*/
{
title: "零碳能源",
name: "carbon",
position: "right",
path: "/carbon",
component: "developing.vue",
},
{
title: "系统管理",

76
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/RadioGroup/RadioCustom1.vue

@ -0,0 +1,76 @@
<template>
<el-radio-button v-bind="getBind" v-on="$listeners" :style="{ '--active-color': activeColor }" class="custom1">
<slot />
</el-radio-button>
</template>
<script>
export default {
name: 'RadioCustom1',
props: {
activeColor: {
type: String,
default: "linear-gradient(180deg, #FF6969 0%, #FFB904 100%)"
}
},
computed: {
getBind() {
return {
border: true,
...this.$attrs
}
}
}
}
</script>
<style lang='scss' scoped>
label.custom1.el-radio-button {
margin: 0;
height: 27px;
&:first-child {
::v-deep {
span.el-radio-button__inner {
border-radius: 0;
border-left: 1px solid #00B3CC;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
}
}
&.is-active {
::v-deep {
span.el-radio-button__inner {
background: var(--active-color);
}
}
}
&:last-child {
::v-deep {
span.el-radio-button__inner {
border-radius: 0;
border-right: 1px solid #00B3CC;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
}
}
::v-deep {
span.el-radio-button__inner {
border: 0;
border-radius: 0;
border-top: 1px solid #00B3CC;
border-bottom: 1px solid #00B3CC;
font-size: 14px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
}
</style>

12
ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/components/RadioGroup/index.vue

@ -1,6 +1,7 @@
<template>
<ElRadioGroup class='RadioGroup' v-bind="$attrs" v-on="$listeners">
<component :activeColor="activeColor" :is="getComponents()" v-for="item in options" :key="item.key" :label="item.key">
<component :activeColor="activeColor" :is="getComponents()" v-for="item in options" :key="item.key"
:label="item.key">
{{ item.label }}
</component>
</ElRadioGroup>
@ -10,13 +11,15 @@
import Radio from "./Radio.vue"
import RadioButton from "./RadioButton.vue"
import RadioCircle from "./RadioCircle.vue"
import RadioCustom1 from "./RadioCustom1.vue"
export default {
name: 'RadioGroup',
components: {
Radio,
RadioButton,
RadioCircle
RadioCircle,
RadioCustom1
},
props: {
type: {
@ -45,6 +48,8 @@ export default {
return 'RadioButton';
case "circle":
return 'RadioCircle';
case "custom1":
return 'RadioCustom1';
default:
return 'Radio'
}
@ -54,5 +59,6 @@ export default {
</script>
<style lang='scss' scoped>
.RadioGroup {}
.RadioGroup {
}
</style>

6
ruoyi-ui/src/views/JiHeExpressway/components/HeaderMenu/CustomMenu.vue

@ -105,6 +105,12 @@ export default {
window.open(response.msg===''?'https://10.0.86.63:9000/s?loadType=auto&group=15ai1k13748d&runType=box':response.msg);
})
}
else if(node.title==='零碳能源'){
this.activeIndex = key
getConfigKey("carbon").then((response) => {
window.open(response.msg===''?'https://10.0.111.11:100/single?key=jhszyy&route=home':response.msg);
})
}
else if (this.$route.path != node.path){
this.$router.push(node.path);
}

589
ruoyi-ui/src/views/JiHeExpressway/pages/Home/carbon.vue

@ -0,0 +1,589 @@
<template>
<div class="screen-content">
<div class="content-left">
<content-item name="资产概览" class="custom-height">
<el-row class="zcgl-box">
<el-col v-for="(item,index) in zcglData" class="zcgl-item">
<span>
<span class="zcgl-num" :style="{'color':item.color}">{{item.num}}</span>
<span class="zcgl-unit">{{item.unit}}</span>
</span>
<div class="zcgl-name">{{item.name}}</div>
</el-col>
</el-row>
</content-item>
<content-item name="能量分布">
<div class="zdtp-top">
<div class="zdtp-tj">
<span class="name">已检测到排放源类别</span>
<span class="num">76</span>
</div>
<span class="unit">单位tCO</span>
</div>
<ring-chart></ring-chart>
</content-item>
<content-item name="清洁能源发电" >
<div class="scope-box">
<span class="unit">单位tCO</span>
<div class="scope">
<div class="scope-label">
<span class="name" >直接碳排放</span>
<span class="pf-num">{{ scope.zjpf }}</span>
</div>
<div class="pf" :style="{width:scope.zjpf/(scope.zjpf+scope.zjjp)*100 +'%'}"></div>
<div class="jp" :style="{width:scope.zjjp/(scope.zjpf+scope.zjjp)*100 +'%'}"></div>
<div class="scope-label">
<span class="name">直接碳减排</span>
<span class="jp-num">{{ scope.zjjp }}</span>
</div>
</div>
<div class="tzh">
<span class="zh-text">碳中和</span>
<div class="zh-line"></div>
</div>
<div class="scope">
<div class="scope-label">
<span class="name" >间接碳排放</span>
<span class="pf-num">{{ scope.jjpf }}</span>
</div>
<div class="pf" :style="{width:scope.jjpf/(scope.jjpf+scope.jjjp)*100 +'%'}"></div>
<div class="jp" :style="{width:scope.jjjp/(scope.jjpf+scope.jjjp)*100 +'%'}"></div>
<div class="scope-label">
<span class="name">间接碳减排</span>
<span class="jp-num">{{scope.jjjp}}</span>
</div>
</div>
</div>
</content-item>
<content-item name="能耗排名">
<div class="btn-box">
<btn name="日报" @click.native="btnClick('day')" :active="active==='day'"></btn>
<btn name="月报" @click.native="btnClick('month')" :active="active==='month'"></btn>
<btn name="年报" @click.native="btnClick('year')" :active="active==='year'"></btn>
</div>
<sort-bar-chart></sort-bar-chart>
</content-item>
</div>
<div class="content-right">
<content-item name="社会贡献">
<div class="shgx-box">
<el-row class="row">
<el-col class="col" :span="12">
<img src="../../../../assets/images/carbon/icon_gf.png" alt=""/>
<div class="tj">
<span class="num">3452</span>
<span class="unit ml5">万吨</span>
<div class="name">累计节约标准煤</div>
</div>
</el-col>
<el-col class="col" :span="12">
<img src="../../../../assets/images/carbon/icon_gf.png" alt=""/>
<div class="tj">
<span class="num">3452</span>
<span class="unit ml5">万吨</span>
<div class="name">累计减排CO2</div>
</div>
</el-col>
</el-row>
<el-row class="row">
<el-col class="col" :span="12">
<img src="../../../../assets/images/carbon/icon_gf.png" alt=""/>
<div class="tj">
<span class="num">3452</span>
<span class="unit ml5">万吨</span>
<div class="name">累计减排SO2</div>
</div>
</el-col>
<el-col class="col" :span="12">
<img src="../../../../assets/images/carbon/icon_gf.png" alt=""/>
<div class="tj">
<span class="num">3452</span>
<span class="unit ml5">万吨</span>
<div class="name">累计减排NO2</div>
</div>
</el-col>
</el-row>
<el-row class="row">
<el-col class="col" :span="12">
<img src="../../../../assets/images/carbon/icon_gf.png" alt=""/>
<div class="tj">
<span class="num">3452</span>
<span class="unit ml5">万吨</span>
<div class="name">累计减排烟尘</div>
</div>
</el-col>
<el-col class="col" :span="12">
<img src="../../../../assets/images/carbon/icon_gf.png" alt=""/>
<div class="tj">
<span class="num">3452</span>
<span class="unit ml5">万棵</span>
<div class="name">等效植树量</div>
</div>
</el-col>
</el-row>
</div>
</content-item>
<content-item name="全域碳排放">
<div class="btn-box">
<btn name="日报" @click.native="btnClick('day')" :active="active==='day'"></btn>
<btn name="月报" @click.native="btnClick('month')" :active="active==='month'"></btn>
<btn name="年报" @click.native="btnClick('year')" :active="active==='year'"></btn>
</div>
<split-bar-chart :chart-data="tpfChartData"></split-bar-chart>
</content-item>
<content-item name="碳中和分析">
<div class="btn-box">
<btn name="日报" @click.native="btnClick('day')" :active="active==='day'"></btn>
<btn name="月报" @click.native="btnClick('month')" :active="active==='month'"></btn>
<btn name="年报" @click.native="btnClick('year')" :active="active==='year'"></btn>
</div>
<line-charts></line-charts>
</content-item>
<content-item name="碳排放强度排名">
<div class="btn-box">
<btn name="日报" @click.native="btnClick('day')" :active="active==='day'"></btn>
<btn name="月报" @click.native="btnClick('month')" :active="active==='month'"></btn>
<btn name="年报" @click.native="btnClick('year')" :active="active==='year'"></btn>
</div>
<sort-bar-chart></sort-bar-chart>
</content-item>
</div>
</div>
</template>
<script>
import ContentItem from './components/carbon/contentItem/index'
import lineCharts from "./components/carbon/echarts/lineCharts";
import SplitBarChart from "./components/carbon/echarts/SplitBarChart";
import btn from './components/carbon/btn/index'
import scroll from "vue-seamless-scroll";
import SortBarChart from "./components/carbon/echarts/SortBarChart";
import RingChart from "./components/carbon/echarts/RingChart";
export default {
name: "carbon",
components: {
ContentItem,
RingChart, lineCharts, btn, SplitBarChart, scroll, SortBarChart
},
data() {
return {
active:'day',
tpfChartData:{
xData:['1日','2日','3日','4日','5日','6日','7日','8日','9日','10日','11日'],
yData:{
name:'',
unit:'单位: tCO₂',
data:[54,55,465,465,584,321,365,51,321,32,31]
}
},
tableData:[
{
siteName:'大学城收费站',
happenTime:'2024-10-01 10:00:00',
warningContent:'碳排放异常',
dealStatus:0
},
{
siteName:'大学城收费站',
happenTime:'2024-10-01 10:00:00',
warningContent:'碳排放异常',
dealStatus:0
},
{
siteName:'大学城收费站',
happenTime:'2024-10-01 10:00:00',
warningContent:'碳排放异常',
dealStatus:1
},
{
siteName:'长清城收费站',
happenTime:'2024-10-01 10:00:00',
warningContent:'碳排放异常',
dealStatus:0
},
{
siteName:'长清收费站',
happenTime:'2024-10-01 10:00:00',
warningContent:'碳排放异常',
dealStatus:0
},
{
siteName:'长清收费站',
happenTime:'2024-10-01 10:00:00',
warningContent:'碳排放异常',
dealStatus:0
},
{
siteName:'长清收费站',
happenTime:'2024-10-01 10:00:00',
warningContent:'碳排放异常',
dealStatus:0
},
{
siteName:'孝里收费站',
happenTime:'2024-10-01 10:00:00',
warningContent:'碳排放异常',
dealStatus:0
},
],
zcglData:[
{
num:'3452',
unit:'MW',
name:'光伏装机容量',
color:'#00D1FF'
},
{
num:'3452',
unit:'MW',
name:'风电装机容量',
color:'#00D1FF'
},
{
num:'3452',
unit:'MWh',
name:'储能总容量',
color:'#00EBC1'
},
{
num:'3452',
unit:'台',
name:'充电桩数量',
color:'#FFDB82'
},
],
scope:{
zjpf:546,
zjjp:3698,
jjpf:2547,
jjjp:2354
}
}
},
computed: {
defaultOption() {
return {
step: 0.1, //
limitMoveNum: 5, // this.dataList.length
hoverStop: true, // stop
direction: 1, // 0 1 2 3
openWatch: true, // dom
singleHeight: 0, // (0) direction => 0/1
singleWidth: 0, // (0) direction => 2/3
waitTime: 3000, // (1000ms)
};
},
},
methods:{
btnClick(val) {
if (val) {
this.active = val
this.getEnergyAnalysisBySiteCode()
}
},
}
}
</script>
<style lang="scss" scoped>
.screen-content{
/*height: calc(100vh - 68px);
width: 100%;
padding-top: 15px;
position: relative;*/
height: 100%;
width: 100%;
display: flex;
//flex-direction: column;
justify-content: space-between;
}
.content-left,.content-right{
// position: absolute;
//top: 0;
z-index: 1;
width: 500px;
height: calc(100% - 4px);
display: flex;
flex-direction: column;
justify-content: space-around;
}
.content-left{
left: 0;
padding: 5px 0 0 20px;
background: linear-gradient(to right, rgba(20, 26, 41, 0.7), rgba(20, 26, 41, 0.5), rgba(20, 26, 41, 0));
align-items: start;
}
.content-right{
right: 0;
padding: 5px 20px 0 0;
background: linear-gradient(to left, rgba(20, 26, 41, 0.7), rgba(20, 26, 41, 0.5), rgba(20, 26, 41, 0));
float: right;
align-items: end;
}
.btn-box{
position: absolute;
display: flex;
z-index: 2;
}
.my-table{
margin-top: 9px;
height: 91%;
overflow: hidden;
width: 100%;
.table-header{
width: 100%;
height: 22px;
display: flex;
margin-bottom: 4px;
background:#006E91;
justify-content: space-between;
line-height: 22px;
color: #e3e3e3;
font-size: 12px;
}
.table-row{
display: flex;
justify-content: space-between;
color: #e3e3e3;
height: 24px;
line-height: 24px;
margin-bottom: 4px;
cursor: pointer;
font-size: 12px;
}
.table-row-db{
background-image: url("../../../../assets/images/carbon/tb_row_bg.png");
background-size: 100% 100%;
}
.table-row:hover{
background: linear-gradient(to right,#45B9D2, rgba(1, 71, 129, 0));
color: #FFD234;
}
.table-column{
text-align: start;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding: 0 5px;
align-items: center;
}
.w1{
width: 70px;
}
.w2{
width: 85px;
}
.w3{
width: 130px;
}
.w4{
width: 70px;
}
.scrollStyle {
height: 330px;
overflow: auto;
}
::v-deep *::-webkit-scrollbar {
width: 0px;
height: 16px;
background-color: transparent;
}
}
.shgx-box{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
padding: 8px;
.row{
width: 100%;
height: 30%;
//margin-bottom: 8px;
.col{
height: 100%;
background-image: url("../../../../assets/images/carbon/data_bg2.png");
background-size: 100% 100%;
display: flex;
justify-content: center;
align-items: center;
img{
height: 36px;
margin: 0 15px;
}
span{
background: linear-gradient(to bottom, #E8F7FF , #01D1FF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent; /* 这行代码很重要,它确保了文本本身是透明的,从而显示出背景 */
text-align: left;
font-weight: 600;
line-height: 15px;
letter-spacing: 1px;
font-style: normal;
text-transform: none;
}
.num{
font-size: 18px;
}
.unit{
font-size: 10px;
}
.name{
font-size: 12px;
color: #FFFFFF;
}
.tj{
width: calc(100% - 66px);
}
}
}
}
.zcgl-box{
height:100%;
padding: 15px 20px;
text-align: center;
.zcgl-item {
height: calc(50% - 12px);
width: calc(50% - 12px);
margin: 6px;
background: url('../../../../assets/images/carbon/data_bg1.png') no-repeat;
background-size: 100% 60%;
background-position: center bottom;
display: flex;
flex-direction: column;
justify-content: end;
.zcgl-num {
color: #00afff;
font-size: 20px;
font-weight: 600;
margin-right: 5px;
}
.zcgl-unit {
color: #FFFFFF;
font-size: 12px
}
.zcgl-name{
color: #FFFFFF;
display: block;
margin: 10px 0 7px 0;
font-size: 14px;
}
}
}
.zdtp-top{
height: 30px;
.zdtp-tj{
display: inline-block;
width: 274px;
height: 21px;
background-image: url("../../../../assets/images/carbon/data_bg1.png");
background-size: 100% 100%;
text-align: center;
margin: 9px 20px 0 20px;
.name{
font-size: 12px;
color: #FFFFFF;
margin-right: 10px;
}
.num{
font-size: 14px;
color: #F4B149;
line-height: 14px;
text-shadow: 0 1px 4px #F29600;
}
}
.unit{
color: #FFFFFF;
font-size: 12px;
}
}
.scope-box{
height: 100%;
//padding: 25px;
width: 100%;
position: relative;
.unit{
color: #fff;
font-size: 12px;
height: 30px;
line-height: 30px;
float: right;
margin-right: 15px
}
.scope{
display: flex;
align-items: center;
height: calc(50% - 30px);
width: calc(100% - 30px);
margin: 0 15px 15px 15px;
background-image: url("../../../../assets/images/carbon/data_bg2.png");
background-size: 100% 100%;
.pf{
width: 50%;
height: 30%;
background: linear-gradient(to right, rgba(255, 214, 0, 0), rgba(255, 214, 0, 0.84));
border-radius: 0 50px 50px 0;
border-right: 3px solid #FFD600;
color: #fff;
}
.pf:hover {
border: 1px solid #FFD600;
}
.jp{
width: 50%;
height: 30%;
background: linear-gradient(to left, rgba(0, 233, 149, 0), rgba(0, 233, 149, 0.76));
border-radius: 50px 0 0 50px;
border-left: 3px solid #00E995;
color: #fff;
}
.scope-label{
width: 100px;
text-align: center;
.name{
font-size: 12px;
color: #fff;
}
.pf-num{
font-size: 18px;
color: #FFCD1D;
}
.jp-num{
font-size: 18px;
color: #00E995;
}
span{
display: block;
}
}
}
.tzh{
height: 100%;
position: absolute;
left: 45.3%;
display: flex;
flex-direction: column;
align-items: center;
top: 0;
.zh-text{
height: 30px;
color: #fff;
line-height: 30px;
}
.zh-line{
border-left: 1px dashed orange;
width: 1px;
height: calc(100% - 35px);
}
}
}
.custom-height{
height: 190px !important;
}
</style>

67
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/btn/index.vue

@ -0,0 +1,67 @@
<template>
<div :class="{'btn':true,'big':size==='big','normal':size==='normal','small':size==='small','mini':size==='mini','selected':active}" >{{ name }}</div>
</template>
<script>
export default {
name: "index",
props: {
name: {
type: String,
default: '',
required:true
},
active: {
type: Boolean,
default: false
},
size:{
type:String,
default:'normal'
}
},
watch:{
size(val){
console.log(val)
}
}
}
</script>
<style lang="scss" scoped>
.btn {
text-align: center;
line-height: 20px;
color: #FFFFFF;
cursor: pointer;
border-radius: 1px;
background-image: url("../../../../../../../assets/images/carbon/btn_normal.png");
background-size: 100% 100%;
}
.normal{
font-size: 10px;
width: 56px;
height: 20px;
line-height: 20px;
margin: 9px 5px 9px 0;
}
.small{
font-size: 10px;
width: 45px;
height: 18px;
line-height: 18px;
margin: 0;
}
.big{
font-size: 12px;
width: 76px;
height: 24px;
line-height: 24px;
margin: 7px 10px 7px 0;
}
.mini{}
.selected {
background-image: url("../../../../../../../assets/images/carbon/btn_active.png");
}
</style>

83
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/contentItem/index.vue

@ -0,0 +1,83 @@
<template>
<!-- <div class="content-item" @mouseenter="transitionAnimation">-->
<div class="content-item" :style="{height: height}">
<transition name="el-zoom-in-center">
<div class="item-title-bg" v-show="show">
<div class="text" :data-text="name">{{ name }}</div>
</div>
</transition>
<transition name="el-zoom-in-center">
<div class="item-content" v-show="show">
<slot></slot>
</div>
</transition>
</div>
</template>
<script>
export default {
name: "index",
props: ['name', 'transition','height'],
data() {
return {
show: true,
};
},
mounted() {
this.transitionAnimation()
},
methods: {
transitionAnimation() {
this.show = false;
setTimeout(() => {
this.show = true;
}, 500);
}
}
}
</script>
<style lang="scss" scoped>
.content-item {
height: calc(25% - 5px);
width: 400px;
margin-bottom: 5px;
background-color: rgba(18, 232, 232, 0);
.item-title-bg {
display: flex;
align-items: center;
height: 30px;
width: 100%;
background-image: url("../../../../../../../assets/images/carbon/item_title.png");
background-size: 100% 100%;
.text {
background: linear-gradient(to bottom, #fff, #4DD4FF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent; /* 这行代码很重要,它确保了文本本身是透明的,从而显示出背景 */
font-size: 18px; /* 你可以根据需要调整字体大小 */
text-align: left;
font-weight: 600;
line-height: 23px;
margin-left: 16px;
letter-spacing: 1px;
font-style: normal;
text-transform: none;
//text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); /* */
}
}
.item-content {
height: calc(100% - 30px);
background-color: rgba(21, 46, 60, 0.64);
border-width: 2px;
/* 使用 border-image 属性 */
border-image: linear-gradient(to bottom, rgba(40, 144, 167, 0), rgba(40, 144, 167, 0.7)) 1;
/* 确保边框是连续的,而不是间隔的 */
border-style: solid;
}
}
</style>

346
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/RingChart.vue

@ -0,0 +1,346 @@
<template>
<div :class="className" :style="{height:height,width:width}"/>
</template>
<script>
import * as echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: 'calc(100% - 30px)'
}
},
data() {
return {
chart: null,
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el)
this.setOption()
},
setOption() {
this.chart.setOption(
{
grid: {
top: '100%',
left: '3%',
right: '4%',
bottom: '5%',
containLabel: true,
},
legend: {
orient: 'vertical',
show: true,
right: '8%',
y: 'center',
itemWidth: 5,
itemHeight: 5,
itemGap: 10,
textStyle: {
color: '#e1e1e1',
fontSize: 14,
lineHeight: 20,
rich: {
percent: {
color: '#37E7FF',
fontSize: 14,
},
},
},
formatter: name => {
switch (name) {
case '办公用电':
return (
'办公用电\r{percent|30%}'
);
case '空调用电':
return (
'空调用电\r{percent|30%}'
);
case '路域用电':
return (
'路域用电\r{percent|40%}'
);
case '收费岛用电':
return (
'收费岛用电\r{percent|40%}'
);
default:
break;
}
},
},
graphic: {
type: 'text',
left: '26%', //
top: '45%', //
style: {
text: '60%',
textAlign: 'center',
fill: '#fff', //
fontSize: 16 //
},
z: 100 //
},
tooltip: {
show: true,
},
series: [
{
type: 'pie',
radius: ['43%', '70%'],
center: ['30%', '50%'],
z:1,
//hoverAnimation: false,
avoidLabelOverlap: false,
padAngle: 5,
itemStyle: {
borderRadius: 3
},
/* label: {
position: 'center',
formatter: () => {
return '作业总数\r\n{total|100} 个';
},
rich: {
total: {
fontSize: 30,
color: '#fff',
},
},
color: '#7a8c9f',
fontSize: 16,
lineHeight: 30,
},*/
data: [
{
value: 30,
name: '办公用电',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: '#FFF1A2'
},
{
offset: 1,
color: '#FFB905'
}
]),
},
},
{
value: 30,
name: '空调用电',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: '#61D8FF'
},
{
offset: 1,
color: '#0BA7DA'
}
]),
},
},
{
value: 40,
name: '路域用电',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: '#8EBBFF'
},
{
offset: 1,
color: '#5973FF'
}
]),
},
},
{
value: 40,
name: '收费岛用电',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: '#6AF4DA'
},
{
offset: 1,
color: '#0FE9A7'
}
]),
},
}
],
labelLine: {
show: false,
},
label: {
show: false,
}
},
{
type: 'pie',
radius: [0, '38%'],
center: ['30%', '50%'],
hoverAnimation: false,
tooltip:{
show:false,
},
label: {
show:false,
},
labelLine: {
show: false
},
itemStyle: {
color: '#02a6ff',
opacity: 0.4,
},
data: [
{ value: 0 }
]
},
{
type: 'pie',
hoverAnimation: false,
z:2,
radius: [0, '60%'],
center: ['30%', '50%'],
tooltip:{
show:false,
},
label: {
show:false,
},
labelLine: {
show: false
},
itemStyle: {
color: '#163A45',
opacity: 0.9,
},
data: [
{ value: 0 }
]
},
{
type: 'pie',
z: 4,
silent: true,
radius: ['51%', '52%'],
center: ['30%', '50%'],
label: {
show: false
},
labelLine: {
show: false
},
data: _pie3()
},
/*{
type: 'pie',
radius: ['45%', '75%'],
center: ['20%', '50%'],
//hoverAnimation: false,
padAngle: 5,
itemStyle: {
borderRadius: 5,
color: '#0286ff',
opacity: 0.4,
},
label: {
show: false,
},
data: [
{
value: 30,
name: '运行中'
},
{
value: 30,
name: '已停止'
},
{
value: 40,
name: '未上线'
},
],
labelLine: {
show: false,
},
}*/
],
}
)
function _pie3() {
let dataArr = [];
for (var i = 0; i < 100; i++) {
if (i % 2 === 0) {
dataArr.push({
//name: (i + 1).toString(),
value: 25,
itemStyle: {
normal: {
color: "#1ABAF0",
borderWidth: 0,
borderColor: "rgba(0,0,0,0)"
}
}
})
} else {
dataArr.push({
//name: (i + 1).toString(),
value: 20,
itemStyle: {
normal: {
color: "rgba(0,0,0,0)",
borderWidth: 0,
borderColor: "rgba(0,0,0,0)"
}
}
})
}
}
return dataArr
}
}
}
}
</script>
<style scoped>
</style>

271
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/SortBarChart.vue

@ -0,0 +1,271 @@
<template>
<div :class="className" :style="{height:height,width:width}"/>
</template>
<script>
import * as echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '17.63vh'
}
},
data() {
return {
chart: null,
chartData:[
{
value: 239,
name: "大学城收费站"
},
{
"value": 181,
"name": "长清收费站"
},
{
"value": 154,
"name": "孝里收费站"
},
{
"value": 144,
"name": "平阴北收费站"
},
{
"value": 135,
"name": "平阴收费站"
},
{
"value": 117,
"name": "平阴南收费站"
},
{
"value": 74,
"name": "梁山东收费站"
},
{
"value": 52,
"name": "嘉祥西收费站"
}
],
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el)
this.setOption()
},
setOption() {
let that = this
this.chart.setOption(
{
tooltip: {
show: false,
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
show: false
},
grid: {
left: '42%',
right: '14%',
bottom: '2%',
top: '26%',
//containLabel: true
},
xAxis: {
show: false,
type: 'value'
},
yAxis: [
{
type: 'category',
inverse: true,
axisLine: {
show: false
},
axisTick: {
show: false
},
axisPointer: {
label: {
show: false,
margin: 30
}
},
data: that.chartData.map(item => item.name),
axisLabel: {
margin: 150,
fontSize: 14,
align: 'left',
color: '#ffffff',
rich: {
a1: {
color: '#fff',
backgroundColor: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: '#FFB904'
},
{
offset: 1,
color: '#FF6969'
}
]),
width: 45,
height: 18,
align: 'center',
borderRadius: 5
},
b: {
color: '#fff',
backgroundColor: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: '#61D8FF'
},
{
offset: 1,
color: '#0BA7DA'
}
]),
width: 45,
height: 18,
align: 'center',
borderRadius: 5
}
},
formatter: function (params) {
let index = that.chartData.map(item => item.name).indexOf(params);
index = index + 1;
if (index - 1 < 1) {
return [
'{a1|TOP' + index + '}' + ' ' + params
].join('\n')
} else {
return [
'{b|TOP' + index + '}' + ' ' + params
].join('\n')
}
}
}
},
{
type: 'category',
inverse: true,
axisTick: 'none',
axisLine: 'none',
show: true,
data: that.chartData.map(item => item.value),
axisLabel: {
show: true,
fontSize: 14,
color: '#ffffff',
formatter: '{value}'
}
}],
series: [
{
z: 2,
name: 'value',
type: 'bar',
barWidth: 8,
zlevel: 1,
data: that.chartData.map((item, i) => {
let itemStyle = {
barBorderRadius: 30,
color: i > 0
? new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: '#61D8FF'
},
{
offset: 1,
color: '#0BA7DA'
}
])
: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: '#FFB904'
},
{
offset: 1,
color: '#FF6969'
}
]),
}
return {
value: item.value,
itemStyle: itemStyle
};
}),
label: {//
show: false,
position: 'right',
color: '#e70a0a',
fontSize: 14,
offset: [10, 0]
}
}
],
dataZoom: [
{
yAxisIndex: [0, 1], //X0
show: false, //使
type: "slider", // dataZoom slider dataZoom
startValue: 0, //
endValue: 3, //
},
{
//
//
type: "inside",
// y
yAxisIndex: [0, 1],
//
zoomOnMouseWheel: false,
//
moveOnMouseMove: true,
//
moveOnMouseWheel: true,
}
],
}
)
}
},
}
</script>
<style scoped>
</style>

192
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/SplitBarChart.vue

@ -0,0 +1,192 @@
<template>
<div ref="echarts" :class="className" :style="{width: width, height: height}"></div>
</template>
<script>
import * as echarts from 'echarts'
import resize from './mixins/resize'
export default {
mixins: [resize],
components: {},
name: 'SplitBarChart',
data() {
return {
chart: null,
}
},
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '100%'
},
autoResize: {
type: Boolean,
default: true
},
chartData: {
type: Object,
required: true
}
},
watch: {
chartData: {
deep: true,
handler(val) {
this.setOptions(val)
}
}
},
mounted() {
this.$nextTick(() => {
//this.getData()
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$refs.echarts)
this.setOptions(this.chartData)
},
setOptions({xData, yData} = {}) {
let series = [], unit = ''
if (yData.unit) unit = yData.unit
let seriesBarDefault = {
type: 'pictorialBar',
name: yData.name?yData.name:'',
itemStyle: {
color:yData.color?yData.color:'#20E6FE'
/*normal: {
// color: 'rgba(70,179,250,1)'
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#20E6FE'
},
{
offset: 1,
color: '#007EAE'
}
])
}*/
},
yAxisIndex: 0,
symbolRepeat: 'fixed',
barWidth:'60%',
barGap: 0.01, //
symbolMargin: 1,
symbol: 'rect',
symbolClip: true,
symbolSize: [8, 4],
symbolOffset: [0, 0],
data:yData.data?yData.data:[]
}
series.push(seriesBarDefault)
let options = {
title:{
show:true,
text:unit,
textStyle:{
color:'#e3e3e3',
fontSize: 12,
fontWeight:500
},
right:'0%',
top: '4%',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
},
legend: {
show: true,
icon: 'circle',
top: '4%',
right: '15%',
itemHeight: 10,
itemWidth: 10,
//data: legend,
textStyle: {
//
color: '#e3e3e3',
fontSize: 1
}
},
grid: {
left: '2%',
right: '1%',
bottom: '5%',
top: '30%',
containLabel: true
},
xAxis: {
type: 'category',
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: '#F1F1F1'
}
},
axisLabel: {
color: '#e3e3e3'
},
data: xData,
},
yAxis: [
{
//name: unit,
type: 'value',
splitLine: {
show: true,
lineStyle:{
type:5,
width:1,
color: '#104266' , //x线
}
},
axisLabel: {
color: '#e3e3e3'
}
}
],
series: series,
dataZoom: [
{
xAxisIndex: 0, //X0
show: false, //使
type: "inside", // dataZoom slider dataZoom
startValue: 0, //
endValue: 10, //
}
],
animation:false,
//animationDuration: 0,//
//animationEasing: 'cubicInOut'//
}
this.chart.setOption(options,true)
}
}
}
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>

264
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/lineCharts.vue

@ -0,0 +1,264 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
</template>
<script>
import * as echarts from 'echarts'
import {duoyuan} from './realData'
import {parseTime} from '@/utils/ruoyi'
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '17.63vh'
}
},
watch: {
data: {
deep: true,
handler: function (newV, oldV) {
this.setOption()
}
}
},
data() {
return {
chart: null,
timer: null,
value: 18,
yuan:duoyuan,
xData:[],
pvData:[],
loadData:[],
electricData:[]
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
created() {
this.$nextTick(()=>{
//
var now = new Date();
let nowTime = parseInt(now.getTime());
let dateStr = parseTime(now,'{y}-{m}-{d}')
if(this.yuan){
this.yuan.forEach(e=>{
e.time = e.time.replace(e.time.substr(0,10),dateStr);
let cTime = this.dateStrChangeTimeTamp(e.time)
if(cTime<nowTime){
this.xData.push(e.time)
this.pvData.push(e.photovoltaicMeter)
this.loadData.push(e.loadMeter)
this.electricData.push(e.electricMeter)
}
})
}
})
},
methods: {
//
//var date = '2015-03-05 17:59:00.0';
dateStrChangeTimeTamp(dateStr){
dateStr = dateStr.substring(0,19);
dateStr = dateStr.replace(/-/g,'/');
return new Date(dateStr).getTime();
},
initChart() {
this.chart = echarts.init(this.$el)
this.setOption()
},
setOption() {
this.chart.setOption({
backgroundColor: 'rgba(255,255,255,0)',
// dataZoom: [
// {
// moveOnMouseMove: true,
// type: 'slider',
// show: false,
// xAxisIndex: [0],
// start: 0,
// end: 30, //
// minValueSpan: 7,
// maxValueSpan: 7
// },
// {
// type: 'inside',
// xAxisIndex: 0,
// zoomOnMouseWheel: false, //
// moveOnMouseMove: true, //
// moveOnMouseWheel: true
// }
// ],
tooltip: {
trigger: 'axis',
backgroundColor: 'rgba(1, 29, 63, .8)', //
textStyle: {
color: '#fff',
fontSize: 12
},
borderColor: 'rgba(1, 29, 63,.8)',
axisPointer: {
type: 'shadow',
shadowStyle: {
fontSize: 12,
color: 'rgba(0, 11, 34, 0)'
}
}
},
title: {
text: '单位(tCO₂)',
textStyle: {
fontSize: 11,
fontWeight: 'normal',
color: '#FFFFFF' //
},
top: '3%',
right: '2%'
},
legend: {
icon: 'circle',
itemWidth: 7,
itemHeight: 7,
data: ['碳排放', '碳减排'],
right: '25%',
top: '3%',
textStyle: {
fontSize: 11,
color: '#FFFFFF'
}
},
grid: {
top: '32%',
left: '4%',
right: '2%',
bottom: '2%',
containLabel: true
},
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
color: 'rgba(143, 169, 192, 0.60)'
}
},
axisLabel: {
color: '#FFFFFF'
},
axisTick: {
show: false
},
data: this.xData
},
yAxis: {
type: 'value',
// interval: 100,
axisLine: {
lineStyle: {
color: 'rgba(143,169,192,0.7)'
}
},
axisLabel: {
margin: 18,
fontSize: 10,
color: '#FFFFFF'
},
splitLine: {
lineStyle: {
//type: 'dashed',
color: 'rgba(143,169,192,0.25)'
}
}
},
series: [
{
name: '碳排放',
type: 'line',
smooth: true,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
zlevel: 1,
z: 1,
lineStyle: {
width: 1.5
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#E2BA74'
},
{
offset: 0.9,
color: 'rgba(226,186,116,0.1)'
}
], false),
shadowBlur: 10
},
itemStyle: {
color: '#E2BA74',
borderWidth: 30
},
data: this.pvData
},
{
name: '碳减排',
type: 'line',
smooth: true,
symbol: 'circle',
zlevel: 1,
z: 1,
symbolSize: 5,
showSymbol: false,
lineStyle: {
width: 1.5
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(50,187,138,0.7)'
},
{
offset: 0.9,
color: 'rgba(50,187,138,0.1)'
}
], false),
shadowBlur: 10
},
itemStyle: {
color: '#32BB8A',
borderWidth: 30
},
data: this.electricData
}
]
})
}
}
}
</script>
<style scoped>
</style>

56
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/mixins/resize.js

@ -0,0 +1,56 @@
import { debounce } from '@/utils'
export default {
data() {
return {
$_sidebarElm: null,
$_resizeHandler: null
}
},
mounted() {
this.initListener()
},
activated() {
if (!this.$_resizeHandler) {
// avoid duplication init
this.initListener()
}
// when keep-alive chart activated, auto resize
this.resize()
},
beforeDestroy() {
this.destroyListener()
},
deactivated() {
this.destroyListener()
},
methods: {
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_sidebarResizeHandler(e) {
if (e.propertyName === 'width') {
this.$_resizeHandler()
}
},
initListener() {
this.$_resizeHandler = debounce(() => {
this.resize()
}, 100)
window.addEventListener('resize', this.$_resizeHandler)
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
},
destroyListener() {
window.removeEventListener('resize', this.$_resizeHandler)
this.$_resizeHandler = null
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
},
resize() {
const { chart } = this
chart && chart.resize()
}
}
}

1954
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/carbon/echarts/realData.js

File diff suppressed because it is too large

29
ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue

@ -1,7 +1,7 @@
<template>
<div style="width: 100%;height: 100%;">
<div style="width: 100%;height: 100%;position: relative">
<component :is="mapContainer" ref="MapContainerRef" @update:isGisCompleted="(data) => { this.isGisCompleted = data; }" />
<div class="Home">
<div class="Home" v-show="jnValue==='1'">
<section class="content">
<!-- 左侧 -->
<div class="content-l">
@ -37,6 +37,13 @@
</div>
</footer>
</div>
<carbon v-if="jnValue==='2'"/>
<!-- 交能切换 -->
<radio-group :options="[
{ key: '1', label: '交' },
{ key: '2', label: '能' },
]" class="jn-radio" type="custom1" v-model="jnValue" size="mini" />
</div>
</template>
@ -60,7 +67,8 @@ import RoadAndEvents from "./components/RoadAndEvents/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Vue from "vue";
import BMapContainer from "./components/BMapContainer/index.vue";
import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/index.vue";
import Carbon from "./carbon";
export default {
name: "Home",
components: {
@ -79,13 +87,16 @@ export default {
HomeWord,
HomeWeather,
HomeWeatherLayer,
HomeTraffic
HomeTraffic,
RadioGroup,
Carbon
},
data() {
return {
selectedDevice: null,
isGisCompleted: false,
mapContainer:'BMapContainer'
mapContainer:'BMapContainer',
jnValue:'1'
};
},
provide() {
@ -121,7 +132,7 @@ export default {
translateXElement.style.transform = `translateY(0)`;
translateXElement.style.position = `relative`;
}
},
}
},
};
</script>
@ -248,4 +259,10 @@ export default {
}
}
}
.jn-radio{
position: absolute;
top: 16px;
left: 22.6%;
z-index: 2;
}
</style>

22
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/CrowdnessIndicatorRankings/index.vue

@ -228,7 +228,11 @@ export default {
offset: [0,-48],
size: [42,100],
GGoffsetX: 0,
GGoffsetY: 20,
GGoffsetY: -5,
GGimgOffset:[0,0],
GGimgsize:[42,103],
GGstakeOffsetY:45,
stakeOffsetY:25,
otherInfo: {
ext: null,
name: e.deviceName,
@ -334,6 +338,14 @@ export default {
latitude: parseFloat(e.latitude),
// iconUrl: e.useState ? icon : icon_f,
iconUrl: iconUrl,
offset: [0,-48],
size: [42,100],
GGoffsetX: 0,
GGoffsetY: -5,
GGimgOffset:[0,0],
GGimgsize:[42,103],
GGstakeOffsetY:45,
stakeOffsetY:25,
otherInfo: {
ext: null,
name: e.deviceName,
@ -442,6 +454,14 @@ export default {
longitude: center[0], //
latitude: center[1], //
iconUrl: icon, //
offset: [0,-48],
size: [42,100],
GGoffsetX: 0,
GGoffsetY: -5,
GGimgOffset:[0,0],
GGimgsize:[42,103],
GGstakeOffsetY:45,
stakeOffsetY:25,
otherInfo: {
name: '123'
}

193
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/ReleaseInformation/index.vue

@ -31,7 +31,7 @@
<div class="bottom">
<Button
v-if="detailData.eventState != 2"
@click.native="handleSubmit"
@click.native="openDialog"
:loading="submitting"
class="title-button special-button"
>
@ -41,11 +41,66 @@
发布预案
</ButtonGradient> -->
</div>
<Dialog
title="接收人"
v-model="dialogVisible"
width="1000px"
>
<div class="StatsDetail">
<el-form ref="dialogForm" :model="dialogForm">
<el-table :data="tableData">
<el-table-column
prop="organizationName"
label="路管驻点"
width="180"
align="center"
>
</el-table-column>
<el-table-column
prop="difference"
label="距离"
width="180"
align="center"
>
<template slot-scope="scope">
<span>{{ scope.row.difference }}公里</span>
</template>
</el-table-column>
<el-table-column label="人员" align="center">
<template slot-scope="scope">
<div style="max-height: 100px;overflow-y: auto;">
<el-checkbox-group v-model="dialogForm.employees">
<el-checkbox
v-for="item in scope.row.employeesList"
:key="item.id"
:label="item.id"
>{{ item.name }}</el-checkbox
>
</el-checkbox-group>
</div>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<template #footer>
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(dialogVisible = false), (submitting = false)"
>
关闭
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定</Button>
</template>
</Dialog>
</Card>
</template>
<script>
import Card from "@screen/components/Card2/Card.vue";
import Dialog from "@screen/components/Dialog/index.vue";
import Card from "@screen/components/Card2/Card.vue";
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
@ -58,6 +113,7 @@ export default {
name: "ReleaseInformation",
mixins: [provideMixin],
components: {
Dialog,
Card,
ButtonGradient,
CheckboxGroup,
@ -72,13 +128,13 @@ export default {
this.eventId = newValue.id;
this.bindChannels();
this.bindEmployees(newValue.stakeMark);
// console.log("", this.provideDetail);
},
},
data() {
return {
list: [
{
label: "情报板",
@ -116,6 +172,12 @@ export default {
// default: [],
// },
],
dialogVisible:false,
dialogForm:{
employees:[]
},
tableData:[],
};
},
mounted() {
@ -139,7 +201,21 @@ export default {
}, 1000);
},
async handleSubmit() {
bindEmployees(stakeMark){
setTimeout(() => {
request({
url: `/business/employees/getAllEmployees`,
method: "get",
params: {stakeMark: stakeMark }
}).then((result) => {
if(result && result.length > 0){
this.tableData = result
}
})
}, 1000);
},
async openDialog(){
await this.$refs.FormMsgRef.validate()
.then(async (res) => {
let data = _.cloneDeep(res);
@ -158,14 +234,27 @@ export default {
}
data.eventId = this.detailData.id;
data.stakeMark = this.detailData.stakeMark
console.log(this.detailData)
for (let key in data) {
if (data.hasOwnProperty(key)) {
this.dialogForm[key] = data[key];
}
}
this.dialogVisible = true
})
.catch((err) => {
console.log("catch" + err);
});
},
async handleSubmit() {
this.submitting = true;
await request({
url: `/business/sms/pushAll`,
method: "post",
data: data,
})
.then((result) => {
data: this.dialogForm,
}).then((result) => {
if (result.code != 200) return this.$message.error(result?.msg);
this.$message.success("提交成功");
this.reload();
@ -175,10 +264,7 @@ export default {
})
.finally(() => {
this.submitting = false;
});
})
.catch((err) => {
console.log("catch" + err);
this.dialogVisible = false;
});
},
},
@ -243,4 +329,87 @@ export default {
}
}
}
::v-deep .el-table__empty-text {
color: #3ae0f8;
}
.StatsDetail {
// height: 770px;
margin: 20px 0;
width: 100%;
display: flex;
gap: 5px;
}
.el-table {
border: 1px solid #07aec6;
background: #0b6581;
}
@media (min-width: 3000px) {
::v-deep .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
height: 55px !important;
background: #0b6581;
border: 1px solid #07aec6;
font-size: 22px;
}
::v-deep .el-table td.el-table__cell div{
font-size: 22px;
}
}
::v-deep .el-table .el-table__header-wrapper th,
.el-table .el-table__fixed-header-wrapper th {
background: #0b6581;
border: 1px solid #07aec6;
}
::v-deep .el-table th.el-table__cell > .cell {
color: #3de8ff;
}
::v-deep .el-table thead.is-group th.el-table__cell {
background: #0b6581;
border: 1px solid #07aec6;
}
// ::v-deep .el-table th.el-table__cell.is-leaf,
::v-deep .el-table td.el-table__cell {
border: 1px solid #07aec6;
background: #1b586d;
color: #fff;
}
::v-deep .el-table td.el-table__cell div {
line-height: 30px;
}
::v-deep .el-checkbox-group {
text-align: left;
.el-checkbox {
min-width: 70px;
}
}
::v-deep .el-table tr {
border: 1px solid #07aec6;
background-color: #0b6581;
}
::v-deep
.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
background: #1b586d;
border: 1px solid #07aec6;
}
::v-deep .el-table::before,
.el-table--group::after,
.el-table--border::after {
background: none;
}
.footer {
margin-top: 20px;
display: flex;
}
</style>

125
ruoyi-ui/src/views/JiHeExpressway/pages/service/publicService/components/record/index.vue

@ -15,17 +15,16 @@
</template>
刷新
</ButtonGradient>
<span class="sum-total">发布数量{{ sumtotal }}</span>
</div>
<InputSearch ref="searchComp" style="width: 480px" :formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }" @handleSearch="handleSearch" />
</div>
<!-- 内容 -->
<div class="body">
<Table :data="tableData">
<el-table-column label="序号" type="index" :index="indexMethod" width="100" align="center"
header-align="center" />
<ElTableColumn label="发布渠道" prop="publishChannels" width="120" align="center" header-align="center">
<template slot-scope="scope">
{{ enum_channels[scope.row.publishChannels] }}
@ -34,40 +33,33 @@
<ElTableColumn label="发布时间" prop="publishTime" align="center" width="200" header-align="center" />
<ElTableColumn label="操作IP" prop="ip" align="center" width="250" header-align="center">
<template slot-scope="scope">
{{ (scope.row.ip === 'unknown' || !scope.row.ip) ? '服务器': scope.row.ip}}
{{ (scope.row.ip === 'unknown' || !scope.row.ip) ? '服务器' : scope.row.ip }}
</template>
</ElTableColumn>
<ElTableColumn label="位置/设备" prop="position" align="center" width="260" header-align="center">
<template slot-scope="scope">
{{ scope.row.position && scope.row.position.replace(/\[/,'').replace(/\]/,'') }}
{{ scope.row.position && scope.row.position.replace(/\[/, '').replace(/\]/, '') }}
</template>
</ElTableColumn>
<ElTableColumn label="发布内容" show-overflow-tooltip prop="contentDetails" align="center" header-align="center">
<template slot-scope="scope">
<el-carousel v-if="scope.row.publishChannels === 4 && scope.row.contentDetailsInfo" direction="horizontal" :autoplay="false" :indicator-position="scope.row.contentDetailsInfo.length===1?'none':'inside'" height="50px"
<el-carousel v-if="scope.row.publishChannels === 4 && scope.row.contentDetailsInfo" direction="horizontal" :autoplay="false" :indicator-position="scope.row.contentDetailsInfo.length === 1 ? 'none' : 'inside'" height="50px"
arrow="never" class="board_shower">
<el-carousel-item v-for="item,index in scope.row.contentDetailsInfo"
<el-carousel-item v-for="item, index in scope.row.contentDetailsInfo"
:key="index">
<BoardRecordPreview :tpl="item" style="height: 100%;" />
</el-carousel-item>
</el-carousel>
<span v-else>{{ scope.row.contentDetails }}</span>
<!-- <span >{{ scope.row.contentDetails }}</span> -->
</template>
</ElTableColumn>
<ElTableColumn label="发布人" prop="publisher" width="100" align="center" header-align="center" />
<ElTableColumn label="发布结果" prop="status" width="100" align="center" header-align="center">
<template slot-scope="scope">
<i class="el-icon-success" style="font-size: 24px; color:#0c0;" v-if="scope.row.publishStatus === 1"></i>
<i class="el-icon-error" style="font-size: 24px; color:#BBB;" v-else></i>
<i class="el-icon-success" style="font-size: 24px; color: #0c0;" v-if="scope.row.publishStatus === 1"></i>
<i class="el-icon-error" style="font-size: 24px; color: #BBB;" v-else></i>
</template>
</ElTableColumn>
<!-- <ElTableColumn label="操作" prop="status" width="100" align="center" header-align="center">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="onDelete(scope.row.id)">删除</el-button>
</template>
</ElTableColumn> -->
</Table>
</div>
<!-- 分页 -->
@ -86,12 +78,11 @@ import Pagination from '@screen/components/Pagination.vue';
import Table from '@screen/components/Table.vue';
import request from "@/utils/request";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
import {DirectionTypes} from '@screen/utils/enum.js';
import { DirectionTypes } from '@screen/utils/enum.js';
import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
import moment from "moment";
import { Loading } from 'element-ui';
import { e } from 'mathjs';
export default {
name: 'boardRecord',
@ -107,33 +98,35 @@ export default {
DirectionTypes,
moment,
enum_channels: {
4:'情报板',
7:'语音广播',
8:'企业微信',
4: '情报板',
7: '语音广播',
8: '企业微信',
},
tableData: [],
searchFormList,
isShowPhrases: false,
isShowDisposal: false,
total: 20,
sumtotal: 0,
eventType: 1,
searchData: {
pageSize: 20,
pageNum: 1
},
phrasesData: [],
process: []
process: [],
sum: 0 // sum data
}
},
created() {
},
methods: {
onRefreshForm(){
onRefreshForm() {
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
onDelete(id){
onDelete(id) {
const self = this;
this.$confirm("是否删除?", "警告", {
confirmButtonText: "确定",
@ -142,7 +135,7 @@ export default {
})
.then(function () {
request({
url: `/business/manage/`+id,
url: `/business/manage/${id}`,
method: "DELETE",
data: {},
}).then((result) => {
@ -152,7 +145,7 @@ export default {
});
})
},
onExport(){
onExport() {
const self = this;
this.$confirm("是否确认导出共计查询内容?", "警告", {
confirmButtonText: "确定",
@ -171,8 +164,6 @@ export default {
data: self.searchData,
responseType: 'blob',
}).then((res) => {
console.log(res)
const url = window.URL.createObjectURL(new Blob([res]));
let link = document.createElement("a");
link.style.display = "none";
@ -198,60 +189,59 @@ export default {
pageSize: 20,
pageNum: 1
}
if(daterange && daterange.length > 0){
if (daterange && daterange.length > 0) {
_searchData.startTime = daterange[0];
_searchData.endTime = daterange[1];
}
if(data.publishChannels){
if (data.publishChannels) {
_searchData.publishChannels = data.publishChannels
}
if(data.publishStatus){
if (data.publishStatus) {
_searchData.publishStatus = data.publishStatus
}
this.searchData = _searchData;
this.initData();
},
indexMethod(index) {
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1;
return this.searchData.pageSize * (this.searchData.pageNum - 1) + index + 1;
},
formatterDirection(row, column) {
return DirectionTypes[row.direction];
},
initData() {
this.sum = 0; // sum
request({
url: `/business/manage/statisticsList?pageNum=${this.searchData.pageNum}&pageSize=${this.searchData.pageSize}`,
method: "post",
params: { pageNum: this.searchData.pageNum, pageSize: this.searchData.pageSize },
data: this.searchData,
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
if (result.code != 200) return this.$message.error(result?.msg);
result.rows.forEach(e => {
if(e.publishChannels === 4 || e.publishChannels === 7){
if (e.publishChannels === 4 || e.publishChannels === 7) {
const contentDetailsInfo = JSON.parse(e.contentDetails)
if(e.publishChannels === 4){ //
if (e.publishChannels === 4) { //
let msg = '情报板数据异常' // + e.contentDetails
//
if(contentDetailsInfo.length > 0){
if(contentDetailsInfo[0].functions.length > 1){
if (contentDetailsInfo.length > 0) {
if (contentDetailsInfo[0].functions.length > 1) {
const parameters = contentDetailsInfo[0].functions[1]?.params?.parameters
if(parameters && parameters.length > 0){
if (parameters && parameters.length > 0) {
e.contentDetailsInfo = parameters
msg = ''
}
}
else if(contentDetailsInfo[0].functions.length > 0){
if(contentDetailsInfo[0].functions[0].functionId && contentDetailsInfo[0].functions[0].functionId === '1B'){
} else if (contentDetailsInfo[0].functions.length > 0) {
if (contentDetailsInfo[0].functions[0].functionId && contentDetailsInfo[0].functions[0].functionId === '1B') {
msg = '一键恢复操作'
}
}
}
e.contentDetails = msg
} else if(e.publishChannels === 7){
} else if (e.publishChannels === 7) {
let msg = '语音广播数据异常' //+e.contentDetails
console.log(contentDetailsInfo)
if(contentDetailsInfo.length > 0){
if(contentDetailsInfo[0].functions.length > 0){
if (contentDetailsInfo.length > 0) {
if (contentDetailsInfo[0].functions.length > 0) {
msg = contentDetailsInfo[0].functions[0].params.text
}
}
@ -261,14 +251,30 @@ export default {
});
this.tableData = result.rows;
setTimeout(() => {
this.tableData = result.rows;
}, 200);
// this.$nextTick(()=>{
// })
this.total = result.total;
});
return request({
url: '/business/manage/statisticsListNoPage',
method: "post",
data: this.searchData,
}).then((result) => {
if (result.code != 200) return this.$message.error(result?.msg);
let sum = 0;
result.data.forEach(e => {
if (e.publishChannels === 4) {
const contentDetailsInfo = JSON.parse(e.contentDetails)
if (contentDetailsInfo.length > 0) {
if (contentDetailsInfo[0].functions.length > 1) {
const parameters = contentDetailsInfo[0].functions[1]?.params?.parameters
if (parameters && parameters.length > 0) {
e.contentDetailsInfo = parameters
sum += parameters.length - 1
}
}
}
}
});
this.sumtotal = result.data.length + sum; // sumtotal
});
},
@ -300,6 +306,12 @@ export default {
display: flex;
gap: 6px;
}
.sum-total {
margin-left: 10px;
font-weight: bold;
color: #f6f1f1;
}
}
.body {
@ -323,15 +335,18 @@ export default {
justify-content: center;
}
.board_shower{
.board_shower {
margin: 4px;
}
::v-deep .el-carousel__indicators--horizontal{
line-height: 0; height: 16px;
.el-carousel__indicator--horizontal{
::v-deep .el-carousel__indicators--horizontal {
line-height: 0;
height: 16px;
.el-carousel__indicator--horizontal {
padding: 7px 4px;
}
}
::v-deep .el-table__cell div.cell {
padding: 0 10px !important;
}

Loading…
Cancel
Save