Browse Source

事件新增

wangqin
zhoule 10 months ago
parent
commit
db36955b83
  1. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
  2. 60
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/data.js
  3. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/index.vue
  4. 16
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue

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

@ -130,7 +130,7 @@ export const startEndStation = {
color: "#3DE8FF",
},
},
key: "stakeMark[2]",
key: "endStakeMark[0]",
},
{
prefix: {
@ -139,7 +139,7 @@ export const startEndStation = {
color: "#3DE8FF",
},
},
key: "stakeMark[3]",
key: "endStakeMark[1]",
},
],
},

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

@ -138,6 +138,22 @@ export const tabConfigList = [
key: "1",
label: "主线关闭",
},
{
key: "2",
label: "主线限行",
},
{
key: "3",
label: "主线间隔放行",
},
{
key: "4",
label: "主线并道",
},
{
key: "5",
label: "主线限速",
},
],
},
},
@ -182,6 +198,50 @@ export const tabConfigList = [
label: "原因类型:",
key: "dcEventTrafficControl.causeType",
type: "select",
options: {
options: [
{
value: "3-1",
label: "雨",
},
{
value: "3-2",
label: "雪",
},
{
value: "3-3",
label: "雾",
},
{
value: "3-4",
label: "道路积水",
},
{
value: "3-5",
label: "道路湿滑",
},
{
value: "3-6",
label: "道路结冰",
},
{
value: "3-7",
label: "沙尘暴",
},
{
value: "4-1",
label: "专项工程施工",
},
{
value: "4-2",
label: "改扩建工程施工",
},
{
value: "4-3",
label: "其他施工",
},
]
}
},
PresetFormItems.freeway,
PresetFormItems.direction,

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

@ -69,26 +69,28 @@ export default {
},
methods: {
handleChange({ index }) {
console.log('index',index)
this.index = index;
this.formConfig = tabConfigList[index].formConfig;
},
handleSubmit(){
const formData = this.$refs.FormConfigRef?.formData;
let stakeMark = formData.stakeMark;
let endStakeMark = formData.endStakeMark;
console.log('122', {
eventType: Number(this.index) + 1,
...formData,
stakeMark: stakeMark.length > 0 ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : ''
eventType: Number(this.index) + 1,
stakeMark: (stakeMark && stakeMark.length > 0 ) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '',
endStakeMark: (endStakeMark && endStakeMark.length > 0 ) ? ('K' + endStakeMark[0] + '+' + endStakeMark[1]) : '',
})
// return
request({
url: `/dc/system/event`,
method: "post",
data: {
eventType: Number(this.index) + 1,
...formData,
stakeMark: stakeMark.length > 0 ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : ''
eventType: Number(this.index) + 1,
stakeMark: (stakeMark && stakeMark.length > 0 ) ? ('K' + stakeMark[0] + '+' + stakeMark[1]) : '',
endStakeMark: (endStakeMark && endStakeMark.length > 0 ) ? ('K' + endStakeMark[0] + '+' + endStakeMark[1]) : '',
}
})
.then(() => {

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

@ -17,7 +17,7 @@
</template>
导出
</ButtonGradient>
<ButtonGradient>
<ButtonGradient @click="onRefresh">
<template #prefix>
<img src="./images/refresh.svg" />
</template>
@ -38,7 +38,9 @@
<div class="footer">
<Pagination
@current-change="getData"
@size-change = "onSizeChange"
width="'100%'"
:page-sizes="[12, 16, 20, 30, 50,]"
:page-size="searchData.pageSize"
:current-page.sync="searchData.pageNum"
layout="total, sizes, prev, pager, next"
@ -116,7 +118,7 @@ export default {
eventDetailDialogVisible: false,
isShowAddNew: false,
searchData: {
pageSize: 10,
pageSize: 12,
pageNum: 1,
eventState: null
}
@ -153,6 +155,16 @@ export default {
this.total = result.total;
})
},
onRefresh(){
this.data = [];
setTimeout(()=>{
this.getData();
},100)
},
onSizeChange(pageSize){
this.searchData.pageSize = pageSize
this.getData();
},
onAddNew() {
this.isShowAddNew = true;
},

Loading…
Cancel
Save