Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
zhangzhang 6 months ago
parent
commit
85eaa2e8c0
  1. 85
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue
  2. 152
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue
  3. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue
  4. 13
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue
  5. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue
  6. 39
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue
  7. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  8. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue
  9. 4
      ruoyi-ui/vue.config.js

85
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue

@ -10,15 +10,52 @@
<template #[otherConfig]="{ data }">
<span style="color: #6ee5fe"> {{ data.deviceName }}(当前) </span>
</template>
</CheckboxGroup>
</div>
<div class="right">
</CheckboxGroup>
</div>
<div class="right">
<div class="top-content">
<Video class="item-video" :pileNum="pileNum" />
<label>发布内容: </label>
<ElInput type="textarea" v-model="releaseMessage" :autosize="{ minRows: 3, maxRows: 3 }" :maxlength="150"
showWordLimit placeholder="请输入发布内容" />
<el-form ref="form" :model="dataForm" :rules="dataRule" label-width=" 90px">
<el-form-item label="音量" prop="outVol">
<el-row :gutter="0">
<el-col :span="6">
<el-input-number v-model="dataForm.outVol" :min="1" :max="9"></el-input-number>
</el-col>
<el-col :span="18"><span style="margin-left: 10px;">取值范围 1 - 9</span></el-col>
</el-row>
</el-form-item>
<el-form-item label="循环次数" prop="repeatTimes">
<el-row :gutter="0">
<el-col :span="6">
<el-input-number v-model="dataForm.repeatTimes" :min="1" :max="16"></el-input-number>
</el-col>
<el-col :span="18"><span style="margin-left: 10px;">取值范围 1 - 16</span></el-col>
</el-row>
</el-form-item>
<el-form-item label="紧急度" prop="priority">
<el-row :gutter="0">
<el-col :span="6">
<el-select v-model="dataForm.priority" placeholder="请选择">
<el-option v-for="(item, key) in broadcastPriority" :key="key" :label="item" :value="key">
</el-option>
</el-select>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="详细内容" prop="content">
<ElInput type="textarea" v-model="dataForm.content" :autosize="{ minRows: 3, maxRows: 3 }"
:maxlength="150" showWordLimit placeholder="请输入发布内容" />
</el-form-item>
</el-form>
<!-- <label>发布内容: </label>
<ElInput type="textarea" v-model="dataForm.content" :autosize="{ minRows: 3, maxRows: 3 }" :maxlength="150"
showWordLimit placeholder="请输入发布内容" /> -->
</div>
<div class="footer">
@ -30,8 +67,8 @@
确定
</Button>
</div>
</div>
</div>
</div>
</div>
</div>
</Dialog>
</template>
@ -46,7 +83,7 @@ import request from "@/utils/request";
import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { Message } from "element-ui";
import { broadcastPriority } from "@screen/utils/enum.js";
export default {
name: "BroadcastReleases",
components: {
@ -67,10 +104,25 @@ export default {
},
data() {
return {
broadcastPriority,
submitting: false,
checkList: [],
releaseMessage: null,
dataForm: {
content:"",
priority:"1",
repeatTimes:3,
outVol:6
},
musicList: [],
dataRule: {
content: [
{
required: true,
message: "请输入详细内容",
trigger: "blur",
},
]
},
};
},
computed: {
@ -94,7 +146,7 @@ export default {
},
methods: {
handleSubmit() {
if (!this.releaseMessage?.trim())
if (!this.dataForm.content?.trim())
return Message.error("发布内容不能为空!");
if (!this.checkList.length)
return Message.error("请至少选择一个广播设备!");
@ -113,12 +165,11 @@ export default {
"functionId": "A1",
"params": {
"name": "task-3",
"outVol": "6",
"priority": "1",
"text": "山东高速欢迎您",
"repeatTimes": "3",
"outVol": "" + this.dataForm.outVol,
"priority": "" + this.dataForm.priority,
"text": this.dataForm.content.trim(),
"repeatTimes": "" + this.dataForm.repeatTimes,
"termList": [
{
...JSON.parse(i)
}
@ -157,7 +208,7 @@ export default {
<style lang="scss" scoped>
.BroadcastReleases {
// width: 450px;
height: 420px;
height: 520px;
display: flex;
flex-direction: column;
gap: 15px;

152
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceControlDialog.vue

@ -1,19 +1,20 @@
<template>
<Dialog v-model="modelVisible" title="设备操作" width="550px">
<Dialog v-model="modelVisible" title="设备操作" width="600px">
<div class="DeviceControlDialog">
<div style="height: 500px;overflow-y:auto;">
<Form
column="2"
v-if="formList && formList.length"
class="form"
ref="FormConfigRef"
label-width='120px'
label-width='150px'
:formList="formList"
:value="formData"
/>
</div>
</div>
<template #footer>
<!-- 王思祥 回读待确认 2024-05-16 TODO-->
<Button @click.native="handleSubmit" :loading="submitting"> 发送 </Button>
<Button @click.native="handleSubmit"> 发送 </Button>
</template>
</Dialog>
</template>
@ -23,6 +24,8 @@
import Button from "@screen/components/Buttons/Button.vue";
import Dialog from "@screen/components/Dialog/index.vue";
import request from "@/utils/request";
import { Message } from 'element-ui'
import Form from "@screen/components/FormConfig";
export default {
name: "DeviceControlDialog",
@ -36,6 +39,12 @@ export default {
event: "update:value",
},
props: {
rebind: {
type: Function,
default: null
},
visible: Boolean,
dialogData: {
type: Object,
@ -59,6 +68,19 @@ export default {
{label:"黄色",value:"2"},
{label:"绿色",value:"3"},
],
enum_normalTextSetting:[
{label:"常态文字持续显示",value:"0"},
{label:"触发显示常态文字",value:"1"},
],
enum_wordCycle:[
{label:"1:1常亮",value:"1"},
{label:"1:2",value:"2"},
{label:"1:3",value:"3"},
{label:"1:4",value:"4"},
{label:"2:4",value:"5"},
{label:"3:4",value:"6"},
{label:"4:5",value:"7"}
],
enum_wordFlicker:[
{label:"20次/min",value:"1"},
{label:"30次/min",value:"2"},
@ -74,42 +96,117 @@ export default {
"volume",
"colour",
"wordFlickerFrequency",
"textShiningDutyCycle",
"wordDutyCycle",
"normalTextContent",
"triggerStateTextContent",
"triggerTextContent",
"triggerTextDuration",
"normalTextDisplaySettings",
"vehicleDetectorSensitivity",
"calculationCycle"
"normalTextSetting",
"vehicleDetectionSensitivity",
"averageData",
"timeQuantum",
"firstTimePeriodStartTTime",
"firstTimePeriodEndTime",
"firstTimePeriodRedAndBlueFlash",
"firstTimePeriodScreenSwitch",
"firstTimePeriodWhetherToReport",
"firstTimePeriodHornSwitch",
"secondTimePeriodStartTTime",
"secondTimePeriodEndTime",
"secondTimePeriodRedAndBlueFlash",
"secondTimePeriodScreenSwitch",
"secondTimePeriodWhetherToReport",
"secondTimePeriodHornSwitch",
"thirdlyTimePeriodStartTTime",
"thirdlyTimePeriodEndTime",
"thirdlyTimePeriodRedAndBlueFlash",
"thirdlyTimePeriodScreenSwitch",
"thirdlyTimePeriodWhetherToReport",
"thirdlyTimePeriodHornSwitch"
]
}
},
methods:{
handleSubmit(){
this.$message.success('发送成功')
const self = this;
this.$refs.FormConfigRef.validate().then((data) => {
data.numberOfDevices = this.dialogData.iotDeviceId.substr(this.dialogData.iotDeviceId.lastIndexOf('-')+1)
request({
url: `/business/device/functions/${self.dialogData.iotDeviceId}/0b`,
method: "POST",
data: data
})
.then(result => {
if (result.code != 200) {
Message.error("操作失败");
self.rebind()
self.modelVisible = false
return;
};
Message.success("操作成功");
})
.catch(() => {
Message.error("操作失败");
})
})
}
},
async created() {
let devs = [];
request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId}`,
method: "get",
}).then(result => {
if (result.code != 200) return Message.error("操作失败");
console.log(result.data)
let n = _.find(result.data,{property:'numberOfPeriods'});
let pv = "";
result.data.forEach(x=>{
pv += `${x.propertyName},${x.type},${x.property}.`
})
let _formList = [];
this.list.forEach(e => {
const p = _.find(result.data,{property:e})
if(p) {
if(p.type === 'string' || p.type === 'long'){
this.formList.push( {
_formList.push( {
label: p.propertyName+':',
key: p.property,
})
} else if(p.type === 'enum' ){
if(p.property.indexOf('PeriodHornSwitch') !== -1 ||
p.property.indexOf('PeriodRedAndBlueFlash') !== -1 ||
p.property.indexOf('PeriodWhetherToReport') !== -1 ||
p.property.indexOf('TimePeriodScreenSwitch') !== -1 ){ // |
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "RadioGroup",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "0",
label: "关闭",
},
{
key: "1",
label: "开启",
},
],
},
})
} else if(p.property === 'wordFlickerFrequency'){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_wordFlicker
}
else if(p.property==="colour"){
this.formList.push({
})
}else if(p.property==="colour"){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
@ -118,23 +215,32 @@ export default {
options: this.enum_color
}
})
}else if(p.property==="wordDutyCycle"){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_wordCycle
}
else if(p.property==="wordFlickerFrequency"){
this.formList.push({
})
}else if(p.property==="normalTextSetting"){
_formList.push({
label: p.propertyName+':',
key: p.property,
type: "select",
default: null,
options: {
options: this.enum_wordFlicker
options: this.enum_normalTextSetting
}
})
}
this.formData[ p.property] =p.formatValue
}
this.formData[p.property] = p.value
}
})
console.log(this.formList,this.formData)
this.formList = _formList;
})
}
@ -143,7 +249,7 @@ export default {
<style lang="scss" scoped>
.DeviceControlDialog {
width: 510px;
width: 550px;
display: flex;
flex-direction: column;
gap: 15px;

6
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/components/DeviceParams.vue

@ -46,6 +46,10 @@ export default {
}
},
async created() {
this.bind();
},
methods: {
bind(){
this.devicesList = [];
let devs = [];
request({
@ -66,8 +70,6 @@ export default {
this.devicesList = devs;
})
},
methods: {
async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启";
let deviceName = "";

13
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/ConfluenceArea/index.vue

@ -8,7 +8,7 @@
<Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">
<DeviceParams disabled :dialogData="dialogData" />
<DeviceParams ref="refParam" disabled :dialogData="dialogData" />
</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" style="height: 180px" />
@ -21,7 +21,7 @@
</Button>
</template>
<DeviceControlDialog v-model="deviceControlVisible" :dialogData="dialogData" />
<DeviceControlDialog :rebind="rebind" v-model="deviceControlVisible" :dialogData="dialogData" />
</Dialog>
</template>
@ -48,6 +48,7 @@ export default {
mixins: [dialogDelayVisible],
components: {
Dialog,
Descriptions,
LineChart,
Video,
@ -57,6 +58,7 @@ export default {
},
data() {
return {
refParam:null,
activeName: "first",
releaseVisible: false,
deviceControlVisible: false,
@ -93,10 +95,6 @@ export default {
enum: "DeviceTypeEnum",
// visible: false,
},
// {
// label: "",
// key: "deviceStateLiteral",
// },
{
label: "设备厂商",
key: "manufacturer",
@ -118,6 +116,9 @@ export default {
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods: {
rebind(){
this.$refs.refParam.bind()
},
async getDeviceInfo() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || "10.0.36.143-1883"

8
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/MeteorologicalDetection/components/DeviceControlDialog.vue

@ -102,14 +102,14 @@ export default {
let times = [], datas = [];
qsData.rows.forEach(item => {
if (lastPath == 'deviceHour') {
times.push(item.timeSlot);
times.push(item.date);
} else if (lastPath == 'deviceDay') {
times.push(new Date(item.date).format('dd'));
} else if (lastPath == 'deviceYears') {
times.push(new Date(item.month).format('MM'));
}
datas.push(this.btnType == 1 ? item.avgTemperature : item.avgVisibility)
datas.push(this.btnType == 1 ? item.temperature : item.visibility)
})
// console.log('datas',datas)
@ -121,8 +121,8 @@ export default {
lineChartOption.xAxis.name = '月'
}
lineChartOption.xAxis.data = times;
lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米';
lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)'
lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米';
lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)'
lineChartOption.series[0].data = datas;
const chartIns = echarts.init(this.$refs.LineChartRef);

39
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/ScopeTable.vue

@ -1,7 +1,7 @@
<template>
<div class="ScopeTable">
<el-row>
<el-col :span="2">
<el-row :gutter="5">
<el-col :span="3">
<p>设备资源:</p>
</el-col>
<el-col :span="4">
@ -19,7 +19,7 @@
</el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-col :span="10">
<!-- 设备列表 -->
<el-select v-if="tableInfo.searchRule == 1" v-model="tableInfo.devList" placeholder="请选择设备" multiple
collapse-tags>
@ -36,8 +36,8 @@
<span v-if="tableInfo.searchRule == 4" style="width: 56px;">公里</span>
</el-col>
</el-row>
<el-row>
<el-col :span="2">
<el-row :gutter="5">
<el-col :span="3">
<p>执行操作:</p>
</el-col>
<!-- 可变信息标识 -->
@ -48,7 +48,8 @@
</el-select>
</el-col>
<el-col v-if="tableInfo.deviceType == 2 && tableInfo.zx_operationType == 1" :span="4">
<el-input @click.native="clickQbb('zx_content')" placeholder="请选择" v-model="tableInfo.zx_content"
<el-input @click.native="clickQbb('zx_dcInfoBoardTemplate')" placeholder="请选择"
:value="tableInfo.zx_dcInfoBoardTemplate?tableInfo.zx_dcInfoBoardTemplate.content:''"
readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
@ -99,8 +100,8 @@
</el-col>
</el-row>
<el-row v-if="tableInfo.deviceType !== 5">
<el-col :span="2">
<el-row :gutter="5" v-if="tableInfo.deviceType !== 5">
<el-col :span="3">
<p>恢复操作:</p>
</el-col>
<!-- 可变信息标识 -->
@ -111,7 +112,8 @@
</el-select>
</el-col>
<el-col v-if="tableInfo.deviceType == 2 && tableInfo.hf_operationType == 1" :span="4">
<el-input @click.native="clickQbb('hf_content')" placeholder="请选择" v-model="tableInfo.hf_content"
<el-input @click.native="clickQbb('hf_dcInfoBoardTemplate')" placeholder="请选择"
:value="tableInfo.hf_dcInfoBoardTemplate?tableInfo.hf_dcInfoBoardTemplate.content:''"
readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
@ -162,9 +164,6 @@
</el-col>
</el-row>
<!-- 情报板弹窗 -->
<QbbDialog :visible="isShowDialog" :info="qbbData" @close="onCloseDialog" @dialogSubmit="dialogSubmit" />
</div>
@ -178,6 +177,7 @@ import QbbDialog from "../qbbDialog/index.vue";
import { Message } from 'element-ui'
import { planDeviceOptions } from "@screen/utils/enum.js";
import { defaultTableInfo } from "../data";
import { dataTool } from 'echarts';
export default {
name: 'ScopeTable',
@ -293,7 +293,6 @@ export default {
loadData.forEach(it => {
this.sbOptions.push({ value: it.iotDeviceId, label: it.deviceName })
})
console.log('bbbbbbbbbbb', this.sbOptions)
},
immediate: true,
}
@ -342,8 +341,18 @@ export default {
this.isShowDialog = false;
},
dialogSubmit(data) {
console.log('qbbData', data)
this.tableInfo[this.clickQbbName] = data.content;
this.tableInfo[this.clickQbbName] = {
"fontType":data.fontType,
"screenSize":data.screenSize,
"fontSpacing":data.fontSpacing,
"stopTime":data.stopTime,
"fontSize":data.fontSize,
"inScreenMode":data.inScreenMode,
"formatStyle":data.formatStyle,
"content":data.content,
"fontColor":data.fontColor
};
// this.tableData[this.index].otherConfig = JSON.stringify(data);
}
}

27
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -21,15 +21,15 @@
</div>
<div>
<el-row v-for="(item, index) in tableData" :key="item.id" class="rowBlock">
<el-col :span="22">
<div v-for="(item, index) in tableData" :key="item.id" class="rowBlock">
<div style="flex:1">
<ScopeTable :tableInfo="item"></ScopeTable>
</el-col>
<el-col :span="2">
</div>
<div style="width:100px">
<ElButton class="elButton" icon="el-icon-plus" plain size="mini" @click.native="onAdd()" />
<ElButton class="elButton" icon="el-icon-delete" plain size="mini" @click.native="onDel(index)" />
</el-col>
</el-row>
</div>
</div>
</div>
</ElForm>
@ -198,8 +198,6 @@ export default {
dcArr.push(action);
});
this.tableData = dcArr;
console.log("tableData", this.tableData);
})
// console.log('secondFormData', this.secondFormData)
// }).catch((err) => {
@ -268,6 +266,7 @@ export default {
return data;
},
handleSubmit() {
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
let dcArr = [];
@ -278,13 +277,13 @@ export default {
searchRule: item.searchRule,
number: item.number
}
let zxData = {}, hfData = {};
if (this.dialogType == 2) {
dcData.emergencyPlansId = this.planId;
}
if (item.devList && item.devList.length > 0) {
dcData.deviceList = item.devList.join(",");
}
let zxData = {}, hfData = {};
Object.keys(item).forEach(key => {
if (/^zx_/.test(key)) {
let keyName = key.substring(3);
@ -304,11 +303,6 @@ export default {
dcArr.push(dcData);
})
console.log({
...this.formData,
dcExecuteAction: dcArr
});
// return;
if (this.dialogType == 1) {
//
request({
@ -359,7 +353,6 @@ export default {
});
},
areAllValuesEmpty(obj) {
console.log("ass", obj);
return Object.keys(obj).every(function (key) {
const value = obj[key];
return (
@ -387,7 +380,7 @@ export default {
.EventAddPlanDialog {
gap: 9px;
width: 1280px;
width: 100%;
height: 310px;
display: flex;
flex-direction: column;
@ -419,6 +412,8 @@ export default {
background-color: #296887;
padding: 5px 10px;
margin-bottom: 10px;
display: flex;
justify-content: space-between;
}
}

2
ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue

@ -138,7 +138,7 @@
</div>
</draggable>
</vuescroll>
<Empty v-else text="请从设备回读或从模板添加信息..." style="padding-top: 100px"></Empty>
<Empty v-else text="请添加待下发信息..." style="padding-top: 100px"></Empty>
</div>
</div>
<!-- ++++++++++右边部分信息模板++++++++++ -->

4
ruoyi-ui/vue.config.js

@ -52,9 +52,9 @@ module.exports = {
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
// target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
// target: `http://10.168.68.42:8087`, //王思祥
target: `http://10.168.72.174:8087`, //赵祥龙
// target: `http://10.168.72.174:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝
// target: `http://10.168.77.128:8087`, //王兴琳

Loading…
Cancel
Save