Browse Source

更新

wangqin
hui 10 months ago
parent
commit
01d2fb7c72
  1. 1
      ruoyi-ui/package.json
  2. 22
      ruoyi-ui/src/api/board/board.js
  3. 2
      ruoyi-ui/src/components/easy-cron/index.vue
  4. 1
      ruoyi-ui/src/store/modules/user.js
  5. 37
      ruoyi-ui/src/views/JiHeExpressway/components/Decorations/bg-1.vue
  6. 54
      ruoyi-ui/src/views/JiHeExpressway/components/Decorations/bg-2.vue
  7. 4
      ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue
  8. 116
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue
  9. 2
      ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue
  10. 138
      ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
  11. 105
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  12. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue
  13. 137
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  14. 7
      ruoyi-ui/src/views/login.vue
  15. 1
      ruoyi-ui/vue.config.js

1
ruoyi-ui/package.json

@ -48,7 +48,6 @@
"cronstrue": "^1.100.0", "cronstrue": "^1.100.0",
"crypto-js": "4.0.0", "crypto-js": "4.0.0",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"debounce": "^1.2.0",
"deepmerge": "^4.3.1", "deepmerge": "^4.3.1",
"dplayer": "^1.26.0", "dplayer": "^1.26.0",
"echarts": "^5.2.2", "echarts": "^5.2.2",

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

@ -20,7 +20,27 @@ export function getBoardDeviceInfo(deviceId) {
}) })
} }
// // 敏感字段检测
export function checkBoardContent(content) {
return request({
url: `/business/dcInfoBoardVocabulary/checkBoardContent`,
method: 'get',
params:{
content
}
})
}
// 保存情报板发布日志
export function saveBoardReleaseLog(data) {
return request({
url: `/business/boardReleaseLog`,
method: 'post',
data
})
}
export function publishToBoard(data) { export function publishToBoard(data) {
return request({ return request({
url: '/business/board/publish', url: '/business/board/publish',

2
ruoyi-ui/src/components/easy-cron/index.vue

@ -45,7 +45,7 @@ import MonthUi from './tabs/month'
import YearUi from './tabs/year' import YearUi from './tabs/year'
import CronParser from 'cron-parser' import CronParser from 'cron-parser'
import dateFormat from './format-date' import dateFormat from './format-date'
import { debounce } from 'debounce' import { debounce } from 'lodash'
export default { export default {
name: 'easy-cron', name: 'easy-cron',

1
ruoyi-ui/src/store/modules/user.js

@ -88,6 +88,7 @@ const user = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo().then(res => { getInfo().then(res => {
const user = res.user const user = res.user
console.log(user , "usssssserrrrrrrrrrr")
const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.roles) commit('SET_ROLES', res.roles)

37
ruoyi-ui/src/views/JiHeExpressway/components/Decorations/bg-1.vue

@ -1,7 +1,7 @@
<template> <template>
<!-- :borderPath="getBorderPath" -->
<BackgroundClip class='BG-01' :clipPath="getClipPath" <BackgroundClip class='BG-01' :clipPath="getClipPath"
bgColor="linear-gradient(180deg, #152E3C 0%, #163A45 100%)" :borderPath="getBorderPath"
bgColor="linear-gradient(180deg, #152E3CBB 0%, #163A45DD 100%)"
borderColor="linear-gradient(180deg, rgba(40, 144, 167, 1), rgba(40, 144, 167, 0.38), rgba(40, 144, 167, 1))"> borderColor="linear-gradient(180deg, rgba(40, 144, 167, 1), rgba(40, 144, 167, 0.38), rgba(40, 144, 167, 1))">
<slot /> <slot />
</BackgroundClip> </BackgroundClip>
@ -19,6 +19,10 @@ export default {
width: { width: {
type: String, type: String,
default: "18px" default: "18px"
},
borderW: {
type: String,
default: "1px"
} }
}, },
computed: { computed: {
@ -26,8 +30,33 @@ export default {
return `polygon(${this.width} 0%, calc(100% - ${this.width}) 0%, 100% ${this.width}, 100% calc(100% - ${this.width}), calc(100% - ${this.width}) 100%, ${this.width} 100%, 0% calc(100% - ${this.width}), 0% ${this.width})` return `polygon(${this.width} 0%, calc(100% - ${this.width}) 0%, 100% ${this.width}, 100% calc(100% - ${this.width}), calc(100% - ${this.width}) 100%, ${this.width} 100%, 0% calc(100% - ${this.width}), 0% ${this.width})`
}, },
getBorderPath() { getBorderPath() {
// return `polygon(${this.width} 0%, calc(100% - ${this.width}) 0%, 100% ${this.width}, 100% calc(100% - ${this.width}), calc(100% - ${this.width}) 100%, ${this.width} 100%, 0% calc(100% - ${this.width}), 0% ${this.width})` let deltaX = `calc(${this.borderW} * ${Math.sqrt(2) - 1})`;
return `polygon(0% 0%, 0% 100%, 25% 100%, 25% 25%, 75% 25%, 74% 69%, 19% 83%, 15% 100%, 100% 100%, 100% 0%)` let deltaY = deltaX;
return `polygon(
50% 0%,
calc(100% - ${this.width}) 0%,
100% ${this.width},
100% calc(100% - ${this.width}),
calc(100% - ${this.width}) 100%,
${this.width} 100%,
0% calc(100% - ${this.width}),
0 ${this.width},
${this.width} 0,
51% 0,
51% ${this.borderW},
calc(${this.width} + ${deltaX}) ${this.borderW},
${this.borderW} calc(${this.width} + ${deltaY}),
${this.borderW} calc(100% - ${this.width} - ${deltaX}),
calc(${this.width} + ${deltaX}) calc(100% - ${this.borderW}),
calc(100% - ${this.width} - ${deltaX}) calc(100% - ${this.borderW}),
calc(100% - ${this.borderW}) calc(100% - ${this.width} - ${deltaY}),
calc(100% - ${this.borderW}) calc(${this.width} + ${deltaY}),
calc(100% - ${this.width} - ${deltaX}) calc(${this.borderW}),
50% ${this.borderW},
50% 0
)`
} }
} }
} }

54
ruoyi-ui/src/views/JiHeExpressway/components/Decorations/bg-2.vue

@ -1,8 +1,8 @@
<template> <template>
<div class='BG-02' :style="{ '--width': width, '--lang-width': langWidth }"> <div class='BG-02' :style="{ '--width': width, '--lang-width': langWidth }">
<!-- :borderPath="getBorderPath" -->
<BackgroundClip ref="BackgroundClipRef" class="bg" :clipPath="getClipPath" <BackgroundClip ref="BackgroundClipRef" class="bg" :clipPath="getClipPath"
bgColor="linear-gradient(180deg, #152E3C 0%, #163A45 100%)" :borderPath="getBorderPath"
bgColor="linear-gradient(180deg, #152E3CBB 0%, #163A45DD 100%)"
borderColor="linear-gradient(180deg, rgba(40, 144, 167, 1), rgba(40, 144, 167, 0.38), rgba(40, 144, 167, 1))"> borderColor="linear-gradient(180deg, rgba(40, 144, 167, 1), rgba(40, 144, 167, 0.38), rgba(40, 144, 167, 1))">
<slot /> <slot />
</BackgroundClip> </BackgroundClip>
@ -23,12 +23,16 @@ export default {
props: { props: {
width: { width: {
type: String, type: String,
default: "15px" default: "20px"
}, },
langWidth: { langWidth: {
type: String, type: String,
default: "150px" default: "150px"
}, },
borderW: {
type: String,
default: "1px"
},
}, },
data() { data() {
return { return {
@ -38,11 +42,49 @@ export default {
}, },
computed: { computed: {
getClipPath() { getClipPath() {
return `polygon(calc(100% - ${this.langWidth} - ${this.width} * 2) 0, calc(100% - ${this.langWidth}) calc(${this.width} * 1.5), calc(100% - ${this.width} * 1.4) calc(${this.width} * 1.5), 100% calc(${this.width} * 3), 100% calc(100% - ${this.width}), calc(100% - ${this.width}) 100%, ${this.width} 100%, 0 calc(100% - ${this.width}), 0 ${this.width}, ${this.width} 0)` return `polygon(
calc(100% - ${this.langWidth} - ${this.width} * 1.5) 0,
calc(100% - ${this.langWidth}) calc(${this.width} * 1.5),
calc(100% - ${this.width}) calc(${this.width} * 1.5),
100% calc(${this.width} * 2.5),
100% calc(100% - ${this.width}),
calc(100% - ${this.width}) 100%,
${this.width} 100%, 0 calc(100% - ${this.width}),
0 ${this.width},
${this.width} 0
)`
}, },
getBorderPath() { getBorderPath() {
// return `polygon(calc(100% - ${this.langWidth} - ${this.width} * 2) 0, calc(100% - ${this.langWidth}) calc(${this.width} * 1.5), calc(100% - ${this.width} * 1.4) calc(${this.width} * 1.5), 100% calc(${this.width} * 3), 100% calc(100% - ${this.width}), calc(100% - ${this.width}) 100%, ${this.width} 100%, 0 calc(100% - ${this.width}), 0 ${this.width}, ${this.width} 0)` let deltaX = `calc(${this.borderW} * ${Math.sqrt(2) - 1})`;
return `polygon(20% 0%, 0% 100%, 25% 100%, 25% 25%, 75% 25%, 74% 69%, 19% 83%, 15% 100%, 100% 100%, 100% 0%)` let deltaY = deltaX;
return `polygon(
30% 0,
calc(100% - ${this.langWidth} - ${this.width} * 1.5) 0,
calc(100% - ${this.langWidth}) calc(${this.width} * 1.5),
calc(100% - ${this.width}) calc(${this.width}),
100% calc(${this.width} * 2.5),
100% calc(100% - ${this.width}),
calc(100% - ${this.width}) 100%,
${this.width} 100%, 0 calc(100% - ${this.width}),
0 ${this.width},
${this.width} 0,
31% 0,
31% ${this.borderW},
calc(${this.width} + ${deltaX}) ${this.borderW},
${this.borderW} calc(${this.width} + ${deltaY}),
${this.borderW} calc(100% - ${this.width} - ${deltaY}),
calc(${this.width} + ${deltaX}) calc(100% - ${this.borderW}),
calc(100% - ${this.width} - ${deltaX}) calc(100% - ${this.borderW}),
calc(100% - ${this.borderW}) calc(100% - ${this.width} - ${deltaY}),
calc(100% - ${this.borderW}) calc(${this.width} * 2.5 + ${deltaY}),
calc(100% - ${this.width} - ${deltaX}) calc(${this.width} * 1.5 + ${this.borderW} + ${deltaY}),
calc(100% - ${this.langWidth} - ${deltaX}) calc(${this.width} * 1.5 + ${this.borderW}),
calc(100% - ${this.langWidth} - ${this.width} *1.5 - ${deltaX}) ${this.borderW},
31% ${this.borderW}
)`
} }
}, },
methods: { methods: {

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

@ -1,6 +1,6 @@
<template> <template>
<div class="video-container"> <div class="video-container">
<div class="header"> <!-- <div class="header">
<div class="left"> <div class="left">
<div class="radio"> <div class="radio">
<span>图像</span> <span>图像</span>
@ -11,7 +11,7 @@
<div class="btn">2X</div> <div class="btn">2X</div>
<div class="btn">全屏</div> <div class="btn">全屏</div>
</div> </div>
</div> </div> -->
<Video class="video-stream" :pileNum="pileNum" :camId="camId" :url="url" /> <Video class="video-stream" :pileNum="pileNum" :camId="camId" :url="url" />
</div> </div>
</template> </template>

116
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue

@ -102,6 +102,8 @@ import { checkIotBoardContent } from '@/api/board/vocabulary'
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue" import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue" import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"
import infoBoardUtils from "@screen/utils/infoBoard.js" import infoBoardUtils from "@screen/utils/infoBoard.js"
import { checkBoardContent } from '@/api/board/board'
import { debounce } from 'lodash'
export default { export default {
data() { data() {
return { return {
@ -222,7 +224,8 @@ export default {
"verticalAlignment": "2", "verticalAlignment": "2",
"speechSpeed": "0", "speechSpeed": "0",
"font": "3" "font": "3"
} },
isLocked :false,
} }
}, },
props:{ props:{
@ -309,13 +312,18 @@ export default {
}) })
}, },
methods: { methods: {
initData(){ initData() {
if(this.isLocked){
return
}
this.isLocked = true;
setTimeout(()=>{this.isLocked = false}, 300);
// getTemplateList({id:this.tpl.id}).then(res=>{ // getTemplateList({id:this.tpl.id}).then(res=>{
// console.log(res.data , "++++++++==========="); // console.log(res.data , "++++++++===========");
// }) // })
if(this.mode=="add"){ if (this.mode == "add") {
let tempTpl= null; let tempTpl = null;
if(this.type=="template"){ if (this.type == "template") {
tempTpl = { tempTpl = {
category: this.templateCategoryList[0].dictValue, category: this.templateCategoryList[0].dictValue,
formatStyle: 0, formatStyle: 0,
@ -328,13 +336,16 @@ export default {
screenSize: this.screenSize screenSize: this.screenSize
} }
} }
else{ else {
tempTpl = _.merge(this.deviceCttDefault, this.tpl.origin); // tempTpl = _.merge(this.deviceCttDefault, this.tpl.origin); //
} }
this.dataForm = infoBoardUtils.dialogSourceFormat(tempTpl, this.type, this.mode); this.dataForm = infoBoardUtils.dialogSourceFormat(tempTpl, this.type, this.mode);
}else{ } else {
this.dataForm = infoBoardUtils.dialogSourceFormat(this.tpl, this.type, this.mode, this.deviceCttDefault); this.dataForm = infoBoardUtils.dialogSourceFormat(this.tpl, this.type, this.mode, this.deviceCttDefault);
} }
if (this.visible == false && this.mode == "toDevice") {
this.onSubmit();
}
}, },
onClose(){ onClose(){
this.dialogVisible = false; this.dialogVisible = false;
@ -348,89 +359,19 @@ export default {
return this.$modal.msgError("内容不能含有特殊字符'\\\\'") return this.$modal.msgError("内容不能含有特殊字符'\\\\'")
} }
// let ctt = this.dataForm.content;
/*checkIotBoardContent(this.dataForm.CONTENT).then(response => { checkBoardContent(ctt).then(res => {
if (response.data == 0) {
return this.$modal.msgError('当前发布内容包含敏感字段,请修改')
} else if (response.data == 2) {
return this.$modal.msgError('当前输入内容为空')
} else {
this.loading = true
// let templateId = "";
let method = 'put'
if (this.isAdd) {
if (this.infoType == 1) {
//
this.dataForm.STAY = Number(this.dataForm.STAY) * 10
this.$emit('addInfo', this.dataForm)
} else {
//
const params1 = {
applyType: '',
category: this.dataForm.category,
coordinate: '',
height: '',
id: '',
imageUrl: '',
imgSizeFrom: '',
inScreenMode: this.dataForm.ACTION,
remark: '',
screenSize: this.dataForm.screenSize,
stopTime: Number(this.dataForm.STAY) * 10,
vmsType: '',
width: ''
}
const templateContent = []
templateContent.push({
content: this.dataForm.CONTENT,
coordinate: this.dataForm.COORDINATE,
fontColor: this.getColorStyle(this.dataForm.COLOR),
fontSize: this.dataForm.FONT_SIZE.substring(0, 2),
fontSpacing: this.dataForm.SPEED,
fontType: this.getFontStyle(this.dataForm.FONT)
})
// this.$emit("addInfoMode", this.dataForm);
addTemplate(params1, method).then(data => {
console.log(data, '新增口')
let params2 = {
templateContent: templateContent,
templateId: data
}
addTemplateContent(params2)
.then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$emit('getActiveNames') doNext();
this.$message.success('添加成功')
}
})
.catch(err => {
throw err
})
})
}
} else { } else {
// // this.$message({
// editTemplate(this.dataForm).then((data) => {}); type: 'danger',
// this.templateContent.forEach((e) => { message: res.msg
// e.img = e.imageName; });
// }); return;
// var params = {
// templateContent: this.templateContent,
// templateId: this.dataForm.id,
// templateDelContent: this.templateDelContent,
// };
// editTemplateContent(params).then((response) => {
// // console.log(response, "");
// });
}
this.loading = false
this.dialogVisible = false
this.isAdd = false
this.$emit('refreshDataList', this.dataForm)
var textBoard2 = document.getElementsByClassName('textBoard2')
textBoard2[0].style.position = 'absolute'
} }
})*/ })
let doNext = () => {
let data = infoBoardUtils.dialogSaveFormat(this.dataForm, this.type, this.mode); let data = infoBoardUtils.dialogSaveFormat(this.dataForm, this.type, this.mode);
@ -464,6 +405,7 @@ export default {
this.$emit("afterSubmit" , {type:this.type, mode:this.mode}); this.$emit("afterSubmit" , {type:this.type, mode:this.mode});
} }
}
}, },
} }
} }

2
ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardPreview.vue

@ -78,7 +78,7 @@ export default {
this.boardTxtStyle = { this.boardTxtStyle = {
"color": "#" + this.tpl.foregroundColor, "color": "#" + this.tpl.foregroundColor,
"font-size": `${fontSize*scale}px`, "font-size": `${fontSize*scale}px`,
"font-family": this.tpl.font, "font-family": this.fontTypeDic[this.tpl.font || '3'],
"min-height": `${fontSize * scale}px` "min-height": `${fontSize * scale}px`
} }
this.lineTotal = Math.floor(conH / fontSize); this.lineTotal = Math.floor(conH / fontSize);

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

@ -0,0 +1,138 @@
import { publishToBoard, saveBoardReleaseLog } from '@/api/board/board'
import moment from 'moment/moment';
import store from '@/store'
export default{
data(){
return {
}
},
methods:{
// 新增待下发
____onAddDeviceItem() {
let arr = this.selectedSize.split("*");
this.editDialog = {
visible: true,
mode: "add",
type: "device",
tpl: {
"textContent": "",
origin: {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
}
}
},
// 从模板新增待下发
____onTplToDevice(item, showDialog) {
// if(this.checkedDeviceIds.length<=0){
// this.$message.warning('未选择设备!');
// return;
// }
let arr = this.selectedSize.split("*");
item.origin = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
this.editDialog = {
visible: showDialog == false ? false : true,
mode: "toDevice",
type: "template",
tpl: item
}
},
// 发布信息
____publishInfo() {
this.$confirm('是否确定发布情报板?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let content = [];
this.selectedBdMsg.forEach(item => {
content.push({
STAY: item.playbackDuration,
ACTION: item.screenEntryMethod,
SPEED: item.fontSpacing || 0,
COLOR: item.foregroundColor,
FONT: item.font,
FONT_SIZE: item.fontSize,
CONTENT: item.textContent.replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
width: item.displayAreaWidth,
height: item.displayAreaHeight,
formatStyle: item.verticalAlignment
})
})
let data = { content: content, deviceId: this.selectedDevice.iotDeviceId }
if (IS_TESTING) {
this.saveLog(content);
this.____getDeviceInfo();
loading.close()
} else {
publishToBoard(data).then(res => {
this.saveLog(content);
loading.close()
this.____getDeviceInfo();
});
}
}).catch(() => {
this.$message({
type: 'info',
message: '取消发布'
})
})
},
//
saveLog(content){
let time = moment().format("YYYY-MM-DD HH:mm:ss");
let device = this.selectedDevice;
let data = {
"createBy": store.getters.name,
"createTime": time,
"deviceId": device.id,
"deviceName": device.deviceName,
"direction": device.direction,
"params": {},
"platform": "",
"releaseContent": JSON.stringify(content),
"releaseDeptId": "",
"releaseDeptName": "",
"releaseIp": "",
"releaseStatus": "",
"releaseTime": time,
"releaseUserId": "",
"releaseUserName": "",
"remark": "",
"searchValue": "",
"stakeMark": device.stakeMark,
"updateBy": "",
"updateTime": time
}
saveBoardReleaseLog(data).then(res => {
if(res.code==200){
console.log("情报板日志已保存:::" , data);
}else{
console.log("情报板日志保存失败!");
}
})
}
}
}

105
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue

@ -91,7 +91,7 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm"> <div class="infoBtnBox infoBtnBoxSm">
<el-tooltip content="加入待下发信息" placement="top"> <el-tooltip content="加入待下发信息" placement="top">
<p @click="____onAddToDevice(itm)" class="btn btnApply"></p> <p @click="____onTplToDevice(itm, false)" class="btn btnApply"></p>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
@ -127,15 +127,16 @@ import vuescroll from 'vuescroll'
import scrollOptions from '@/common/scrollbar.js' import scrollOptions from '@/common/scrollbar.js'
import Teleport from '@screen/components/Teleport.vue' import Teleport from '@screen/components/Teleport.vue'
import { publishToBoard } from '@/api/board/board'
import { getTemplateList } from '@/api/board/template' import { getTemplateList } from '@/api/board/template'
import testDeviceInfo from "@screen/testData/infoBoard.js" import testDeviceInfo from "@screen/testData/infoBoard.js"
import CameraShower from '@screen/components/CameraShower' import CameraShower from '@screen/components/CameraShower'
import InfoBoard from '@screen/mixins/InfoBoard'
export default { export default {
name: 'InfoBoard', name: 'InfoBoard',
mixins:[InfoBoard],
data() { data() {
return { return {
isShowTemplate: false, isShowTemplate: false,
@ -187,13 +188,13 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
device: { selectedDevice: {
type: Object, type: Object,
default: null default: null
} }
}, },
watch: { watch: {
device: { selectedDevice: {
handler(newV) { handler(newV) {
this.____initData(); this.____initData();
}, },
@ -226,7 +227,7 @@ export default {
}, },
// //
____initData() { ____initData() {
this.selectedSize = JSON.parse(this.device.otherConfig).screenSize; this.selectedSize = JSON.parse(this.selectedDevice.otherConfig).screenSize;
if(this.tplCategory.length && this.templateAll.length){ if(this.tplCategory.length && this.templateAll.length){
this.____setAvailableTemplate(); this.____setAvailableTemplate();
}else{ }else{
@ -244,7 +245,7 @@ export default {
this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content); this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content);
}else{ }else{
getBoardDeviceInfo(this.device.iotDeviceId).then(res => { getBoardDeviceInfo(this.selectedDevice.iotDeviceId).then(res => {
this.selectedBdMsg = res.data["3A"].content; this.selectedBdMsg = res.data["3A"].content;
}).catch(err => { }).catch(err => {
@ -311,43 +312,11 @@ export default {
____refreshPageData(para) { }, ____refreshPageData(para) { },
//
____onAddToDevice(item) {
let arr = this.selectedSize.split("*");
item.origin = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
console.log(item);
this.editDialog = {
visible: true,
mode: "toDevice",
type: "template",
tpl: item,
}
},
//
____onAddDeviceItem() {
let arr = this.selectedSize.split("*");
this.editDialog = {
visible: true,
mode: "add",
type: "device",
tpl: {
"textContent": "",
origin: {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
}
}
},
____getNearbyCams() { ____getNearbyCams() {
if(!this.device.stakeMark){ if(!this.selectedDevice.stakeMark){
this.$message.warning("设备缺少stakeMark字段..."); this.$message.warning("设备缺少stakeMark字段...");
} }
let stakeMark = this.device.stakeMark; let stakeMark = this.selectedDevice.stakeMark;
// stakeMark = "K64+300"; // stakeMark = "K64+300";
@ -392,62 +361,6 @@ export default {
} }
}) })
}, },
//
____publishInfo() {
this.$confirm('是否确定发布情报板?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let content = [];
this.selectedBdMsg.forEach(item => {
content.push({
STAY: item.playbackDuration,
ACTION: item.screenEntryMethod,
SPEED: item.fontSpacing,
COLOR: item.foregroundColor,
FONT: item.font,
FONT_SIZE: item.fontSize,
CONTENT: item.textContent.replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
width: item.displayAreaWidth,
height: item.displayAreaHeight,
formatStyle: item.verticalAlignment
})
})
let data = { content: content, deviceId: this.device.iotDeviceId }
console.log(data, "发布内容");
if (IS_TESTING) {
console.log("测试模式")
this.____getDeviceInfo();
loading.close()
}else{
publishToBoard(data).then(res=>{
loading.close()
this.____getDeviceInfo();
});
}
}).catch(() => {
this.$message({
type: 'info',
message: '取消发布'
})
})
},
tabClickFn(tab, event) { tabClickFn(tab, event) {
console.log(tab, event) console.log(tab, event)
}, },

3
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue

@ -26,7 +26,8 @@
<!-- 摄像机设备 控制 弹窗 球机 可打开--> <!-- 摄像机设备 控制 弹窗 球机 可打开-->
<!-- 摄像机 G35 K094+079 下行可控 枪机 可打开--> <!-- 摄像机 G35 K094+079 下行可控 枪机 可打开-->
<component :dialogData="dialogConfig.data" visible :device="dialogConfig.data" :is="dialogConfig.component" <!-- <Camera :data="dialogConfig.data" :visible="dialogConfig.visibleType === 1" /> -->
<component :dialogData="dialogConfig.data" visible :selectedDevice="dialogConfig.data" :is="dialogConfig.component"
@change="handleCameraChange" @update:visible="handleCameraChange" /> @change="handleCameraChange" @update:visible="handleCameraChange" />
</Bg1> </Bg1>
</template> </template>

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

@ -56,7 +56,7 @@
<div class="controlBox"> <div class="controlBox">
<el-button class="btnInfoBoard" type="add" @click.native="____onAddDeviceItem()">添加信息</el-button> <el-button class="btnInfoBoard" type="add" @click.native="____onAddDeviceItem()">添加信息</el-button>
<el-button class="btnInfoBoard" type="publish" @click="____publishInfo" :disabled="selectedBdMsg.length <= 0">发布信息</el-button> <el-button class="btnInfoBoard" type="publish" @click="____onPublish" :disabled="selectedBdMsg.length <= 0">发布信息</el-button>
</div> </div>
</div> </div>
<div class="partCon"> <div class="partCon">
@ -112,7 +112,7 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="infoBtnBox"> <div class="infoBtnBox">
<el-tooltip content="加入待下发信息" placement="top"> <el-tooltip content="加入待下发信息" placement="top">
<p @click="____onAddToDevice(itm)" :class="disabledButton && !selectedSize ? 'disabledClass' : ''" <p @click="____onTplToDevice(itm, false)" :class="disabledButton && !selectedSize ? 'disabledClass' : ''"
class="btn btnApply"></p> class="btn btnApply"></p>
</el-tooltip> </el-tooltip>
<el-tooltip content="编辑" placement="top"> <el-tooltip content="编辑" placement="top">
@ -156,7 +156,7 @@ import { getUserDeptId } from '@/api/system/user'
import { listTunnels, devicessize, information, getBoardInfo, getBoardEditInfo, getboardSizeDic, getBoardContentData, deviceControl } from '@/api/information/api.js' import { listTunnels, devicessize, information, getBoardInfo, getBoardEditInfo, getboardSizeDic, getBoardContentData, deviceControl } from '@/api/information/api.js'
import { uploadBoardEditInfo, getAllVmsTemplate, addTemplate, addTemplateContent, getBoardContent, deleteTemplate, splicingBoard } from '@/api/board/template' import { uploadBoardEditInfo, getAllVmsTemplate, addTemplate, addTemplateContent, getBoardContent, deleteTemplate, splicingBoard } from '@/api/board/template'
import { invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device' import { invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device'
import { getBoardList, getBoardDeviceInfo, publishToBoard } from '@/api/board/board' import { getBoardList, getBoardDeviceInfo } from '@/api/board/board'
import { getTemplateList } from '@/api/board/template' import { getTemplateList } from '@/api/board/template'
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue" import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue" import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"
@ -172,8 +172,11 @@ import testDeviceInfo from "@screen/testData/infoBoard.js"
import WgtTitle from "@screen/pages/perception/widgets/title"; import WgtTitle from "@screen/pages/perception/widgets/title";
import InfoBoard from '@screen/mixins/InfoBoard'
export default { export default {
name: 'Device', name: 'Device',
mixins: [InfoBoard],
components: { components: {
WgtTitle, WgtTitle,
BoardInfoEditor, BoardInfoEditor,
@ -474,22 +477,6 @@ export default {
tpl tpl
} }
}, },
____onAddDeviceItem() {
let arr = this.selectedSize.split("*");
this.editDialog = {
visible: true,
mode: "add",
type: "device",
tpl: {
"textContent": "",
origin: {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
}
}
},
// //
____onEditSubmit(para) { ____onEditSubmit(para) {
this.editDialog.tpl = {}; this.editDialog.tpl = {};
@ -517,28 +504,6 @@ export default {
} }
}, },
//
____onAddToDevice(item) {
// if(this.checkedDeviceIds.length<=0){
// this.$message.warning('!');
// return;
// }
let arr = this.selectedSize.split("*");
item.origin = {
displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1]
}
this.editDialog = {
visible: true,
mode: "toDevice",
type: "template",
tpl: item
}
},
// //
arrowRight(item) { arrowRight(item) {
this.toRightItem = item this.toRightItem = item
@ -652,67 +617,12 @@ export default {
}, },
// //
____publishInfo() { ____onPublish() {
if(!this.selectedDevice.iotDeviceId){ if(!this.selectedDevice.iotDeviceId){
this.$message.warning("请选择设备!"); this.$message.warning("请选择设备!");
return return
} }
this.$confirm('是否确定发布情报板?', '提示', { this.____publishInfo();
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let content = [];
this.selectedBdMsg.forEach(item=>{
content.push({
STAY :item.playbackDuration,
ACTION :item.screenEntryMethod,
SPEED :item.fontSpacing,
COLOR :item.foregroundColor,
FONT : item.font,
FONT_SIZE : item.fontSize,
CONTENT :item.textContent.replaceAll(',', '\\,').replaceAll('=', '\\=').replaceAll('\n', '\\\\n'),
width : item.displayAreaWidth,
height : item.displayAreaHeight,
formatStyle : item.verticalAlignment
})
})
let data = { content: content, deviceId: this.selectedDevice.iotDeviceId }
console.log(data , "post参数+++++")
if (IS_TESTING) {
console.log("测试模式")
this.____getDeviceInfo();
loading.close()
} else {
publishToBoard(data).then(res => {
loading.close()
this.____getDeviceInfo();
});
}
})
.catch(() => {
this.$message({
type: 'info',
message: '取消发布'
})
})
}, },
// form // form
@ -805,37 +715,6 @@ export default {
}) })
}, },
// ITEM001
formatNum(num, length) {
return (Array(length).join('0') + parseInt(num)).slice(-length)
},
//
getFontValue(font) {
if (font == '黑体' || font == 'SimHei') return '1'
if (font == '楷体' || font == 'KaiTi') return '2'
if (font == '仿宋' || font == 'FangSong') return '4'
if (font == '隶书' || font == 'LiSu') return '5'
else return '3' //
},
//
getColorValue(color) {
if (color == '蓝色' || color == 'blue') return '0000FF'
if (color == '绿色' || color == '#00FF00' || color == 'GreenYellow') return '00FF00'
if (color == '红色' || color == 'red') return 'FF0000'
if (color == '黄色' || color == 'yellow') return 'FFFF00'
return 'FFFFFF' //
},
//
addContentDisplayInfos(addId, no, disContent) {
var jsonArr = {}
jsonArr.itemId = addId
jsonArr.disContent = disContent
this.disContentList.push(jsonArr)
},
// //
async onSubmit(deviceId) { async onSubmit(deviceId) {
this.submitButton = true this.submitButton = true

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

@ -1,5 +1,6 @@
<template> <template>
<div class="login"> <div class="login">
<!-- <Bg2 style=" width: 600px; height:800px; position: fixed; left: 100px; top:100px">发多少刚发的刚发的</Bg2> -->
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<div style=" <div style="
width: 100%; width: 100%;
@ -55,8 +56,12 @@ import { getUserDeptId } from "@/api/system/user";
import { listTunnels } from "@/api/equipment/tunnel/api.js"; import { listTunnels } from "@/api/equipment/tunnel/api.js";
import { getConfigKey } from "@/api/system/config.js"; import { getConfigKey } from "@/api/system/config.js";
import Bg2 from "@screen/components/Decorations/bg-2.vue"
export default { export default {
components: { Verify }, components: { Verify, Bg2 },
name: "Login", name: "Login",
data() { data() {
return { return {

1
ruoyi-ui/vue.config.js

@ -49,6 +49,7 @@ module.exports = {
// target: `http://10.0.81.202:8087`, //现场后台 // target: `http://10.0.81.202:8087`, //现场后台
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁 // target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255: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
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {

Loading…
Cancel
Save