Browse Source

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

wangqin
qingzhengli 9 months ago
parent
commit
906339055b
  1. 178
      ruoyi-ui/src/views/JiHeExpressway/components/InputSearch/index.vue
  2. 120
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/firstResponders/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue
  4. 64
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
  5. 498
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  6. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  7. 1
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  8. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/assets/charts.js

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

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

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

@ -1,5 +1,5 @@
<template> <template>
<div class='FirstResponders'> <div class="FirstResponders">
<div class="filter"> <div class="filter">
<div> <div>
<ButtonGradient @click.native="handleOpenDialogAddEdit()"> <ButtonGradient @click.native="handleOpenDialogAddEdit()">
@ -22,15 +22,33 @@
</ButtonGradient> </ButtonGradient>
</div> </div>
<InputSearch style="width: 402px;" :formList="searchFormList" :formConfigOptions="{ labelWidth: '72px' }" <InputSearch
@handleSearch="handleSearch" /> style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ labelWidth: '72px' }"
placeholder="请输入姓名、电话,回车搜索"
type="input"
:valueData="valueData"
:params="params"
:queryParams="queryParams"
@handleSearch="handleSearch"
/>
</div> </div>
<div class='body'> <div class="body">
<ElEmpty v-if="!data.length && !isFirst" description="暂无数据" style="width: 100%;height: 100%;position: absolute;" /> <ElEmpty
v-if="!data.length && !isFirst"
description="暂无数据"
style="width: 100%; height: 100%; position: absolute"
/>
<template v-else> <template v-else>
<PeopleCard v-for="(item, index) in data" :cardData="item" :key="index" <PeopleCard
@edit="data => handleOpenDialogAddEdit(data)" @delete="handleDelete" /> v-for="(item, index) in data"
:cardData="item"
:key="index"
@edit="(data) => handleOpenDialogAddEdit(data)"
@delete="handleDelete"
/>
</template> </template>
</div> </div>
@ -40,27 +58,28 @@
<script> <script>
import PeopleCard from "./../../components/PeopleCard/index.vue"; import PeopleCard from "./../../components/PeopleCard/index.vue";
import InputSearch from '@screen/components/InputSearch/index.vue'; import InputSearch from "@screen/components/InputSearch/index.vue";
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import AddNEditDialog from "./components/AddNEditDialog.vue" import AddNEditDialog from "./components/AddNEditDialog.vue";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { searchFormList } from "./data"; import { searchFormList } from "./data";
import request from "@/utils/request"; import request from "@/utils/request";
import { setLoading } from "@screen/utils/index.js" import { setLoading } from "@screen/utils/index.js";
import { delay, exportFile, confirm } from "@screen/utils/common"; import { delay, exportFile, confirm } from "@screen/utils/common";
import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js"; import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js";
import { values } from "lodash";
// //
export default { export default {
name: 'FirstResponders', name: "FirstResponders",
components: { components: {
PeopleCard, PeopleCard,
ButtonGradient, ButtonGradient,
InputSearch, InputSearch,
AddNEditDialog AddNEditDialog,
}, },
inject: ['getPagination', 'setTotal', 'setCurrentPage'], inject: ["getPagination", "setTotal", "setCurrentPage"],
data() { data() {
return { return {
searchFormList, searchFormList,
@ -68,7 +87,10 @@ export default {
addNEditDialogVisible: false, addNEditDialogVisible: false,
dialogData: null, dialogData: null,
isFirst: true, isFirst: true,
} valueData: "",
params: "value",
queryParams: ["phone", "name"],
};
}, },
created() { created() {
this.getData(); this.getData();
@ -81,11 +103,11 @@ export default {
request({ request({
url: `/business/employees/${data.id}`, url: `/business/employees/${data.id}`,
method: "DELETE", method: "DELETE",
data: {} data: {},
}) })
.then((result) => { .then((result) => {
if (result.code != 200) return Message.error(`删除失败!`); if (result.code != 200) return Message.error(`删除失败!`);
this.setCurrentPage(1) this.setCurrentPage(1);
Message.success(`删除成功!`); Message.success(`删除成功!`);
}) })
.catch((err) => { .catch((err) => {
@ -102,24 +124,28 @@ export default {
request({ request({
url: `/business/employees/sysPost`, url: `/business/employees/sysPost`,
method: "post", method: "post",
data: {} data: {},
}), }),
// //
getSelectOptionsStation() getSelectOptionsStation(),
]) ]).then(([post, organization]) => {
.then(([post, organization]) => { if (post.status === "fulfilled" && post.value.code == 200) {
if (post.status === 'fulfilled' && post.value.code == 200) { this.searchFormList[0].options.options = post.value.data.map(
this.searchFormList[0].options.options = post.value.data.map(item => ({ (item) => ({
key: item.postId, key: item.postId,
label: item.postName, label: item.postName,
})) })
} );
}
if (organization.status === 'fulfilled' && Array.isArray(organization.value)) { if (
this.searchFormList[1].options.options = organization.value; organization.status === "fulfilled" &&
} Array.isArray(organization.value)
}) ) {
this.searchFormList[1].options.options = organization.value;
}
});
}, },
handleExport() { handleExport() {
exportFile({ exportFile({
@ -127,11 +153,12 @@ export default {
filename: "应急人员", filename: "应急人员",
data: { data: {
...this.searchData, ...this.searchData,
...this.getPagination() ...this.getPagination(),
} },
}); });
}, },
handleSearch(data) { handleSearch(data) {
console.log(88888, data);
this.searchData = data; this.searchData = data;
this.getData(); this.getData();
}, },
@ -145,26 +172,27 @@ export default {
method: "get", method: "get",
params: { params: {
...this.searchData, ...this.searchData,
...this.getPagination() ...this.getPagination(),
} },
}).then(result => { })
if (result.code != 200) return; .then((result) => {
if (result.code != 200) return;
this.data = result.rows; this.data = result.rows;
this.setTotal(result.total) this.setTotal(result.total);
}).finally(() => { })
this.isFirst = false; .finally(() => {
closeLoading(); this.isFirst = false;
}) closeLoading();
} });
} },
} },
};
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.FirstResponders { .FirstResponders {
.body { .body {
display: grid; display: grid;
grid-template-columns: repeat(10, 1fr); grid-template-columns: repeat(10, 1fr);

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;

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(" ");
}, },

Loading…
Cancel
Save