Browse Source

更改

wangqin
zhangzhang 9 months ago
parent
commit
1459bb69f9
  1. 207
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/AddNEditDialog.vue
  2. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/index.vue
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js
  5. 256
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

207
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/emergencyAgencies/components/AddNEditDialog.vue

@ -1,48 +1,56 @@
<template> <template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'"> <Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<div class='AddNEditDialog'> <div class="AddNEditDialog">
<Form v-model="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="90px" /> <Form
v-model="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="90px"
/>
</div> </div>
<template #footer> <template #footer>
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false"> <Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="(modelVisible = false), (submitting = false)"
>
取消 取消
</Button> </Button>
<Button @click.native="handleSubmit" :loading="submitting"> <Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
确定
</Button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
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 * as PresetFormItems from "@screen/common/PresetFormItems.js"; import * as PresetFormItems from "@screen/common/PresetFormItems.js";
import request from "@/utils/request"; import request from "@/utils/request";
import { CameraDirectionEnumList } from "@screen/utils/enum.js" import { CameraDirectionEnumList } from "@screen/utils/enum.js";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { cloneDeep, merge } from 'lodash'; import { cloneDeep, merge } from "lodash";
import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js"; import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js";
export default { export default {
name: 'AddNEditDialog', name: "AddNEditDialog",
components: { components: {
Dialog, Dialog,
Button, Button,
Form Form,
}, },
model: { model: {
prop: 'visible', prop: "visible",
event: "update:value" event: "update:value",
}, },
props: { props: {
visible: Boolean, visible: Boolean,
data: Object data: Object,
}, },
inject: ['setCurrentPage'], inject: ["setCurrentPage"],
data() { data() {
return { return {
submitting: false, submitting: false,
@ -51,11 +59,11 @@ export default {
{ {
label: "父级:", label: "父级:",
key: "parentId", key: "parentId",
type: 'select', type: "select",
options: { options: {
clearable: false, clearable: false,
options: [] options: [],
} },
}, },
// { // {
// label: "2233:", // label: "2233:",
@ -89,16 +97,16 @@ export default {
{ {
label: "机构名称:", label: "机构名称:",
key: "organizationName", key: "organizationName",
required: true required: true,
}, },
{ {
label: "方向:", label: "方向:",
key: "direction", key: "direction",
required: true, required: true,
type: 'select', type: "select",
options: { options: {
options: [CameraDirectionEnumList[0], CameraDirectionEnumList[2]], options: [CameraDirectionEnumList[0], CameraDirectionEnumList[2]],
} },
}, },
{ {
label: "地址:", label: "地址:",
@ -113,25 +121,27 @@ export default {
{ {
message: "请补全桩号", message: "请补全桩号",
callback(value, data) { callback(value, data) {
if (!value?.trim() && data.stakeMark[1]?.trim()) return false if (!value?.trim() && data.stakeMark[1]?.trim())
else return true return false;
} else return true;
} },
] },
],
}, },
{ {
rules: [ rules: [
{ {
message: "请补全桩号", message: "请补全桩号",
callback(value, data) { callback(value, data) {
if (!value?.trim() && data.stakeMark[0]?.trim()) return false if (!value?.trim() && data.stakeMark[0]?.trim())
else return true return false;
} else return true;
} },
] },
],
}, },
] ],
} },
}), }),
// { // {
// label: ":", // label: ":",
@ -148,19 +158,19 @@ export default {
autosize: { minRows: 6, maxRows: 6 }, autosize: { minRows: 6, maxRows: 6 },
showWordLimit: true, showWordLimit: true,
}, },
} },
] ],
} };
}, },
computed: { computed: {
modelVisible: { modelVisible: {
get() { get() {
return this.visible return this.visible;
}, },
set(val) { set(val) {
this.$emit('update:value', val) this.$emit("update:value", val);
} },
} },
}, },
watch: { watch: {
modelVisible: { modelVisible: {
@ -168,72 +178,89 @@ export default {
handler(bool) { handler(bool) {
if (!bool) return; if (!bool) return;
this.formData = this.formData = !this.data
!this.data ? null : { ? null
"parentId": this.data.dcOrganizations.parentId, : {
// "organizationType": this.data.dcOrganizations.organizationType, parentId: this.data.dcOrganizations.parentId,
"organizationName": this.data.dcOrganizations.organizationName, // "organizationType": this.data.dcOrganizations.organizationType,
"direction": this.data.dcOrganizations.direction, organizationName: this.data.dcOrganizations.organizationName,
"organizationAddress": this.data.dcOrganizations.organizationAddress, direction: this.data.dcOrganizations.direction,
"stakeMark": this.data.dcOrganizations.stakeMark ? [...(this.data.dcOrganizations.stakeMark || "").match(/[0-9]+/g)] : ["", ""], organizationAddress:
"rescueUnit": this.data.dcOrganizations.rescueUnit, this.data.dcOrganizations.organizationAddress,
"description": this.data.dcOrganizations.description stakeMark: this.data.dcOrganizations.stakeMark
} ? [
...(this.data.dcOrganizations.stakeMark || "").match(
this.getOptions(); /[0-9]+/g
} ),
} ]
: ["", ""],
rescueUnit: this.data.dcOrganizations.rescueUnit,
description: this.data.dcOrganizations.description,
};
},
},
}, },
methods: { methods: {
async getOptions() { async getOptions() {
const result = await getSelectOptionsStation(1); const result = await getSelectOptionsStation(1);
this.formList[0].options.options = result; this.formList[0].options.options = result;
this.formList[0].default = result[0]?.key; this.formList[0].default = result[0].key;
this.formList[0].options.options.push({
disabled: false,
key: 0,
label: "无",
});
console.log(this.formList[0].options.options);
}, },
handleSubmit() { handleSubmit() {
this.$refs.FormConfigRef.validate() this.$refs.FormConfigRef.validate().then((data) => {
.then((data) => { this.submitting = true;
this.submitting = true;
if (this.data) data.id = this.data.dcOrganizations.id; if (this.data) data.id = this.data.dcOrganizations.id;
if (typeof data.parentId != 'number') data.parentId = 0; if (typeof data.parentId != "number") data.parentId = 0;
if (data.stakeMark[0]) { if (data.stakeMark[0]) {
data.stakeMark = `K${data.stakeMark[0]}+${data.stakeMark[1]}`; data.stakeMark = `K${data.stakeMark[0]}+${data.stakeMark[1]}`;
}else{ } else {
data.stakeMark = ''; data.stakeMark = "";
} }
request({ request({
url: `/business/organization`, url: `/business/organization`,
method: this.data ? 'PUT' : 'POST', method: this.data ? "PUT" : "POST",
data data,
}) })
.then(result => { .then((result) => {
if (result.code != 200) return Message.error(`提交失败!`); if (result.code != 200) return Message.error(`提交失败!`);
Message.success(`提交成功!`); Message.success(`提交成功!`);
this.modelVisible = false; this.modelVisible = false;
this.setCurrentPage(1) this.setCurrentPage(1);
}) })
.catch((err) => { .catch((err) => {
console.log("%c [ err ]-110-「DeviceControlDialog.vue」", "font-size:15px; background:#547bf2; color:#98bfff;", err); console.log(
Message.error(`提交失败!`); "%c [ err ]-110-「DeviceControlDialog.vue」",
}) "font-size:15px; background:#547bf2; color:#98bfff;",
.finally(() => { err
this.submitting = false; );
}) Message.error(`提交失败!`);
}) })
} .finally(() => {
this.submitting = false;
});
});
},
}, },
} mounted() {
this.getOptions();
},
};
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.AddNEditDialog { .AddNEditDialog {
width: 450px; width: 450px;
display: flex; display: flex;

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

@ -131,11 +131,11 @@ export default {
// }, // },
{ {
key: "cars", key: "cars",
label: "驻点车辆", label: "应急车辆",
}, },
{ {
key: "employeesNum", key: "employeesNum",
label: "驻点人员", label: "应急人员",
suffix: "人", suffix: "人",
}, },
], ],
@ -183,6 +183,7 @@ export default {
handleOpenDialogAddEdit(data) { handleOpenDialogAddEdit(data) {
this.addNEditDialogVisible = true; this.addNEditDialogVisible = true;
this.dialogData = data; this.dialogData = data;
console.log("Dialog", data);
}, },
handleSearch(data) { handleSearch(data) {

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/index.vue

@ -324,7 +324,7 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
left: 20px; left: 20px;
top: 10px; top: 10px;
z-index: 100; z-index: 0;
div { div {
white-space: nowrap; white-space: nowrap;

4
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts2.js

@ -132,8 +132,8 @@ var options = {
}, },
color: colorList, color: colorList,
legend: { legend: {
top: 10, top: 100,
right: 0, right: 20,
orient: "vertical", //改变排列方式 orient: "vertical", //改变排列方式
icon: "circle", //改变legend小图标形状 icon: "circle", //改变legend小图标形状
itemGap: 20, // 设置legend的间距 itemGap: 20, // 设置legend的间距

256
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

@ -1,35 +1,87 @@
<template> <template>
<div class="congestion"> <div class="congestion">
<div class="board"> <div class="board">
<ProgressBar class="keep-ratio" @selectItem="selectProgress" :dataList="dataList" :selectIndex="selectIndex" <ProgressBar
:reset="reset" /> class="keep-ratio"
@selectItem="selectProgress"
:dataList="dataList"
:selectIndex="selectIndex"
:reset="reset"
/>
<div class="searchPanel"> <div class="searchPanel">
<RadioGroup :options="[ <RadioGroup
{ key: '1', label: '菏泽' }, :options="[
{ key: '3', label: '济南' }, { key: '1', label: '菏泽' },
]" v-model="direction" type="button" /> { key: '3', label: '济南' },
<el-select v-model="type" size="mini" class="selectRoad" placeholder="请选择" @change="changeType"> ]"
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"> v-model="direction"
type="button"
/>
<el-select
v-model="type"
size="mini"
class="selectRoad"
placeholder="请选择"
@change="changeType"
>
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="quarter" size="medium" v-if="type == 'quarter'" class="selectRoad-medium" placeholder="请选择"> <el-select
<el-option v-for="item in quarterOptions" :key="item.value" :label="item.label" :value="item.value" v-model="quarter"
style="width: 140px"> size="medium"
v-if="type == 'quarter'"
class="selectRoad-medium"
placeholder="请选择"
>
<el-option
v-for="item in quarterOptions"
:key="item.value"
:label="item.label"
:value="item.value"
style="width: 140px"
>
</el-option> </el-option>
</el-select> </el-select>
<el-date-picker size="mini" v-if="type != 'quarter'" class="selectRoad" v-model="dateTime" style="width: 140px" <el-date-picker
:type="type == 'date' size="mini"
? 'date' v-if="type != 'quarter'"
: type == 'month' class="selectRoad"
? 'month' v-model="dateTime"
: type == 'year' style="width: 140px"
? 'year' :type="
: '' type == 'date'
" placeholder="请选择" :clearable="false" /> ? 'date'
: type == 'month'
<el-button type="primary" size="mini" class="btnSearch" @click="searchQuery" ? 'month'
icon="el-icon-search">查询</el-button> : type == 'year'
<el-button class="btnReset" size="mini" icon="el-icon-refresh-left" @click="onReset">重置</el-button> ? 'year'
: ''
"
placeholder="请选择"
:clearable="false"
/>
<el-button
type="primary"
size="mini"
class="btnSearch"
@click="searchQuery"
icon="el-icon-search"
>查询</el-button
>
<el-button
class="btnReset"
size="mini"
icon="el-icon-refresh-left"
@click="onReset"
>重置</el-button
>
</div> </div>
</div> </div>
@ -43,14 +95,28 @@
<div> <div>
<WgtTitle :title="'感知事件类型分析'"></WgtTitle> <WgtTitle :title="'感知事件类型分析'"></WgtTitle>
<Empty v-show="!chart2List || chart2List.length <= 0" text="暂无数据..."></Empty> <Empty
<div v-show="chart2List || chart2List.length > 0" id="chart2" class="btnChart" /> v-show="!chart2List || chart2List.length <= 0"
text="暂无数据..."
></Empty>
<div
v-show="chart2List || chart2List.length > 0"
id="chart2"
class="btnChart"
/>
</div> </div>
<div> <div>
<WgtTitle :title="'桩号范围内事件分析趋势'"></WgtTitle> <WgtTitle :title="'桩号范围内事件分析趋势'"></WgtTitle>
<Empty v-show="!chart3List || chart3List.length <= 0" text="暂无数据..."></Empty> <Empty
<div v-show="chart3List || chart3List.length > 0" id="chart3" class="btnChart" /> v-show="!chart3List || chart3List.length <= 0"
text="暂无数据..."
></Empty>
<div
v-show="chart3List || chart3List.length > 0"
id="chart3"
class="btnChart"
/>
</div> </div>
</div> </div>
</div> </div>
@ -65,7 +131,7 @@ import chart1 from "./assets/charts";
import chart2 from "./assets/charts2"; import chart2 from "./assets/charts2";
import chart3 from "./assets/charts3"; import chart3 from "./assets/charts3";
import ElQuarterPicker from "./ElQuarterPicker"; import ElQuarterPicker from "./ElQuarterPicker";
import moment from 'moment'; import moment from "moment";
import { import {
getWarningTrend, getWarningTrend,
getWarningSectionType, getWarningSectionType,
@ -204,7 +270,7 @@ export default {
], ],
}; };
}, },
created() { }, created() {},
methods: { methods: {
selectProgress(item, index) { selectProgress(item, index) {
this.selectIndex = index; this.selectIndex = index;
@ -255,18 +321,19 @@ export default {
chart1.series[0].data = []; chart1.series[0].data = [];
chart1.xAxis.data = []; chart1.xAxis.data = [];
// //
if (this.type == "month") { if (this.type == "month") {
let daysInMonth = moment(this.dateTime, "YYYY-MM").daysInMonth(); let daysInMonth = moment(this.dateTime, "YYYY-MM").daysInMonth();
let sData = {}; let sData = {};
data.forEach(it => sData[parseInt(it.day.slice(-2))] = it.number) data.forEach(
let pData = [] (it) => (sData[parseInt(it.day.slice(-2))] = it.number)
);
let pData = [];
for (let index = 1; index <= daysInMonth; index++) { for (let index = 1; index <= daysInMonth; index++) {
pData.push({ pData.push({
day: index, day: index,
number: sData[index] || 0 number: sData[index] || 0,
}) });
} }
data = pData; data = pData;
} }
@ -278,15 +345,15 @@ export default {
3: [7, 8, 9], 3: [7, 8, 9],
4: [10, 11, 12], 4: [10, 11, 12],
}; };
let sData = {} let sData = {};
data.forEach(it => sData[it.month] = it.number); data.forEach((it) => (sData[it.month] = it.number));
let pData = [] let pData = [];
for (let index = 0; index < 3; index++) { for (let index = 0; index < 3; index++) {
let month = quarterMap[this.quarter][index]; let month = quarterMap[this.quarter][index];
pData.push({ pData.push({
month: month, month: month,
number: sData[month] || 0 number: sData[month] || 0,
}) });
} }
data = pData; data = pData;
} }
@ -515,10 +582,10 @@ export default {
// this.type = "date"; // this.type = "date";
}, },
changeType() { changeType() {
if (this.type == 'date') { if (this.type == "date") {
this.dateTime = moment(new Date()).format("YYYY-MM-DD") this.dateTime = moment(new Date()).format("YYYY-MM-DD");
} }
} },
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
@ -569,28 +636,28 @@ export default {
// //
// //
// var gr = context.createLinearGradient(247, 63, 450, 0); var gr = context.createLinearGradient(247, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)'); gr.addColorStop(1, "rgba(92,197,255,0)");
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); gr.addColorStop(0, "rgba(92,197,255,0.5)");
// drawRoundRect(context, 267, 57, 140, 24, 12, gr) drawRoundRect(context, 357, 98, 140, 24, 12, gr);
// // // //
// var gr = context.createLinearGradient(247, 63, 450, 0); var gr = context.createLinearGradient(247, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)'); gr.addColorStop(1, "rgba(92,197,255,0)");
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); gr.addColorStop(0, "rgba(92,197,255,0.5)");
// drawRoundRect(context, 267, 108, 140, 24, 12, gr) drawRoundRect(context, 357, 130, 140, 24, 12, gr);
// // // //
// var gr = context.createLinearGradient(240, 63, 450, 0); var gr = context.createLinearGradient(240, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)'); gr.addColorStop(1, "rgba(92,197,255,0)");
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); gr.addColorStop(0, "rgba(92,197,255,0.5)");
// drawRoundRect(context, 267, 157, 140, 24, 12, gr) drawRoundRect(context, 357, 162, 140, 24, 12, gr);
// // // //
// var gr = context.createLinearGradient(240, 63, 450, 0); var gr = context.createLinearGradient(240, 63, 450, 0);
// gr.addColorStop(1, 'rgba(92,197,255,0)'); gr.addColorStop(1, "rgba(92,197,255,0)");
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); gr.addColorStop(0, "rgba(92,197,255,0.5)");
// drawRoundRect(context, 267, 208, 140, 24, 12, gr) drawRoundRect(context, 357, 194, 140, 24, 12, gr);
// // // //
// var gr = context.createLinearGradient(240, 63, 450, 0); // var gr = context.createLinearGradient(240, 63, 450, 0);
@ -638,16 +705,21 @@ export default {
justify-content: space-evenly; justify-content: space-evenly;
font-size: 14px; font-size: 14px;
>div { > div {
width: 33%; width: 33%;
height: 470px; height: 470px;
background: linear-gradient(180deg, background: linear-gradient(
rgba(6, 66, 88, 0.2) 0%, 180deg,
#064258 100%); rgba(6, 66, 88, 0.2) 0%,
#064258 100%
);
border: 1px solid; border: 1px solid;
border-image: linear-gradient(360deg, border-image: linear-gradient(
360deg,
rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0.3),
rgba(55, 231, 255, 0)) 1 1; rgba(55, 231, 255, 0)
)
1 1;
} }
:nth-child(1) { :nth-child(1) {
@ -763,12 +835,54 @@ export default {
</style> </style>
<style lang="scss"> <style lang="scss">
div.el-popover:has(> .el-date-picker) div .el-picker-panel__body .el-picker-panel__content table tr td.today span, div.el-popover:has(> .el-date-picker)
div.el-popover:has(> .el-date-picker) div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell, div
div.el-picker-panel.el-date-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today span, .el-picker-panel__body
div.el-picker-panel.el-date-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell, .el-picker-panel__content
div.el-picker-panel.el-date-range-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today span, table
div.el-picker-panel.el-date-range-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell { tr
td.today
span,
div.el-popover:has(> .el-date-picker)
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell,
div.el-picker-panel.el-date-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
span,
div.el-picker-panel.el-date-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell,
div.el-picker-panel.el-date-range-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
span,
div.el-picker-panel.el-date-range-picker.el-popper
div
.el-picker-panel__body
.el-picker-panel__content
table
tr
td.today
.cell {
color: #fff; color: #fff;
} }
</style> </style>

Loading…
Cancel
Save