Browse Source

更新情报板排序

develop
王钦 4 months ago
parent
commit
81caa8d21e
  1. 2
      ruoyi-ui/src/utils/auth.js
  2. 51
      ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplList.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/components/broadcast/broadcastEditor.vue
  4. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  5. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue
  6. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  7. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue
  8. 55
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/components/traffic/index.vue
  9. 46
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

2
ruoyi-ui/src/utils/auth.js

@ -1,6 +1,6 @@
import Cookies from 'js-cookie'
const TokenKey = 'DC-Token'
const TokenKey = 'DC-Pro-Token'
export function getToken() {
return Cookies.get(TokenKey)

51
ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplList.vue

@ -3,11 +3,14 @@
<vuescroll :ops="scrollOptions" class="scroller">
<draggable tag="div" :list="templateAvailable" @end="____onDragendTemplate" ghostClass="ghost_class">
<div v-for="(item, index) in templateAvailable">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem" :class="page!='home' ? 'item_sub' : 'item_home'" >
<div class="category" @click="templateAvailable[index].fold = !templateAvailable[index].fold">
{{ item.dictLabel }}
<span :class="item.fold?'el-icon-arrow-down':'el-icon-arrow-up'"></span>
</div>
<div v-if="item.fold" v-for="(itm, indx) in item.list" :key="indx" class="tplItem" :class="page!='home' ? 'item_sub' : 'item_home'" >
<!-- 模板内容 -->
<BroadcastTplShower class=" boardPreview"
:sound="itm.outVol"
@ -29,8 +32,8 @@
</template>
</div>
</div>
</div>
</div>
</draggable>
</vuescroll>
@ -44,6 +47,8 @@ import BroadcastTplShower from "@screen/components/broadcast/BroadcastTplShower.
import broadcastEditor from "@screen/components/broadcast/broadcastEditor";
import scrollOptions from "@/common/scrollbar.js";
import vuescroll from "vuescroll";
import request from "@/utils/request";
import draggable from "vuedraggable";
export default {
name: "BoardPreview",
data() {
@ -63,7 +68,8 @@ export default {
components:{
BroadcastTplShower,
broadcastEditor,
vuescroll
vuescroll,
draggable
},
created(){
Promise.all([
@ -92,9 +98,24 @@ export default {
},
methods: {
____onDragendTemplate(evt){
const newMap = this.templateAvailable.map(x=>x.dictCode);
request({
url:'/business/boardTemplate/updateCategorySort',
method:'post',
data:{
"dictType":"iot_broadcast_category",
"ids":newMap
}
}).then(res=>{
console.log(res)
})
},
//
____getTemplateCategory() {
return this.getDicts("iot_template_category").then((res) => {
return this.getDicts("iot_broadcast_category").then((res) => {
res.data.forEach(x=>x.fold=false)
res.data[0].fold = true;
this.tplCategory = res.data;
});
},
@ -250,4 +271,20 @@ export default {
}
}
</style>
<style>
.category{
background:linear-gradient(to right, #1d637c00 0%, #1d637c 100%);
margin: 10px 0px;
padding: 10px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
span{
font-weight: bold;
margin-right: 10px;
font-size: 16px;
}
}
</style>

2
ruoyi-ui/src/views/JiHeExpressway/components/broadcast/broadcastEditor.vue

@ -191,7 +191,7 @@ export default {
},
mounted() {},
created() {
this.getDicts("iot_template_category").then((res) => {
this.getDicts("iot_broadcast_category").then((res) => {
this.templateCategoryList = res.data;
this.dataDefault.category = this.templateCategoryList[0].dictValue
});

5
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue

@ -12,9 +12,8 @@
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button @click.native="onControlClick" disabled :style="(dialogData.deviceState===1 && dialogData.iotDeviceId)?'':'background-color:#A9AEB8'">设备操作</Button>
<Button @click.native="onControlClick" disabled :style="(dialogData.deviceState==='1' && dialogData.iotDeviceId)?'':'background-color:#A9AEB8'">设备操作</Button>
</template>
<!-- 设备操作弹窗 -->
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" :productId="dialogData.id"
@ -112,7 +111,7 @@ export default {
},
methods: {
onControlClick(){
if(this.dialogData.deviceState===1 && this.dialogData.iotDeviceId){
if(this.dialogData.deviceState==='1' && this.dialogData.iotDeviceId){
this.deviceControlVisible = true
}
},

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/FocusedMonitoring/index.vue

@ -139,9 +139,7 @@ export default {
url: `/business/traffic-statistics/history/trafficFlowAtToll`,
method: "get",
params: {
periodType: 4,
startTime: moment().format('YYYY-MM-DD')+ ' 00:00:00',
endTime: moment().format('YYYY-MM-DD')+ ' 23:59:59',
startDate:moment().format('YYYY-MM-DD')
}
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);

17
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue

@ -24,7 +24,7 @@
<span @click="realType = 'video'" :class="{ active: realType === 'video' }">视频</span>
<span @click="realType = 'picture'" :class="{ active: realType === 'picture' }">图像</span>
</div>
<Carousel style="height: 100%;" :list="realType === 'video'?(formData.videoList || []):formData.pictures || []" :type="realType" />
<Carousel style="height: 100%;" :list="realType === 'video'?(videoList || []):formData.pictures || []" :type="realType" />
</div>
</div>
<!-- 组件 -->
@ -166,6 +166,7 @@ export default {
isError:false, //
submitLoading: false,
videoList: [],
realType: 'video',
realVideo: 'downCamera',
};
@ -190,6 +191,19 @@ export default {
} else if(_data.lang){
_data.lane =_data.lang.toString().split(",") || []
}
if(_data.warningSource === 2){
request({
url: `/business/warning/video/${_data.id}`,
method:'get'
}).then(res=>{
if(res.code === 200 && res.msg && res.msg !== ''){
this.videoList = [res.msg]
}
})
} else {
this.videoList = _data.videoList;
}
this.data = _data
} else {
this.formList = [..._formList]
@ -200,6 +214,7 @@ export default {
_data.lane =_data.lang.toString().split(",") || []
}
_data.direction=DirectionTypes[_data.direction]
this.videoList = _data.videoList;
this.data = _data;
}
}

4
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/analysis/index.vue

@ -72,7 +72,7 @@
<div class="right-bottom" >
<div id="chartList" class="chartList"></div>
<div class="right-table">
<Table :data="tableData" style="width: 99%">
<Table :data="tableData" style="width: 80vw">
<ElTableColumn label="名称" prop="name" width="240" align="center" />
<ElTableColumn label="采集时间" prop="timestamp" width="100" align="center" />
<ElTableColumn v-for="(item,index) of tableCols" :label="item.label" :prop="item.value" align="center" />
@ -330,7 +330,7 @@ export default {
padding: 20px;
.left {
width: 300px;
width: 18vw;
// background-color: #112533;
height: 100%;
display: flex;

55
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/analysis/components/traffic/index.vue

@ -43,6 +43,13 @@ export default {
params
})
},
getTrafficFlowAtToll(params){
return request({
url: `/business/traffic-statistics/history/trafficFlowAtToll`,
method: "get",
params
})
},
toDecimal(x){
var f = parseFloat(x)
if(isNaN(f)){
@ -68,12 +75,10 @@ export default {
//
request({
url: `/business/traffic-statistics/history/trafficFlowAtToll`,
method: "get",
params: {
periodType: 4,
startTime: moment().format('YYYY-MM-DD')+ ' 00:00:00',
endTime: moment().format('YYYY-MM-DD')+ ' 23:59:59',
url: `/business/traffic-statistics/history/trafficFlowAtToll`,
method: "get",
params: {
startDate:moment().format('YYYY-MM-DD')
}
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
@ -81,36 +86,26 @@ export default {
this.list[1].value = this.toDecimal(_count/10000)
})
this.getAccumulatedFlow({
periodType: 4,
startTime: moment().subtract(1,'day').format('YYYY-MM-DD')+ ' 00:00:00',
endTime: moment().subtract(1,'day').format('YYYY-MM-DD')+ ' 23:59:59',
this.getTrafficFlowAtToll({
startDate: moment().subtract(1,'day').format('YYYY-MM-DD')
}).then((resultYes) => {
this.getAccumulatedFlow({
periodType: 4,
startTime: moment().subtract(2,'day').format('YYYY-MM-DD')+ ' 00:00:00',
endTime: moment().subtract(2,'day').format('YYYY-MM-DD')+ ' 23:59:59',
this.getTrafficFlowAtToll({
startDate: moment().subtract(2,'day').format('YYYY-MM-DD')
}).then((resultYes2) => {
if(resultYes.data.length > 0){
let _countYes = resultYes.data[0].trafficVolume;
let _countYes = resultYes.data;
this.list[2].value = this.toDecimal(_countYes/10000)
if(resultYes2.data.length > 0){
let _countYes2 = resultYes2.data[0].trafficVolume;
let num = ((_countYes - _countYes2)/_countYes2 * 100)
let _countYes2 = resultYes2.data;
let num = ((_countYes - _countYes2)/_countYes2 * 100)
if(num > 0){
this.list[3].color = '#22cd39'
num = `↑ +${ this.toDecimal(num)}%`
} else {
this.list[3].color = '#D9001B'
num = `${ this.toDecimal(num)}%`
}
this.list[3].value = num
if(num > 0){
this.list[3].color = '#22cd39'
num = `↑ +${ this.toDecimal(num)}%`
} else {
this.list[3].color = '#D9001B'
num = `${ this.toDecimal(num)}%`
}
}
this.list[3].value = num
})
})

46
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

@ -167,10 +167,15 @@
</WgtTitle>
<div class="partCon">
<vuescroll :ops="scrollOptions" class="templateBox">
<draggable tag="div" :list="templateAvailable" @end="____onDragendTemplate" ghostClass="ghost_class">
<div v-for="(item, index) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<div class="category" @click="templateAvailable[index].fold = !templateAvailable[index].fold">
{{ item.dictLabel }}
<span :class="item.fold?'el-icon-arrow-down':'el-icon-arrow-up'"></span>
</div>
<div v-if="item.fold" v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview>
<!-- <div class="infoPreview">
@ -192,7 +197,9 @@
</el-tooltip>
</div>
</div>
</div>
</draggable>
</vuescroll>
</div>
</div>
@ -248,6 +255,7 @@ import InfoBoard from "@screen/mixins/InfoBoard";
import { initSearch } from "@screen/utils/enum/common.js"
import { mapState } from "vuex";
import request from "@/utils/request";
export default {
name: "DeviceBord",
mixins: [InfoBoard],
@ -411,6 +419,8 @@ export default {
//
____getTemplateCategory() {
return this.getDicts("iot_template_category").then((res) => {
res.data.forEach(x=>x.fold=false)
res.data[0].fold = true;
this.tplCategory = res.data;
});
},
@ -575,6 +585,20 @@ export default {
tpl,
};
},
____onDragendTemplate(evt){
const newMap = this.templateAvailable.map(x=>x.dictCode);
request({
url:'/business/boardTemplate/updateCategorySort',
method:'post',
data:{
"dictType":"iot_template_category",
"ids":newMap
}
}).then(res=>{
console.log(res)
})
},
____onDragend(evt) {
// console.log(evt, this.selectedBdMsg , "+++=======")
},
@ -787,7 +811,7 @@ export default {
}
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
let arr = this.templateAll["" + index];
let arr = this.templateAll[item.dictValue];
if (arr.length > 0) {
let temp = [];
arr.forEach((tpl) => {
@ -1374,3 +1398,19 @@ export default {
/* 设置滚动条滑块圆角 */
}
</style>
<style>
.category{
background:linear-gradient(to right, #1d637c00 0%, #1d637c 100%);
margin: 10px 0px;
padding: 10px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
span{
font-weight: bold;
margin-right: 10px;
font-size: 16px;
}
}
</style>

Loading…
Cancel
Save