修改检测入口、预检测、正式检测页面

This commit is contained in:
GYYM
2024-11-12 20:35:12 +08:00
parent 4b5498ad49
commit 6a5c783419
13 changed files with 1070 additions and 115 deletions

View File

@@ -81,29 +81,31 @@
</el-form>
</template>
<!-- 表格操作 -->
<!-- <template #operation="scope">
<template #operation="scope">
<el-button
dictType="primary"
type="primary"
link
:icon="View"
@click="openDrawer('查看', scope.row)"
>查看</el-button
@click="openDrawer('报告查看', scope.row)"
v-if="form.activeTabs === 3"
>报告查看</el-button
>
<el-button
dictType="primary"
type="primary"
link
:icon="EditPen"
@click="openDrawer('编辑', scope.row)"
>导出</el-button
@click="openDrawer('误差体系编辑', scope.row)"
v-if="form.activeTabs === 5"
>误差体系编辑</el-button
>
<el-button
<!-- <el-button
dictType="primary"
link
:icon="Delete"
@click="deleteAccount(scope.row)"
>删除</el-button
>
</template> -->
> -->
</template>
</ProTable>
</div>
</template>
@@ -116,7 +118,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
import ProTable from "@/components/ProTable/index.vue";
import { type ProTableInstance, type ColumnProps } from '@/components/ProTable/interface'
import {
Search,
Search,View,EditPen
} from "@element-plus/icons-vue";
import { getPlanList } from "@/api/plan/planList";
import deviceDataList from '@/api/device/deviceData'
@@ -129,7 +131,7 @@ const tableHeight = ref(0);
console.log(window.innerHeight, "+++++++++");
tableHeight.value = window.innerHeight - 630;
const deviceData = deviceDataList.plan_devicedata
const operationShow = ref(false);
//下拉框数据
//检测状态数据
let checkStatusList = reactive([
@@ -327,7 +329,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
label: '归档状态',
minWidth: 130,
},
// { prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 },
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 150 ,isShow: operationShow},
])
// 表格配置项
@@ -567,36 +569,41 @@ function tableHeaderInit(val: number) {
form.value.checkResult = 0;//检测结果默认为未出结果
disableCheckStatus("检测中")
disableCheckStatus("归档")
operationShow.value = false;
break;
case 2://设备复检
form.value.checkStatus = 2;//检测状态默认为检测完成
form.value.checkReportStatus = 0;//检测报告状态默认为未生成报告
form.value.checkResult = 1;//检测结果默认为不合格
disableCheckStatus("未检")
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("检测中")
disableCheckStatus("归档")
disablecheckResultList("未出结果")
operationShow.value = true;
break;
case 4://设备归档
form.value.checkStatus = 2;//检测状态默认为检测完成
form.value.checkReportStatus = 1;//检测报告状态默认为已生成报告
form.value.checkResult = 2;//检测结果默认为合格
disableCheckStatus("未检")
disableCheckStatus("未检")
disableCheckStatus("检测中")
disableCheckStatus("归档")
disableCheckReportStatus("未生成报告")
disablecheckResultList("未出结果")
operationShow.value = false;
break;
case 5://报告浏览
case 5://设备浏览
operationShow.value = true;
break;
}
}
@@ -656,6 +663,16 @@ const handleTest = () => {
}
};
// 打开 drawer(新增、查看、编辑)
const openDrawer = (title: string, row: any) => {
if (title === '报告查看')
console.log(title);
else if (title === '误差体系编辑')
console.log(title);
}
onMounted(() => {
console.log(proTable.value?.tableData);
});