Browse Source

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

wangqin
zhangzhang 8 months ago
parent
commit
ddb01d31fe
  1. 33
      ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue
  2. 8
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceControlDialog.vue
  4. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFilter/index.vue
  5. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue
  6. 34
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  7. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue
  8. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue
  9. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue
  10. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue
  11. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue
  12. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/index.vue
  13. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  14. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue
  15. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue
  16. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/sensors.vue
  17. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/service/InformationReleaseManagement/index.vue
  18. 286
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue
  19. 5
      ruoyi-ui/src/views/JiHeExpressway/utils/enum/common.js

33
ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue

@ -1,40 +1,23 @@
<template>
<Teleport>
<Transition name="fade">
<div
:class="['mask-layer', { 'none-mask': noneMask }]"
v-if="modelVisible"
>
<BackgroundClip
class="dialog"
<div :class="['mask-layer', { 'none-mask': noneMask }]" v-if="modelVisible">
<BackgroundClip class="dialog"
clipPath="polygon(calc(100% - var(--clip-width)) 0, 100% var(--clip-width), 100% 100%, var(--clip-width) 100%, 0 calc(100% - var(--clip-width)), 0 0)"
borderColor="linear-gradient(180deg, rgba(78, 174, 204, .9), rgba(78, 174, 204, 0))"
bgColor="linear-gradient(180deg, rgba(14, 69, 92, 0.9) 0%, rgba(20, 89, 119, 0.9) 100%)"
ref="DialogContentRef"
:width="width"
:top="top"
>
ref="DialogContentRef" :width="width" :top="top">
<div class="dialog-title">
<img
class="title-icon"
src="@screen/images/dialog/title-icon.svg"
/>
<img class="title-icon" src="@screen/images/dialog/title-icon.svg" />
<span>{{ title }}</span>
<img
class="icon-close"
@click.stop="modelVisible = false"
src="@screen/images/dialog/icon-close.svg"
/>
<img class="icon-close" @click.stop="modelVisible = false" src="@screen/images/dialog/icon-close.svg" />
</div>
<div class="dialog-content">
<slot />
</div>
<img
class="bottom-right"
src="@screen/images/dialog/right-bottom.svg"
/>
<img class="bottom-right" src="@screen/images/dialog/right-bottom.svg" />
<div class="footer" v-if="$slots.footer">
<slot name="footer"></slot>
@ -130,7 +113,7 @@ export default {
height: 100%;
background: rgba(0, 0, 0, 0.36);
border-radius: 0px 0px 0px 0px;
z-index: 100;
z-index: 1100;
// display: flex;
// align-items: center;
// justify-content: center;
@ -224,7 +207,7 @@ export default {
padding: 0 27px;
::v-deep {
> div {
>div {
min-width: 96px;
}
}

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

@ -160,19 +160,17 @@ export default {
handleResetForm() {
if(this.params && this.types == 'input'){
this.value = "";
return
}
// this.visible = true;
this.$refs.FormConfigRef?.reset();
this.$refs.FormConfigRef.$refs.ElFormRef.resetFields();
this.$refs.FormConfigRef?.$refs.ElFormRef.resetFields();
// this.$refs.PopoverRef.doClose();
this.$emit(
"handleSearch",
cloneDeep(this.$refs.FormConfigRef?.formData),
"reset"
);
);
},
async handleSearch(value) {
if (this.types === "input") {

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

@ -25,7 +25,7 @@
<Table :data="tableData">
<ElTableColumn prop="ds" label="段数"></ElTableColumn>
<ElTableColumn prop="time" width="120" label="时间(秒)">
<ElTableColumn prop="time" width="120" label="时间(秒)">
<template slot-scope="scope">
<div style="display: flex">
<el-input-number

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

@ -33,6 +33,7 @@ import { merge, cloneDeep, find } from "lodash";
import request from "@/utils/request";
import { log } from "mathjs";
import { ChildTypes } from "@screen/utils/enum.js"
import { initSearch } from "@screen/utils/enum/common.js"
const DeviceTypeIds = [1, 2];
export default {
@ -128,7 +129,7 @@ export default {
async handleResetForm() {
this.$refs.FormConfigRef?.reset();
this.activeIcon = "filter";
this.filterEnd(null);
this.filterEnd(initSearch);
},
async handleSearch() {
const data = await this.$refs.FormConfigRef.validate();

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

@ -34,6 +34,7 @@ import { markerClusterIns } from "@screen/pages/Home/components/RoadAndEvents/ut
import { ChildTypes } from "@screen/utils/enum.js"
import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { delay } from "@screen/utils/common";
import { initSearch } from "@screen/utils/enum/common.js"
import { DeviceForMap } from "@screen/pages/Home/components/RoadAndEvents/utils/buttonEvent"
const DeviceTopics = {}
@ -112,7 +113,7 @@ export default {
},
},
key: "startStakeMark[0]",
default: "55",
default: initSearch.startStakeMark[0],
rules: [
{
message: "请补全桩号",
@ -140,7 +141,7 @@ export default {
color: "#3DE8FF",
},
},
default: "378",
default: initSearch.startStakeMark[1],
key: "startStakeMark[1]",
ons: { //on element
change(value, ...args) {
@ -163,7 +164,7 @@ export default {
},
},
key: "endStakeMark[0]",
default: "208",
default: initSearch.endStakeMark[0],
rules: [
{
message: "请补全桩号",
@ -190,7 +191,7 @@ export default {
color: "#3DE8FF",
},
},
default: "153",
default: initSearch.endStakeMark[1],
key: "endStakeMark[1]",
ons: { //on element
change(value, ...args) {

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

@ -112,49 +112,50 @@ export class MarkerCluster {
window.pageSize = pageSize;
window.page = page;
window.totalPages = totalPages;
let num = (page - 1) * pageSize;
function renderData(page) {
if (page < 1 || page > totalPages) return;
window.page = page;
const pageSize = window.pageSize;
const dataContainer = document.getElementById("dataContainer");
const dataPage = document.getElementById("dataPage");
// 清空数据容器
// dataContainer.innerHTML = "";
// 计算当前页起始索引和结束索引
const startIndex = (page - 1) * pageSize;
const endIndex = startIndex + pageSize;
let num = (page - 1) * pageSize;
// 截取当前页的数据
const currentPageData = data.slice(startIndex, endIndex);
window.currentPageData = currentPageData;
const itemsTpl = currentPageData
.map(
(item) => `
.map((item) => {
return `
<div style="cursor: pointer; padding: 3px 6px;display: flex;align-items: center; gap: 6px;" class="info-window-item">
<img style="width: 18px;" src="${getIcon(item)}" />
<span>${
${++num}<img style="width: 18px;" src="${getIcon(item)}" />
<span style="white-space: nowrap; word-break: break-all;">${(
item.extData.deviceName ||
item.extData.warningTitle ||
item.config?.item.title
}</span>
).replace("G35 ", "")}</span>
</div>
`
)
`;
})
.join("");
// 渲染当前页数据
dataContainer.innerHTML = itemsTpl;
dataPage.innerHTML = `${page}`;
bindItemClick();
}
window.renderData = renderData;
// min-width: 240px;
// min-height: 90px;
// width: 90px;
this.infoWindow.setContent(`<div
style="
min-width: 240px;
min-height: 90px;
width: 90px;
display: flex;
flex-direction: column;
position: relative;
@ -170,12 +171,12 @@ export class MarkerCluster {
.map(
(item) => `
<div style="cursor: pointer; padding: 3px 6px;display: flex;align-items: center; gap: 6px;" class="info-window-item">
<img style="width: 18px;" src="${getIcon(item)}" />
<span>${
${++num} <img style="width: 18px;" src="${getIcon(item)}" />
<span style="white-space: nowrap; word-break: break-all;">${(
item.extData.deviceName ||
item.extData.warningTitle ||
item.config?.item.title
}</span>
).replace("G35 ", "")}</span>
</div>
`
)
@ -186,6 +187,7 @@ export class MarkerCluster {
? `
<div id="paginationContainer" style="text-align:center;margin-bottom:5px;">
<button style="padding: 0 15px;background: #00B3CC;border-radius: 48px;cursor: pointer;opacity: 1;gap: 6px;font-size: 14px;font-weight: 500;color: #FFFFFF;border: 1px solid rgba(42, 217, 253, 0.6);" onclick="renderData(window.page-1)">上一页</button>
<span id="dataPage" style="font-size: 14px;font-weight: 500;color: #FFFFFF;"> 第${page} </span>
<button style="padding: 0 15px;background: #00B3CC;border-radius: 48px;cursor: pointer;opacity: 1;gap: 6px;font-size: 14px;font-weight: 500;color: #FFFFFF;border: 1px solid rgba(42, 217, 253, 0.6);" onclick="renderData(window.page+1)">下一页</button>
</div>`
: ""

17
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue

@ -32,7 +32,7 @@
<p
v-for="(item, index) in dayShift"
:key="`${item.id}_${index}`"
@click="removeDutyPerson(item)"
@click="removeDutyPerson(item,'dayShift')"
>
{{ item.name }}
</p>
@ -46,7 +46,7 @@
<p
v-for="(item, index) in graveyardShift"
:key="`${index}_${item.id}`"
@click="removeDutyPerson(item)"
@click="removeDutyPerson(item,'graveyardShift')"
>
{{ item.name }}
</p>
@ -138,6 +138,13 @@ export default {
return this.visible;
},
set(bool) {
//,
if(!bool) {
this.dayShift = [];
this.graveyardShift = [];
this.peopleList = [];
}
this.$emit("close", bool);
},
},
@ -176,7 +183,9 @@ export default {
this[this.active].push(item);
},
removeDutyPerson(item) {
removeDutyPerson(item, activeCheck) {
if(activeCheck != this.active) return;
const index = this[this.active].findIndex(
(_item) => _item.id === item.id
);
@ -274,7 +283,7 @@ export default {
// console.log("%c [ data ]-202-ModifyDutyInformationTable.vue", "font-size:15px; background:#9afce6; color:#deffff;", data, this.value2);
const closeMessage = loadingMessage({
message: "正在保存值班信息111...",
message: "正在保存值班信息...",
});
if (!this.data) {

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/index.vue

@ -26,7 +26,7 @@
</template>
新增
</ButtonGradient>
<ButtonGradient @click.native="setCurrentPage(1)">
<ButtonGradient @click.native="onRefreshForm">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
@ -35,6 +35,7 @@
</div>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '100px' }"
@ -227,6 +228,10 @@ export default {
this.getOptions();
},
methods: {
onRefreshForm(){
this.$refs.searchComp.handleResetForm();
this.setCurrentPage(1);
},
async getOptions() {
const result = await getSelectOptionsStation(2);

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue

@ -14,7 +14,7 @@
</template>
导出
</ButtonGradient>
<ButtonGradient @click.native="setCurrentPage(1)">
<ButtonGradient @click.native="onRefreshForm">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
@ -23,6 +23,7 @@
</div>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '90px' }"
@ -148,6 +149,10 @@ export default {
this.getVehicleTypeList();
},
methods: {
onRefreshForm(){
this.$refs.searchComp.handleResetForm();
this.setCurrentPage(1);
},
getVehicleTypeList() {
if (this.vehicleTypeList.length) return;

10
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue

@ -14,7 +14,7 @@
</template>
导出
</ButtonGradient>
<ButtonGradient @click.native="setCurrentPage(1)">
<ButtonGradient @click.native="onRefreshForm">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
@ -22,7 +22,10 @@
</ButtonGradient>
</div>
<!-- formList是UI配置 -->
<!-- params是字段名 -->
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '72px' }"
@ -95,6 +98,10 @@ export default {
this.getSearchOptions();
},
methods: {
onRefreshForm(){
this.$refs.searchComp.handleResetForm();
this.setCurrentPage(1);
},
async handleDelete(data) {
await confirm({ message: "是否要删除该人员?" });
@ -156,7 +163,6 @@ export default {
});
},
handleSearch(data) {
console.log(88888, data);
this.searchData = data;
this.getData();
},

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/index.vue

@ -14,7 +14,7 @@
</template>
导出
</ButtonGradient>
<ButtonGradient @click.native="getData">
<ButtonGradient @click.native="onRefreshForm">
<template #prefix>
<img src="@screen/images/refresh.svg" />
</template>
@ -23,6 +23,7 @@
</div>
<InputSearch
ref="searchComp"
style="width: 402px;"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '90px' }"
@ -135,6 +136,10 @@ export default {
// this.getSearchOptions();
},
methods: {
onRefreshForm(){
this.$refs.searchComp.handleResetForm();
this.setCurrentPage(1);
},
getSearchData() {
const result = {
...this.searchData,

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/dispatch/index.vue

@ -2,7 +2,7 @@
<div class="RoadNetworkMonitoring">
<!-- 搜索栏 -->
<div class="filter">
<ButtonGradient @click="onRefresh" class="refresh-btn">
<ButtonGradient @click="onRefreshForm" class="refresh-btn">
<template #prefix>
<img src="./images/refresh.svg" />
</template>
@ -10,6 +10,7 @@
</ButtonGradient>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }"
@ -103,6 +104,10 @@ export default {
this.initData();
},
methods: {
onRefreshForm(){
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
initData() {
request({
// url: `/dc/system/event/dispatchEventList`,

12
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

@ -27,7 +27,7 @@
</ButtonGradient>
</div>
<InputSearch style="width: 402px" :formList="searchFormList" @handleSearch="handleSearch" />
<InputSearch ref="searchComp" style="width: 402px" :formList="searchFormList" @handleSearch="handleSearch" />
</div>
<!-- 内容 -->
@ -212,10 +212,12 @@ export default {
}
},
onRefresh() {
this.data = [];
setTimeout(() => {
this.getData();
}, 100);
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
// this.data = [];
// setTimeout(() => {
// this.getData();
// }, 100);
},
onSizeChange(pageSize) {
this.searchData.pageSize = pageSize;

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue

@ -17,7 +17,7 @@
刷新
</ButtonGradient>
</div>
<InputSearch style="width: 402px;" :formList="searchFormList" :formConfigOptions="{}"
<InputSearch ref="searchComp" style="width: 402px;" :formList="searchFormList" :formConfigOptions="{}"
@handleSearch="handleSearch" />
</div>
@ -119,7 +119,9 @@ export default {
this.initData();
},
onRefresh() {
this.initData();
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
// this.initData();
},
onAdd() {
this.detail = {}

17
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue

@ -18,6 +18,7 @@
</div>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }"
@ -88,6 +89,7 @@ export default {
pageSize: 16,
pageNum: 1,
searchData: {
pageNum: 1,
warningSource: "6",
},
};
@ -101,7 +103,10 @@ export default {
this.$message.warning("待开发");
},
//
onRefresh() {},
onRefresh() {
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
initData() {
perceivedEventsList(this.searchData, this.pageNum, this.pageSize).then(
(res) => {
@ -147,13 +152,9 @@ export default {
firstBtnClick(id) {},
handleSearch(data) {
console.log("data", data);
this.searchData = {
...this.searchData,
warningType: data.warningType,
startTime: data.warningTime[0],
completeTime: data.warningTime[1],
};
this.searchData.warningType = data.warningType;
this.searchData.startTime = data.warningTime && data.warningTime[0];
this.searchData.completeTime = data.warningTime && data.warningTime[1];
this.initData();
},
},

12
ruoyi-ui/src/views/JiHeExpressway/pages/datav/roadNet/sensors.vue

@ -7,7 +7,7 @@
<script>
import { Graph, Node, Point } from '@antv/x6'
import { mapState } from 'vuex';
export default {
name: 'sensors',
data(){
@ -17,6 +17,16 @@ export default {
},
components: {
},
computed:{
...mapState("menu", ["isRecentOpen"])
},
watch:{
isRecentOpen(newV){
setTimeout(()=>{
this.refresh();
}, 500)
}
},
mounted(){
this.refresh();
window.addEventListener("resize",

7
ruoyi-ui/src/views/JiHeExpressway/pages/service/InformationReleaseManagement/index.vue

@ -1,5 +1,5 @@
<template>
<div class='InformationReleaseManagement'>
<div class='info_publish'>
<AuditLists class="card" />
<AuditDetails class="card" />
</div>
@ -19,10 +19,11 @@ export default {
</script>
<style lang='scss' scoped>
.InformationReleaseManagement {
.info_publish{
height: 100%;
padding: 24px;
display: grid;
gap: 36px;
gap: 30px;
grid-template-columns: 0.42fr 1fr;
.card {

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

@ -9,55 +9,47 @@
<!-- <img class="qbbBigDotBa" src="@/assets/screen/xtb/qbba.png" alt=""> -->
<!-- </div> -->
<WgtTitle :title="'情报板列表'"></WgtTitle>
<el-form
:model="form"
class="formSearch" size="mini"
>
<!-- class="partCon" -->
<!-- style="display: flex; flex-direction: column" -->
<!-- ref="form" -->
<el-form :model="form" class="formSearch" size="mini">
<!-- class="partCon" -->
<!-- style="display: flex; flex-direction: column" -->
<!-- ref="form" -->
<el-form-item>
<el-col :span="12">
<el-select
v-model="form.selectedDirection"
size="medium"
placeholder="请选择方向"
class="direction"
>
<el-option
v-for="item in boardDirectionList"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
/>
<!-- @click.native="____changeDirection(item.dictValue)" -->
<el-select v-model="form.selectedDirection" size="medium" placeholder="请选择方向" class="direction">
<el-option v-for="item in boardDirectionList" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue" />
<!-- @click.native="____changeDirection(item.dictValue)" -->
</el-select>
</el-col>
<el-col :span="11" :offset="1">
<el-checkbox-group v-model="form.status" style="height:26px">
<el-checkbox label="1">在线</el-checkbox>
<el-checkbox label="0">离线</el-checkbox>
</el-checkbox-group>
<el-checkbox-group v-model="form.status" style="height:26px">
<el-checkbox label="1">在线</el-checkbox>
<el-checkbox label="0">离线</el-checkbox>
</el-checkbox-group>
</el-col>
</el-form-item>
<el-form-item label="开始桩号:">
<el-col :span="2" class="text-center tc-lb">K</el-col>
<el-col :span="7">
<el-input-number v-model="form.stakeFrom[0]" style="width: 100%;" :precision="0" :min="0" :max="1000"></el-input-number>
<el-input-number v-model="form.stakeFrom[0]" style="width: 100%;" :precision="0" :min="0"
:max="1000"></el-input-number>
</el-col>
<el-col :span="2" class="text-center tc-lb">+</el-col>
<el-col :span="7">
<el-input-number v-model="form.stakeFrom[1]" style="width: 100%;" :precision="0" :min="0" :max="1000"></el-input-number>
<el-input-number v-model="form.stakeFrom[1]" style="width: 100%;" :precision="0" :min="0"
:max="1000"></el-input-number>
</el-col>
</el-form-item>
<el-form-item label="结束桩号:">
<el-col :span="2" class="text-center tc-lb">K</el-col>
<el-col :span="7">
<el-input-number v-model="form.stakeTo[0]" style="width: 100%;" :precision="0" :min="0" :max="1000"></el-input-number>
<el-input-number v-model="form.stakeTo[0]" style="width: 100%;" :precision="0" :min="0"
:max="1000"></el-input-number>
</el-col>
<el-col :span="2" class="text-center tc-lb">+</el-col>
<el-col :span="7">
<el-input-number v-model="form.stakeTo[1]" style="width: 100%;" :precision="0" :min="0" :max="1000"></el-input-number>
<el-input-number v-model="form.stakeTo[1]" style="width: 100%;" :precision="0" :min="0"
:max="1000"></el-input-number>
</el-col>
</el-form-item>
<el-form-item style="display: flex; justify-content: center;">
@ -67,55 +59,35 @@
</el-form>
<div style="flex:1; height: 0; padding:0 10px 10px">
<vuescroll :ops="scrollOptions">
<el-collapse
v-model="selectedSize"
accordion
@change="____onChangeSize"
style="margin-right: 20px"
>
<el-collapse-item
v-for="(item, key) in boardSizeDic"
:key="key"
:title="item.label"
:name="key"
>
<el-collapse v-model="selectedSize" accordion @change="____onChangeSize" style="margin-right: 20px">
<el-collapse-item v-for="(item, key) in boardSizeDic" :key="key" :title="item.label" :name="key">
<div v-if="item.list.length > 0">
<el-checkbox-group
class="deviceList"
v-model="checkedDeviceIds"
@change="____onSelectDevices"
>
<el-checkbox
v-for="(itm, index) in item.list"
:label="itm.iotDeviceId"
:key="index"
:disabled="!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null"
>
<el-tooltip content="设备未接入" placement="top" v-if="!itm.iotDeviceId || itm.iotDeviceId.includes('null_')">
<el-checkbox-group class="deviceList" v-model="checkedDeviceIds" @change="____onSelectDevices">
<el-checkbox v-for="(itm, index) in item.list" :label="itm.iotDeviceId" :key="index"
:disabled="!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null">
<el-tooltip content="设备未接入" placement="top"
v-if="!itm.iotDeviceId || itm.iotDeviceId.includes('null_')">
<div class="title">{{ itm.deviceName }}</div>
</el-tooltip>
<el-tooltip content="设备离线" placement="top" v-else-if="itm.deviceState == 0 || itm.deviceState == null">
<el-tooltip content="设备离线" placement="top"
v-else-if="itm.deviceState == 0 || itm.deviceState == null">
<div class="title">{{ itm.deviceName }}</div>
</el-tooltip>
<div v-else class="title">{{ itm.deviceName }}</div>
<el-tooltip :content="(itm.deviceState == 0 || itm.deviceState == null) ? '离线' : '在线'" placement="top">
<img src="@/assets/jihe/images/offline.svg" class="state" v-if="itm.deviceState=='0' || itm.deviceState==null">
<el-tooltip :content="(itm.deviceState == 0 || itm.deviceState == null) ? '离线' : '在线'"
placement="top">
<img src="@/assets/jihe/images/offline.svg" class="state"
v-if="itm.deviceState == '0' || itm.deviceState == null">
<img src="@/assets/jihe/images/online.svg" class="state" v-else>
</el-tooltip>
<el-tooltip content="回读" placement="top">
<el-button
class="el-icon-tickets huiduButton"
@click.stop.prevent="____forkDeviceInfo(itm)"
:disabled="submitButton"
></el-button>
<el-button class="el-icon-tickets huiduButton" @click.stop.prevent="____forkDeviceInfo(itm)"
:disabled="submitButton"></el-button>
</el-tooltip>
</el-checkbox>
</el-checkbox-group>
</div>
<div
v-else
style="color: #fff; text-align: center; line-height: 60px"
>
<div v-else style="color: #fff; text-align: center; line-height: 60px">
暂无数据
</div>
</el-collapse-item>
@ -128,20 +100,10 @@
<!-- <WgtTitle :title="'待下发信息'"></WgtTitle> -->
<WgtTitle :title="`待下发信息 ${selectedSize ? selectedSize : ''}`">
<div class="titleBtnBox">
<el-button
class="btnInfoBoard"
type="add"
:disabled="!selectedSize"
@click.native="____onAddDeviceItem()"
>添加信息</el-button
>
<el-button
class="btnInfoBoard"
type="publish"
@click="____onPublish"
:disabled="selectedBdMsg.length <= 0 || selectedDevices.length <=0"
>发布信息</el-button
>
<el-button class="btnInfoBoard" type="add" :disabled="!selectedSize"
@click.native="____onAddDeviceItem()">添加信息</el-button>
<el-button class="btnInfoBoard" type="publish" @click="____onPublish"
:disabled="selectedBdMsg.length <= 0 || selectedDevices.length <= 0">发布信息</el-button>
</div>
</WgtTitle>
<!-- <div class="partTitle partDeviceTempateTitle">
@ -162,45 +124,23 @@
</div> -->
<div class="partCon">
<!-- {{ selectedBdMsg }} -->
<vuescroll
:ops="scrollOptions"
class="templateBox"
v-if="selectedBdMsg.length > 0"
:class="{ hide: isHideCtt }"
>
<div
v-for="(itm, indx) in selectedBdMsg"
:key="indx"
class="tplItem"
>
<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>
<BoardPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardPreview>
<!-- 操作按钮 -->
<div class="infoBtnBox">
<el-tooltip content="编辑" placement="top">
<p
@click="____onEditBoardItem(itm, indx)"
class="btn btnEdit"
></p>
<p @click="____onEditBoardItem(itm, indx)" class="btn btnEdit"></p>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<p
@click="____onDeleteBoardItem(indx)"
class="btn btnDelete"
></p>
<p @click="____onDeleteBoardItem(indx)" class="btn btnDelete"></p>
</el-tooltip>
</div>
</div>
</vuescroll>
<Empty
v-else
text="请从设备回读或从模板添加信息..."
style="padding-top: 100px"
></Empty>
<Empty v-else text="请从设备回读或从模板添加信息..." style="padding-top: 100px"></Empty>
</div>
</div>
<!-- ++++++++++右边部分信息模板++++++++++ -->
@ -219,29 +159,17 @@
</div> -->
<WgtTitle :title="`信息模板 ${selectedSize ? selectedSize : ''}`">
<div class="titleBtnBox">
<el-button
class="btnInfoBoard"
type="add"
@click="____onAddTemplate"
>添加模板</el-button
>
<el-button class="btnInfoBoard" type="add" @click="____onAddTemplate">添加模板</el-button>
</div>
</WgtTitle>
<div class="partCon">
<vuescroll :ops="scrollOptions" class="templateBox">
<div
v-for="(item, index) in templateAvailable"
:key="item.dictValue"
>
<div v-for="(item, index) in templateAvailable" :key="item.dictValue">
<!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<!-- 模板内容 -->
<BoardTplPreview
class="boardPreview"
:boardWH="selectedSize"
:tpl="itm"
></BoardTplPreview>
<BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview>
<!-- <div class="infoPreview">
<div class="infoBox" :style="____boardBgStyle">
<span class="infoTxt" :style="____boardTxtStyle(itm)" v-html="itm.content.replace(/\n|\r\n/g, '<br>').replace(/ /g, '&nbsp')"></span>
@ -250,22 +178,14 @@
<!-- 操作按钮 -->
<div class="infoBtnBox">
<el-tooltip content="加入待下发信息" placement="top">
<p
@click="____onTplToDevice(itm, false)"
:class="
disabledButton && !selectedSize ? 'disabledClass' : ''
"
class="btn btnApply"
></p>
<p @click="____onTplToDevice(itm, false)" :class="disabledButton && !selectedSize ? 'disabledClass' : ''
" class="btn btnApply"></p>
</el-tooltip>
<el-tooltip content="编辑" placement="top">
<p @click="____onEditTemplate(itm)" class="btn btnEdit"></p>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<p
@click="____onDeleteTemplate(itm)"
class="btn btnDelete"
></p>
<p @click="____onDeleteTemplate(itm)" class="btn btnDelete"></p>
</el-tooltip>
</div>
</div>
@ -274,21 +194,12 @@
</div>
</div>
</div>
<el-dialog
title="提示"
:visible.sync="arrowRightVisible"
width="20%"
:before-close="dialogClose"
>
<el-dialog title="提示" :visible.sync="arrowRightVisible" width="20%" :before-close="dialogClose">
<el-row>
<el-col :span="18">
<el-select v-model="toRightCategory" placeholder="请选择所属类别">
<el-option
v-for="item in tplCategory"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
>
<el-option v-for="item in tplCategory" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-col>
@ -299,14 +210,8 @@
</el-col>
</el-row>
</el-dialog>
<BoardInfoEditor
@afterSubmit="____onEditSubmit"
:mode="editDialog.mode"
:type="editDialog.type"
:visible.sync="editDialog.visible"
:screenSize="selectedSize"
:tpl="editDialog.tpl"
></BoardInfoEditor>
<BoardInfoEditor @afterSubmit="____onEditSubmit" :mode="editDialog.mode" :type="editDialog.type"
:visible.sync="editDialog.visible" :screenSize="selectedSize" :tpl="editDialog.tpl"></BoardInfoEditor>
<!-- <editInfo :boardEmitItem="this.boardEmitItem" @receiveForm="receiveForm" v-if="this.showEmit" @dialogClose="dialogClose"></editInfo> -->
</div>
</template>
@ -336,6 +241,7 @@ import testDeviceInfo from "@screen/testData/infoBoard.js";
import WgtTitle from "@screen/pages/perception/widgets/title";
import InfoBoard from "@screen/mixins/InfoBoard";
import { initSearch } from "@screen/utils/enum/common.js"
export default {
name: "Device",
@ -519,18 +425,18 @@ export default {
this.____getIotBoard();
},
____onSearchDevice(){
____onSearchDevice() {
this.____getIotBoard();
},
____resetForm(){
____resetForm() {
this.form = {
selectedDirection: "",
status: ["0", "1"],
stakeFrom: [55, 378],
stakeTo: [208, 153]
stakeFrom: initSearch.startStakeMark,
stakeTo: initSearch.endStakeMark
}
},
____onResetSearchDevice(){
____onResetSearchDevice() {
this.____resetForm();
this.____initDirection();
this.____getIotBoard();
@ -548,10 +454,10 @@ export default {
let stakeFrom = this.form.stakeFrom[0] * 1000 + this.form.stakeFrom[1];
let stakeTo = this.form.stakeTo[0] * 1000 + this.form.stakeTo[1];
let statusForm = _.cloneDeep(this.form.status);
if(statusForm.includes("0")){
if (statusForm.includes("0")) {
statusForm.push(null)
}
}
if (IS_TESTING) {
let res = testDeviceList;
res.data.forEach((item) => {
@ -574,10 +480,10 @@ export default {
item.otherConfig = JSON.parse(item.otherConfig);
}
item.iotDeviceId = item.iotDeviceId || "null_" + item.id;
let stakeThis = +item?.stakeMark?.replace(/[K\+]/g, "") || -1;
if(stakeThis >= stakeFrom && stakeThis <= stakeTo && statusForm.includes(item.deviceState)){
if (stakeThis >= stakeFrom && stakeThis <= stakeTo && statusForm.includes(item.deviceState)) {
this.boardSizeDic[item.otherConfig.screenSize].list.push(item);
}
if (!this.selectedSize) {
@ -612,11 +518,11 @@ export default {
this.isHideCtt = false;
});
})
.catch((err) => {});
.catch((err) => { });
}
},
____onAddTemplate() {
// if(selectedSize){
// fontSize = "64px"
// }
@ -798,7 +704,7 @@ export default {
},
// form
receiveForm(form) {
receiveForm(form) {
console.log(form, "接收子组件form表单 修改");
this.contentList.splice(this.index_, 1, form);
this.$forceUpdate();
@ -812,11 +718,11 @@ export default {
if (this.checkedDeviceIds.length == 0) {
return;
}
this.selectedDevices = _.filter(this.boardSizeDic[this.selectedSize].list, (item)=>{
this.selectedDevices = _.filter(this.boardSizeDic[this.selectedSize].list, (item) => {
return this.checkedDeviceIds.includes(item.iotDeviceId)
});
// this.____forkDeviceInfo(this.selectedDevices);
},
@ -1037,11 +943,14 @@ export default {
};
</script>
<style lang="scss" scoped>
::v-deep .formSearch{
::v-deep .formSearch {
padding: 20px 20px 0;
.el-form-item__label{ color: #fff;}
.el-form-item__label {
color: #fff;
}
}
.direction {
::v-deep .el-input {
.el-input__inner {
@ -1050,8 +959,11 @@ export default {
}
}
}
.infoBoardBox {
width: 100%; height: 100%;
width: 100%;
height: 100%;
.infoBoardCon {
width: 100%;
height: 100%;
@ -1200,9 +1112,8 @@ export default {
}
.checkbox {
.boardLabel{
.boardLabel {}
}
// label {
// width: 100%;
// padding: 10px 0;
@ -1225,13 +1136,26 @@ export default {
padding-bottom: 0px;
}
.deviceList{
.deviceList {
::v-deep .el-checkbox__label {
display: flex !important;
justify-content: space-between;
width: 100%;
.title{ flex:1; width:0; overflow: hidden; text-overflow: ellipsis; word-break: keep-all;}
.state{ width: 18px; height: 18px; margin-right: 4px;}
.title {
flex: 1;
width: 0;
overflow: hidden;
text-overflow: ellipsis;
word-break: keep-all;
}
.state {
width: 18px;
height: 18px;
margin-right: 4px;
}
.huiduButton {
background: transparent;
border: none;
@ -1358,11 +1282,7 @@ export default {
background-color: #053b4f;
}
::v-deep
.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
background-color: #053b4f;
}

5
ruoyi-ui/src/views/JiHeExpressway/utils/enum/common.js

@ -0,0 +1,5 @@
//通用配置类
export const initSearch = {
startStakeMark: ["55", "378"],
endStakeMark: ["208", "153"],
};
Loading…
Cancel
Save