diff --git a/.vscode/settings.json b/.vscode/settings.json index 1a29f14..9d8722b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,8 @@ { "cSpell.words": [ "daterange", + "errordata", + "logdata", "resourcedata", "resourcename", "rmark" diff --git a/frontend/src/api/error/errorData.ts b/frontend/src/api/error/errorData.ts new file mode 100644 index 0000000..ecfd166 --- /dev/null +++ b/frontend/src/api/error/errorData.ts @@ -0,0 +1,36 @@ +import type {ErrorSystem} from "./interface" + +const errordata = ref([ + { + 'id': '1', + 'name': 'Q/GDW 1650.2- 2016', + 'year':'2016', + 'level':'A级', + 'details': [ + { measured: '详细1-1', deviceLevel: '详细1-2', condition: '详细1-3', maxErrorValue: '详细1-4' }, + { measured: '详细1-5', deviceLevel: '详细1-6', condition: '详细1-7', maxErrorValue: '详细1-8' }, + ], + }, + { + 'id': '2', + 'name': 'Q/GDW 10650.2 - 2021', + 'year':'2021', + 'level':'A级', + 'details': [ + { measured: '详细1-1', deviceLevel: '详细1-2', condition: '详细1-3', maxErrorValue: '详细1-4' }, + { measured: '详细1-5', deviceLevel: '详细1-6', condition: '详细1-7', maxErrorValue: '详细1-8' }, + ], + }, + { + 'id': '3', + 'name': 'GBT 19862 - 2016', + 'year':'2016', + 'level':'A级', + 'details': [ + { measured: '详细1-1', deviceLevel: '详细1-2', condition: '详细1-3', maxErrorValue: '详细1-4' }, + { measured: '详细1-5', deviceLevel: '详细1-6', condition: '详细1-7', maxErrorValue: '详细1-8' }, + ], + }, + ]) + + export default errordata \ No newline at end of file diff --git a/frontend/src/api/error/interface/index.ts b/frontend/src/api/error/interface/index.ts new file mode 100644 index 0000000..5f3c9d6 --- /dev/null +++ b/frontend/src/api/error/interface/index.ts @@ -0,0 +1,17 @@ +// 误差体系模块 +export namespace ErrorSystem { + // 误差体系列表 + export interface ErrorSystemList { + id: string;//误差体系表Id + name: string;//误差体系名称 + year:string;//标准实施年份 + level:string;//使用设备等级 + details?: Array<{ + measured: string;//被测量 + deviceLevel: string;//检测装置级别 + condition: string;//测量条件 + maxErrorValue: string;//最大误差 + }>; // 详细信息 + } + + } \ No newline at end of file diff --git a/frontend/src/api/log/interface/index.ts b/frontend/src/api/log/interface/index.ts new file mode 100644 index 0000000..104e769 --- /dev/null +++ b/frontend/src/api/log/interface/index.ts @@ -0,0 +1,13 @@ +// 日志管理模块 +export namespace Log { + // 日志列表 + export interface LogList { + id: string;//日志表Id + content: string;//日志内容 + user:string;//操作用户 + record_Time:string;//记录时间 + type:string;//日志类型 + level:string;//日志等级 + } + + } \ No newline at end of file diff --git a/frontend/src/api/log/logData.ts b/frontend/src/api/log/logData.ts new file mode 100644 index 0000000..d4205d6 --- /dev/null +++ b/frontend/src/api/log/logData.ts @@ -0,0 +1,62 @@ +import type {Log} from "./interface" + +const logdata = ref([ + { + 'id': '1', + 'content': 'Admin用户09:35:47,790 登录系统', + 'user':'Admin', + 'record_Time':'2024-10-16 12:13:14', + 'type':'操作日志', + 'level':'/', + }, + { + 'id': '2', + 'content': 'Admin用户09:35:47,891 新建设备 “模拟式装置1”', + 'user':'Admin', + 'record_Time':'2024-10-16 12:13:14', + 'type':'操作日志', + 'level':'/', + }, + { + 'id': '3', + 'content': 'User用户 09:35:56,391 新建设备 “模拟式装置2”', + 'user':'User', + 'record_Time':'2024-10-16 12:13:14', + 'type':'操作日志', + 'level':'/', + }, + { + 'id': '4', + 'content': 'Admin用户09:35:59,977 对 “模拟式装置1”开始进行自动检测', + 'user':'Admin', + 'record_Time':'2024-10-16 12:13:14', + 'type':'操作日志', + 'level':'/', + }, + { + 'id': '5', + 'content': 'User用户09:36:02,229 对 “模拟式装置2”开始进行自动检测', + 'user':'User', + 'record_Time':'2024-10-16 12:13:14', + 'type':'操作日志', + 'level':'/', + }, + { + 'id': '6', + 'content': 'DKLN源回复报文异常,已丢弃。报文长度为XX,内容为:“XXXXXXX”', + 'user':'Admin', + 'record_Time':'2024-10-16 12:13:14', + 'type':'告警日志', + 'level':'WARN(警告)', + }, + { + 'id': '7', + 'content': 'IP:192.168.1.205 的装置第1通道触发QVVR01报告失败', + 'user':'AA', + 'record_Time':'2024-10-16 12:13:14', + 'type':'告警日志', + 'level':'ERROR(一般错误)', + }, +]) + +export default logdata \ No newline at end of file diff --git a/frontend/src/api/resource/resourceData.ts b/frontend/src/api/resource/resourceData.ts index c8dfaca..6a543a4 100644 --- a/frontend/src/api/resource/resourceData.ts +++ b/frontend/src/api/resource/resourceData.ts @@ -244,6 +244,7 @@ const resourcedata = ref([ } ] }, + ]) export default resourcedata \ No newline at end of file diff --git a/frontend/src/api/system/dict/dictExample.ts b/frontend/src/api/system/dict/dictExample.ts new file mode 100644 index 0000000..bee602d --- /dev/null +++ b/frontend/src/api/system/dict/dictExample.ts @@ -0,0 +1,139 @@ +import { type Dict } from "@/api/system/dict/interface"; + +export const dictTypeList: Dict.ResDictType[] = [ + { + id: "1", + name: "用户性别", + code: "EXAMPLE_CODE1", + sort: 1, + openLevel: 1, + openDescribe: 1, + remark: "示例描述1221", + state: 1, + createBy: "admin", + createTime: "2023-10-01 12:00:00", + updateBy: "admin", + updateTime: "2023-10-12 14:40:00", + }, + { + id: "231", + name: "菜单状态", + code: "EXAMPLE_CODE2", + sort: 1, + openLevel: 1, + openDescribe: 1, + remark: "示例描述11133", + state: 0, + createBy: "admin", + createTime: "2023-10-01 12:00:00", + updateBy: "admin", + updateTime: "2023-10-10 12:00:00", + }, + { + id: "33", + name: "系统开关", + code: "EXAMPLE_CODE3", + sort: 1, + openLevel: 1, + openDescribe: 1, + remark: "示例描述111344", + state: 1, + createBy: "admin", + createTime: "2023-10-01 12:00:00", + updateBy: "admin", + updateTime: "2023-10-10 12:00:00", + }, +]; + +export const dictDataList: Dict.ResDictData[] = [ + { + id: "210", + typeId: "101", + name: "字典项1", + code: "EXAMPLE_00111", + sort: 1, + level: 1, + algoDescribe: null, + value: "字典值1", + state: 1, + createBy: "admin", + createTime: "2023-10-01 12:00:00", + updateBy: "admin", + updateTime: "2023-10-01 14:43:03", + }, + { + id: "2210", + typeId: "101", + name: "字典项2", + code: "EXAMPLE_00121", + sort: 1, + level: 2, + algoDescribe: null, + value: "字典值2", + state: 1, + createBy: "admin", + createTime: "2023-10-03 12:00:00", + updateBy: "admin", + updateTime: "2023-10-05 14:43:03", + }, + { + id: "212", + typeId: "101", + name: "字典项3", + code: "EXAMPLE_00141", + sort: 1, + level: 3, + algoDescribe: null, + value: "字典值3", + state: 0, + createBy: "admin", + createTime: "2023-10-01 11:00:00", + updateBy: "admin", + updateTime: "2023-10-05 16:43:03", + }, + { + id: "210", + typeId: "101", + name: "字典项4", + code: "EXAMPLE_00311", + sort: 1, + level: null, + algoDescribe: null, + value: "字典值4", + state: 0, + createBy: "admin", + createTime: "2023-10-03 12:40:00", + updateBy: "admin", + updateTime: "2023-10-04 14:43:03", + }, + { + id: "217", + typeId: "101", + name: "字典项5", + code: "EXAMPLE_00341", + sort: 1, + level: undefined, + algoDescribe: null, + value: "字典值5", + state: 1, + createBy: "admin", + createTime: "2023-10-06 12:45:03", + updateBy: "admin", + updateTime: "2023-10-07 19:37:03", + }, + { + id: "237", + typeId: "101", + name: "字典项6", + code: "EXAMPLE_00318", + sort: 1, + level: 0, + algoDescribe: null, + value: "字典值6", + state: 1, + createBy: "admin", + createTime: "2023-10-16 10:45:03", + updateBy: "admin", + updateTime: "2023-10-17 19:37:03", + }, +]; diff --git a/frontend/src/api/system/dict/index.ts b/frontend/src/api/system/dict/index.ts new file mode 100644 index 0000000..9e42def --- /dev/null +++ b/frontend/src/api/system/dict/index.ts @@ -0,0 +1,70 @@ +import http from "@/api"; +import { ADMIN as rePrefix } from "@/api/config/serviceName"; +import { type Dict } from "@/api/system/dict/interface"; + +//获取字典类型 +export const getDictTypeList = (params: Dict.ReqDictTypeParams) => { + return http.post(`${rePrefix}/dict/list`, params); +}; + +//添加字典类型 +export const addDictType = (params: Dict.ReqDictTypeParams) => { + return http.post(`${rePrefix}/dict/add`,params); +}; + +//删除字典类型 +export const deleteDictType = (params: { id: string[] }) => { + return http.post(`${rePrefix}/dict/delete`, { data: params }); +}; + +//编辑字典类型 +export const updateDictType = (params: Dict.ReqDictTypeParams) => { + return http.post(`${rePrefix}/dict/update`, params); +}; + +//导出字典类型 +export const exportDictType = (params: Dict.ResDictType) => { + return http.download(`${rePrefix}/dict/export`, params); +}; + +//批量添加字典类型 +export const batchAddDictType = (params: FormData) => { + return http.post(`${rePrefix}/dict/import`, params); +}; + + + + + +//获取字典数据 +export const getDictDataList = (params: Dict.ReqDictDataParams) => { + return http.post(`${rePrefix}/dict-data/list`, params); +}; + +//添加字典数据 +export const addDictData = (params: Dict.ReqDictDataParams) => { + return http.post(`${rePrefix}/dict-data/add`, params); +}; + +//删除字典数据 +export const deleteDictData = (params: { id: string[] }) => { + return http.post(`${rePrefix}/dict-data/delete`, { data: params }); +}; + +//编辑字典数据 +export const updateDictData = (params: Dict.ReqDictDataParams) => { + return http.post(`${rePrefix}/dict-data/update`, params); +}; + +//导出字典数据 +export const exportDictData = (params: Dict.ResDictData) => { + return http.download(`${rePrefix}/dict-data/export`, params); +}; + +//批量添加字典数据 +export const batchAddDictData = (params: FormData) => { + return http.post(`${rePrefix}/dict-data/import`, params); +}; + + + diff --git a/frontend/src/api/system/dict/interface/index.ts b/frontend/src/api/system/dict/interface/index.ts new file mode 100644 index 0000000..ecc8d5a --- /dev/null +++ b/frontend/src/api/system/dict/interface/index.ts @@ -0,0 +1,43 @@ +import type { ReqPage } from "@/api/interface"; + +export namespace Dict { + + export interface ResDictType { + id: string; // 字典类型表Id + name: string; // 名称 + code: string; // 编码 + sort: number; // 排序 + openLevel: number; // 开启等级:0-不开启;1-开启,默认不开启 + openDescribe: number; // 开启描述:0-不开启;1-开启,默认不开启 + remark?: string | null; // 描述 + state: number; // 状态:0-删除 1-正常 + createBy?: string | null; // 创建用户 + createTime?: string | null; // 创建时间 + updateBy?: string | null; // 更新用户 + updateTime?: string | null; // 更新时间 + } + + export interface ReqDictTypeParams extends ReqPage{ + + } + + export interface ResDictData { + id: string; // 字典数据表Id + typeId: string; // 字典类型表Id + name: string; // 名称 + code: string; // 编码 + sort: number; // 排序 + level?: number | null; // 事件等级:0-普通;1-中等;2-严重 (默认为0) + algoDescribe?: number | null; // 与高级算法内部Id描述对应 + value?: string | null; // 字典针对电压等级 + state: number; // 状态:0-删除 1-正常 + createBy?: string | null; // 创建用户 + createTime?: string | null; // 创建时间 + updateBy?: string | null; // 更新用户 + updateTime?: string | null; // 更新时间 + } + + export interface ReqDictDataParams extends ReqPage{ + + } +} diff --git a/frontend/src/components/Grid/components/GridItem.vue b/frontend/src/components/Grid/components/GridItem.vue index e3b8a2c..65d3ac7 100644 --- a/frontend/src/components/Grid/components/GridItem.vue +++ b/frontend/src/components/Grid/components/GridItem.vue @@ -1,11 +1,10 @@ - diff --git a/frontend/src/components/Grid/index.vue b/frontend/src/components/Grid/index.vue index 9ca5c60..9d86f8d 100644 --- a/frontend/src/components/Grid/index.vue +++ b/frontend/src/components/Grid/index.vue @@ -1,25 +1,11 @@ - diff --git a/frontend/src/components/ProTable/index.vue b/frontend/src/components/ProTable/index.vue index 85169bf..5c30c26 100644 --- a/frontend/src/components/ProTable/index.vue +++ b/frontend/src/components/ProTable/index.vue @@ -1,119 +1,122 @@