Merge remote-tracking branch 'origin/master'

This commit is contained in:
caozehui
2024-11-29 16:29:43 +08:00
7 changed files with 712 additions and 283 deletions

View File

@@ -44,113 +44,112 @@ const data = [
deviceModel: "模拟式",
},
]
const plan_devicedata = [
{
id: '1', //装置序号ID
name: '模拟装置1', //设备名称
name: '240001', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '合格', //检测结果
report_State: '生成', //报告状态
document_State: '归档', //归档状态
check_State:'检测完成',//检测状态
check_Result: '未检测', //检测结果
report_State: '生成', //报告状态
document_State: '归档', //归档状态
check_State:'检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '2', //装置序号ID
name: '模拟装置2', //设备名称
name: '240002', //设备名称
dev_Type: 'PQS882B4',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '/', //检测结果
check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'未检',//检测状态
check_State:'未检',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '3', //装置序号ID
name: '模拟装置3', //设备名称
name: '240003', //设备名称
dev_Type: 'PQS882B4',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '/', //检测结果
check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测',//检测状态
check_State:'检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '4', //装置序号ID
name: '模拟装置4', //设备名称
dev_Type: 'PQS882B4',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '不合格', //检测结果
name: '240004', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 1, //复检次数
check_State:'检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '5', //装置序号ID
name: '中电测试装置', //设备名称
dev_Type: 'PMC-680M-22-22-00-115ANBC',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '不合格', //检测结果
name: '240005', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '不合格', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 1, //复检次数
reCheck_Num: 0, //复检次数
},
{
id: '6', //装置序号ID
name: '易司拓测试装置1', //设备名称
dev_Type: 'E703A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '不合格', //检测结果
report_State: '生成', //报告状态
name: '240006', //设备名称
dev_Type: 'PQS882B4',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '不合格', //检测结果
report_State: '生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 1, //复检次数
},
{
id: '7', //装置序号ID
name: '易司拓测试装置2', //设备名称
dev_Type: 'E703A',//设备类型
name: '240007', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '合格', //检测结果
report_State: '生成', //报告状态
check_Result: '全部合格', //检测结果
report_State: '生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 1, //复检次数
},
{
id: '8', //装置序号ID
name: '山大电力测试装置1', //设备名称
dev_Type: 'SDL-3002C',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '合格', //检测结果
name: '240008', //设备名称
dev_Type: 'PQS882B4',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '全部合格', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '9', //装置序号ID
name: '240009', //设备名称
dev_Type: 'PQS882B4',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '有不合格项', //检测结果
report_State: '已生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 1, //复检次数
},
{
id: '9', //装置序号ID
name: '山大电力测试装置2', //设备名称
dev_Type: 'SDL-3002C',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '不合格', //检测结果
report_State: '已生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 2, //复检次数
},
{
id: '10', //装置序号ID
name: '山大电力测试装置2', //设备名称
dev_Type: 'SDL-3002C',//设备类型
name: '240010', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '合格', //检测结果
check_Result: '全部合格', //检测结果
report_State: '已生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
@@ -158,59 +157,281 @@ const data = [
},
{
id: '11', //装置序号ID
name: '山大电力测试装置2', //设备名称
dev_Type: 'SDL-3002C',//设备类型
name: '240011', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '合格', //检测结果
check_Result: '全部合格', //检测结果
report_State: '已生成', //报告状态
document_State: '归档', //归档状态
document_State: '归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 2, //复检次数
reCheck_Num: 1, //复检次数
},
{
id: '12', //装置序号ID
name: '山大电力测试装置2', //设备名称
dev_Type: 'SDL-3002C',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '合格', //检测结果
name: '240012', //设备名称
dev_Type: 'PQS882B4',//设备类型
dev_Chns: 4, //设备通道数
check_Result: '全部合格', //检测结果
report_State: '已生成', //报告状态
document_State: '归档', //归档状态
document_State: '归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 2, //复检次数
},
{
id: '13', //装置序号ID
name: '山大电力测试装置2', //设备名称
dev_Type: 'SDL-3002C',//设备类型
name: '240013', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '不合格', //检测结果
report_State: '生成', //报告状态
check_Result: '未检测', //检测结果
report_State: '生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 2, //复检次数
check_State:'检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '14', //装置序号ID
name: '山大电力测试装置3', //设备名称
dev_Type: 'SDL-3002C',//设备类型
name: '240014', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '不合格', //检测结果
report_State: '生成', //报告状态
check_Result: '未检测', //检测结果
report_State: '生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 2, //复检次数
check_State:'检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '15', //装置序号ID
name: '山大电力测试装置4', //设备名称
dev_Type: 'SDL-3002C',//设备类型
name: '240013', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '不合格', //检测结果
report_State: '生成', //报告状态
check_Result: '未检测', //检测结果
report_State: '生成', //报告状态
document_State: '未归档', //归档状态
check_State:'检测完成',//检测状态
reCheck_Num: 2, //复检次数
check_State:'检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '16', //装置序号ID
name: '240014', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'未检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '17', //装置序号ID
name: '240017', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'未检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '18', //装置序号ID
name: '240018', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'未检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '19', //装置序号ID
name: '240019', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'未检测',//检测状态
reCheck_Num: 0, //复检次数
},
{
id: '20', //装置序号ID
name: '240020', //设备名称
dev_Type: 'PQS882A',//设备类型
dev_Chns: 1, //设备通道数
check_Result: '未检测', //检测结果
report_State: '未生成', //报告状态
document_State: '未归档', //归档状态
check_State:'未检测',//检测状态
reCheck_Num: 0, //复检次数
},
]
// const plan_devicedata = [
// {
// id: '1', //装置序号ID
// name: '模拟装置1', //设备名称
// dev_Type: 'PQS882A',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 0, //复检次数
// },
// {
// id: '2', //装置序号ID
// name: '模拟装置2', //设备名称
// dev_Type: 'PQS882B4',//设备类型
// dev_Chns: 4, //设备通道数
// check_Result: '/', //检测结果
// report_State: '未生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'未检',//检测状态
// reCheck_Num: 0, //复检次数
// },
// {
// id: '3', //装置序号ID
// name: '模拟装置3', //设备名称
// dev_Type: 'PQS882B4',//设备类型
// dev_Chns: 4, //设备通道数
// check_Result: '/', //检测结果
// report_State: '未生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测中',//检测状态
// reCheck_Num: 0, //复检次数
// },
// {
// id: '4', //装置序号ID
// name: '模拟装置4', //设备名称
// dev_Type: 'PQS882B4',//设备类型
// dev_Chns: 4, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '未生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 1, //复检次数
// },
// {
// id: '5', //装置序号ID
// name: '中电测试装置', //设备名称
// dev_Type: 'PMC-680M-22-22-00-115ANBC',//设备类型
// dev_Chns: 4, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '未生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 1, //复检次数
// },
// {
// id: '6', //装置序号ID
// name: '易司拓测试装置1', //设备名称
// dev_Type: 'E703A',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 1, //复检次数
// },
// {
// id: '7', //装置序号ID
// name: '易司拓测试装置2', //设备名称
// dev_Type: 'E703A',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 1, //复检次数
// },
// {
// id: '8', //装置序号ID
// name: '山大电力测试装置1', //设备名称
// dev_Type: 'SDL-3002C',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 1, //复检次数
// },
// {
// id: '9', //装置序号ID
// name: '山大电力测试装置2', //设备名称
// dev_Type: 'SDL-3002C',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 2, //复检次数
// },
// {
// id: '10', //装置序号ID
// name: '山大电力测试装置2', //设备名称
// dev_Type: 'SDL-3002C',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 2, //复检次数
// },
// {
// id: '11', //装置序号ID
// name: '山大电力测试装置2', //设备名称
// dev_Type: 'SDL-3002C',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 2, //复检次数
// },
// {
// id: '12', //装置序号ID
// name: '山大电力测试装置2', //设备名称
// dev_Type: 'SDL-3002C',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 2, //复检次数
// },
// {
// id: '13', //装置序号ID
// name: '山大电力测试装置2', //设备名称
// dev_Type: 'SDL-3002C',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 2, //复检次数
// },
// {
// id: '14', //装置序号ID
// name: '山大电力测试装置3', //设备名称
// dev_Type: 'SDL-3002C',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 2, //复检次数
// },
// {
// id: '15', //装置序号ID
// name: '山大电力测试装置4', //设备名称
// dev_Type: 'SDL-3002C',//设备类型
// dev_Chns: 1, //设备通道数
// check_Result: '不合格', //检测结果
// report_State: '已生成', //报告状态
// document_State: '未归档', //归档状态
// check_State:'检测完成',//检测状态
// reCheck_Num: 2, //复检次数
// },
// ]
export default {data,plan_devicedata}

View File

@@ -98,7 +98,17 @@ const init = () => {
chart.value.resize();
}, 0);
};
const reSize = (widthValue: number,heightValue: number,silentValue: boolean) => {
if (chart.value) {
chart.value.resize({
width: widthValue,
height: heightValue,
silent: silentValue,
});
}
};
const resizeCharts = () => {
console.log(chart.value,111111);
if (chart.value) {
chart.value.resize();
@@ -128,7 +138,7 @@ watch(
onMounted(() => {
init();
});
defineExpose({ init });
defineExpose({ init,reSize });
</script>
<style lang="scss" scoped>
.pie {

View File

@@ -1,5 +1,5 @@
<template>
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" v-bind="dialogBig">
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" draggable height="650px" width="1165px">
<div class="change-errsys-dialog">
<div class="change-errsys-title">
<el-form :model='formContent'>
@@ -32,7 +32,6 @@
:disabled = "plan.label === errorSysName"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
@@ -305,8 +304,7 @@ const props = defineProps<{
//clearInterval(timer.value);
activeIndex.value = 0;
tableData.value.length = 0;
tableData.value = operatorTableData.value;
tableData.value = JSON.parse(JSON.stringify(operatorTableData.value));
};
const openReportDlg = () => {

View File

@@ -1,6 +1,6 @@
<template>
<div class="table_info">
<!-- :request-api="getTableList" -->
<!-- :request-api="getTableList" -->
<ProTable
ref="proTable"
:columns="columns"
@@ -18,9 +18,9 @@
<template #tableHeader="scope">
<el-form :model="form" label-width="80px" :inline="true">
<el-form-item label="模糊搜索">
<el-input v-model="form.search" placeholder="请输入搜索内容" clearable></el-input>
<el-input v-model="form.search" placeholder="请输入搜索内容"></el-input>
</el-form-item>
<el-form-item label="检测状态">
<el-form-item label="检测状态" v-if="form.activeTabs != 3 && form.activeTabs != 5">
<el-select v-model="form.checkStatus" clearable>
<el-option
v-for="(item, index) in checkStatusList"
@@ -31,17 +31,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报告状态">
<el-select v-model="form.checkReportStatus" clearable>
<el-option
v-for="(item, index) in checkReportStatusList"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
:key="index"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="检测结果">
<el-select v-model="form.checkResult" clearable>
<el-option
@@ -53,10 +42,35 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="报告状态" v-if="form.activeTabs != 0 && form.activeTabs != 4">
<el-select v-model="form.checkReportStatus" clearable>
<el-option
v-for="(item, index) in checkReportStatusList"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
:key="index"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="检测结果">
<el-select v-model="form.checkResult" clearable>
<el-option
v-for="(item, index) in checkResultList"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
:key="index"
></el-option>
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" :icon="Search" @click="handleSearch"
>查询</el-button
>
<el-button :icon="Delete" @click="handleRefresh"
>重置</el-button
>
<el-button
type="primary"
:icon="Clock"
@@ -78,10 +92,13 @@
>全部复检</el-button
>
<el-button type="primary" :icon="Postcard" @click="handleTest('批量生成')" v-if="form.activeTabs === 3"
<el-button type="primary" :icon="Download" :disabled='!scope.isSelected' @click="handleTest('批量下载')" v-if="form.activeTabs === 3"
>批量下载</el-button
>
<el-button type="primary" :icon="Postcard" :disabled='!scope.isSelected' @click="handleTest('批量生成')" v-if="form.activeTabs === 3"
>批量生成</el-button
>
<el-button type="primary" :icon="Notebook" @click="handleTest('批量归档')" v-if="form.activeTabs === 4"
>批量归档</el-button
>
@@ -100,8 +117,8 @@
>
<div class='cn-render-buttons' v-if="form.activeTabs === 3 && form.activeChildTabs === 0">
<el-dropdown trigger='click'>
<el-button link type='primary' :icon="View" class='table-operate'>
<div class='table-operate-text'>查看</div>
<el-button link type='primary' :icon="Download" class='table-operate'>
<div class='table-operate-text'>下载</div>
</el-button>
<template #dropdown>
<el-dropdown-menu>
@@ -134,7 +151,7 @@
link
:icon="Notebook"
@click="openDrawer('归档', scope.row)"
v-if="form.activeTabs === 4"
v-if="form.activeTabs === 0"
>归档</el-button
>
<el-button
@@ -201,7 +218,7 @@ import { ElMessage, ElMessageBox, ElLoading} from "element-plus";
import ProTable from "@/components/ProTable/index.vue";
import { type ProTableInstance, type ColumnProps } from '@/components/ProTable/interface'
import {
Search,View,EditPen,Clock,ChatLineRound,ChatLineSquare,ChatDotSquare,Postcard,Notebook,Switch,PieChart
Search,View,Delete,Download,EditPen,Clock,ChatLineRound,ChatLineSquare,ChatDotSquare,Postcard,Notebook,Switch,PieChart
} from "@element-plus/icons-vue";
import { getPlanList } from "@/api/plan/planList";
import deviceDataList from '@/api/device/device/deviceData'
@@ -209,7 +226,7 @@ import testPopup from "./testPopup.vue";
import reportPopup from "./reportPopup.vue";
import dataCheckPopup from "./dataCheckPopup.vue";
import dataCheckChangeErrSysPopup from "./dataCheckChangeErrSysPopup.vue";
import { isVisible } from "element-plus/es/utils";
import { reactive, ref } from "vue";
const tableKey = ref(0);
@@ -234,9 +251,12 @@ const dialogForm = ref<any>({
});
//console.log(window.innerHeight, "+++++++++");
tableHeight.value = window.innerHeight - 600;
const deviceData = deviceDataList.plan_devicedata
//const deviceData = deviceDataList.plan_devicedata
const deviceData = ref([]);
deviceData.value = deviceDataList.plan_devicedata.filter((item) => item.document_State === "未归档")
const operationShow = ref(false);
const operationMinWidth = ref(200);
//下拉框数据
//检测状态数据
let checkStatusList = reactive([
@@ -263,31 +283,36 @@ let checkStatusList = reactive([
]);
//检测报告状态数据
let checkReportStatusList = reactive([
{
label: "未生成报告",
{
label: "未检测",
value: 0,
disabled: false,
},
{
label: "生成报告",
label: "生成",
value: 1,
disabled: false,
},
{
label: "已生成",
value: 2,
disabled: false,
},
]);
//检测结果数组
let checkResultList = reactive([
{
label: "未出结果",
label: "未检测",
value: 0,
disabled: false,
},
{
label: "不合格",
label: "不合格",
value: 1,
disabled: false,
},
{
label: "合格",
label: "全部合格",
value: 2,
disabled: false,
},
@@ -350,10 +375,11 @@ let checkResultList = reactive([
//查询条件
const form: any = ref({
activeTabs: 0, //功能选择
search: "",//搜索内容
activeChildTabs: 0,//子功能选择
checkStatus: 0, //检测状态
checkReportStatus: 0, //检测报告状态
checkResult: 0, //检测结果
checkStatus: null, //检测状态
checkResult: null, //检测结果
checkReportStatus: null, //检测报告状态
deviceBindStatus: 0, //绑定状态
deviceType: 0, //设备类型
manufacturer: 0, //制造厂商
@@ -416,8 +442,8 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
minWidth: 100,
},
{
prop: 'report_State',
label: '报告状态',
prop: 'check_State',
label: '检测状态',
minWidth: 100,
},
{
@@ -426,8 +452,8 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
minWidth: 100,
},
{
prop: 'check_State',
label: '检测状态',
prop: 'report_State',
label: '报告状态',
minWidth: 100,
},
{
@@ -599,17 +625,51 @@ const resetSearchForm = () => {
checkResult: 0,
};
};
let testType = "test";//检测还是复检
const handleSelectionChange = (selection: any[]) => {
const result = selection.filter((item) => item.check_Result != "有不合格项")
if(result.length > 0)
{
testType= "test";
}
else
{
testType= "reTest";
}
console.log(selection);
}
//查询
const handleSearch = () => {
matchDialogVisible.value = true;
if(form.value.activeTabs === 0 || form.value.activeTabs === 4)//设备检测、设备归档
{
deviceData.value = deviceDataList.plan_devicedata.filter((item) => item.document_State === "未归档")
}
else if(form.value.activeTabs === 3 || form.value.activeTabs === 5)//报告生成、数据查询
{
deviceData.value = deviceDataList.plan_devicedata.filter((item) => item.check_State === "检测完成");
}
//matchDialogVisible.value = true;
//proTable.value?.getTableList();
};
//重置
const handleRefresh = () => {
proTable.value?.getTableList();
form.value.search = "";
form.value.checkStatus = null;
form.value.checkResult = null;
form.value.checkReportStatus = null;
if(form.value.activeTabs === 0 || form.value.activeTabs === 4)//设备检测、设备归档
{
deviceData.value = deviceDataList.plan_devicedata.filter((item) => item.document_State === "未归档")
}
else if(form.value.activeTabs === 3 || form.value.activeTabs === 5)//报告生成、数据查询
{
deviceData.value = deviceDataList.plan_devicedata.filter((item) => item.check_State === "检测完成");
}
};
// 表格拖拽排序
const sortTable = ({
@@ -661,75 +721,77 @@ const changeStatus = async (row: User.ResUserList) => {
proTable.value?.getTableList();
};
//顶部功能切换时修改activeTabs
const changeActiveTabs = (val: number,val2: number) => {
const changeActiveTabs = (val: number,val2: number,tabledata:any[]) => {
form.value.activeTabs = val;
form.value.activeChildTabs= val2;
deviceData.value = tabledata;
tableHeaderInit(val)
console.log(form,val,val2,666)
};
//根据当前功能,初始化表头下拉框中的默认值和禁用值
function tableHeaderInit(val: number) {
refreshStatusList()
switch (val) {
case 0://自动检测
case 0://设备检测
case 1://手动检测
form.value.checkStatus = 0;//检测状态默认为未检
form.value.checkReportStatus = 0;//检测报告状态默认为未生成报告
form.value.checkResult = 0;//检测结果默认为未出结果
disableCheckStatus("检测中")
//disableCheckStatus("检测中")
disableCheckStatus("归档")
operationShow.value = false;
// operationShow.value = false;
columns[columns.length - 1].minWidth = 100;
tableKey.value ++;
operationShow.value = true;
break;
case 2://设备复检
form.value.checkStatus = 2;//检测状态默认为检测完成
form.value.checkReportStatus = 0;//检测报告状态默认为未生成报告
form.value.checkResult = 1;//检测结果默认为不合格
disableCheckStatus("未检测")
disableCheckStatus("检测中")
disableCheckStatus("归档")
disablecheckResultList("未出结果")
operationShow.value = false;
// form.value.checkStatus = 2;//检测状态默认为检测完成
// form.value.checkReportStatus = 0;//检测报告状态默认为未生成报告
// form.value.checkResult = 1;//检测结果默认为不合格
// disableCheckStatus("未检测")
// disableCheckStatus("检测中")
// disableCheckStatus("归档")
// disablecheckResultList("未出结果")
// operationShow.value = false;
break;
case 3://报告生成
form.value.checkStatus = 2;//检测状态默认为检测完成
form.value.checkReportStatus = 0;//检测报告状态默认为未生成报告
form.value.checkResult = 2;//检测结果默认为合格
disableCheckStatus("未检测")
disableCheckStatus("检测中")
disableCheckStatus("归档")
disablecheckResultList("未出结果")
// form.value.checkStatus = 2;//检测状态默认为检测完成
// form.value.checkReportStatus = 0;//检测报告状态默认为未生成报告
// form.value.checkResult = 2;//检测结果默认为合格
// disableCheckStatus("未检测")
// disableCheckStatus("检测中")
// disableCheckStatus("归档")
disablecheckResultList("未检测")
disableCheckReportStatus("未检测")
columns[columns.length - 1].minWidth = 150;
tableKey.value += 1;
operationShow.value = true;
break;
case 4://设备归档
form.value.checkStatus = 2;//检测状态默认为检测完成
form.value.checkReportStatus = 1;//检测报告状态默认为已生成报告
form.value.checkResult = 2;//检测结果默认为合格
disableCheckStatus("未检测")
disableCheckStatus("检测中")
disableCheckStatus("归档")
// form.value.checkStatus = 2;//检测状态默认为检测完成
// form.value.checkReportStatus = 1;//检测报告状态默认为已生成报告
// form.value.checkResult = 2;//检测结果默认为合格
// disableCheckStatus("未检测")
// disableCheckStatus("检测中")
// disableCheckStatus("归档")
disableCheckReportStatus("未生成报告")
disablecheckResultList("未出结果")
columns[columns.length - 1].minWidth = 100;
tableKey.value ++;
operationShow.value = true;
break;
case 5://数据查询
disablecheckResultList("未检测")
disableCheckReportStatus("未检测")
columns[columns.length - 1].minWidth = 250;
tableKey.value += 1;
operationShow.value = true;
break;
}
console.log("test",columns);
}
tableHeaderInit(0)
function refreshStatusList(){
checkStatusList.map((item: any, index: any) => {
if (item.disabled) {
@@ -746,6 +808,10 @@ function refreshStatusList(){
item.disabled = false;
}
});
form.value.checkStatus = null;//检测状态默认为未检
form.value.checkReportStatus = null;//检测报告状态默认为未生成报告
form.value.checkResult = null;//检测结果默认为未出结果
}
function disableCheckStatus(val: string){
@@ -775,9 +841,41 @@ const handleTest = (val:string) => {
if(val==='手动检测'||val==='自动检测'||val==='不合格项复检'||val==='全部复检' )
{
ElMessage.success(val);
if(testType === "reTest")
{
ElMessageBox.confirm(
'请选择复检检测方式',
'设备复检',
{
distinguishCancelAndClose: true,
confirmButtonText: '不合格项复检',
cancelButtonText: '全部复检',
type: 'warning',
},
)
.then(() => {
ElMessage.success(val);
dialogTitle.value = val;
dialogFormVisible.value = true; // 打开对话框
})
// .catch((action: Action) => {
// ElMessage({
// type: 'info',
// message:
// action === 'cancel'
// ? '以当前数据为主完成数据覆盖'
// : '取消本次导入操作',
// })
// })
}
else
{
ElMessage.success(val);
dialogTitle.value = val;
dialogFormVisible.value = true; // 打开对话框
}
}
if(val==='批量生成')

View File

@@ -227,7 +227,7 @@
</el-table>
</div>
<div >
<el-collapse model-value="1" accordion>
<el-collapse model-value="0" accordion>
<el-collapse-item title="检测日志:" name="1">
<div ref="scrollContainer" class="dialog-log">
<p v-for="(item, index) in testLogList" :key="index" :style="{color:item.type==='error'?'#F56C6C':'var(--el-text-color-regular)'}">
@@ -451,22 +451,19 @@ function traverseTableData(data: any[],id: string): void {
}
const updateTableData = (id: string) => {
traverseTableData(tableData.value,id);
console.log(id)
};
const handleReCheck = () => {
console.log(tableData.value,operatorTableData.value)
activeIndex.value = 0;
percentage.value = 0;
tableData.value.length = 0;
testLogList.value.length = 0;
tableData.value = operatorTableData.value;
console.log(tableData.value,operatorTableData.value)
resumeTimer()
console.log(tableData.value,operatorTableData.value)
tableData.value = JSON.parse(JSON.stringify(operatorTableData.value));
resumeTimer()
};
let timer: any = ref("");
const handlePauseTest = () => {
@@ -1849,6 +1846,7 @@ const startTimer = () => {
} else {
percentage.value = 100;
clearInterval(timer.value)
timer.value = null;
ts.value = 'success'
ElMessageBox.alert('检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作', '检测完成', {
@@ -1863,6 +1861,7 @@ const startTimer = () => {
else
{
clearInterval(timer.value)
timer.value = null;
ts.value = 'success'
}
@@ -1878,6 +1877,7 @@ const pauseTimer = () => {
const resumeTimer = () => {
if (timer.value === null) {
console.log('startTimer')
startTimer();
}
};

View File

@@ -1,5 +1,5 @@
<template>
<el-dialog :title="dialogTitle" :model-value="visible" @close="handleCancel" v-bind="dialogBig" width="1200px" height="1200px">
<el-dialog :title="dialogTitle" :model-value="visible" :before-close="beforeClose" @close="handleCancel" width="1200px" height="1000px" draggable>
<div class="steps-container">
<!-- simple -->
@@ -193,26 +193,41 @@ const getIcon = (index: number) => {
TestStatus.value = "waiting"
nextStepText.value = "下一步"
}
const beforeClose = (done: () => void) => {
console.log(stepsActiveIndex.value,stepsTotalNum.value)
if(stepsActiveIndex.value < stepsTotalNum.value)
{
ElMessageBox.confirm(
'检测未完成,是否退出当前检测流程?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
clearData()
emit('update:visible', false); // 关闭对话框
})
}
else
{
clearData()
emit('update:visible', false); // 关闭对话框
}
// ElMessageBox.confirm('Are you sure to close this dialog?')
// .then(() => {
// done()
// })
// .catch(() => {
// // catch error
// })
}
const handleCancel = () => {
// if(stepsActiveIndex.value < stepsTotalNum.value)
// {
// ElMessageBox.confirm(
// '是否退出当前检测流程?',
// '提示',
// {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning',
// }
// )
// .then(() => {
// // clearData()
// // emit('update:visible', false); // 关闭对话框
//
// })
// }
clearData()
emit('update:visible', false); // 关闭对话框
// clearData()
// emit('update:visible', false); // 关闭对话框
};
const handleSubmit = () => {

View File

@@ -28,9 +28,9 @@
<!-- <el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item title="检测进度展示" name="1"> -->
<!-- <div class="dialog-log">
<el-collapse model-value="1" accordion>
<el-collapse-item title="检测进度展示:" name="1"> -->
<div class="container_pieShow">
<el-collapse model-value="1" accordion @change="handleCollapseChange">
<el-collapse-item title="&nbsp&nbsp&nbsp&nbsp检测进度展示:" name="1">
<!-- 饼图 -->
<div class="container_charts">
<div class="charts_info">
@@ -81,27 +81,25 @@
></pie>
</div>
</div>
<!-- </el-collapse-item>
</el-collapse-item>
</el-collapse>
</div> -->
<el-tabs type="border-card" @tab-change="handleTabsChange" v-model="editableTabsValue">
<el-tab-pane :label="tabLabel1">
<!-- 列表数据 -->
<div class="container_table">
<Table ref="tableRef1"></Table>
</div>
</el-tab-pane>
<el-tab-pane label="已检设备" v-if="tabShow">
<!-- 列表数据 -->
<div class="container_table">
<Table ref="tableRef2"></Table>
</div>
</el-tab-pane>
</el-tabs>
</div>
<el-tabs class="tabs-menu" type="border-card" @tab-change="handleTabsChange" v-model="editableTabsValue" :style="{ height: tabsHeight }">
<el-tab-pane :label="tabLabel1" :style="{ height: tabPaneHeight }">
<!-- 列表数据 -->
<div class="container_table" :style="{ height: tableHeight }">
<Table ref="tableRef1"></Table>
</div>
</el-tab-pane>
<el-tab-pane label="已检设备" v-if="tabShow" :style="{ height: tabPaneHeight }">
<!-- 列表数据 -->
<div class="container_table" :style="{ height: tableHeight }">
<Table ref="tableRef2"></Table>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
@@ -112,6 +110,9 @@ import { useRouter } from "vue-router";
import tree from "../components/tree.vue";
import Table from "../components/table.vue";
import { data } from "@/api/plan/static.json";
import deviceDataList from '@/api/device/device/deviceData'
const deviceData = deviceDataList.plan_devicedata
const treeRef = ref();
const form: any = ref({
activeTabs: 0, //功能选择,例如报告生成
@@ -128,10 +129,26 @@ const activeNames = ref(['2'])
const tabShow= ref(false);
const tabLabel1 = ref('设备检测')
const editableTabsValue = ref('0')
const tabsHeight = ref('calc(100vh - 538px)'); // 初始高度
const tabPaneHeight = ref('calc(100% - 5px)'); // 初始高度
const tableHeight = ref('calc(100% - 5px)'); // 初始高度
const handleChange = (val: string[]) => {
// console.log(val)
}
const handleCollapseChange = (val: string[]) => {
console.log(val)
console.log(val.length)
// 计算新的高度
const newHeight = val.length > 0 ? 'calc(100vh - 538px)' : 'calc(100vh - 333px)';
//const newtableHeight= val.length > 0 ? 'calc(100vh - 638px)' : 'calc(100vh - 433px)';
tabsHeight.value = newHeight;
tabPaneHeight.value = `calc(100% - 5px)`;
tableHeight.value = `calc(100% - 5px)`;
};
const handleTabsChange = (val) => {
form.value.activeTabs = 0;
form.value.activeTabs = 3;
@@ -148,12 +165,12 @@ const tabsList = ref([
img: "/src/assets/images/plan/static/1.svg",
checked: true,
},
{
label: "设备复检",
value: 2,
img: "/src/assets/images/plan/static/2.svg",
checked: false,
},
// {
// label: "设备复检",
// value: 2,
// img: "/src/assets/images/plan/static/2.svg",
// checked: false,
// },
{
label: "报告生成",
value: 3,
@@ -166,59 +183,36 @@ const tabsList = ref([
img: "/src/assets/images/plan/static/5.svg",
checked: false,
},
{
label: "设备归档",
value: 4,
img: "/src/assets/images/plan/static/4.svg",
checked: false,
},
// {
// label: "设备归档",
// value: 4,
// img: "/src/assets/images/plan/static/4.svg",
// checked: false,
// },
]);
// const tabsList = ref([
// {
// label: "自动检测",
// value: 0,
// img: "/src/assets/images/plan/static/1.svg",
// checked: true,
// },
// {
// label: "手动检测",
// value: 1,
// img: "/src/assets/images/plan/static/2.svg",
// checked: false,
// },
// {
// label: "设备复检",
// value: 2,
// img: "/src/assets/images/plan/static/6.svg",
// checked: false,
// },
// {
// label: "报告生成",
// value: 3,
// img: "/src/assets/images/plan/static/3.svg",
// checked: false,
// },
// {
// label: "设备归档",
// value: 4,
// img: "/src/assets/images/plan/static/4.svg",
// checked: false,
// },
// {
// label: "设备浏览",
// value: 5,
// img: "/src/assets/images/plan/static/5.svg",
// checked: false,
// },
// ]);
form.value.activeTabs = tabsList.value[0].value;
const tableRef1 = ref();
const tableRef2 = ref();
watch(
() => form.value,
(val, oldVal) => {
if (val) {
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs,form.value.activeChildTabs);
console.log(form.value.activeTabs,111);
if(form.value.activeTabs === 0 || form.value.activeTabs === 4)//设备检测、设备归档
{
const tabledata = deviceData.filter((item) => item.document_State === "未归档")
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs,form.value.activeChildTabs,tabledata);
}
else if(form.value.activeTabs === 3 || form.value.activeTabs === 5)//报告生成、数据查询
{
const tabledata = deviceData.filter((item) => item.check_State === "检测完成");
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs,form.value.activeChildTabs,tabledata);
}
}
},
{
@@ -258,21 +252,32 @@ const getPieData = () => {
];
chartsData2.value = [
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "全部合格", itemStyle: { color: '#91cc75' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "有不合格项" , itemStyle: { color: '#ee6666' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "全部合格", itemStyle: { color: '#91cc75' } },
];
// pieRef2.value.init();
chartsData3.value = [
// { value: Math.floor(Math.random() * 100) + 1, name: "已生成报告" },
// { value: Math.floor(Math.random() * 100) + 1, name: "未生成报告" },
{ value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "有不合格项未生成报告" },
{ value: Math.floor(Math.random() * 100) + 1, name: "全部合格未生成报告" },
{ value: Math.floor(Math.random() * 100) + 1, name: "有不合格项已生成报告" },
{ value: Math.floor(Math.random() * 100) + 1, name: "全部合格已生成报告" },
{ value: Math.floor(Math.random() * 100) + 1, name: "未生成" , itemStyle: { color: '#ee6666' } },
{ value: Math.floor(Math.random() * 100) + 1, name: "已生成", itemStyle: { color: '#91cc75' } },
// { value: Math.floor(Math.random() * 100) + 1, name: "未检测" , itemStyle: { color: '#fac858' } },
// { value: Math.floor(Math.random() * 100) + 1, name: "有不合格项未生成报告" },
// { value: Math.floor(Math.random() * 100) + 1, name: "全部合格未生成报告" },
// { value: Math.floor(Math.random() * 100) + 1, name: "有不合格项已生成报告" },
// { value: Math.floor(Math.random() * 100) + 1, name: "全部合格已生成报告" },
];
// pieRef3.value.init();
pieRef1.value.init();
pieRef2.value.init();
pieRef3.value.init();
pieRef1.value.reSize(470,145,true);
pieRef2.value.reSize(470,145,true);
pieRef3.value.reSize(470,145,true);
};
const getTree = () => {
treeRef.value.getTreeData(data);
@@ -308,7 +313,7 @@ const handleCheckFunction = (val: any) => {
});
tabShow.value = false;
console.log("test",val,tabLabel1.value);
switch (val) {
case 0://自动检测
tabLabel1.value = "设备检测";
@@ -330,7 +335,7 @@ const handleCheckFunction = (val: any) => {
tabLabel1.value = "数据查询";
break;
}
console.log("test",val,tabLabel1.value);
form.value.activeTabs = val;
};
@@ -367,14 +372,13 @@ onMounted(() => {
//align-items: center;
//box-sizing: border-box;
.container_function {
width: 100%;
height: auto;
background: #fff;
border-radius: 4px;
display: flex;
// justify-content: space-around;
// justify-content: space-evenly;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
@@ -384,27 +388,27 @@ onMounted(() => {
.function_item {
flex: none;
width: 6%;
height: 40px;
height: 70px;
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
flex-direction: column;
cursor: pointer;
background-color: #607eab;
border-radius: 8px;
padding: 0px 30px;
.item_img {
width: 30px;
height: 30px;
width: 60px;
height: 60px;
border-radius: 50%;
// background-color: #607eab;
display: flex;
align-items: center;
justify-content: center;
margin-right: 5px;
img {
width: 20px;
width: 40px;
height: auto;
}
}
@@ -421,7 +425,6 @@ onMounted(() => {
.item_text {
p {
width: 80px;
margin: 0;
font-weight: 800;
color: var(--el-color-primary);
@@ -447,10 +450,90 @@ onMounted(() => {
}
}
}
// .container_function {
// width: 100%;
// height: auto;
// background: #fff;
// border-radius: 4px;
// display: flex;
// // justify-content: space-around;
// // justify-content: space-evenly;
// justify-content: space-between;
// align-items: center;
// margin-bottom: 10px;
// padding: 10px 20px 10px 20px;
// box-sizing: border-box;
.dialog-log{
// .function_item {
// flex: none;
// width: 6%;
// height: 40px;
// display: flex;
// justify-content: space-between;
// align-items: center;
// flex-direction: row;
// cursor: pointer;
// background-color: #607eab;
// border-radius: 8px;
// padding: 0px 30px;
// .item_img {
// width: 30px;
// height: 30px;
// border-radius: 50%;
// // background-color: #607eab;
// display: flex;
// align-items: center;
// justify-content: center;
// margin-right: 5px;
// img {
// width: 20px;
// height: auto;
// }
// }
// .item_img:nth-child(3),
// .item_img:nth-child(6) {
// padding: 10px !important;
// img {
// width: 20px !important;
// height: auto;
// }
// }
// .item_text {
// p {
// width: 80px;
// margin: 0;
// font-weight: 800;
// color: var(--el-color-primary);
// font-size: 14px;
// font-family: "Microsoft YaHei", "微软雅黑", "Arial", sans-serif;
// }
// }
// }
// .function_item:hover,
// .checked_function {
// background-color: var(--el-color-primary);
// .item_img {
// // background-color: var(--el-color-primary);
// }
// .item_text {
// p {
// // color: var(--el-color-primary);
// color: #fff;
// }
// }
// }
// }
.container_pieShow{
width: 100% !important;
min-height: 200px !important;
//min-height: 200px !important;
height:auto;
background-color: #eee;
// display: flex;
@@ -461,26 +544,26 @@ onMounted(() => {
.el-collapse {
width: 100% !important;
// min-height: 200px !important;
height:auto;
height:100% !important;
background-color: #eee;
// display: flex;
// justify-content: space-between;
// padding-left: 2ch;
margin-bottom: 10px;
}
// margin-bottom: 10px;
}
.el-collapse-item{
width: 100% !important;
.el-collapse-item{
width: 100% !important;
// min-height: 200px !important;
height:100% !important;
background-color: #eee;
// display: flex !important;
}
}
.container_charts {
width: 100%;
min-height: 180px !important;
// height:100%;
//min-height: 180px !important;
height:90%;
background-color: #eee;
display: flex;
justify-content: space-between;
@@ -500,10 +583,14 @@ onMounted(() => {
border-radius: 4px;
}
.tabs-menu{
height: 100%;
}
.container_table {
// width: 100%;
flex: 1 !important;
height: calc(100vh - 360px - 147px);
height: calc(100vh - 360px - 180px);
//height: 100% !important;
border-radius: 4px;
width: 100% !important;
// display: none;