|
@@ -2,6 +2,17 @@
|
|
import { ref } from "vue";
|
|
import { ref } from "vue";
|
|
import titHeader from "./components/tit-header.vue";
|
|
import titHeader from "./components/tit-header.vue";
|
|
|
|
|
|
|
|
+import { useCommonStoreHook } from "@/store";
|
|
|
|
+import { getTestProjectList } from "@/api/project";
|
|
|
|
+import { CheckboxValueType } from "element-plus";
|
|
|
|
+import {
|
|
|
|
+ searchExcutingInstrumentConfig,
|
|
|
|
+ searchTestMachineConfig,
|
|
|
|
+ searhTestType,
|
|
|
|
+} from "@/api/project/excute";
|
|
|
|
+
|
|
|
|
+const { currentExecutionId } = toRefs(useCommonStoreHook());
|
|
|
|
+
|
|
interface VersionItem {
|
|
interface VersionItem {
|
|
instrumentType: string;
|
|
instrumentType: string;
|
|
configName: string;
|
|
configName: string;
|
|
@@ -12,10 +23,75 @@ const formLabelAlign = ref<VersionItem>({
|
|
instrumentType: "",
|
|
instrumentType: "",
|
|
configName: "",
|
|
configName: "",
|
|
configIp: "",
|
|
configIp: "",
|
|
|
|
+ zhongduan: "",
|
|
});
|
|
});
|
|
|
|
|
|
const drawer = ref(false);
|
|
const drawer = ref(false);
|
|
-const checkList = ref(["Value selected and disabled", "Value A"]);
|
|
|
|
|
|
+
|
|
|
|
+onMounted(() => {
|
|
|
|
+ getTestProjectTopList();
|
|
|
|
+ getAllTestTypes();
|
|
|
|
+ getExcutingMachines();
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+const topProAllList = ref<any[]>([]);
|
|
|
|
+const topProSelectedList = ref<any[]>([]);
|
|
|
|
+const checkAll = ref(false);
|
|
|
|
+const isIndeterminate = ref(true);
|
|
|
|
+
|
|
|
|
+const handleCheckAllChange = (val: CheckboxValueType) => {
|
|
|
|
+ topProSelectedList.value = val
|
|
|
|
+ ? topProAllList.value.map((item) => item.id)
|
|
|
|
+ : [];
|
|
|
|
+ isIndeterminate.value = false;
|
|
|
|
+};
|
|
|
|
+const handletopProSelectedListChange = (value: CheckboxValueType[]) => {
|
|
|
|
+ const checkedCount = value.length;
|
|
|
|
+ checkAll.value = checkedCount === topProAllList.value.length;
|
|
|
|
+ isIndeterminate.value =
|
|
|
|
+ checkedCount > 0 && checkedCount < topProAllList.value.length;
|
|
|
|
+};
|
|
|
|
+// 获取顶部测试项目
|
|
|
|
+const getTestProjectTopList = () => {
|
|
|
|
+ getTestProjectList({ engineeringId: currentExecutionId.value }).then(
|
|
|
|
+ (result) => {
|
|
|
|
+ topProAllList.value = result.data;
|
|
|
|
+ topProSelectedList.value = result.data.map((item) => item.id); // 默认选中全部
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+// 顶部展示的项目 是弹窗选中的项目
|
|
|
|
+const topOnShowProList = computed(() => {
|
|
|
|
+ return topProAllList.value.filter((item) =>
|
|
|
|
+ topProSelectedList.value.includes(item.id)
|
|
|
|
+ );
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+// 下面左边第一列
|
|
|
|
+const allTestTypes = ref<any[]>([]);
|
|
|
|
+const getAllTestTypes = () => {
|
|
|
|
+ searhTestType().then((result) => {
|
|
|
|
+ allTestTypes.value = result.data;
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+// 下边第二列
|
|
|
|
+const excutingMachinesList = ref<any[]>([]); // 所有执行终端
|
|
|
|
+const getExcutingMachines = () => {
|
|
|
|
+ searchTestMachineConfig(currentExecutionId.value).then((result) => {
|
|
|
|
+ excutingMachinesList.value = result.data;
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const testingMachines = ref<any[]>([]); // 所有routeData里面的测试仪器
|
|
|
|
+const getExcutingGlobalMachines = async () => {
|
|
|
|
+ let res = await searchExcutingInstrumentConfig(
|
|
|
|
+ currentExecutionId.value,
|
|
|
|
+ topProSelectedList.value
|
|
|
|
+ );
|
|
|
|
+ testingMachines.value = res.data;
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -28,8 +104,8 @@ const checkList = ref(["Value selected and disabled", "Value A"]);
|
|
<el-scrollbar height="100%">
|
|
<el-scrollbar height="100%">
|
|
<div class="test-list">
|
|
<div class="test-list">
|
|
<div
|
|
<div
|
|
- v-for="item in 50"
|
|
|
|
- :key="item"
|
|
|
|
|
|
+ v-for="item in topOnShowProList"
|
|
|
|
+ :key="item.id"
|
|
class="test-list-item"
|
|
class="test-list-item"
|
|
:class="item === 2 ? 'active' : ''"
|
|
:class="item === 2 ? 'active' : ''"
|
|
>
|
|
>
|
|
@@ -47,7 +123,7 @@ const checkList = ref(["Value selected and disabled", "Value A"]);
|
|
<svg-icon icon-class="chacha" class="svg svg-error" />
|
|
<svg-icon icon-class="chacha" class="svg svg-error" />
|
|
<svg-icon icon-class="Frame" class="svg svg-progress" />
|
|
<svg-icon icon-class="Frame" class="svg svg-progress" />
|
|
</div>
|
|
</div>
|
|
- <div class="name">增益测试</div>
|
|
|
|
|
|
+ <div class="name">{{ item.projectName }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -71,10 +147,10 @@ const checkList = ref(["Value selected and disabled", "Value A"]);
|
|
placeholder="选择测试类型"
|
|
placeholder="选择测试类型"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in 3"
|
|
|
|
- key="item.value"
|
|
|
|
- label="item.label"
|
|
|
|
- value="item.value"
|
|
|
|
|
|
+ v-for="item in allTestTypes"
|
|
|
|
+ :key="item.dictValue"
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -96,14 +172,14 @@ const checkList = ref(["Value selected and disabled", "Value A"]);
|
|
<div class="select-div">
|
|
<div class="select-div">
|
|
<el-select
|
|
<el-select
|
|
class="select-item"
|
|
class="select-item"
|
|
- v-model="formLabelAlign.configName"
|
|
|
|
|
|
+ v-model="formLabelAlign.zhongduan"
|
|
placeholder="选择执行终端"
|
|
placeholder="选择执行终端"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in 3"
|
|
|
|
- key="item.value"
|
|
|
|
- label="item.label"
|
|
|
|
- value="item.value"
|
|
|
|
|
|
+ v-for="item in excutingMachinesList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.configName"
|
|
|
|
+ :value="item.id"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
<el-button class="test-min-btn" type="primary">
|
|
<el-button class="test-min-btn" type="primary">
|
|
@@ -202,11 +278,26 @@ const checkList = ref(["Value selected and disabled", "Value A"]);
|
|
<div class="test-drawer-header">选择测试项</div>
|
|
<div class="test-drawer-header">选择测试项</div>
|
|
</template>
|
|
</template>
|
|
<template #default>
|
|
<template #default>
|
|
|
|
+ <el-checkbox
|
|
|
|
+ v-model="checkAll"
|
|
|
|
+ :indeterminate="isIndeterminate"
|
|
|
|
+ @change="handleCheckAllChange"
|
|
|
|
+ >
|
|
|
|
+ 全选
|
|
|
|
+ </el-checkbox>
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
- <el-checkbox-group v-model="checkList" class="drawer-list">
|
|
|
|
- <div v-for="item in 20" :key="item" class="drawer-list-item">
|
|
|
|
- <el-checkbox label="" value="Value A" />
|
|
|
|
- <span>增益测试</span>
|
|
|
|
|
|
+ <el-checkbox-group
|
|
|
|
+ v-model="topProSelectedList"
|
|
|
|
+ @change="handletopProSelectedListChange"
|
|
|
|
+ class="drawer-list"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ v-for="item in topProAllList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ class="drawer-list-item"
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox label="" :value="item.id" />
|
|
|
|
+ <span>{{ item.projectName }}</span>
|
|
</div>
|
|
</div>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
@@ -298,6 +389,7 @@ $color-progress: #3cbaff;
|
|
}
|
|
}
|
|
.test-list {
|
|
.test-list {
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+ justify-content: center;
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.test-list-item {
|
|
.test-list-item {
|