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", color: "#3DE8FF",
}, },
}, },
key: "stakeMark[2]", key: "endStakeMark[0]",
}, },
{ {
prefix: { prefix: {
@ -139,7 +139,7 @@ export const startEndStation = {
color: "#3DE8FF", 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", key: "1",
label: "主线关闭", label: "主线关闭",
}, },
{
key: "2",
label: "主线限行",
},
{
key: "3",
label: "主线间隔放行",
},
{
key: "4",
label: "主线并道",
},
{
key: "5",
label: "主线限速",
},
], ],
}, },
}, },
@ -182,6 +198,50 @@ export const tabConfigList = [
label: "原因类型:", label: "原因类型:",
key: "dcEventTrafficControl.causeType", key: "dcEventTrafficControl.causeType",
type: "select", 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.freeway,
PresetFormItems.direction, PresetFormItems.direction,

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

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

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

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

Loading…
Cancel
Save