Browse Source

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

wangqin
qingzhengli 9 months ago
parent
commit
fc3696566c
  1. 2
      ruoyi-ui/src/assets/styles/JiHeExpressway.scss
  2. 278
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue
  3. 64
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/OperateRecord.vue
  4. 123
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/components/AddNEditDialog.vue
  5. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js
  6. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  7. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  8. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  9. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  10. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue
  11. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue
  12. 62
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js
  13. 39
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue
  14. 3
      ruoyi-ui/vue.config.js

2
ruoyi-ui/src/assets/styles/JiHeExpressway.scss

@ -98,7 +98,7 @@
color: #fff;
&.is-disabled {
color: #096d8c;
color: #fff;
}
}

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

@ -5,22 +5,30 @@
<Form v-if="!data" :formList="formList" column="2" ref="FormRef" />
<div v-if="peopleList.length" class="people">
<div v-for=" item in peopleList" :class="{ active: getActive(item) }" :key="item.id"
@click="chooseDutyPerson(item)">
<span>{{ item.name || '-' }}</span>
<span>{{ item.contactNumber || '-' }}</span>
<div
v-for="item in peopleList"
:class="{ active: getActive(item) }"
:key="item.id"
@click="chooseDutyPerson(item)"
>
<span>{{ item.name || "-" }}</span>
<span>{{ item.contactNumber || "-" }}</span>
</div>
</div>
<div v-else class="people no-data">暂无人员</div>
<img src="./../images/Line.svg">
<img src="./../images/Line.svg" />
<div class="dutyPeople">
<div :class="['line', { active: active == 'dayShift' }]">
<p @click="active = 'dayShift'">白天值班:</p>
<div>
<p v-for="(item, index) in dayShift" :key="`${item.id}_${index}`" @click="removeDutyPerson(item)">
<p
v-for="(item, index) in dayShift"
:key="`${item.id}_${index}`"
@click="removeDutyPerson(item)"
>
{{ item.name }}
</p>
<div class="no-data" v-if="!dayShift.length">未添加人员</div>
@ -30,17 +38,28 @@
<div :class="['line', { active: active == 'graveyardShift' }]">
<p @click="active = 'graveyardShift'">晚上值班:</p>
<div>
<p v-for="(item, index) in graveyardShift" :key="`${index}_${item.id}`" @click="removeDutyPerson(item)">
<p
v-for="(item, index) in graveyardShift"
:key="`${index}_${item.id}`"
@click="removeDutyPerson(item)"
>
{{ item.name }}
</p>
<div class="no-data" v-if="!graveyardShift.length">未添加人员</div>
<div class="no-data" v-if="!graveyardShift.length">
未添加人员
</div>
</div>
</div>
</div>
</div>
</div>
<template #footer>
<Button :style="{ backgroundColor: '#C9C9C9' }" @click.native="$emit('close')"> 取消</Button>
<Button
:style="{ backgroundColor: '#0E708B' }"
@click.native="$emit('close')"
>
取消</Button
>
<Button @click.native="submit">确认</Button>
</template>
</Dialog>
@ -48,34 +67,34 @@
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import InputSearch from '@screen/components/InputSearch/index.vue';
import Form from '@screen/components/FormConfig';
import Button from "@screen/components/Buttons/Button.vue";
import InputSearch from "@screen/components/InputSearch/index.vue";
import Form from "@screen/components/FormConfig";
import { loadingMessage } from '@screen/utils/common';
import { loadingMessage } from "@screen/utils/common";
import { getSelectOptionsStation } from "@screen/pages/control/event/businessDataManagement/utils.js";
import request from "@/utils/request";
import { Message } from "element-ui";
export default {
name: 'ModifyDutyInformationTable',
name: "ModifyDutyInformationTable",
components: {
Dialog,
Button,
InputSearch,
Form
Form,
},
props: {
visible: {
type: Boolean,
default: false
default: false,
},
data: {
type: Object,
default: null
}
default: null,
},
},
emit: ['close'],
emit: ["close"],
data() {
return {
formList: [
@ -85,11 +104,11 @@ export default {
type: "select",
required: true,
options: {
options: []
options: [],
},
ons: {
change: (id) => this.getPeopleList(id)
}
change: (id) => this.getPeopleList(id),
},
},
{
label: "日期:",
@ -97,29 +116,30 @@ export default {
required: true,
type: "datePicker",
options: {
valueFormat: "yyyy-MM-dd"
}
valueFormat: "yyyy-MM-dd",
},
},
],
value2: null,
dayShift: [],
graveyardShift: [],
peopleList: [],
active: 'dayShift'
}
active: "dayShift",
};
},
computed: {
visibleModel: {
get() {
return this.visible
return this.visible;
},
set(bool) {
this.$emit('close', bool);
}
this.$emit("close", bool);
},
},
getActive() {
return data => this[this.active].findIndex(item => item.id === data.id) != -1;
}
return (data) =>
this[this.active].findIndex((item) => item.id === data.id) != -1;
},
},
watch: {
visible: {
@ -127,33 +147,36 @@ export default {
async handler(bool) {
if (!bool) return;
this.dayShift = [...this.data?.dayShift || []];
this.graveyardShift = [...this.data?.graveyardShift || []];
this.dayShift = [...(this.data?.dayShift || [])];
this.graveyardShift = [...(this.data?.graveyardShift || [])];
if (!this.data) {
const result = await getSelectOptionsStation(2);
this.formList[0].options.options = (result || []);
this.formList[0].options.options = result || [];
return;
}
this.getPeopleList(this.data.station);
}
}
},
},
},
methods: {
chooseDutyPerson(item) {
const hasInserted = this[this.active].find(_item => _item.employeesId === item.id || _item.id === item.id);
const hasInserted = this[this.active].find(
(_item) => _item.employeesId === item.id || _item.id === item.id
);
if (hasInserted) return Message.warning("人员已存在");
this[this.active].push(item)
this[this.active].push(item);
},
removeDutyPerson(item) {
const index = this[this.active].findIndex(_item => _item.id === item.id);
const index = this[this.active].findIndex(
(_item) => _item.id === item.id
);
if (index === -1) return;//Message.warning("");
if (index === -1) return; //Message.warning("");
this[this.active].splice(index, 1);
},
@ -169,20 +192,23 @@ export default {
url: `/business/employees/list`,
method: "GET",
params: {
organizationId: stationId
}
}).then((result) => {
organizationId: stationId,
},
})
.then((result) => {
if (result.code != 200) return Message.error("人员获取失败");
if (!result.rows?.length) return Message.warning("该驻点下暂无人员");
// Message.success("")
this.peopleList = result.rows;
}).catch((err) => {
Message.error("人员获取失败")
}).finally(() => {
closeMessage();
})
.catch((err) => {
Message.error("人员获取失败");
})
.finally(() => {
closeMessage();
});
//,
if (this.data) {
@ -192,17 +218,24 @@ export default {
data: {
station: this.data.station,
date: this.data.date,
}
}).then((result) => {
},
})
.then((result) => {
console.log("result.data:", result.data);
this.dayShift = result.data.filter(item => item.scheduling === "1");
this.dayShift = result.data.filter(
(item) => item.scheduling === "1"
);
console.log("this.dayShift11:", this.dayShift);
this.graveyardShift = result.data.filter(item => item.scheduling === "2");
}).catch((err) => {
Message.error("人员获取失败")
}).finally(() => {
closeMessage();
this.graveyardShift = result.data.filter(
(item) => item.scheduling === "2"
);
})
.catch((err) => {
Message.error("人员获取失败");
})
.finally(() => {
closeMessage();
});
}
},
updateData(data) {
@ -216,16 +249,16 @@ export default {
//,id
employeesId: item.employeesId ? item.employeesId : item.id,
scheduling: 1,
station: data.station
station: data.station,
})),
...this.graveyardShift.map((item) => ({
employeesId: item.employeesId ? item.employeesId : item.id,
scheduling: 2,
station: data.station
station: data.station,
})),
]
}
})
],
},
});
},
async submit() {
let data = this.data;
@ -235,38 +268,44 @@ export default {
}
// console.log("%c [ data ]-202-ModifyDutyInformationTable.vue", "font-size:15px; background:#9afce6; color:#deffff;", data, this.value2);
const closeMessage = loadingMessage({ message: "正在保存值班信息111..." });
const closeMessage = loadingMessage({
message: "正在保存值班信息111...",
});
if (!this.data) {
this.updateData(data).then((result) => {
this.updateData(data)
.then((result) => {
// console.log("%c [ result ]-217-ModifyDutyInformationTable.vue", "font-size:15px; background:#335cf6; color:#77a0ff;", result);
if (result.code != 200) return Message.error("保存失败");
Message.success("保存成功");
this.$emit('close')
}).catch((err) => {
Message.error("保存失败")
}).finally(() => {
closeMessage();
this.$emit("close");
})
.catch((err) => {
Message.error("保存失败");
})
.finally(() => {
closeMessage();
});
return;
} else {
const deleteIds = [];
(this.data.dayShift || []).forEach(item => {
const findIndex = this.dayShift.findIndex(_item => _item.id === item.id);
(this.data.dayShift || []).forEach((item) => {
const findIndex = this.dayShift.findIndex(
(_item) => _item.id === item.id
);
if (findIndex === -1) deleteIds.push(item.id)
if (findIndex === -1) deleteIds.push(item.id);
});
(this.data.graveyardShift || []).forEach(item => {
const findIndex = this.graveyardShift.findIndex(_item => _item.id === item.id);
if (findIndex === -1) deleteIds.push(item.id)
})
(this.data.graveyardShift || []).forEach((item) => {
const findIndex = this.graveyardShift.findIndex(
(_item) => _item.id === item.id
);
if (findIndex === -1) deleteIds.push(item.id);
});
// Promise.allSettled([
// deleteIds?.length ? request({
@ -285,51 +324,59 @@ export default {
// })
//,,
if(deleteIds?.length){
if (deleteIds?.length) {
request({
url: `/business/shifts/${deleteIds.join()}`,
method: "DELETE",
data: {}
}).then((result) => {
data: {},
})
.then((result) => {
if (result.code != 200) return Message.error("修改失败");
this.updateData(this.data).then((result) => {
this.updateData(this.data)
.then((result) => {
if (result.code != 200) return Message.error("修改失败");
Message.success("修改成功");
this.$emit('close')
}).catch((err) => {
Message.error("修改失败")
}).finally(() => {
closeMessage();
this.$emit("close");
})
.catch((err) => {
Message.error("修改失败");
})
}).catch((err) => {
Message.error("删除失败")
}).finally(() => {
.finally(() => {
closeMessage();
});
})
.catch((err) => {
Message.error("删除失败");
})
}else{
this.updateData(this.data).then((result) => {
.finally(() => {
closeMessage();
});
} else {
this.updateData(this.data)
.then((result) => {
if (result.code != 200) return Message.error("修改失败");
Message.success("修改成功");
this.$emit('close')
}).catch((err) => {
Message.error("修改失败")
}).finally(() => {
closeMessage();
this.$emit("close");
})
}
}
.catch((err) => {
Message.error("修改失败");
})
.finally(() => {
closeMessage();
});
}
}
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.ModifyDutyInformationTable {
width: 947px;
height: 658px;
@ -343,7 +390,6 @@ export default {
gap: 24px;
align-items: center;
justify-content: space-between;
}
.body {
@ -363,14 +409,14 @@ export default {
flex: 1;
overflow-y: auto;
>div {
background: #0D5F79;
> div {
background: #0d5f79;
height: 65px;
border-radius: 2px;
font-size: 16px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
letter-spacing: 1px;
display: flex;
@ -382,7 +428,7 @@ export default {
}
.active {
background: linear-gradient(180deg, #00AEE5 0%, #0086B1 100%);
background: linear-gradient(180deg, #00aee5 0%, #0086b1 100%);
}
}
@ -393,11 +439,15 @@ export default {
.active {
p {
background: linear-gradient(180deg, rgba(1, 167, 220, 0) 0%, #01A7DC 100%);
background: linear-gradient(
180deg,
rgba(1, 167, 220, 0) 0%,
#01a7dc 100%
);
}
}
>div {
> div {
display: flex;
gap: 9px;
border-radius: 2px;
@ -405,7 +455,11 @@ export default {
overflow: hidden;
p {
background: linear-gradient(180deg, rgba(0, 148, 255, 0) 0%, rgba(37, 124, 255, .15) 100%);
background: linear-gradient(
180deg,
rgba(0, 148, 255, 0) 0%,
rgba(37, 124, 255, 0.15) 100%
);
height: 42px;
display: flex;
align-items: center;
@ -414,14 +468,14 @@ export default {
font-size: 16px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
border-radius: 2px;
cursor: pointer;
}
>div {
> div {
flex: 1;
display: flex;
gap: 9px;

64
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/OperateRecord.vue

@ -1,13 +1,21 @@
<template>
<Dialog v-model="visibleModel" title="操作记录">
<div class="OperateRecord">
<TimeLine v-if="timeLine2List.length" :data="timeLine2List" direction="right" />
<TimeLine
v-if="timeLine2List.length"
:data="timeLine2List"
direction="right"
/>
<div class="no-data" v-else>暂无操作记录</div>
<div class="bottom">
<Button @click.native="$emit('close')">确认</Button>
<Button :style="{ backgroundColor: '#C9C9C9' }" @click.native="$emit('close')"> 取消</Button>
<Button
:style="{ backgroundColor: '#0E708B' }"
@click.native="$emit('close')"
>
取消</Button
><Button @click.native="$emit('close')">确认</Button>
</div>
</div>
</Dialog>
@ -16,28 +24,28 @@
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import TimeLine from "@screen/components/TimeLine/TimeLine2/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
export default {
name: 'OperateRecord',
name: "OperateRecord",
components: {
Dialog,
Button,
TimeLine
TimeLine,
},
props: {
visible: {
type: Boolean,
default: false
default: false,
},
data: {
type: Object,
default: null
}
default: null,
},
},
emit: ['close'],
emit: ["close"],
data() {
return {
// timeLine2List: Array.from({ length: 6 }).map(() => ({
@ -47,19 +55,19 @@ export default {
// desc: "",
// posts: ''
// })),
timeLine2List: []
}
timeLine2List: [],
};
},
computed: {
visibleModel: {
get() {
if (this.visible) this.getData();
return this.visible
return this.visible;
},
set(bool) {
this.$emit('close', bool);
}
}
this.$emit("close", bool);
},
},
},
methods: {
getData() {
@ -69,26 +77,26 @@ export default {
data: {
date: this.data.date,
station: this.data.station,
}
},
})
.then(result => {
.then((result) => {
if (result.code != 200) return Message.error("获取失败");
this.timeLine2List = result.rows.map(item => ({
this.timeLine2List = result.rows.map((item) => ({
time: item.operationTime,
name: item.nickName,
desc: item.modifyContent,
posts: "操作员"
}))
posts: "操作员",
}));
})
.catch(() => {
Message.error("获取失败")
})
}
}
}
Message.error("获取失败");
});
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.OperateRecord {
width: 540px;
height: 518px;
@ -102,7 +110,7 @@ export default {
gap: 15px;
justify-content: end;
>div {
> div {
width: 96px;
}
}

123
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/components/AddNEditDialog.vue

@ -1,62 +1,70 @@
<template>
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增'">
<div class='AddNEditDialog'>
<Form :value="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="120px" />
<Dialog v-model="modelVisible" :title="data ? '修改' : '新增11'">
<div class="AddNEditDialog">
<Form
:value="formData"
class="form"
ref="FormConfigRef"
:formList="formList"
column="1"
labelWidth="120px"
/>
</div>
<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 @click.native="handleSubmit" :loading="submitting">
确定
</Button>
<Button @click.native="handleSubmit" :loading="submitting"> 确定 </Button>
</template>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Form from '@screen/components/FormConfig';
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import request from "@/utils/request";
import { Message } from "element-ui";
import { addEditFormList } from "./../data"
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js"
import { addEditFormList } from "./../data";
import { stakeMarkToArray, findPathIdByTreeId } from "@screen/utils/index.js";
export default {
name: 'AddNEditDialog',
name: "AddNEditDialog",
components: {
Dialog,
Button,
Form
Form,
},
model: {
prop: 'visible',
event: "update:value"
prop: "visible",
event: "update:value",
},
props: {
visible: Boolean,
data: Object
data: Object,
},
inject: ['setCurrentPage'],
inject: ["setCurrentPage"],
data() {
return {
submitting: false,
formData: {},
formList: addEditFormList
}
formList: addEditFormList,
};
},
computed: {
modelVisible: {
get() {
return this.visible
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
this.$emit("update:value", val);
},
},
},
watch: {
modelVisible: {
@ -64,16 +72,18 @@ export default {
handler(bool) {
if (!bool) return;
this.formData = !this.data ? {} : {
this.formData = !this.data
? {}
: {
...this.data,
deptId: [],
endStakeMark: stakeMarkToArray(this.data.endStakeMark),
startStakeMark: stakeMarkToArray(this.data.startStakeMark),
}
};
this.getSelectOptions();
}
}
},
},
},
methods: {
getSelectOptions() {
@ -85,62 +95,73 @@ export default {
request({
url: `/business/roadSection/roadList`,
method: "POST",
data: {}
data: {},
}),
])
.then(([departmentData, roadData]) => {
if (departmentData.status != 'rejected' && departmentData.value.code == 200) {
]).then(([departmentData, roadData]) => {
if (
departmentData.status != "rejected" &&
departmentData.value.code == 200
) {
this.formList[0].options.options = departmentData.value.data;
if (this.data?.deptId) this.formData.deptId = findPathIdByTreeId(departmentData.value.data, this.data.deptId);
if (this.data?.deptId)
this.formData.deptId = findPathIdByTreeId(
departmentData.value.data,
this.data.deptId
);
this.$refs.FormConfigRef.reset(true)
this.$refs.FormConfigRef.reset(true);
}
if (roadData.status != 'rejected' && roadData.value.code == 200) {
this.formList[1].options.options = roadData.value.data.map(item => ({ key: item.id, label: item.roadName }));
if (roadData.status != "rejected" && roadData.value.code == 200) {
this.formList[1].options.options = roadData.value.data.map(
(item) => ({ key: item.id, label: item.roadName })
);
}
});
},
handleSubmit() {
this.$refs.FormConfigRef.validate()
.then((data) => {
this.$refs.FormConfigRef.validate().then((data) => {
this.submitting = true;
if (data.startStakeMark?.[0]) data.startStakeMark = `K${data.startStakeMark[0]}+${data.startStakeMark[1]}`;
if (data.endStakeMark?.[0]) data.endStakeMark = `K${data.endStakeMark[0]}+${data.endStakeMark[1]}`;
if (data.startStakeMark?.[0])
data.startStakeMark = `K${data.startStakeMark[0]}+${data.startStakeMark[1]}`;
if (data.endStakeMark?.[0])
data.endStakeMark = `K${data.endStakeMark[0]}+${data.endStakeMark[1]}`;
if (data.deptId) data.deptId = data.deptId.slice(-1)[0];
if (this.data) data.id = this.data.id;
request({
url: `/business/roadSection`,
method: this.data ? 'PUT' : 'POST',
data
method: this.data ? "PUT" : "POST",
data,
})
.then(result => {
.then((result) => {
if (result.code != 200) return Message.error(`提交失败!`);
Message.success(`提交成功!`);
this.modelVisible = false;
this.setCurrentPage(1)
this.setCurrentPage(1);
})
.catch((err) => {
console.log("%c [ err ]-110-「DeviceControlDialog.vue」", "font-size:15px; background:#547bf2; color:#98bfff;", err);
console.log(
"%c [ err ]-110-「DeviceControlDialog.vue」",
"font-size:15px; background:#547bf2; color:#98bfff;",
err
);
Message.error(`提交失败!`);
})
.finally(() => {
this.submitting = false;
})
})
}
});
});
},
}
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.AddNEditDialog {
width: 450px;
display: flex;

23
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/jurisdictionalManagement/data.js

@ -4,7 +4,7 @@ import { formList } from "../../../dispatch/EventDetailDialog/data";
export const searchFormList = [
PresetFormItems.startStation,
PresetFormItems.endStation
PresetFormItems.endStation,
];
//里程计算
@ -13,7 +13,7 @@ const mileCal = (data) => {
const start = startStakeMark[0] + "." + Number(startStakeMark[1]);
const end = endStakeMark[0] + "." + Number(endStakeMark[1]);
data.mileage = (Number(end) - Number(start)).toFixed(3);
}
};
export const addEditFormList = [
{
@ -54,7 +54,7 @@ export const addEditFormList = [
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
mileCal(data);
}
},
},
},
{
@ -62,11 +62,11 @@ export const addEditFormList = [
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
mileCal(data);
}
},
},
]
}
},
],
},
}),
merge(cloneDeep(PresetFormItems.endStation), {
required: true,
@ -77,7 +77,7 @@ export const addEditFormList = [
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
mileCal(data);
}
},
},
},
{
@ -85,11 +85,11 @@ export const addEditFormList = [
input(value, ...args) {
const { data, formList } = args.slice(-1)[0];
mileCal(data);
}
},
},
]
}
},
],
},
}),
{
@ -110,6 +110,9 @@ export const addEditFormList = [
},
type: "InputNumber",
key: "mileage",
options: {
min: 0,
},
},
],
},

27
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue

@ -4,8 +4,7 @@
<ElForm :model="formData" inline :rules="rules" ref="ruleForm">
<div class="first">
<el-radio-group v-model="planName">
<el-radio-button label="名称1"></el-radio-button>
<el-radio-button label="名称2"></el-radio-button>
<el-radio-button v-for="item in info" :key="item.id" :label="item.planName"></el-radio-button>
</el-radio-group>
</div>
@ -68,9 +67,9 @@ export default {
},
props: {
visible: Boolean,
detail: {
type: Object,
default: () => { }
info: {
type: Array,
default: () => []
}
},
data() {
@ -95,6 +94,7 @@ export default {
qbb: ''
}],
planName: '',
dcExecuteAction: [],
deviceData: [],
eventOptions: [
{
@ -198,6 +198,8 @@ export default {
modelVisible: {
get() {
if (this.visible) {
this.planName = this.info[0]?.planName || '';
this.dcExecuteAction = this.info[0]?.dcExecuteAction || [];
}
return this.visible;
},
@ -207,15 +209,7 @@ export default {
},
},
methods: {
initData(id = 1) {
request({
url: `/business/plans/list/${id}`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
let data = result.data;
let dcExecuteAction = result.data.dcExecuteAction;
initData(data) {
this.planId = data.id;
this.formData = {
eventCategory: data.eventCategory,
@ -236,11 +230,6 @@ export default {
}
})
}).catch((err) => {
console.log(err)
Message.error("查询事件预案列表失败", err);
})
},
async loadData() {
if (this.deviceData.length <= 0) {

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

@ -18,7 +18,7 @@
</div>
<!-- 确认弹窗 -->
<EventPlanDialog :visible="isShowDialog" @close="onCloseAddNew" />
<EventPlanDialog :visible="isShowDialog" :info="info" @close="onCloseAddNew" />
<template #footer>
<Button style="padding: 0 24px;" @click.native="onDelete">误报</Button>
@ -73,6 +73,7 @@ export default {
return {
formList,
isShowDialog: false,
info: [],
timeLine1List: [{
time: "",
label: "",
@ -188,7 +189,6 @@ export default {
onSubmit() {
this.isShowDialog = true;
let url = '/business/plans/list/warning/type'
let data = {}
if (this.activeName == '-1') {
url = '/business/plans/list/warning/type'
} else {
@ -200,7 +200,7 @@ export default {
data: this.formData
}).then(result => {
if (result.code != 200) return Message.error(result?.msg);
console.log('result', result)
this.info = result.data;
})
}

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

@ -66,18 +66,6 @@ import { Message } from "element-ui";
import { Loading } from 'element-ui';
import { WarningType as warningTypeMapping, WarningSubclass as warningSubclassTypeMapping } from "@screen/utils/enum.js"
function getRandomData(min = 1, max = 15) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getMockData() {
return Array.from({ length: getRandomData(9, 24) }).map(() => ({
time: "2023.12.22 13:00:00",
source: "视频智能识别",
location: "k100+000",
direction: "济南方向",
}));
}
const warningSourceMapping = {
1: '视频AI',

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

@ -412,6 +412,29 @@ const typeMap = {
]
}
const gzztMap = {
"01": '常亮',
"02": '流水',
"03": '闪烁',
"04": '关闭',
}
const gzmsMap = {
"SETMD0": "激光关闭",
"SETMD1": "常亮模式",
"SETMD2": "间隔100ms闪烁模式",
"SETMD3": "间隔200ms闪烁模式",
"SETMD4": "间隔500ms闪烁模式",
"SETMD5": "2次闪烁模式",
"SETMD6": "SOS模式",
"SETMD7": "自定义模式1",
"SETMD8": "自定义模式2",
"SETMD9": "自定义模式3",
}
const controlModelMap = {
"00": '手动模式',
"01": '自动模式',
"02": '万年历',
}
export default {
name: 'addAndEditDialog',
components: {
@ -599,7 +622,15 @@ export default {
let action = {};
if (it.otherConfig) {
let config = JSON.parse(it.otherConfig);
action = { ...it, ...config, qbb: (config?.dcInfoBoardTemplate?.content || '') };
let qbb = ''
if (config.id) {
qbb = config.content;
config = { dcInfoBoardTemplate: config };
}
// if (config.state) {
// config.gzms = config.state
// }
action = { ...it, ...config, qbb: qbb };
}
if (it.deviceList) {
action.deviceList = it.deviceList.split(',').map(str => Number(str));
@ -653,12 +684,16 @@ export default {
if (it.controlModel) {
let other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[it.state]
}
if (it.time && it?.time[0]) {
other = {
controlModel: it.controlModel,
controlModelName: controlModelMap[it.controlModel],
state: it.state,
name: gzztMap[it.state],
startTime: it.time[0],
endTime: it.time[1]
}
@ -668,6 +703,7 @@ export default {
if (it.gzms) {
data.otherConfig = JSON.stringify({
state: it.gzms,
name: gzmsMap[it.gzms],
operationDuration: it.operationDuration,
})
}
@ -678,8 +714,8 @@ export default {
if (valid) {
// this.submitting = false;
let secondFormTable = this.$refs['secondFormTable'].tableData || [];
// console.log('12', secondFormTable);
let thirdFormTable = this.$refs['thirdFormTable'].tableData || [];
console.log('12', thirdFormTable);
let dcArr = [];
let id = '';
if (this.dialogType == 2) id = this.planId;

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

@ -55,11 +55,11 @@
<div v-if="scope.row.deviceType == 12" class="mjs">
<el-select v-model="scope.row.controlModel" placeholder="请选择控制模式">
<el-option label="手动模式" :value="1"></el-option>
<el-option label="自动模式" :value="2"></el-option>
<el-option label="万年历" :value="3"></el-option>
<el-option label="手动模式" value="00"></el-option>
<el-option label="自动模式" value="01"></el-option>
<el-option label="万年历" value="02"></el-option>
</el-select>
<el-time-picker v-if="scope.row.controlModel == 2" v-model="scope.row.time" is-range
<el-time-picker v-if="scope.row.controlModel == '01'" v-model="scope.row.time" is-range
style="" range-separator="-" placeholder="选择时间" value-format="HH:mm" format="HH:mm">
</el-time-picker>
<el-select v-model="scope.row.state" placeholder="工作状态">
@ -329,7 +329,7 @@ export default {
},
dialogSubmit(data) {
this.tableData[this.index].qbb = data.content;
this.tableData[this.index].otherConfig = JSON.stringify({ dcInfoBoardTemplate: data });
this.tableData[this.index].otherConfig = JSON.stringify(data);
}
}
}

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

@ -28,7 +28,7 @@
<ElTableColumn prop="strEventType" label="事件类型" width="100" align="center" />
<ElTableColumn prop="planName" label="预案名称" width="140" align="center" />
<ElTableColumn prop="triggeringCondition" label="检索条件" width="140" />
<ElTableColumn prop="strDeviceType" label="设备类型" width="140" />
<ElTableColumn prop="deviceType" label="设备类型" />
<ElTableColumn prop="controllableDeviceName" label="可控设备"/>
<ElTableColumn prop="controlCommand" label="控制指令" />
<ElTableColumn label="操作" width="210" align="center">
@ -146,7 +146,7 @@ export default {
result.rows.forEach(it => {
it.strEventCategory = it.eventCategory == 1 ? '交通事件' : '感知事件';
it.strEventType = eventTypeMap[it.eventCategory || 0][it.eventType];
it.strDeviceType = deviceMap[it.deviceType];
// it.strDeviceType = deviceMap[it.deviceType];
})
this.tableData = result.rows;
this.total = result.total;

62
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/assets/charts.js

@ -6,15 +6,6 @@ let options = {
valueFormatter: (value) => {
return value + "%";
},
// backgroundColor: "rgba(17,95,182,0.5)",
// textStyle: {
// color: "#fff",
// },
// formatter: function (params) {
// return (
// params[0].name + params[0].seriesName + ": " + params[0].value + "%"
// );
// },
},
grid: {
left: "2%",
@ -36,12 +27,8 @@ let options = {
opacity: 1,
},
},
// lineStyle: {
// show: true,
// type: 'solid'
// },
axisLabel: {
interval: 0,
interval: "auto",
textStyle: {
color: "rgba(255,255,255,0.8)",
fontSize: 14,
@ -51,9 +38,7 @@ let options = {
},
yAxis: [
{
type: "category",
minInterval: 20,
maxInterval: 20,
// type: "category",
name: "",
nameTextStyle: {
align: "left",
@ -84,59 +69,23 @@ let options = {
fontSize: 14,
},
},
data: ["0", "3", "6", "9", "12", "15", "18"],
},
],
legend: {
top: "5%",
right: "5%",
icon: "rect",
itemWidth: 25,
itemHeight: 10,
right: "0",
textStyle: {
color: "#fff",
fontSize: 14,
},
lineStyle: {
show: false,
color: "#00E4BB",
},
data: [
{
name: "高清网络球型摄像机",
itemStyle: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: "#00E4BB", // 0% 处的颜色
},
{
offset: 1,
color: "#003B4E", // 100% 处的颜色
},
],
false
),
},
},
{
name: "增涨率",
itemStyle: {
color: "#755400",
color: "#00D6B2",
},
},
],
itemGap: 12, // 设置间距
},
series: [
// 下半截柱状图
{
name: "在线率",
name: "高清网络枪型固定摄像机",
type: "bar",
barWidth: 12,
barGap: "-100%",
@ -165,7 +114,6 @@ let options = {
);
},
},
data: [],
},
{

39
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/statisticalAnalysis/index.vue

@ -75,10 +75,10 @@
<template slot-scope="scope">
<span>{{
scope.row.direction == "1"
? "上行"
? "菏泽"
: scope.row.direction == "2"
? "中间"
: "下行"
? "双向"
: "济南"
}}</span>
</template>
</el-table-column>
@ -347,18 +347,25 @@ export default {
},
initQueryChart() {
this.setStatus("01", "doing");
let data = this.searchFormList[1].options.options;
let typeLabel = "";
console.log("data", data);
data.forEach((item) => {
if (item.value == this.typeQuery) {
typeLabel = item.label;
}
});
getSystemStatusList({
startTime: this.startTime,
time: this.time,
type: this.typeQuery,
}).then((res) => {
if (res.code == 200) {
if (res.data && Object.keys(res.data).length > 0) {
console.log("res.data", res.data);
// if (res.data && Object.keys(res.data).length > 0) {
console.log("res.data", res.data);
this.setStatus("01", "finish");
let origin = res.data;
let startStamp = +moment(this.startTime).startOf("day").format("x");
let endStamp = +moment(this.time).endOf("day").format("x");
let oneDay = 86400000;
@ -377,15 +384,19 @@ export default {
}
chartsStatistics.xAxis.data = dataX;
chartsStatistics.series[0].data = data0;
chartsStatistics.series[0].name = typeLabel;
chartsStatistics.series[1].data = data1;
chartsStatistics.yAxis[0].name = "在线率(%)";
chartsStatistics.legend = {
show: true,
};
this.$nextTick(() => {
this.queryChart.setOption(chartsStatistics);
});
} else {
this.setStatus("01", "empty");
}
// } else {
// this.setStatus("01", "empty");
// }
}
});
},
@ -400,7 +411,7 @@ export default {
pageSize: pageSize,
}).then((res) => {
if (res.code == 200) {
if (res.rows && res.rows.length > 0) {
// if (res.rows && res.rows.length > 0) {
this.setStatus("02", "finish");
this.pageIndex = pageIndex;
this.pageSize = pageSize;
@ -409,9 +420,9 @@ export default {
this.tableData.forEach((it, index) => {
it.order = (pageIndex - 1) * pageSize + index + 1;
});
} else {
this.setStatus("02", "empty");
}
// } else {
// this.setStatus("02", "empty");
// }
}
});
},

3
ruoyi-ui/vue.config.js

@ -53,9 +53,10 @@ module.exports = {
// target: `http://10.168.69.255:8087`, //正晨后台 连现场物联 刘文阁
// target: `http://10.168.78.135:8087`, //王钦
// target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2
target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.68.42:8087`, //王思祥
// target: `http://10.168.65.194:8087`, //赵祥龙
// target: `http://10.168.65.156:8097`, //孟
target: `http://10.168.65.103:8097`,
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save