Browse Source

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

wangqin
qingzhengli 7 months ago
parent
commit
31f2622246
  1. 53
      ruoyi-ui/src/api/board/board.js
  2. 2
      ruoyi-ui/src/assets/styles/JiHeExpressway.scss
  3. 55
      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. 8
      ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
  8. 224
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  9. 84
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  10. 338
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  11. 38
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/data.js
  12. 281
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/index.vue
  13. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  14. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue
  15. 11
      ruoyi-ui/src/views/JiHeExpressway/utils/api/device.js
  16. 86
      ruoyi-ui/src/views/JiHeExpressway/utils/enum.js
  17. 1
      ruoyi-ui/src/views/login.vue
  18. 4
      ruoyi-ui/vue.config.js

53
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;

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

@ -1,25 +1,42 @@
import Vue from "vue";
import { getDicts } from "@/api/system/dict/data";
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]);
export default function () {
function initFontType(res){
let dic = {};
res.data.forEach(item => {
dic[item.dictValue] = item.cssClass;
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;
});
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 {

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);

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>

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();
})

4
ruoyi-ui/vue.config.js

@ -52,8 +52,8 @@ 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.68.42:8087`, //王思祥
target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
// target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
// target: `http://10.168.56.165:8087`, //王家宝

Loading…
Cancel
Save