Commit 027d300f authored by 刘怀志's avatar 刘怀志

新增消息提示功能页面

parent be790c6c
......@@ -358,7 +358,7 @@ export const constantRoutes = [
// 实时过车监控
{
path: '/passingMonitoringIframe',
component: Layout,
component: LayoutIframe,
redirect: '/passingMonitoringIframe/index',
hidden: true,
children: [
......@@ -369,6 +369,35 @@ export const constantRoutes = [
meta: { title: '实时过车监控', icon: 'dashboard' }
}
]
},
// 消息提示
{
path: '/messageNotice',
component: Layout,
redirect: '/messageNotice/index',
children: [
{
path: 'index',
component: () => import('@/views/messageNotice/index'),
name: 'MessageNotice',
meta: { title: '消息提示', icon: 'dashboard' }
}
]
},
// 消息提示
{
path: '/messageNoticeIframe',
component: LayoutIframe,
redirect: '/messageNoticeIframe/index',
hidden: true,
children: [
{
path: 'index',
component: () => import('@/views/messageNotice/index'),
name: 'MessageNoticeIframe',
meta: { title: '消息提示', icon: 'dashboard' }
}
]
}
]
......
<template>
<div class="app-container">
<el-form ref="queryForm" :model="queryParams" size="small" :inline="true">
<el-form-item label="通知时间" prop="occurrenceTime">
<el-date-picker
v-model="queryParams.occurrenceTime"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="gridData"
row-key="menuId"
:row-class-name="tableRowClassName"
@row-click="msgClick"
>
<el-table-column
type="index"
/>
<el-table-column property="createTime" label="通知时间" />
<el-table-column property="noticeTitle" label="通知内容" />
</el-table>
<pagination
:limit.sync="queryParams.pageSize"
:page.sync="queryParams.pageNum"
:total="total"
style="margin-bottom: unset !important;"
@pagination="getList"
/>
</div>
</template>
<script>
// 引入第三方工具包
import { putStorageListRead, storageNoticeList } from '@/api/business/storageManagent'
export default {
name: 'Index',
data() {
return {
gridData: [],
loading: false,
// 查询参数
queryParams: {
occurrenceTime: '',
pageNum: 1,
pageSize: 20
}
}
},
computed: {
},
created() {
this.getList()
},
mounted() {
},
methods: {
tableRowClassName({ row }) {
if (row.status === '1') {
return 'read-row'
}
return ''
},
/** 消息被点击 */
msgClick(row) {
if (row.status !== '1') {
putStorageListRead(row.id)
row.status = '1'
}
},
/** 查询设备列表 */
getList() {
this.loading = true
const temp = {
...this.queryParams,
beginTime: this.queryParams.occurrenceTime ? this.queryParams.occurrenceTime[0] : null,
endTime: this.queryParams.occurrenceTime ? this.queryParams.occurrenceTime[1] : null
}
storageNoticeList(temp).then(response => {
this.gridData = response.rows
this.total = response.total
this.loading = false
})
},
/** 搜索按钮操作 */
handleQuery() {
this.getList()
}
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -35,8 +35,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://10.10.10.148:8080`,
// target: `http://49.232.167.247:22020`,
// target: `http://10.10.10.148:8080`,
target: `http://49.232.167.247:22020`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment