|
@@ -1,20 +1,8 @@
|
|
<template>
|
|
<template>
|
|
<div class="alarm-history-table">
|
|
<div class="alarm-history-table">
|
|
- <BasicTable ref="alarmHistory" @register="registerTable" :data-source="dataSource">
|
|
|
|
- <template #bodyCell="{ column, record }">
|
|
|
|
- <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
|
|
|
|
- record.warnFlag == '0' ? '正常' : '报警'
|
|
|
|
- }}</a-tag>
|
|
|
|
- <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
|
|
|
|
- record.netStatus == '0' ? '断开' : '连接'
|
|
|
|
- }}</a-tag>
|
|
|
|
- <template v-if="column.dataIndex === 'nwartype'">
|
|
|
|
- <!-- 除了 101(蓝色预警)其他都是红色字体 -->
|
|
|
|
- <span :class="{ 'color-#ff3823': ['102', '103', '104', '201', '1001'].includes(record.nwartype) }">
|
|
|
|
- {{ render.renderDictText(record.nwartype, 'leveltype') || '-' }}
|
|
|
|
- </span>
|
|
|
|
- </template>
|
|
|
|
- <slot name="filterCell" v-bind="{ column, record }"></slot>
|
|
|
|
|
|
+ <BasicTable ref="historyTable" @register="registerTable" :data-source="dataSource">
|
|
|
|
+ <template #form-submitBefore>
|
|
|
|
+ <a-button type="primary" preIcon="ant-design:search-outlined" @click="getDeviceList">查询</a-button>
|
|
</template>
|
|
</template>
|
|
</BasicTable>
|
|
</BasicTable>
|
|
</div>
|
|
</div>
|
|
@@ -28,6 +16,7 @@ import { useListPage } from '/@/hooks/system/useListPage';
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
|
+import { render } from '/@/utils/common/renderUtils';
|
|
import { getAutoScrollContainer } from '/@/utils/common/compUtils';
|
|
import { getAutoScrollContainer } from '/@/utils/common/compUtils';
|
|
import { usePermission } from '/@/hooks/web/usePermission';
|
|
import { usePermission } from '/@/hooks/web/usePermission';
|
|
|
|
|
|
@@ -100,6 +89,7 @@ watch(
|
|
return props.columnsType;
|
|
return props.columnsType;
|
|
},
|
|
},
|
|
async (newVal) => {
|
|
async (newVal) => {
|
|
|
|
+ console.log(props.columnsType, 'asdasdadas');
|
|
if (!newVal) return;
|
|
if (!newVal) return;
|
|
const column = getTableHeaderColumns(props.deviceType + '_alarmNum');
|
|
const column = getTableHeaderColumns(props.deviceType + '_alarmNum');
|
|
columns.value = column;
|
|
columns.value = column;
|
|
@@ -135,7 +125,7 @@ const { tableContext } = useListPage({
|
|
columns: props.columnsType ? columns : (props.columns as any[]),
|
|
columns: props.columnsType ? columns : (props.columns as any[]),
|
|
canResize: true,
|
|
canResize: true,
|
|
showTableSetting: false,
|
|
showTableSetting: false,
|
|
- showActionColumn: !hasPermission('ventanalyAlarmAnalysis:noShow'),
|
|
|
|
|
|
+ showActionColumn: false,
|
|
bordered: false,
|
|
bordered: false,
|
|
size: 'small',
|
|
size: 'small',
|
|
scroll: tableScroll,
|
|
scroll: tableScroll,
|
|
@@ -143,7 +133,8 @@ const { tableContext } = useListPage({
|
|
formConfig: {
|
|
formConfig: {
|
|
labelAlign: 'left',
|
|
labelAlign: 'left',
|
|
showAdvancedButton: false,
|
|
showAdvancedButton: false,
|
|
- // autoAdvancedCol: 2,
|
|
|
|
|
|
+ showSubmitButton: false,
|
|
|
|
+ showResetButton: false,
|
|
schemas: [
|
|
schemas: [
|
|
{
|
|
{
|
|
field: 'createTime_begin',
|
|
field: 'createTime_begin',
|
|
@@ -178,9 +169,9 @@ const { tableContext } = useListPage({
|
|
],
|
|
],
|
|
// fieldMapToTime: [['createTime', ['createTime_begin', 'createTime_end'], '']],
|
|
// fieldMapToTime: [['createTime', ['createTime_begin', 'createTime_end'], '']],
|
|
},
|
|
},
|
|
- // fetchSetting: {
|
|
|
|
- // listField: 'records',
|
|
|
|
- // },
|
|
|
|
|
|
+ fetchSetting: {
|
|
|
|
+ listField: 'records',
|
|
|
|
+ },
|
|
pagination: {
|
|
pagination: {
|
|
current: 1,
|
|
current: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|