|
@@ -75,6 +75,7 @@ import {ref, reactive, onMounted, onActivated, onDeactivated} from "vue";
|
|
import { ColumnProps } from "@/components/ProTable/interface";
|
|
import { ColumnProps } from "@/components/ProTable/interface";
|
|
import { getPlatformList, getTacRecordList} from "@/api/modules/allData";
|
|
import { getPlatformList, getTacRecordList} from "@/api/modules/allData";
|
|
import {Platform} from "@/api/interface";
|
|
import {Platform} from "@/api/interface";
|
|
|
|
+import {ElTable} from "element-plus";
|
|
const pageable = ref<any>({
|
|
const pageable = ref<any>({
|
|
as_code_list: [],
|
|
as_code_list: [],
|
|
tact_state_on: true,
|
|
tact_state_on: true,
|
|
@@ -83,7 +84,7 @@ const pageable = ref<any>({
|
|
pageSize: 20,
|
|
pageSize: 20,
|
|
total: 1
|
|
total: 1
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+const tableRef = ref<InstanceType<typeof ElTable>>();
|
|
const as_code_list = ref('')
|
|
const as_code_list = ref('')
|
|
|
|
|
|
const changeCodeList =(value)=>{
|
|
const changeCodeList =(value)=>{
|
|
@@ -164,36 +165,11 @@ function findLabelByValue(noticeTypeList, value) {
|
|
return item ? item.label : null;
|
|
return item ? item.label : null;
|
|
}
|
|
}
|
|
|
|
|
|
-const handleSortChange = ({ column, prop, order }) =>{
|
|
|
|
- // 在这里发送请求到服务器端进行远程排序
|
|
|
|
- console.log('column:', column)
|
|
|
|
- console.log('prop:', prop)
|
|
|
|
- console.log('order:', order)
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if (order === null||order === 'descending') {
|
|
|
|
- if (pageable.value.data_items && pageable.value.data_items.length > 0) {
|
|
|
|
- pageable.value.data_items.forEach(item => {
|
|
|
|
- if (item.data_id === prop) {
|
|
|
|
- item.data_order = 0; // 降序
|
|
|
|
- } else {
|
|
|
|
- item.data_order = 0; // 确保其他项为0
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }else if (order === 'ascending') {
|
|
|
|
- if (pageable.value.data_items && pageable.value.data_items.length > 0) {
|
|
|
|
- pageable.value.data_items.forEach(item => {
|
|
|
|
- if (item.data_id === prop) {
|
|
|
|
- item.data_order = 1; // 升序
|
|
|
|
- } else {
|
|
|
|
- item.data_order = 0; // 确保其他项为0
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- getList();
|
|
|
|
-}
|
|
|
|
|
|
+const handleSortChange = ({ column, prop, order }) => {
|
|
|
|
+ console.log('column:', column);
|
|
|
|
+ console.log('prop:', prop);
|
|
|
|
+ console.log('order:', order);
|
|
|
|
+};
|
|
|
|
|
|
|
|
|
|
// 查询功能
|
|
// 查询功能
|
|
@@ -204,20 +180,14 @@ const handleQuery = () => {
|
|
|
|
|
|
//清空查询
|
|
//清空查询
|
|
const resetQuery = () => {
|
|
const resetQuery = () => {
|
|
|
|
+
|
|
|
|
+ as_code_list.value = '';
|
|
pageable.value.pageNum = 1;
|
|
pageable.value.pageNum = 1;
|
|
- pageable.value = {
|
|
|
|
- as_code_list: [],
|
|
|
|
- tact_state_on: true,
|
|
|
|
- tact_data_on: false,
|
|
|
|
- tact_data: 0,
|
|
|
|
- begin_time: undefined,
|
|
|
|
- end_time: undefined,
|
|
|
|
-
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 20,
|
|
|
|
- total: 1
|
|
|
|
- }
|
|
|
|
|
|
+ pageable.value.as_code_list= []
|
|
|
|
+ pageable.value.pageSize =20
|
|
|
|
+ pageable.value.total = 0
|
|
timeBegin.value = undefined
|
|
timeBegin.value = undefined
|
|
|
|
+ getList()
|
|
};
|
|
};
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -250,8 +220,8 @@ const columns = reactive<ColumnProps[]>([
|
|
{ prop: "tact_state", label: "策略状态" },
|
|
{ prop: "tact_state", label: "策略状态" },
|
|
{ prop: "tact_type", label: "告警类型" },
|
|
{ prop: "tact_type", label: "告警类型" },
|
|
{ prop: "data_value", label: "观测值" },
|
|
{ prop: "data_value", label: "观测值" },
|
|
- { prop: "alarm_on_time_i", label: "告警时间",width:150,sortable: true },
|
|
|
|
- { prop: "alarm_off_time_i", label: "消警时间",width:150,sortable: true},
|
|
|
|
|
|
+ { prop: "alarm_on_time_i", label: "告警时间",width:150},
|
|
|
|
+ { prop: "alarm_off_time_i", label: "消警时间",width:150},
|
|
{ prop: "notice_type", label: "通知方式" },
|
|
{ prop: "notice_type", label: "通知方式" },
|
|
{ prop: "remark", label: "告警说明",width:400 }
|
|
{ prop: "remark", label: "告警说明",width:400 }
|
|
]);
|
|
]);
|