Browse Source

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

* 'develop' of http://39.106.31.193:9211/mengff/jihe-hs:
  首页情报板附近视频
wangqin
Joe 1 year ago
parent
commit
d12ef81df6
  1. 12
      ruoyi-ui/src/api/camera/camera.js
  2. 8
      ruoyi-ui/src/assets/jihe/images/button/btnClose.svg
  3. BIN
      ruoyi-ui/src/assets/jihe/images/button/delete.png
  4. 15
      ruoyi-ui/src/assets/jihe/images/button/delete.svg
  5. BIN
      ruoyi-ui/src/assets/jihe/images/button/edit.png
  6. 12
      ruoyi-ui/src/assets/jihe/images/button/edit.svg
  7. BIN
      ruoyi-ui/src/assets/jihe/images/button/edit2.png
  8. BIN
      ruoyi-ui/src/assets/jihe/images/button/edit4.png
  9. BIN
      ruoyi-ui/src/assets/jihe/images/button/toLeft.png
  10. 15
      ruoyi-ui/src/assets/jihe/images/button/toLeft.svg
  11. BIN
      ruoyi-ui/src/assets/jihe/images/button/toLeft2.png
  12. 44
      ruoyi-ui/src/assets/styles/JiHeExpressway.scss
  13. 2
      ruoyi-ui/src/assets/styles/ruoyi.scss
  14. 3
      ruoyi-ui/src/main.js
  15. 235
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/CameraController.vue
  16. 14
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/add.svg
  17. 11
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/bottom.svg
  18. 11
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/left.svg
  19. 11
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/right.svg
  20. 6
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/sub.svg
  21. 11
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/top.svg
  22. 213
      ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/index.vue
  23. 4
      ruoyi-ui/src/views/JiHeExpressway/components/Decorations/bg-2.vue
  24. 38
      ruoyi-ui/src/views/JiHeExpressway/components/empty.vue
  25. 78
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue
  26. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue
  27. 955
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/addinfo.vue
  28. 917
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/editInfo.vue
  29. 589
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  30. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  31. 95
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  32. 45
      ruoyi-ui/src/views/JiHeExpressway/utils/moveable.js
  33. 6
      ruoyi-ui/vue.config.js

12
ruoyi-ui/src/api/camera/camera.js

@ -0,0 +1,12 @@
import request from '@/utils/request'
// 查询附近相机
export function getNearbyCameraByPileNum(pileNum) {
return request({
url: '/video/nearCamListPileNum',
method: 'get',
params: {
pileNum
}
})
}

8
ruoyi-ui/src/assets/jihe/images/button/btnClose.svg

@ -0,0 +1,8 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814278">
<g id="Group 1142814279">
<path id="Vector" d="M11 0C4.92105 0 0 4.92105 0 11C0 17.0789 4.92105 22 11 22C17.0789 22 22 17.0789 22 11V10.9889C21.9889 4.90992 17.0678 0 11 0Z" fill="#3DE8FF"/>
<path id="Vector_2" d="M16.1269 14.5627C16.5826 14.968 16.6293 15.6629 16.2204 16.1262C15.8114 16.5895 15.1104 16.6242 14.643 16.2188L14.5962 16.1725L11.0208 12.559L7.45712 16.0799C7.01312 16.52 6.28869 16.52 5.84469 16.0799C5.40068 15.6398 5.40068 14.9217 5.84469 14.4816L9.38504 10.9492L5.833 7.42835C5.389 6.98825 5.389 6.27018 5.833 5.83008C6.27701 5.38997 7.00144 5.38997 7.44544 5.83008L11.0208 9.51305L14.5846 5.98064C15.0403 5.57528 15.753 5.61003 16.1619 6.07329C16.5475 6.5134 16.5358 7.17355 16.1269 7.57891L12.5749 11.0882L16.1269 14.5627Z" fill="white"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 898 B

BIN
ruoyi-ui/src/assets/jihe/images/button/delete.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

15
ruoyi-ui/src/assets/jihe/images/button/delete.svg

@ -0,0 +1,15 @@
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814330">
<rect id="Rectangle 3530" width="46" height="46" rx="5" fill="url(#paint0_linear_253_681)"/>
<g id="Group 1142814329">
<path id="Rectangle 3531" d="M28.2638 16.9155C28.7117 16.4652 29.4398 16.4632 29.8901 16.911C30.3405 17.3589 30.3425 18.087 29.8947 18.5373L18.542 29.9534C18.0942 30.4038 17.366 30.4058 16.9157 29.958C16.4653 29.5101 16.4633 28.782 16.9111 28.3316L28.2638 16.9155Z" fill="white"/>
<path id="Rectangle 3532" d="M18.5419 16.9155C18.094 16.4652 17.3659 16.4632 16.9155 16.911C16.4652 17.3589 16.4631 18.087 16.911 18.5373L28.2637 29.9534C28.7115 30.4038 29.4396 30.4058 29.89 29.958C30.3403 29.5101 30.3424 28.782 29.8945 28.3316L18.5419 16.9155Z" fill="white"/>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_253_681" x1="22.1738" y1="8.77862" x2="22.1738" y2="44.9466" gradientUnits="userSpaceOnUse">
<stop stop-color="#005C79"/>
<stop offset="1" stop-color="#009BCC"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
ruoyi-ui/src/assets/jihe/images/button/edit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

12
ruoyi-ui/src/assets/jihe/images/button/edit.svg

@ -0,0 +1,12 @@
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814331">
<rect id="Rectangle 3528" width="46" height="46" rx="5" fill="url(#paint0_linear_253_678)"/>
<rect id="Rectangle 3529" x="27.6001" y="16.1001" width="2.3" height="16.1" rx="1.15" transform="rotate(38.5416 27.6001 16.1001)" fill="white"/>
</g>
<defs>
<linearGradient id="paint0_linear_253_678" x1="22.1738" y1="8.77862" x2="22.1738" y2="44.9466" gradientUnits="userSpaceOnUse">
<stop stop-color="#005C79"/>
<stop offset="1" stop-color="#009BCC"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 601 B

BIN
ruoyi-ui/src/assets/jihe/images/button/edit2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

BIN
ruoyi-ui/src/assets/jihe/images/button/edit4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

BIN
ruoyi-ui/src/assets/jihe/images/button/toLeft.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

15
ruoyi-ui/src/assets/jihe/images/button/toLeft.svg

@ -0,0 +1,15 @@
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814332">
<rect id="Rectangle 3527" width="46" height="46" rx="5" fill="url(#paint0_linear_253_673)"/>
<g id="Group 1142814328">
<path id="Vector" d="M15.2561 22.756L21.2048 16.4275C21.3024 16.3237 21.4183 16.2414 21.5459 16.1852C21.6735 16.129 21.8103 16.1001 21.9484 16.1001C22.0865 16.1001 22.2233 16.129 22.3509 16.1852C22.4785 16.2414 22.5944 16.3237 22.692 16.4275C23.1025 16.8653 23.1025 17.5723 22.692 18.0091L17.4607 23.5751L22.692 29.1411C23.0713 29.5448 23.1005 30.1781 22.7795 30.617L22.692 30.7238L22.69 30.7248C22.4927 30.9335 22.2255 31.0505 21.947 31.0501C21.6685 31.0497 21.4015 30.9319 21.2048 30.7227L15.2561 24.3942C15.0738 24.2005 14.9649 23.9424 14.9502 23.6691V23.4811C14.9643 23.2173 15.0669 22.9578 15.2561 22.7549V22.756Z" fill="white"/>
<path id="Vector_2" d="M23.3059 22.756L29.2546 16.4275C29.3522 16.3237 29.4681 16.2414 29.5957 16.1852C29.7233 16.129 29.8601 16.1001 29.9982 16.1001C30.1363 16.1001 30.2731 16.129 30.4007 16.1852C30.5283 16.2414 30.6442 16.3237 30.7418 16.4275C31.1523 16.8653 31.1523 17.5723 30.7418 18.0091L25.5105 23.5751L30.7418 29.1411C31.1211 29.5448 31.1503 30.1781 30.8293 30.617L30.7418 30.7238L30.7398 30.7248C30.5425 30.9335 30.2753 31.0505 29.9968 31.0501C29.7183 31.0497 29.4513 30.9319 29.2546 30.7227L23.3059 24.3942C23.1236 24.2005 23.0147 23.9424 23 23.6691V23.4811C23.0141 23.2173 23.1167 22.9578 23.3059 22.7549V22.756Z" fill="white"/>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_253_673" x1="22.1738" y1="8.77862" x2="22.1738" y2="44.9466" gradientUnits="userSpaceOnUse">
<stop stop-color="#005C79"/>
<stop offset="1" stop-color="#009BCC"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
ruoyi-ui/src/assets/jihe/images/button/toLeft2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 939 B

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

@ -43,10 +43,11 @@
color: $textColor;
}
&[disabled] {
color: #667 !important;
color: #9dd !important;
}
}
// 多选框组
.el-checkbox-group {
.el-checkbox__label {
color: $textColor;
@ -75,7 +76,7 @@
}
}
}
//数字输入框
.el-input-number {
margin-right: 10px;
height: $inputHeight;
@ -100,7 +101,7 @@
margin: 0;
}
}
// 单选按钮
.el-radio-button {
margin-right: 10px;
@ -188,4 +189,41 @@
.el-menu--popup-bottom-start {
margin-top: 16px;
}
.el-button--add, .el-button--publish {
color: #fff;
width: 96px;
height: 24px;
padding: 0;
border-radius: 50px;
line-height: 23px;
&.is-disabled {
background-color: #AAA;
color: #DDD;
&:hover {
background-color: #AAA;
color: #DDD;
}
}
}
.el-button--add {
background-color: #00B3CC;
border: none;
transition: all linear 0.3s;
&:hover{
background-color: #008bbb;
}
}
.el-button--publish {
background-color: #C87800;
border: none;
transition: all linear 0.3s;
&:hover {
background-color: #A86600;
}
}
}

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

@ -124,7 +124,7 @@ h6 {
padding-bottom: 5px;
}
.el-form-item__label{
font-size: 0.7vw;
// font-size: 0.7vw;
}
// .el-form-item--medium .el-form-item__label{
// line-height: 4vh;

3
ruoyi-ui/src/main.js

@ -81,6 +81,9 @@ if (process.env.NODE_ENV == 'development'){
window.IS_TESTING = false;
}
import Empty from "@screen/components/empty";
Vue.component("Empty", Empty);
// 全局方法挂载
Vue.prototype.dayjs = dayjs;
Vue.prototype.getDicts = getDicts

235
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/CameraController.vue

@ -0,0 +1,235 @@
<template>
<div class="compBox">
<div ref="DialogContentRef" class="compCtt">
<div class="compCttBg"></div>
<div class="compCttCon">
<div class="compHead"><img src="@/assets/jihe/images/button/btnClose.svg" @click="onClose"></div>
<div class='compCon'>
<div class="direction">
<div class="control-container top accessEvent" @click="controlClick(21)">
<div class="icon-horizontal" />
<img src="./images/top.svg">
</div>
<div class="control-container right accessEvent" @click="controlClick(24)">
<div class="icon-vertical" />
<img src="./images/right.svg">
</div>
<div class="center"></div>
<div class="control-container bottom accessEvent" @click="controlClick(22)">
<div class="icon-horizontal" style="transform: rotate(180deg);" />
<img src="./images/bottom.svg">
</div>
<div class="control-container left accessEvent" @click="controlClick(23)">
<div class="icon-vertical" style="transform: rotate(180deg);" />
<img src="./images/left.svg">
</div>
</div>
<div class="options">
<div v-for="item in options" :key="item.key">
<img src="./images/sub.svg" class="accessEvent" @click="controlClick(item.sub)">
<span>{{ item.label }}</span>
<img src="./images/add.svg" class="accessEvent" @click="controlClick(item.add)">
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { controlCamera } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { throttle } from "lodash"
import { moveable } from "@screen/utils/moveable"
export default {
name: 'CameraController',
components: {
},
props: {
visible: Boolean,
deviceId: String
},
data() {
return {
options: [
{
label: "变倍",
key: "zoom",
add: "12",
sub: "11"
},
{
label: "光圈",
key: "aperture",
add: "15",
sub: "16"
},
{
label: "聚焦",
key: "focus",
add: "13",
sub: "14"
},
]
}
},
computed: {
},
watch:{
visible:{
deep: true,
immediate:true,
handler(bool){
this.$nextTick(() => {
if (!bool) return this.destroyMoveable?.()
const container = this.$refs.DialogContentRef;
console.log(container);
this.destroyMoveable = moveable(container, { target: container.querySelector(".compCttBg") });
this.$once("hook:beforeDestroy", () => this.destroyMoveable?.());
})
}
}
},
methods: {
controlClick: throttle(function (type) {
controlCamera(this.deviceId, type)
}, 150),
onClose(){
this.$emit("update:visible" , false);
}
},
}
</script>
<style lang='scss' scoped>
.accessEvent{ pointer-events: all;}
.compBox{
.compCtt{
.compCttBg{ width: 340px; height: 200px; background-color: #29647D;}
.compCttCon{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 10px 15px 30px;
pointer-events: none;
.compHead{
display: flex; justify-content: flex-end; padding-bottom: 20px;
img{ width: 20px; height: 20px; pointer-events: all;}
}
.compCon {
display: flex;
display: flex;
align-items: center;
justify-content: space-around;
gap: 36px;
img {
cursor: pointer; pointer-events: all;
}
.control-container {
position: relative;
width: min-content;
&:active {
[class^="icon"] {
background-color: #48B0CB;
}
}
.icon-horizontal,
.icon-vertical {
position: absolute;
left: 0;
top: 0;
background-color: #006A96;
z-index: -1;
}
.icon-horizontal {
clip-path: path('M53.807 19.0734C51.1049 21.3657 47.1722 21.2685 44.0948 19.512C35.7042 14.7227 25.2544 13.7636 15.6704 17.82C14.5092 18.3114 13.3921 18.8632 12.321 19.4703C9.23352 21.2201 5.29428 21.3087 2.59447 19.0054V19.0054C-0.433686 16.4219 -0.827317 11.8122 2.24787 9.28482C4.93936 7.07281 7.91063 5.2081 11.093 3.74265C16.4653 1.26882 22.3109 -0.00817108 28.2253 6.86646e-05C34.1398 0.0083065 39.9818 1.30157 45.3471 3.79036C48.527 5.26539 51.4944 7.13947 54.1807 9.36039C57.2464 11.8949 56.8402 16.5002 53.807 19.0734V19.0734Z');
width: 57px;
height: 21px;
}
.icon-vertical {
clip-path: path('M2.33992 53.8068C0.0475853 51.1047 0.14481 47.172 1.90137 44.0945C6.69064 35.7039 7.64974 25.2542 3.59338 15.6702C3.10192 14.509 2.55008 13.3918 1.94307 12.3208C0.193261 9.23327 0.1046 5.29403 2.40796 2.59423V2.59423C4.99146 -0.433928 9.60116 -0.827561 12.1285 2.24762C14.3405 4.93912 16.2052 7.91038 17.6707 11.0928C20.1445 16.465 21.4215 22.3106 21.4133 28.2251C21.405 34.1395 20.1117 39.9816 17.623 45.3469C16.1479 48.5267 14.2738 51.4941 12.0529 54.1805C9.51843 57.2461 4.91315 56.84 2.33992 53.8068V53.8068Z');
width: 21px;
height: 57px;
}
}
.direction {
display: grid;
grid-template-columns: 0.3fr 1fr 0.3fr;
grid-template-rows: 0.3fr 1fr 0.3fr;
align-items: center;
justify-items: center;
gap: 3px;
.top {
grid-area: 1/2/1/2;
}
.right {
grid-area: 2/3/2/3;
}
.bottom {
grid-area: 3/2/3/2;
}
.left {
grid-area: 2/1/2/1;
}
.center {
grid-area: 2/2/2/2;
width: 66px;
height: 66px;
background: #006A96;
border-radius: 50%;
opacity: 1;
border: 1px solid #3DE8FF
}
}
.options {
display: flex;
flex-direction: column;
gap: 18px;
>div {
display: flex;
align-items: center;
gap: 9px;
img {
background-color: #006A96;
border-radius: 50%;
&:active {
background-color: #48B0CB;
}
}
}
}
}
}
}
}
</style>

14
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/add.svg

@ -0,0 +1,14 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814646">
<circle id="Ellipse 2023" cx="11" cy="11" r="10.5" stroke="#00BBD4"/>
<g id="Frame" clip-path="url(#clip0_322_126)">
<path id="Vector" d="M10.7889 5.07715C10.9572 5.07715 11.1186 5.13955 11.2377 5.25063C11.3567 5.36171 11.4235 5.51237 11.4235 5.66946V16.331C11.4235 16.4881 11.3567 16.6387 11.2377 16.7498C11.1186 16.8609 10.9572 16.9233 10.7889 16.9233C10.6206 16.9233 10.4592 16.8609 10.3402 16.7498C10.2212 16.6387 10.1543 16.4881 10.1543 16.331V5.66946C10.1543 5.51237 10.2212 5.36171 10.3402 5.25063C10.4592 5.13955 10.6206 5.07715 10.7889 5.07715Z" fill="white"/>
<path id="Vector_2" d="M16.9233 10.7887C16.9233 10.957 16.8609 11.1184 16.7498 11.2374C16.6387 11.3564 16.4881 11.4233 16.331 11.4233H5.66946C5.51237 11.4233 5.36171 11.3564 5.25063 11.2374C5.13955 11.1184 5.07715 10.957 5.07715 10.7887C5.07715 10.6204 5.13955 10.4589 5.25063 10.3399C5.36171 10.2209 5.51237 10.1541 5.66946 10.1541H16.331C16.4881 10.1541 16.6387 10.2209 16.7498 10.3399C16.8609 10.4589 16.9233 10.6204 16.9233 10.7887Z" fill="white"/>
</g>
</g>
<defs>
<clipPath id="clip0_322_126">
<rect width="11.8462" height="11.8462" fill="white" transform="translate(5.07715 5.07715)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

11
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/bottom.svg

@ -0,0 +1,11 @@
<svg width="57" height="22" viewBox="0 0 57 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814664">
<g id="Subtract">
<mask id="path-1-inside-1_330_220" fill="white">
<path fill-rule="evenodd" clip-rule="evenodd" d="M53.807 2.34017C51.1049 0.047834 47.1722 0.145058 44.0948 1.90162C35.7042 6.69089 25.2544 7.64999 15.6704 3.59362C14.5092 3.10216 13.3921 2.55033 12.321 1.94332C9.23352 0.193509 5.29428 0.104847 2.59447 2.40821V2.40821C-0.433686 4.99171 -0.827317 9.60141 2.24787 12.1288C4.93936 14.3408 7.91063 16.2055 11.093 17.6709C16.4653 20.1448 22.3109 21.4217 28.2253 21.4135C34.1398 21.4053 39.9818 20.112 45.3471 17.6232C48.527 16.1482 51.4944 14.2741 54.1807 12.0532C57.2464 9.51869 56.8402 4.9134 53.807 2.34017V2.34017Z"/>
</mask>
<path d="M15.6704 3.59362L15.2806 4.51454L15.6704 3.59362ZM11.093 17.6709L10.6748 18.5792L10.6748 18.5792L11.093 17.6709ZM28.2253 21.4135L28.2239 20.4135L28.2239 20.4135L28.2253 21.4135ZM45.3471 17.6232L45.7679 18.5304L45.7679 18.5304L45.3471 17.6232ZM54.1807 12.0532L53.5436 11.2825L54.1807 12.0532ZM12.321 1.94332L11.8279 2.81331L12.321 1.94332ZM44.0948 1.90162L43.599 1.03314L44.0948 1.90162ZM43.599 1.03314C35.4676 5.67447 25.3448 6.60238 16.0602 2.67271L15.2806 4.51454C25.164 8.69759 35.9407 7.7073 44.5905 2.7701L43.599 1.03314ZM16.0602 2.67271C14.9345 2.19626 13.8518 1.66143 12.8141 1.07332L11.8279 2.81331C12.9324 3.43922 14.084 4.00807 15.2806 4.51454L16.0602 2.67271ZM11.5113 16.7626C8.40685 15.333 5.50837 13.514 2.8828 11.3562L1.61293 12.9013C4.37036 15.1675 7.4144 17.0779 10.6748 18.5792L11.5113 16.7626ZM28.2239 20.4135C22.4544 20.4215 16.7519 19.1758 11.5113 16.7626L10.6748 18.5792C16.1786 21.1137 22.1674 22.4219 28.2267 22.4135L28.2239 20.4135ZM44.9263 16.7161C39.6924 19.1439 33.9935 20.4055 28.2239 20.4135L28.2267 22.4135C34.286 22.4051 40.2712 21.0801 45.7679 18.5304L44.9263 16.7161ZM53.5436 11.2825C50.923 13.449 48.0283 15.2772 44.9263 16.7161L45.7679 18.5304C49.0257 17.0192 52.0658 15.0992 54.8179 12.8239L53.5436 11.2825ZM1.94543 1.64746C-1.45788 4.55102 -2.03825 9.9006 1.61293 12.9013L2.8828 11.3562C0.383611 9.30223 0.590509 5.43239 3.24352 3.16896L1.94543 1.64746ZM54.8179 12.8239C58.4581 9.81444 57.8632 4.4699 54.4539 1.57761L53.1601 3.10273C55.8172 5.35691 56.0347 9.22294 53.5436 11.2825L54.8179 12.8239ZM12.8141 1.07332C9.46142 -0.826764 5.04499 -0.996955 1.94543 1.64746L3.24352 3.16896C5.54357 1.20665 9.00562 1.21378 11.8279 2.81331L12.8141 1.07332ZM44.5905 2.7701C47.4025 1.16503 50.8583 1.15001 53.1601 3.10273L54.4539 1.57761C51.3515 -1.05434 46.9419 -0.874918 43.599 1.03314L44.5905 2.7701Z" fill="#3DE8FF" mask="url(#path-1-inside-1_330_220)"/>
</g>
<path id="Vector" d="M29.062 15.7275L32.3536 12.3756C32.4076 12.3206 32.4504 12.2553 32.4797 12.1834C32.5089 12.1115 32.5239 12.0344 32.5239 11.9566C32.5239 11.8787 32.5089 11.8017 32.4797 11.7298C32.4504 11.6579 32.4076 11.5926 32.3536 11.5376C32.1259 11.3062 31.7582 11.3062 31.531 11.5376L28.6359 14.4853L25.7409 11.5376C25.5309 11.3238 25.2015 11.3074 24.9732 11.4882L24.9177 11.5376L24.9171 11.5387C24.8086 11.6499 24.7477 11.8004 24.7479 11.9574C24.7481 12.1143 24.8094 12.2647 24.9182 12.3756L28.2099 15.7275C28.3106 15.8303 28.4449 15.8916 28.587 15.8999L28.6848 15.8999C28.822 15.892 28.957 15.8341 29.0625 15.7275L29.062 15.7275Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

11
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/left.svg

@ -0,0 +1,11 @@
<svg width="21" height="57" viewBox="0 0 21 57" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814664">
<g id="Subtract">
<mask id="path-1-inside-1_330_228" fill="white">
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.073 53.8067C21.3654 51.1046 21.2682 47.1718 19.5116 44.0943C14.7224 35.7038 13.7634 25.2541 17.8197 15.6702C18.3111 14.5091 18.8629 13.392 19.4699 12.321C21.2197 9.23347 21.3083 5.29421 19.0049 2.59438V2.59438C16.4214 -0.433814 11.8116 -0.82745 9.28428 2.24778C7.0723 4.93926 5.20761 7.9105 3.74217 11.0929C1.26833 16.4651 -0.0086527 22.3107 -0.000413216 28.2252C0.00782436 34.1396 1.30109 39.9817 3.78988 45.347C5.26489 48.5268 7.13894 51.4941 9.35982 54.1805C11.8944 57.2462 16.4997 56.84 19.073 53.8067V53.8067Z"/>
</mask>
<path d="M17.8197 15.6702L18.7406 16.0599L18.7406 16.0599L17.8197 15.6702ZM3.74217 11.0929L2.83385 10.6746L2.83385 10.6746L3.74217 11.0929ZM-0.000413216 28.2252L0.999586 28.2238L0.999586 28.2238L-0.000413216 28.2252ZM9.28428 2.24778L8.51171 1.61284L9.28428 2.24778ZM20.3801 43.5986C15.7388 35.4672 14.811 25.3445 18.7406 16.0599L16.8988 15.2804C12.7158 25.1637 13.706 35.9403 18.6431 44.59L20.3801 43.5986ZM18.7406 16.0599C19.217 14.9343 19.7518 13.8517 20.3399 12.8141L18.5999 11.8279C17.974 12.9323 17.4052 14.0839 16.8988 15.2804L18.7406 16.0599ZM4.65049 11.5111C6.08003 8.40672 7.89904 5.50826 10.0568 2.88271L8.51171 1.61284C6.24555 4.37025 4.33518 7.41427 2.83385 10.6746L4.65049 11.5111ZM0.999586 28.2238C0.991548 22.4542 2.23726 16.7518 4.65049 11.5111L2.83385 10.6746C0.299414 16.1784 -1.00885 22.1672 -1.00041 28.2266L0.999586 28.2238ZM4.69703 44.9262C2.26921 39.6923 1.00762 33.9933 0.999586 28.2238L-1.00041 28.2266C-0.991973 34.2859 0.33297 40.271 2.88273 45.7678L4.69703 44.9262ZM10.1305 53.5433C7.96406 50.9228 6.13591 48.0281 4.69703 44.9262L2.88273 45.7678C4.39386 49.0255 6.31383 52.0655 8.5891 54.8177L10.1305 53.5433ZM19.7657 1.94534C16.8621 -1.45801 11.5125 -2.03838 8.51171 1.61284L10.0568 2.88271C12.1108 0.38348 15.9807 0.590381 18.2442 3.24343L19.7657 1.94534ZM8.5891 54.8177C11.5986 58.4579 16.9432 57.863 19.8356 54.4537L18.3105 53.1598C16.0562 55.817 12.1901 56.0345 10.1305 53.5433L8.5891 54.8177ZM20.3399 12.8141C22.2399 9.46136 22.4101 5.04491 19.7657 1.94534L18.2442 3.24343C20.2065 5.5435 20.1994 9.00558 18.5999 11.8279L20.3399 12.8141ZM18.6431 44.59C20.2482 47.4021 20.2632 50.858 18.3105 53.1598L19.8356 54.4537C22.4676 51.3512 22.2881 46.9415 20.3801 43.5986L18.6431 44.59Z" fill="#3DE8FF" mask="url(#path-1-inside-1_330_228)"/>
</g>
<path id="Vector" d="M5.68603 29.0617L9.03801 32.3534C9.09299 32.4074 9.1583 32.4502 9.23019 32.4794C9.30209 32.5086 9.37916 32.5237 9.457 32.5237C9.53484 32.5237 9.61191 32.5086 9.68381 32.4794C9.75571 32.4502 9.82102 32.4074 9.876 32.3534C10.1073 32.1257 10.1073 31.7579 9.876 31.5308L6.92828 28.6357L9.876 25.7406C10.0898 25.5306 10.1062 25.2013 9.92533 24.973L9.876 24.9174L9.87487 24.9169C9.76372 24.8083 9.61313 24.7475 9.4562 24.7477C9.29927 24.7479 9.14885 24.8091 9.03801 24.918L5.68603 28.2096C5.5833 28.3104 5.52196 28.4446 5.51367 28.5868L5.51367 28.6846C5.52161 28.8218 5.57944 28.9567 5.68603 29.0623L5.68603 29.0617Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

11
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/right.svg

@ -0,0 +1,11 @@
<svg width="22" height="57" viewBox="0 0 22 57" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814665">
<g id="Subtract">
<mask id="path-1-inside-1_330_233" fill="white">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.33992 53.8068C0.0475853 51.1047 0.14481 47.172 1.90137 44.0945C6.69064 35.7039 7.64974 25.2542 3.59338 15.6702C3.10192 14.509 2.55008 13.3918 1.94307 12.3208C0.193261 9.23327 0.1046 5.29403 2.40796 2.59423V2.59423C4.99146 -0.433928 9.60116 -0.827561 12.1285 2.24762C14.3405 4.93912 16.2052 7.91038 17.6707 11.0928C20.1445 16.465 21.4215 22.3106 21.4133 28.2251C21.405 34.1395 20.1117 39.9816 17.623 45.3469C16.1479 48.5267 14.2738 51.4941 12.0529 54.1805C9.51843 57.2461 4.91315 56.84 2.33992 53.8068V53.8068Z"/>
</mask>
<path d="M3.59338 15.6702L2.67247 16.0599L3.59338 15.6702ZM17.6707 11.0928L16.7623 11.5111L16.7623 11.5111L17.6707 11.0928ZM21.4133 28.2251L22.4133 28.2265L22.4133 28.2265L21.4133 28.2251ZM17.623 45.3469L16.7158 44.9261L16.7158 44.9261L17.623 45.3469ZM1.03289 43.5988C5.67423 35.4674 6.60214 25.3446 2.67247 16.0599L4.51429 15.2804C8.69735 25.1637 7.70706 35.9405 2.76986 44.5902L1.03289 43.5988ZM2.67247 16.0599C2.19601 14.9342 1.66118 13.8515 1.07307 12.8138L2.81306 11.8277C3.43898 12.9321 4.00782 14.0838 4.51429 15.2804L2.67247 16.0599ZM16.7623 11.5111C15.3328 8.40661 13.5138 5.50813 11.3559 2.88255L12.9011 1.61268C15.1673 4.37011 17.0776 7.41416 18.579 10.6745L16.7623 11.5111ZM20.4133 28.2237C20.4213 22.4541 19.1756 16.7517 16.7623 11.5111L18.579 10.6745C21.1134 16.1783 22.4217 22.1672 22.4133 28.2265L20.4133 28.2237ZM16.7158 44.9261C19.1436 39.6922 20.4052 33.9933 20.4133 28.2237L22.4133 28.2265C22.4048 34.2858 21.0799 40.2709 18.5301 45.7677L16.7158 44.9261ZM11.2822 53.5433C13.4487 50.9228 15.2769 48.0281 16.7158 44.9261L18.5301 45.7677C17.019 49.0254 15.099 52.0655 12.8236 54.8177L11.2822 53.5433ZM1.64721 1.94518C4.55077 -1.45812 9.90034 -2.03849 12.9011 1.61268L11.3559 2.88255C9.30197 0.383368 5.43214 0.590267 3.16871 3.24327L1.64721 1.94518ZM12.8236 54.8177C9.81418 58.4578 4.46965 57.863 1.57736 54.4537L3.10248 53.1599C5.35666 55.817 9.22268 56.0345 11.2822 53.5433L12.8236 54.8177ZM1.07307 12.8138C-0.827012 9.46117 -0.997201 5.04474 1.64721 1.94518L3.16871 3.24327C1.2064 5.54332 1.21353 9.00537 2.81306 11.8277L1.07307 12.8138ZM2.76986 44.5902C1.16479 47.4023 1.14976 50.8581 3.10248 53.1599L1.57736 54.4537C-1.05459 51.3513 -0.875166 46.9416 1.03289 43.5988L2.76986 44.5902Z" fill="#3DE8FF" mask="url(#path-1-inside-1_330_233)"/>
</g>
<path id="Vector" d="M15.7271 29.0617L12.3751 32.3534C12.3201 32.4074 12.2548 32.4502 12.1829 32.4794C12.111 32.5086 12.0339 32.5237 11.9561 32.5237C11.8782 32.5237 11.8012 32.5086 11.7293 32.4794C11.6574 32.4502 11.5921 32.4074 11.5371 32.3534C11.3058 32.1257 11.3058 31.7579 11.5371 31.5308L14.4848 28.6357L11.5371 25.7406C11.3233 25.5306 11.3069 25.2013 11.4878 24.973L11.5371 24.9174L11.5382 24.9169C11.6494 24.8083 11.8 24.7475 11.9569 24.7477C12.1138 24.7479 12.2642 24.8091 12.3751 24.918L15.7271 28.2096C15.8298 28.3104 15.8911 28.4446 15.8994 28.5868L15.8994 28.6846C15.8915 28.8218 15.8336 28.9567 15.7271 29.0623L15.7271 29.0617Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

6
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/sub.svg

@ -0,0 +1,6 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814647">
<circle id="Ellipse 2023" cx="11" cy="11" r="10.5" stroke="#00BBD4"/>
<path id="Vector" d="M16.9233 11.6346C16.9233 11.8029 16.8609 11.9643 16.7498 12.0834C16.6387 12.2024 16.4881 12.2692 16.331 12.2692H5.66946C5.51237 12.2692 5.36171 12.2024 5.25063 12.0834C5.13955 11.9643 5.07715 11.8029 5.07715 11.6346C5.07715 11.4663 5.13955 11.3049 5.25063 11.1859C5.36171 11.0669 5.51237 11 5.66946 11H16.331C16.4881 11 16.6387 11.0669 16.7498 11.1859C16.8609 11.3049 16.9233 11.4663 16.9233 11.6346Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 643 B

11
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/images/top.svg

@ -0,0 +1,11 @@
<svg width="57" height="21" viewBox="0 0 57 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1142814665">
<g id="Subtract">
<mask id="path-1-inside-1_330_221" fill="white">
<path fill-rule="evenodd" clip-rule="evenodd" d="M53.807 19.0734C51.1049 21.3657 47.1722 21.2685 44.0948 19.512C35.7042 14.7227 25.2544 13.7636 15.6704 17.82C14.5092 18.3114 13.3921 18.8632 12.321 19.4703C9.23352 21.2201 5.29428 21.3087 2.59447 19.0054V19.0054C-0.433686 16.4219 -0.827317 11.8122 2.24787 9.28482C4.93936 7.07281 7.91063 5.2081 11.093 3.74265C16.4653 1.26882 22.3109 -0.00817108 28.2253 6.86646e-05C34.1398 0.0083065 39.9818 1.30157 45.3471 3.79036C48.527 5.26539 51.4944 7.13947 54.1807 9.36039C57.2464 11.8949 56.8402 16.5002 53.807 19.0734V19.0734Z"/>
</mask>
<path d="M15.6704 17.82L15.2806 16.899L15.6704 17.82ZM11.093 3.74265L10.6748 2.83433L10.6748 2.83433L11.093 3.74265ZM28.2253 6.86646e-05L28.2239 1.00007L28.2239 1.00007L28.2253 6.86646e-05ZM45.3471 3.79036L45.7679 2.88321L45.7679 2.88321L45.3471 3.79036ZM54.1807 9.36039L53.5436 10.1311L54.1807 9.36039ZM12.321 19.4703L11.8279 18.6003L12.321 19.4703ZM44.0948 19.512L43.599 20.3804L44.0948 19.512ZM43.599 20.3804C35.4676 15.7391 25.3448 14.8112 16.0602 18.7409L15.2806 16.899C25.164 12.716 35.9407 13.7063 44.5905 18.6435L43.599 20.3804ZM16.0602 18.7409C14.9345 19.2173 13.8518 19.7521 12.8141 20.3403L11.8279 18.6003C12.9324 17.9744 14.084 17.4055 15.2806 16.899L16.0602 18.7409ZM11.5113 4.65097C8.40685 6.08053 5.50837 7.89956 2.8828 10.0574L1.61293 8.51225C4.37036 6.24606 7.4144 4.33567 10.6748 2.83433L11.5113 4.65097ZM28.2239 1.00007C22.4544 0.99203 16.7519 2.23774 11.5113 4.65097L10.6748 2.83433C16.1786 0.299895 22.1674 -1.00837 28.2267 -0.99993L28.2239 1.00007ZM44.9263 4.69752C39.6924 2.26969 33.9935 1.0081 28.2239 1.00007L28.2267 -0.99993C34.286 -0.991491 40.2712 0.333453 45.7679 2.88321L44.9263 4.69752ZM53.5436 10.1311C50.923 7.96459 48.0283 6.13641 44.9263 4.69752L45.7679 2.88321C49.0257 4.39437 52.0658 6.31436 54.8179 8.58968L53.5436 10.1311ZM1.94543 19.7661C-1.45788 16.8626 -2.03825 11.513 1.61293 8.51225L2.8828 10.0574C0.383611 12.1113 0.590509 15.9812 3.24352 18.2446L1.94543 19.7661ZM54.8179 8.58968C58.4581 11.5991 57.8632 16.9437 54.4539 19.836L53.1601 18.3108C55.8172 16.0567 56.0347 12.1906 53.5436 10.1311L54.8179 8.58968ZM12.8141 20.3403C9.46142 22.2403 5.04499 22.4105 1.94543 19.7661L3.24352 18.2446C5.54357 20.2069 9.00562 20.1998 11.8279 18.6003L12.8141 20.3403ZM44.5905 18.6435C47.4025 20.2485 50.8583 20.2636 53.1601 18.3108L54.4539 19.836C51.3515 22.4679 46.9419 22.2885 43.599 20.3804L44.5905 18.6435Z" fill="#3DE8FF" mask="url(#path-1-inside-1_330_221)"/>
</g>
<path id="Vector" d="M29.062 5.68603L32.3536 9.03801C32.4076 9.09299 32.4504 9.1583 32.4797 9.23019C32.5089 9.30209 32.5239 9.37916 32.5239 9.457C32.5239 9.53484 32.5089 9.61191 32.4797 9.68381C32.4504 9.75571 32.4076 9.82102 32.3536 9.876C32.1259 10.1073 31.7582 10.1073 31.531 9.876L28.6359 6.92828L25.7409 9.876C25.5309 10.0898 25.2015 10.1062 24.9732 9.92533L24.9177 9.876L24.9171 9.87487C24.8086 9.76372 24.7477 9.61313 24.7479 9.4562C24.7481 9.29927 24.8094 9.14885 24.9182 9.03801L28.2099 5.68603C28.3106 5.5833 28.4449 5.52196 28.587 5.51367L28.6848 5.51367C28.822 5.52161 28.957 5.57944 29.0625 5.68603L29.062 5.68603Z" fill="white"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

213
ruoyi-ui/src/views/JiHeExpressway/components/CameraShower/index.vue

@ -0,0 +1,213 @@
<template>
<div v-if="visible" class="compBox">
<div class="head" style="height:4vh;">
<div class="tit">附近相机</div>
<img class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" alt="" @click="onClose">
<img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt="">
</div>
<template v-if="list.length>0">
<!-- <p>{{ list }}</p> -->
<div class="videoPlayer">
<!-- <videoView :url="slectedVideo" /> -->
<Video class="video-stream" :camId="selectedCamera.camId" />
</div>
<div class="operation">
<div class="selectCam">
<div class="label">选择相机: </div>
<div class="val">
<el-select v-model="selectedCameraIndex" placeholder="请选择" size="mini" @change="onChangeCamera">
<el-option v-for="item,index in list" :key="index" :label="item.camName" :value="index">
</el-option>
</el-select>
</div>
</div>
<el-button type="primary" icon="el-icon-s-operation" class="controlCam" v-if="selectedCamera.ptzCtrl == 0" @click="controlDialogVisible=!controlDialogVisible"></el-button>
<CameraController :visible.sync="controlDialogVisible" v-if="controlDialogVisible" :deviceId="selectedCamera.camId" class="cameraControl"/>
</div>
<div class="flex1 txtInfo">
<p v-for="item in cameraInfo" :key="item.value" class="txtItem">
<span class="label">{{ item.title }}: </span>
<span class="val">{{ item.value }}</span>
</p>
</div>
<!-- <div class="camera_bom_right">
<div class="camera_bom_right_t">
<div class="camera_bom_right_t_box"></div>
<div class="camera_bom_right_t_h_po" v-for="item in cameraBtnList" :key="item.id"
@click="onControlCamera(item)"
:style="{ 'left': item.le, top: item.to, 'transform': 'rotate(' + item.ro + 'deg)' }"></div>
</div>
<div class="camera_bom_right_b">
<div class="camera_bom_right_b_btn" v-for="item in cameraControlList" :key="item.id">
<div class="camera_bom_right_b_btn_l" @click="cameraControlLeFn(item.numL)"></div>
<div class="camera_bom_right_b_btn_c">{{ item.txt }}</div>
<div class="camera_bom_right_b_btn_r" @click="cameraControlLeFn(item.numR)"></div>
</div>
</div>
</div> -->
</template>
<Empty v-else text="没有查询到附近的相机..." class="flex1">
</Empty>
</div>
</template>
<script>
import Video from "@screen/components/Video"
import CameraController from "./CameraController.vue";
export default {
name: '',
components: {
Video,
CameraController
},
props: {
list: {
type: Array,
default: () => []
},
visible:{
type:Boolean,
default:false
}
},
data() {
return {
booooooool:true,
selectedCameraIndex:null,
selectedCamera:{},
cameraInfo:[],
controlDialogVisible:false
}
},
watch:{
list:{
handler(){
this.selectCamera();
},
deep:true,
}
},
mounted(){
},
methods:{
onClose (){
this.$emit("update:visible" , false)
},
onChangeCamera(val){
this.selectCamera();
},
selectCamera(){
if(this.list.length <= 0){
return
}
if(this.selectedCameraIndex == null){
this.selectedCameraIndex = 0;
}
this.selectedCamera = this.list[this.selectedCameraIndex];
let cmr = this.selectedCamera;
this.cameraInfo = [
{title:"道路名称", value:cmr.deptName },
{title:"道路编号", value:cmr.road },
{title:"设备名称", value:cmr.camName },
{title:"设备编号", value:cmr.camId },
{title:"设备桩号", value:cmr.pileNum },
{title:"相机类型", value:["球机","枪机"][+cmr.ptzCtrl] },
// {title:"", value:cmr.camStatus }
];
},
onControlCamera(val){
console.log(val , "vallllllllll")
}
}
}
</script>
<style lang='scss' scoped>
@mixin fontClass{
fontSize:14px; color:#FFF;
}
$colorLabel: #3DE8FF;
.compBox{
display: flex;
flex-direction: column;
position: relative;
.cameraControl{
position: absolute;
right: -2px;
top:-2px;
transform: translateX(100%);
}
.head {
height: 48px;
padding: 0 10px;
background-image: url('~@/assets/screen/xtb/qbbtit.png');
background-size: 100% 100%;
background-repeat: no-repeat;
background-position: center;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
.tit {
color: #3de8ff;
font-size: 18px;
}
.btnCls {
width: 13px;
height: 13px;
cursor: pointer;
}
.deco {
width: 55%;
height: 5px;
position: absolute;
left: 0;
top: 0;
}
}
.flex1{
flex: 1; height:0;
}
.videoPlayer { height: 246px; }
.operation{
display: flex; flex-direction: row; height: 36px; justify-content: space-between; align-items: center; padding: 0 20px; border-bottom:1px solid #3DE8FF; position: relative;
.selectCam{ display: flex; flex-direction: row;
.label{
margin-right: 6px;
@include fontClass;
color: $colorLabel;
}
.val{ width: 220px; }
}
.controlCam{
padding: 3px;
font-size: 20px;
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%);
border: none;
box-shadow: 0 0 4px rgba(0,0,0,0.3);
}
}
.txtInfo{
flex: 1; overflow-y: scroll; padding: 20px 20px 10px; display: flex; flex-wrap: wrap; align-content:flex-start;
.txtItem{
width: 0; flex-basis: 50%; height: 34px;
.label{
@include fontClass;
color: $colorLabel;
}
.val{
@include fontClass;
}
}
}
}
</style>

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

@ -1,8 +1,8 @@
<template>
<div class='BG-02' :style="{ '--width': width, '--lang-width': langWidth }">
<BackgroundClip ref="BackgroundClipRef" class="bg" :clipPath="getClipPath"
bgColor="linear-gradient(180deg, #152E3C 0%, #163A45 100%)"
borderColor="linear-gradient(180deg, rgba(40, 144, 167, 1), rgba(40, 144, 167, 0.38), rgba(40, 144, 167, 1))">
bgColor="linear-gradient(180deg, rgba(20, 46, 41, 0) 0%, rgba(20, 26, 41, 0.23) 100%)"
>
<slot />
</BackgroundClip>
<div class="decoration">

38
ruoyi-ui/src/views/JiHeExpressway/components/empty.vue

@ -0,0 +1,38 @@
<template>
<div class='empty'>
<p>
{{ text }}
</p>
</div>
</template>
<script>
export default {
name: 'InDevelopment',
components: {
},
props:{
text:{
type:String,
default:"暂无数据"
}
},
mounted() {
console.log(this.$route)
}
}
</script>
<style lang='scss' scoped>
.empty {
padding-top:160px;
color: #8A9EAA;
display: flex;
justify-content: center;
align-items: center;
p {
font-size: 16px;
}
}
</style>

78
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/ConditionStatistics/index.vue

@ -68,22 +68,22 @@
<div class="num-box">
<span>0</span>
</div>
<span class="unit">KM</span>
<span class="unit">Km</span>
</div>
</div>
<div class="total">
<div class="total-processed">
<div class="abnormalList">
<div class="listItem total">
<span class="label">日拥堵累计段数</span>
<div class="value">
<span class="num">0</span>
<span class="unit"></span>
</div>
</div>
<div class="total-kilometer">
<div class="listItem kilometer">
<span class="label">日拥堵累计公里数</span>
<div class="value">
<span class="num">0</span>
<span class="unit">KM</span>
<span class="num">13.25</span>
<span class="unit">Km</span>
</div>
</div>
</div>
@ -340,7 +340,7 @@ export default {
.value {
display: inline-block;
// margin-left: 10px;
font-size: 13px;
font-size: 14px;
font-family: PangMenZhengDao, PangMenZhengDao;
font-weight: 400;
}
@ -348,7 +348,7 @@ export default {
.unit {
display: inline-block;
margin-left: 5px;
font-size: 7px;
font-size: 12px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #ffffff;
@ -476,9 +476,9 @@ export default {
}
}
}
.total {
.total-processed {
.abnormalList {
padding-bottom: 20px;
.listItem{
width: 410px;
height: 34px;
margin: 0 auto;
@ -487,73 +487,49 @@ export default {
justify-content: space-around;
// align-items: center;
background: url("~@screen/images/bg/box_total.png") no-repeat;
font-weight: bold;
.label {
width: 220px;
text-align: right;
font-size: 12px;
font-family: Hiragino Sans GB, Hiragino Sans GB;
font-weight: normal;
color: #ffffff;
color: #fff;
line-height: 40px;
letter-spacing: 7px;
}
.value {
flex: 1;
width: 0;
font-family: Hiragino Sans GB, Hiragino Sans GB;
font-weight: normal;
color: #2fe2cf;
line-height: 40px;
text-shadow: 0px 1px 4px #2fe2cf;
text-align: center;
.num {
font-size: 14px;
}
.unit {
font-size: 10px;
font-size: 12px;
display: inline-block;
margin-left: 5px;
}
}
}
.total-kilometer {
width: 410px;
height: 50px;
margin: 0 auto;
margin-top: 16px;
display: flex;
justify-content: space-around;
// align-items: center;
background: url("~@screen/images/bg/box_total.png") no-repeat;
.label {
display: inline-block;
font-size: 12px;
font-family: Hiragino Sans GB, Hiragino Sans GB;
font-weight: normal;
color: #ffffff;
line-height: 40px;
letter-spacing: 7px;
}
.listItem.total {
.value {
color: #2fe2cf;
text-shadow: 0px 1px 4px #2fe2cf;
}
}
.listItem.kilometer {
.value {
font-family: Hiragino Sans GB, Hiragino Sans GB;
font-weight: normal;
color: #f29600;
line-height: 40px;
text-shadow: 0px 1px 4px #f29600;
.num {
// font-size: 10px;
}
.unit {
font-size: 14px;
display: inline-block;
margin-left: 5px;
}
}
}
}
}
}

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

@ -2,7 +2,6 @@
<Dialog v-model="obverseVisible" :title="dialogData.deviceName">
<div class="Camera">
<Video class="video-stream" :camId="dialogData.iotDeviceId" />
<ElTabs v-model="activeName" class="tabs">
<ElTabPane label="详细设计" name="first">
<Descriptions :list="list" :data="data" style="gap: 18px">

955
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/addinfo.vue

@ -1,955 +0,0 @@
<template>
<div class="container infoBoardDialog">
<!-- 添加信息弹窗 -->
<el-dialog title="新增" :visible.sync="dialogVisible" width="50%" :before-close="handleClose" :close-on-click-modal="false" append-to-body>
<div class="dialogStyleBox">
<div class="dialogLine"></div>
<div class="dialogCloseButton"></div>
</div>
<el-card class="box-card">
<div v-on:ondragenter="ondragenter" v-on:drop="faceDrop" v-on:dragover="allowDrop" :style="{
width: boardWidth + 'px',
height: boardHeight + 'px',
position: 'relative',
lineHeight:boardHeight + 'px',
justifyContent: getTextAlign(dataForm.formatStyle)
}" class="blackBoard2">
<span :style="{
color: getColorStyle(dataForm.COLOR),
fontSize: dataForm.FONT_SIZE,
fontFamily: dataForm.FONT,
zIndex: '1000',
left: dataForm.COORDINATE
? dataForm.COORDINATE.substring(0, 3) + 'px'
: '',
top: dataForm.COORDINATE
? dataForm.COORDINATE.substring(3, 6) + 'px'
: '',
maxHeight:boardHeight + 'px',
}" class="textBoard2 boardTextStyle" v-html="
dataForm.CONTENT
? dataForm.CONTENT.replace(/\n|\r\n/g, '<br>').replace(
/ /g,
'&nbsp'
)
: ''
"></span>
</div>
</el-card>
<el-card>
<el-form :model="dataForm" :rules="dataRule" label-width="120px" ref="dataForm" size="mini">
<el-row :gutter="24" style="height: 45px;">
<el-col :span="8">
<el-form-item prop="category" label="所属类别" :rules="[
{
required: categoryRules ? true : false,
message: '请选择所属类别',
trigger: 'blur',
},
]" v-show="infoType == 2">
<el-select v-model="dataForm.category" placeholder="请选择所属类别" clearable size="mini">
<el-option v-for="item in iotTemplateCategoryList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col class="infoBoardButton" :span="16">
<el-radio-group v-model="formatStyle" @input="alignment(formatStyle)">
<el-radio-button :label="0">左对齐</el-radio-button>
<el-radio-button :label="2">左右居中</el-radio-button>
<el-radio-button :label="1">右对齐</el-radio-button>
</el-radio-group>
</el-col>
</el-row>
<!-- 选择图片弹出框结束 -->
<el-row :gutter="24" style="display: flex;flex-wrap: wrap;width:100%">
<el-col :span="24">
<el-form-item label="详细内容" prop="CONTENT">
<el-input type="textarea" clearable id="textContent" placeholder="详细内容" v-model="dataForm.CONTENT" @keyup.native="keyDown($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="screenSize" label="屏幕尺寸">
<el-select v-model="dataForm.screenSize" filterable placeholder="请选择" v-if="!devicePixelBoolean">
<el-option v-for="item in screenSizeOptions" :key="item.device_pixel" :label="item.device_pixel" :value="item.device_pixel" @click.native="changeScreenSize(item.device_pixel)">
</el-option>
</el-select>
<el-input disabled v-model="dataForm.screenSize" v-if="devicePixelBoolean"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="ACTION" label="入屏方式">
<el-select v-model="dataForm.ACTION" filterable placeholder="请选择">
<el-option v-for="item in inScreenModeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="COLOR" label="字体颜色">
<el-select v-model="dataForm.COLOR" filterable placeholder="请选择">
<el-option v-for="item in colorOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="FONT_SIZE" label="字体大小">
<el-select v-model="dataForm.FONT_SIZE" style="width: 100%" @change="changeFontSize">
<el-option v-for="item in fontSizeOpt" :key="item.dictLabel" :label="item.dictLabel" :value="item.dictLabel">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="FONT" label="字体类型">
<el-select v-model="dataForm.FONT" filterable placeholder="请选择">
<el-option v-for="item in fontTypeOptions" :key="item.cssClass" :label="item.dictLabel" :value="item.cssClass">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="STAY" label="停留时间(秒)">
<el-input-number :min="0" controls-position="right" v-model="dataForm.STAY" style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button @click="dataFormSubmitHandle()" v-loading="loading" style="background-color: #10aac2;color:#fff;" class="submitButton">确认
</el-button>
<el-button class="closeButton" style="background-color:#b5b5b6;color:#fff;" @click="handleClose">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getTemplateInfo, addTemplate, addTemplateContent, editTemplateContent, editTemplate, deleteTemplate, getTemplateContent, getGalleryList, getFontSizeByDevicePixel, uploadBoardEditInfo } from '@/api/board/template'
import { devicessize } from '@/api/information/api.js'
import { checkIotBoardContent } from '@/api/board/vocabulary'
export default {
data() {
return {
radio1: 1,
alignmentNum: 2,
content: '',
boardWidth: '',
boardHeight: '',
checkList: [], //
obj: '',
imgUrl: [],
imgUrlOther: [],
dialogVisible: false,
fileList: [
{
name: 'food.jpeg',
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
},
{
name: 'food2.jpeg',
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
}
],
listquery: [], //
curDragImgItem: '',
visible: false,
startTxt_x: '000',
startTxt_y: '000',
width: '400',
height: '40',
// content: "",
fontColor: 'yellow',
fontSize: '24',
fontType: 'KaiTi',
fontSpacing: 0,
coordinate: '000000',
url: '',
previewContent: '', //
ispreviewContent: -1,
dataForm: {},
templateContent: [],
templateDelContent: [],
dataRule: {
screenSize: [
{
required: true,
message: '请选择分辨率',
trigger: 'blur'
}
],
CONTENT: [
{
required: true,
message: '请输入详细内容',
trigger: 'blur'
}
],
fontColor: [
{
required: true,
message: '请填写字体颜色',
trigger: 'blur'
}
],
fontSize: [
{
required: true,
message: '请填写字体大小',
trigger: 'blur'
}
],
fontType: [
{
required: true,
message: '请选择字体类型',
trigger: 'change'
}
],
fontSpacing: [
{
required: true,
message: '请选择字体间距',
trigger: 'change'
}
],
rollSpeed: [
{
required: true,
message: '请填写滚动速度',
trigger: 'blur'
}
],
stopTime: [
{
required: true,
message: '请填写停留时间',
trigger: 'blur'
}
],
inScreenMode: [
{
required: true,
message: '请选择入屏方式',
trigger: 'blur'
}
]
},
fontTypeOptions: [],
screenSizeOptions: [],
colorOptions: [],
isCurrencyOptions: [
{
code: '0',
content: '通用'
},
{
code: '1',
content: '仅为智能推荐模板'
}
],
inScreenModeOptions: [],
imgSize: [
{
type: '1024*128',
name: '全屏'
},
{
type: '',
name: '正常'
}
],
fontSizeOpt: [],
title: '选择图片',
loading: false,
isAdd: false,
iotTemplateCategoryList: [],
infoType: '',
devicePixelBoolean: false,
categoryRules: false,
formatStyle: '2'
}
},
// directives: {
// drag: function (el, binding, vnode) {
// let that = vnode.context;
// let dragBox = el;
// dragBox.onmousedown = (e) => {
// // that.startTxt_x = dragBox.style.left.substring (0, dragBox.style.left.length - 2)
// // that.startTxt_y = dragBox.style.left.substring (0, dragBox.style.top.length - 2)
// let disX = e.clientX - dragBox.offsetLeft;
// let disY = e.clientY - dragBox.offsetTop;
// let clientHeight = dragBox.clientHeight;
// let clientWidth = dragBox.clientWidth;
// document.onmousemove = function (e) {
// //
// let left = e.pageX - disX;
// let top = e.pageY - disY;
// //
// if (left <= 0) {
// left = 0;
// } else if (that.width - left - clientWidth <= 0) {
// left = that.width - clientWidth;
// }
// if (top <= 0) {
// top = 0;
// } else if (that.height - top - clientHeight <= 0) {
// top = that.height - clientHeight;
// }
// dragBox.style.left = left + "px";
// dragBox.style.top = top + "px";
// let a = (Array(3).join("0") + parseInt(left)).slice(-3);
// let b = (Array(3).join("0") + parseInt(top)).slice(-3);
// that.templateContent[dragBox.id].coordinate = a + b;
// };
// document.onmouseup = function () {
// //
// document.onmousemove = null;
// document.onmousedown = null;
// };
// e.preventDefault(); //
// };
// },
// },
computed: {
divStyle: function () {
return {
width: this.width + 'px',
height: this.height + 'px'
}
}
},
watch: {
// "dataForm.CONTENT": {
// deep: true,
// handler: function (newValue, oldValue) {
// this.dataForm.content1 = newValue;
// },
// },
// templateContent: {
// deep: true,
// handler: function (newValue, oldValue) {
// // this.templateContent=newValue
// var vm = this;
// let inrex = [];
// for (let index = vm.templateContent.length - 1; index >= 0; index--) {
// if (
// vm.templateContent[index].content == "" &&
// (vm.templateContent[index].img == "" ||
// vm.templateContent[index].imageName == "")
// ) {
// inrex.push(index);
// }
// }
// for (let index = 0; index < inrex.length; index++) {
// vm.templateContent.splice(inrex[index], 1);
// }
// },
// },
},
mounted() {
this.getDicts('iot_template_category').then(res => {
this.iotTemplateCategoryList = res.data
// console.log(this.iotTemplateCategoryList, "this.iotTemplateCategoryList");
})
},
created() {
this.getDicts('iot_device_font_type').then(res => {
this.fontTypeOptions = res.data
// console.log(this.fontTypeOptions, "");
})
this.getDicts('iot_devices_font_color').then(res => {
this.colorOptions = res.data
// console.log(this.colorOptions, "");
})
this.getDicts('iot_device_font_inScreen_mode').then(res => {
this.inScreenModeOptions = res.data
// console.log(this.inScreenModeOptions, "");
})
this.getdevicessize()
},
methods: {
init(devicePixel, type, mode) {
if (devicePixel) {
this.devicePixelBoolean = true
this.dataForm.screenSize = devicePixel
this.boardWidth = devicePixel.split('*')[0]
this.boardHeight = devicePixel.split('*')[1]
} else {
this.devicePixelBoolean = false
;(this.boardWidth = '400'), (this.boardHeight = '40')
}
// type 1: 2:
// mode 1: 2
this.infoType = type
if (mode == 1 || type == 1) {
this.categoryRules = false
} else {
this.categoryRules = true
}
// this.title = "";
this.isAdd = !this.dataForm.id
this.dialogVisible = true
this.templateDelContent = []
this.$nextTick(() => {
if (this.isAdd) {
this.$refs['dataForm'] && this.$refs['dataForm'].resetFields()
this.dataForm.id = ''
this.dataForm = {}
this.width = '400'
this.height = '40'
this.dataForm = {
CONTENT: '请输入内容',
COLOR: 'FF0000',
FONT: '黑体',
SPEED: '1',
ACTION: '1',
// COORDINATE: "",
STATE: 'true',
STAY: '5',
screenSize: devicePixel,
formatStyle: '2'
}
this.content = '请输入内容'
} else {
// this.getInfo();
// this.$refs["dataForm"] && this.$refs["dataForm"].clearValidate();
}
})
if (this.dataForm.screenSize) {
this.getFontSizeList(1)
}
this.$forceUpdate()
},
getFontSizeList(type) {
this.getDicts('iot_device_font_size').then(res => {
this.fontSizeOpt = res.data
this.dataForm.FONT_SIZE = res.data[3].dictValue
if (type) {
this.alignment(2)
}
})
//TODO
/*getFontSizeByDevicePixel(this.dataForm.screenSize).then((res) => {
console.log(res, "根据分辨率筛字体大小");
this.fontSizeOpt = res.data.fontSizeList;
this.dataForm.FONT_SIZE = res.data.defaultFont;
if(type){
this.alignment(2)
}
});*/
},
//
getdevicessize() {
//TODO
this.screenSizeOptions = [
{
device_pixel: '192*160'
},
{
device_pixel: '480*48'
},
{
device_pixel: '768*64'
}
]
// TODO
/*devicessize().then((res) => {
console.log(res, "查分辨率");
this.screenSizeOptions = res.data;
});*/
},
changeScreenSize(size) {
this.boardWidth = size.split('*')[0]
this.boardHeight = size.split('*')[1]
this.getFontSizeList()
this.$forceUpdate()
},
changeFontSize() {
console.log(this.dataForm.FONT_SIZE)
this.alignment(this.alignmentNum)
this.$forceUpdate()
},
keyDown(ev) {
this.alignment(this.alignmentNum)
},
//
close() {
this.checkList = []
this.dialogVisible = false
},
faceDrop(e) {
e.preventDefault() //
this.listquery.push(this.curDragImgItem)
},
//
allowDrop(e) {
e.preventDefault() //
},
ondragenter(e) {
e.preventDefault() //
},
//
// getInfo() {
// getTemplateInfo(this.dataForm.id).then((data) => {
// this.dataForm = data.data;
// this.width = this.dataForm.screenSize.split("*")[0];
// this.height = this.dataForm.screenSize.split("*")[1];
// });
// getTemplateContent(this.dataForm.id).then((data) => {
// this.templateContent = data.rows;
// if (this.templateContent.length == 0) {
// this.templateContent.push({
// content: "",
// fontColor: "yellow",
// fontSize: "24",
// fontType: "KaiTi",
// fontSpacing: 0,
// coordinate: "000000",
// img: "",
// });
// }
// });
// },
//
async dataFormSubmitHandle() {
this.alignment()
// let valid = await this.$refs.dataForm.validate().catch(() => {
// return this.$modal.msgError("");
// });
// if (!valid) return;
if (!this.dataForm.CONTENT.trim()) {
return this.$modal.msgError('当前输入内容为空')
} else if (!this.dataForm.category && this.infoType == 2) {
return this.$modal.msgError('情报板所属类别不能为空')
}
this.$emit('addInfo', this.dataForm)
this.dialogVisible = false
//
/*checkIotBoardContent(this.dataForm.CONTENT).then(response => {
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) * 100
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) * 100,
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) {
this.$emit('getActiveNames')
this.$message.success('添加成功')
}
})
.catch(err => {
throw err
})
})
}
} else {
// //
// editTemplate(this.dataForm).then((data) => {});
// this.templateContent.forEach((e) => {
// e.img = e.imageName;
// });
// 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'
}
})*/
// this.loading = true
// // let templateId = "";
// let method = 'put'
// if (this.isAdd) {
// if (this.infoType == 1) {
// //
// this.dataForm.STAY = Number(this.dataForm.STAY) * 100
// 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) * 100,
// 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),
// formatStyle: this.dataForm.formatStyle
// })
// // 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) {
// this.$emit('getActiveNames')
// this.$message.success('')
// }
// })
// .catch(err => {
// throw err
// })
// })
// }
// } else {
// // //
// // editTemplate(this.dataForm).then((data) => {});
// // this.templateContent.forEach((e) => {
// // e.img = e.imageName;
// // });
// // 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'
},
/*********************************************业务代码***********************************************/
getFontStyle(font) {
if (font == '宋体') {
return 'Simsun'
} else if (font == '黑体') {
return 'SimHei'
} else if (font == '楷体') {
return 'KaiTi'
} else if (font == '仿宋') {
return 'FangSong'
} else if (font == '隶书') {
return 'LiSu'
}
},
getColorStyle(font) {
if (font == '黄色' || font == 'yellow') {
return '#FFFF00'
} else if (font == '红色' || font == 'red') {
return '#FF0000'
} else if (font == '绿色' || font == 'GreenYellow') {
return '#00FF00'
} else if (font == '蓝色' || font == 'blue') {
return '#0000FF'
} else {
return '#' + font
}
},
//
alignment(alignmentNum) {
this.alignmentNum = alignmentNum
var divContent2 = document.getElementsByClassName('blackBoard2')
var textBoard2 = document.getElementsByClassName('textBoard2')
//
// let textWidth = textBoard2[0].offsetWidth;
// let textHeight = textBoard2[0].offsetHeight;
// //
// let divWidth = divContent2[0].offsetWidth;
// let divHeight = divContent2[0].offsetHeight;
// var args = [...divContent2];
switch (alignmentNum) {
//
case 0:
divContent2[0].style.justifyContent = 'left'
divContent2[0].style.alignItems = 'center'
// textBoard2[0].style.textAlign = "left";
textBoard2[0].style.position = 'static'
break
//
case 2:
divContent2[0].style.justifyContent = 'center'
divContent2[0].style.alignItems = 'center'
// textBoard2[0].style.textAlign = "center";
textBoard2[0].style.position = 'static'
break
//
case 1:
divContent2[0].style.justifyContent = 'right'
divContent2[0].style.alignItems = 'center'
// textBoard2[0].style.textAlign = "right";
textBoard2[0].style.position = 'static'
break
//
case 4:
divContent2[0].style.alignItems = 'flex-start'
textBoard2[0].style.position = 'static'
break
//
case 5:
divContent2[0].style.alignItems = 'center'
textBoard2[0].style.position = 'static'
break
//
case 6:
divContent2[0].style.alignItems = 'flex-end'
textBoard2[0].style.position = 'static'
break
}
if (!alignmentNum) {
divContent2[0].style.alignItems = 'center'
textBoard2[0].style.position = 'static'
}
var textLeft = this.addZero(textBoard2[0].offsetLeft)
var textTop = this.addZero(textBoard2[0].offsetTop)
this.dataForm.COORDINATE = textLeft + textTop
// console.log(this.dataForm.COORDINATE, "this.dataForm.COORDINATE");
if (alignmentNum != undefined) {
this.dataForm.formatStyle = alignmentNum
}
},
addZero(num) {
return ('000' + num).slice(-3)
},
/*增加新的内容*/
getTextAlign(font) {
if (font == '0') {
return 'left'
} else if (font == '1') {
return 'right'
} else {
return 'center'
}
},
/*删除内容*/
// delTemplateContent(data) {
// for (let i = 0; i < this.templateContent.length; i++) {
// if (
// this.templateContent.indexOf(data) ==
// this.templateContent.indexOf(this.templateContent[i])
// ) {
// if (this.templateContent.length == 1) {
// this.$modal.msgError("");
// } else {
// if (data.id) {
// this.templateDelContent.push(data);
// }
// this.templateContent.splice(this.templateContent.indexOf(data), 1);
// }
// }
// }
// },
cliTest(data) {
this.ispreviewContent = this.templateContent.indexOf(data)
},
/********************图片上传*********************/
handleRemove(file, fileList) {},
handlePreview(file) {},
handleExceed(files, fileList) {
this.$modal.msgError(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
},
handleClose(done) {
var textBoard2 = document.getElementsByClassName('textBoard2')
textBoard2[0].style.position = 'absolute'
this.dialogVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.infoBoardButton {
::v-deep .el-radio-button--medium .el-radio-button__inner {
height: 3vh;
line-height: 3vh;
padding: 0 0.6vw;
font-size: 0.7vw;
}
}
.previewContentCSS {
border: yellow 1px dashed;
}
/* 页脚 */
.dialog-footer {
padding-left: 450px;
}
.photoOther img,
.photo img {
max-width: 300px;
width: 100%;
// height: 80px;
}
.infoBoardButton {
display: flex;
justify-content: left;
}
.boardTextStyle {
line-height: 1;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
position: absolute;
// max-height: 128px;
overflow: hidden;
}
.blackBoard2 {
background: #000000;
display: flex;
margin: 0 auto;
overflow: hidden;
position: relative;
// justify-content: center;
align-items: center;
}
::v-deep .el-card__body {
padding: 10px 0;
}
::v-deep .el-dialog__header {
background-color: #145977;
}
::v-deep .el-dialog__body {
padding: 5px 20px;
background-color: #145977;
}
::v-deep .el-dialog__footer {
background-color: #145977;
}
::v-deep .el-card {
margin-top: 1vh;
background-color: #145977;
border: 2px solid #1d7890;
}
::v-deep .el-form-item__label {
color: #3de8ff;
}
::v-deep .el-input--mini .el-input__inner {
color: #fff;
background-color: #096d8c;
}
::v-deep .el-input-number.is-controls-right .el-input-number__decrease {
color: #fff;
background-color: #096d8c;
}
::v-deep .el-dialog__title {
color: #fff;
}
::v-deep .el-textarea__inner {
color: #fff;
background-color: #096d8c;
border-color: #096d8c;
}
::v-deep .el-input-number.is-controls-right .el-input-number__decrease {
border-color: transparent;
}
::v-deep .el-input-number.is-controls-right .el-input-number__increase {
border-color: transparent;
color: #fff;
background-color: #096d8c;
}
::v-deep .el-button--medium {
padding: 5px 25px;
font-size: 14px;
border-radius: 20px;
border: transparent;
}
::v-deep .el-radio-button__inner {
color: #ffffff;
background-color: pink;
border-color: #1d58a9;
-webkit-box-shadow: -1px 0 0 0 #1d58a9;
box-shadow: -1px 0 0 0 #1d58a9;
background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
border-radius: 3px 3px 3px 3px;
opacity: 1;
border: none !important;
}
::v-deep .infoBoardButton .el-radio-button--medium .el-radio-button__inner {
margin: 0 3px;
}
</style>

917
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/editInfo.vue

@ -1,917 +0,0 @@
<template>
<div class="container infoBoardDialog">
<!-- 添加信息弹窗 -->
<el-dialog title="修改" :visible.sync="dialogVisible" width="50%" :before-close="closeDialog" :close-on-click-modal="false">
<div class="dialogStyleBox">
<div class="dialogLine"></div>
<div class="dialogCloseButton"></div>
</div>
<el-card class="box-card">
<div class="blackBoard1" v-on:ondragenter="ondragenter" v-on:drop="faceDrop" v-on:dragover="allowDrop" :style="{
width: getDevicePixel(boardWidth, 0),
height: getDevicePixel(boardHeight, 1),
position: 'relative',
lineHeight:boardHeight + 'px',
textAlign: getTextAlign(dataForm.formatStyle),
justifyContent: getTextAlign(dataForm.formatStyle)
}">
<span class="textBoard1 boardTextStyle" :style="{
color: getColorStyle(dataForm.COLOR),
fontSize: getFontSize(dataForm.FONT_SIZE),
fontFamily: dataForm.FONT,
zIndex: '1000',
maxHeight:getDevicePixel(boardHeight, 1),
}" v-html="
dataForm.CONTENT.replace(/\n|\r\n/g, '<br>').replace(
/ /g,
'&nbsp'
)
"></span>
</div>
</el-card>
<el-card>
<el-form :model="dataForm" :rules="dataRule" label-width="90px" ref="dataForm" size="mini">
<el-row :gutter="24" style="height: 45px">
<el-col :span="8" v-show="this.boardEmitItem.type == 2 || this.dataForm.category">
<el-form-item prop="category" label="所属类别">
<el-select v-model="dataForm.category" placeholder="请选择所属类别" size="mini" disabled>
<el-option v-for="item in iotTemplateCategoryList" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16" class="infoBoardButton">
<el-radio-group v-model="formatStyle" @input="alignment(formatStyle)">
<el-radio-button :label="0">左对齐</el-radio-button>
<el-radio-button :label="2">左右居中</el-radio-button>
<el-radio-button :label="1">右对齐</el-radio-button>
</el-radio-group>
<!-- <el-button type="info" plain @click="alignment(6)" size="mini">下对齐</el-button>
<el-button type="info" plain @click="alignment(5)" size="mini">上下居中</el-button>
<el-button type="info" plain @click="alignment(4)" size="mini">上对齐</el-button> -->
<!-- <el-button type="primary" @click="alignment(1)" size="mini"
>左对齐</el-button
>
<el-button type="primary" @click="alignment(2)" size="mini"
>左右居中</el-button
>
<el-button type="primary" @click="alignment(3)" size="mini"
>右对齐</el-button
> -->
<!-- <el-button type="primary" plain @click="addCurrRow">添加</el-button> -->
</el-col>
</el-row>
<el-row :gutter="24" style="display: flex;
flex-wrap: wrap;width:100%">
<el-col :span="24">
<el-form-item label="详细内容" prop="CONTENT">
<el-input type="textarea" clearable id="textContent" placeholder="详细内容" v-model="dataForm.CONTENT" @keyup.native="keyDown($event)"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="screenSize" label="屏幕尺寸">
<el-input disabled v-model="dataForm.screenSize"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="ACTION" label="入屏方式">
<el-select v-model="dataForm.ACTION" filterable placeholder="请选择">
<el-option v-for="item in inScreenModeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="COLOR" label="字体颜色">
<el-select v-model="dataForm.COLOR" filterable placeholder="请选择">
<el-option v-for="item in colorOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="FONT_SIZE" label="字体大小">
<el-select v-model="dataForm.FONT_SIZE" style="width: 100%" @change="changeFontSize">
<el-option v-for="item in fontSizeOpt" :key="item.dictLabel" :label="item.dictLabel" :value="item.dictLabel">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="FONT" label="字体类型">
<el-select v-model="dataForm.FONT" filterable placeholder="请选择">
<el-option v-for="item in fontTypeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="STAY" label="停留时间(秒)">
<el-input-number :min="0" controls-position="right" v-model="dataForm.STAY" style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<div slot="footer" class="dialog-footer">
<el-button @click="dataFormSubmitHandle()" v-loading="loading" class="submitButton" style="background-color: #10aac2;color:#fff;">确认
</el-button>
<el-button @click="closeDialog()" class="closeButton" style="background-color:#b5b5b6;color:#fff;">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
// getTemplateInfo,
// addTemplate,
// addTemplateContent,
// editTemplateContent,
// editTemplate,
// deleteTemplate,
// getTemplateContent,
editTemplate,
editTemplateContent,
getGalleryList,
uploadBoardEditInfo,
getFontSizeByDevicePixel
} from '@/api/board/template'
import { checkIotBoardContent } from '@/api/board/vocabulary'
import { HashMap } from '@/api/board/informationBoard'
//
export const deepClone = data => {
//
var type = typeof data
var obj
if (type === 'array') {
obj = []
} else if (type === 'object') {
obj = {}
} else {
//
return data
}
if (type === 'array') {
for (var i = 0, len = data.length; i < len; i++) {
obj.push(deepClone(data[i]))
}
} else if (type === 'object') {
for (var key in data) {
obj[key] = deepClone(data[key])
}
}
return obj
}
export default {
props: {
boardEmitItem: {
required: true,
type: Object
}
},
data() {
return {
formatStyle: 2,
alignmentNum: 2,
iotTemplateCategoryList: [],
content: '',
boardWidth: '',
boardHeight: '',
// boardEmitItem:this.boardEmitItem,
disabled: true,
checkList: [], //
obj: '',
imgUrl: [],
imgUrlOther: [],
dialogVisible: true,
fileList: [
{
name: 'food.jpeg',
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
},
{
name: 'food2.jpeg',
url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
}
],
listquery: [], //
curDragImgItem: '',
visible: false,
startTxt_x: '000',
startTxt_y: '000',
width: '400',
height: '40',
content: '',
fontColor: 'yellow',
fontSize: '24',
fontType: 'KaiTi',
fontSpacing: 0,
coordinate: '000000',
url: '',
previewContent: '', //
ispreviewContent: -1,
dataForm: {
CONTENT: '',
STAY: '',
FONT: '',
COORDINATE: ''
// id: "",
// screenSize: "400*40", //
// inScreenMode: "1", //
// rollSpeed: "1000",
// stopTime: "500",
// applyType: "", //
// vmsType: "", //
// remark: "", //
// imgSizeFrom: "", //
// imageUrl: "",
// height: "",
// width: "",
// coordinate: "", //;3x3y
},
templateContentModel: '',
templateContent: [],
templateDelContent: [],
fontTypeOptions: [],
screenSizeOptions: [
{
type: '400*40'
},
{
type: '128*64'
}
],
colorOptions: [],
isCurrencyOptions: [
{
code: '0',
content: '通用'
},
{
code: '1',
content: '仅为智能推荐模板'
}
],
inScreenModeOptions: [],
imgSize: [
{
type: '1024*128',
name: '全屏'
},
{
type: '',
name: '正常'
}
],
fontSizeOpt: [],
title: '选择图片',
loading: false,
isAdd: false
}
},
// directives: {
// drag: function (el, binding, vnode) {
// let that = vnode.context;
// let dragBox = el;
// dragBox.onmousedown = (e) => {
// // that.startTxt_x = dragBox.style.left.substring (0, dragBox.style.left.length - 2)
// // that.startTxt_y = dragBox.style.left.substring (0, dragBox.style.top.length - 2)
// let disX = e.clientX - dragBox.offsetLeft;
// let disY = e.clientY - dragBox.offsetTop;
// let clientHeight = dragBox.clientHeight;
// let clientWidth = dragBox.clientWidth;
// document.onmousemove = function (e) {
// //
// let left = e.pageX - disX;
// let top = e.pageY - disY;
// //
// if (left <= 0) {
// left = 0;
// } else if (that.width - left - clientWidth <= 0) {
// left = that.width - clientWidth;
// }
// if (top <= 0) {
// top = 0;
// } else if (that.height - top - clientHeight <= 0) {
// top = that.height - clientHeight;
// }
// dragBox.style.left = left + "px";
// dragBox.style.top = top + "px";
// let a = (Array(3).join("0") + parseInt(left)).slice(-3);
// let b = (Array(3).join("0") + parseInt(top)).slice(-3);
// that.templateContent[dragBox.id].coordinate = a + b;
// };
// document.onmouseup = function () {
// //
// document.onmousemove = null;
// document.onmousedown = null;
// };
// e.preventDefault(); //
// };
// },
// },
computed: {
dataRule() {
return {
itemPropertyMap: null,
CONTENT: [
{
required: true,
message: '请输入详细内容',
trigger: 'blur'
}
],
fontColor: [
{
required: true,
message: '请填写字体颜色',
trigger: 'blur'
}
],
fontSize: [
{
required: true,
message: '请填写字体大小',
trigger: 'blur'
}
],
fontType: [
{
required: true,
message: '请选择字体类型',
trigger: 'blur'
}
],
fontSpacing: [
{
required: true,
message: '请选择字体间距',
trigger: 'blur'
}
],
rollSpeed: [
{
required: true,
message: '请填写滚动速度',
trigger: 'blur'
}
],
stopTime: [
{
required: true,
message: '请填写停留时间',
trigger: 'blur'
}
],
inScreenMode: [
{
required: true,
message: '请选择入屏方式',
trigger: 'blur'
}
]
}
},
divStyle: function () {
return {
width: this.width + 'px',
height: this.height + 'px'
}
}
},
watch: {
// boardEmitItem(newval){
// console.log(newval,"newval")
// this.boardEmitItem = newval
// }
// "dataForm.CONTENT": {
// deep: true,
// handler: function (newValue, oldValue) {
// this.dataForm.content1 = newValue;
// },
// },
},
created() {
console.log(this.boardEmitItem, 'this.boardEmitItem')
this.getDicts('iot_template_category').then(res => {
this.iotTemplateCategoryList = res.data
console.log(this.iotTemplateCategoryList, 'this.iotTemplateCategoryList')
})
this.getDicts('iot_device_font_type').then(res => {
this.fontTypeOptions = res.data
console.log(this.fontTypeOptions, '字体类型')
})
this.getDicts('iot_devices_font_color').then(res => {
this.colorOptions = res.data
console.log(this.colorOptions, '字体颜色')
})
// this.getDicts("iot_device_font_size").then((res) => {
// this.fontSizeOpt = res.data;
// console.log(this.fontSizeOpt, "");
// });
this.getDicts('iot_device_font_inScreen_mode').then(res => {
this.inScreenModeOptions = res.data
console.log(this.inScreenModeOptions, '入屏方式')
})
if (this.boardEmitItem) {
this.boardWidth = this.boardEmitItem.screenSize.split('*')[0]
this.boardHeight = this.boardEmitItem.screenSize.split('*')[1]
this.init()
}
},
methods: {
init() {
this.title = '修改'
this.dialogVisible = true
this.itemPropertyMap = new HashMap()
this.alignmentNum = 2
console.log('点击编辑按钮数据回显', this.boardEmitItem)
this.dataForm = JSON.parse(JSON.stringify(this.boardEmitItem))
this.dataForm.formatStyle = this.formatStyle
this.dataForm.COLOR = this.getColorValue(this.boardEmitItem.COLOR)
console.log(this.dataForm, 'this.dataForm')
// this.dataForm.FONT = this.getFont(this.boardEmitItem.FONT)
this.dataForm.CONTENT = JSON.parse(JSON.stringify(this.boardEmitItem.CONTENT.replace('<br>', '\n').replace(/ /g, ' ').replace('<r><n>', '\n')))
// this.dataForm.STAY = JSON.parse(JSON.stringify(Number(this.boardEmitItem.STAY) / 100))
this.dataForm.STAY = Number(this.boardEmitItem.playbackDuration) / 10
console.log('数据回显处理后的参数', this.dataForm)
this.getFontSizeList()
},
getColorValue(color) {
if (color == '#00FF00') {
return '绿色'
} else {
return color
}
},
getFontSizeList() {
this.getDicts('iot_device_font_size').then(res => {
this.fontSizeOpt = res.data
})
/* getFontSizeByDevicePixel(this.dataForm.screenSize).then((res) => {
console.log(res, "根据分辨率筛字体大小");
this.fontSizeOpt = res.data.fontSizeList;
});*/
},
changeFontSize() {
setTimeout(() => {
this.alignment(this.alignmentNum)
}, 100)
},
alignment(alignmentNum) {
var divContent1 = document.getElementsByClassName('blackBoard1')
var textBoard1 = document.getElementsByClassName('textBoard1')
switch (alignmentNum) {
//
case 0:
textBoard1[0].style.position = 'static'
divContent1[0].style.justifyContent = 'left'
divContent1[0].style.alignItems = 'center'
break
//
case 2:
textBoard1[0].style.position = 'static'
divContent1[0].style.justifyContent = 'center'
divContent1[0].style.alignItems = 'center'
break
//
case 1:
divContent1[0].style.justifyContent = 'right'
divContent1[0].style.alignItems = 'center'
textBoard1[0].style.position = 'static'
break
//
case 3:
divContent1[0].style.alignItems = 'flex-start'
textBoard1[0].style.position = 'static'
break
//
case 4:
divContent1[0].style.alignItems = 'center'
textBoard1[0].style.position = 'static'
break
//
case 5:
divContent1[0].style.alignItems = 'flex-end'
textBoard1[0].style.position = 'static'
break
}
var textLeft = this.addZero(JSON.parse(JSON.stringify(textBoard1[0].offsetLeft)))
var textTop = this.addZero(textBoard1[0].offsetTop)
console.log('宽高比11111111', textLeft, textTop)
this.dataForm.COORDINATE = textLeft + textTop
this.dataForm.formatStyle = alignmentNum
},
addZero(num) {
if (num < 0) {
return '000'
} else {
return ('000' + num).slice(-3)
}
},
faceDrop(e) {
e.preventDefault() //
this.listquery.push(this.curDragImgItem)
},
/* 拆分分辨率大小 */
// resolvingPowerType(data) {
// let a = [];
// a = data.split("*");
// this.width = a[0];
// this.height = a[1];
// },
//
allowDrop(e) {
e.preventDefault() //
},
ondragenter(e) {
e.preventDefault() //
},
keyDown(ev) {
this.alignment(this.alignmentNum)
},
getTextAlign(font) {
if (font == '0') {
return 'left'
} else if (font == '1') {
return 'right'
} else {
return 'center'
}
},
//
dataFormSubmitHandle() {
console.log(this.dataForm.type, 'this.dataForm.type')
if (!this.dataForm.CONTENT.trim()) {
return this.$modal.msgError('当前输入内容为空')
}
// this.loading = true
// console.log(' ', this.dataForm)
this.$emit('receiveForm', this.dataForm)
// this.loading = false
// this.isAdd = false
// if (this.dataForm.type == 1) {
// this.dataForm.STAY = Number(this.dataForm.STAY) * 100
// this.$emit('receiveForm', this.dataForm)
// console.log('this.dataForm', this.dataForm)
// } else {
// const tcontent = {
// content: this.dataForm.CONTENT,
// text: this.dataForm.CONTENT,
// coordinate: this.dataForm.COORDINATE,
// createBy: null,
// createTime: null,
// fontColor: this.dataForm.COLOR,
// fontSize: this.dataForm.FONT_SIZE.replace(/\D/g, ''),
// fontSpacing: this.dataForm.SPEED,
// fontType: this.dataForm.FONT,
// height: null,
// id: this.dataForm.id,
// imageUrl: null,
// params: {},
// remark: null,
// searchValue: null,
// templateId: this.dataForm.id,
// updateBy: null,
// updateTime: null,
// width: null
// }
// const param = {
// applyType: '',
// category: this.dataForm.category,
// createBy: null,
// createTime: null,
// dictLable: null,
// id: this.dataForm.id,
// inScreenMode: this.dataForm.ACTION,
// isCurrency: null,
// params: {},
// remark: '',
// screenSize: this.dataForm.screenSize,
// searchValue: null,
// stopTime: Number(this.dataForm.STAY) * 100,
// tcontents: null,
// templateType: null,
// updateBy: null,
// updateTime: null,
// vmsType: '',
// tcontent: tcontent,
// templateId: this.dataForm.id
// }
// editTemplate(param).then(data => {})
// let templateContent = []
// templateContent.push({
// content: this.dataForm.CONTENT,
// fontColor: this.dataForm.COLOR,
// fontSize: this.dataForm.FONT_SIZE.replace(/\D/g, ''),
// fontType: this.dataForm.FONT,
// fontSpacing: this.dataForm.SPEED,
// coordinate: this.dataForm.COORDINATE,
// id: this.dataForm.tcontentsId,
// templateId: this.dataForm.id,
// formatStyle: this.dataForm.formatStyle
// })
// var params = {
// templateContent: templateContent,
// templateId: this.dataForm.id,
// templateDelContent: []
// }
// console.log(params, 'params')
// editTemplateContent(params).then(response => {
// console.log(response, '')
// this.$modal.msgSuccess('')
// })
// this.$forceUpdate()
// }
this.closeDialog()
/*checkIotBoardContent(this.dataForm.CONTENT).then(response => {
if (response.data == 0) {
return this.$modal.msgError('当前发布内容包含敏感字段,请修改')
} else if (response.data == 2) {
return this.$modal.msgError('当前输入内容为空')
} else {
this.loading = true
console.log(this.dataForm, '点击修改 表单')
this.loading = false
this.isAdd = false
if (this.dataForm.type == 1) {
this.dataForm.STAY = Number(this.dataForm.STAY) * 100
this.$emit('receiveForm', this.dataForm)
console.log(this.dataForm, 'this.dataForm修改后给父组件传表单内容')
} else {
const tcontent = {
content: this.dataForm.CONTENT,
text: this.dataForm.CONTENT,
coordinate: this.dataForm.COORDINATE,
createBy: null,
createTime: null,
fontColor: this.dataForm.COLOR,
fontSize: this.dataForm.FONT_SIZE.substring(0, 2),
fontSpacing: this.dataForm.SPEED,
fontType: this.dataForm.FONT,
height: null,
id: this.dataForm.id,
imageUrl: null,
params: {},
remark: null,
searchValue: null,
templateId: this.dataForm.id,
updateBy: null,
updateTime: null,
width: null
}
const param = {
applyType: '',
category: this.dataForm.category,
createBy: null,
createTime: null,
dictLable: null,
id: this.dataForm.id,
inScreenMode: this.dataForm.ACTION,
isCurrency: null,
params: {},
remark: '',
screenSize: this.dataForm.screenSize,
searchValue: null,
stopTime: Number(this.dataForm.STAY) * 100,
tcontents: null,
templateType: null,
updateBy: null,
updateTime: null,
vmsType: '',
tcontent: tcontent,
templateId: this.dataForm.id
}
editTemplate(param).then(data => {})
let templateContent = []
templateContent.push({
content: this.dataForm.CONTENT,
fontColor: this.dataForm.COLOR,
fontSize: this.dataForm.FONT_SIZE.substring(0, 2),
fontType: this.dataForm.FONT,
fontSpacing: this.dataForm.SPEED,
coordinate: this.dataForm.COORDINATE,
id: this.dataForm.tcontentsId,
templateId: this.dataForm.id
})
var params = {
templateContent: templateContent,
templateId: this.dataForm.id,
templateDelContent: []
}
console.log(params, 'params')
editTemplateContent(params).then(response => {
console.log(response, '返回结果')
this.$modal.msgSuccess('修改成功')
})
this.$forceUpdate()
}
this.closeDialog()
}
})*/
},
getFontStyle(font) {
if (font == '宋体') {
return 'Simsun'
} else if (font == '黑体') {
return 'SimHei'
} else if (font == '楷体') {
return 'KaiTi'
} else if (font == '仿宋') {
return 'FangSong'
} else if (font == '隶书') {
return 'LiSu'
}
},
getColorStyle(font) {
if (font == '黄色' || font == 'yellow') {
return '#FFFF00'
} else if (font == '红色' || font == 'red') {
return '#FF0000'
} else if (font == '绿色' || font == 'GreenYellow') {
return '#00FF00'
} else if (font == '蓝色' || font == 'blue') {
return '#0000FF'
} else {
return '#' + font
}
},
closeDialog() {
this.dialogVisible = false
this.$emit('dialogClose')
},
getDevicePixel(devicePixel, num) {
if (num == 0) {
if (devicePixel > 768) {
return 768 + 'px'
} else {
return devicePixel + 'px'
}
} else if (num == 1) {
if (devicePixel > 128) {
return 128 + 'px'
} else {
return devicePixel + 'px'
}
}
},
getCoordinate(coordinate, num) {
if (num == 0) {
if (this.boardWidth > 768) {
let i = this.boardWidth / 768
console.log(coordinate / i, 'width')
return coordinate / i + 'px'
} else {
return coordinate + 'px'
}
} else if (num == 1) {
if (this.boardHeight > 128) {
let i = this.boardHeight / 128
console.log(coordinate / i, 'height')
return coordinate / i + 'px'
} else {
return coordinate + 'px'
}
}
},
getFontSize(size) {
if (this.boardWidth > 768) {
let i = this.boardWidth / 768
return size.replace(/\D/g, '') / i - 2 + 'px'
} else {
return size
}
}
}
}
</script>
<style lang="scss" scoped>
.previewContentCSS {
border: yellow 1px dashed;
}
/* 页脚 */
.dialog-footer {
padding-left: 450px;
}
.photoOther img,
.photo img {
max-width: 300px;
width: 100%;
// height: 80px;
}
.infoBoardButton {
::v-deep .el-radio-button--medium .el-radio-button__inner {
height: 3vh;
line-height: 3vh;
padding: 0 0.6vw;
font-size: 0.7vw;
}
}
::v-deep .el-card__body {
padding: 10px 0;
}
.boardTextStyle {
line-height: 1;
caret-color: rgba(0, 0, 0, 0);
user-select: none;
position: absolute;
// max-height: 128px;
overflow: hidden;
}
.blackBoard1 {
background: #000000;
display: flex;
margin: 0 auto;
overflow: hidden;
position: relative;
// text-align: center;
align-items: center;
}
//
::v-deep .el-dialog__header {
background-color: #145977;
}
::v-deep .el-dialog__body {
padding: 5px 20px;
background-color: #145977;
}
::v-deep .el-dialog__footer {
background-color: #145977;
}
::v-deep .el-card {
margin-top: 1vh;
background-color: #145977;
border: 2px solid #1d7890;
}
::v-deep .el-form-item__label {
color: #3de8ff;
}
::v-deep .el-input--mini .el-input__inner {
color: #fff;
background-color: #096d8c;
}
::v-deep .el-input-number.is-controls-right .el-input-number__decrease {
color: #fff;
background-color: #096d8c;
}
::v-deep .el-dialog__title {
color: #fff;
}
::v-deep .el-textarea__inner {
color: #fff;
background-color: #096d8c;
border-color: #096d8c;
}
::v-deep .el-input-number.is-controls-right .el-input-number__decrease {
border-color: transparent;
}
::v-deep .el-input-number.is-controls-right .el-input-number__increase {
border-color: transparent;
color: #fff;
background-color: #096d8c;
}
::v-deep .el-button--medium {
padding: 5px 25px;
font-size: 14px;
border-radius: 20px;
border: transparent;
}
::v-deep .el-radio-button__inner {
color: #ffffff;
background-color: pink;
border-color: #1d58a9;
-webkit-box-shadow: -1px 0 0 0 #1d58a9;
box-shadow: -1px 0 0 0 #1d58a9;
background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
border-radius: 3px 3px 3px 3px;
opacity: 1;
border: none !important;
}
::v-deep .infoBoardButton .el-radio-button--medium .el-radio-button__inner {
margin: 0 3px;
}
</style>

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

@ -2,16 +2,16 @@
<Teleport>
<div class="mask">
<transition>
<div v-if="visible" class="dialog_info">
<div class="dialog_info_left">
<div v-if="visible" class="content">
<div class="mainDialog">
<div class="dialog_head">
<div class="tit">{{ device.deviceName }}</div>
<img class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" alt="" @click="onClose">
<img class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" alt="" @click="____onClose">
<img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt="">
</div>
<div class="dialogContent">
<div v-if="selectedBdMsg.length > 0" class="dialogContent_box" style="height: 100%;">
<vuescroll :ops="scrollOptions" class="templateBox">
<vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(itm, indx) in selectedBdMsg" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardPreview>
@ -57,29 +57,26 @@
</el-tabs>
</div>
<div class="dialogContent_bottom_btn">
<!-- <div class="show_bottom_btn_add" @click="____onAddDeviceItem">添加信息</div>
<div class="show_bottom_btn_del" @click="____publishInfo" :disabled="selectedBdMsg.length <= 0">信息发布</div> -->
<el-button class="show_bottom_btn_add" type="primary" @click.native="____onAddDeviceItem()">添加信息</el-button>
<el-button class="show_bottom_btn_del" type="warning" @click="____publishInfo" :disabled="selectedBdMsg.length <= 0">发布信息</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>
</div>
<div class="sideSwitch" @click="showSidePanel">
<div class="sideSwitch" @click="____onShowTemplate">
<img class="img" src="@/assets/screen/xtb/leftd.png" alt=""
:style="{ 'transform': isShowTemplate ? 'rotate(0deg)' : 'rotate(180deg)' }">
<div class="txt">信息模板</div>
</div>
<!-- 原型图上没有附近相机代码里暂时关闭
<div class="sideSwitch" style="top:36%;" @click="showCameraInfoFn">
<img class="img" src="@/assets/screen/xtb/leftd.png" alt=""
:style="{ 'transform': dialogInfoCamera ? 'rotate(0deg)' : 'rotate(180deg)' }">
<div class="txt">附近像机</div>
</div> -->
<!-- 附近的摄像机 -->
<div class="sideSwitch" style="top:36%;" @click="____onShowCameraShower">
<img class="img" src="@/assets/screen/xtb/leftd.png" alt=""
:style="{ 'transform': dialogInfoCamera ? 'rotate(0deg)' : 'rotate(180deg)' }">
<div class="txt">附近相机</div>
</div>
</div>
</div>
<!-- 信息模板 -->
<div v-if="isShowTemplate" class="dialog_info_right">
<vuescroll :ops="scrollOptions" class="templateBox">
<div v-if="isShowTemplate" class="sideContent template">
<vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item, index) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
@ -92,7 +89,7 @@
</div>
</div> -->
<!-- 操作按钮 -->
<div class="infoBtnBox">
<div class="infoBtnBox infoBtnBoxSm">
<el-tooltip content="加入待下发信息" placement="top">
<p @click="____onAddToDevice(itm)" class="btn btnApply"></p>
</el-tooltip>
@ -104,73 +101,23 @@
<!-- 附近相机 -->
<div v-if="dialogInfoCamera" class="dialog_info_right" style="padding:0;">
<div class="dialog_head" style="height:4vh;">
<div class="tit">摄像机设备</div>
<img class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" alt="" @click="closeCameraBtnFn">
<img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt="">
</div>
<div class="info_right_camera">
<div class="info_right_camera_top">
<!-- 视频组件 -->
<videoView :url="videoUrl" />
</div>
<div class="info_right_camera_bom">
<div class="camera_bom_left">
<div class="camera_bom_left_item">
<div class="camera_bom_left_item_txt">选择相机: </div>
<div class="camera_bom_left_item_val">
<el-select v-model="cameraVal" placeholder="请选择" size="mini" style="width:130px"
@change="cameraValChangeFn">
<el-option v-for="item in cameraOptList" :key="item.camId" :label="item.camName"
:value="item.camId">
</el-option>
</el-select>
</div>
</div>
<div class="camera_bom_left_item" v-for="item in cameraDataVideoList" :key="item.id">
<div class="camera_bom_left_item_txt">{{ item.txt }}: </div>
<div class="camera_bom_left_item_val">{{ item.val }}</div>
</div>
</div>
<div class="camera_bom_right">
<div class="camera_bom_right_t">
<div class="camera_bom_right_t_box"></div>
<div class="camera_bom_right_t_h_po" v-for="item in cameraBtnList" :key="item.id"
@click="cameraControlBtnFn(item)"
:style="{ 'left': item.le, top: item.to, 'transform': 'rotate(' + item.ro + 'deg)' }"></div>
</div>
<div class="camera_bom_right_b">
<div class="camera_bom_right_b_btn" v-for="item in cameraControlList" :key="item.id">
<div class="camera_bom_right_b_btn_l" @click="cameraControlLeFn(item.numL)"></div>
<div class="camera_bom_right_b_btn_c">{{ item.txt }}</div>
<div class="camera_bom_right_b_btn_r" @click="cameraControlLeFn(item.numR)"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<CameraShower class="sideContent camera" :visible.sync="dialogInfoCamera" :list="nearbyCameraList"></CameraShower>
</div>
</transition>
<BoardInfoEditor @afterSubmit="____onEditSubmit" :mode="editDialog.mode" :type="editDialog.type"
:visible.sync="editDialog.visible" :screenSize="selectedSize" :tpl="editDialog.tpl"></BoardInfoEditor>
<!-- 情报板弹框中的弹框 -->
<addBoard ref="addinfo" @addInfo="addInfo" />
<editBoard v-if="showEmit" :boardEmitItem="boardEmitItem" @receiveForm="receiveForm" @dialogClose="dialogClose" />
</div>
</Teleport>
</template>
<script>
import addBoard from './addinfo.vue'
import editBoard from './editInfo.vue'
import { listDevice, invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device.js'
// import infoBoardTestData from "@/common/infoBoardTestData.js"
import { getBoardDeviceInfo } from '@/api/board/board'
import { getNearbyCameraByPileNum } from '@/api/camera/camera'
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"
@ -185,81 +132,19 @@ import { getTemplateList } from '@/api/board/template'
import testDeviceInfo from "@screen/testData/infoBoard.js"
import CameraShower from '@screen/components/CameraShower'
export default {
name: 'InfoBoard',
data() {
return {
dialogTit: '门架式可变信息标志YK16+270',
isShowTemplate: false,
dialogInfoCamera: false,
dialogInfoList: [],
moBanList: [],
moBanDataHandList: [],
_moBanDataList: [
{
id: 1001,
bt: '日常通用',
mbList: [
{ id: 305, txt: '谨慎驾驶', w: 768, h: 64, col: '#FFFF00', fz: 48, pdl: 288, pdt: 8, fm: '黑体' },
{ id: 306, txt: '谨慎驾驶 注意安全', w: 768, h: 160, col: '#03FF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' },
{ id: 307, txt: '谨慎驾驶 注意安全', w: 768, h: 160, col: '#FF0000', fz: 60, pdl: 0, pdt: 0, fm: '黑体' },
{ id: 308, txt: '谨慎驾驶, <br/> 注意安全', w: 768, h: 160, col: '#03FF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' }
]
},
{ id: 1002, bt: '施工管控', mbList: [{ id: 309, txt: '道路施工, <br/> 谨慎驾驶', w: 768, h: 160, col: '#FFFF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' }] },
{ id: 1003, bt: '恶劣天气', mbList: [{ id: 309, txt: '救援 拨打96659', w: 768, h: 160, col: '#FFFF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' }] },
{ id: 1004, bt: '交通拥堵', mbList: [{ id: 309, txt: '救援 拨打96659', w: 768, h: 160, col: '#FFFF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' }] },
{ id: 1005, bt: '突发事件', mbList: [{ id: 309, txt: '救援 拨打96659', w: 768, h: 160, col: '#FFFF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' }] },
{ id: 1006, bt: '警情播报', mbList: [{ id: 309, txt: '救援 拨打96659', w: 768, h: 160, col: '#FFFF00', fz: 60, pdl: 0, pdt: 0, fm: '黑体' }] }
],
activeNames: [1001, 1002],
activeTab: "first",
moBanDataList: [{
dictCode: 1001,
dictLabel: "日常通用",
mbList: [
{
id: 3001,
screenSize: "200*80",
tcontents: [
{
content: "谨慎驾驶 注意安全",
formatStyle: 0,
fontSize: "24",
fontType: "微软雅黑",
fontColor: "0000FF"
}
]
}
]
}, {
dictCode: 1002,
dictLabel: "施工管理",
mbList: [
{
id: 3002,
screenSize: "800*90",
tcontents: [
{
content: "道路施工<br>缓慢驾驶",
formatStyle: 0,
fontSize: "18",
fontType: "微软雅黑",
fontColor: "FFFF00"
}
]
}
]
}],
tabDataInfoList: [],
tabInfoList: [
{ id: 401, tit: '设备名称', txt: '门架式可变信息标志', col: '#fff' },
{ id: 402, tit: '道路名称', txt: 'G35济菏高速', col: '#fff' },
{ id: 403, tit: '所属机构', txt: '山东高速济南发展公司', col: '#fff' },
{ id: 404, tit: '设备桩号', txt: 'K094+079', col: '#fff' },
{ id: 405, tit: '设备厂商', txt: '光电比特', col: '#fff' },
{ id: 406, tit: '设备状态', txt: '离线', col: '#888' }
],
cameraDataVideoList: [],
cameraDataList: [
{ id: 3001, txt: '设备名称', val: '疲劳唤醒设备1' },
@ -281,7 +166,6 @@ export default {
{ id: 5002, txt: '光圈', numL: 16, numR: 15 },
{ id: 5003, txt: '聚焦', numL: 14, numR: 13 }
],
showEmit: false,
selectedBdMsg: [],
selectedSize: "",
@ -294,7 +178,8 @@ export default {
scrollOptions,
templateAvailable: null,
tplCategory: [], //
templateAll: []
templateAll: [],
nearbyCameraList:[]
}
},
props: {
@ -315,27 +200,16 @@ export default {
immediate: true
}
},
components: { addBoard, editBoard, BoardPreview, BoardTplPreview, BoardInfoEditor, vuescroll, Teleport },
components: { BoardPreview, BoardTplPreview, BoardInfoEditor, vuescroll, Teleport,
CameraShower
},
created() {
// this.____getTemplateCategory();
// this.____getAllTemplate();
// this.getTemplateSeries();
},
computed: {
},
mounted() {
//
// this.dialogInfoList = this.boardDataConvert(infoBoardTestData);
this.templateList = this.moBanDataList;
let deviceState = "online";
this.tabDataInfoList = [
{ id: 401, tit: '设备名称', txt: "门架式可变信息标志", col: '#fff' },
{ id: 402, tit: '道路名称', txt: "G35济菏高速", col: '#fff' },
{ id: 403, tit: '所属机构', txt: "山东高速济南发展公司", col: '#fff' },
{ id: 404, tit: '设备桩号', txt: "K094+079", col: '#fff' },
{ id: 405, tit: '设备厂商', txt: "光电比特", col: '#fff' },
{ id: 406, tit: '设备状态', txt: deviceState == 'online' ? '在线' : '离线', col: deviceState == 'online' ? '#10d269' : '#888' }
]
},
methods: {
//
@ -344,13 +218,13 @@ export default {
this.tplCategory = res.data;
})
},
//
____getAllTemplate() {
return getTemplateList().then((res) => {
this.templateAll = res.data;
});
},
//
____initData() {
this.selectedSize = JSON.parse(this.device.otherConfig).screenSize;
if(this.tplCategory.length && this.templateAll.length){
@ -363,7 +237,7 @@ export default {
this.____getDeviceInfo();
},
//
____getDeviceInfo(){
if (IS_TESTING) {
@ -377,7 +251,7 @@ export default {
})
}
},
//
____setAvailableTemplate() {
this.templateAvailable = [];
this.tplCategory.forEach((item, index) => {
@ -398,7 +272,7 @@ export default {
}
})
},
//
____onEditBoardItem(tpl, index) {
// type : board template
// mode : edit add toDevice toTemplate
@ -410,14 +284,14 @@ export default {
tpl
}
},
//
____onDeleteBoardItem(index) {
if (index > -1) {
this.selectedBdMsg.splice(index, 1)
this.$message.success('删除成功,发布后才效。')
}
},
//
____onEditSubmit(para) {
this.editDialog.tpl = {};
this.editDialog.visible = false;
@ -438,7 +312,7 @@ export default {
____refreshPageData(para) { },
//
//
____onAddToDevice(item) {
let arr = this.selectedSize.split("*");
item.origin = {
@ -453,7 +327,7 @@ export default {
tpl: item,
}
},
//
____onAddDeviceItem() {
let arr = this.selectedSize.split("*");
this.editDialog = {
@ -469,94 +343,16 @@ export default {
}
}
},
____getNearbyCams() {
if(!this.device.stakeMarkId){
this.$message.warning("设备缺少stakeMarkId字段...");
}
let stakeMarkId = this.device.stakeMarkId;
// stakeMarkId = "K64+300";
boardBoxStyle(node) {
let arr = node.screenSize.split("*");
let scale = this.getScrollSz(+arr[0]);
let obj = {
'width': `${+arr[0] / scale}px`,
'height': `${+arr[1] / scale}px`,
'justify-content': this.getTextAlign(node.tcontents[0].formatStyle)
}
return obj;
},
boardConStyle(node) {
let fSize = +node.tcontents[0].fontSize;
let scale = this.getScrollSz(fSize);
let obj = {
'font-size': `${fSize / scale}px`,
'color': '#' + node.tcontents[0].fontColor,
'font-family': node.tcontents[0].fontType
}
return obj;
},
//
boardDataConvert(origin) {
let rst = origin.map(item => {
return {
...item,
STAY: item.playbackDuration,
inScreenMode: item.screenEntryMethod,
screenSize: item.displayAreaWidth + '*' + item.displayAreaHeight,
tcontents: [
{
...item,
fontSpacing: item.fontSpacing,
fontSize: parseInt(item.fontSize.replace(/\D/g, '')),
fontType: item.font,
fontColor: item.foregroundColor.toUpperCase(),
formatStyle: item.horizontalAlignment,
STAY: item.playbackDuration / 10,
content: item.textContent.replaceAll('\\,', ',').replaceAll('\\=', '=').replaceAll('\\\\n', '\n')
}
]
}
});
return rst;
},
//
mapClickEvent(e) {
this.dialogInfoList = []
console.log('父组件地图点位', e)
this.videoUrl = ''
this.cameraOptList = []
this.mapIds = e.target._opts.extData.deviceId
this.screenDataSize = e.target._opts.extData.sceenSize
this.dialogTit = e.target._opts.extData.deviceName
// this.tabDataInfoList = e.target._opts.extData
this.tabDataInfoList = [
{ id: 401, tit: '设备名称', txt: e.target._opts.extData.deviceName, col: '#fff' },
{ id: 402, tit: '道路名称', txt: e.target._opts.extData.roadName, col: '#fff' },
{ id: 403, tit: '所属机构', txt: e.target._opts.extData.organization, col: '#fff' },
{ id: 404, tit: '设备桩号', txt: e.target._opts.extData.pileNumber, col: '#fff' },
{ id: 405, tit: '设备厂商', txt: e.target._opts.extData.brind, col: '#fff' },
{ id: 406, tit: '设备状态', txt: e.target._opts.extData.deviceState == 'online' ? '在线' : '离线', col: e.target._opts.extData.deviceState == 'online' ? '#10d269' : '#888' }
]
this.getTemplateSeries()
this.updateList(this.mapIds)
this.getEnergyCameraBoardFn(e.target._opts.extData.pileNumber)
// this.mapDialogTop = e.pixel.y + 'px'
// this.mapDialogLeft = e.pixel.x + 'px'
// this.$refs.mapDialog.style.top = e.pixel.y + 'px'
// this.$refs.mapDialog.style.left = e.pixel.x + 'px'
// console.log(this.$refs.mapDialog)
},
getEnergyCameraBoardFn(pileNumber) {
getEnergyCameraBoardAPi({ pileNum: pileNumber }).then(res => {
console.log('获取到附近的像机', res)
this.cameraVal = res.data[0].camId
this.cameraOptList = res.data
this.cameraValCha(this.cameraOptList, this.cameraVal)
this.getEnergyCameraVideoFn()
})
},
getEnergyCameraVideoFn() {
getEnergyCameraVideoAPi({ camId: this.cameraVal }).then(res => {
// console.log('', res)
this.videoUrl = res.data.liveUrl
getNearbyCameraByPileNum(stakeMarkId).then(res=>{
this.nearbyCameraList = res.data;
})
},
cameraControlBtnFn(item) {
@ -652,224 +448,36 @@ export default {
})
},
//
getTemplateSeries() {
this.templateList = []
getDicts('iot_template_category').then(res => {
this.moBanDataHandList = res.data
this.activeNames = res.data.map(item => {
return item.dictCode
})
this.getBoardTemplate()
})
},
//
getBoardTemplate() {
getAllVmsTemplate({ devicePixel: this.screenDataSize }).then(res => {
this.templateList = this.moBanDataHandList.map((item, index) => {
if (item.dictSort === index) {
return {
...item,
mbList: res.data[index]
}
}
})
})
},
panelChangeFn(val) {
console.log(val)
},
//
addInfo(form) {
// console.log('', form)
this.dialogInfoList.push({
id: form.id,
screenSize: form.screenSize,
COORDINATE: form.coordinate,
...form,
tcontents: [{ ...form, content: form.CONTENT, fontSize: parseInt(form.FONT_SIZE.replace(/\D/g, '')), fontType: form.FONT, fontColor: form.COLOR }],
id: Math.floor(Math.random() * 10000000000000000),
txt: form.CONTENT,
fz: parseInt(form.FONT_SIZE.replace(/\D/g, '')),
fm: form.FONT,
formatStyle: form.formatStyle,
...this.processString(form.screenSize),
...this.processStrNum(form.COORDINATE)
})
},
//
addMoDataInfoFn(type, mode) {
this.$refs.addinfo.init('', type, mode)
},
//
editOutline(item, index, type) {
this.showEmit = true
this.index = index
this.editType = type
console.log('修改弹窗', item)
this.boardEmitItem = {
...item,
FONT_SIZE: item.tcontents[0].fontSize + 'px',
COLOR: item.tcontents[0].fontColor,
CONTENT: item.tcontents[0].content,
COORDINATE: item.tcontents[0].coordinate,
FONT: this.getFont(item.tcontents[0].fontType),
SPEED: item.tcontents[0].fontSpacing,
formatStyle: item.tcontents[0].formatStyle,
ACTION: item.inScreenMode, //
STAY: item.stopTime, //
type: type,
screenSize: item.screenSize,
category: item.category,
id: item.id,
tcontentsId: item.tcontents[0].id
}
},
// form
receiveForm(form) {
console.log('接收子组件form表单 修改111111111', form)
this.formData = form
console.log('开始的数据', this.dialogInfoList)
this.dialogInfoList = this.dialogInfoList.map(item => {
if (item.id === form.id) {
return { ...item, tcontents: [{ ...item.tcontents[0], ...form, content: form.CONTENT, fontSize: parseInt(form.FONT_SIZE.replace(/\D/g, '')), fontType: form.FONT, fontColor: form.COLOR }] }
}
return item
})
console.log('修改后的数据', this.dialogInfoList)
// this.getTemplateSeries()
this.$forceUpdate()
},
delMoFn(index) {
console.log(index)
// deleteTemplate(item.tcontents[0].templateId)
this.dialogInfoList.splice(index, 1)
// this.removeItemById(this.dialogInfoList, item.id)
},
putLeftFn(item) {
console.log('点击事件', item)
this.dialogInfoList.push({ ...item, STAY: item.stopTime })
console.log('点击事件9990089089', this.dialogInfoList)
},
tabClickFn(tab, event) {
console.log(tab, event)
},
onClose() {
____onClose() {
this.$emit("update:visible", false);
this.isShowTemplate = false
},
showSidePanel() {
____onShowTemplate() {
if (this.dialogInfoCamera) {
this.dialogInfoCamera = false
}
this.isShowTemplate = !this.isShowTemplate
},
showCameraInfoFn() {
____onShowCameraShower() {
if (this.isShowTemplate) {
this.isShowTemplate = false
}
this.dialogInfoCamera = !this.dialogInfoCamera
this.____getNearbyCams();
},
subjectBtnFn(item) {
this.subjectBtn = item.id
},
closeCameraBtnFn() {
this.dialogInfoCamera = false
},
dialogClose() {
this.showEmit = false
this.arrowRightVisible = false
},
removeItemById(arr, id) {
const index = arr.findIndex(item => item.id === id) //
if (index !== -1) {
arr.splice(index, 1) //
}
},
getScrollSz(w) {
if (w > 760) {
return 3
} else if (w > 470) {
return 2
} else {
return 1
}
},
processString(str, x) {
const parts = str.split('*') // '*'
const w = parseInt(parts[0]) //
const h = parseInt(parts[1]) //
if (x === 'w') {
return w
} else if (x === 'h') {
return h
} else {
return { w, h } // w h
}
},
processStrNum(str, x) {
const pdl = parseInt(str.slice(0, 3)) //
const pdt = parseInt(str.slice(3)) //
if (x === 'l') {
return pdl
} else if (x === 't') {
return pdt
} else {
return { pdl, pdt } // pdl pdt
}
},
getFont(font) {
if (font == 'KaiTi' || font == 'k') {
return '楷体'
} else if (font == 'SimSun' || font == 's') {
return '宋体'
} else if (font == 'SimHei' || font == 'h') {
return '黑体'
} else if (font == 'FangSong' || font == 'f') {
return '仿宋'
} else if (font == 'LiSu' || font == 'l') {
return '隶书'
} else {
return font
}
},
//
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' //
},
//
getTextAlign(font) {
if (font == '0') {
return 'left'
} else if (font == '1') {
return 'right'
} else {
return 'center'
}
}
}
}
</script>
<style lang='scss' scoped>
.templateBox {
width: 100%;
height: 100%;
.listBox {
padding: 20px;
.tplItem {
margin-right: 14px;
@ -885,6 +493,9 @@ export default {
}
.infoBtnBox {
&.infoBtnBoxSm{
width: 60px;
}
width: 110px;
height: 80px;
display: flex;
@ -902,15 +513,15 @@ export default {
height: 30px;
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.png);
background-image: url(~@/assets/jihe/images/button/toLeft.svg);
}
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.png);
background-image: url(~@/assets/jihe/images/button/edit.svg);
}
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.png);
background-image: url(~@/assets/jihe/images/button/delete.svg);
}
}
@ -951,7 +562,6 @@ export default {
padding: 0 0.5vw;
}
}
.mask {
width: 100%;
height: 100%;
@ -960,44 +570,36 @@ export default {
left: 0;
background: rgba(0, 0, 0, .36);
z-index: 1100;
}
.map_dialog {
width: 510px;
height: 550px;
background-color: pink;
position: absolute;
left: 0px;
top: 0px;
transform: translate(-110%, -110%);
}
.dialog_info {
width: 950px;
height: 600px;
position: absolute;
top: 12%;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: space-around;
align-items: flex-end;
justify-content: center;
align-items: center;
.content {
display: flex;
flex-direction: row;
}
}
.dialog_info_left {
.mainDialog {
width: 510px;
height: 100%;
height: 620px;
background-color: #114c66;
margin-right: 3px;
}
.dialog_info_right {
width: 430px;
height: 556px;
.sideContent {
border: 2px solid #196980;
background-color: #114c66;
padding: 1vh 0.5vw;
overflow-y: scroll;
position: relative;
margin-top: 50px;
&.camera{
width: 540px;
height: 556px;
}
&.template{
width: 430px;
height: 556px;
padding:20px 0 20px 10px;
}
}
.dialog_head {
@ -1036,7 +638,7 @@ export default {
.dialogContent {
width: 100%;
height: 300px;
padding: 10px 40px 10px 10px;
padding: 10px 24px 10px 10px;
position: relative;
}
@ -1193,42 +795,13 @@ export default {
}
.dialogContent_bottom_btn {
width: 100%;
height: 5vh;
height: 28px;
display: flex;
justify-content: flex-end;
align-items: center;
text-align: center;
}
.show_bottom_btn_add {
width: 90px;
height: 24px;
color: #fff;
font-size: 14px;
line-height: 10px;
background: #00b3cc;
border-radius: 48px 48px 48px 48px;
padding:0;
opacity: 1;
margin-right: 0.5vw;
cursor: pointer;
}
.show_bottom_btn_del {
border: none;
padding: 0;
width: 90px;
height: 24px;
color: #fff;
font-size: 14px;
line-height: 10px;
// background: #c87800;
border-radius: 48px 48px 48px 48px;
opacity: 1;
cursor: pointer;
}
.info_right_camera {
width: 100%;
height: calc(100% - 4vh);
@ -1426,12 +999,4 @@ export default {
line-height: 20px;
color: #fff;
}
::v-deep .el-input--mini .el-input__inner {
height: 20px;
line-height: 20px;
background-color: #086d8f;
border: none;
color: #fff;
}
</style>

6
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -64,7 +64,11 @@ export async function setMarkerCluster(map, points, markerFun) {
const offset = new AMap.Pixel(0, 0);
context.marker.setContent(content);
context.marker.setAnchor("bottom-center");
// console.log(
// "%c [ context.marker ]-62-「map.js」",
// "font-size:15px; background:#7d477f; color:#c18bc3;",
// context.marker
// );
context.marker.setOffset(offset);
context.marker.setExtData(extData);

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

@ -3,11 +3,12 @@
<div class="infoBoardCon">
<!-- ++++++++++设备列表++++++++++ -->
<div style="width: 20%" class="part partLeft">
<div class="partTitle boardListTitle">
<img class="qbbBigDot" src="@/assets/screen/xtb/qbbdot.png" alt="">
<div>情报板列表</div>
<img class="qbbBigDotBa" src="@/assets/screen/xtb/qbba.png" alt="">
</div>
<!-- <div class="partTitle boardListTitle"> -->
<!-- <img class="qbbBigDot" src="@/assets/screen/xtb/qbbdot.png" alt=""> -->
<!-- <div>情报板列表</div> -->
<!-- <img class="qbbBigDotBa" src="@/assets/screen/xtb/qbba.png" alt=""> -->
<!-- </div> -->
<WgtTitle :title="'情报板列表'"></WgtTitle>
<el-form ref="form" :model="form" class="partCon" style="display: flex; flex-direction: column;">
<el-form-item style="margin-bottom: 12px;">
<el-select v-model="form.selectedDirection" size="medium" placeholder="请选择方向" class="direction">
@ -47,20 +48,21 @@
<div>
<div style="display: flex;justify-content: start !important;align-items: center;">
<img class="qbbBigDot" src="@/assets/screen/xtb/qbbdot.png" alt="">
<div>{{ selectedDevice.deviceName }}</div>
<!-- <div>{{ selectedDevice.deviceName }}</div> -->
<div>待下发信息</div>
<span v-if="selectedSize"> {{ selectedSize }}</span>
</div>
<img class="qbbBigDotBa" src="@/assets/screen/xtb/qbba.png" alt="">
</div>
<div class="controlBox">
<el-button type="primary" @click.native="____onAddDeviceItem()">添加信息</el-button>
<el-button type="primary" @click="____publishInfo" :disabled="selectedBdMsg.length <= 0">发布信息</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>
</div>
</div>
<div class="partCon">
<!-- {{ selectedBdMsg }} -->
<vuescroll :ops="scrollOptions" class="templateBox" v-if="selectedBdMsg.length>0">
<vuescroll :ops="scrollOptions" class="templateBox" v-if="selectedBdMsg.length>0" :class="{'hide': isHideCtt }">
<div v-for="(itm, indx) in selectedBdMsg" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardPreview>
@ -75,7 +77,7 @@
</div>
</div>
</vuescroll>
<p style="text-align: center; margin: 100px; 0" v-else>请从设备回读或从模板添加信息...</p>
<Empty v-else text="请从设备回读或从模板添加信息..."></Empty>
</div>
</div>
<!-- ++++++++++右边部分信息模板++++++++++ -->
@ -84,14 +86,15 @@
<div>
<div style="display: flex;justify-content: start !important;align-items: center;">
<img class="qbbBigDot" src="@/assets/screen/xtb/qbbdot.png" alt="">
<div>信息模板<span v-if="selectedSize">[{{ selectedSize }}]</span></div>
<div>信息模板<span v-if="selectedSize">{{ selectedSize }}</span></div>
</div>
<img class="qbbBigDotBa" src="@/assets/screen/xtb/qbba.png" alt="">
<!-- <span>信息模板</span>
<span v-if="form.selectedPixel"> {{ form.selectedPixel }}</span> -->
</div>
<div class="controlBox">
<el-button type="primary" @click="____onAddTemplate">添加模板</el-button>
<el-button class="btnInfoBoard" type="add" @click="____onAddTemplate">添加模板</el-button>
</div>
</div>
<div class="partCon">
@ -168,34 +171,12 @@ import infoBoardUtils from "@screen/utils/infoBoard.js"
import testDeviceList from "@screen/testData/deviceList.js"
import testDeviceInfo from "@screen/testData/infoBoard.js"
//
export const deepClone = data => {
//
var type = typeof data
var obj
if (type === 'array') {
obj = []
} else if (type === 'object') {
obj = {}
} else {
//
return data
}
if (type === 'array') {
for (var i = 0, len = data.length; i < len; i++) {
obj.push(deepClone(data[i]))
}
} else if (type === 'object') {
for (var key in data) {
obj[key] = deepClone(data[key])
}
}
return obj
}
import WgtTitle from "@screen/pages/perception/widgets/title";
export default {
name: 'Device',
components: {
WgtTitle,
BoardInfoEditor,
editInfo,
BoardPreview,
@ -255,7 +236,8 @@ export default {
tpl: {}
},
scrollOptions,
boardItemEdtingIndex: -1
boardItemEdtingIndex: -1,
isHideCtt:false
}
},
watch: {
@ -442,16 +424,22 @@ export default {
if (IS_TESTING) {
this.selectedBdMsg = [];
this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content);
} else{
if (!deviceFrom.iotDeviceId) {
this.$message.warning("该设备缺少iotDeviceId字段!")
return;
}
this.selectedBdMsg = [];
getBoardDeviceInfo(deviceFrom.iotDeviceId).then(res => {
this.selectedBdMsg = res.data["3A"].content;
this.isHideCtt = true;
this.$nextTick(()=>{
this.isHideCtt = false;
})
}).catch(err => {
})
@ -1085,7 +1073,6 @@ export default {
}
</script>
<style lang="scss" scoped>
.direction{
::v-deep .el-input{
.el-input__inner{
@ -1152,6 +1139,15 @@ export default {
.templateBox {
width: 100%;
height: 100%;
transition: all linear 0.3s;
opacity: 1;
transform:translateX(0);
&.hide{
transform:translateX(20px);
opacity: 0;
transition: all linear 0.3s;
}
.tplItem {
margin-right: 14px;
@ -1184,15 +1180,15 @@ export default {
height: 40px;
&.btnApply {
background-image: url(~@/assets/jihe/images/button/toLeft.png);
background-image: url(~@/assets/jihe/images/button/toLeft.svg);
}
&.btnEdit {
background-image: url(~@/assets/jihe/images/button/edit.png);
background-image: url(~@/assets/jihe/images/button/edit.svg);
}
&.btnDelete {
background-image: url(~@/assets/jihe/images/button/delete.png);
background-image: url(~@/assets/jihe/images/button/delete.svg);
}
}
@ -1218,13 +1214,6 @@ export default {
}
.controlBox {
margin-top: 10px;
margin-bottom: 10px;
display: flex;
justify-content: center;
}
.el-collapse {
max-height: 100% !important;
overflow: auto;
@ -1352,12 +1341,6 @@ export default {
margin-left: 0px !important;
}
::v-deep .el-select .el-input .el-input__inner {
color: #fff;
background-color: #053b4f;
border-color: transparent;
}
::v-deep .el-collapse-item__header {
background-color: #053b4f;
color: #fff;
@ -1382,7 +1365,7 @@ export default {
}
::v-deep .el-checkbox__label {
color: #fff;
color: #ff0;
}
::v-deep .el-button--medium {

45
ruoyi-ui/src/views/JiHeExpressway/utils/moveable.js

@ -0,0 +1,45 @@
/**
*
* @param {HTMLElement} container
* @param {{ target: HTMLElement }} param1
*/
export function moveable(container, { target } = {}) {
if (!target) target = container;
target.style.cursor = "move";
/**
* @type { { clientX: number; clientY: number } }
*/
let lastPosition = { clientX: 0, clientY: 0 };
const down = (e) => {
const { clientX: x, clientY: y } = e;
const move = (e) => {
const { clientX, clientY } = e;
console.log(clientX, clientY, "move");
container.style.transform = `translate3d(${
clientX - x + lastPosition.clientX
}px, ${clientY - y + lastPosition.clientY}px, 0)`;
};
const up = (e) => {
const { clientX, clientY } = e;
lastPosition.clientX += clientX - x;
lastPosition.clientY += clientY - y;
document.removeEventListener("pointermove", move);
document.removeEventListener("pointerup", up);
};
document.addEventListener("pointermove", move);
document.addEventListener("pointerup", up);
};
target.addEventListener("pointerdown", down);
return () => target.removeEventListener("pointerdown", down);
}

6
ruoyi-ui/vue.config.js

@ -43,12 +43,12 @@ module.exports = {
// target: `http://10.168.73.36:8080`, // 周乐
// target: `http://10.168.77.209:8080`, // 刘朋
// target: `http://10.168.66.196:8080`, //刘文阁
// target: `http://10.168.56.206:8087`, //孟
target: `http://10.168.78.135:8087`, //孟
// target: `http://10.168.56.206:8087`, //孟
// target: `http://10.168.78.135:8087`, //孟
// target: `http://10.168.78.135:8087`,
// target: `http://10.0.81.202:8087`, //现场后台
// target: `http://10.0.81.204:8087`, //现场后台 刘文阁
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save