diff --git a/src/api/rfid/downtimeRecord/index.ts b/src/api/rfid/downtimeRecord/index.ts new file mode 100644 index 0000000..0c2c4ea --- /dev/null +++ b/src/api/rfid/downtimeRecord/index.ts @@ -0,0 +1,28 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { RfidDowntimeRecordQuery, RfidDowntimeRecordVO } from './types'; + +/** + * 查询停机记录列表(上位机写入,web只读) + * @param query 查询条件 + */ +export const listDowntimeRecord = (query?: RfidDowntimeRecordQuery): AxiosPromise => { + return request({ + url: '/rfid/downtimeRecord/list', + method: 'get', + params: query + }); +}; + +/** + * 导出停机记录 + * @param query 查询条件 + */ +export const exportDowntimeRecord = (query?: RfidDowntimeRecordQuery) => { + return request({ + url: '/rfid/downtimeRecord/export', + method: 'post', + params: query, + responseType: 'blob' + }); +}; diff --git a/src/api/rfid/downtimeRecord/types.ts b/src/api/rfid/downtimeRecord/types.ts new file mode 100644 index 0000000..625e139 --- /dev/null +++ b/src/api/rfid/downtimeRecord/types.ts @@ -0,0 +1,67 @@ +/** + * 停机记录视图对象 + *

+ * 上位机写入,web只读展示。仅暴露核心业务字段。 + *

+ */ +export interface RfidDowntimeRecordVO { + /** + * 标识 + */ + id: string | number; + + /** + * 设备id,对应rfid_device.id + */ + deviceId: string | number; + + /** + * 设备编号 + */ + deviceCode?: string; + + /** + * 设备名称 + */ + deviceName?: string; + + /** + * 读取状态(1-成功;0-失败) + */ + readStatus: string; + + /** + * 记录时间 + */ + recordTime: string; +} + +/** + * 停机记录查询参数 + */ +export interface RfidDowntimeRecordQuery extends PageQuery { + /** + * 设备id + */ + deviceId?: string | number; + + /** + * 读取状态(1-成功;0-失败) + */ + readStatus?: string; + + /** + * 记录时间范围-开始 + */ + beginRecordTime?: string; + + /** + * 记录时间范围-结束 + */ + endRecordTime?: string; + + /** + * 日期范围参数 + */ + params?: Record; +} diff --git a/src/views/rfid/rfidDevice/index.vue b/src/views/rfid/rfidDevice/index.vue index fae94c2..d05b101 100644 --- a/src/views/rfid/rfidDevice/index.vue +++ b/src/views/rfid/rfidDevice/index.vue @@ -17,7 +17,7 @@ :data="locationOptions" node-key="id" :props="{ label: 'locationAlias', children: 'children' }" - default-expand-all + highlight-current :filter-node-method="filterLocationTreeNode" @node-click="handleLocationTreeClick" @@ -183,7 +183,7 @@ - + + + @@ -280,7 +280,7 @@ const locationOptions = ref([]); // 列显隐信息 const columns = ref([ - { key: 0, label: '设备编号', visible: false }, + { key: 0, label: '设备编号', visible: true }, { key: 1, label: '设备名称', visible: true }, { key: 2, label: '所在位置', visible: true }, { key: 3, label: '设备地址', visible: true }, @@ -289,8 +289,8 @@ const columns = ref([ { key: 6, label: '在线状态', visible: false }, { key: 7, label: '告警状态', visible: false }, { key: 8, label: '是否标识', visible: false }, - { key: 9, label: '备注', visible: false }, - { key: 10, label: '创建人', visible: false }, + { key: 9, label: '备注', visible: true }, + { key: 10, label: '创建人', visible: true }, { key: 11, label: '创建时间', visible: false }, { key: 12, label: '更新人', visible: false }, { key: 13, label: '更新时间', visible: false } diff --git a/src/views/rfid/rfidReadRecord/backup.vue b/src/views/rfid/rfidReadRecord/backup.vue new file mode 100644 index 0000000..c9f2adb --- /dev/null +++ b/src/views/rfid/rfidReadRecord/backup.vue @@ -0,0 +1,445 @@ + + + diff --git a/src/views/rfid/rfidReadRecord/index.vue b/src/views/rfid/rfidReadRecord/index.vue index c9f2adb..21e6fdd 100644 --- a/src/views/rfid/rfidReadRecord/index.vue +++ b/src/views/rfid/rfidReadRecord/index.vue @@ -19,9 +19,6 @@ - - - - - - - - - 搜索 重置 @@ -64,27 +42,14 @@ - - + @@ -93,130 +58,31 @@ - - + - - - - - - - - - - - - - - - - - - - - - {{dict.label}} - - - - - - - - - - - - {{dict.label}} - - - - - - - - - - - - - - - -