Browse Source

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

wangqin
zhangzhang 10 months ago
parent
commit
62f3dcd690
  1. 51
      ruoyi-ui/src/api/board/board.js
  2. 2
      ruoyi-ui/src/assets/styles/JiHeExpressway.scss
  3. 51
      ruoyi-ui/src/common/getBoardBaseData.js
  4. 14
      ruoyi-ui/src/common/menuData.js
  5. 15
      ruoyi-ui/src/store/modules/menu.js
  6. 8
      ruoyi-ui/src/views/JiHeExpressway/components/Card1/index.vue
  7. 2
      ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue
  8. 0
      ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/flv-stream.js
  9. 0
      ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue
  10. 0
      ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/videoStream.js
  11. 8
      ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
  12. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParam.vue
  13. 182
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
  14. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  15. 201
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParamsMulti.vue
  16. 38
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  17. 102
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue
  18. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/index.vue
  19. 224
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  20. 84
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  21. 338
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  22. 38
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/data.js
  23. 281
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/index.vue
  24. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/RealTimeVideo/index.vue
  25. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  26. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue
  27. 11
      ruoyi-ui/src/views/JiHeExpressway/utils/api/device.js
  28. 86
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  29. 1
      ruoyi-ui/src/views/login.vue

51
ruoyi-ui/src/api/board/board.js

@ -15,8 +15,11 @@ export function getBoardList(query) {
// 查询设备列表
export function getBoardDeviceInfo(deviceId) {
return request({
url: `/business/board/realtimeProperty/${deviceId}`,
method: 'get'
// url: `/business/board/realtimeProperty/${deviceId}`,
url: `/business/device/properties/realtime/${deviceId}/3A`,
// url: `/business/device/batchFunctions`,
method: 'GET',
params: {}
})
}
@ -40,11 +43,49 @@ export function saveBoardReleaseLog(data) {
})
}
export function publishToBoard(data) {
let devices = []
data.deviceList.map(item=>{
devices.push(
{
id: item.id,
iotDeviceId: item.iotDeviceId,
deviceType: "2"
}
)
})
return request({
url: '/business/board/batch/publish',
// url: '/business/board/batch/publish',
url: `/business/device/batchFunctions`,
method: 'post',
data: data
// data: data
data: {
devices,
"functions": [
{
"functionId": "11",
"params": {
"size": "65535",
"fileName": "play010.lst"
}
},
{
"functionId": "13",
"params": {
parameters : data.content
}
},
{
"functionId": "1B",
"params": {
"fileId": "10"
}
}
]
}
})
}

2
ruoyi-ui/src/assets/styles/JiHeExpressway.scss

@ -1,4 +1,6 @@
.flex{ display: flex;}
.fl-col{ display: flex; flex-direction: column;}
.fl-around{display: flex; justify-content: space-between;}
.fl-1{ flex: 1;}
.theme-jihe {
$lightBlue: #3de8ff;

51
ruoyi-ui/src/common/getBoardBaseData.js

@ -1,25 +1,42 @@
import Vue from "vue";
import { getDicts } from "@/api/system/dict/data";
export default function(){
export default function () {
return Promise.all([
getDicts('iot_device_font_type'),
// getDicts('iot_devices_font_color'),
// getDicts('iot_device_font_inScreen_mode'),
// getDicts('iot_template_category'),
// getDicts('iot_device_font_size'),
]).then(resArr=>{
initFontType(resArr[0]);
return Promise.all([
getDicts('iot_device_font_type'),
getDicts('iot_board_pixel'),
// getDicts('iot_devices_font_color'),
// getDicts('iot_device_font_inScreen_mode'),
// getDicts('iot_template_category'),
// getDicts('iot_device_font_size'),
]).then(resArr => {
initFontType(resArr[0]);
initListAndDic(1, "boardPixel", "dictLabel");
function initFontType(res){
let dic = {};
res.data.forEach(item => {
dic[item.dictValue] = item.cssClass;
function initFontType(res) { //历史原因,情报板字体类型单独一个方法
let dic = {};
res.data.forEach(item => {
dic[item.dictValue] = item.cssClass;
});
Vue.prototype.fontTypeDic = dic;
Vue.prototype.fontTypeList = res.data;
}
function initListAndDic(idx, namePrefix, labelField) {
let dic = {};
let list = [];
resArr[idx].data.forEach(item => {
dic[item.dictValue] = item[labelField];
list.push({
label: item[labelField],
value: item.dictValue
});
Vue.prototype.fontTypeDic = dic;
Vue.prototype.fontTypeList = res.data;
}
});
});
Vue.prototype[namePrefix + "Dic"] = dic;
Vue.prototype[namePrefix + "Options"] = list;
}
});
}

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

@ -102,6 +102,20 @@ export default [
},
],
},
{
title: "设备管控",
name: "controlDevice",
path: "/control/device",
redirect: "controlDeviceStrategy",
children: [
{
title: "管控策略",
path: "/control/device/strategy",
name: "controlDeviceStrategy",
component: "control/device/strategy/index.vue",
}
],
},
{
title: "扫码报警",
name: "controlQR",

15
ruoyi-ui/src/store/modules/menu.js

@ -5,12 +5,12 @@ const state = {
const mutations = {
saveRecent(state){
localStorage.setItem("recentPages", JSON.stringify(state.recentPages));
sessionStorage.setItem("recentPages", JSON.stringify(state.recentPages));
},
addRecent(state, item) {
if(state.recentPages.length == 0 ){
state.recentPages = JSON.parse(localStorage.getItem("recentPages") || "[]");
state.recentPages = JSON.parse(sessionStorage.getItem("recentPages") || "[]");
}
let temp;
state.recentPages.forEach((unit,index)=>{
@ -31,16 +31,21 @@ const state = {
},
openRecent(state){
state.isRecentOpen = true;
localStorage.setItem("isRecentOpen", true);
sessionStorage.setItem("isRecentOpen", true);
},
closeRecent(state){
state.isRecentOpen = false;
localStorage.setItem("isRecentOpen", false);
sessionStorage.setItem("isRecentOpen", false);
},
removeRecent(state, item) {
let i = state.recentPages.findIndex(unit => unit.path == item.path);
state.recentPages.splice(i, 1);
mutations.saveRecent(state);
},
resetRecent(state, para){
state.isRecentOpen = false;
sessionStorage.setItem("isRecentOpen", false);
sessionStorage.removeItem("recentPages")
}
}
@ -48,7 +53,7 @@ const state = {
const getters = {
isRecentOpen(state){
if (state.isRecentOpen === ""){
state.isRecentOpen = JSON.parse(localStorage.getItem("isRecentOpen")) || false;
state.isRecentOpen = JSON.parse(sessionStorage.getItem("isRecentOpen")) || false;
}
return state.isRecentOpen;
}

8
ruoyi-ui/src/views/JiHeExpressway/components/Card1/index.vue

@ -8,7 +8,7 @@
>
<div class="info" :style="{ gap }">
<p v-for="(item, index) in keyMap" :key="index">
<span>{{ item.label }}: </span>
<span :style="{'width': labelWidth+'px'}">{{ item.label }}: </span>
<span>
<slot :name="`form-${item.key}`" :data="cardData">
{{ getValue(item) }}{{ item.suffix }}
@ -94,6 +94,10 @@ export default {
type: Boolean,
default: true,
},
labelWidth:{
type: [String,Number],
default:70
}
},
data() {
return {
@ -151,7 +155,7 @@ export default {
& > :first-child {
margin-right: 6px;
flex: 1;
// flex: 1;
}
& > :last-child {

2
ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue

@ -61,7 +61,7 @@ export default {
return {
active: "video"
}
}
},
}
</script>

0
ruoyi-ui/src/views/JiHeExpressway/components/Video2/flv-stream.js → ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/flv-stream.js

0
ruoyi-ui/src/views/JiHeExpressway/components/Video2/index.vue → ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/index.vue

0
ruoyi-ui/src/views/JiHeExpressway/components/Video2/videoStream.js → ruoyi-ui/src/views/JiHeExpressway/components/VideoMulti/videoStream.js

8
ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js

@ -48,11 +48,11 @@ export default{
},
// 发布信息
____publishInfo() {
let deviceIdList = [];
let deviceList = [];
if (this.selectedDevice){
deviceIdList = [this.selectedDevice.iotDeviceId];
deviceList = [this.selectedDevice];
}else{
deviceIdList = this.checkedDeviceIds;
deviceList = this.selectedDevices;
}
this.$confirm('是否确定发布情报板?', '提示', {
confirmButtonText: '确定',
@ -84,7 +84,7 @@ export default{
})
})
let data = { content: content, deviceIdList }
let data = { content: content, deviceList }
if (IS_TESTING) {
// this.saveLog(content);

7
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastParam.vue

@ -1,6 +1,6 @@
<template>
<div class="body">
<div class="left">
<div v-if="!isMultiControl" class="left">
<div class="title">路测广播列表</div>
<CheckboxGroup class="checkbox-group" gap="9px" :showIcon="true" v-model="checkList" :options="musicList"
id="otherConfig" label="deviceName">
@ -9,9 +9,9 @@
</template>
</CheckboxGroup>
</div>
<div class="right">
<div class="right" :style="{ width: isMultiControl ? '100%' : undefined }">
<div class="top-content">
<Video class="item-video" :pileNum="pileNum" />
<Video v-if="!isMultiControl" class="item-video" :pileNum="pileNum" />
<label>发布内容: </label>
<ElInput type="textarea" v-model="releaseMessage" :autosize="{ minRows: 3, maxRows: 3 }" :maxlength="150"
@ -58,6 +58,7 @@ export default {
visible: Boolean,
pileNum: String,
otherConfig: String,
isMultiControl: Boolean
},
data() {
return {

182
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue

@ -3,133 +3,78 @@
<div class="DeviceControlDialog">
<ElTabs v-model="activeName" class="tabs" @tab-click="tabClick">
<ElTabPane label="一般模式" name="first">
<Form
v-model="formData"
class="form"
ref="FormConfigRef"
:formList="formList1"
column="1"
labelWidth="120px"
/>
<Form v-model="formData" class="form" ref="FormConfigRef" :formList="formList1" column="1"
labelWidth="120px" />
</ElTabPane>
<ElTabPane label="自定义模式" name="second">
<div style="display: flex; margin: 20px 0">
<!-- <div style="display: flex; margin: 20px 0">
<p style="width: 115px">工作时长():</p>
<el-input-number
v-model="onWorkStatus2"
:min="0"
:max="999"
label="工作时长(s分):"
></el-input-number>
</div>
<el-input-number v-model="onWorkStatus2" :min="0" :max="999" label="工作时长(s分):"></el-input-number>
</div> -->
<Table :data="tableData">
<ElTableColumn prop="ds" label="段数"></ElTableColumn>
<ElTableColumn prop="time" width="120" label="时间(毫秒)">
<template slot-scope="scope">
<div style="display: flex">
<el-input-number
style="width: 120px"
v-model="scope.row.time"
:min="0"
></el-input-number>
<el-input-number style="width: 120px" v-model="scope.row.time" :min="0"></el-input-number>
</div>
</template>
</ElTableColumn>
<ElTableColumn prop="A" label="线路A">
<template slot-scope="scope">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.A"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
<el-switch active-value="1" inactive-value="0" v-model="scope.row.A" active-color="#13ce66"
inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="B" label="线路B">
<template slot-scope="scope">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.B"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
<el-switch active-value="1" inactive-value="0" v-model="scope.row.B" active-color="#13ce66"
inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="C" label="线路C">
<template slot-scope="scope">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.C"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
<el-switch active-value="1" inactive-value="0" v-model="scope.row.C" active-color="#13ce66"
inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="D" label="线路D">
<template slot-scope="scope">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.D"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
<el-switch active-value="1" inactive-value="0" v-model="scope.row.D" active-color="#13ce66"
inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="E" label="线路E">
<template slot-scope="scope">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.E"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
<el-switch active-value="1" inactive-value="0" v-model="scope.row.E" active-color="#13ce66"
inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="F" label="线路F">
<template slot-scope="scope">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.F"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
<el-switch active-value="1" inactive-value="0" v-model="scope.row.F" active-color="#13ce66"
inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="G" label="线路G">
<template slot-scope="scope">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.G"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
<el-switch active-value="1" inactive-value="0" v-model="scope.row.G" active-color="#13ce66"
inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
<ElTableColumn prop="H" label="线路H">
<template slot-scope="scope">
<el-switch
active-value="1"
inactive-value="0"
v-model="scope.row.H"
active-color="#13ce66"
inactive-color="#C9C9C9"
>
<el-switch active-value="1" inactive-value="0" v-model="scope.row.H" active-color="#13ce66"
inactive-color="#C9C9C9">
</el-switch>
</template>
</ElTableColumn>
@ -139,10 +84,8 @@
</div>
<template #footer>
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
<Button style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)">
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
@ -173,6 +116,7 @@ export default {
props: {
visible: Boolean,
deviceId: String,
productId: String
},
data() {
return {
@ -252,6 +196,10 @@ export default {
value: "6",
label: "SOS模式",
},
{
value: "7",
label: "自定义模式",
},
],
},
},
@ -341,16 +289,16 @@ export default {
async initData() {
//
let result = await this.requestURL("ASKMD");
if (result.data == 7) {
this.activeName = "second";
this.tabClick();
} else {
this.formData.controlType = result.data + "" || "1";
//
let resultTime = await this.requestURL("ASKTM");
this.formData.onWorkStatus = resultTime.data || 0;
this.activeName = "first";
}
// if (result.data == 7) {
// this.activeName = "second";
// this.tabClick();
// } else {
this.formData.controlType = result.data + "" || "1";
//
let resultTime = await this.requestURL("ASKTM");
this.formData.onWorkStatus = resultTime.data || 0;
this.activeName = "first";
// }
},
async requestURL(functionId, options = {}) {
let result = await request({
@ -384,6 +332,7 @@ export default {
tData.push({ ...data, ds: item.property });
}
});
tData.sort((a, b) => a.ds.toUpperCase().localeCompare(b.ds.toUpperCase()));
this.tableData = tData;
} else {
//
@ -415,36 +364,51 @@ export default {
this.tableData.forEach((it, index) => {
rData.push({
order: 7,
time: it.time,
numberOfSegments: this.duan[index],
A: Number(it.A),
B: Number(it.B),
C: Number(it.C),
D: Number(it.D),
E: Number(it.E),
F: Number(it.F),
G: Number(it.G),
H: Number(it.H),
functionId: "SETDF",
params: {
order: 7,
time: it.time,
numberOfSegments: it.ds || this.duan[index],
A: Number(it.A),
B: Number(it.B),
C: Number(it.C),
D: Number(it.D),
E: Number(it.E),
F: Number(it.F),
G: Number(it.G),
H: Number(it.H),
}
});
});
//
await request({
let res = await request({
url: `/business/device/batchFunctions`,
method: "post",
// data: {
// deviceId: this.deviceId,
// functionId: "SETDF",
// params: rData,
// },
data: {
deviceId: this.deviceId,
functionId: "SETDF",
params: rData,
},
devices: [{
iotDeviceId: this.deviceId,
id: this.productId,
deviceType: 10
}],
functions: rData
}
});
//
let res = await this.requestURL("SETTM", { SET: this.onWorkStatus2 });
if (res.code == 200) {
Message.success("设置成功!");
this.$emit("update:value", false);
}
//
// let res = await this.requestURL("SETTM", { SET: this.onWorkStatus2 });
// if (res.code == 200) {
// Message.success("");
// this.$emit("update:value", false);
// }
}
},
},

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

@ -29,6 +29,7 @@
<DeviceControlDialog
v-model="deviceControlVisible"
:deviceId="dialogData.iotDeviceId"
:productId="dialogData.id"
/>
</Dialog>
</template>

201
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParamsMulti.vue

@ -0,0 +1,201 @@
<template>
<div class='DeviceParams'>
<div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div>
<Descriptions :list="devicesList" style="gap: 18px;" column="5">
<template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }">
<span>{{ data.text }}</span>
<Switcher v-if="!disabled" class="switcher" :activeOption="activeOption" :value="data.state"
@change="(value) => handleSwitcherChange(value, data)" />
<ElTag style="margin-left: 20px;" v-else effect="dark" :type="data.state ? '' : 'info'">{{ data.state ? '开' :
'关' }}
</ElTag>
</template>
</Descriptions>
</div>
</template>
<script>
import Descriptions from '@screen/components/Descriptions.vue';
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import request from "@/utils/request";
import { Message } from 'element-ui';
import { confirm } from "@screen/utils/common";
export default {
name: 'DeviceParams',
components: {
Descriptions,
Switcher
},
props: {
dialogData: {
type: Object,
default: () => ({})
},
disabled: Boolean,
isMultiControl: Boolean
},
data() {
return {
secondLoading: true,
devicesList: [],
activeOption: {
active: {
text: "开"
},
unActive: {
text: "关"
}
}
}
},
created() {
Promise.all([this.getAc(), this.getDc()]).then(res => {
// if (result.code != 200) return;
let ac = res[0].data;
let dc = res[1].data;
let deviceInfo = _.merge({}, ac, dc);
console.log(deviceInfo, "deviceInfo11")
const typeMap = {
ac: '220v',
dc: '12v',
}
for (const key in deviceInfo.formatValue) {
// electricity
// voltage
if (key.includes('electricity')) {
const args = key.match(/[a-z]+|[0-9]+$/g);
const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_');
// console.log(type , num , prefix , "+++=========="); //dc 2 dc_out
this.devicesList.push(
{
label: `支路${num}${typeMap[type]}) 电压`,
key: `${prefix}_voltage_${num}`,
text: deviceInfo.formatValue[`${prefix}_voltage_${num}`],
gridColumn: 3
},
{
label: '电流',
key: `${prefix}_electricity_${num}`,
text: deviceInfo.formatValue[key],
gridColumn: 2,
state: deviceInfo.value[key] > 0
}
);
}
}
this.devicesList.push(
{
label: '风扇',
key: `fan_status`,
// key: `aa_electricity_1`,
text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-',
gridColumn: 2,
state: (deviceInfo.formatValue['fan_status'] === '0')
},
{
label: '温度',
key: `temperature`,
text: deviceInfo.formatValue['temperature'] ? `${deviceInfo.formatValue['temperature']} °C` : '-',
gridColumn: 2
},
{
label: '箱门',
key: `door_status`,
text: { 0: '关闭', 1: '打开' }[deviceInfo.formatValue['door_status']] || '-',
gridColumn: 1
},
{
label: '湿度',
key: `humidity`,
text: deviceInfo.formatValue['humidity'] ? `${deviceInfo.formatValue['humidity']} %` : '-',
gridColumn: 2
},
{
label: '市电掉电',
key: `power_status`,
text: { 0: '正常', 1: '掉电' }[deviceInfo.formatValue['power_status']] || '-',
gridColumn: 2
},
)
// this.data = result.rows;
// this.total = result.total;
})
.finally(() => {
this.secondLoading = false
})
},
methods: {
getAc() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1ac`,
method: "get",
params: {}
})
},
getDc() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1dc`,
method: "get",
params: {}
})
},
async handleSwitcherChange(value, data) {
let str = data.state ? "关闭" : "开启";
let deviceName = "";
if (data.key.includes("fan")) {
str += "风扇?";
deviceName = "fan_out_en";
} else {
str += "该支路?"
deviceName = data.key.match(/^[a-z]+_out|[0-9]+/g).join("_") + "_en"; //dc_out_2_en ac_out_2_en;
}
data.state = value;
const isContinue = await confirm({ message: `${str}` })
.catch(() => {
console.log(data.state, value, 333)
data.state = !value;
});
if (!isContinue) return;
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc=
request({
url: `/business/device/functions/${this.dialogData.iotDeviceId}/${102}`,
method: "POST",
data: {
deviceName,
// 1=0=
value: value ? 1 : 0
}
})
.then(result => {
if (result.code != 200) {
Message.error("操作失败");
data.state = !value;
return;
};
Message.success("操作成功");
})
.catch(() => {
data.state = !value;
Message.error("操作失败");
})
},
getSlotKey(key) {
return key.includes('electricity') || key.includes('fan') ? key : ''
}
}
}
</script>
<style lang='scss' scoped>
.DeviceParams {
height: 100%;
}
</style>

38
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue

@ -1,32 +1,12 @@
<template>
<Dialog
v-model="obverseVisible"
:title="dialogData._itemData && dialogData._itemData.title"
width="650px"
>
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title" width="650px">
<div class="TrafficIncidents">
<div class="header">
<Video
class="video-stream"
:pileNum="dialogData.stakeMark"
rangeIndex="upCamera"
:showHeader="false"
/>
<Video
class="video-stream"
:pileNum="dialogData.stakeMark"
rangeIndex="downCamera"
:showHeader="false"
/>
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="upCamera" :showHeader="false" />
<Video class="video-stream" :pileNum="dialogData.stakeMark" rangeIndex="downCamera" :showHeader="false" />
</div>
<Descriptions
labelWidth="72px"
:list="list"
:data="data"
style="gap: 18px"
column="7"
/>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" />
</div>
</Dialog>
</template>
@ -35,7 +15,7 @@
import Dialog from "@screen/components/Dialog/index.vue";
import Descriptions from "@screen/components/Descriptions.vue";
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import Video from "@screen/components/Video";
import Video from "@screen/components/VideoMulti";
import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin";
@ -141,10 +121,10 @@ export default {
this.data = { ...data, ...this.data };
console.log("trafficIncidents", data);
})
.catch((err) => {});
.catch((err) => { });
},
methods: {
handleClickTabs() {},
handleClickTabs() { },
},
};
</script>
@ -165,7 +145,7 @@ export default {
display: flex;
gap: 9px;
> div.video-stream {
>div.video-stream {
height: 210px;
}
}
@ -193,7 +173,7 @@ export default {
align-items: center;
justify-content: end;
> div {
>div {
font-size: 16px;
padding: 6px 12px;
}

102
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue

@ -12,7 +12,9 @@
<span class="close" @click="() => { this.activeIcon = null; }">
<i class="el-icon-close" />
</span>
<Form labelWidth="90px" column="2" class="form" ref="FormConfigRef" :formList="formList" />
<Form v-model="data" labelWidth="90px" column="2" class="form" ref="FormConfigRef" :formList="formList" />
<component :is="componentMap[DeviceTopics[data.deviceType]]" :isMultiControl="true"></component>
<!-- -->
<div class="footer">
<Button @click.native="">
确认
@ -35,9 +37,15 @@ import { ChildTypes } from "@screen/utils/enum.js"
import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { delay } from "@screen/utils/common";
import { initSearch } from "@screen/utils/enum/common.js"
import DeviceParams from "@screen/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue";
import BroadcastParam from "@screen/pages/Home/components/Dialogs/Broadcast/components/BroadcastParam.vue";
import Vue from "vue";
import { DeviceForMap } from "@screen/pages/Home/components/RoadAndEvents/utils/buttonEvent"
const controlMulti = ["情报板", "行车诱导", "疲劳唤醒", "合流区", "设备箱", "语音广播"];
const componentMap = { "语音广播": "BroadcastParam" } //DeviceTopics[deviceType]
//"": undefined, "": undefined, "": undefined, "": undefined,"": "DeviceParams",
const controlMulti = Object.keys(componentMap);//6
const DeviceTopics = {};//6 {key:label}
Object.keys(DeviceForMap).forEach(DeviceLabel => {
@ -49,7 +57,7 @@ async function setDeviceOptions(config, filterData, formList) {
return data;
});
formList[4].options.options = data.map(item => {
return { label: `${item.deviceName}${item.stakeMark}`, value: JSON.stringify({ id: item.id, iotDeviceId: item.iotDeviceId }) }
return { label: `${item.deviceName}`, value: JSON.stringify({ id: item.id, iotDeviceId: item.iotDeviceId }), disabled: item.deviceState != 1 }
})
};
function changeHandle(data, formList) {
@ -58,16 +66,20 @@ function changeHandle(data, formList) {
data.startStakeMark && (filterData.startStakeMark = data.startStakeMark);
data.endStakeMark && (filterData.endStakeMark = data.endStakeMark);
setDeviceOptions({ deviceType: data.deviceType }, filterData, formList);
data.childType = undefined;
}
export default {
name: "HomeFrameControl",//
components: {
Button,
Form,
DeviceParams,
BroadcastParam
},
data() {
return {
activeIcon: null,
data: {},
formList: [
{
label: "设备类型:",
@ -75,12 +87,14 @@ export default {
type: "select",
options: {
clearable: true,
options: [],
options: Object.keys(DeviceTopics).map(key => { return { label: DeviceTopics[key], value: key } }),
},
ons: { //on element
change(value, ...args) {
const { data, formList } = args.slice(-1)[0]; //data formList
data.deviceType && changeHandle(data, formList);
console.log(Vue, this)
if (data.deviceType) changeHandle(data, formList);
else data.childType = undefined;
}
},
},
@ -212,54 +226,54 @@ export default {
options: {
clearable: true,
options: [],
multiple: true,
["collapse-tags"]: true
},
visible: data => {
return true;
},
},
{
label: "控制操作:",
key: "controlOp",
type: "select",
default: null,
options: {
clearable: true,
options: [{
label: "在线",
value: "1"
}, {
label: "离线",
value: "0"
}]
},
visible: data => {
// if (find(this.activeDeviceTypes, (type => type.match("_"))))
// return true;
},
},
]
// {
// label: ":",
// key: "controlOp",
// type: "select",
// default: null,
// options: {
// clearable: true,
// options: [{
// label: "线",
// value: "1"
// }, {
// label: "线",
// value: "0"
// }]
// },
// },
],
DeviceTopics,
componentMap
}
},
inject: ["activeDeviceTypes"],
watch: {
activeDeviceTypes: {
handler(val) {
const activeTopicOptions = []
this.activeDeviceTypes.filter(activeDeviceType => {
const match = activeDeviceType.match(/路测设备_(\d+)/);
if (match) {
const deviceType = match[1];
DeviceTopics[deviceType] && activeTopicOptions.push({ label: DeviceTopics[deviceType], value: deviceType });
// inject: ["activeDeviceTypes"],
// watch: {
// activeDeviceTypes: {
// handler(val) {
// const activeTopicOptions = []
// this.activeDeviceTypes.filter(activeDeviceType => {
// const match = activeDeviceType.match(/_(\d+)/);
// if (match) {
// const deviceType = match[1];
// DeviceTopics[deviceType] && activeTopicOptions.push({ label: DeviceTopics[deviceType], value: deviceType });
}
});
this.formList[0].options.options = activeTopicOptions;
// }
// });
// this.formList[0].options.options = activeTopicOptions;
},
immediate: true,
deep: true
}
},
// },
// immediate: true,
// deep: true
// }
// },
methods: {
cancelClick() {
this.activeIcon = null;

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

@ -1,8 +1,8 @@
<template>
<div class="Home">
<AMapContainer ref="AMapContainerRef" @update:isGisCompleted="(data) => {
this.isGisCompleted = data;
}
this.isGisCompleted = data;
}
" />
<section class="content">
<!-- 左侧 -->
@ -22,7 +22,7 @@
<HomeVector class="item" />
<HomeWord class="item" />
<!-- <HomeVectorControl class="item" /> -->
<HomeFrameControl class="item" />
<!-- <HomeFrameControl class="item" /> -->
</div>
<ConditionStatistics class="right card-menu" />
</div>

224
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue

@ -0,0 +1,224 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'" width="900px">
<div class="AddNEditDialog">
<!-- <Form :value="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="80px" /> -->
<el-form ref="form" :model="formStrategy" label-width="80px">
<el-form-item label="名称">
<el-input v-model="formData.groupName"></el-input>
</el-form-item>
<el-form-item label="描述">
<el-input v-model="formData.remark"></el-input>
</el-form-item>
<div class="task" v-for="task,index in formStrategy">
<div class="fl-around task_info">
<el-input v-model="task.time"></el-input>
<div class="fl-around task_op">
<el-button size="mini" type="primary">新增</el-button>
<el-button size="mini" type="primary">删除</el-button>
</div>
</div>
<div>
<TaskItem v-for="item, index in task.content" :data="item" @onModify="newV=>onModifyItem(newV, item)">
</TaskItem>
</div>
</div>
</el-form>
</div>
<template #footer>
<Button style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)">
取消
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import request from "@/utils/request";
import { Message } from "element-ui";
import { addEditFormList } from "./../data";
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js";
import TaskItem from "./TaskItem.vue";
export default {
name: "AddNEditDialog",
components: {
Dialog,
Button,
Form,
TaskItem
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
data: Object,
dataAll: Array,
},
data() {
return {
submitting: false,
formData: {},
formList: addEditFormList,
formStrategy:[
{
time:"gdfsfds",
content:[
{
type:"5",
devices:[""],
options:{
}
},
{
type: "2",
devices: [""],
options: {
}
}
]
}
]
};
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
watch: {
modelVisible: {
immediate: true,
handler(bool) {
if (!bool) return;
this.formData = !this.data
? {}
: {
...this.data,
};
this.testGetData();
},
},
},
mounted() {
// "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split('').forEach(item => {
// request({
// url: `/business/dcInfoBoardVocabulary`,
// method: 'POST',
// data:{
// word:""+item
// }
// })
// });
},
methods: {
onModifyItem(newV , oldV){
console.log(newV, oldV , "修改条目》》》")
// oldV.devices
},
testGetData(){
request({
url: `/business/dcBatchFunctionsJob/query`,
method: "GET",
params: {
jobGroup: 0
},
})
.then((result) => {
if (result.code != 200) return;
console.log(result.data, "接口数据");
})
},
checkRepeat(word) {
let temp = _.find(this.dataAll, { word: word });
if (
temp &&
Object.keys(temp).length > 0 &&
!(this.data && this.data.id == temp.id)
) {
this.$message.error("该关键词已存在。");
return false;
} else {
return true;
}
},
handleSubmit() {
this.$refs.FormConfigRef.validate().then((data) => {
data.word = data.word.trim();
this.submitting = true;
if (this.data) data.id = this.data.id;
// if (!this.checkRepeat(data.word)) {
// return;
// }
request({
url: `/business/dcInfoBoardVocabulary`,
method: this.data ? "PUT" : "POST",
data,
})
.then((result) => {
if (result.code != 200) return;
Message.success(`提交成功!`);
this.$emit("onSuccess");
this.modelVisible = false;
})
.catch((err) => {
console.log(
"%c [ err ]-110-「DeviceControlDialog.vue」",
"font-size:15px; background:#547bf2; color:#98bfff;",
err
);
// Message.error(`!`);
})
.finally(() => {
this.submitting = false;
});
});
},
},
};
</script>
<style lang="scss" scoped>
.AddNEditDialog {
width: 100%;
display: flex;
flex-direction: column;
gap: 15px;
.tips {
font-size: 12px;
}
}
.task{
border: 1px solid #FFF;
.task_info{
}
.task_op{
}
}
</style>

84
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue

@ -0,0 +1,84 @@
<template>
<div class="task_editor_box">
<div class="flex">
<div>
{{ data }}
</div>
<el-form-item>
<el-button size="mini" type="primary" @click="onModify">修改</el-button>
<el-button size="mini" type="danger" @click="onDelete">删除</el-button>
</el-form-item>
</div>
<taskEditDialog v-model="isEditing" :data="data" @onSubmit="onSubmit" />
</div>
</template>
<script>
import { deviceTypeOptions } from "@screen/utils/enum.js"
import { getDeviceList } from "@screen/utils/api/device.js"
import taskEditDialog from "./taskEditDialog.vue";
export default {
name: "TaskEditor",
components: {
taskEditDialog
},
props: {
data:Object
},
data() {
return {
editData:{},
isEditing: false,
selectedType:"",
deviceTypeOptions:"",
deviceOptions:""
};
},
computed: {
},
watch: {
},
mounted() {
this.deviceTypeOptions = deviceTypeOptions;
},
methods: {
onModify(){
this.isEditing = true;
},
onSubmit(){
this.isEditing = false;
let devices = _.filter(this.deviceOptions, item=>{
this.editData.devices.includes(item.id);
})
console.log(devices, "选中的设备")
this.$emit("onModify", {devices});
},
onDelete(){
},
onChange(val){
this.deviceOptions = [];
getDeviceList({ deviceType :val}).then(res=>{
res.data.forEach(item=>{
this.deviceOptions.push({
label: item.deviceName,
value: item.id
})
})
}).catch(err=>{})
}
},
};
</script>
<style lang="scss" scoped>
.task_editor_box{
}
</style>

338
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue

@ -0,0 +1,338 @@
<template>
<Dialog v-model="modelVisible" title="修改" width="600px">
<el-form-item label="设备类型">
<!-- <el-radio-group v-model="searchData.deviceType" @input="onChange">
<el-radio-button v-for="item in deviceTypeOptions" :key="item.value" :label="item.label" :value="item.value"
v-if="item.timingControl"></el-radio-button>
</el-radio-group> -->
<el-select v-model="searchData.deviceType" placeholder="请选择设备类型" @change="onChange">
<el-option v-for="item in deviceTypeOptions" :key="item.value" :label="item.label" :value="item.value"
v-if="item.timingControl">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="方向">
<el-select v-model="searchData.direction" placeholder="请选择方向" @change="onChange" clearable>
<el-option v-for="item in directionOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="选择设备" v-if="searchData.deviceType != '2'">
<el-select v-model="editData.devices" multiple placeholder="请选择设备" filterable>
<el-option v-for="item in deviceOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<template v-if="searchData.deviceType=='2'">
<el-form-item label="屏幕像素">
<el-select v-model="filterData.pixelSize" placeholder="请选择" clearable @change="resetEditData">
<el-option v-for="item in boardPixelOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="选择设备">
<el-select v-model="editData.devices" multiple placeholder="请选择设备" filterable>
<el-option v-for="item in deviceOptions" :key="item.value" :label="item.label" :value="item.value"
v-if="item.pixelSize == filterData.pixelSize">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="预览" v-if="filterData.pixelSize">
<div class="tplItem">
<!-- 模板内容 -->
<BoardPreview class="boardPreview" :boardWH="filterData.pixelSize" :tpl="editData.type2" />
<!-- 操作按钮 -->
<div class="infoBtnBox">
<el-tooltip content="编辑" placement="top">
<p @click="onEditBoard" class="btn btnEdit"></p>
</el-tooltip>
</div>
</div>
</el-form-item>
</template>
<template v-else-if="searchData.deviceType == '5'">
<!-- 语音广播 -->
<el-form-item label="广播内容">
<el-input type="textarea" v-model="editData.type5.content"></el-input>
</el-form-item>
</template>
<template v-else-if="searchData.deviceType == '10'">
<!-- 激光疲劳唤醒 -->
<el-form-item label="工作模式">
<el-select v-model="editData.type10.mode" placeholder="请选择">
<el-option v-for="key,value in gzmsMap" :key="key" :label="value" :value="key" />
</el-select>
</el-form-item>
<el-form-item label="工作时长">
<el-col :span="8">
<el-input-number v-model="editData.type10.timeLength" :min="1" :max="600" label="描述文字" />
</el-col>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
</el-form-item>
</template>
<template v-else-if="searchData.deviceType == '12'">
<!-- 行车诱导 -->
<el-form-item label="工作状态">
<el-select v-model="editData.type12.mode" placeholder="请选择">
<el-option v-for="key, value in gzztMap" :key="key" :label="value" :value="key" />
</el-select>
</el-form-item>
<el-form-item label="工作时长">
<el-col :span="8">
<el-input-number v-model="editData.type12.timeLength" :min="1" :max="600" label="描述文字" />
</el-col>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
</el-form-item>
</template>
<template v-else-if="searchData.deviceType == '13'">
<!-- 智能设备箱 -->
<el-form-item label="开启">
<el-switch v-model="editData.type13.open">
<!-- active-color="#13ce66" inactive-color="#ff4949" -->
</el-switch>
</el-form-item>
</template>
<el-form-item>
<el-button size="mini" type="primary" @click="onSubmit">确定</el-button>
</el-form-item>
<BoardInfoEditor @afterSubmit="____onEditSubmit" :mode="editDialog.mode" :type="editDialog.type"
:visible.sync="editDialog.visible" :screenSize="'768*60'" :tpl="editDialog.tpl"></BoardInfoEditor>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import { deviceTypeOptions, directionOptions, gzmsMap, gzztMap } from "@screen/utils/enum.js"
import { getDeviceList } from "@screen/utils/api/device.js"
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue";
import BoardInfoEditor from "@screen/components/infoBoard/BoardInfoEditor";
export default {
name: "taskEditDialog",
components: {
Dialog, BoardInfoEditor, BoardPreview
},
model: {
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
data: Object
},
data() {
return {
deviceTypeOptions,
directionOptions,
gzmsMap,
deviceOptions:[],
searchData: {
deviceType: "",
direction: ""
},
filterData:{
pixelSize:""
},
editData:{
devices:[],
type2:{},
type5:{},
type10:{},
type12:{},
type13:{}
},
editDialog:{}
};
},
computed: {
modelVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:value", val);
},
},
},
watch: {
modelVisible: {
immediate: true,
handler(bool) {
if (!bool) return;
},
},
},
mounted() {
// this.deviceTypeOptions = deviceTypeOptions;
// this.directionOptions = directionOptions;
},
methods: {
onEditBoard(){
this.editDialog = {
visible: true,
mode: "edit",
type: "device",
tpl: {
"residenceTime": "90",
"intonation": "0",
"fontSpacing": "0",
"screenEntryMethod": "1",
"screenOutputMethod": "1",
"lineSpacing": "0",
"yCoordinate": "0",
"whetherToSynchronizePlayback": "0",
"whetherToPlayText": "0",
"playbackCount": "1",
"flashingFrequency": "5",
"backgroundColor": "8",
"foregroundColor": "ffff00",
"textContent": "长清收费站\\\\n出入口封闭",
"fontStyle": "0",
"displayAreaWidth": "160",
"playbackDuration": "90",
"displayAreaHeight": "80",
"volume": "0",
"xCoordinate": "0",
"screenEntrySpeed": "1",
"horizontalAlignment": "2",
"playSpecialEffects": "0",
"setUpTheSpeaker": "0",
"flickerSpeed": "0",
"specialEffectsSpeed": "1",
"fontSize": "24",
"verticalAlignment": "2",
"speechSpeed": "0",
"font": "3"
},
};
},
____onEditSubmit(data){
console.log(data.data);
this.editDialog.visible = false;
this.editData.type2 = data.data;
},
onSubmit(){
let this.boardDataTransform();
let devices =
let data = {devices, functions }
console.log(this.editData , "编辑出来的数据");
},
onChange() {
this.resetEditData();
this.deviceOptions = [];
getDeviceList(this.searchData).then(res => {
res.data.forEach(item => {
this.deviceOptions.push({
label: item.deviceName,
value: item.id,
pixelSize: JSON.parse(item.otherConfig).screenSize
})
})
}).catch(err => { })
},
resetEditData(){
this.editData.devices = [];
}
}
};
</script>
<style lang="scss" scoped>
.AddNEditDialog {
width: 100%;
display: flex;
flex-direction: column;
gap: 15px;
.tips {
font-size: 12px;
}
}
.task{
border: 1px solid #FFF;
.task_info{
}
.task_op{
}
}
.tplItem {
margin-right: 14px;
display: flex;
align-items: stretch;
padding-bottom: 10px;
.boardPreview {
border: 1px solid rgba(61, 232, 255, 0.5);
// width: 560px;
// height:80px;
flex: 1;
}
.infoBtnBox {
&.infoBtnBoxSm {
width: 60px;
}
width: 110px;
height: 80px;
display: flex;
margin-left: 10px;
/* // border: solid 1px #05afe3; */
border: 1px solid rgba(61, 232, 255, 0.5);
display: flex;
justify-content: space-around;
align-items: center;
.btn {
background-repeat: no-repeat;
background-size: 100% 100%;
width: 30px;
height: 30px;
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.svg);
}
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.svg);
}
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.svg);
}
}
i {
font-size: 24px;
color: #666;
padding-left: 4px;
cursor: pointer;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
}
i:hover {
color: #05afe3;
}
.disabledClass {
pointer-events: none;
cursor: auto !important;
color: #ccc;
}
}
}
</style>

38
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/data.js

@ -0,0 +1,38 @@
import { cloneDeep, merge } from "lodash";
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
export const searchFormList = [
{
label: "关键词:",
key: "word",
}
];
export const addEditFormList = [
{
label: "关键词:",
key: "word",
required: true,
isAlone:true,
options: {
type: "text",
autosize: true,
// maxlength: 50,
autosize: { minRows: 1, maxRows: 20 },
showWordLimit: true,
}
},
{
label: "关键词2:",
key: "word2",
isAlone: false,
required: true,
options: {
type: "textarea",
autosize: true,
// maxlength: 50,
autosize: { minRows: 2, maxRows: 20 },
showWordLimit: true,
}
}
];

281
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/index.vue

@ -0,0 +1,281 @@
<template>
<div class="sensitiveWord" v-loading="isLoading" element-loading-text="数据加载中"
element-loading-background="rgba(0, 0, 0, 0.3)">
<div class="filter">
<div>
<ButtonGradient @click.native="handleAddEdit(true)">
<template #prefix>
<img src="@screen/images/insert.svg" />
</template>
新增
</ButtonGradient>
<ButtonGradient @click.native="handleExport">
<template #prefix>
<img src="@screen/images/export.svg" />
</template>
导出
</ButtonGradient>
<ButtonGradient @click.native="onReset">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
刷新
</ButtonGradient>
</div>
<InputSearch style="width: 402px" type="input" params="word" :disable="true" placeholder="请输入敏感词,回车搜索"
@handleSearch="handleSearch" ref="form" />
</div>
<div class="body">
<Empty v-if="!data.length && !isFirst" class="no-data" style="position: absolute">暂无数据</Empty>
<template v-else>
<div class="cardBox" v-for="(item, index) in data" :key="index">
<Card :buttonIcon="null" :keyMap="keyMap" :cardData="item" class="card" buttonText="详情">
<template #form-remark="{ data }">
<div class="remark">
{{ data.remark }}
</div>
</template>
<template #button>
<Switcher class="switcher" :activeOption="activeOption" :value="item.status!='0'"
@change="(value) => handleSwitcherChange(value, item) " />
<Button @click.native="() => handleAddEdit(true, item)">
编辑
</Button>
<Button style="background-color: #ff5f5f" @click.native="handleDelete(item)">
删除
</Button>
</template>
</Card>
</div>
</template>
</div>
<!-- 分页 -->
<div class="footer" v-if="numTotal > 0">
<Pagination :total="numTotal" :current-page.sync="currentPage" :page-sizes="[35, 70, 105, 140, 175]"
:page-size="pageSize" layout="total,sizes,prev, pager, next, jumper" @size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
<AddNEditDialog v-model="isShowDialog" :data="dialogData" @onSuccess="getData" :dataAll="data" />
</div>
</template>
<script>
import Card from "@screen/components/Card1/index.vue";
import AddNEditDialog from "./components/AddNEditDialog.vue";
import InputSearch from "@screen/components/InputSearch/index.vue";
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import Button from "@screen/components/Buttons/Button.vue";
import Pagination from "@screen/components/Pagination.vue";
import { searchFormList } from "./data";
import request from "@/utils/request";
// import { setLoading } from "@screen/utils/index.js"
import { delay, exportFile, confirm } from "@screen/utils/common";
import { Message } from "element-ui";
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
//
export default {
name: "sensitiveWord",
components: {
Switcher,
Pagination,
Card,
ButtonGradient,
InputSearch,
AddNEditDialog,
Button,
},
data() {
return {
activeOption: {
active: {
text: "开"
},
unActive: {
text: "关"
}
},
isLoading: false,
searchText: "请输入敏感词,回车搜索",
searchFormList,
numTotal: 0,
pageSize: 42,
currentPage: 1,
keyMap: [
{
key: "groupName",
label: "标题",
},
{
key: "remark",
label: "描述",
},
],
data: [],
dialogData: null,
isShowDialog: false,
isFirst: true,
};
},
created() {
this.getData();
// this.getSearchOptions();
},
methods: {
async handleSwitcherChange(value, item) {
item.status == "1" ? item.status = "0" : item.status = "1" ;
},
getSearchData() {
let params = {
word: this.searchData?.word,
pageSize: this.pageSize,
pageNum: this.currentPage,
};
// params = {
// pageSize: 1000000,
// pageNum: 1
// };
return params;
},
async handleDelete(data) {
await confirm({ message: "是否要删除该敏感词?" });
request({
url: `/business/dcInfoBoardVocabulary/${data.id}`,
method: "DELETE",
data: {},
})
.then((result) => {
if (result.code != 200) return Message.error("删除失败");
Message.success("删除成功");
this.getData();
})
.catch(() => {
Message.error("删除失败");
});
},
handleAddEdit(bool, data) {
this.isShowDialog = bool;
this.dialogData = data;
},
handleExport() {
exportFile({
url: "/business/dcInfoBoardVocabulary/export",
filename: "情报板敏感词",
data: this.getSearchData(),
});
},
handleSearch(data) {
this.searchData = data;
this.getData();
},
onReset(){
this.searchData.word = undefined;
// console.log(this.$refs["form"] , "__-=========");
this.$refs["form"].handleResetForm();
this.getData();
},
async getData() {
// const closeLoading = setLoading();
this.isLoading = true;
await delay(100);
//
this.data = [{
groupName : "任务组一",
remark : "每天早7点关闭激光唤醒设备,晚7点打开激光唤醒设备。每天早7点关闭激光唤醒设备,晚7点打开激光唤醒设备。"
}]
this.isLoading = false;
return;
//
request({
url: `/business/dcBatchFunctionsJobGroup/list`,
method: "get",
params: this.getSearchData(),
})
.then((result) => {
this.searchText = this.searchData?.word || "请输入敏感词,回车搜索";
if (result.code != 200) return;
this.data = result.rows;
this.data.map(item=>{
item.remark = "每天早7点关闭激光唤醒设备,晚7点打开激光唤醒设备。每天早7点关闭激光唤醒设备,晚7点打开激光唤醒设备。"
});
this.numTotal = result.total;
// this.pageTotal = Math.ceil(result.total/this.pageSize);
})
.finally(() => {
this.isFirst = false;
// closeLoading();
this.isLoading = false;
});
},
handleSizeChange(size) {
this.pageSize = size;
this.getData();
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage;
this.getData();
},
},
};
</script>
<style lang="scss" scoped>
.sensitiveWord {
width: 100%;
height: 100%;
padding: 20px;
display: flex;
flex-direction: column;
.filter {
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
div {
display: flex;
gap: 6px;
}
}
.body {
height: 0;
flex: 1;
overflow: hidden;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
.cardBox {
flex-basis: percentage(1/5);
width: 0;
padding-right: 10px;
padding-bottom: 10px;
}
.remark {
font-size: 14px; line-height: 20px; height: 40px; overflow: hidden;
color: #00b3cc;
}
}
.footer {
margin-top: 15px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
}
}
</style>

8
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/RealTimeVideo/index.vue

@ -1,11 +1,13 @@
<template>
<Card class='RealTimeVideo' title="实时视频">
<div class="item">
<Video v-if="detailData.stakeMark" class="item-video" :pileNum="detailData.stakeMark" rangeIndex="upCamera" :showHeader="false" />
<Video v-if="detailData.stakeMark" class="item-video" :pileNum="detailData.stakeMark" rangeIndex="upCamera"
:showHeader="false" />
<span>济南方向</span>
</div>
<div class="item">
<Video v-if="detailData.stakeMark" class="item-video" :pileNum="detailData.stakeMark" rangeIndex="downCamera" :showHeader="false" />
<Video v-if="detailData.stakeMark" class="item-video" :pileNum="detailData.stakeMark" rangeIndex="downCamera"
:showHeader="false" />
<span>菏泽方向</span>
</div>
</Card>
@ -13,7 +15,7 @@
<script>
import Card from "@screen/components/Card2/Card.vue";;
import Video from "@screen/components/Video2"
import Video from "@screen/components/VideoMulti"
import { provideMixin } from "./../../mixin"
export default {

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

@ -513,7 +513,7 @@ export default {
return;
}
this.selectedBdMsg = [];
getBoardDeviceInfo(deviceFrom.iotDeviceId)
getBoardDeviceInfo(deviceFrom.iotDeviceId, deviceFrom.id)
.then((res) => {
this.selectedBdMsg = res.data["3A"].content;
this.isHideCtt = true;

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

@ -203,6 +203,7 @@ export default {
.body {
flex: 1;
height: 0;
}
.footer {

11
ruoyi-ui/src/views/JiHeExpressway/utils/api/device.js

@ -0,0 +1,11 @@
import request from '@/utils/request'
// 查询设备列表
export function getDeviceList(query){
return request({
url: '/business/device/query',
method: 'get',
params: query
})
}

86
ruoyi-ui/src/views/JiHeExpressway/utils/enum.js

@ -163,7 +163,86 @@ export const WarningType = {
99: "其他事件",
};
//========= 感知事件 主类(key vulue) [{value: 1, label: '交通拥堵'}]=========
// 交通事件主类
export const trafficType = {
1: "交通事故",
2: "车辆故障",
3: "交通管制",
4: "交通拥堵",
5: "非法上路",
6: "路障清除",
7: "施工建设",
8: "服务区异常",
9: "设施设备隐患",
10: "异常天气",
11: "其他事件",
};
//设备Options
export const deviceTypeOptions = [
{
value: 1,
label: "摄像机",
},
{
value: 2,
label: "可变信息标志",
timingControl: true
},
{
value: 3,
label: "气象监测器",
},
{
value: 4,
label: "出口诱导灯",
},
{
value: 5,
label: "路段语音广播",
timingControl: true
},
{
value: 6,
label: "护栏碰撞",
},
{
value: 7,
label: "毫米波雷达",
},
{
value: 8,
label: "合流区预警",
},
{
value: 9,
label: "智慧锥桶",
},
{
value: 10,
label: "激光疲劳唤醒",
timingControl: true
},
{
value: 11,
label: "一类交通量调查站",
},
{
value: 12,
label: "行车诱导",
timingControl: true
},
{
value: 13,
label: "智能设备箱",
timingControl: true
},
{
value: 14,
label: "光线在线监测",
},
];
export const WarningTypeList = Object.keys(WarningType).map((key) => {
return {
value: key * 1,
@ -908,6 +987,11 @@ export const DirectionTypes = {
3: "济南方向",
2: "双向",
};
export const directionOptions = [
{value : "1", label : "菏泽方向"},
{value : "3", label : "济南方向"},
{value : "2", label : "双向"}
];
//行车诱导相关

1
ruoyi-ui/src/views/login.vue

@ -207,6 +207,7 @@ export default {
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
this.$store.commit("menu/resetRecent");
this.$router.push({ path: this.redirect || "/" }).catch(() => {});
// this.getManageStation();
})

Loading…
Cancel
Save