Merge branch 'master' of http://192.168.1.22:3000/frontend/pqs-9100_client
This commit is contained in:
@@ -4,24 +4,24 @@ import { ElNotification } from "element-plus";
|
|||||||
* @description 全局代码错误捕捉
|
* @description 全局代码错误捕捉
|
||||||
* */
|
* */
|
||||||
const errorHandler = (error: any) => {
|
const errorHandler = (error: any) => {
|
||||||
// 过滤 HTTP 请求错误
|
// // 过滤 HTTP 请求错误
|
||||||
if (error.status || error.status == 0) return false;
|
// if (error.status || error.status == 0) return false;
|
||||||
let errorMap: { [key: string]: string } = {
|
// let errorMap: { [key: string]: string } = {
|
||||||
InternalError: "Javascript引擎内部错误",
|
// InternalError: "Javascript引擎内部错误",
|
||||||
ReferenceError: "未找到对象",
|
// ReferenceError: "未找到对象",
|
||||||
TypeError: "使用了错误的类型或对象",
|
// TypeError: "使用了错误的类型或对象",
|
||||||
RangeError: "使用内置对象时,参数超范围",
|
// RangeError: "使用内置对象时,参数超范围",
|
||||||
SyntaxError: "语法错误",
|
// SyntaxError: "语法错误",
|
||||||
EvalError: "错误的使用了Eval",
|
// EvalError: "错误的使用了Eval",
|
||||||
URIError: "URI错误"
|
// URIError: "URI错误"
|
||||||
};
|
// };
|
||||||
let errorName = errorMap[error.name] || "未知错误";
|
// let errorName = errorMap[error.name] || "未知错误";
|
||||||
ElNotification({
|
// ElNotification({
|
||||||
title: errorName,
|
// title: errorName,
|
||||||
message: error,
|
// message: error,
|
||||||
type: "error",
|
// type: "error",
|
||||||
duration: 3000
|
// duration: 3000
|
||||||
});
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
export default errorHandler;
|
export default errorHandler;
|
||||||
|
|||||||
@@ -154,8 +154,7 @@
|
|||||||
v-if="form.activeTabs === 4"
|
v-if="form.activeTabs === 4"
|
||||||
>数据查看</el-button
|
>数据查看</el-button
|
||||||
> -->
|
> -->
|
||||||
<el-button
|
<el-button type='primary'
|
||||||
:type="scope.row.check_State === '检测完成' ? 'primary' : 'info'"
|
|
||||||
link
|
link
|
||||||
:icon="Notebook"
|
:icon="Notebook"
|
||||||
@click="openDrawer('归档', scope.row)"
|
@click="openDrawer('归档', scope.row)"
|
||||||
@@ -264,6 +263,7 @@ import { useDownload } from '@/hooks/useDownload'
|
|||||||
import {downloadDevData} from '@/api/plan/plan.ts'
|
import {downloadDevData} from '@/api/plan/plan.ts'
|
||||||
import {documentedPqDev} from "@/api/device/device";
|
import {documentedPqDev} from "@/api/device/device";
|
||||||
import { getPqDev } from '@/api/device/device/index.ts'
|
import { getPqDev } from '@/api/device/device/index.ts'
|
||||||
|
import {ResultEnum} from "@/enums/httpEnum";
|
||||||
const dictStore = useDictStore()
|
const dictStore = useDictStore()
|
||||||
const checkStore = useCheckStore()
|
const checkStore = useCheckStore()
|
||||||
const webMsgSend = ref();//webSocket推送的数据
|
const webMsgSend = ref();//webSocket推送的数据
|
||||||
@@ -1014,7 +1014,11 @@ const handleTest = async (val:string) => {
|
|||||||
// loading.close()
|
// loading.close()
|
||||||
// ElMessage.success("归档成功");
|
// ElMessage.success("归档成功");
|
||||||
// }, 2000)
|
// }, 2000)
|
||||||
documentedPqDev(checkStore.devices.map(item => {item.deviceId}))
|
documentedPqDev(checkStore.devices.map(item => {item.deviceId})).then((res) => {
|
||||||
|
if(res.code === ResultEnum.SUCCESS){
|
||||||
|
ElMessage.success("归档成功!");
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1052,7 +1056,11 @@ const openDrawer = async (title: string, row: any) => {
|
|||||||
|
|
||||||
if (title === '归档')
|
if (title === '归档')
|
||||||
{
|
{
|
||||||
await documentedPqDev([row.id])
|
await documentedPqDev([row.id]).then((res) => {
|
||||||
|
if(res.code === ResultEnum.SUCCESS){
|
||||||
|
ElMessage.success("归档成功!");
|
||||||
|
}
|
||||||
|
})
|
||||||
emit('batchGenerateClicked'); // 触发事件
|
emit('batchGenerateClicked'); // 触发事件
|
||||||
// const loading = ElLoading.service({
|
// const loading = ElLoading.service({
|
||||||
// lock: true,
|
// lock: true,
|
||||||
|
|||||||
@@ -880,7 +880,13 @@ const updateCheckResultView = (scriptCode: string, isStart: boolean, devices: Ch
|
|||||||
// chnResult: [1, 1, 1, 1],
|
// chnResult: [1, 1, 1, 1],
|
||||||
// deviceId: "ae5a7628260349c0a5e7c86c81fbd417",
|
// deviceId: "ae5a7628260349c0a5e7c86c81fbd417",
|
||||||
// deviceName: "240004"
|
// deviceName: "240004"
|
||||||
// }]
|
// }
|
||||||
|
// {
|
||||||
|
// chnResult: [1, 1, 1, 1],
|
||||||
|
// deviceId: "2957b271f39d4240a1c5e275c453676c",
|
||||||
|
// deviceName: "测试003"
|
||||||
|
// },
|
||||||
|
// ]
|
||||||
let temp = null
|
let temp = null
|
||||||
if (isStart) {
|
if (isStart) {
|
||||||
temp = getLoadingResult(scriptType)
|
temp = getLoadingResult(scriptType)
|
||||||
@@ -1074,6 +1080,62 @@ const startTimer = () => {
|
|||||||
}, 6000)
|
}, 6000)
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
emit('update:webMsgSend', {
|
||||||
|
requestId: 'V_Start'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
emit('update:webMsgSend', {
|
||||||
|
requestId: 'V_End'
|
||||||
|
})
|
||||||
|
}, 2000);
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'FREQ_Start'
|
||||||
|
// })
|
||||||
|
// }, 1000)
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'FREQ_End'
|
||||||
|
// })
|
||||||
|
// }, 2000);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
emit('update:webMsgSend', {
|
||||||
|
requestId: 'I_Start'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
emit('update:webMsgSend', {
|
||||||
|
requestId: 'I_End'
|
||||||
|
})
|
||||||
|
}, 2000)
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'V_Start'
|
||||||
|
// })
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'V_End'
|
||||||
|
// })
|
||||||
|
// }, 2000);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
emit('update:webMsgSend', {
|
||||||
|
requestId: 'IMBV_Start'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
emit('update:webMsgSend', {
|
||||||
|
requestId: 'IMBV_End'
|
||||||
|
})
|
||||||
|
}, 2000)
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HV_Start',
|
||||||
|
// })
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HV_End'
|
||||||
|
// })
|
||||||
|
// }, 2000)
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
emit('update:webMsgSend', {
|
emit('update:webMsgSend', {
|
||||||
requestId: 'FREQ_Start'
|
requestId: 'FREQ_Start'
|
||||||
@@ -1084,18 +1146,16 @@ const startTimer = () => {
|
|||||||
requestId: 'FREQ_End'
|
requestId: 'FREQ_End'
|
||||||
})
|
})
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HI_Start'
|
||||||
|
// })
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HI_End'
|
||||||
|
// })
|
||||||
|
// }, 2000)
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 5:
|
||||||
emit('update:webMsgSend', {
|
|
||||||
requestId: 'V_Start'
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
emit('update:webMsgSend', {
|
|
||||||
requestId: 'V_End'
|
|
||||||
})
|
|
||||||
}, 2000);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
emit('update:webMsgSend', {
|
emit('update:webMsgSend', {
|
||||||
requestId: 'HV_Start',
|
requestId: 'HV_Start',
|
||||||
})
|
})
|
||||||
@@ -1104,8 +1164,16 @@ const startTimer = () => {
|
|||||||
requestId: 'HV_End'
|
requestId: 'HV_End'
|
||||||
})
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HP_Start',
|
||||||
|
// })
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HP_End'
|
||||||
|
// })
|
||||||
|
// }, 2000)
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 6:
|
||||||
emit('update:webMsgSend', {
|
emit('update:webMsgSend', {
|
||||||
requestId: 'HI_Start'
|
requestId: 'HI_Start'
|
||||||
})
|
})
|
||||||
@@ -1114,18 +1182,16 @@ const startTimer = () => {
|
|||||||
requestId: 'HI_End'
|
requestId: 'HI_End'
|
||||||
})
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HSV_Start'
|
||||||
|
// })
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HSV_End'
|
||||||
|
// })
|
||||||
|
// }, 2000)
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 7:
|
||||||
emit('update:webMsgSend', {
|
|
||||||
requestId: 'HP_Start',
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
emit('update:webMsgSend', {
|
|
||||||
requestId: 'HP_End'
|
|
||||||
})
|
|
||||||
}, 2000)
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
emit('update:webMsgSend', {
|
emit('update:webMsgSend', {
|
||||||
requestId: 'HSV_Start'
|
requestId: 'HSV_Start'
|
||||||
})
|
})
|
||||||
@@ -1134,8 +1200,16 @@ const startTimer = () => {
|
|||||||
requestId: 'HSV_End'
|
requestId: 'HSV_End'
|
||||||
})
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HSI_Start'
|
||||||
|
// })
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'HSI_End'
|
||||||
|
// })
|
||||||
|
// }, 2000)
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 8:
|
||||||
emit('update:webMsgSend', {
|
emit('update:webMsgSend', {
|
||||||
requestId: 'HSI_Start'
|
requestId: 'HSI_Start'
|
||||||
})
|
})
|
||||||
@@ -1144,57 +1218,55 @@ const startTimer = () => {
|
|||||||
requestId: 'HSI_End'
|
requestId: 'HSI_End'
|
||||||
})
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'VOLTAGE_Start'
|
||||||
|
// })
|
||||||
|
// setTimeout(() => {
|
||||||
|
// emit('update:webMsgSend', {
|
||||||
|
// requestId: 'VOLTAGE_End'
|
||||||
|
// })
|
||||||
|
// }, 2000)
|
||||||
break;
|
break;
|
||||||
case 8:
|
// case 9:
|
||||||
emit('update:webMsgSend', {
|
// emit('update:webMsgSend', {
|
||||||
requestId: 'VOLTAGE_Start'
|
// requestId: 'I_Start'
|
||||||
})
|
// })
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
emit('update:webMsgSend', {
|
// emit('update:webMsgSend', {
|
||||||
requestId: 'VOLTAGE_End'
|
// requestId: 'I_End'
|
||||||
})
|
// })
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
break;
|
// break;
|
||||||
case 9:
|
// case 10:
|
||||||
emit('update:webMsgSend', {
|
// emit('update:webMsgSend', {
|
||||||
requestId: 'I_Start'
|
// requestId: 'IMBV_Start'
|
||||||
})
|
// })
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
emit('update:webMsgSend', {
|
// emit('update:webMsgSend', {
|
||||||
requestId: 'I_End'
|
// requestId: 'IMBV_End'
|
||||||
})
|
// })
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
break;
|
// break;
|
||||||
case 10:
|
// case 11:
|
||||||
emit('update:webMsgSend', {
|
// emit('update:webMsgSend', {
|
||||||
requestId: 'IMBV_Start'
|
// requestId: 'IMBA_Start'
|
||||||
})
|
// })
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
emit('update:webMsgSend', {
|
// emit('update:webMsgSend', {
|
||||||
requestId: 'IMBV_End'
|
// requestId: 'IMBA_End'
|
||||||
})
|
// })
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
break;
|
// break;
|
||||||
case 11:
|
// case 12:
|
||||||
emit('update:webMsgSend', {
|
// emit('update:webMsgSend', {
|
||||||
requestId: 'IMBA_Start'
|
// requestId: 'F_Start'
|
||||||
})
|
// })
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
emit('update:webMsgSend', {
|
// emit('update:webMsgSend', {
|
||||||
requestId: 'IMBA_End'
|
// requestId: 'F_End'
|
||||||
})
|
// })
|
||||||
}, 2000)
|
// }, 2000)
|
||||||
break;
|
// break;
|
||||||
case 12:
|
|
||||||
emit('update:webMsgSend', {
|
|
||||||
requestId: 'F_Start'
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
emit('update:webMsgSend', {
|
|
||||||
requestId: 'F_End'
|
|
||||||
})
|
|
||||||
}, 2000)
|
|
||||||
break;
|
|
||||||
case 13:
|
case 13:
|
||||||
emit('update:webMsgSend', {
|
emit('update:webMsgSend', {
|
||||||
requestId: 'Quit'
|
requestId: 'Quit'
|
||||||
|
|||||||
Reference in New Issue
Block a user