diff --git a/.vscode/settings.json b/.vscode/settings.json index 0141266..52d1be3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,12 @@ { "cSpell.words": [ + "Chns", "daterange", + "devicedata", "errordata", "errordetail", "logdata", + "plandata", "resourcedata", "resourcename", "rmark" diff --git a/frontend/src/api/device/device.ts b/frontend/src/api/device/device.ts index d7cd50a..4342109 100644 --- a/frontend/src/api/device/device.ts +++ b/frontend/src/api/device/device.ts @@ -11,3 +11,8 @@ export const getDeviceList = (params: Device.ReqDeviceParams) => { return http.post>(`/RoleList_Post`, params) // return http.post>(`${rePrefix}/device/list`, params) } + +export const getPlan_DeviceList = (params: Device.DeviceList) => { + //return http.post>(`/RoleList_Post`, params) + // return http.post>(`${rePrefix}/device/list`, params) +} diff --git a/frontend/src/api/device/deviceData.ts b/frontend/src/api/device/deviceData.ts index e638fb8..3158f49 100644 --- a/frontend/src/api/device/deviceData.ts +++ b/frontend/src/api/device/deviceData.ts @@ -45,4 +45,51 @@ const data = [ }, ] - export default data \ No newline at end of file + const plan_devicedata = [ + { + id: '1', //装置序号ID + Name: '设备1', //设备名称 + Dev_Type: 'PQS882A',//设备类型 + Dev_Chns: 1, //设备通道数 + Check_Result: '合格', //检测结果 + Report_State: '已生成', //报告状态 + Document_State: '归档', //归档状态 + Check_State:'检测完成',//检测状态 + ReCheck_Num: 0, //复检次数 + }, + { + id: '2', //装置序号ID + Name: '设备2', //设备名称 + Dev_Type: 'PQS882B4',//设备类型 + Dev_Chns: 4, //设备通道数 + Check_Result: '/', //检测结果 + Report_State: '未生成', //报告状态 + Document_State: '未归档', //归档状态 + Check_State:'未检',//检测状态 + ReCheck_Num: 0, //复检次数 + }, + { + id: '3', //装置序号ID + Name: '设备3', //设备名称 + Dev_Type: 'PQS882B4',//设备类型 + Dev_Chns: 4, //设备通道数 + Check_Result: '/', //检测结果 + Report_State: '未生成', //报告状态 + Document_State: '未归档', //归档状态 + Check_State:'检测中',//检测状态 + ReCheck_Num: 0, //复检次数 + }, + { + id: '4', //装置序号ID + Name: '设备4', //设备名称 + Dev_Type: 'PQS882B4',//设备类型 + Dev_Chns: 4, //设备通道数 + Check_Result: '不合格', //检测结果 + Report_State: '未生成', //报告状态 + Document_State: '未归档', //归档状态 + Check_State:'检测完成',//检测状态 + ReCheck_Num: 1, //复检次数 + }, + ] + + export default {data,plan_devicedata} \ No newline at end of file diff --git a/frontend/src/api/device/interface/index.ts b/frontend/src/api/device/interface/index.ts index 5d6f251..c7ab0a0 100644 --- a/frontend/src/api/device/interface/index.ts +++ b/frontend/src/api/device/interface/index.ts @@ -28,4 +28,41 @@ export namespace Device { deviceCompany: string;//设备厂家 deviceModel: string; //设备模式 模拟 数字 比对 } + + // 被检设备列表 + export interface DeviceList { + id: string; //装置序号ID + Name: string; //设备名称 + Pattern?: string; //设备模式 模拟 数字 比对 + Dev_Type: string;//设备类型 + Dev_Chns: number; //设备通道数 + Dev_Volt?: number; //额定电压(V) + Dev_Curr?: number; //额定电流(A) + Manufacturer?: string;//生产厂家 + CreateDate?: string; //生产日期 + CreateId?: string; //出厂编号 + Hardware_Version?: string; //固件版本 + Software_Version?: string; //软件版本 + IP?: string; //IP地址 + Port?: number; //端口号 + IsEncryption?: string; //装置是否为加密版本 + Series?: string; //装置识别码(3ds加密) + Dev_Key?: string; //装置秘钥(3ds加密) + SampleID?: string; //样品编号 + Arrived_Date?: string; //送样日期 + City_Name?: string; //所属地市名称 + GD_Name?: string; //所属供电公司名称 + Sub_Name?: string; //所属电站名称 + Check_State: string; //检测状态 + Check_Result: string; //检测结果 + Report_State: string; //报告状态 + Document_State: string; //归档状态 + ReCheck_Num: number; //复检次数 + State?: number; //状态 + Create_By?: string; //创建用户 + Create_Time?: string; //创建时间 + Update_By?: string; //更新用户 + Update_Time?: string; //更新时间 + + } } \ No newline at end of file diff --git a/frontend/src/api/plan/interface/index.ts b/frontend/src/api/plan/interface/index.ts new file mode 100644 index 0000000..3dee979 --- /dev/null +++ b/frontend/src/api/plan/interface/index.ts @@ -0,0 +1,44 @@ +import type { ReqPage } from '@/api/interface' +import type { DatetimeFormatProps } from 'vue-i18n'; + +// 检测计划模块 +export namespace Plan { + + // 检测计划列表 + export interface PlanList { + id: string; //检测计划ID + name: string; //检测计划名称 + pattern: string; //模式,字典表(数字、模拟、比对) + father_Plan_Id: string; //父计划ID + dataSource_Id: string; //数据源ID + script_Id: string; //检测脚本ID + error_Sys_Id: string;//误差体系ID + test_State: string; //检测状态 + report_State: string; //报告生成状态 + result: string;//检测结果 + state: number; //状态 + create_By?: string; //创建用户 + create_Time?: string;//创建时间 + update_By?: string; //更新用户 + update_Time?: string; //更新时间 + } + + // 被检设备参数 + export interface ReqPlanParams extends ReqPage { + id: string; //检测计划ID + name: string; //检测计划名称 + pattern: string; //模式,字典表(数字、模拟、比对) + father_Plan_Id: string; //父计划ID + dataSource_Id: string; //数据源ID + script_Id: string; //检测脚本ID + error_Sys_Id: string;//误差体系ID + test_State: string; //检测状态 + report_State: string; //报告生成状态 + result: string;//检测结果 + state: number; //状态 + create_By?: string; //创建用户 + create_Time?: string;//创建时间 + update_By?: string; //更新用户 + update_Time?: string; //更新时间 + } + } \ No newline at end of file diff --git a/frontend/src/api/plan/planData.ts b/frontend/src/api/plan/planData.ts new file mode 100644 index 0000000..19fd254 --- /dev/null +++ b/frontend/src/api/plan/planData.ts @@ -0,0 +1,125 @@ +import type {Plan} from "./interface" + +const plandata = ref([ + { + 'id': '1', + 'name': '检测计划1', + 'pattern':'模拟式', + 'father_Plan_Id':'/', + 'dataSource_Id':'分钟统计数据最大值', + 'script_Id':'国网入网检测脚本(单影响量-模拟式)', + 'error_Sys_Id':'Q/GDW 1650.2- 2016', + 'test_State':'未检', + 'report_State':'未生成', + 'result':'符合', + 'state': 1, + 'create_By':'', + 'create_Time':'', + 'update_By':'', + 'update_Time':'', + }, + { + 'id': '2', + 'name': '检测子计划1-1', + 'pattern':'模拟式', + 'father_Plan_Id':'检测计划1', + 'dataSource_Id':'分钟统计数据最大值', + 'script_Id':'国网入网检测脚本(单影响量-模拟式)', + 'error_Sys_Id':'Q/GDW 1650.2- 2016', + 'test_State':'未检', + 'report_State':'未生成', + 'result':'符合', + 'state': 1, + 'create_By':'', + 'create_Time':'', + 'update_By':'', + 'update_Time':'', + }, + { + 'id': '3', + 'name': '检测子计划1-2', + 'pattern':'模拟式', + 'father_Plan_Id':'检测计划1', + 'dataSource_Id':'分钟统计数据最大值', + 'script_Id':'国网入网检测脚本(单影响量-模拟式)', + 'error_Sys_Id':'Q/GDW 1650.2- 2016', + 'test_State':'未检', + 'report_State':'未生成', + 'result':'符合', + 'state': 1, + 'create_By':'', + 'create_Time':'', + 'update_By':'', + 'update_Time':'', + }, + { + 'id': '4', + 'name': '检测计划2', + 'pattern':'模拟式', + 'father_Plan_Id':'/', + 'dataSource_Id':'分钟统计数据最小值', + 'script_Id':'国网入网检测脚本(单影响量-模拟式)', + 'error_Sys_Id':'Q/GDW 10650.2 - 2021', + 'test_State':'检测完成', + 'report_State':'部分生成', + 'result':'符合', + 'state': 1, + 'create_By':'', + 'create_Time':'', + 'update_By':'', + 'update_Time':'', + }, + { + 'id': '5', + 'name': '检测计划3', + 'pattern':'模拟式', + 'father_Plan_Id':'/', + 'dataSource_Id':'分钟统计数据最大值', + 'script_Id':'/', + 'error_Sys_Id':'/', + 'test_State':'未检', + 'report_State':'未生成', + 'result':'符合', + 'state': 1, + 'create_By':'', + 'create_Time':'', + 'update_By':'', + 'update_Time':'', + }, + { + 'id': '6', + 'name': '检测子计划4', + 'pattern':'模拟式', + 'father_Plan_Id':'/', + 'dataSource_Id':'分钟统计数据CP95值', + 'script_Id':'国网入网检测脚本(单影响量-模拟式)', + 'error_Sys_Id':'Q/GDW 1650.2- 2016', + 'test_State':'未检', + 'report_State':'未生成', + 'result':'符合', + 'state': 1, + 'create_By':'', + 'create_Time':'', + 'update_By':'', + 'update_Time':'', + }, + { + 'id': '7', + 'name': '检测子计划4-1', + 'pattern':'模拟式', + 'father_Plan_Id':'检测计划4', + 'dataSource_Id':'分钟统计数据CP95值', + 'script_Id':'国网入网检测脚本(单影响量-模拟式)', + 'error_Sys_Id':'Q/GDW 1650.2- 2016', + 'test_State':'未检', + 'report_State':'未生成', + 'result':'符合', + 'state': 1, + 'create_By':'', + 'create_Time':'', + 'update_By':'', + 'update_Time':'', + }, +]) + +export default plandata \ No newline at end of file diff --git a/frontend/src/components/TimeControl/index.vue b/frontend/src/components/TimeControl/index.vue index c5fb762..827a3cc 100644 --- a/frontend/src/components/TimeControl/index.vue +++ b/frontend/src/components/TimeControl/index.vue @@ -43,10 +43,11 @@ class='triangle-button' type='primary' @click='prevPeriod' + @change="emitDateChange" >
- + 当前 { emit('update-dates', startDate.value, endDate.value); + //console.log('emitDateChange', startDate.value, endDate.value); }; // 在组件挂载时更新日期范围 @@ -228,6 +230,7 @@ interface TimeUnit { endDateAdjusted.setHours(0, 0, 0, 0); // 仅比较日期部分 isNextDisabled.value = endDateAdjusted >= maxDate; + emitDateChange(); // 变化时也发出更新事件 } // 限制开始日期不能选择超过当前日期 @@ -241,10 +244,7 @@ interface TimeUnit { return date > today.value || (start && date <= start); } - defineExpose({ - startDate, - endDate, - }) + diff --git a/frontend/src/views/log/index.vue b/frontend/src/views/log/index.vue index 5d908db..5314aca 100644 --- a/frontend/src/views/log/index.vue +++ b/frontend/src/views/log/index.vue @@ -13,6 +13,8 @@ 导出csv + + @@ -24,7 +26,7 @@ import ProTable from '@/components/ProTable/index.vue' import { Upload ,DataAnalysis} from '@element-plus/icons-vue' import logDataList from '@/api/log/logData' import type { ColumnProps, ProTableInstance } from '@/components/ProTable/interface' -import { reactive,ref } from 'vue' +import { reactive,ref,watch } from 'vue' let multipleSelection = ref([]) const logData = logDataList // 定义包含和排除的单位 @@ -53,7 +55,7 @@ const columns = reactive[]>([ width: 200, search: { span: 2, - render: ({ searchParam }) => { + render: () => { return (
[]>([ // 处理选择变化 const handleSelectionChange = (selection: Log.LogList[]) => { multipleSelection.value = selection.map(row => row.id) // 更新选中的行 - + } - \ No newline at end of file diff --git a/frontend/src/views/plan/planList/components/PlanOpen.vue b/frontend/src/views/plan/planList/components/PlanOpen.vue new file mode 100644 index 0000000..528c9a4 --- /dev/null +++ b/frontend/src/views/plan/planList/components/PlanOpen.vue @@ -0,0 +1,122 @@ + + + + \ No newline at end of file diff --git a/frontend/src/views/plan/planList/components/details.vue b/frontend/src/views/plan/planList/components/details.vue deleted file mode 100644 index 7b744fe..0000000 --- a/frontend/src/views/plan/planList/components/details.vue +++ /dev/null @@ -1,239 +0,0 @@ - - - diff --git a/frontend/src/views/plan/planList/index.vue b/frontend/src/views/plan/planList/index.vue index 7c3b272..8a32221 100644 --- a/frontend/src/views/plan/planList/index.vue +++ b/frontend/src/views/plan/planList/index.vue @@ -1,481 +1,164 @@ - - + \ No newline at end of file