表单验证

This commit is contained in:
sjl
2024-10-30 15:19:47 +08:00
parent f9bb15ad24
commit 0c2f59a0a7
21 changed files with 736 additions and 603 deletions

View File

@@ -6,9 +6,11 @@
"errordata",
"errordetail",
"logdata",
"Pids",
"plandata",
"resourcedata",
"resourcename",
"rmark"
"rmark",
"showtest"
]
}

View File

@@ -1,10 +1,10 @@
const data = [
{
id: 'device1',
deviceName:"模拟装置1",
devicename:"模拟装置1",
deviceType:"PQS882B4电能质量监测装置",
deviceChannels:"4",
PlanName: "沧州220kV留古等4座变电站电能质量检测",
Planname: "沧州220kV留古等4座变电站电能质量检测",
deviceUn: "57.74",
deviceIn: "5",
deviceCompany: "南京灿能电力自动化股份有限公司",
@@ -12,10 +12,10 @@ const data = [
},
{
id: 'device2',
deviceName:"模拟装置2",
devicename:"模拟装置2",
deviceType:"PQS882A电能质量监测装置",
deviceChannels:"1",
PlanName: "邯郸220kV团城站等4座站电能质量检测",
Planname: "邯郸220kV团城站等4座站电能质量检测",
deviceUn: "57.74",
deviceIn: "5",
deviceCompany: "南京灿能电力自动化股份有限公司",
@@ -23,10 +23,10 @@ const data = [
},
{
id: 'device3',
deviceName:"模拟装置3",
devicename:"模拟装置3",
deviceType:"PQS882A电能质量监测装置",
deviceChannels:"1",
PlanName: "衡水冀州光伏电站配套出口工程",
Planname: "衡水冀州光伏电站配套出口工程",
deviceUn: "57.74",
deviceIn: "1",
deviceCompany: "南京灿能电力自动化股份有限公司",
@@ -34,10 +34,10 @@ const data = [
},
{
id: 'device4',
deviceName:"模拟装置4",
devicename:"模拟装置4",
deviceType:"PMC-680M-22-22-00-115ANBC电能质量监测装置",
deviceChannels:"4",
PlanName: "深圳市中电软件有限公司委托送检",
Planname: "深圳市中电软件有限公司委托送检",
deviceUn: "57.74",
deviceIn: "5",
deviceCompany: "深圳中电电力技术股份有限公司",
@@ -48,47 +48,47 @@ const data = [
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, //复检次数
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, //复检次数
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, //复检次数
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, //复检次数
name: '设备4', //设备名称
dev_Type: 'PQS882B4',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '不合格', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 1, //复检次数
},
]

View File

@@ -32,37 +32,37 @@ export namespace Device {
// 被检设备列表
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; //更新时间
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; //更新时间
}
}

View File

@@ -2,33 +2,35 @@ import type {ErrorSystem} from "./interface"
const errordata = ref<ErrorSystem.ErrorSystemList[]>([
{
'id': '1',
'name': 'Q/GDW 1650.2- 2016',
'publishTime':'',
'year':'2016',
'level':'A级',
'state':'',
id: '1',
name: 'Q/GDW 1650.2- 2016',
standard_Name:'',
standard_Time:'2016',
dev_Level:'A级',
enable:1,
state:1,
},
{
'id': '2',
'name': 'Q/GDW 10650.2 - 2021',
'publishTime':'',
'year':'2021',
'level':'A级',
'state':'',
id: '2',
name: 'Q/GDW 1650.2- 2021',
standard_Name:'',
standard_Time:'2021',
dev_Level:'A级',
enable:1,
state:1,
},
{
'id': '3',
'name': 'GBT 19862 - 2016',
'publishTime':'',
'year':'2016',
'level':'A级',
'state':'',
id: '3',
name: 'GBT 19862 - 2016',
standard_Name:'',
standard_Time:'2016',
dev_Level:'A级',
enable:1,
state:1,
},
])
const errordetail = ref<ErrorSystem.ErrorSystemDetail[]>([
const errordetail = ref<ErrorSystem.Error_detail[]>([
{
measured: '电压偏差',
deviceLevel: 'A',

View File

@@ -4,19 +4,38 @@ export namespace ErrorSystem {
export interface ErrorSystemList {
id: string;//误差体系表Id
name: string;//误差体系名称
publishTime:string;//发布时间
year:string;//标准实施年份
level:string;//使用设备等级
state:string;//状态
standard_Name:string;//参照标准名称
standard_Time:string;//标准推行时间
dev_Level:string;//使用设备等级
enable:number;//状态0-不启用 1-启用
state:number;//0-删除 1-正常
create_By?:string;//创建用户
create_Time?:string;//创建时间
update_By?:string;//修改用户
update_Time?:string;//修改时间
}
// 查看详细误差体系
export interface ErrorSystemDetail {
measured: string;//被测量
deviceLevel: string;//检测装置级别
measurementType: string;//测量类型
condition: string;//测量条件
maxErrorValue: string;//最大误差
id:string;//误差体系子表ID
error_Sys_Id:string;//所属误差体系ID
type: string;//检测脚本类型,树形字典表(没有树形表则需要拆分字段)
JudgeConditionStart?:number;//误差判断起始值(误差范围)
IsContainStart?:number;//是否包含起始值
JudgeConditionEnd?:number;//误差判断结束值(误差范围)
IsContainEnd?:number;//是否包含结束值
JudgeConditionType?:string;//判断条件值类型(包括值类型,绝对值、相对值)
MaxErrorValue:number;//误差最大值
ErrorValueType:string;//误差值类型包括值类型绝对值、相对值1、相对值2
}
// 查看详细误差体系
export interface Error_detail {
measured: string;
deviceLevel: string;
measurementType:string;
condition: string;
maxErrorValue: string;
}
}

View File

@@ -1,13 +1,15 @@
// 日志管理模块
export namespace Log {
// 审计日志管理模块
export namespace Sys_Log_Audit {
// 日志列表
export interface LogList {
export interface Audit_LogList {
id: string;//日志表Id
content: string;//日志内容
user:string;//操作用户
record_Time:string;//记录时间
type:string;//日志类型
level:string;//日志等级
operate_Type:string;//日志类型
ip:string;//操作IP
result: string;//事件结果
remark: string;//事件描述
warn:number;//告警标志
create_By:string;//创建用户
create_Time:string;//创建时间
}
}

View File

@@ -1,61 +1,75 @@
import type {Log} from "./interface"
import type {Sys_Log_Audit} from "./interface"
const logdata = ref<Log.LogList[]>([
const logdata = ref<Sys_Log_Audit.Audit_LogList[]>([
{
'id': '1',
'content': 'Admin用户09:35:47,790 登录系统',
'user':'Admin',
'record_Time':'2024-10-16 12:13:14',
'type':'操作日志',
'level':'/',
id: '1',
operate_Type:'操作日志',
ip:'192.168.1.139',
result: '登陆成功',
remark: 'Admin用户09:35:47,790 登录系统',
warn:0,
create_By:'Admin',
create_Time:'2024-10-16 12:13:14',
},
{
'id': '2',
'content': 'Admin用户09:35:47,891 新建设备 “模拟式装置1”',
'user':'Admin',
'record_Time':'2024-10-16 12:13:14',
'type':'操作日志',
'level':'/',
id: '2',
operate_Type:'操作日志',
ip:'192.168.1.139',
result: '新建成功',
remark: 'Admin用户09:35:47,891 新建设备 “模拟式装置1”',
warn:0,
create_By:'Admin',
create_Time:'2024-10-16 12:13:14',
},
{
'id': '3',
'content': 'User用户 09:35:56,391 新建设备 “模拟式装置2”',
'user':'User',
'record_Time':'2024-10-16 12:13:14',
'type':'操作日志',
'level':'/',
id: '3',
operate_Type:'操作日志',
ip:'192.168.1.139',
result: '新建成功',
remark: 'User用户 09:35:56,391 新建设备 “模拟式装置2”',
warn:0,
create_By:'User',
create_Time:'2024-10-16 12:13:14',
},
{
'id': '4',
'content': 'Admin用户09:35:59,977 对 “模拟式装置1”开始进行自动检测',
'user':'Admin',
'record_Time':'2024-10-16 12:13:14',
'type':'操作日志',
'level':'/',
id: '4',
operate_Type:'操作日志',
ip:'192.168.1.139',
result: '操作成功',
remark: 'Admin用户09:35:59,977 对 “模拟式装置1”开始进行自动检测',
warn:0,
create_By:'Admin',
create_Time:'2024-10-16 12:13:14',
},
{
'id': '5',
'content': 'User用户09:36:02,229 对 “模拟式装置2”开始进行自动检测',
'user':'User',
'record_Time':'2024-10-16 12:13:14',
'type':'操作日志',
'level':'/',
id: '5',
operate_Type:'操作日志',
ip:'192.168.1.139',
result: '操作成功',
remark: 'User用户09:36:02,229 对 “模拟式装置2”开始进行自动检测',
warn:0,
create_By:'User',
create_Time:'2024-10-16 12:13:14',
},
{
'id': '6',
'content': 'DKLN源回复报文异常已丢弃。报文长度为XX内容为“XXXXXXX”',
'user':'Admin',
'record_Time':'2024-10-16 12:13:14',
'type':'告警日志',
'level':'WARN警告',
id: '6',
operate_Type:'告警日志',
ip:'192.168.1.139',
result: 'warn警告',
remark: 'DKLN源回复报文异常已丢弃。报文长度为XX内容为“XXXXXXX”',
warn:1,
create_By:'Admin',
create_Time:'2024-10-16 12:13:14',
},
{
'id': '7',
'content': 'IP192.168.1.205 的装置第1通道触发QVVR01报告失败',
'user':'AA',
'record_Time':'2024-10-16 12:13:14',
'type':'告警日志',
'level':'ERROR一般错误',
id: '7',
operate_Type:'告警日志',
ip:'192.168.1.205',
result: '报告触发失败',
remark: 'ip192.168.1.205 的装置第1通道触发QVVR01报告失败',
warn:1,
create_By:'AA',
create_Time:'2024-10-16 12:13:14',
},
])

View File

@@ -6,19 +6,22 @@ export namespace Resource {
// 菜单列表
export interface ResResourceList {
id: string;//资源表Id
pid:string;//节点0为根节点
pids?:string;//节点上层所有节点
name: string;//名称
code:string;//资源标识
path:string;//路径
icon?:string;//图标
sort:number;//排序
type:string;//资源类型
remark:string;//资源描述
route_Name:string;//路由名称
create_Time:string;//创建时间
update_Time:string;//更新时间
type:number;//资源类型0-菜单、1-按钮、2-公共资源、3-服务间调用资源
remark?: string;//权限资源描述
state:number;//权限资源状态
create_By?:string;//创建
create_Time?:string;//创建时间
update_By?:string;//更新人
update_Time?:string;//更新时间
children?: ResResourceList[];
}
export interface ResType {
userLabel: string;
userValue: number;
}
}

View File

@@ -4,247 +4,264 @@ import type { Resource } from "./interface"
const resourcedata = ref<Resource.ResResourceList[]>([
{
'id': '1',
'pid':'0',
'pids':'',
'name': '检测计划',
'code':'',
'path':'/plan/planList/index',
'icon':'',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
'type':0,
'remark': '检测计划描述',
'state':1,
},
{
'id': '2',
'name': '台账管理',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '2',
pid:'0',
pids:'',
name: '台账管理',
code:'',
path:'/machine',
icon:'',
sort:100,
type:0,
remark: '台账管理描述',
state:1,
children:[{
'id': '21',
'name': '检测脚本',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '21',
pid:'11',
pids:'',
name: '检测脚本',
code:'',
path:'/machine/testScript/index',
icon:'',
sort:100,
type:0,
remark: '检测脚本描述',
state:1,
},
{
'id': '22',
'name': '被检设备',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '22',
pid:'22',
pids:'',
name: '被检设备',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '被检设备描述',
state:1,
},
{
'id': '23',
'name': '误差体系',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
},{
'id': '24',
'name': '检测源',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
}
]
id: '23',
pid:'23',
pids:'',
name: '误差体系',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '误差体系描述',
state:1,
},
{
'id': '3',
'name': '权限管理',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '24',
pid:'24',
pids:'',
name: '检测源',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '检测源描述',
state:1,
}]
},
{
id: '3',
pid:'0',
pids:'',
name: '权限管理',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '权限管理描述',
state:1,
children:[{
'id': '31',
'name': '用户管理',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '31',
pid:'1',
pids:'',
name: '用户管理',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '用户管理描述',
state:1,
},
{
'id': '32',
'name': '角色管理',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '32',
pid:'2',
pids:'',
name: '角色管理',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '角色管理描述',
state:1,
},
{
'id': '33',
'name': '菜单管理',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
}
]
id: '33',
pid:'3',
pids:'',
name: '菜单管理',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '菜单管理描述',
state:1,
}]
},
{
'id': '4',
'name': '系统配置',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '4',
pid:'0',
pids:'',
name: '系统配置',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '系统配置描述',
state:1,
children:[{
'id': '41',
'name': '通用配置',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '41',
pid:'1',
pids:'',
name: '通用配置',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '通用配置描述',
state:1,
},
{
'id': '42',
'name': '数据字典',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '42',
pid:'2',
pids:'',
name: '数据字典',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '数据字典描述',
state:1,
},
{
'id': '43',
'name': '报告模版',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
},{
'id': '44',
'name': '版本注册',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
}
]
id: '43',
pid:'3',
pids:'',
name: '报告模版',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '报告模版描述',
state:1,
},
{
'id': '5',
'name': '日志管理',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '44',
pid:'4',
pids:'',
name: '版本注册',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '版本注册描述',
state:1,
},]
},
{
'id': '6',
'name': '统计分析',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '5',
pid:'0',
pids:'',
name: '日志管理',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '日志管理描述',
state:1,
},
{
'id': '7',
'name': '示例',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '6',
pid:'0',
pids:'',
name: '统计分析',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '统计分析描述',
state:1,
},
{
id: '7',
pid:'0',
pids:'',
name: '示例',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '示例描述',
state:0,
children:[{
'id': '71',
'name': '普通表格',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
id: '71',
pid:'1',
pids:'',
name: '普通表格',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '普通表格描述',
state:0,
},
{
'id': '72',
'name': '表格树',
'path':'/plan/planList/index',
'sort':100,
'type':'菜单',
'remark':'检测计划描述',
'route_Name':'route',
'create_Time': '2024-10-16 12:13:14',
'update_Time':'2024-10-16 12:13:14',
}
]
id: '71',
pid:'1',
pids:'',
name: '表格树',
code:'',
path:'/plan/planList/index',
icon:'',
sort:100,
type:0,
remark: '表格树描述',
state:0,
}]
},
])
export default resourcedata

View File

@@ -43,28 +43,6 @@ const dictData: Dict[] = [
},
],
},
{
id: "3",
code: 'type',
label: '资源类型',
children: [
{
id: "1",
label: '菜单',
code: 1,
},
{
id: "2",
label: '按钮',
code: 2,
},
{
id: "3",
label: '公共资源',
code: 3,
},
],
},
]
export default dictData

View File

@@ -17,7 +17,8 @@ export const userStatus = [
];
export const resourceType = [
{ label: "菜单", value: 1 },
{ label: "按钮", value: 2 },
{ label: "公共资源", value: 3 }
{ label: "菜单", value: 0 },
{ label: "按钮", value: 1 },
{ label: "公共资源", value: 2 }
{ label: "服务间调用资源", value: 3 }
];

View File

@@ -1,6 +1,6 @@
<template>
<el-dialog :title="dialogTitle" :model-value="visible" @close="handleCancel" v-bind="dialogSmall">
<el-form :model="formData" :rules="rules">
<el-form :model="formData" ref='formRuleRef' :rules='rules'>
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" />
</el-form-item>
@@ -12,17 +12,15 @@
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择资源类型">
<el-option label="菜单" value="菜单" />
<el-option label="按钮" value="按钮" />
<el-option label="公共资源" value="公共资源" />
<el-option label="菜单" :value="0"></el-option>
<el-option label="按钮" :value="1"></el-option>
<el-option label="公共资源" :value="2"></el-option>
<el-option label="服务间调用资源" :value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="描述" prop="remark">
<el-input v-model="formData.remark" :rows="2" type="textarea"/>
</el-form-item>
<el-form-item label="路由" prop="route_Name">
<el-input v-model="formData.route_Name" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
@@ -34,42 +32,69 @@
</template>
<script lang="ts" setup name="ResourceDialog">
import { defineProps, defineEmits, reactive,watch } from 'vue';
import { defineProps, defineEmits,watch,ref, type Ref } from 'vue';
import { dialogSmall } from '@/utils/elementBind'
import { ElMessage, FormInstance, FormItemRule } from 'element-plus'
const props = defineProps<{
visible: boolean;
dialogTitle: string;
formData: {
id:string;
name: string;
path: string;
sort: number;
type: string;
remark: string;
route_Name: string;
id: string;//资源表Id
pid:string;//节点0为根节点
pids?:string;//节点上层所有节点
name: string;//名称
code:string;//资源标识
path:string;//路径
icon?:string;//图标
sort:number;//排序
type:number;//资源类型0-菜单、1-按钮、2-公共资源、3-服务间调用资源
remark?: string;//权限资源描述
state:number;//权限资源状态
create_By?:string;//创建人
create_Time?:string;//创建时间
update_By?:string;//更新人
update_Time?:string;//更新时间
};
}>();
const rules = {
name :[
{require:true,trigger:"blur",message:"请填写菜单名称"}
]
}
// 定义规则
const formRuleRef = ref<FormInstance>()
const rules : Ref<Record<string, Array<FormItemRule>>> = ref({
name :[{required:true,trigger:'blur',message:'菜单名称必填!'}],
path :[{required:true,trigger:'blur',message:'菜单路径必填!'}],
type :[{required:true,trigger:'change',message:'菜单类型必选!'}]
})
const emit = defineEmits<{
(e: 'update:visible', value: boolean): void;
(e: 'submit', data: any): void;
}>();
const handleCancel = () => {
//重置表单内容
//取消表单校验状态
formRuleRef.value && formRuleRef.value.resetFields()
emit('update:visible', false); // 关闭对话框
};
const handleSubmit = () => {
try {
formRuleRef.value?.validate((valid: boolean) => {
if (valid) {
// 将表单数据转为json,发送到后端
let confirmFormData = JSON.parse(JSON.stringify(props.formData))
emit('submit', props.formData); // 提交表单数据
emit('update:visible', false); // 提交后关闭对话框
};
} else {
ElMessage.error('表单验证失败!')
}
})
}catch (error) {
console.error('验证过程中发生错误', error)
}
}
// 当 props.visible 改变时,更新 formData
watch(() => props.visible, (newVal) => {

View File

@@ -40,122 +40,103 @@
import { type Resource } from '@/api/resource/interface'
import ProTable from '@/components/ProTable/index.vue'
import ResourceDialog from "@/views/authority/resource/components/ResourceDialog.vue"; // 导入子组件
import {CirclePlus, Delete, EditPen} from '@element-plus/icons-vue'
import {CirclePlus, Delete, EditPen,HomeFilled} from '@element-plus/icons-vue'
import resourceDataList from '@/api/resource/resourceData'
import type { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
import { ElMessage, ElMessageBox, inputEmits } from 'element-plus';
import { useDictStore } from '@/stores/modules/dict'
const dictStore = useDictStore()
let multipleSelection = ref<string[]>([]);
const resourceData = resourceDataList
const dialogFormVisible = ref(false)
const isEditMode = ref(false);
const dialogTitle = ref('新增菜单')
const dialogForm = ref<Resource.ResResourceList>({
id: '',
pid:'',
pids:'',
name: '',
path: '',
sort: 0,
type: '',
code:'',
path:'',
icon:'',
sort:100,
type:0,
remark: '',
route_Name: '',
create_Time: '' ,
update_Time: '' ,
state:1,
children:[],
});
// ProTable 实例
const proTable = ref<ProTableInstance>()
// 表格配置项
const columns = reactive<ColumnProps<Resource.ResResourceList>[]>([
{ type: 'selection', fixed: 'left', width: 70 },
{
prop: 'name',
label: '名称',
width: 150,
minWidth: 200,
search: { el: 'input', tooltip: '我是搜索提示' },
},
{
prop: 'code',
label: '资源标识',
minWidth: 100,
},
{
prop: 'path',
label: '路径',
width: 300,
},
{
prop: 'sort',
label: '排序',
width: 100,
search: {
// 自定义 search 显示内容
render: ({ searchParam }) => {
return (
<div class='flx-center'>
<el-input vModel_trim={searchParam.minAge} placeholder='最小排序' />
<span class='mr10 ml10'>-</span>
<el-input vModel_trim={searchParam.maxAge} placeholder='最大排序' />
</div>
)
},
},
minWidth: 200,
},
{
prop: 'type',
label: '类型',
width: 150,
// 字典数据(本地数据)
//enum: dictStore.getDictData('type'),
//search: { el: 'select', props: { filterable: true } },
//fieldNames: { label: 'label', value: 'resourceType' },
search: {
// 自定义 search 显示内容
render: ({ searchParam }) => {
render: ({searchParam}) => {
return (
<div class='flx-center'>
<el-select placeholder="请选择">
<el-option label="菜单"></el-option>
<el-option label="按钮"></el-option>
<el-option label="公共资源"></el-option>
<el-select placeholder="请选择" v-model={searchParam.type}>
<el-option label="菜单" value="0"></el-option>
<el-option label="按钮" value="1"></el-option>
<el-option label="公共资源" value="2"></el-option>
<el-option label="服务间调用资源" value="3"></el-option>
</el-select>
</div>
);
},
},
},
{
prop: 'state',
label: '权限资源状态',
minWidth: 120,
enum: dictStore.getDictData('status'),
fieldNames: { label: 'label', value: 'code' },
render: scope => {
return (
<el-tag type={scope.row.state ? 'success' : 'danger'} > {scope.row.state ? '正常' : '禁用'} </el-tag>
)
},
},
},
{
prop: 'route_Name',
width: 200,
label: '路由',
search: { el: 'input' },
},
{
prop: 'create_Time',
label: '创建时间',
width: 180,
search: {
el: 'date-picker',
span: 1,
props: { type: 'daterange', valueFormat: 'YYYY-MM-DD'},
defaultValue: ['2024-11-12', '2024-12-12'],}
},
{
prop: 'update_Time',
label: '更新时间',
width: 180,
},
{ prop: 'operation', label: '操作', fixed: 'right' },
{ prop: 'operation', label: '操作', fixed: 'right',minWidth: 200 },
])
// 打开 drawer(新增、查看、编辑)
// 打开新增对话框
const openAddDialog = () => {
dialogForm.value = {
id: '',
pid:'',
pids:'',
name: '',
path: '',
sort: 100,
type: '',
code:'',
path:'',
icon:'',
sort:100,
type:0,
remark: '',
route_Name: '',
create_Time: '' ,
update_Time: '' ,
state:1,
children: [],
};
isEditMode.value = true;

View File

@@ -21,14 +21,16 @@
<script setup lang='tsx' name='useProTable'>
// 根据实际路径调整
import TimeControl from '@/components/TimeControl/index.vue'
import { type Log } from '@/api/log/interface'
import { type Sys_Log_Audit } from '@/api/log/interface'
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,watch } from 'vue'
import { useDictStore } from '@/stores/modules/dict'
let multipleSelection = ref<string[]>([])
const logData = logDataList
const dictStore = useDictStore()
// 定义包含和排除的单位
const includedUnits = ['日', '周', '月', '自定义']; // 可以根据需要包含的单位
const excludedUnits = ['季度','年']; // 要排除的单位
@@ -36,7 +38,7 @@ const defaultUnits = '日'; // 默认的单位
// ProTable 实例
const proTable = ref<ProTableInstance>()
// 表格配置项
const columns = reactive<ColumnProps<Log.LogList>[]>([
const columns = reactive<ColumnProps<Sys_Log_Audit.Audit_LogList>[]>([
{ type: 'selection', fixed: 'left', width: 70 },
{
prop: 'id',
@@ -44,15 +46,20 @@ const columns = reactive<ColumnProps<Log.LogList>[]>([
width: 70,
},
{
prop: 'user',
prop: 'create_By',
label: '操作用户',
search: { el: 'select', props: { filterable: true } },
width: 150,
search: { el: 'input' },
minWidth: 100,
},
{
prop: 'record_Time',
prop: 'ip',
label: 'IP',
minWidth: 120,
},
{
prop: 'create_Time',
label: '记录时间',
width: 200,
minWidth: 180,
search: {
span: 2,
render: () => {
@@ -69,28 +76,38 @@ const columns = reactive<ColumnProps<Log.LogList>[]>([
},
},
{
prop: 'content',
label: '内容',
prop: 'remark',
label: '事件描述',
minWidth: 400,
},
{
prop: 'type',
prop: 'result',
label: '事件结果',
minWidth: 120,
},
{
prop: 'warn',
label: '告警标志',
enum: dictStore.getDictData('status'),
minWidth: 100,
fieldNames: { label: 'label', value: 'code' },
render: scope => {
return (
<el-tag type={scope.row.warn ? 'danger' : 'success'}>{scope.row.warn ? '告警' : '未告警'}</el-tag>
)
},
},
{
prop: 'operate_Type',
label: '日志类型',
width: 200,
width: 100,
search: { el: 'select', props: { filterable: true } },
},
{
prop: 'level',
label: '日志等级',
width: 200,
search: { el: 'select', props: { filterable: true } },
},
])
//选中
// 处理选择变化
const handleSelectionChange = (selection: Log.LogList[]) => {
const handleSelectionChange = (selection: Sys_Log_Audit.Audit_LogList[]) => {
multipleSelection.value = selection.map(row => row.id) // 更新选中的行
}

View File

@@ -44,7 +44,7 @@
const dictStore = useDictStore()
const deviceData = deviceDataList
const deviceData = deviceDataList.data
// ProTable 实例
const proTable = ref<ProTableInstance>()

View File

@@ -21,7 +21,7 @@
const errorData = errorDataList.errordetail
// 表格配置项
const columns = reactive<ColumnProps<ErrorSystem.ErrorSystemDetail>[]>([
const columns = reactive<ColumnProps<ErrorSystem.Error_detail>[]>([
{
prop: 'measured',
label: '被测量',
@@ -46,8 +46,8 @@ const columns = reactive<ColumnProps<ErrorSystem.ErrorSystemDetail>[]>([
interface SpanMethodProps {
row: ErrorSystem.ErrorSystemDetail
column: TableColumnCtx<ErrorSystem.ErrorSystemDetail>
row: ErrorSystem.Error_detail
column: TableColumnCtx<ErrorSystem.Error_detail>
rowIndex: number
columnIndex: number
}

View File

@@ -3,41 +3,37 @@
<el-tabs type="border-card">
<el-tab-pane label="基础信息">
<div class="form-grid">
<el-form :model="formData" >
<el-row :gutter="160" >
<el-form :model="formData" ref='formRuleRef' :rules='rules'>
<el-row :gutter="120" >
<el-col :span="9">
<el-form-item label="误差体系名称" prop="name">
<el-input v-model='formData.name' placeholder="标准号+年份+设备等级"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发布时间" prop="publishTime">
<el-input v-model="formData.publishTime" />
<el-form-item label="参照标准名称" prop="standard_Name">
<el-input v-model='formData.standard_Name'/>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="上传误差体系截图" prop="screenshot">
<el-button :icon="FolderOpened" type="primary"></el-button>
<el-form-item label="发布时间" prop="standard_Time">
<el-input v-model="formData.standard_Time" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="160" >
<el-row :gutter="120" >
<el-col :span="9">
<el-form-item label="适用设备等级" prop="level">
<el-select v-model='formData.level' placeholder="请选择设备等级">
<el-form-item label="适用设备等级" prop="dev_Level">
<el-select v-model='formData.dev_Level' placeholder="请选择设备等级">
<el-option label="A级" value="A级" />
<el-option label="S级" value="S级" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实施时间" prop="year">
<el-input v-model='formData.year'/>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="状态" prop="state">
<el-select v-model='formData.state' placeholder="请选择状态">
<el-form-item label="状态" prop="enable">
<el-select v-model='formData.enable' placeholder="请选择状态">
<el-option label="启用" value="启用" />
<el-option label="停用" value="停用" />
</el-select>
@@ -148,7 +144,8 @@
</template>
<script lang="ts" setup name="ErrorSystemDialog">
import { defineProps, defineEmits, reactive,watch,ref } from 'vue';
import{ElMessage, FormInstance,FormItemRule}from'element-plus'
import { defineProps, defineEmits, reactive,watch,ref, Ref } from 'vue';
import { dialogBig,dialogMiddle} from '@/utils/elementBind'
import IndicatorTypeDialog from "@/views/machine/errorSystem/components/IndicatorTypeDialog.vue"; // 导入子组件
import {CirclePlus, Delete, EditPen,FolderOpened,CopyDocument} from '@element-plus/icons-vue'
@@ -157,15 +154,28 @@
dialogTitle: string;
formData: {
id:string;
name: string;
publishTime:string;
year: string;
level: string;
state: string;
id: string;//误差体系表Id
name: string;//误差体系名称
standard_Name:string;//参照标准名称
standard_Time:string;//标准推行时间
dev_Level:string;//使用设备等级
enable:number;//状态0-不启用 1-启用
state:number;//0-删除 1-正常
};
}>();
// 定义规则
const formRuleRef = ref<FormInstance>()
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
name: [{ required: true, message: '误差体系名称必填!', trigger: 'blur' }],
standard_Name: [{ required: true, message: '参照标准名称必填!', trigger: 'blur' }],
standard_Time: [{ required: true, message: '标准推行时间必填!', trigger: 'blur' }],
dev_Level:[{ required: true, message: '请选择一项设备等级', trigger: 'change' },],
enable:[{ required: true, message: '请选择一项状态', trigger: 'change '},]
});
let multipleSelection = ref<number[]>([])
const errorTypeOptions = [
{ label: '绝对值-标称值', value: 'type1' },
@@ -254,12 +264,32 @@ const typeList = [
}>();
const handleCancel = () => {
//重置表单内容
//取消表单校验状态
formRuleRef.value && formRuleRef.value.resetFields()
emit('update:visible', false); // 关闭对话框
};
const handleSubmit = () => {
//ElMessage.info('业务数据提交')
try {
formRuleRef.value?.validate((valid: boolean) => {
if (valid)
{
// 将表单数据转为json,发送到后端
let confirmFormData = JSON.parse(JSON.stringify(props.formData));
console.log(confirmFormData)
emit('submit', props.formData); // 提交表单数据
emit('update:visible', false); // 提交后关闭对话框
}
else
{
ElMessage.error('表单验证失败!')
}
})
} catch (error) {
console.error('验证过程中发生错误', error)
}
};
// 当 props.visible 改变时,更新 formData

View File

@@ -50,6 +50,8 @@ import { reactive,ref } from 'vue'
import type { ErrorSystem } from '@/api/error/interface'
import ErrorSystemDialog from "@/views/machine/errorSystem/components/ErrorSystemDialog.vue"; // 导入子组件
import ErrorStandardDialog from "@/views/machine/errorSystem/components/ErrorStandardDialog.vue"; // 导入子组件
import { useDictStore } from '@/stores/modules/dict'
const dictStore = useDictStore()
let multipleSelection = ref<string[]>([])
const errorData = errorDataList.errordata
const dialogFormVisible = ref(false)
@@ -57,25 +59,27 @@ const dialogTitle = ref('新增误差体系')
const dialogForm = ref<ErrorSystem.ErrorSystemList>({
id: '',
name: '',
publishTime: '',
year:'',
level:'',
state: '',
standard_Name:'',
standard_Time:'',
dev_Level:'',
enable:1,
state:1,
});
const detail_dialogFormVisible = ref(false)
const detail_dialogTitle = ref('Q/GDW 10650.2-2021 误差体系')
const detail_dialogForm = ref<ErrorSystem.ErrorSystemDetail>({
const detail_dialogForm = ref<ErrorSystem.Error_detail>({
measured: '',//被测量
deviceLevel: '',//检测装置级别
measurementType:'',
condition: '',//测量条件
maxErrorValue: '',//最大误差
});
// 表格配置项
const columns = reactive<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
const columns = ref<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
{ type: 'selection', fixed: 'left', width: 70 },
{
prop: 'id',
@@ -85,28 +89,29 @@ const columns = reactive<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
{
prop: 'name',
label: '误差体系名称',
},
{
prop: 'year',
prop: 'Standard_Name',
label: '参照标准名称',
},
{
prop: 'standard_Time',
label: '标准实施年份',
width: 200,
search: { el: 'input' },
},
{
prop: 'level',
prop: 'dev_Level',
label: '适用设备等级',
width: 200,
width: 120,
search: { el: 'select', props: { filterable: true } },
},
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 400, },
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 300,},
])
// 打开编辑对话框
const openEditDialog = (errorSystem: ErrorSystem.ErrorSystemList) => {
errorSystem.publishTime ='2024'
errorSystem.state = '启用';
errorSystem.standard_Time ='2024'
dialogForm.value = {...errorSystem};
dialogTitle.value = '编辑误差体系';
dialogFormVisible.value = true; // 打开对话框
@@ -116,10 +121,11 @@ const openAddDialog = () => {
dialogForm.value = {
id: '',
name: '',
publishTime: '',
year: '',
level: '',
state: '',
standard_Name:'',
standard_Time:'',
dev_Level:'',
enable:1,
state:1,
};
dialogTitle.value = '新增误差体系';
dialogFormVisible.value = true; // 打开对话框

View File

@@ -1,6 +1,6 @@
<template>
<el-dialog :title="dialogTitle" :model-value="visible" @close="handleCancel" v-bind="dialogSmall">
<el-form :model="formData" >
<el-form :model="formData" ref='formRuleRef' :rules='rules'>
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" :disabled="isReadOnly"/>
</el-form-item>
@@ -32,7 +32,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="误差体系" prop="type">
<el-form-item label="误差体系" prop="type" >
<el-select v-model="formData.error_Sys_Id" placeholder="请选择误差体系" :disabled="isReadOnly">
<el-option
v-for="plan in errorList"
@@ -54,7 +54,8 @@
</template>
<script setup lang="ts">
import { defineProps, defineEmits, reactive,watch,ref } from 'vue';
import{ElMessage, FormInstance,FormItemRule}from'element-plus'
import { defineProps, defineEmits, reactive,watch,ref, Ref } from 'vue';
import { dialogSmall} from '@/utils/elementBind'
const props = defineProps<{
visible: boolean;
@@ -107,13 +108,41 @@ const emit = defineEmits<{
(e: 'submit', data: any): void;
}>();
// 定义规则
const formRuleRef = ref<FormInstance>()
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
name: [{ required: true, message: '检测计划名称必填!', trigger: 'blur' }],
father_Plan_Id: [{ required: true, message: '参照标准名称必填!', trigger: 'change' }],
});
const handleCancel = () => {
//重置表单内容
//取消表单校验状态
formRuleRef.value && formRuleRef.value.resetFields()
emit('update:visible', false); // 关闭对话框
};
const handleSubmit = () => {
try {
formRuleRef.value?.validate((valid: boolean) => {
if (valid)
{
// 将表单数据转为json,发送到后端
let confirmFormData = JSON.parse(JSON.stringify(props.formData));
console.log(confirmFormData)
emit('submit', props.formData); // 提交表单数据
emit('update:visible', false); // 提交后关闭对话框
}
else
{
ElMessage.error('表单验证失败!')
}
})
} catch (error) {
console.error('验证过程中发生错误', error)
}
};
// 当 props.visible 改变时,更新 formData

View File

@@ -48,42 +48,42 @@
const columns = reactive<ColumnProps<Device.DeviceList>[]>([
{ type: 'selection', fixed: 'left', width: 70 },
{
prop: 'Name',
prop: 'name',
label: '名称',
minWidth: 120,
},
{
prop: 'Dev_Type',
prop: 'dev_Type',
label: '类型',
minWidth: 100,
},
{
prop: 'Dev_Chns',
prop: 'dev_Chns',
label: '通道数',
minWidth: 70,
minWidth: 100,
},
{
prop: 'ReCheck_Num',
prop: 'reCheck_Num',
label: '复检次数',
minWidth: 70,
},
{
prop: 'Report_State',
prop: 'report_State',
label: '报告状态',
minWidth: 130,
},
{
prop: 'Check_Result',
prop: 'check_Result',
label: '检测结果',
minWidth: 130,
},
{
prop: 'Check_State',
prop: 'check_State',
label: '检测状态',
minWidth: 130,
},
{
prop: 'Document_State',
prop: 'document_State',
label: '归档状态',
minWidth: 130,
},
@@ -94,8 +94,6 @@
dialogVisible.value = true
title.value = textTitle
}
defineExpose({ open })

View File

@@ -21,6 +21,7 @@
<el-button type='primary' link :icon='EditPen' @click="openEditDialog(scope.row)">编辑</el-button>
<el-button type='primary' link :icon='Delete' >删除</el-button>
<el-button type='primary' link :icon='List' @click="showDeviceOpen(scope.row)">设备</el-button>
<el-button type='primary' link :icon='List' @click="showtestSourceOpen(scope.row)">检测源</el-button>
</template>
</ProTable>
@@ -47,13 +48,14 @@ import type { Plan } from '@/api/plan/interface'
import PlanDialog from "@/views/plan/planList/components/PlanDialog.vue"; // 导入子组件
import Open from '@/views/plan/planList/components/PlanOpen.vue'
import { useViewSize } from '@/hooks/useViewSize'
import { useRouter } from "vue-router";
const { popupBaseView, viewWidth, viewHeight } = useViewSize()
const openView = ref()
const planData = planDataList
const dialogFormVisible = ref(false)
const dialogTitle = ref('')
const isReadOnly = ref(false)
const router = useRouter();
const dialogForm = ref<Plan.PlanList>({
id: '',
name: '',
@@ -117,7 +119,7 @@ const columns = reactive<ColumnProps<Plan.PlanList>[]>([
label: '父节点',
width: 200,
},
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 350, },
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 500, },
])
// 打开编辑对话框
@@ -129,6 +131,7 @@ const openEditDialog = (planSystem: Plan.PlanList) => {
};
const openAddDialog = () => {
dialogForm.value = {
id: '',
name: '',
@@ -157,6 +160,12 @@ const handleRowClick = (planSystem: Plan.PlanList) =>{
const showDeviceOpen = (planSystem: Plan.PlanList) => {
openView.value.open('设备列表')
}
const showtestSourceOpen=(planSystem: Plan.PlanList)=>{
router.push({
path: "/machine/testSource",
});
}
</script>
<style scoped>