Browse Source

更新

wangqin
hui 8 months ago
parent
commit
f3d24af1a6
  1. 25
      ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js
  2. 63
      ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/data.js
  3. 72
      ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue

25
ruoyi-ui/src/views/JiHeExpressway/common/PresetFormItems.js

@ -251,33 +251,22 @@ export const startEndStation = {
},
};
// export const direction = {
// label: "方向:",
// key: "direction",
// required: true,
// type: "select",
// options: {
// options: [
// // { key: "济南方向", label: "济南方向" },
// // { key: "菏泽方向", label: "菏泽方向" },
// ],
// },
// };
export const direction = {
export function directionCreater(type){
return {
label: "路段方向:",
key: "direction",
type: "CheckboxGroup",
type, //CheckboxGroup 或 RadioGroup
isAlone: true,
default: [],
options: {
options: [
{ key: "1", label: "济南方向" },
{ key: "3", label: "菏泽方向" },
{ key: "1", label: "菏泽方向" },
{ key: "2", label: "双向" },
{ key: "3", label: "济南方向" },
],
},
};
};
}
export const problemDescription = {
label: "问题描述:",

63
ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/data.js

@ -0,0 +1,63 @@
// import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import * as PresetFormItems from "@screen/common/PresetFormItems.js";
// import { merge, cloneDeep } from "lodash";
export const searchFormList = [
{
label: "时间范围:",
key: "daterange",
required: false,
type: "datePicker",
options: {
type: "daterange",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
},
PresetFormItems.directionCreater("CheckboxGroup"),
{
label: "发布状态:",
key: "releaseStatus",
type: "checkboxGroup",
default: [],
options: {
options: [
{
key: "1",
label: "成功",
},
{
key: "0",
label: "失败",
},
],
},
},
// {
// label: "内容:",
// key: "releaseContent",
// type: "input",
// default: ""
// },
// {
// ...PresetFormItems.station,
// label: "开始桩号:",
// required: false,
// },
// merge(cloneDeep(PresetFormItems.station), {
// options: {
// options: [
// {
// key: "endStakeMark[0]",
// },
// {
// key: "endStakeMark[1]",
// },
// ],
// },
// label: "结束桩号:",
// required: false,
// }),
];

72
ruoyi-ui/src/views/JiHeExpressway/pages/service/boardRecord/index.vue

@ -2,8 +2,7 @@
<div class='board_record'>
<!-- 搜索栏 -->
<div class="filter">
<div>
<ButtonGradient @click="onRefresh" class="refresh-btn">
<ButtonGradient @click="onRefreshForm" class="refresh-btn">
<template #prefix>
<img src="./images/refresh.svg" />
</template>
@ -16,7 +15,14 @@
新增
</ButtonGradient> -->
</div>
<InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }"
@handleSearch="handleSearch"
/>
</div>
<!-- 内容 -->
@ -30,7 +36,7 @@
<el-table-column
prop="direction"
label="方向"
width="120"
width="110"
:formatter="formatterDirection" />
<ElTableColumn label="内容" prop="releaseContent" width="500" header-align="center">
<template slot-scope="scope">
@ -41,9 +47,9 @@
</el-carousel>
</template>
</ElTableColumn>
<ElTableColumn label="状态" prop="releaseStatus" width="120" :formatter="formatterStatus"/>
<ElTableColumn label="用户名" prop="releaseUserName" width="180" />
<ElTableColumn label="用户ID" prop="releaseUserId" width="180" />
<ElTableColumn label="状态" prop="releaseStatus" width="80" :formatter="formatterStatus"/>
<ElTableColumn label="用户名" prop="releaseUserName" width="120" />
<ElTableColumn label="用户ID" prop="releaseUserId" width="120" />
<ElTableColumn label="用户IP" prop="releaseIp" width="200" />
<!--
<ElTableColumn label="操作" width="210">
@ -73,6 +79,8 @@ import Table from '@screen/components/Table.vue';
import request from "@/utils/request";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
import {DirectionTypes} from '@screen/utils/enum.js';
import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
export default {
name: 'boardRecord',
@ -80,12 +88,14 @@ export default {
ButtonGradient,
Pagination,
Table,
BoardRecordPreview
BoardRecordPreview,
InputSearch
},
data() {
return {
testData : {"STAY":"30","ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"32","CONTENT":"因改扩建施工 平阴南、梁山收费站出入口封闭","width":"768","height":"64","formatStyle":"2"},
tableData: [],
searchFormList,
isShowPhrases: false,
isShowDisposal: false,
total: 20,
@ -102,6 +112,40 @@ export default {
this.initData();
},
methods: {
onRefreshForm(){
this.searchData.pageNum = 1;
this.$refs.searchComp.handleResetForm();
},
handleSearch(data) {
let daterange = data.daterange;
console.log(data, "dataaaaaaaaaaaa");
// let dStakeMark = data.stakeMark;
// let dendStakeMark = data.endStakeMark;
// let stakeMark = dStakeMark[0] ? `K${dStakeMark[0]}+${dStakeMark[1]}` : "";
// let endStakeMark = dendStakeMark[0]
// ? `K${dendStakeMark[0]}+${dendStakeMark[1]}`
// : "";
let startTime = "";
let endTime = "";
if(daterange && daterange.length > 0){
startTime = daterange[0];
endTime = daterange[1];
}
this.searchData = {
...this.searchData,
// releaseContent: data.releaseContent || "",
direction: data.direction || "",
startTime,
endTime,
// stakeMark: stakeMark,
// endStakeMark: endStakeMark,
};
this.initData();
},
indexMethod(index) {
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1;
},
@ -122,11 +166,11 @@ export default {
this.total = result.total;
});
},
onRefresh() {
this.tableData = [];
this.searchData.pageNum = 1;
this.initData();
},
// onRefresh() {
// this.tableData = [];
// this.searchData.pageNum = 1;
// this.initData();
// },
onSizeChange(pageSize) {
this.tableData = [];
this.searchData.pageSize = pageSize;
@ -178,7 +222,7 @@ export default {
padding: 7px 4px;
}
}
::v-deep .el-table__cell div {
::v-deep .el-table__cell div.cell {
padding: 0 10px !important;
}
}

Loading…
Cancel
Save