Browse Source

修改

wangqin
hui 7 months ago
parent
commit
f69eee62d1
  1. 10
      ruoyi-ui/src/common/menuData.js
  2. 24
      ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue
  3. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue

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

@ -151,14 +151,8 @@ export default [
{ {
title:"收费运营", title:"收费运营",
name:"fee", name:"fee",
children:[ path: "/maintain/fee",
{ component: "maintenanceOperations/chargeableOperations/index.vue"
title: "统计分析",
name: "feeStatistic",
path: "/maintain/fee/statistic",
component: "maintenanceOperations/chargeableOperations/index.vue",
}
]
},{ },{
title:"智能养护", title:"智能养护",
name:"smart", name:"smart",

24
ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue

@ -35,15 +35,16 @@ export default {
showNotify(para){ showNotify(para){
let _this = this; let _this = this;
let eventType = ["trafficAccident", "vehicleBroken", "trafficControl", "trafficJam", "illegalVehicle", "barrierClear", "construction", "serviceAreaAbnormal", "equipmentTrouble", "abnormalWeather", "otherEvent"]; let eventType = ["trafficAccident", "vehicleBroken", "trafficControl", "trafficJam", "illegalVehicle", "barrierClear", "construction", "serviceAreaAbnormal", "equipmentTrouble", "abnormalWeather", "otherEvent"];
let time = para.subEvent == "0" ? para.content.event.occurrenceTime : para.content.event.warning_time;
let obj = { let obj = {
content: para.content.content, content: para.content.content,
time: para.subEvent == "0" ? para.content.event.occurrenceTime : para.content.event.warning_time, time,
// moment().format("yyyy-MM-DD hh:mm"), // moment().format("yyyy-MM-DD hh:mm"),
type: para.subEvent == '1' ? "signal" : eventType[para.content.event.eventType*1-1], type: para.subEvent == '1' ? "signal" : eventType[para.content.event.eventType*1-1],
level: ["danger", "info"][para.subEvent*1], level: ["danger", "info"][para.subEvent*1],
duration: para.subEvent == "0" ? 0 : 4000 duration: para.subEvent == "0" ? 0 : 4000
} }
this.speak(time + '' + para.content.content);
_this.notifications[_this.notifyIndex] = _this.$notify({ _this.notifications[_this.notifyIndex] = _this.$notify({
title: '', title: '',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
@ -124,6 +125,25 @@ export default {
), ),
}); });
_this.notifyIndex++; _this.notifyIndex++;
},
speak(text){
// SpeechSynthesisUtterance
const utterance = new SpeechSynthesisUtterance(text);
//
utterance.lang = 'zh-CN'; //
// 01
utterance.volume = 10;
// 1
utterance.rate = 1;
// "default", "female", "male"
utterance.pitch = 1;
// 使SpeechSynthesis
window.speechSynthesis.speak(utterance);
} }
}, },
mounted() { mounted() {

7
ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue

@ -34,7 +34,11 @@
{{ JSON.parse(scope.row.dcDeviceId).join("、") }} {{ JSON.parse(scope.row.dcDeviceId).join("、") }}
</template> </template>
</ElTableColumn> </ElTableColumn>
<!-- <ElTableColumn label="方向" prop="direction" width="160" align="center" header-align="center" /> --> <!-- <ElTableColumn label="方向" prop="direction" width="160" align="center" header-align="center">
<template slot-scope="scope">
{{ DirectionTypes[scope.row.direction] }}
</template>
</ElTableColumn> -->
<ElTableColumn label="设备名称" prop="dcDeviceName" align="center" header-align="center"> <ElTableColumn label="设备名称" prop="dcDeviceName" align="center" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.dcDeviceName.replace(/^\[/,'').replace(/\]$/,'') }} {{ scope.row.dcDeviceName.replace(/^\[/,'').replace(/\]$/,'') }}
@ -98,6 +102,7 @@ export default {
}, },
data() { data() {
return { return {
DirectionTypes,
moment, moment,
testData : {"STAY":"30","ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"32","CONTENT":"因改扩建施工 平阴南、梁山收费站出入口封闭","width":"768","height":"64","formatStyle":"2"}, testData : {"STAY":"30","ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"32","CONTENT":"因改扩建施工 平阴南、梁山收费站出入口封闭","width":"768","height":"64","formatStyle":"2"},
tableData: [], tableData: [],

Loading…
Cancel
Save