oil-station/fuintAdmin/src/views/notificationList/index.vue

154 lines
3.8 KiB
Vue
Raw Normal View History

2024-10-12 14:51:25 +08:00
<template>
<div>
<div class="top-box">
<span style="cursor: pointer" @click="goback()">当前位置首页--通知公告</span>
</div>
<div class="hui_box">
<div class="top_new">
<el-form :model="queryParams" ref="queryForm" size="small" style="width: 100%" :inline="true" >
<el-form-item label="" prop="deptName">
2024-10-12 14:51:25 +08:00
<el-input
v-model="queryParams.content"
placeholder="请输入选择通知内容的关键词"
2024-10-12 14:51:25 +08:00
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
2024-10-12 14:51:25 +08:00
/>
</el-form-item>
<el-form-item label="" prop="notificationType">
<el-select v-model="queryParams.notificationType" placeholder="请选择通知类型" clearable style="width: 240px;">
<el-option label="到期提醒" value="到期提醒"></el-option>
<el-option label="库存预警" value="库存预警"></el-option>
<!-- 添加其他选项 -->
</el-select>
2024-10-12 14:51:25 +08:00
</el-form-item>
2024-10-12 14:51:25 +08:00
<el-form-item >
</el-form-item>
</el-form>
<div style="height: 32px;width: 20%;display: flex;justify-content: flex-end">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
2024-10-12 14:51:25 +08:00
</div>
</div>
<div class="table-box">
<el-table
:data="tableData"
2024-10-12 14:51:25 +08:00
border
style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column label="通知类型" align="center" prop="notificationType" width="220"/>
<el-table-column label="通知内容" align="center" prop="templateContent"/>
<el-table-column label="创建人" align="center" prop="createName"/>
<el-table-column label="创建时间" align="center" prop="createTime"/>
<el-table-column label="发送时间" align="center" prop="createTime"/>
2024-10-12 14:51:25 +08:00
</el-table>
<div class="pagination-box">
<pagination
2024-10-12 14:51:25 +08:00
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
2024-10-12 14:51:25 +08:00
</div>
</div>
</div>
</div>
</template>
<script>
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
2024-10-12 14:51:25 +08:00
export default {
name: "order_Goods",
data() {
return {
tableData: [],
2024-10-12 14:51:25 +08:00
beginTime:'',
endTime:'',
queryParams: {
page: 1,
pageSize: 10,
},
total:0
}
},
created() {
this.getList()
},
2024-10-12 14:51:25 +08:00
methods:{
handleQuery(){
this.getList()
},
resetQuery(){
this.queryParams = {
page: 1,
pageSize: 10,
deviceName:'',
},
this.getList()
},
2024-10-12 14:51:25 +08:00
getList(){
getNotificationlogList(this.queryParams).then(res=>{
this.tableData = res.data.records;
this.total = res.data.total
})
2024-10-12 14:51:25 +08:00
},
goback(){
this.$router.go(-1)
}
}
}
</script>
<style scoped lang="scss">
.top_new{
display: flex;
justify-content: space-between;
background: #fff;
width: 100%;
border-radius: 8px;
box-sizing: border-box;
height: 64px;
margin-bottom: 5px;
box-sizing: border-box;
padding: 15px;
border-radius: 8px;
}
.table-box {
width: 100%;
2024-11-05 18:04:38 +08:00
height: 81vh;
2024-10-12 14:51:25 +08:00
overflow: auto;
background: #FFF;
box-sizing: border-box;
padding: 15px;
border-radius: 8px;
min-height: 78vh;
}
.hui_box{
box-sizing: border-box;
2024-11-05 18:04:38 +08:00
padding: 10px;
padding-bottom: 0px;
2024-10-12 14:51:25 +08:00
background: #f6f8f9;
}
.top-box{
width: 100%;
background: #fff;
box-sizing: border-box;
padding: 10px;
display: flex;
align-items: center;
font-weight: 400;
font-size: 12px;
color: #666666;
padding-left: 25px;
}
</style>