Browse Source

更新

wangqin
hui 8 months ago
parent
commit
f3d24af1a6
  1. 43
      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

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

@ -251,33 +251,22 @@ export const startEndStation = {
}, },
}; };
// export const direction = { export function directionCreater(type){
// label: "方向:", return {
// key: "direction", label: "路段方向:",
// required: true, key: "direction",
// type: "select", type, //CheckboxGroup 或 RadioGroup
// options: { isAlone: true,
// options: [ default: [],
// // { key: "济南方向", label: "济南方向" }, options: {
// // { key: "菏泽方向", label: "菏泽方向" }, options: [
// ], { key: "1", label: "菏泽方向" },
// }, { key: "2", label: "双向" },
// }; { key: "3", label: "济南方向" },
],
export const direction = { },
label: "路段方向:", };
key: "direction", }
type: "CheckboxGroup",
isAlone: true,
default: [],
options: {
options: [
{ key: "1", label: "济南方向" },
{ key: "3", label: "菏泽方向" },
{ key: "2", label: "双向" },
],
},
};
export const problemDescription = { export const problemDescription = {
label: "问题描述:", 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='board_record'>
<!-- 搜索栏 --> <!-- 搜索栏 -->
<div class="filter"> <div class="filter">
<div> <ButtonGradient @click="onRefreshForm" class="refresh-btn">
<ButtonGradient @click="onRefresh" class="refresh-btn">
<template #prefix> <template #prefix>
<img src="./images/refresh.svg" /> <img src="./images/refresh.svg" />
</template> </template>
@ -16,7 +15,14 @@
新增 新增
</ButtonGradient> --> </ButtonGradient> -->
</div> <InputSearch
ref="searchComp"
style="width: 402px"
:formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }"
@handleSearch="handleSearch"
/>
</div> </div>
<!-- 内容 --> <!-- 内容 -->
@ -30,7 +36,7 @@
<el-table-column <el-table-column
prop="direction" prop="direction"
label="方向" label="方向"
width="120" width="110"
:formatter="formatterDirection" /> :formatter="formatterDirection" />
<ElTableColumn label="内容" prop="releaseContent" width="500" header-align="center"> <ElTableColumn label="内容" prop="releaseContent" width="500" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -41,9 +47,9 @@
</el-carousel> </el-carousel>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn label="状态" prop="releaseStatus" width="120" :formatter="formatterStatus"/> <ElTableColumn label="状态" prop="releaseStatus" width="80" :formatter="formatterStatus"/>
<ElTableColumn label="用户名" prop="releaseUserName" width="180" /> <ElTableColumn label="用户名" prop="releaseUserName" width="120" />
<ElTableColumn label="用户ID" prop="releaseUserId" width="180" /> <ElTableColumn label="用户ID" prop="releaseUserId" width="120" />
<ElTableColumn label="用户IP" prop="releaseIp" width="200" /> <ElTableColumn label="用户IP" prop="releaseIp" width="200" />
<!-- <!--
<ElTableColumn label="操作" width="210"> <ElTableColumn label="操作" width="210">
@ -73,6 +79,8 @@ import Table from '@screen/components/Table.vue';
import request from "@/utils/request"; import request from "@/utils/request";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
import {DirectionTypes} from '@screen/utils/enum.js'; import {DirectionTypes} from '@screen/utils/enum.js';
import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
export default { export default {
name: 'boardRecord', name: 'boardRecord',
@ -80,12 +88,14 @@ export default {
ButtonGradient, ButtonGradient,
Pagination, Pagination,
Table, Table,
BoardRecordPreview BoardRecordPreview,
InputSearch
}, },
data() { data() {
return { return {
testData : {"STAY":"30","ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"32","CONTENT":"因改扩建施工 平阴南、梁山收费站出入口封闭","width":"768","height":"64","formatStyle":"2"}, testData : {"STAY":"30","ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"32","CONTENT":"因改扩建施工 平阴南、梁山收费站出入口封闭","width":"768","height":"64","formatStyle":"2"},
tableData: [], tableData: [],
searchFormList,
isShowPhrases: false, isShowPhrases: false,
isShowDisposal: false, isShowDisposal: false,
total: 20, total: 20,
@ -102,6 +112,40 @@ export default {
this.initData(); this.initData();
}, },
methods: { 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) { indexMethod(index) {
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1; return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1;
}, },
@ -122,11 +166,11 @@ export default {
this.total = result.total; this.total = result.total;
}); });
}, },
onRefresh() { // onRefresh() {
this.tableData = []; // this.tableData = [];
this.searchData.pageNum = 1; // this.searchData.pageNum = 1;
this.initData(); // this.initData();
}, // },
onSizeChange(pageSize) { onSizeChange(pageSize) {
this.tableData = []; this.tableData = [];
this.searchData.pageSize = pageSize; this.searchData.pageSize = pageSize;
@ -178,7 +222,7 @@ export default {
padding: 7px 4px; padding: 7px 4px;
} }
} }
::v-deep .el-table__cell div { ::v-deep .el-table__cell div.cell {
padding: 0 10px !important; padding: 0 10px !important;
} }
} }

Loading…
Cancel
Save