Browse Source

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

wangqin
zhangzhang 9 months ago
parent
commit
048a18d214
  1. 32
      ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue
  2. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue
  3. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  4. 1
      ruoyi-ui/vue.config.js

32
ruoyi-ui/src/views/JiHeExpressway/components/Descriptions.vue

@ -1,18 +1,11 @@
<template> <template>
<div class="Descriptions keep-ratio" origin="left" :style="getStyle()"> <div class="Descriptions keep-ratio" origin="left" :style="getStyle()">
<div <div class="item" v-for="(item, index) in getResolveList" :key="`${item.key || item.label}${index}`"
class="item" :style="[gridStyle(item, index), transformStyle(itemStyle)]">
v-for="(item, index) in getResolveList" <div class="text title" :style="{
:key="`${item.key || item.label}${index}`" ...transformStyle(titleStyle),
:style="[gridStyle(item, index), transformStyle(itemStyle)]" width: labelWidth,
> }">
<div
class="text title"
:style="{
...transformStyle(titleStyle),
width: labelWidth,
}"
>
<p> <p>
<slot :name="`title-${item.key || item.label}`" :data="item"> <slot :name="`title-${item.key || item.label}`" :data="item">
{{ item.label || "-" }} {{ item.label || "-" }}
@ -20,18 +13,9 @@
</p> </p>
: :
</div> </div>
<ContentText <ContentText :style="transformStyle(titleStyle)" class="content text" :data="data" :_config="item">
:style="transformStyle(titleStyle)"
class="content text"
:data="data"
:_config="item"
>
<template #default="{ value }"> <template #default="{ value }">
<slot <slot :name="`content-${item.key || item.label}`" :value="value" :data="item">
:name="`content-${item.key || item.label}`"
:value="value"
:data="item"
>
{{ value }} {{ value }}
</slot> </slot>
</template> </template>

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

@ -7,19 +7,11 @@
<Descriptions :list="list" :data="data" style="gap: 18px"> <Descriptions :list="list" :data="data" style="gap: 18px">
<template #content-deviceName> <template #content-deviceName>
<span>{{ dialogData.deviceName || "-" }}</span> <span>{{ dialogData.deviceName || "-" }}</span>
<img <img @click="controlDialogVisible = true" v-if="[0, '0'].includes(
@click="controlDialogVisible = true" dialogData.parseOtherConfig &&
v-if=" dialogData.parseOtherConfig.ptzCtrl
[0, '0'].includes( )
dialogData.parseOtherConfig && " src="@screen/images/camera-control-icon.svg" width="18px" height="18px" style="cursor: pointer" />
dialogData.parseOtherConfig.ptzCtrl
)
"
src="@screen/images/camera-control-icon.svg"
width="18px"
height="18px"
style="cursor: pointer"
/>
</template> </template>
</Descriptions> </Descriptions>
</ElTabPane> </ElTabPane>
@ -33,10 +25,7 @@
</div> </div>
</div> </div>
<CameraControlDialog <CameraControlDialog :deviceId="dialogData.iotDeviceId" v-model="controlDialogVisible" />
:deviceId="dialogData.iotDeviceId"
v-model="controlDialogVisible"
/>
</Dialog> </Dialog>
</template> </template>
@ -79,14 +68,14 @@ export default {
label: "道路名称", label: "道路名称",
key: "roadName", key: "roadName",
}, },
{ // {
label: "设备编号", // label: "",
key: "deviceCode", // key: "deviceCode",
}, // },
{ // {
label: "所属机构", // label: "",
key: "organizationName", // key: "organizationName",
}, // },
{ {
label: "设备桩号", label: "设备桩号",
key: "stakeMark", key: "stakeMark",
@ -126,6 +115,7 @@ export default {
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName; if (roadInfo) this.data.roadName = roadInfo.roadName;
console.log(this.data, "this.data");
}, },
methods: { methods: {
visibleClose(bool) { visibleClose(bool) {
@ -190,7 +180,7 @@ export default {
align-items: center; align-items: center;
justify-content: end; justify-content: end;
> div { >div {
font-size: 16px; font-size: 16px;
padding: 6px 12px; padding: 6px 12px;
} }

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

@ -102,6 +102,13 @@ export class MarkerCluster {
"font-size:15px; background:#6f5757; color:#b39b9b;", "font-size:15px; background:#6f5757; color:#b39b9b;",
this.infoWindow this.infoWindow
); );
//data.length 大于 5 取前5个数, 否则直接返回data
const pageSize = 6;
let pageNum = 1;
const dataFisrtPage =
data.length > pageSize
? data.slice((pageNum - 1) * pageSize, pageSize)
: data;
this.infoWindow.setContent(`<div this.infoWindow.setContent(`<div
style=" style="
@ -119,7 +126,7 @@ export class MarkerCluster {
<img class="info-close" style="width: 12px;cursor: pointer;" src="${require("@screen/images/dialog/icon-close.svg")}" /> <img class="info-close" style="width: 12px;cursor: pointer;" src="${require("@screen/images/dialog/icon-close.svg")}" />
</div> </div>
<div style="padding: 15px 9px;flex: 1; overflow: auto;" class="info-window-content"> <div style="padding: 15px 9px;flex: 1; overflow: auto;" class="info-window-content">
${data ${dataFisrtPage
.map( .map(
(item) => ` (item) => `
<div style="cursor: pointer; padding: 3px 6px;display: flex;align-items: center; gap: 6px;" class="info-window-item"> <div style="cursor: pointer; padding: 3px 6px;display: flex;align-items: center; gap: 6px;" class="info-window-item">

1
ruoyi-ui/vue.config.js

@ -54,6 +54,7 @@ module.exports = {
// target: `http://10.168.78.135:8087`, //王钦 // target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2 // target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.68.42:8087`, //王思祥 target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟 // target: `http://10.168.65.156:8097`, //孟
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {

Loading…
Cancel
Save