解决冲突 frontend/src/api/index.ts

This commit is contained in:
sjl
2024-11-14 11:36:25 +08:00
26 changed files with 1892 additions and 737 deletions

View File

@@ -108,15 +108,6 @@ class RequestHttp {
download(url: string, params?: object, _object = {}): Promise<BlobPart> {
return this.service.post(url, params, { ..._object, responseType: "blob" });
}
/**
* @description 批量导入专用请求方法
*/
batchImport<T>(url: string, formData: FormData, _object = {}): Promise<ResultData<T>> {
return this.service.post(url, formData, {
..._object,
headers: { 'Content-Type': 'multipart/form-data' }
});
}
}

View File

@@ -3,7 +3,7 @@
"data": [
{
"id": 0,
"name": "频率准度检测",
"name": "频率准度检测",
"children": [
{
"pid": 0,
@@ -11,16 +11,22 @@
"name": "额定工作条件下的检测",
"children": [
{
"scriptIdx":1,
"isChildNode":true,
"pid": "0-1",
"id": "0-1-1",
"name": "输入:频率 42.5Hz..."
},
{
"scriptIdx":2,
"isChildNode":true,
"pid": "0-1",
"id": "0-1-2",
"name": "输入:频率 50.0Hz..."
},
{
"scriptIdx":3,
"isChildNode":true,
"pid": "0-1",
"id": "0-1-3",
"name": "输入:频率 50.05Hz..."
@@ -33,16 +39,22 @@
"name": "电压对频率测量的影响",
"children": [
{
"scriptIdx":4,
"isChildNode":true,
"pid": "0-2",
"id": "0-2-1",
"name": "输入:频率 50.05Hz Ua =10%Un..."
},
{
"scriptIdx":5,
"isChildNode":true,
"pid": "0-2",
"id": "0-2-1",
"name": "输入:频率 51.05Hz Ua =10%Un..."
},
{
"scriptIdx":6,
"isChildNode":true,
"pid": "0-2",
"id": "0-2-2",
"name": "输入:频率 52.05Hz Ua =10%Un..."
@@ -55,6 +67,8 @@
"name": "谐波对频率测量的影响",
"children": [
{
"scriptIdx":7,
"isChildNode":true,
"pid": "0-3",
"id": "0-3-1",
"name": "输入:频率 50.05Hz Ua =100%Un..."
@@ -73,16 +87,22 @@
"name": "额定工作条件下的检测",
"children": [
{
"scriptIdx":8,
"isChildNode":true,
"pid": "1-1",
"id": "1-1-1",
"name": "输入:频率 42.5Hz..."
},
{
"scriptIdx":9,
"isChildNode":true,
"pid": "1-1",
"id": "1-1-2",
"name": "输入:频率 50.0Hz..."
},
{
"scriptIdx":10,
"isChildNode":true,
"pid": "1-1",
"id": "1-1-3",
"name": "输入:频率 50.05Hz..."
@@ -95,16 +115,22 @@
"name": "电压对频率测量的影响",
"children": [
{
"scriptIdx":11,
"isChildNode":true,
"pid": "1-2",
"id": "1-2-1",
"name": "输入:频率 50.05Hz Ua =10%Un..."
},
{
"scriptIdx":12,
"isChildNode":true,
"pid": "1-2",
"id": "1-2-1",
"name": "输入:频率 51.05Hz Ua =10%Un..."
},
{
"scriptIdx":13,
"isChildNode":true,
"pid": "1-2",
"id": "1-2-2",
"name": "输入:频率 52.05Hz Ua =10%Un..."
@@ -117,6 +143,8 @@
"name": "谐波对频率测量的影响",
"children": [
{
"scriptIdx":14,
"isChildNode":true,
"pid": "0-3",
"id": "0-3-1",
"name": "输入:频率 50.05Hz Ua =100%Un..."
@@ -136,16 +164,19 @@
"name": "额定工作条件下的检测",
"children": [
{
"scriptIdx":15,
"pid": "2-1",
"id": "2-1-1",
"name": "输入:频率 42.5Hz..."
},
{
"scriptIdx":16,
"pid": "2-1",
"id": "2-1-2",
"name": "输入:频率 50.0Hz..."
},
{
"scriptIdx":17,
"pid": "2-1",
"id": "2-1-3",
"name": "输入:频率 50.05Hz..."
@@ -158,16 +189,19 @@
"name": "电压对频率测量的影响",
"children": [
{
"scriptIdx":18,
"pid": "2-2",
"id": "2-2-1",
"name": "输入:频率 50.05Hz Ua =10%Un..."
},
{
"scriptIdx":19,
"pid": "2-2",
"id": "2-2-1",
"name": "输入:频率 51.05Hz Ua =10%Un..."
},
{
"scriptIdx":20,
"pid": "2-2",
"id": "2-2-2",
"name": "输入:频率 52.05Hz Ua =10%Un..."
@@ -180,6 +214,7 @@
"name": "谐波对频率测量的影响",
"children": [
{
"scriptIdx":21,
"pid": "2-3",
"id": "2-3-1",
"name": "输入:频率 50.05Hz Ua =100%Un..."

View File

@@ -27,6 +27,7 @@ export namespace Plan {
// 检测计划 + 检测源
export interface PlanAndSourceBO extends PlanBO {
testSourceName: string;//计划所属检测源
testSourceList?: string[];//临时测试
}
// // 检测计划列表
// export interface PlanList {

View File

@@ -178,6 +178,7 @@ const planData = ref<Plan.PlanAndSourceBO[]>([
'test_State':'1',
'report_State':'1',
'result':'1',
},
{
'id': '2',
@@ -191,6 +192,9 @@ const planData = ref<Plan.PlanAndSourceBO[]>([
'test_State':'2',
'report_State':'2',
'result':'0',
"testSourceList":[
'高精度设备-PQV520-1','高精度设备-PQV520-2',
]
},
{
'id': '3',