Merge branch 'master' of http://192.168.1.22:3000/frontend/pqs-9100_client
This commit is contained in:
@@ -19,6 +19,6 @@ VITE_API_URL=/api
|
|||||||
|
|
||||||
# 开发环境跨域代理,支持配置多个
|
# 开发环境跨域代理,支持配置多个
|
||||||
|
|
||||||
VITE_PROXY=[["/api","http://192.168.1.124:18092/"]]
|
VITE_PROXY=[["/api","http://192.168.1.127:18092/"]]
|
||||||
#VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
#VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
|
||||||
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
|
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
|
||||||
|
|||||||
@@ -241,21 +241,56 @@ watch(webMsgSend,function (newValue,oldValue){
|
|||||||
item.devName === newValue.data.devName);
|
item.devName === newValue.data.devName);
|
||||||
if (firstCoefficientVO) { // 检查 firstCoefficientVO 是否存在
|
if (firstCoefficientVO) { // 检查 firstCoefficientVO 是否存在
|
||||||
firstCoefficientVO.aVuData = parseFloat(newValue.data.aVuData).toFixed(4);
|
firstCoefficientVO.aVuData = parseFloat(newValue.data.aVuData).toFixed(4);
|
||||||
firstCoefficientVO.aVuXi = parseFloat((newValue.data.aVuXi / 10000).toFixed(4)).toString();
|
|
||||||
|
if (!isNaN(parseFloat(newValue.data.aVuXi)) && isFinite(newValue.data.aVuXi)) {
|
||||||
|
firstCoefficientVO.aVuXi = (parseFloat(newValue.data.aVuXi) / 10000).toFixed(4);
|
||||||
|
} else {
|
||||||
|
firstCoefficientVO.aVuXi = newValue.data.aVuXi;
|
||||||
|
}
|
||||||
|
|
||||||
firstCoefficientVO.bVuData = parseFloat(newValue.data.bVuData).toFixed(4);
|
firstCoefficientVO.bVuData = parseFloat(newValue.data.bVuData).toFixed(4);
|
||||||
firstCoefficientVO.bVuXi = parseFloat((newValue.data.bVuXi / 10000).toFixed(4)).toString();
|
|
||||||
|
if (!isNaN(parseFloat(newValue.data.bVuXi)) && isFinite(newValue.data.bVuXi)) {
|
||||||
|
firstCoefficientVO.bVuXi = (parseFloat(newValue.data.bVuXi) / 10000).toFixed(4);
|
||||||
|
} else {
|
||||||
|
firstCoefficientVO.bVuXi = newValue.data.bVuXi;
|
||||||
|
}
|
||||||
|
|
||||||
firstCoefficientVO.cVuData = parseFloat(newValue.data.cVuData).toFixed(4);
|
firstCoefficientVO.cVuData = parseFloat(newValue.data.cVuData).toFixed(4);
|
||||||
firstCoefficientVO.cVuXi = parseFloat((newValue.data.cVuXi / 10000).toFixed(4)).toString();
|
|
||||||
|
if (!isNaN(parseFloat(newValue.data.cVuXi)) && isFinite(newValue.data.cVuXi)) {
|
||||||
|
firstCoefficientVO.cVuXi = (parseFloat(newValue.data.cVuXi) / 10000).toFixed(4);
|
||||||
|
} else {
|
||||||
|
firstCoefficientVO.cVuXi = newValue.data.cVuXi;
|
||||||
|
}
|
||||||
|
|
||||||
firstCoefficientVO.aIeData = parseFloat(newValue.data.aIeData).toFixed(4);
|
firstCoefficientVO.aIeData = parseFloat(newValue.data.aIeData).toFixed(4);
|
||||||
firstCoefficientVO.aIeXi = parseFloat((newValue.data.aVuXi / 10000).toFixed(4)).toString();
|
|
||||||
|
if (!isNaN(parseFloat(newValue.data.aIeXi)) && isFinite(newValue.data.aIeXi)) {
|
||||||
|
firstCoefficientVO.aIeXi = (parseFloat(newValue.data.aIeXi) / 10000).toFixed(4);
|
||||||
|
} else {
|
||||||
|
firstCoefficientVO.aIeXi = newValue.data.aIeXi;
|
||||||
|
}
|
||||||
|
|
||||||
firstCoefficientVO.bIeData = parseFloat(newValue.data.bIeData).toFixed(4);
|
firstCoefficientVO.bIeData = parseFloat(newValue.data.bIeData).toFixed(4);
|
||||||
firstCoefficientVO.bIeXi = parseFloat((newValue.data.bVuXi / 10000).toFixed(4)).toString();
|
|
||||||
|
if (!isNaN(parseFloat(newValue.data.bIeXi)) && isFinite(newValue.data.bIeXi)) {
|
||||||
|
firstCoefficientVO.bIeXi = (parseFloat(newValue.data.bIeXi) / 10000).toFixed(4);
|
||||||
|
} else {
|
||||||
|
firstCoefficientVO.bIeXi = newValue.data.bIeXi;
|
||||||
|
}
|
||||||
|
|
||||||
firstCoefficientVO.cIeData = parseFloat(newValue.data.cIeData).toFixed(4);
|
firstCoefficientVO.cIeData = parseFloat(newValue.data.cIeData).toFixed(4);
|
||||||
firstCoefficientVO.cIeXi = parseFloat((newValue.data.cVuXi / 10000).toFixed(4)).toString();
|
|
||||||
|
if (!isNaN(parseFloat(newValue.data.cIeXi)) && isFinite(newValue.data.cIeXi)) {
|
||||||
|
firstCoefficientVO.cIeXi = (parseFloat(newValue.data.cIeXi) / 10000).toFixed(4);
|
||||||
|
} else {
|
||||||
|
firstCoefficientVO.cIeXi = newValue.data.cIeXi;
|
||||||
|
}
|
||||||
//console.log(newValue.data.devName + '对象:', firstCoefficientVO);
|
//console.log(newValue.data.devName + '对象:', firstCoefficientVO);
|
||||||
activeIndex.value++;
|
activeIndex.value++;
|
||||||
} else {
|
} else {
|
||||||
console.log('未找到匹配的'+ newValue.data.devName+'对象');
|
//console.log('未找到匹配的'+ newValue.data.devName+'对象');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//console.log(newValue.data.devName + '数组为空');
|
//console.log(newValue.data.devName + '数组为空');
|
||||||
|
|||||||
@@ -452,12 +452,12 @@ const getTableList = async (params: any) => {
|
|||||||
'name':form.value.search
|
'name':form.value.search
|
||||||
});
|
});
|
||||||
}else{//点击树根节点,表格显示无数据
|
}else{//点击树根节点,表格显示无数据
|
||||||
return getBoundPqDevList({'planId': '',
|
// return getBoundPqDevList({'planId': '',
|
||||||
'checkStateList': [0],
|
// 'checkStateList': [0],
|
||||||
'checkResult': form.value.checkResult,
|
// 'checkResult': form.value.checkResult,
|
||||||
'reportState': form.value.checkReportStatus,
|
// 'reportState': form.value.checkReportStatus,
|
||||||
'name':form.value.search
|
// 'name':form.value.search
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -958,11 +958,11 @@ const handleTest = async (val:string) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查 socketClient.Instance 是否存在
|
// // 检查 socketClient.Instance 是否存在
|
||||||
if (!socketClient.Instance) {
|
// if (!socketClient.Instance) {
|
||||||
console.error('WebSocket 客户端实例不存在');
|
// console.error('WebSocket 客户端实例不存在');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//开始创建webSocket客户端
|
//开始创建webSocket客户端
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
:icon="VideoPause"
|
:icon="VideoPause"
|
||||||
@click="emit('sendPause')">停止检测
|
@click="emit('sendPause')">停止检测
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="warning" v-if="testStatus === 'paused_ing'" disabled>
|
||||||
|
<el-icon class="loading-box" style="margin-right: 8px;">
|
||||||
|
<component :is="Refresh"/>
|
||||||
|
</el-icon>
|
||||||
|
暂停中
|
||||||
|
</el-button>
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- type="primary"-->
|
<!-- type="primary"-->
|
||||||
<!-- v-if="testStatus=='test_init'"-->
|
<!-- v-if="testStatus=='test_init'"-->
|
||||||
@@ -145,6 +151,7 @@ import {CheckData} from "@/api/check/interface"
|
|||||||
import {useCheckStore} from "@/stores/modules/check";
|
import {useCheckStore} from "@/stores/modules/check";
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import {getBigTestItem} from "@/api/check/test";
|
import {getBigTestItem} from "@/api/check/test";
|
||||||
|
import {tryHideFullScreenLoading} from "@/components/Loading/fullScreen";
|
||||||
|
|
||||||
const checkStore = useCheckStore()
|
const checkStore = useCheckStore()
|
||||||
|
|
||||||
@@ -422,18 +429,20 @@ watch(webMsgSend, function (newValue, oldValue) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'Pause_Success':
|
case 'preStopTest':
|
||||||
|
if(newValue.operateCode == 'stop'){
|
||||||
ElMessage.success('暂停成功')
|
ElMessage.success('暂停成功')
|
||||||
handlePauseTest()
|
|
||||||
emit('update:testStatus', 'paused')
|
emit('update:testStatus', 'paused')
|
||||||
|
handlePauseTest()
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
// case 'Pause_Fail':
|
// case 'Pause_Fail':
|
||||||
// ElMessage.error('暂停失败')
|
// ElMessage.error('暂停失败')
|
||||||
// break;
|
// break;
|
||||||
case 'Resume_Success':
|
case 'Resume_Success':
|
||||||
ElMessage.success('开始继续检测')
|
ElMessage.success('开始继续检测')
|
||||||
handleResumeTest()
|
|
||||||
emit('update:testStatus', 'process')
|
emit('update:testStatus', 'process')
|
||||||
|
handleResumeTest()
|
||||||
break;
|
break;
|
||||||
// case 'Resume_Fail':
|
// case 'Resume_Fail':
|
||||||
// ElMessage.error('无法继续检测')
|
// ElMessage.error('无法继续检测')
|
||||||
@@ -1281,7 +1290,7 @@ const handlePauseTest = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleResumeTest = () => {
|
const handleResumeTest = () => {
|
||||||
activeIndex++
|
//activeIndex++
|
||||||
startData.value = new Date();
|
startData.value = new Date();
|
||||||
testLogList.push({
|
testLogList.push({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
|
|||||||
@@ -42,6 +42,12 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
初始化中
|
初始化中
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="warning" v-if="ActiveStatue === 'paused_ing'" disabled>
|
||||||
|
<el-icon class="loading-box" style="color: #fff;margin-right: 8px;">
|
||||||
|
<component :is="Refresh"/>
|
||||||
|
</el-icon>
|
||||||
|
暂停中
|
||||||
|
</el-button>
|
||||||
<el-button :type="ActiveStatue==='success'?'primary':'danger'" :icon="Right"
|
<el-button :type="ActiveStatue==='success'?'primary':'danger'" :icon="Right"
|
||||||
v-if="ActiveStatue === 'success'||ActiveStatue==='error'||ActiveStatue==='test_init_fail'||ActiveStatue==='connect_timeout'"
|
v-if="ActiveStatue === 'success'||ActiveStatue==='error'||ActiveStatue==='test_init_fail'||ActiveStatue==='connect_timeout'"
|
||||||
@click="nextStep">
|
@click="nextStep">
|
||||||
@@ -78,6 +84,7 @@ import {Device} from '@/api/device/interface/device';
|
|||||||
import socketClient from '@/utils/webSocketClient';
|
import socketClient from '@/utils/webSocketClient';
|
||||||
import {useCheckStore} from "@/stores/modules/check";
|
import {useCheckStore} from "@/stores/modules/check";
|
||||||
import {startPreTest, pauseTest, resumeTest} from '@/api/socket/socket'
|
import {startPreTest, pauseTest, resumeTest} from '@/api/socket/socket'
|
||||||
|
import {showFullScreenLoading} from "@/components/Loading/fullScreen";
|
||||||
|
|
||||||
|
|
||||||
//import SvgIcon from '@/components/SvgIcon.vue';
|
//import SvgIcon from '@/components/SvgIcon.vue';
|
||||||
@@ -370,11 +377,8 @@ watch(ActiveStatue, function (newValue, oldValue) {
|
|||||||
const sendPause = () => {
|
const sendPause = () => {
|
||||||
console.log('发起暂停请求')
|
console.log('发起暂停请求')
|
||||||
|
|
||||||
pauseTest().then(res => {
|
ActiveStatue.value = 'paused_ing'
|
||||||
Object.assign(webMsgSend.value, {
|
pauseTest()
|
||||||
requestId: 'Pause_Success'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
const sendResume = () => {
|
const sendResume = () => {
|
||||||
console.log('发起继续检测请求')
|
console.log('发起继续检测请求')
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ const getTreeData = (val: any) => {
|
|||||||
// 使用 nextTick 确保在 DOM 更新后调用 setCurrentKey
|
// 使用 nextTick 确保在 DOM 更新后调用 setCurrentKey
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
treeRef.value?.setCurrentKey(node.id);
|
treeRef.value?.setCurrentKey(node.id);
|
||||||
|
idd.value = node.id
|
||||||
});
|
});
|
||||||
//console.log(checkStore.planId,checkStore.planCode,checkStore.scriptId,checkStore.errorSysId)
|
//console.log(checkStore.planId,checkStore.planCode,checkStore.scriptId,checkStore.errorSysId)
|
||||||
}
|
}
|
||||||
@@ -87,7 +88,22 @@ watch(
|
|||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const idd = ref('')
|
||||||
const handleNodeClick = (data: Plan.ResPlan) => {
|
const handleNodeClick = (data: Plan.ResPlan) => {
|
||||||
|
|
||||||
|
if (data.name === '未检' || data.name === '检测中' || data.name === '检测完成') {
|
||||||
|
// 如果是父节点,不执行任何操作
|
||||||
|
//console.log('父节点不执行任何操作');
|
||||||
|
// 设置当前高亮节点
|
||||||
|
nextTick(() => {
|
||||||
|
treeRef.value?.setCurrentKey(idd.value);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
idd.value = data.id
|
||||||
|
|
||||||
checkStore.setPlanId(data.id)
|
checkStore.setPlanId(data.id)
|
||||||
checkStore.setPlanCode(data.code)
|
checkStore.setPlanCode(data.code)
|
||||||
checkStore.setScriptId(data.scriptId)
|
checkStore.setScriptId(data.scriptId)
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
:customData="{
|
:customData="{
|
||||||
title: '设备检测状态',
|
title: '设备检测状态',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
|
|
||||||
}"
|
}"
|
||||||
:legendData="{
|
:legendData="{
|
||||||
icon: 'circle',
|
icon: 'circle',
|
||||||
@@ -302,10 +303,6 @@ const getPieData = async (id: string) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
planName.value = '所选计划:'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查 checkStateCount 是否全为 0
|
// 检查 checkStateCount 是否全为 0
|
||||||
const allZero = Object.values(checkStateCount).every(count => count === 0);
|
const allZero = Object.values(checkStateCount).every(count => count === 0);
|
||||||
@@ -332,6 +329,12 @@ chartsData3.value = [
|
|||||||
{ value: allZeroReport ? 0 : reportStateCount[0] === 0 ? null : reportStateCount[0], name: '未生成', itemStyle: { color: '#ee6666' } },
|
{ value: allZeroReport ? 0 : reportStateCount[0] === 0 ? null : reportStateCount[0], name: '未生成', itemStyle: { color: '#ee6666' } },
|
||||||
{ value: allZeroReport ? 0 : reportStateCount[1] === 0 ? null : reportStateCount[1], name: '已生成', itemStyle: { color: '#91cc75' } },
|
{ value: allZeroReport ? 0 : reportStateCount[1] === 0 ? null : reportStateCount[1], name: '已生成', itemStyle: { color: '#91cc75' } },
|
||||||
];
|
];
|
||||||
|
}else{
|
||||||
|
|
||||||
|
planName.value = '所选计划:'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pieRef1.value.init()
|
pieRef1.value.init()
|
||||||
pieRef2.value.init()
|
pieRef2.value.init()
|
||||||
|
|||||||
Reference in New Issue
Block a user