Browse Source

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

wangqin
刘朋 1 year ago
parent
commit
ca763efbf8
  1. 192
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index copy.vue
  2. 78
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  3. 10
      ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js
  4. 61
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js
  5. 45
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js
  6. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue
  7. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue
  8. 64
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
  9. 498
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  10. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  11. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  12. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsDay/assets/charts.js
  13. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/assets/charts2.js
  14. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/assets/charts3.js
  15. 53
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/assets/charts.js
  16. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts.js
  17. 3
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts3.js
  18. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js
  19. 15
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/monthStatistics/assets/charts.js
  20. 212
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/assets/charts.js
  21. 26
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/assets/charts.js

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

@ -0,0 +1,192 @@
<template>
<div class="from-content" style="width: 100%">
<div class="InputSearch input" v-if="params && types == 'input'">
<ElInput
style="width: 100%"
v-model="value"
:placeholder="placeholder"
@change="handleSearch"
></ElInput>
<img src="./search.svg" @click="handleFormShow" />
</div>
<ElPopover
v-else
ref="PopoverRef"
placement="bottom"
popper-class="global-input-search-popover"
:popperOptions="popperOptions"
:visibleArrow="false"
:width="this.width"
trigger="click"
@show="handleShow"
style="width: 100%"
>
<div class="InputSearch" slot="reference" ref="ReferenceInputRef">
<span>{{ placeholder }}</span>
<img src="./search.svg" @click="handleFormShow" />
</div>
<div style="width: 100%; max-height: 360px">
<slot>
<Form
v-if="formList && formList.length"
class="form"
ref="FormConfigRef"
:formList="formList"
v-bind="getFormConfigOptions"
/>
<!-- <ElEmpty v-else description="暂无搜索内容"></ElEmpty> -->
<div v-else class="no-data">暂无数据</div>
</slot>
<div class="footer">
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="handleResetForm"
>
重置
</Button>
<Button @click.native="handleSearch"> 搜索 </Button>
</div>
</div>
</ElPopover>
</div>
</template>
<script>
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import { cloneDeep } from "lodash";
export default {
name: "InputSearch",
components: {
Button,
Form,
},
props: {
type: {
type: String,
default: "form",
},
placeholder: {
type: String,
default: "请点击右侧图标筛选",
},
valueData: {
type: String,
},
params: {
type: String,
},
queryParams: {
type: Array,
},
formConfigOptions: {
type: Object,
default: null,
},
formList: {
type: Array,
default: () => [],
},
},
data() {
return {
types: this.type,
value: this.valueData,
width: null,
popperOptions: {
popHideCallBack: () => {
// console.log("---")
},
},
};
},
emit: ["handleSearch"],
computed: {
getFormConfigOptions() {
return {
column: "1",
labelWidth: "120px",
...this.formConfigOptions,
};
},
},
methods: {
handleFormShow() {
console.log(this.params, this.types);
if (this.params) {
if (this.types == "form") {
this.types = "input";
} else {
this.types = "form";
}
} else {
this.types = "form";
}
console.log(this.params, this.types);
},
handleShow() {
if (this.width) return;
this.width = this.$refs.ReferenceInputRef.getBoundingClientRect().width;
},
handleResetForm() {
this.$refs.FormConfigRef?.reset();
this.$refs.PopoverRef.doClose();
this.$emit("handleSearch", cloneDeep(this.$refs.FormConfigRef?.formData));
},
handleSearch() {
if (this.types == "form") {
this.$refs.FormConfigRef.validate()
.then((result) => {
this.$refs.PopoverRef.doClose();
this.$emit("handleSearch", result);
})
.catch((err) => {
console.log("catch");
});
} else {
let params = {};
params[this.params] = this.value;
this.$emit("handleSearch", params);
}
},
},
};
</script>
<style lang="scss" scoped>
.InputSearch {
width: 100%;
height: 26px;
background: linear-gradient(180deg, #005c79 0%, #009bcc 100%) !important;
color: #fff;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 3px 15px;
padding-right: 9px;
cursor: pointer;
font-size: 12px;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 14px;
}
.input ::v-deep .el-input__inner {
background: none;
height: auto !important;
font-size: 12px;
padding: 0px 0;
line-height: 14px;
}
::v-deep .el-input__inner::placeholder {
font-size: 12px;
}
</style>

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

@ -1,32 +1,42 @@
<template> <template>
<div class="from-content" style="width: 100%"> <div class="from-content" style="width: 100%">
<div class="InputSearch input" v-if="params && types == 'input'">
<ElInput
style="width: 100%"
v-model="value"
:placeholder="placeholder"
@change="handleSearch"
></ElInput>
<img src="./search.svg" @click="handleFormShow" />
</div>
<ElPopover <ElPopover
v-else
ref="PopoverRef" ref="PopoverRef"
placement="bottom" placement="bottom"
popper-class="global-input-search-popover" popper-class="global-input-search-popover"
:popperOptions="popperOptions" :popperOptions="popperOptions"
:visibleArrow="false"
:width="this.width" :width="this.width"
trigger="click" trigger="manual"
v-model="visible"
@show="handleShow" @show="handleShow"
style="width: 100%" style="width: 100%"
> >
<div class="InputSearch" slot="reference" ref="ReferenceInputRef"> <div
class="InputSearch input"
v-if="params && types == 'input'"
slot="reference"
ref="ReferenceInputRef"
>
<ElInput
style="width: 100%"
v-model="value"
:placeholder="placeholder"
@change="handleSearch"
></ElInput>
<img src="./search.svg" @click="visible = !visible" />
</div>
<div
class="InputSearch"
v-else
slot="reference"
ref="ReferenceInputRef"
@click="visible = !visible"
>
<span>{{ placeholder }}</span> <span>{{ placeholder }}</span>
<img src="./search.svg" @click="handleFormShow" /> <img src="./search.svg" />
</div> </div>
<div style="width: 100%; max-height: 360px"> <div style="width: 100%; max-height: 360px" v-show="visible">
<slot> <slot>
<Form <Form
v-if="formList && formList.length" v-if="formList && formList.length"
@ -93,6 +103,7 @@ export default {
}, },
data() { data() {
return { return {
visible: false,
types: this.type, types: this.type,
value: this.valueData, value: this.valueData,
width: null, width: null,
@ -113,20 +124,8 @@ export default {
}; };
}, },
}, },
methods: { methods: {
handleFormShow() {
console.log(this.params, this.types);
if (this.params) {
if (this.types == "form") {
this.types = "input";
} else {
this.types = "form";
}
} else {
this.types = "form";
}
console.log(this.params, this.types);
},
handleShow() { handleShow() {
if (this.width) return; if (this.width) return;
@ -139,8 +138,23 @@ export default {
this.$emit("handleSearch", cloneDeep(this.$refs.FormConfigRef?.formData)); this.$emit("handleSearch", cloneDeep(this.$refs.FormConfigRef?.formData));
}, },
handleSearch() { async handleSearch() {
if (this.types == "form") { if (this.types === "input") {
let params = {};
params[this.params] = this.value;
let result = {};
await this.$refs.FormConfigRef.validate()
.then((res) => {
result = res;
this.$refs.PopoverRef.doClose();
})
.catch((err) => {
console.log("catch");
});
let resultParams = { ...result, ...params };
this.$emit("handleSearch", resultParams);
} else {
this.$refs.FormConfigRef.validate() this.$refs.FormConfigRef.validate()
.then((result) => { .then((result) => {
this.$refs.PopoverRef.doClose(); this.$refs.PopoverRef.doClose();
@ -149,10 +163,6 @@ export default {
.catch((err) => { .catch((err) => {
console.log("catch"); console.log("catch");
}); });
} else {
let params = {};
params[this.params] = this.value;
this.$emit("handleSearch", params);
} }
}, },
}, },

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

@ -37,7 +37,7 @@ export default{
displayAreaWidth: +arr[0], displayAreaWidth: +arr[0],
displayAreaHeight: +arr[1] displayAreaHeight: +arr[1]
} }
this.editDialog = { this.editDialog = {
visible: showDialog == false ? false : true, visible: showDialog == false ? false : true,
mode: "toDevice", mode: "toDevice",
@ -80,16 +80,16 @@ export default{
let data = { content: content, deviceId: this.selectedDevice.iotDeviceId } let data = { content: content, deviceId: this.selectedDevice.iotDeviceId }
if (IS_TESTING) { if (IS_TESTING) {
this.saveLog(content); // this.saveLog(content);
this.____getDeviceInfo(); this.____getDeviceInfo();
loading.close() loading.close()
} else { } else {
publishToBoard(data).then(res => { publishToBoard(data).then(res => {
this.saveLog(content); // this.saveLog(content);
this.____getDeviceInfo(); this.____getDeviceInfo();
}).catch(err=>{ }).catch(err=>{
}).finally(()=>{ }).finally(()=>{
loading.close() loading.close()
}); });
@ -138,4 +138,4 @@ export default{
}) })
} }
} }
} }

61
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js

@ -7,8 +7,10 @@ import { delay } from "@screen/utils/common";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { EventTopics } from "@screen/utils/enum.js"; import { EventTopics } from "@screen/utils/enum.js";
import { debounce } from "lodash"; import { debounce } from "lodash";
import Vue from "vue";
import { markerClusterIns } from "./map"; import { markerClusterIns } from "./map";
const canvasCtx = Vue.prototype.canvasCtx;
const cameraIcon = { const cameraIcon = {
// 球机 // 球机
@ -75,6 +77,7 @@ export const DeviceForMap = {
}, },
}; };
export const lngLatMap = {}; //优化 缩略图 + 地图 复用lngLatmap
export function getHandleDeviceType(item) { export function getHandleDeviceType(item) {
if (DeviceForMap[item.title]) return "地图路测设备/map"; if (DeviceForMap[item.title]) return "地图路测设备/map";
if (EventTopics[item.title]) return "地图事件专题/map"; if (EventTopics[item.title]) return "地图事件专题/map";
@ -153,11 +156,13 @@ export const eventMap = {
"font-size:15px; background:#83c806; color:#c7ff4a;", "font-size:15px; background:#83c806; color:#c7ff4a;",
removeData removeData
); );
addDataPreHandle(removeData);
markerClusterIns.addData(removeData); markerClusterIns.addData(removeData);
cacheRemoveFunc[`地图路测设备/${item.title}`] = () => cacheRemoveFunc[`地图路测设备/${item.title}`] = () => {
removeDataPreHandle(removeData);
markerClusterIns.removeData(removeData); markerClusterIns.removeData(removeData);
};
}, },
"地图路测设备/map_close"(item) { "地图路测设备/map_close"(item) {
cacheRemoveFunc[`地图路测设备/${item.title}`]?.(); cacheRemoveFunc[`地图路测设备/${item.title}`]?.();
@ -204,11 +209,13 @@ export const eventMap = {
isDefault isDefault
) )
); );
addDataPreHandle(removeData);
markerClusterIns.addData(removeData); markerClusterIns.addData(removeData);
cacheRemoveFunc[`地图事件专题/${item.title}`] = () => cacheRemoveFunc[`地图事件专题/${item.title}`] = () => {
removeDataPreHandle(removeData);
markerClusterIns.removeData(removeData); markerClusterIns.removeData(removeData);
};
}, },
"地图事件专题/map_close"(item) { "地图事件专题/map_close"(item) {
cacheRemoveFunc[`地图事件专题/${item.title}`]?.(); cacheRemoveFunc[`地图事件专题/${item.title}`]?.();
@ -249,15 +256,57 @@ export const eventMap = {
let removeData = data.map((item) => let removeData = data.map((item) =>
resolveDataOptions.call(this, item, options, "PerceiveEvent", isDefault) resolveDataOptions.call(this, item, options, "PerceiveEvent", isDefault)
); );
addDataPreHandle(removeData);
markerClusterIns.addData(removeData); markerClusterIns.addData(removeData);
loadingMessage?.close(); loadingMessage?.close();
cacheRemoveFunc[`事件专题/${item.title}`] = () => cacheRemoveFunc[`事件专题/${item.title}`] = () => {
removeDataPreHandle(removeData);
markerClusterIns.removeData(removeData); markerClusterIns.removeData(removeData);
};
}, },
"事件专题/感知事件_close"(item) { "事件专题/感知事件_close"(item) {
cacheRemoveFunc[`事件专题/${item.title}`]?.(); cacheRemoveFunc[`事件专题/${item.title}`]?.();
}, },
}; };
function lngLatMapHandle(markers, cb) {
markers.forEach((markerData) => {
const lnglat = markerData.lnglat;
if (lnglat) {
const getLatAndLng = () => {
if (Array.isArray(lnglat)) return { lng: lnglat[0], lat: lnglat[1] };
else return lnglat;
};
const { lat, lng } = getLatAndLng();
const lngLatStr = `${lng}/${lat}`;
cb(lngLatStr, markerData);
}
});
}
function addDataPreHandle(markers) {
const cb = (lngLatStr, markerData) => {
if (lngLatMap[lngLatStr])
!lngLatMap[lngLatStr].includes(markerData) &&
lngLatMap[lngLatStr].push(markerData);
else lngLatMap[lngLatStr] = [markerData];
};
lngLatMapHandle(markers, cb);
}
function removeDataPreHandle(markers) {
const cb = (lngLatStr, markerData) => {
if (lngLatMap[lngLatStr]) {
if (lngLatMap[lngLatStr].length < 2) delete lngLatMap[lngLatStr];
else {
const findIndex = lngLatMap[lngLatStr].findIndex(
(removeData) => removeData === markerData
);
lngLatMap[lngLatStr].splice(findIndex, 1);
}
}
};
lngLatMapHandle(markers, cb);
}

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

@ -1,6 +1,7 @@
import { loadAMap } from "@screen/pages/Home/components/AMapContainer/loadAMap.js"; import { loadAMap } from "@screen/pages/Home/components/AMapContainer/loadAMap.js";
// import { Message } from "element-ui"; // import { Message } from "element-ui";
import Vue from "vue"; import Vue from "vue";
import { lngLatMap } from "./buttonEvent";
/** /**
* @typedef {Object} Point * @typedef {Object} Point
* @property {number} weight - The weight of the item. * @property {number} weight - The weight of the item.
@ -32,8 +33,6 @@ export class MarkerCluster {
markerCluster; markerCluster;
infoWindow; infoWindow;
lngLatMap = {};
data = []; data = [];
constructor() {} constructor() {}
@ -74,11 +73,17 @@ export class MarkerCluster {
map.setZoom(10); map.setZoom(10);
setTimeout(() => { setTimeout(() => {
map.setFitView([...this.markerCluster.U], false, [0, 0, 0, 0], 10); map.setFitView([...this.markerCluster.U], false, [0, 0, 0, 0], 10); //自适应. 覆盖物数组, 动画过渡到指定位置, 周围边距,上、下、左、右, 最大 zoom 级别
}, 150); }, 150);
} }
getState({ config, extData }) { getState(data) {
if (Array.isArray(data)) {
return data.every((item) => this.getStateSingle(item));
} else return this.getStateSingle(data);
}
getStateSingle({ config, extData }) {
return typeof config.stateCallback === "function" return typeof config.stateCallback === "function"
? config.stateCallback?.() ? config.stateCallback?.()
: extData.deviceState == 1; : extData.deviceState == 1;
@ -107,11 +112,11 @@ export class MarkerCluster {
getContent(data) { getContent(data) {
const faultBg = require(`@screen/images/mapBg/fault.svg`); const faultBg = require(`@screen/images/mapBg/fault.svg`);
const normalBg = require(`@screen/images/mapBg/active.svg`); const normalBg = require(`@screen/images/mapBg/active.svg`);
const nowBg = this.getState(data) ? normalBg : faultBg;
if (data.length === 1) { if (data.length === 1) {
return ` return `
<div style=" <div style="
background-image: url(${this.getState(data[0]) ? normalBg : faultBg}); background-image: url(${nowBg});
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
width: 51px; width: 51px;
@ -134,7 +139,7 @@ export class MarkerCluster {
return ` return `
<div style=" <div style="
background-image: url(${normalBg}); background-image: url(${nowBg});
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
width: ${width}; width: ${width};
@ -268,19 +273,14 @@ export class MarkerCluster {
context.marker.setContent(div); context.marker.setContent(div);
}, },
renderMarker: (context) => { renderMarker: (context) => {
const markerData = context.data[0];
const { const {
extData, extData,
lnglat: { lat, lng }, lnglat: { lat, lng },
} = context.data[0]; } = markerData;
const lngLatStr = `${lng}/${lat}`; const lngLatStr = `${lng}/${lat}`;
if (this.lngLatMap[lngLatStr]) context.marker.setContent(this.getContent(lngLatMap[lngLatStr]));
!this.lngLatMap[lngLatStr].includes(context.data[0]) &&
this.lngLatMap[lngLatStr].push(context.data[0]);
else this.lngLatMap[lngLatStr] = [context.data[0]];
context.marker.setContent(this.getContent(this.lngLatMap[lngLatStr]));
context.marker.setAnchor("bottom-center"); context.marker.setAnchor("bottom-center");
@ -292,7 +292,7 @@ export class MarkerCluster {
context.marker.on("click", (e) => { context.marker.on("click", (e) => {
hasClick = true; hasClick = true;
const data = this.lngLatMap[lngLatStr]; const data = lngLatMap[lngLatStr];
if (data.length > 1) { if (data.length > 1) {
this.showInfoWindow(data); this.showInfoWindow(data);
return; return;
@ -325,19 +325,6 @@ export class MarkerCluster {
(removeData) => removeData === item (removeData) => removeData === item
); );
const lngLatStr = `${item.lnglat.lng}/${item.lnglat.lat}`;
if (this.lngLatMap[lngLatStr]) {
if (this.lngLatMap[lngLatStr].length < 2)
delete this.lngLatMap[lngLatStr];
else {
const findIndex = this.lngLatMap[lngLatStr].findIndex(
(removeData) => removeData === item
);
this.lngLatMap[lngLatStr].splice(findIndex, 1);
}
}
if (findIndex > -1) this.data.splice(findIndex, 1); if (findIndex > -1) this.data.splice(findIndex, 1);
}); });

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Thumbnail/index.vue

@ -5,6 +5,7 @@
<script> <script>
import { getScaleByActualData } from "./utils" import { getScaleByActualData } from "./utils"
import { onceObserver } from "@screen/utils/resizeObserver"; import { onceObserver } from "@screen/utils/resizeObserver";
import Vue from "vue";
function setFont(size, bold = "normal", family = "微软雅黑") { function setFont(size, bold = "normal", family = "微软雅黑") {
return `${bold} ${size}px ${family}`; return `${bold} ${size}px ${family}`;
@ -41,6 +42,7 @@ export default {
content.appendChild(canvas); content.appendChild(canvas);
const ctx = canvas.getContext("2d"); const ctx = canvas.getContext("2d");
Vue.prototype.canvasCtx = ctx;
ctx.textAlign = "center"; ctx.textAlign = "center";
ctx.textBaseline = "middle"; ctx.textBaseline = "middle";
var imgbg = await this.loadImage(require("./images/bg.png")); var imgbg = await this.loadImage(require("./images/bg.png"));

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue

@ -2,7 +2,7 @@
<div class="Carousel"> <div class="Carousel">
<img src="./images/arrow.svg" @click="prevSlide" class="arrow" /> <img src="./images/arrow.svg" @click="prevSlide" class="arrow" />
<VueSlickCarousel v-bind="settings" ref="CarouselRef" class="vueSlickCarousel"> <VueSlickCarousel v-if="pictures.length > 0" v-bind="settings" ref="CarouselRef" class="vueSlickCarousel">
<div v-for="(item, index) in pictures" :key="index" class="item"> <div v-for="(item, index) in pictures" :key="index" class="item">
<!-- <img :src="require(`@screen/images/${item}`)" style="height: 100%"> --> <!-- <img :src="require(`@screen/images/${item}`)" style="height: 100%"> -->
<!-- <img :src="item" style="height: 100%"> --> <!-- <img :src="item" style="height: 100%"> -->

64
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js

@ -1,5 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
import { Message } from "element-ui"; import { Message } from "element-ui";
import moment from "moment";
export const source = { export const source = {
label: "来源:", label: "来源:",
@ -7,6 +8,7 @@ export const source = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: '1',
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -48,6 +50,7 @@ export const illegalTriggeringType = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: '5-1',
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -99,7 +102,7 @@ export const station = {
], ],
}, },
visible: (data) => { visible: (data) => {
if (data?.dcEventAccident?.locationType != 1) { if (data.dcEventAccident && data.dcEventAccident.locationType != 1) {
return false; return false;
} }
return true; return true;
@ -187,6 +190,7 @@ export const startTime = {
required: true, required: true,
isAlone: true, isAlone: true,
type: "datePicker", type: "datePicker",
default: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
options: { options: {
type: "datetime", type: "datetime",
format: "yyyy-MM-dd HH:mm:ss", format: "yyyy-MM-dd HH:mm:ss",
@ -470,7 +474,7 @@ export const remark = {
autosize: { minRows: 6, maxRows: 6 }, autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true, showWordLimit: true,
}, },
required: true, // required: true,
}; };
export const isInTunnel = { export const isInTunnel = {
@ -478,6 +482,7 @@ export const isInTunnel = {
key: "inTunnel", key: "inTunnel",
// isAlone: true, // isAlone: true,
required: true, required: true,
default: '0',
type: "RadioGroup", type: "RadioGroup",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
@ -575,52 +580,15 @@ export const weatherSituation = {
key: "1-6", key: "1-6",
label: "暴雨", label: "暴雨",
}, },
{
key: "2-1",
label: "小雪",
},
{
key: "2-2",
label: "中雪",
},
{
key: "2-3",
label: "大雪",
},
{
key: "2-4",
label: "暴雪",
},
{
key: "2-5",
label: "大暴雪",
},
{
key: "2-6",
label: "特大暴雪",
},
{
key: "3-1",
label: "轻雾",
},
{
key: "3-2",
label: "大雾",
},
{
key: "3-3",
label: "浓雾",
},
{
key: "3-4",
label: "强浓雾",
},
{
key: "3-5",
label: "团雾",
},
], ],
}, },
visible: (data) => {
if (data?.eventSubclass == '10-1' || data?.eventSubclass == '10-2' || data?.eventSubclass == '10-3') {
return true;
}
return false;
},
}; };
export const additionalNotes = { export const additionalNotes = {
@ -770,6 +738,7 @@ export const eventHappenTime = {
key: "occurrenceTime", key: "occurrenceTime",
required: true, required: true,
type: "datePicker", type: "datePicker",
default: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
options: { options: {
type: "datetime", type: "datetime",
format: "yyyy-MM-dd HH:mm:ss", format: "yyyy-MM-dd HH:mm:ss",
@ -971,6 +940,7 @@ export const constructionMeasurement = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default:'0',
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1000,6 +970,7 @@ export const locationType = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: '1',
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1021,6 +992,7 @@ export const specialConstruction = {
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: '1',
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [

498
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js

@ -532,41 +532,44 @@ export const tabConfigList = [
}, },
], ],
}; };
classify.options.options = ad[data.dcEventTrafficControl.controlType]; classify.options.options =
ad[data.dcEventTrafficControl.controlType];
if(data.dcEventTrafficControl) { if (data.dcEventTrafficControl) {
data.dcEventTrafficControl.facilityId = null; data.dcEventTrafficControl.facilityId = null;
} }
let facilityType = 1; let facilityType = 1;
if (value == '3-2') { if (value == "3-2") {
facilityType = 1; facilityType = 1;
} else if (value == '3-3') { } else if (value == "3-3") {
facilityType = 3; facilityType = 3;
} else if (value == '3-4') { } else if (value == "3-4") {
facilityType = 6; facilityType = 6;
} }
if(value && value != '3-1'){ if (value && value != "3-1") {
//路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区 //路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
request({ request({
url: `/business/facility/query?facilityType=${facilityType}`, url: `/business/facility/query?facilityType=${facilityType}`,
method: "get" method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let lwss = [];
result.data.forEach(it => lwss.push({ key: it.id, label: it.facilityName}))
formList.forEach((it) => {
if(it.key == "dcEventTrafficControl.facilityId"){
it.options.options = lwss;
}
});
}).catch((err) => {
console.log('err',err)
Message.error("查询失败1", err);
}) })
} .then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let lwss = [];
result.data.forEach((it) =>
lwss.push({ key: it.id, label: it.facilityName })
);
formList.forEach((it) => {
if (it.key == "dcEventTrafficControl.facilityId") {
it.options.options = lwss;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败1", err);
});
}
}, },
}, },
}, },
@ -683,7 +686,8 @@ export const tabConfigList = [
{ {
key: "1", key: "1",
label: "主线关闭", label: "主线关闭",
},], },
],
}, },
}, },
{ {
@ -1072,7 +1076,7 @@ export const tabConfigList = [
], ],
}, },
visible: (data) => { visible: (data) => {
if (data?.eventSubclass == '3-1') { if (data?.eventSubclass == "3-1") {
return true; return true;
} }
return false; return false;
@ -1614,6 +1618,7 @@ export const tabConfigList = [
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: "6-1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1666,6 +1671,7 @@ export const tabConfigList = [
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: "1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1739,6 +1745,7 @@ export const tabConfigList = [
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: "7-1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1764,13 +1771,53 @@ export const tabConfigList = [
}, },
], ],
}, },
ons: {
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
if (data.dcEventConstruction) {
data.dcEventConstruction.facilityId = null;
}
let facilityType = 1;
if (value == "7-2" || value == "7-7") {
facilityType = 1;
} else if (value == "7-3" || value == "7-8") {
facilityType = 6;
} else if (value == "7-4" || value == "7-9") {
facilityType = 3;
}
if (value && (value != "7-1" && value != "7-6")) {
//路网设施 1 收费站 2 桥梁 3 互通立交 4 枢纽立交 5 隧道 6 服务区
request({
url: `/business/facility/query?facilityType=${facilityType}`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let lwss = [];
result.data.forEach((it) =>
lwss.push({ key: it.id, label: it.facilityName })
);
formList.forEach((it) => {
if (it.key == "dcEventConstruction.facilityId") {
it.options.options = lwss;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败1", err);
});
}
},
},
}, },
{ {
label: "管制方式:", label: "管制方式:",
key: "dcEventConstruction.controlMode", key: "dcEventConstruction.controlMode",
type: "RadioGroup", type: "RadioGroup",
isAlone: true,
required: true, required: true,
default: "1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1787,13 +1834,264 @@ export const tabConfigList = [
}, },
PresetFormItems.isInTunnel, PresetFormItems.isInTunnel,
{ {
//地点类型
...PresetFormItems.locationType, ...PresetFormItems.locationType,
key: "dcEventConstruction.locationType", key: "dcEventConstruction.locationType",
visible: (data) => {
if (data.eventSubclass == "7-1" || data.eventSubclass == "7-6") {
return true;
}
return false;
},
},
{
label: "施工方式:",
key: "dcEventConstruction.constructionMethod",
type: "RadioGroup",
isAlone: false,
required: true,
default: "1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "车道",
},
{
key: "2",
label: "其他",
},
],
},
visible: (data) => {
if (data.eventSubclass == "7-2" || data.eventSubclass == "7-7") {
return true;
}
return false;
},
},
{
label: "通行情况:",
key: "dcEventConstruction.trafficCondition",
type: "RadioGroup",
isAlone: true,
required: true,
default: "1",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "通行受限",
},
{
key: "2",
label: "车辆谨慎慢行",
},
{
key: "3",
label: "车辆正常通行",
},
],
},
visible: (data) => {
if (
data.eventSubclass == "7-2" ||
data.eventSubclass == "7-7" ||
data.eventSubclass == "7-4" ||
data.eventSubclass == "7-9"
) {
return true;
}
return false;
},
}, },
PresetFormItems.freeway, PresetFormItems.freeway,
PresetFormItems.direction, PresetFormItems.direction,
PresetFormItems.station, {
PresetFormItems.emptyLine, ...PresetFormItems.station,
visible: (data) => {
if (
(data.eventSubclass == "7-1" || data.eventSubclass == "7-6") &&
data?.dcEventConstruction.locationType == "1"
) {
return true;
}
return false;
},
},
{
...PresetFormItems.startEndStation,
visible: (data) => {
if (
(data.eventSubclass == "7-1" || data.eventSubclass == "7-6") &&
data?.dcEventConstruction.locationType == "2"
) {
return true;
}
return false;
},
},
// PresetFormItems.emptyLine,
{
...PresetFormItems.laneOccupancy,
required: true,
visible: (data) => {
if (data?.dcEventConstruction.controlMode == "2") {
return true;
}
return false;
},
},
{
label: "收费站:",
key: "dcEventConstruction.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
},
visible: (data) => {
if (data.eventSubclass == "7-2" || data.eventSubclass == "7-7") {
return true;
}
return false;
},
},
{
label: "出入口:",
key: "dcEventConstruction.exitsInlets",
type: "RadioGroup",
isAlone: false,
required: true,
default: "2",
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "出口",
},
{
key: "2",
label: "入口",
},
],
},
visible: (data) => {
if (data.eventSubclass == "7-2" || data.eventSubclass == "7-7") {
return true;
}
return false;
},
},
{
label: "服务区:",
key: "dcEventConstruction.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
},
visible: (data) => {
if (data.eventSubclass == "7-3" || data.eventSubclass == "7-8") {
return true;
}
return false;
},
},
{
label: "地点:",
key: "dcEventConstruction.location",
isAlone: false,
required: true,
options: {
placeholder: "服务区地点",
},
visible: (data) => {
if (data.eventSubclass == "7-3" || data.eventSubclass == "7-8") {
return true;
}
return false;
},
},
{
label: "立交桥:",
key: "dcEventConstruction.facilityId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
},
visible: (data) => {
if (data.eventSubclass == "7-4" || data.eventSubclass == "7-9") {
return true;
}
return false;
},
ons: {
change(value, ...args) {
const { formList } = args.slice(-1)[0];
//匝道
request({
url: `/system/ramp/listAll?facilityId=${value}`,
method: "get",
})
.then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let zd = [];
result.rows.forEach((it) =>
zd.push({ key: it.id, label: it.rampName })
);
// console.log("zd", zd);
formList.forEach((it) => {
if (it.key == "dcEventConstruction.rampId") {
// console.log("it", it);
it.options.options = zd;
}
});
})
.catch((err) => {
console.log("err", err);
Message.error("查询失败3", err);
});
},
},
},
{
label: "匝道:",
key: "dcEventConstruction.rampId",
type: "select",
isAlone: false,
required: true,
options: {
options: [],
},
visible: (data) => {
if (data.eventSubclass == "7-4" || data.eventSubclass == "7-9") {
return true;
}
return false;
},
},
{
label: "地方道路名称:",
key: "dcEventConstruction.localRoadName",
isAlone: true,
required: true,
options: {},
visible: (data) => {
if (data.eventSubclass == "7-5" || data.eventSubclass == "7-10") {
return true;
}
return false;
},
},
{ {
label: "特殊地点描述:", label: "特殊地点描述:",
key: "dcEventConstruction.specialPlaceDescription", key: "dcEventConstruction.specialPlaceDescription",
@ -1810,9 +2108,27 @@ export const tabConfigList = [
...PresetFormItems.specialConstruction, ...PresetFormItems.specialConstruction,
key: "dcEventConstruction.specialConstruction", key: "dcEventConstruction.specialConstruction",
}, },
{
label: "专项施工名称:",
key: "dcEventConstruction.otherConstructionName",
isAlone: true,
options: {},
visible: (data) => {
if (data?.dcEventConstruction.specialConstruction == "4") {
return true;
}
return false;
},
},
{ {
...PresetFormItems.constructionMeasurement, ...PresetFormItems.constructionMeasurement,
key: "dcEventConstruction.constructionMeasurement", key: "dcEventConstruction.constructionMeasurement",
visible: (data) => {
if (data.eventSubclass == "7-1" || data.eventSubclass == "7-6") {
return true;
}
return false;
},
}, },
PresetFormItems.startTime, PresetFormItems.startTime,
PresetFormItems.expectedEndTime, PresetFormItems.expectedEndTime,
@ -1835,6 +2151,7 @@ export const tabConfigList = [
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: "8-1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1859,7 +2176,7 @@ export const tabConfigList = [
label: "服务区:", label: "服务区:",
key: "dcEventServiceArea.facilityId", key: "dcEventServiceArea.facilityId",
type: "select", type: "select",
isAlone: true, isAlone: false,
required: true, required: true,
options: { options: {
options: [ options: [
@ -1870,12 +2187,50 @@ export const tabConfigList = [
], ],
}, },
}, },
{
label: "停用设施:",
key: "dcEventServiceArea.disableFacility",
type: "select",
isAlone: false,
required: true,
options: {
options: [
{
value: "1",
label: "卫生间",
},
{
value: "2",
label: "餐厅",
},
{
value: "3",
label: "停车场",
},
{
value: "4",
label: "加油站",
},
{
value: "5",
label: "充电桩",
},
],
},
visible: (data) => {
if (data?.eventSubclass == "8-2") {
return true;
}
return false;
},
},
{ {
label: "出入口:", label: "出入口:",
key: "dcEventServiceArea.exitsInlets", key: "dcEventServiceArea.exitsInlets",
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: "2",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1911,6 +2266,7 @@ export const tabConfigList = [
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: "9-1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -1979,6 +2335,7 @@ export const tabConfigList = [
type: "RadioGroup", type: "RadioGroup",
isAlone: true, isAlone: true,
required: true, required: true,
default: "10-1",
options: { options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)", activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [ options: [
@ -2020,6 +2377,91 @@ export const tabConfigList = [
}, },
], ],
}, },
ons: {
input(value, ...args) {
const { formList } = args.slice(-1)[0];
const config = formList.find(
(it) => it.key == "dcEventAbnormalWeather.weatherSituation"
);
let ad = {
"10-1": [
{
key: "1-1",
label: "雨雾",
},
{
key: "1-2",
label: "雨雪",
},
{
key: "1-3",
label: "中雨",
},
{
key: "1-4",
label: "小雨",
},
{
key: "1-5",
label: "大雨",
},
{
key: "1-6",
label: "暴雨",
},
],
"10-2": [
{
key: "2-1",
label: "小雪",
},
{
key: "2-2",
label: "中雪",
},
{
key: "2-3",
label: "大雪",
},
{
key: "2-4",
label: "暴雪",
},
{
key: "2-5",
label: "大暴雪",
},
{
key: "2-6",
label: "特大暴雪",
},
],
"10-3": [
{
key: "3-1",
label: "轻雾",
},
{
key: "3-2",
label: "大雾",
},
{
key: "3-3",
label: "浓雾",
},
{
key: "3-4",
label: "强浓雾",
},
{
key: "3-5",
label: "团雾",
},
],
};
config.options.options = ad[value];
},
},
}, },
{ {
...PresetFormItems.weatherSituation, ...PresetFormItems.weatherSituation,

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

@ -120,7 +120,7 @@ export default {
// console.log('index',index) // console.log('index',index)
this.index = index; this.index = index;
let formConfig = tabConfigList[index].formConfig; let formConfig = tabConfigList[index].formConfig;
console.log('formConfig', formConfig)
formConfig.list.forEach(it => { formConfig.list.forEach(it => {
if (it.key == 'direction') { if (it.key == 'direction') {
it.options.options = this.direction; it.options.options = this.direction;
@ -128,7 +128,7 @@ export default {
if (it.key == 'roadId') { if (it.key == 'roadId') {
it.options.options = this.roads; it.options.options = this.roads;
} }
if (index == 7 || it.key === 'dcEventServiceArea.facilityId') { if (index == 7 && it.key == 'dcEventServiceArea.facilityId') {
it.options.options = this.lwss.filter(ss => ss.type == 6); it.options.options = this.lwss.filter(ss => ss.type == 6);
} }
// if (index == 0 || index == 1 || index == 7) { // if (index == 0 || index == 1 || index == 7) {
@ -148,21 +148,32 @@ export default {
if (this.index == 0 || this.index == 1) { if (this.index == 0 || this.index == 1) {
formData.lang = formData.lang.join(',') formData.lang = formData.lang.join(',')
} else {
formData.lang = ''
} }
if (formData.endStakeMark) { if (formData.endStakeMark && formData.endStakeMark[0] != null) {
let endStakeMark = formData.endStakeMark; let endStakeMark = formData.endStakeMark;
let strMark = (endStakeMark && endStakeMark.length > 0) ? ('K' + endStakeMark[0] + '+' + endStakeMark[1]) : ''; let strMark = (endStakeMark && endStakeMark.length > 0) ? ('K' + endStakeMark[0] + '+' + endStakeMark[1]) : '';
if (this.index == 3) { if (this.index == 3) {
formData.dcEventTrafficCongestion.endStakeMark = strMark; formData.dcEventTrafficCongestion.endStakeMark = strMark;
} }
if (this.index == 6) {
formData.dcEventConstruction.endStakeMark = strMark;
}
if (this.index == 9) { if (this.index == 9) {
formData.dcEventAbnormalWeather.endStakeMark = strMark; formData.dcEventAbnormalWeather.endStakeMark = strMark;
} }
formData.endStakeMark = ''; formData.endStakeMark = '';
} else {
formData.endStakeMark = '';
} }
// console.log('formData',formData)
// return;
let stakeMark = formData.stakeMark; let stakeMark = formData.stakeMark;
// console.log('formData', {
// ...formData,
// eventType: Number(this.index) + 1,
// stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
// })
// return;
request({ request({
url: `/dc/system/event`, url: `/dc/system/event`,
@ -170,7 +181,7 @@ export default {
data: { data: {
...formData, ...formData,
eventType: Number(this.index) + 1, eventType: Number(this.index) + 1,
stakeMark: stakeMark ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '', stakeMark: (stakeMark && stakeMark[0] != null) ? ((stakeMark && stakeMark.length > 0) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '') : '',
} }
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);

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

@ -199,6 +199,7 @@ export default {
} }
}) })
// console.log('result.rows',result.rows[0])
this.data = result.rows; this.data = result.rows;
this.total = result.total; this.total = result.total;

5
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsDay/assets/charts.js

@ -24,7 +24,7 @@ var options = {
grid: { grid: {
top: "15%", //上边距 top: "15%", //上边距
right: "0", //右边距 right: "0", //右边距
left: "1px", //左边距 left: "10px", //左边距
bottom: "10%", //下边距 bottom: "10%", //下边距
containLabel: true, containLabel: true,
}, },
@ -49,10 +49,11 @@ var options = {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "(起) ", name: "(起)",
nameTextStyle: { nameTextStyle: {
color: "#E5E7E8", color: "#E5E7E8",
fomtSize: 10, fomtSize: 10,
align: "right",
}, },
// splitNumber: 5, // splitNumber: 5,
// nameTextStyle: { // nameTextStyle: {

4
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/assets/charts2.js

@ -48,10 +48,10 @@ let options = {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "(起) ", name: "(起)",
nameTextStyle: { nameTextStyle: {
color: "#E5E7E8", color: "#E5E7E8",
left: 10, align: "right",
fomtSize: 10, fomtSize: 10,
}, },
axisLabel: { axisLabel: {

1
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/assets/charts3.js

@ -138,6 +138,7 @@ var options = {
// barWidth:'40%', // barWidth:'40%',
itemStyle: { itemStyle: {
color: "#51BFA4", color: "#51BFA4",
align: "right",
}, },
}, },
{ {

53
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/dayTotal/assets/charts.js

@ -1,5 +1,17 @@
/* 数据 */
let nameList = [
"大学城",
"长清",
"孝里",
"安城",
"平阴北",
"平阴南",
"东平",
"梁山东",
"嘉祥西",
];
const sxnja = [ const sxnja = [
293.67, 493.44, 694.34, 894.5, 697.82, 895.09, 495.79, 497.49, 393.72, 293.52, 293.67, 493.44, 694.34, 894.5, 697.82, 895.09, 495.79, 497.49, 393.72,
]; ];
const minNumber = 0; const minNumber = 0;
const minArray = []; const minArray = [];
@ -35,21 +47,32 @@ var options = {
}, },
xAxis: { xAxis: {
type: "category", type: "category",
data: xaxisData, data: [
"00:00",
"01:00",
"02:00",
"03:00",
"04:00",
"05:00",
"06:00",
"07:00",
"08:00",
"09:00",
"10:00",
"11:00",
"12:00",
],
axisLine: { axisLine: {
show: true,
lineStyle: { lineStyle: {
width: 1, color: "rgba(49, 217, 255, 0.8)",
color: "#545454",
}, },
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#B5C5D4", color: "#fff",
fontSize: "10px", fontSize: "10px",
interval: 0,
}, },
}, },
yAxis: [ yAxis: [
@ -58,8 +81,13 @@ var options = {
// min: function (value) { // min: function (value) {
// return value.min*0.9; // return value.min*0.9;
// }, // },
name: "(起)",
nameTextStyle: {
color: "#fff",
fontSize: 10,
align: "right",
},
type: "value", type: "value",
// max: yAxisMax,
axisLine: { axisLine: {
show: false, show: false,
lineStyle: { lineStyle: {
@ -68,19 +96,16 @@ var options = {
}, },
}, },
splitLine: { splitLine: {
show: true,
lineStyle: { lineStyle: {
color: "#B2C2D3", color: "rgba(49, 217, 255, 0.5)",
opacity: 0.3,
type: "dotted",
}, },
}, },
axisTick: { axisTick: {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
color: "#B5C5D4", color: "#fff",
fontSize: "12px", fontSize: "10px",
formatter: (value) => { formatter: (value) => {
return value + minNumber; return value + minNumber;
}, },

3
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts.js

@ -88,11 +88,12 @@ var options = {
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "(起) ", name: "(起)",
splitNumber: 5, splitNumber: 5,
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "#fff",
fontSize: 10, fontSize: 10,
align: "right",
// fontFamily: "Source Han Sans CN-Regular", // fontFamily: "Source Han Sans CN-Regular",
// align: "left", // align: "left",
// verticalAlign: "center", // verticalAlign: "center",

3
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts3.js

@ -51,10 +51,11 @@ let options = {
}, },
yAxis: [ yAxis: [
{ {
name: "(起) ", name: "(起)",
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "#fff",
fomtSize: 10, fomtSize: 10,
align: "right",
}, },
min: 0, min: 0,
axisLine: { axisLine: {

7
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js

@ -128,13 +128,14 @@ var options = {
if (!mainData) return ""; if (!mainData) return "";
for (let i = 0; i < window.mainData.length; i++) { for (let i = 0; i < window.mainData.length; i++) {
if (window.mainData[i].name === name) { if (window.mainData[i].name === name) {
target = window.mainData[i].percent; target = window.mainData[i].value;
} }
} }
console.log('starget',target)
var arr = [ var arr = [
"{ast|" + name + "}", "{ast|" + name + "}",
"{bst|" + (target * 100).toFixed(0) + "% }", "{bst|" + Math.round((target * 100).toFixed(0)) + "% }",
"{cst|" + target + "起}", "{cst|" + Math.round(target) + "起}",
]; ];
return arr.join(" "); return arr.join(" ");
}, },

15
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/monthStatistics/assets/charts.js

@ -8,8 +8,8 @@ var options = {
}, },
}, },
grid: { grid: {
left: "0%", left: "1%",
right: "5%", right: "0",
bottom: "30px", bottom: "30px",
top: "30px", top: "30px",
containLabel: true, containLabel: true,
@ -112,7 +112,7 @@ var options = {
axisLabel: { axisLabel: {
// interval:0, // interval:0,
color: "#fff", color: "#fff",
fontSize: 12, fontSize: 10,
}, },
axisTick: { axisTick: {
show: false, show: false,
@ -145,14 +145,13 @@ var options = {
], ],
}, },
yAxis: { yAxis: {
name: "(起) ", name: "(起)",
nameTextStyle: { nameTextStyle: {
color: "#fff", color: "#fff",
fomtSize: 10, fontSize: 10,
align: "right",
}, },
type: "value", type: "value",
min: 0,
minInterval: 1,
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: "rgba(255, 255, 255, 0.15)", color: "rgba(255, 255, 255, 0.15)",
@ -167,7 +166,7 @@ var options = {
show: false, show: false,
}, },
axisLabel: { axisLabel: {
fontSize: 12, fontSize: 10,
fontFamily: "Bebas", fontFamily: "Bebas",
color: "#fff", color: "#fff",
}, },

212
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railway/assets/charts.js

@ -1,124 +1,124 @@
let chartIcon = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAC4jAAAuIwF4pT92AAAFw2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4wLWMwMDAgNzkuMTcxYzI3ZmFiLCAyMDIyLzA4LzE2LTIyOjM1OjQxIC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crMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCAyNC4wIChNYWNpbnRvc2gpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PibZhN0AAAHBSURBVDiNfdTtThNREAbgZ5sCrRTaRaBqQDTR6AXaq9grJEaiKCJWaAv9ENDUH2fWLkU8yeTkZGbe885nNp/PVU9vIMMGNtHGo1BNMQoZF7k7jlkVqDewji72sI5VrIT6F64xwRecFbnJPaDeQBsv8RSdCpsS6BYzDENOcVTkLv8CBZPX2McOdrEVITYC6BpjnKOP7zjG+yI3yd5dzLNg8jbY7MW9g+2lHJUgpzgJOcRRPX7dj3C6eIaDAO+iGUCzYPERWSXU5+jXIxct5MFgN0AOsLaoi9Ul0HHkaoBOLZg0IoQNPMaTJZAqWDfytylVtol2LdishNFaKBv/AClPI3waISto1UKZoRZ39h8QFZus8laTqvEbNyEzqdQPnZ/hcyMl/BbTmpSsacg43v0wXD43+BE2V+FzjWFdmp1ZKAZheByUt91tyD4+S/00wGWAjerxOJYS2JSSngX4lrsNeREfnUg9dRG+o3JEWniDF1Lpd6U2KEdkHoyuwvkM36TmPCxy4+rQdvDKoss7FhugzM8kIjiPED8UuSH310jLYkRaUl9V18gswD7ha5Ebl77ZA4utLY1MOT4sRmKI0fJi+wM9v6Q1QC+Y6wAAAABJRU5ErkJggg==`;
let xdata = { let xdata = {
value: ['平阴停车区'] value: ["平阴停车区"],
}; };
let sdata = { let sdata = {
value: [32774] value: [32774],
} };
let dataZoomMove = { let dataZoomMove = {
start: 0, start: 0,
end: 4 end: 4,
} };
var options = { var options = {
grid: { grid: {
containLabel: true, containLabel: true,
// 边距自行修改 // 边距自行修改
bottom: '0%', bottom: "0%",
left: '0%', left: "0%",
top: '2%', top: "2%",
right: '15%', right: "15%",
}, },
xAxis: { xAxis: {
type: 'value', type: "value",
axisLabel: {
show: false,
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
splitLine: {
show: false,
},
},
yAxis: [
{
type: "category",
data: xdata.value,
inverse: true,
axisLabel: { axisLabel: {
show: false fontSize: "14px",
inside: true,
verticalAlign: "bottom",
color: "#fff",
padding: 10,
margin: -5,
formatter: function (value, index) {
// let index = xdata.value.indexOf(value);
return `{a|Top${index + 1}} {b|${value}}`;
},
rich: {
a: {
fontSize: "14px",
},
b: {
fontSize: "14px",
padding: [0, 0, 0, 70],
},
},
}, },
axisLine: { axisLine: {
show: false, show: false,
}, },
axisTick: { axisTick: {
show: false, show: false,
},
splitLine: {
show: false,
}, },
}, },
yAxis: [ ],
{ series: [
type: 'category', {
data: xdata.value, data: sdata.value,
inverse: true, type: "bar",
axisLabel: { barWidth: 8,
fontSize: '14px', itemStyle: {
inside: true, borderRadius: 40,
verticalAlign: 'bottom', color: {
color: '#fff', type: "linear",
padding: 10, x: 0,
margin: -5, y: 0,
formatter: function (value, index) { x2: 1,
// let index = xdata.value.indexOf(value); y2: 0,
return `{a|Top${index + 1}} {b|${value}}` colorStops: [
{
offset: 0,
color: "#1cd0f000", // 0% 处的颜色
}, },
rich: { {
a: { offset: 1,
fontSize: '14px', color: "#1cd0f0", // 100% 处的颜色
},
b: {
fontSize: '14px',
padding: [0, 0, 0, 70],
}
}, },
}, ],
axisLine: { global: false, // 缺省为 false
show: false, },
}, },
axisTick: { label: {
show: false, show: true,
} position: "right",
} distance: -10,
], data: sdata,
series: [ color: "#fff",
{ formatter: (c) => {
data: sdata.value, return `{a|}{b|${c.value}起}`;
type: 'bar', },
barWidth: 8, rich: {
itemStyle: { a: {
borderRadius: 40, widht: 20,
color: { height: 20,
type: 'linear', backgroundColor: {
x: 0, image: chartIcon,
y: 0,
x2: 1,
y2: 0,
colorStops: [
{
offset: 0,
color: '#1cd0f000', // 0% 处的颜色
},
{
offset: 1,
color: '#1cd0f0', // 100% 处的颜色
},
],
global: false, // 缺省为 false
}
},
label: {
show: true,
position: 'right',
distance: -10,
data: sdata,
color: '#fff',
formatter: (c) => {
return `{a|}{b|${c.value}件}`
}, },
rich: { },
a: { b: {
widht: 20, padding: [0, 0, 0, 10],
height: 20, },
backgroundColor: { },
image: chartIcon },
}, },
}, ],
b: { };
padding: [0, 0, 0, 10]
}
}
}
}
]
}
export default options; export default options;

26
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/railwayDay/assets/charts.js

@ -56,7 +56,7 @@ nameList.map((item, index) => {
var options = { var options = {
grid: { grid: {
top: "5%", //上边距 top: "15%", //上边距
right: "0", //右边距 right: "0", //右边距
left: "0", //左边距 left: "0", //左边距
bottom: "0%", //下边距 bottom: "0%", //下边距
@ -69,7 +69,7 @@ var options = {
}, },
xAxis: { xAxis: {
type: "category", type: "category",
data: [], data: nameList,
axisTick: { axisTick: {
show: false, //隐藏X轴刻度 show: false, //隐藏X轴刻度
}, },
@ -80,26 +80,22 @@ var options = {
}, },
axisLabel: { axisLabel: {
show: true, show: true,
color: "#B6E6FF", color: "#fff",
fontSize: 8, fontSize: 10,
fontFamily: "Source Han Sans CN-Regular",
}, },
}, },
yAxis: [ yAxis: [
{ {
type: "value", type: "value",
name: "", name: "(起)",
nameTextStyle: { nameTextStyle: {
color: "#B6E6FF", color: "#fff",
fontSize: 13, fontSize: 10,
fontFamily: "Source Han Sans CN-Regular", align: "right",
align: "left",
verticalAlign: "center",
}, },
axisLabel: { axisLabel: {
fontSize: 13, fontSize: 10,
color: "#B6E6FF", color: "#fff",
fontFamily: "HarmonyOS Sans-Regular", fontFamily: "HarmonyOS Sans-Regular",
// formatter:function(value,index){ // formatter:function(value,index){
// return yList[index] // return yList[index]
@ -121,7 +117,7 @@ var options = {
series: [ series: [
{ {
type: "bar", type: "bar",
data: [], data: valueList,
z: 4, z: 4,
itemStyle: { itemStyle: {
color: { color: {

Loading…
Cancel
Save