Browse Source

更新情报板排序

develop
王钦 4 months ago
parent
commit
81caa8d21e
  1. 2
      ruoyi-ui/src/utils/auth.js
  2. 49
      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. 33
      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' import Cookies from 'js-cookie'
const TokenKey = 'DC-Token' const TokenKey = 'DC-Pro-Token'
export function getToken() { export function getToken() {
return Cookies.get(TokenKey) return Cookies.get(TokenKey)

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

@ -3,11 +3,14 @@
<vuescroll :ops="scrollOptions" class="scroller"> <vuescroll :ops="scrollOptions" class="scroller">
<draggable tag="div" :list="templateAvailable" @end="____onDragendTemplate" ghostClass="ghost_class">
<div v-for="(item, index) in templateAvailable"> <div v-for="(item, index) in templateAvailable">
<!-- 原来是<el-collapse v-model="activeNames"> --> <!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3> <div class="category" @click="templateAvailable[index].fold = !templateAvailable[index].fold">
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem" :class="page!='home' ? 'item_sub' : 'item_home'" > {{ 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" <BroadcastTplShower class=" boardPreview"
:sound="itm.outVol" :sound="itm.outVol"
@ -30,7 +33,7 @@
</div> </div>
</div> </div>
</div> </div>
</draggable>
</vuescroll> </vuescroll>
@ -44,6 +47,8 @@ import BroadcastTplShower from "@screen/components/broadcast/BroadcastTplShower.
import broadcastEditor from "@screen/components/broadcast/broadcastEditor"; import broadcastEditor from "@screen/components/broadcast/broadcastEditor";
import scrollOptions from "@/common/scrollbar.js"; import scrollOptions from "@/common/scrollbar.js";
import vuescroll from "vuescroll"; import vuescroll from "vuescroll";
import request from "@/utils/request";
import draggable from "vuedraggable";
export default { export default {
name: "BoardPreview", name: "BoardPreview",
data() { data() {
@ -63,7 +68,8 @@ export default {
components:{ components:{
BroadcastTplShower, BroadcastTplShower,
broadcastEditor, broadcastEditor,
vuescroll vuescroll,
draggable
}, },
created(){ created(){
Promise.all([ Promise.all([
@ -92,9 +98,24 @@ export default {
}, },
methods: { 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() { ____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; this.tplCategory = res.data;
}); });
}, },
@ -251,3 +272,19 @@ export default {
} }
} }
</style> </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() {}, mounted() {},
created() { created() {
this.getDicts("iot_template_category").then((res) => { this.getDicts("iot_broadcast_category").then((res) => {
this.templateCategoryList = res.data; this.templateCategoryList = res.data;
this.dataDefault.category = this.templateCategoryList[0].dictValue 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> </ElTabPane>
</ElTabs> </ElTabs>
</div> </div>
<template #footer> <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> </template>
<!-- 设备操作弹窗 --> <!-- 设备操作弹窗 -->
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" :productId="dialogData.id" <DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" :productId="dialogData.id"
@ -112,7 +111,7 @@ export default {
}, },
methods: { methods: {
onControlClick(){ onControlClick(){
if(this.dialogData.deviceState===1 && this.dialogData.iotDeviceId){ if(this.dialogData.deviceState==='1' && this.dialogData.iotDeviceId){
this.deviceControlVisible = true 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`, url: `/business/traffic-statistics/history/trafficFlowAtToll`,
method: "get", method: "get",
params: { params: {
periodType: 4, startDate:moment().format('YYYY-MM-DD')
startTime: moment().format('YYYY-MM-DD')+ ' 00:00:00',
endTime: moment().format('YYYY-MM-DD')+ ' 23:59:59',
} }
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); 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 = 'video'" :class="{ active: realType === 'video' }">视频</span>
<span @click="realType = 'picture'" :class="{ active: realType === 'picture' }">图像</span> <span @click="realType = 'picture'" :class="{ active: realType === 'picture' }">图像</span>
</div> </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>
</div> </div>
<!-- 组件 --> <!-- 组件 -->
@ -166,6 +166,7 @@ export default {
isError:false, // isError:false, //
submitLoading: false, submitLoading: false,
videoList: [],
realType: 'video', realType: 'video',
realVideo: 'downCamera', realVideo: 'downCamera',
}; };
@ -190,6 +191,19 @@ export default {
} else if(_data.lang){ } else if(_data.lang){
_data.lane =_data.lang.toString().split(",") || [] _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 this.data = _data
} else { } else {
this.formList = [..._formList] this.formList = [..._formList]
@ -200,6 +214,7 @@ export default {
_data.lane =_data.lang.toString().split(",") || [] _data.lane =_data.lang.toString().split(",") || []
} }
_data.direction=DirectionTypes[_data.direction] _data.direction=DirectionTypes[_data.direction]
this.videoList = _data.videoList;
this.data = _data; this.data = _data;
} }
} }

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

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

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

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

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

@ -167,10 +167,15 @@
</WgtTitle> </WgtTitle>
<div class="partCon"> <div class="partCon">
<vuescroll :ops="scrollOptions" class="templateBox"> <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"> <div v-for="(item, index) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> --> <!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3> <div class="category" @click="templateAvailable[index].fold = !templateAvailable[index].fold">
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem"> {{ 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> <BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview>
<!-- <div class="infoPreview"> <!-- <div class="infoPreview">
@ -192,7 +197,9 @@
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
</div> </div>
</draggable>
</vuescroll> </vuescroll>
</div> </div>
</div> </div>
@ -248,6 +255,7 @@ import InfoBoard from "@screen/mixins/InfoBoard";
import { initSearch } from "@screen/utils/enum/common.js" import { initSearch } from "@screen/utils/enum/common.js"
import { mapState } from "vuex"; import { mapState } from "vuex";
import request from "@/utils/request";
export default { export default {
name: "DeviceBord", name: "DeviceBord",
mixins: [InfoBoard], mixins: [InfoBoard],
@ -411,6 +419,8 @@ export default {
// //
____getTemplateCategory() { ____getTemplateCategory() {
return this.getDicts("iot_template_category").then((res) => { return this.getDicts("iot_template_category").then((res) => {
res.data.forEach(x=>x.fold=false)
res.data[0].fold = true;
this.tplCategory = res.data; this.tplCategory = res.data;
}); });
}, },
@ -575,6 +585,20 @@ export default {
tpl, 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) { ____onDragend(evt) {
// console.log(evt, this.selectedBdMsg , "+++=======") // console.log(evt, this.selectedBdMsg , "+++=======")
}, },
@ -787,7 +811,7 @@ export default {
} }
this.templateAvailable = []; this.templateAvailable = [];
this.tplCategory.forEach((item, index) => { this.tplCategory.forEach((item, index) => {
let arr = this.templateAll["" + index]; let arr = this.templateAll[item.dictValue];
if (arr.length > 0) { if (arr.length > 0) {
let temp = []; let temp = [];
arr.forEach((tpl) => { arr.forEach((tpl) => {
@ -1374,3 +1398,19 @@ export default {
/* 设置滚动条滑块圆角 */ /* 设置滚动条滑块圆角 */
} }
</style> </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