修改正式检测,使其能按照通道进行页面展示
This commit is contained in:
@@ -32,10 +32,65 @@ export interface RawDataItem {
|
|||||||
L3: number
|
L3: number
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 用于定义 (设备)通道的原始数据
|
// 用来描述检测脚本类型
|
||||||
*/
|
export interface ScriptItem {
|
||||||
export interface RawData {
|
id: string,
|
||||||
chnNum: string,
|
scriptItemName: string,
|
||||||
rawDataItems: RawDataItem[]
|
children?: ScriptItem[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 用来描述 通道检测结果
|
||||||
|
export enum ChnCheckResultEnum {
|
||||||
|
UNKNOWN = -1,
|
||||||
|
FAIL = 0,
|
||||||
|
SUCCESS = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
//用来描述 某个脚本测试项对所有通道的检测结果
|
||||||
|
export interface ScriptChnItem {
|
||||||
|
scriptID: string
|
||||||
|
scriptItemName: string
|
||||||
|
|
||||||
|
// 设备
|
||||||
|
devices: Array<{
|
||||||
|
deviceID: string,
|
||||||
|
deviceName: string,
|
||||||
|
chnResult: ChnCheckResultEnum[] //通道检测结果
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于描述 (设备)通道检测结果展示的按钮类型
|
||||||
|
*/
|
||||||
|
export interface ButtonResult {
|
||||||
|
resultType: 'info' | 'success' | 'danger',
|
||||||
|
resultValue: '-' | '√' | '×'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于描述 脚本检测结果展示的按钮类型
|
||||||
|
*/
|
||||||
|
export interface ScriptChnViewItem {
|
||||||
|
scriptID: string,
|
||||||
|
scriptItemName: string //脚本项名称
|
||||||
|
|
||||||
|
// 设备
|
||||||
|
devices:Array<{
|
||||||
|
deviceID: string,
|
||||||
|
deviceName: string,
|
||||||
|
chnResult: ButtonResult[],
|
||||||
|
}>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义检测日志类型
|
||||||
|
*/
|
||||||
|
export interface LogItem {
|
||||||
|
type: 'info' | 'error'
|
||||||
|
log: string
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,42 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="table-main">
|
<div class="table-main">
|
||||||
<el-collapse v-model="activeName" accordion style="width: 100%;height:335px">
|
<el-table :data="tableData" stripe border :header-cell-style="{ textAlign: 'center' } "
|
||||||
<el-collapse-item v-for="(item, index) in tableData" :key="index+1" :title="'通道'+ (index+1)" :name="'通道'+ (index+1)">
|
:cell-style="{ textAlign: 'center' }" height="335px"
|
||||||
|
style="width: 100%;">
|
||||||
<el-table :data="item.rawDataItems" stripe border :header-cell-style="{ textAlign: 'center' } "
|
<el-table-column type="index" label="序号" width="70" fixed="left"/>
|
||||||
:cell-style="{ textAlign: 'center' }" height="335px" style="width: 100%;max-height: 250px;overflow-y: auto;">
|
|
||||||
<el-table-column type="index" fixed="left" label="序号" width="70"/>
|
|
||||||
<el-table-column prop="updateTime" label="数据时间"/>
|
<el-table-column prop="updateTime" label="数据时间"/>
|
||||||
<el-table-column prop="L1" label="L1(V)"/>
|
<el-table-column prop="L1" label="L1(V)"/>
|
||||||
<el-table-column prop="L2" label="L2(V)"/>
|
<el-table-column prop="L2" label="L2(V)"/>
|
||||||
<el-table-column prop="L3" label="L3(V)"/>
|
<el-table-column prop="L3" label="L3(V)"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
</el-collapse-item>
|
|
||||||
</el-collapse>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="tsx" setup>
|
<script lang="tsx" setup>
|
||||||
|
|
||||||
import type {RawData} from "@/api/check/interface";
|
import type {RawDataItem} from "@/api/check/interface";
|
||||||
|
|
||||||
const {tableData} = defineProps<{
|
const {tableData} = defineProps<{
|
||||||
tableData:RawData[]
|
tableData: RawDataItem[]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const activeName = ref('通道1')
|
|
||||||
|
|
||||||
// 清空数据
|
|
||||||
const clear = () => {
|
|
||||||
activeName.value = '通道1'
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
clear
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -3,7 +3,11 @@
|
|||||||
<div class="table-main">
|
<div class="table-main">
|
||||||
<el-table :data="tableData" height="335px" :header-cell-style="{ textAlign: 'center' } "
|
<el-table :data="tableData" height="335px" :header-cell-style="{ textAlign: 'center' } "
|
||||||
:cell-style="{ textAlign: 'center' }">
|
:cell-style="{ textAlign: 'center' }">
|
||||||
<el-table-column prop="chnNum" label="序号" width="70"/>
|
<el-table-column prop="chnNum" label="通道号" width="80">
|
||||||
|
<template #default="{row}">
|
||||||
|
{{ '通道' + row.chnNum }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="standardValue" label="标准值(V)"/>
|
<el-table-column prop="standardValue" label="标准值(V)"/>
|
||||||
<el-table-column label="L1(V)">
|
<el-table-column label="L1(V)">
|
||||||
<el-table-column prop="L1" width="80" label="被检值">
|
<el-table-column prop="L1" width="80" label="被检值">
|
||||||
@@ -33,9 +37,6 @@
|
|||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="result" label="检测结果">
|
<el-table-column prop="result" label="检测结果">
|
||||||
<!-- <template #default="scope">
|
|
||||||
<el-tag :type="scope.row.Result === '合格' ? 'success' : 'danger'">{{ scope.row.Result }}</el-tag>
|
|
||||||
</template> -->
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="danger" v-if="scope.row.result === '不合格'">{{ scope.row.result }}</el-tag>
|
<el-tag type="danger" v-if="scope.row.result === '不合格'">{{ scope.row.result }}</el-tag>
|
||||||
<span v-if="scope.row.result != '不合格'">{{ scope.row.result }}</span>
|
<span v-if="scope.row.result != '不合格'">{{ scope.row.result }}</span>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<el-input v-model='formContent.deviceName' :disabled="true"/>
|
<el-input v-model='formContent.deviceName' :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label='通道号'>
|
<el-form-item label='通道号'>
|
||||||
<el-select v-model="formContent.monitorIdx">
|
<el-select v-model="formContent.monitorIdx" @change="handleChnNumChange">
|
||||||
<el-option v-for="item in monitorIdxList" :key="item.value" :label="item.value"
|
<el-option v-for="item in monitorIdxList" :key="item.value" :label="item.value"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
<div class="data-check-body">
|
<div class="data-check-body">
|
||||||
<div class="content-left-tree">
|
<div class="content-left-tree">
|
||||||
<div>
|
<div>
|
||||||
<el-radio-group v-model="scriptSwitch">
|
<el-radio-group v-model="checkItemSwitch" @change="handleCheckItemSwitch">
|
||||||
<el-radio-button label="不合格测试项" value="0"/>
|
<el-radio-button label="不合格测试项" :value="0"/>
|
||||||
<el-radio-button label="全部测试项" value="1"/>
|
<el-radio-button label="全部测试项" :value="1"/>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="content-tree">
|
<div class="content-tree">
|
||||||
@@ -65,12 +65,12 @@ import {dialogBig} from '@/utils/elementBind'
|
|||||||
import {reactive, ref} from 'vue'
|
import {reactive, ref} from 'vue'
|
||||||
import DataCheckResultTable from './dataCheckResultTable.vue'
|
import DataCheckResultTable from './dataCheckResultTable.vue'
|
||||||
import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
|
import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
|
||||||
import type {CheckResult, DataCheck, RawData} from "@/api/check/interface";
|
import type {CheckResult, DataCheck, RawDataItem} from "@/api/check/interface";
|
||||||
import {data as treeData} from "@/api/plan/autoTest.json";
|
import {data as treeData} from "@/api/plan/autoTest.json";
|
||||||
|
|
||||||
const {appendToBody} = defineProps<{
|
const {appendToBody} = withDefaults(defineProps<{
|
||||||
appendToBody: boolean
|
appendToBody: boolean
|
||||||
}>()
|
}>(), {appendToBody: false})
|
||||||
|
|
||||||
|
|
||||||
const formContent = reactive<DataCheck>({
|
const formContent = reactive<DataCheck>({
|
||||||
@@ -83,7 +83,7 @@ const formContent = reactive<DataCheck>({
|
|||||||
|
|
||||||
const activeName = ref('resultTab')
|
const activeName = ref('resultTab')
|
||||||
|
|
||||||
const scriptSwitch = ref('0');
|
const checkItemSwitch = ref(0)
|
||||||
|
|
||||||
const currentScriptDsc = ref('电压准确度检测:频率:42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°');
|
const currentScriptDsc = ref('电压准确度检测:频率:42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°');
|
||||||
|
|
||||||
@@ -108,6 +108,20 @@ const monitorIdxList = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// 改变通道号下拉框触发事件
|
||||||
|
const handleChnNumChange = (data: any) => {
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 切换不合格测试项、全部测试项 触发事件
|
||||||
|
const handleCheckItemSwitch = (data: any) => {
|
||||||
|
// 0 不合格测试项、1 全部测试项
|
||||||
|
if (data === 0) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 点击左侧树节点触发事件
|
// 点击左侧树节点触发事件
|
||||||
const handleNodeClick = (data: any) => {
|
const handleNodeClick = (data: any) => {
|
||||||
@@ -126,25 +140,10 @@ const checkResultTableData = reactive<CheckResult[]>([
|
|||||||
L3_errValue: 0.01,
|
L3_errValue: 0.01,
|
||||||
maxErrVaule: 0.05774,
|
maxErrVaule: 0.05774,
|
||||||
result: '合格',
|
result: '合格',
|
||||||
},
|
|
||||||
{
|
|
||||||
chnNum: '2',
|
|
||||||
standardValue: 57.74,
|
|
||||||
L1: 57.73,
|
|
||||||
L1_errValue: 0.01,
|
|
||||||
L2: 57.73,
|
|
||||||
L2_errValue: 0.01,
|
|
||||||
L3: 57.73,
|
|
||||||
L3_errValue: 0.01,
|
|
||||||
maxErrVaule: 0.05774,
|
|
||||||
result: '合格',
|
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
const rawTableData = reactive<RawData[]>([
|
const rawTableData = reactive<RawDataItem[]>([
|
||||||
{
|
|
||||||
chnNum: '1',
|
|
||||||
rawDataItems: [
|
|
||||||
{
|
{
|
||||||
updateTime: "2024-10-10 09:30:00",
|
updateTime: "2024-10-10 09:30:00",
|
||||||
L1: 57.73,
|
L1: 57.73,
|
||||||
@@ -265,258 +264,6 @@ const rawTableData = reactive<RawData[]>([
|
|||||||
L2: 57.73,
|
L2: 57.73,
|
||||||
L3: 57.73,
|
L3: 57.73,
|
||||||
}
|
}
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
chnNum: '2',
|
|
||||||
rawDataItems: [
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:00",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:03",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:06",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:09",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:12",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:15",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:18",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:21",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:24",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:27",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:30",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:33",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:36",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:39",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:42",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:45",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:48",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:51",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:54",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:57",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
chnNum: '3',
|
|
||||||
rawDataItems: [
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:00",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:03",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:06",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:09",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:12",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:15",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:18",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:21",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:24",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:27",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:30",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:33",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:36",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:39",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:42",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:45",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:48",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:51",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:54",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
updateTime: "2024-10-10 09:30:57",
|
|
||||||
L1: 57.73,
|
|
||||||
L2: 57.73,
|
|
||||||
L3: 57.73,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
])
|
])
|
||||||
|
|
||||||
const resultTableRef = ref()
|
const resultTableRef = ref()
|
||||||
@@ -528,12 +275,11 @@ const close = () => {
|
|||||||
//数据清空
|
//数据清空
|
||||||
|
|
||||||
activeName.value = 'rawDataTab'
|
activeName.value = 'rawDataTab'
|
||||||
rawDataTableRef.value?.clear()
|
|
||||||
|
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const open = (deviceItem: any, chnNum: number) => {
|
const open = (deviceItem: any, chnNum?: number) => {
|
||||||
// 发起后端请求,查询详细信息
|
// 发起后端请求,查询详细信息
|
||||||
// const deviceItem = await getDetail(planId,checkItemId,deviceItem.id, chnNum)
|
// const deviceItem = await getDetail(planId,checkItemId,deviceItem.id, chnNum)
|
||||||
|
|
||||||
@@ -610,7 +356,6 @@ defineExpose({
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,8 +114,7 @@
|
|||||||
:icon="View"
|
:icon="View"
|
||||||
@click="openDrawer('查看', scope.row)"
|
@click="openDrawer('查看', scope.row)"
|
||||||
v-if="form.activeTabs === 3 && form.activeChildTabs === 1"
|
v-if="form.activeTabs === 3 && form.activeChildTabs === 1"
|
||||||
>查看</el-button
|
>查看</el-button>
|
||||||
>
|
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -123,8 +122,7 @@
|
|||||||
:icon="Download"
|
:icon="Download"
|
||||||
@click="openDrawer('报告下载', scope.row)"
|
@click="openDrawer('报告下载', scope.row)"
|
||||||
v-if="form.activeTabs === 3 && form.activeChildTabs === 0 && scope.row.reportState === 1"
|
v-if="form.activeTabs === 3 && form.activeChildTabs === 0 && scope.row.reportState === 1"
|
||||||
>报告下载</el-button
|
>报告下载</el-button>
|
||||||
>
|
|
||||||
|
|
||||||
<!-- <div class='cn-render-buttons' v-if="form.activeTabs === 3 && form.activeChildTabs === 0">
|
<!-- <div class='cn-render-buttons' v-if="form.activeTabs === 3 && form.activeChildTabs === 0">
|
||||||
<el-dropdown trigger='click'>
|
<el-dropdown trigger='click'>
|
||||||
@@ -147,8 +145,7 @@
|
|||||||
:icon="Postcard"
|
:icon="Postcard"
|
||||||
@click="openDrawer('生成', scope.row)"
|
@click="openDrawer('生成', scope.row)"
|
||||||
v-if="form.activeTabs === 3"
|
v-if="form.activeTabs === 3"
|
||||||
>报告生成</el-button
|
>报告生成</el-button>
|
||||||
>
|
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@@ -164,24 +161,23 @@
|
|||||||
@click="openDrawer('归档', scope.row)"
|
@click="openDrawer('归档', scope.row)"
|
||||||
v-if="form.activeTabs === 4"
|
v-if="form.activeTabs === 4"
|
||||||
:disabled = "scope.row.checkState != 2"
|
:disabled = "scope.row.checkState != 2"
|
||||||
>归档</el-button
|
>归档</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
:icon="PieChart"
|
:icon="PieChart"
|
||||||
@click="openDrawer('检测数据查询', scope.row)"
|
@click="openDrawer('检测数据查询', scope.row)"
|
||||||
v-if="form.activeTabs === 5"
|
v-if="form.activeTabs === 5"
|
||||||
>检测数据查询</el-button
|
>检测数据查询</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
:icon="Switch"
|
:icon="Switch"
|
||||||
@click="openDrawer('误差体系更换', scope.row)"
|
@click="openDrawer('误差体系更换', scope.row)"
|
||||||
v-if="form.activeTabs === 5 && scope.row.documentState === 1"
|
v-if="form.activeTabs === 5 && scope.row.documentState === 1"
|
||||||
>误差体系更换</el-button
|
>误差体系更换</el-button>
|
||||||
>
|
|
||||||
|
|
||||||
<div class='cn-render-buttons' v-if="form.activeTabs === 5 && scope.row.documentState === 1">
|
<div class='cn-render-buttons' v-if="form.activeTabs === 5 && scope.row.documentState === 1">
|
||||||
<el-dropdown trigger='click'>
|
<el-dropdown trigger='click'>
|
||||||
@@ -221,10 +217,7 @@
|
|||||||
@update:visible="reportDialogVisible = $event"
|
@update:visible="reportDialogVisible = $event"
|
||||||
></reportPopup>
|
></reportPopup>
|
||||||
|
|
||||||
<dataCheckPopup
|
<dataCheckPopup ref="dataCheckPopupRef"/>
|
||||||
:visible="dataCheckDialogVisible"
|
|
||||||
@update:visible="dataCheckDialogVisible = $event"
|
|
||||||
></dataCheckPopup>
|
|
||||||
|
|
||||||
<dataCheckChangeErrSysPopup
|
<dataCheckChangeErrSysPopup
|
||||||
:visible="dataCheckChangeErrSysDialogVisible"
|
:visible="dataCheckChangeErrSysDialogVisible"
|
||||||
@@ -236,7 +229,7 @@
|
|||||||
@update:visible="matchDialogVisible = $event"
|
@update:visible="matchDialogVisible = $event"
|
||||||
></matchPopup>
|
></matchPopup>
|
||||||
|
|
||||||
<!--系数校准-->>
|
<!--系数校准-->
|
||||||
<ChannelsTest ref="channelsTest"></ChannelsTest>
|
<ChannelsTest ref="channelsTest"></ChannelsTest>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -255,7 +248,7 @@ import { getPlanList } from "@/api/plan/planList";
|
|||||||
import deviceDataList from '@/api/device/device/deviceData'
|
import deviceDataList from '@/api/device/device/deviceData'
|
||||||
import TestPopup from "./testPopup.vue";
|
import TestPopup from "./testPopup.vue";
|
||||||
import reportPopup from "./reportPopup.vue";
|
import reportPopup from "./reportPopup.vue";
|
||||||
import dataCheckPopup from "./dataCheckPopup.vue";
|
import dataCheckPopup from "./dataCheckSingleChannelSingleTestPopup.vue";
|
||||||
import dataCheckChangeErrSysPopup from "./dataCheckChangeErrSysPopup.vue";
|
import dataCheckChangeErrSysPopup from "./dataCheckChangeErrSysPopup.vue";
|
||||||
import { getBoundPqDevList } from '@/api/plan/plan.ts'
|
import { getBoundPqDevList } from '@/api/plan/plan.ts'
|
||||||
import { onMounted, reactive, ref, watch } from "vue";
|
import { onMounted, reactive, ref, watch } from "vue";
|
||||||
@@ -273,7 +266,9 @@ const value1 = ref("");
|
|||||||
const value2 = ref("");
|
const value2 = ref("");
|
||||||
const tableHeight = ref(0);
|
const tableHeight = ref(0);
|
||||||
const reportDialogVisible = ref(false)
|
const reportDialogVisible = ref(false)
|
||||||
const dataCheckDialogVisible = ref(false)
|
|
||||||
|
const dataCheckPopupRef=ref<InstanceType<typeof dataCheckPopup>>()
|
||||||
|
|
||||||
const dataCheckChangeErrSysDialogVisible = ref(false)
|
const dataCheckChangeErrSysDialogVisible = ref(false)
|
||||||
const matchDialogVisible = ref(false)
|
const matchDialogVisible = ref(false)
|
||||||
const dialogTitle = ref('手动检测')
|
const dialogTitle = ref('手动检测')
|
||||||
@@ -404,7 +399,7 @@ const getTableList = async (params: any) => {
|
|||||||
}else{
|
}else{
|
||||||
checkStateList.value = checkStateTable.value
|
checkStateList.value = checkStateTable.value
|
||||||
}
|
}
|
||||||
return getBoundPqDevList({'planId': props.id,
|
return getBoundPqDevList({'planId': props.id,
|
||||||
'checkStateList': checkStateList.value,
|
'checkStateList': checkStateList.value,
|
||||||
'checkResult': form.value.checkResult,
|
'checkResult': form.value.checkResult,
|
||||||
'reportState': form.value.checkReportStatus,
|
'reportState': form.value.checkReportStatus,
|
||||||
@@ -866,7 +861,8 @@ const openDrawer = (title: string, row: any) => {
|
|||||||
|
|
||||||
if(title === '检测数据查询')
|
if(title === '检测数据查询')
|
||||||
{
|
{
|
||||||
dataCheckDialogVisible.value = true;
|
let device={}
|
||||||
|
dataCheckPopupRef.value?.open(device)
|
||||||
}
|
}
|
||||||
if (title === '误差体系更换')
|
if (title === '误差体系更换')
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -10,12 +10,12 @@
|
|||||||
<div class="error-dsc">
|
<div class="error-dsc">
|
||||||
<div class="green-div"></div>
|
<div class="green-div"></div>
|
||||||
<span style=" color: #606266; font-size: 16px;font-weight: 600;">
|
<span style=" color: #606266; font-size: 16px;font-weight: 600;">
|
||||||
守时误差≤1000ms
|
符合≤1000ms
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="red-div"></div>
|
<div class="red-div"></div>
|
||||||
<span style=" color: #F56C6c; font-size: 16px;font-weight: 600;">
|
<span style=" color: #F56C6c; font-size: 16px;font-weight: 600;">
|
||||||
守时误差>1000ms
|
不符合>1000ms
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -95,7 +95,6 @@
|
|||||||
<Table ref="tableRef1" :id='currentId' :isTimeCheck='isTimeCheck'></Table>
|
<Table ref="tableRef1" :id='currentId' :isTimeCheck='isTimeCheck'></Table>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<!-- <el-tab-pane label="已检设备" v-if="tabShow" :style="{ height: tabPaneHeight }">-->
|
<!-- <el-tab-pane label="已检设备" v-if="tabShow" :style="{ height: tabPaneHeight }">-->
|
||||||
<!-- <!– 列表数据 –>-->
|
<!-- <!– 列表数据 –>-->
|
||||||
<!-- <div class="container_table" :style="{ height: tableHeight }">-->
|
<!-- <div class="container_table" :style="{ height: tableHeight }">-->
|
||||||
@@ -107,22 +106,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { getStaticTreeData } from "@/api/plan/static";
|
|
||||||
import pie from "@/components/echarts/pie/default.vue";
|
import pie from "@/components/echarts/pie/default.vue";
|
||||||
import {useRouter} from "vue-router";
|
import {useRouter} from "vue-router";
|
||||||
import tree from "../components/tree.vue";
|
import tree from "../components/tree.vue";
|
||||||
import Table from "../components/table.vue";
|
import Table from "../components/table.vue";
|
||||||
//import { data } from "@/api/plan/static.json";
|
//import { data } from "@/api/plan/static.json";
|
||||||
import deviceDataList from '@/api/device/device/deviceData'
|
import deviceDataList from '@/api/device/device/deviceData'
|
||||||
import {getPlanListByPattern } from '@/api/plan/plan.ts'
|
import {getBoundPqDevList, getPlanListByPattern} from '@/api/plan/plan.ts'
|
||||||
import { onBeforeMount, onMounted, onUnmounted, ref, watch } from "vue";
|
import {onBeforeMount, onUnmounted, ref, watch} from "vue";
|
||||||
import {useModeStore} from '@/stores/modules/mode'; // 引入模式 store
|
import {useModeStore} from '@/stores/modules/mode'; // 引入模式 store
|
||||||
import {useDictStore} from '@/stores/modules/dict'
|
import {useDictStore} from '@/stores/modules/dict'
|
||||||
import {type Plan} from "@/api/plan/interface";
|
import {type Plan} from "@/api/plan/interface";
|
||||||
import type {CollapseModelValue} from "element-plus/es/components/collapse/src/collapse.mjs";
|
import type {CollapseModelValue} from "element-plus/es/components/collapse/src/collapse.mjs";
|
||||||
import {type Device} from "@/api/device/interface/device";
|
import {type Device} from "@/api/device/interface/device";
|
||||||
import { getBoundPqDevList } from '@/api/plan/plan.ts'
|
|
||||||
import { CENTERED_ALIGNMENT } from "element-plus/es/components/virtual-list/src/defaults";
|
|
||||||
import {ResultData} from "@/api/interface";
|
import {ResultData} from "@/api/interface";
|
||||||
|
|
||||||
const dictStore = useDictStore()
|
const dictStore = useDictStore()
|
||||||
@@ -228,13 +224,11 @@ watch(
|
|||||||
{
|
{
|
||||||
const tabledata = deviceData.filter((item) => item.document_State === "未归档")
|
const tabledata = deviceData.filter((item) => item.document_State === "未归档")
|
||||||
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs, form.value.activeChildTabs, tabledata);
|
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs, form.value.activeChildTabs, tabledata);
|
||||||
}
|
} else if (form.value.activeTabs === 4)//设备归档
|
||||||
else if(form.value.activeTabs === 4)//设备归档
|
|
||||||
{
|
{
|
||||||
const tabledata = deviceData.filter((item) => item.check_State === "检测完成" && item.document_State === "未归档")
|
const tabledata = deviceData.filter((item) => item.check_State === "检测完成" && item.document_State === "未归档")
|
||||||
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs, form.value.activeChildTabs, tabledata);
|
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs, form.value.activeChildTabs, tabledata);
|
||||||
}
|
} else if (form.value.activeTabs === 3 || form.value.activeTabs === 5)//报告生成、数据查询
|
||||||
else if(form.value.activeTabs === 3 || form.value.activeTabs === 5)//报告生成、数据查询
|
|
||||||
{
|
{
|
||||||
const tabledata = deviceData.filter((item) => item.check_State === "检测完成");
|
const tabledata = deviceData.filter((item) => item.check_State === "检测完成");
|
||||||
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs, form.value.activeChildTabs, tabledata);
|
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs, form.value.activeChildTabs, tabledata);
|
||||||
@@ -401,7 +395,6 @@ const handleCheckFunction = (val: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const resizeObserver = new ResizeObserver(entries => {
|
const resizeObserver = new ResizeObserver(entries => {
|
||||||
for (let entry of entries) {
|
for (let entry of entries) {
|
||||||
chartsWidth.value = entry.contentRect.width;
|
chartsWidth.value = entry.contentRect.width;
|
||||||
@@ -458,7 +451,6 @@ onUnmounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.static {
|
.static {
|
||||||
@@ -513,6 +505,7 @@ onUnmounted(() => {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 0px 30px;
|
padding: 0px 30px;
|
||||||
margin-right: 50px;;
|
margin-right: 50px;;
|
||||||
|
|
||||||
.item_img {
|
.item_img {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
@@ -565,6 +558,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// .container_function {
|
// .container_function {
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
// height: auto;
|
// height: auto;
|
||||||
@@ -656,6 +650,7 @@ onUnmounted(() => {
|
|||||||
// padding-left: 2ch;
|
// padding-left: 2ch;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-collapse {
|
.el-collapse {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
// min-height: 200px !important;
|
// min-height: 200px !important;
|
||||||
@@ -703,6 +698,7 @@ onUnmounted(() => {
|
|||||||
.tabs-menu {
|
.tabs-menu {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container_table {
|
.container_table {
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
flex: 1 !important;
|
flex: 1 !important;
|
||||||
@@ -718,15 +714,18 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-collapse-item__header) {
|
:deep(.el-collapse-item__header) {
|
||||||
color: var(--el-color-primary);
|
color: var(--el-color-primary);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: "Microsoft YaHei", "微软雅黑", "Arial", sans-serif;
|
font-family: "Microsoft YaHei", "微软雅黑", "Arial", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-collapse-item__conten) {
|
:deep(.el-collapse-item__conten) {
|
||||||
// background-color:#f6f6f6;
|
// background-color:#f6f6f6;
|
||||||
padding-bottom: 0px !important;
|
padding-bottom: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-collapse-item__content ) {
|
:deep(.el-collapse-item__content ) {
|
||||||
// background-color:#f6f6f6;
|
// background-color:#f6f6f6;
|
||||||
padding-bottom: 0px !important;
|
padding-bottom: 0px !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user