Merge remote-tracking branch 'origin/master'

# Conflicts:
#	frontend/src/api/device/device/index.ts
This commit is contained in:
caozehui
2025-01-13 18:21:24 +08:00
15 changed files with 205 additions and 81 deletions

View File

@@ -240,7 +240,7 @@ watch(webMsgSend,function (newValue,oldValue){
item.desc === newValue.data.desc &&
item.devName === newValue.data.devName);
if (firstCoefficientVO) { // 检查 firstCoefficientVO 是否存在
firstCoefficientVO.aVuData = parseFloat(newValue.data.aVuData).toFixed(4);;
firstCoefficientVO.aVuData = parseFloat(newValue.data.aVuData).toFixed(4);
firstCoefficientVO.aVuXi = newValue.data.aVuXi;
firstCoefficientVO.bVuData = parseFloat(newValue.data.bVuData).toFixed(4);
firstCoefficientVO.bVuXi = newValue.data.bVuXi;
@@ -555,7 +555,7 @@ const handleSubmit = async () => {
tableLoading('big','系数下装')
await getCoefficientCheck({
userPageId: "cdf",
devIds: devIdArray.value,
devIds:devIdArray.value,
planId:planId.value,
errorSysId: select_Plan.value?.errorSysId,
     scriptId: select_Plan.value?.scriptId,

View File

@@ -21,6 +21,7 @@
<script lang="tsx" setup>
import {CheckData} from "@/api/check/interface";
import { computed } from "vue";
import {useDownload} from "@/hooks/useDownload";
import {exportRawData} from "@/api/check/test"

View File

@@ -928,7 +928,11 @@ const handleTest = async (val:string) => {
return
}
// 检查 socketClient.Instance 是否存在
if (!socketClient.Instance) {
console.error('WebSocket 客户端实例不存在');
return;
}
//开始创建webSocket客户端
const data = reactive({

View File

@@ -37,7 +37,7 @@ import { useAuthStore } from "@/stores/modules/auth";
import model from "./tabs/model.vue";
import dashboard from "./tabs/dashboard.vue";
import { onMounted } from "vue";
import { onMounted, ref } from "vue";
const authStore = useAuthStore();
const activeIndex = ref("1-1");

View File

@@ -300,22 +300,31 @@ const getPieData = async (id: string) => {
})
}
chartsData1.value = [
{ value: checkStateCount[0], name: '未检', itemStyle: { color: '#fac858' } },
{ value: checkStateCount[1], name: '检测中', itemStyle: { color: '#ee6666' } },
{ value: checkStateCount[2], name: '检测完成', itemStyle: { color: '#91cc75' } },
{ value: checkStateCount[3], name: '归档', itemStyle: { color: '#5470c6' } },
]
chartsData2.value = [
{ value: checkResultCount[2], name: '未检', itemStyle: { color: '#fac858' } },
{ value: checkResultCount[0], name: '不符合', itemStyle: { color: '#ee6666' } },
{ value: checkResultCount[1], name: '符合', itemStyle: { color: '#91cc75' } },
]
chartsData3.value = [
{ value: reportStateCount[2], name: '未检', itemStyle: { color: '#fac858' } },
{ value: reportStateCount[0], name: '未生成', itemStyle: { color: '#ee6666' } },
{ value: reportStateCount[1], name: '已生成', itemStyle: { color: '#91cc75' } },
]
// 检查 checkStateCount 是否全为 0
const allZero = Object.values(checkStateCount).every(count => count === 0);
chartsData1.value = [
{ value: allZero ? 0 : checkStateCount[0] === 0 ? null : checkStateCount[0], name: '检', itemStyle: { color: '#fac858' } },
{ value: allZero ? 0 : checkStateCount[1] === 0 ? null : checkStateCount[1], name: '检测中', itemStyle: { color: '#ee6666' } },
{ value: allZero ? 0 : checkStateCount[2] === 0 ? null : checkStateCount[2], name: '检测完成', itemStyle: { color: '#91cc75' } },
{ value: allZero ? 0 : checkStateCount[3] === 0 ? null : checkStateCount[3], name: '归档', itemStyle: { color: '#5470c6' } },
];
// 同样处理 chartsData2 和 chartsData3
const allZeroResult = Object.values(checkResultCount).every(count => count === 0);
chartsData2.value = [
{ value: allZeroResult ? 0 : checkResultCount[2] === 0 ? null : checkResultCount[2], name: '未检', itemStyle: { color: '#fac858' } },
{ value: allZeroResult ? 0 : checkResultCount[0] === 0 ? null : checkResultCount[0], name: '不符合', itemStyle: { color: '#ee6666' } },
{ value: allZeroResult ? 0 : checkResultCount[1] === 0 ? null : checkResultCount[1], name: '符合', itemStyle: { color: '#91cc75' } },
];
// 检查 reportStateCount 是否全为 0
const allZeroReport = Object.values(reportStateCount).every(count => count === 0);
chartsData3.value = [
{ value: allZeroReport ? 0 : reportStateCount[2] === 0 ? null : reportStateCount[2], name: '未检', itemStyle: { color: '#fac858' } },
{ 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' } },
];
pieRef1.value.init()
pieRef2.value.init()

View File

@@ -33,9 +33,11 @@
import { useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import { useAuthStore } from "@/stores/modules/auth";
import { useModeStore } from "@/stores/modules/mode"; // 引入模式 store
import { useModeStore ,useAppSceneStore} from "@/stores/modules/mode"; // 引入模式 store
import { ref } from "vue";
const authStore = useAuthStore();
const modeStore = useModeStore(); // 使用模式 store
const AppSceneStore = useAppSceneStore();
const activeIndex = ref("1-1");
const router = useRouter();
const modeList = [
@@ -63,6 +65,7 @@ const modeList = [
];
const handelOpen = async (item: any) => {
modeStore.setCurrentMode(item.code); // 将模式code存入 store
AppSceneStore.setCurrentMode('1');//0省级平台1设备出厂2研发自测
await authStore.setShowMenu();
return;
// if (isActive) {