Browse Source

完善情报板记录和定时管控

wangqin
hui 7 months ago
parent
commit
6afc7951f6
  1. 7
      ruoyi-ui/src/App.vue
  2. 17
      ruoyi-ui/src/store/modules/menu.js
  3. 17
      ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue
  4. 1
      ruoyi-ui/src/views/JiHeExpressway/index.vue
  5. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  6. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  7. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue
  8. 4
      ruoyi-ui/vue.config.js

7
ruoyi-ui/src/App.vue

@ -21,16 +21,19 @@ export default {
name: "App",
data() {
return {
path: this.$route.path,
// path: this.$route.path,
};
},
mounted(){
this.$store.commit("menu/resetRecent");
},
components: {
websocket,
// websocket_phone
},
watch: {
$route(to, from) {
this.path = this.$route.path;
// this.path = this.$route.path;
},
},
metaInfo() {

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

@ -1,3 +1,4 @@
import Vue from "vue"
const state = {
recentPages: [],
isRecentOpen:"",
@ -5,12 +6,12 @@ const state = {
const mutations = {
saveRecent(state){
sessionStorage.setItem("recentPages", JSON.stringify(state.recentPages));
localStorage.setItem("recentPages", JSON.stringify(state.recentPages));
},
addRecent(state, item) {
if(state.recentPages.length == 0 ){
state.recentPages = JSON.parse(sessionStorage.getItem("recentPages") || "[]");
state.recentPages = JSON.parse(localStorage.getItem("recentPages") || "[]");
}
let temp;
state.recentPages.forEach((unit,index)=>{
@ -32,18 +33,19 @@ const state = {
pinRecent(state, item){
state.recentPages.forEach((unit, index) => {
if (unit.path == item.path) {
unit.isPinned = !unit.isPinned;
// unit.isPinned = !unit.isPinned;
Vue.prototype.$set(unit, "isPinned", !unit.isPinned);
}
});
mutations.saveRecent(state);
},
openRecent(state){
state.isRecentOpen = true;
sessionStorage.setItem("isRecentOpen", true);
localStorage.setItem("isRecentOpen", true);
},
closeRecent(state){
state.isRecentOpen = false;
sessionStorage.setItem("isRecentOpen", false);
localStorage.setItem("isRecentOpen", false);
},
removeRecent(state, item) {
let i = state.recentPages.findIndex(unit => unit.path == item.path);
@ -51,13 +53,14 @@ const state = {
mutations.saveRecent(state);
},
resetRecent(state, para){
temp = JSON.parse(sessionStorage.getItem("recentPages") || "[]");
let temp = JSON.parse(localStorage.getItem("recentPages") || "[]");
state.recentPages = [];
temp.forEach((unit, index) => {
if (unit.isPinned) {
state.recentPages.push(unit);
}
});
localStorage.setItem("recentPages", JSON.stringify(state.recentPages));
state.isRecentOpen = true;
}
@ -66,7 +69,7 @@ const state = {
const getters = {
isRecentOpen(state){
if (state.isRecentOpen === ""){
state.isRecentOpen = JSON.parse(sessionStorage.getItem("isRecentOpen")) || false;
state.isRecentOpen = JSON.parse(localStorage.getItem("isRecentOpen")) || false;
}
return state.isRecentOpen;
}

17
ruoyi-ui/src/views/JiHeExpressway/components/RecentPages/index.vue

@ -15,8 +15,13 @@
:style="{width:item.title.length*14+'px'}">
{{item.title}}
</p>
<p class="btn_pin" :class="{active:item.isPinned}" @click="onPin(item)"><i></i></p>
<i class="btn_close iconfont icon-guanbi" @click="onRemoveItem(item)"></i>
<el-tooltip effect="light" content="记住" placement="bottom">
<p class="btn_pin" :class="item.isPinned ? 'active' :'unactive'" @click="onPin(item)">
<i></i>
</p>
</el-tooltip>
<!-- <p class=" btn_pin" :class="{active:item.isPinned}" @click="onPin(item)"><i></i></p> -->
<i class="btn_close iconfont icon-guanbi" @click="onRemoveItem(item)"></i>
</div>
</div>
</div>
@ -241,11 +246,15 @@ export default{
width:16px; height: 10px;
display: flex; align-items: center; justify-content: center;
i{
display: block;
display: none;
width:6px; height: 6px; border-radius: 3px;
}
&.active i{ background-color: #FA0;}
&.active i{ display: block; background-color: #FA0; }
}
&:hover .btn_pin.unactive i {
display: block;
background-color: #999;
}
.btn_close {
position: absolute;
right: 6px;

1
ruoyi-ui/src/views/JiHeExpressway/index.vue

@ -57,6 +57,7 @@ export default {
}
},
mounted(){
// this.$store.commit("menu/resetRecent");
getBoardBaseData().then(res => {
this.isShowContent = true;
});

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

@ -107,7 +107,7 @@ export default {
// temp.functions[1].params.CONTENT = temp.functions[1].params.CONTENT.replaceAll(/\\n/g, '\\\\n').replaceAll(/=/g, '\\=').replaceAll(/,/g, '\\,').replaceAll(/&nbsp/g, ' ');
let params = {};
if (temp.deviceType == '2'){
params = temp.functions[1].params
params = temp.functions[1].params.parameters[0]
} else if (temp.deviceType == '5'){
params = temp.functions[0].params
} else if (temp.deviceType == '10') {
@ -202,7 +202,7 @@ export default {
.text{ flex: 1; display: flex; align-items: center; justify-content: center; word-break: break-all;}
.center{ flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;}
}
.button{ width:140px; margin-left: 10px; display: flex; align-items: center;}
.button{ width:120px; margin-left: 10px; display: flex; align-items: center; justify-content: flex-end;}
}
}
</style>

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

@ -6,7 +6,8 @@
<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="onSelectDeviceType">
<el-select v-model="searchData.deviceType" placeholder="请选择设备类型" @change="onSelectDeviceType"
:disabled="mode=='edit'">
<el-option v-for="item in deviceTypeOptions" :key="item.value" :label="item.label" :value="item.value+''"
v-if="item.timingControl">
</el-option>
@ -196,8 +197,8 @@ export default {
handler(bool) {
if (!bool) return;
this.propData?.id ? this.mode = 'edit' : this.mode = 'add';
this.transformData();
this.initBasicData();
this.transformData();
},
},
},
@ -220,6 +221,7 @@ export default {
this.editData.devices = _.map(this.propData.devices, "id");
// { "STAY": 90, "ACTION": "1", "SPEED": "0", "COLOR": "ffff00", "FONT": "3", "FONT_SIZE": "24", "CONTENT": "\\\\n", "width": "160", "height": "80", "formatStyle": "2" }
if (this.propData.deviceType == "2"){
console.log(this.propData.params , "++========");
this.editData.type2 = BoardUtils.contentToDeviceItem(this.propData.params);
} else if (["5","10","13"].includes(this.propData.deviceType)){
this.editData["type" + this.propData.deviceType] = { ...this.propData.params};

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

@ -22,36 +22,36 @@
<!-- 内容 -->
<div class="body">
<Table :data="tableData" height="100%">
<el-table-column label="序号" type="index" :index="indexMethod" width="60" />
<ElTableColumn label="发布时间" prop="operTime" width="180" />
<ElTableColumn label="设备ID" prop="dcDeviceId" width="120" />
<el-table-column label="序号" type="index" :index="indexMethod" width="100" />
<ElTableColumn label="发布时间" prop="operTime" width="280">
<template slot-scope="scope">
{{ moment(scope.row.operTime).format("yyyy/MM/DD hh:mm") }}
</template>
</ElTableColumn>
<ElTableColumn label="设备ID" prop="dcDeviceId" width="120">
<template slot-scope="scope">
{{ JSON.parse(scope.row.dcDeviceId).join("、") }}
</template>
</ElTableColumn>
<ElTableColumn label="设备名称" prop="dcDeviceName" />
<!-- <ElTableColumn label="桩号" prop="stakeMark" width="100" /> -->
<!-- <el-table-column prop="direction" label="方向" width="110" :formatter="formatterDirection" /> -->
<ElTableColumn label="内容" prop="operParam" width="500" header-align="center">
<ElTableColumn label="内容" prop="operParam" width="400" header-align="center">
<template slot-scope="scope">
{{ scope.row.operParam }}
<!-- {{ scope.row.operParam && scope.row.operParam.functions && scope.row.operParam.functions[1] && scope.row.operParam.functions[1].params }} -->
<!-- <el-carousel direction="horizontal" :autoplay="false" indicator-position="inside" height="80px"
<el-carousel direction="horizontal" :autoplay="false" indicator-position="inside" height="80px"
arrow="never" class="board_shower">
<el-carousel-item v-for="item,index in JSON.parse(scope.row.operParam).paremeters" :key="index">
<el-carousel-item v-for="item,index in JSON.parse(scope.row.operParam)[0].functions[1].params.parameters"
:key="index">
<BoardRecordPreview :tpl="item" style="height: 100%;" />
</el-carousel-item>
</el-carousel> -->
</el-carousel>
</template>
</ElTableColumn>
<ElTableColumn label="状态" prop="status" width="80" :formatter="formatterStatus" />
<ElTableColumn label="用户名" prop="operName" width="120" />
<!-- <ElTableColumn label="用户ID" prop="operName" width="120" /> -->
<ElTableColumn label="用户IP" prop="operIp" width="200" />
<!--
<ElTableColumn label="操作" width="210">
<ElTableColumn label="状态" prop="status" width="140" :formatter="formatterStatus" />
<ElTableColumn label="用户名" prop="operName" width="160" />
<ElTableColumn label="用户IP" prop="operIp" width="200">
<template slot-scope="scope">
<ElButton type="text" style="color: #00D1FF;" @click="showDisposal(scope.row.eventType)">流程配置</ElButton>
<ElButton type="text" style="color: #00EBC1;" @click="showPhrases(scope.row)">常用语</ElButton>
{{ ["unknown"].includes(scope.row.operIp) ? "" : scope.row.operIp }}
</template>
</ElTableColumn>
-->
</Table>
</div>
@ -74,6 +74,7 @@ import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.
import {DirectionTypes} from '@screen/utils/enum.js';
import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
import moment from "moment";
export default {
name: 'boardRecord',
@ -86,6 +87,7 @@ export default {
},
data() {
return {
moment,
testData : {"STAY":"30","ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"32","CONTENT":"因改扩建施工 平阴南、梁山收费站出入口封闭","width":"768","height":"64","formatStyle":"2"},
tableData: [],
searchFormList,

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