修改检测入口、预检测、正式检测页面
This commit is contained in:
@@ -21,11 +21,12 @@
|
||||
<el-button type='primary' link :icon='Upload' @click="exportClick">导出</el-button>
|
||||
<el-button type='primary' link :icon='EditPen' @click="openEditDialog(scope.row)">编辑</el-button>
|
||||
<el-button type='primary' link :icon='Delete' >删除</el-button>
|
||||
<el-button type='primary' link :icon='List' @click="showDeviceOpen(scope.row)">所属设备</el-button>
|
||||
<el-button type='primary' link :icon='List' @click="showtestSourceOpen(scope.row)">所属检测源</el-button>
|
||||
<el-button type='primary' link :icon='List' @click="showDeviceOpen(scope.row)">设备绑定</el-button>
|
||||
<el-button type='primary' link :icon='Tools' @click="showtestSourceOpen(scope.row)">检测源绑定</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
|
||||
<temp></temp>
|
||||
<!-- 向计划导入/导出设备对话框 -->
|
||||
<planPopup
|
||||
:visible="dialogFormVisible"
|
||||
@@ -35,32 +36,47 @@
|
||||
@update:visible="dialogFormVisible = $event"
|
||||
/>
|
||||
|
||||
<!-- 查看误差体系详细信息 -->
|
||||
<ErrorStandardDialog
|
||||
:visible="detail_dialogFormVisible"
|
||||
:formData="detail_dialogForm"
|
||||
:dialogTitle="detail_dialogTitle"
|
||||
@update:visible="detail_dialogFormVisible = $event"
|
||||
/>
|
||||
</div>
|
||||
<devTransfer
|
||||
:dialogVisible=devTransferVisible
|
||||
@update:visible='devTransferVisible = $event'
|
||||
/>
|
||||
<sourceTransfer
|
||||
:dialogVisible=sourceTransferVisible
|
||||
@update:visible='sourceTransferVisible = $event'
|
||||
/>
|
||||
<DeviceOpen :width='viewWidth' :height='viewHeight' ref='openDeviceView' />
|
||||
<SourceOpen :width='viewWidth' :height='viewHeight' ref='openSourceView' />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name='useProTable'>
|
||||
<script setup lang="tsx" name='useProTable'>
|
||||
import ProTable from '@/components/ProTable/index.vue'
|
||||
import TimeControl from '@/components/TimeControl/index.vue'
|
||||
import type { ProTableInstance,ColumnProps } from '@/components/ProTable/interface'
|
||||
import { CirclePlus, Delete,EditPen,View,Upload,Download,List} from '@element-plus/icons-vue'
|
||||
import { CirclePlus, Delete,EditPen,View,Upload,Download,List,Tools} from '@element-plus/icons-vue'
|
||||
import {dictPattern,dictTestState,dictReportState,dictResult,testPlanDataList,testSoureDataList,testScriptDataList,testErrSystDataList,planData,testFatherPlanList} from '@/api/plan/planData'
|
||||
import { reactive,ref } from 'vue'
|
||||
import type { Plan } from '@/api/plan/interface'
|
||||
import planPopup from "@/views/plan/planList/components/planPopup.vue"; // 导入子组件
|
||||
import DeviceOpen from '@/views/plan/planList/components/devPopup.vue'
|
||||
import SourceOpen from '@/views/plan/planList/components/sourcePopup.vue'
|
||||
import temp from './components/temp.vue'
|
||||
import devTransfer from './components/devTransfer.vue'
|
||||
import sourceTransfer from './components/sourceTransfer.vue'
|
||||
import { useViewSize } from '@/hooks/useViewSize'
|
||||
import { useRouter } from "vue-router";
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import type { Action } from 'element-plus'
|
||||
import type { ErrorSystem } from '@/api/error/interface'
|
||||
import ErrorStandardDialog from "@/views/machine/errorSystem/components/ErrorStandardDialog.vue"; // 导入子组件
|
||||
|
||||
const dictStore = useDictStore()
|
||||
// 定义包含和排除的单位
|
||||
@@ -71,7 +87,7 @@ const { popupBaseView, viewWidth, viewHeight } = useViewSize()
|
||||
const openDeviceView = ref()
|
||||
const openSourceView = ref()
|
||||
const devTransferVisible = ref(false)
|
||||
|
||||
const sourceTransferVisible = ref(false)
|
||||
// ProTable 实例
|
||||
const proTable = ref<ProTableInstance>()
|
||||
// const planData = planData
|
||||
@@ -94,9 +110,18 @@ const dialogForm = ref<Plan.PlanBO>({
|
||||
|
||||
});
|
||||
|
||||
const detail_dialogFormVisible = ref(false)
|
||||
const detail_dialogTitle = ref('Q/GDW 10650.2-2021 误差体系')
|
||||
const detail_dialogForm = ref<ErrorSystem.Error_detail>({
|
||||
measured: '',//被测量
|
||||
deviceLevel: '',//检测装置级别
|
||||
measurementType:'',
|
||||
condition: '',//测量条件
|
||||
maxErrorValue: '',//最大误差
|
||||
});
|
||||
|
||||
// 表格配置项
|
||||
const columns = reactive<ColumnProps<Plan.PlanBO>[]>([
|
||||
const columns = reactive<ColumnProps<Plan.PlanAndSourceBO>[]>([
|
||||
{ type: 'selection', fixed: 'left', width: 70 },
|
||||
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
|
||||
{
|
||||
@@ -109,6 +134,24 @@ const columns = reactive<ColumnProps<Plan.PlanBO>[]>([
|
||||
prop: 'testSourceName',
|
||||
label: '检测源名称',
|
||||
width: 200,
|
||||
render: scope => {
|
||||
return (
|
||||
// <el-button
|
||||
// v-for="(button, index) in scope.row.testSourceList"
|
||||
// :key="index"
|
||||
// @click="handleClick(button)"
|
||||
// >
|
||||
// {{ button.text }}
|
||||
// </el-button>
|
||||
<div class='flx-flex-start'>
|
||||
<el-button type = "primary" link onClick = {() => showData(scope.row.testSourceName)}>
|
||||
{scope.row.testSourceName}
|
||||
</el-button>
|
||||
<temp></temp>
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'script_Id',
|
||||
@@ -116,6 +159,13 @@ const columns = reactive<ColumnProps<Plan.PlanBO>[]>([
|
||||
width: 300,
|
||||
enum: testScriptDataList,
|
||||
fieldNames: { label: 'label', value: 'id' },
|
||||
render: scope => {
|
||||
return (
|
||||
<el-button type = "primary" link onClick = {() => showData(scope.row.script_Id)}>
|
||||
{getScriptName(scope.row.script_Id)}
|
||||
</el-button>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'error_Sys_Id',
|
||||
@@ -123,6 +173,14 @@ const columns = reactive<ColumnProps<Plan.PlanBO>[]>([
|
||||
width: 200,
|
||||
enum: testErrSystDataList,
|
||||
fieldNames: { label: 'label', value: 'id' },
|
||||
render: scope => {
|
||||
const errSysName = getErrSysName(scope.row.error_Sys_Id);
|
||||
return (
|
||||
<el-button type = "primary" link onClick = {() => showData(errSysName || '')}>
|
||||
{errSysName}
|
||||
</el-button>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'dataSource_Id',
|
||||
@@ -182,6 +240,12 @@ const columns = reactive<ColumnProps<Plan.PlanBO>[]>([
|
||||
{ prop: 'operation', label: '操作', fixed: 'right' ,width: 450, },
|
||||
])
|
||||
|
||||
function getScriptName(id:string){
|
||||
return testScriptDataList.find(item=>item.id==id)?.label
|
||||
}
|
||||
function getErrSysName(id:string){
|
||||
return testErrSystDataList.find(item=>item.id==id)?.label
|
||||
}
|
||||
|
||||
const fileInput = ref<HTMLInputElement | null>(null); // 声明 fileInput
|
||||
function openFileDialog() {
|
||||
@@ -190,6 +254,17 @@ const fileInput = ref<HTMLInputElement | null>(null); // 声明 fileInput
|
||||
}
|
||||
}
|
||||
|
||||
function showData(row: string) {
|
||||
|
||||
detail_dialogTitle.value = row;
|
||||
detail_dialogFormVisible.value = true; // 显示对话框
|
||||
|
||||
// router.push({
|
||||
// path: "/machine/device",
|
||||
// query: { id: row }
|
||||
// });
|
||||
}
|
||||
|
||||
function handleFiles(event: Event) {
|
||||
const target = event.target as HTMLInputElement;
|
||||
const files = target.files;
|
||||
@@ -289,7 +364,8 @@ const showDeviceOpen = (planSystem: Plan.PlanBO) => {
|
||||
}
|
||||
|
||||
const showtestSourceOpen=(planSystem: Plan.PlanBO)=>{
|
||||
openSourceView.value.open('计划检测源列表')
|
||||
sourceTransferVisible.value = true;
|
||||
// openSourceView.value.open('计划检测源列表')
|
||||
// router.push({
|
||||
// path: "/machine/testSource",
|
||||
// });
|
||||
|
||||
Reference in New Issue
Block a user