|
@@ -0,0 +1,156 @@
|
|
|
+<template>
|
|
|
+ <div class="ioc-notice-list">
|
|
|
+ <div class="ioc-notice-list-header">
|
|
|
+ <span v-if="type==='unReadNotice'">未读通知</span>
|
|
|
+ <span v-else-if="type==='readNotice'">已读通知</span>
|
|
|
+ <span v-else-if="type==='allNotice'">全部通知</span>
|
|
|
+ <span v-else-if="type==='unReadFeedback'">未读反馈</span>
|
|
|
+ <span v-else-if="type==='readFeedback'">已读反馈</span>
|
|
|
+ <span v-else-if="type==='allFeedback'">全部反馈</span>
|
|
|
+ <span v-else></span>
|
|
|
+ </div>
|
|
|
+ <div class="ioc-notice-list-query">
|
|
|
+ <div style="display: inline-block;vertical-align: middle">
|
|
|
+ <a-button >设为已读</a-button>
|
|
|
+ <a-button >删除</a-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="display: inline-block;vertical-align: middle;float: right;">
|
|
|
+ <a-form layout="inline" :form="formData">
|
|
|
+ <a-form-item>
|
|
|
+ <a-select style="width: 120px" placeholder="告警类别">
|
|
|
+ <a-select-option value="system">系统通知</a-select-option>
|
|
|
+ <a-select-option value="device">设备通知</a-select-option>
|
|
|
+ <a-select-option value="alarm">设备告警</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item>
|
|
|
+ <TimeRange></TimeRange>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item>
|
|
|
+ <a-button size="small">重置</a-button>
|
|
|
+ <a-button size="small">查询</a-button>
|
|
|
+ </a-form-item>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="ioc-notice-list-content">
|
|
|
+ <a-table :rowKey="(record, index) => index"
|
|
|
+ style="height: 100%"
|
|
|
+ :columns="columns"
|
|
|
+ :data-source="tableData"
|
|
|
+ :pagination="false"
|
|
|
+ :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
|
+ >
|
|
|
+ <template #operation="text">
|
|
|
+ <a-button type="link">删除</a-button>
|
|
|
+ <a-button type="link" >查看</a-button>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <a-pagination
|
|
|
+ show-size-changer
|
|
|
+ :default-current="3"
|
|
|
+ :total="500"
|
|
|
+ style="float: right"
|
|
|
+ />
|
|
|
+ <br />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TimeRange from "@/components/common/timeRange.vue";
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: {TimeRange},
|
|
|
+ watch: {
|
|
|
+ type: function (val) {
|
|
|
+ this.refresh();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ formData: {},
|
|
|
+ selectedRowKeys: [],
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '告警类别',
|
|
|
+ dataIndex: 'type',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ key: 'type'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '事件内容',
|
|
|
+ dataIndex: 'content',
|
|
|
+ align: 'center',
|
|
|
+ key: 'content'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '告警地点',
|
|
|
+ dataIndex: 'area',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 240,
|
|
|
+ key: 'area'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '告警时间',
|
|
|
+ dataIndex: 'time',
|
|
|
+ align: 'center',
|
|
|
+ width: 240,
|
|
|
+ key: 'time'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'operation',
|
|
|
+ key: 'operation',
|
|
|
+ width: 200,
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'operation' },
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tableData: [
|
|
|
+ {
|
|
|
+ type: '设备告警',
|
|
|
+ content: '位于1层301的水浸设备出现告警,请尽快派人处理',
|
|
|
+ area: '1层301',
|
|
|
+ time: '2022年7月11日 12:01:00',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ refresh() {
|
|
|
+ this.formData = {};
|
|
|
+ this.selectedRowKeys = [];
|
|
|
+ },
|
|
|
+ onSelectChange(selectedRowKeys) {
|
|
|
+ this.selectedRowKeys = selectedRowKeys;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.ioc-notice-list {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ .ioc-notice-list-header {
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ioc-notice-list-query {
|
|
|
+ margin: 12px 0;
|
|
|
+ }
|
|
|
+ .ioc-notice-list-content {
|
|
|
+ height: 600px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|