zhaoxuebing
7 months ago
8 changed files with 733 additions and 138 deletions
@ -1,65 +1,47 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface InspectionRecordDetailVO { |
|||
number: string |
|||
applicationDate: localdate |
|||
applicationTime: Date |
|||
requestStartTime: Date |
|||
requestEndTime: Date |
|||
finishTime: Date |
|||
supplierCode: string |
|||
materialCode: string |
|||
batch: string |
|||
requestInspectionNum: number |
|||
referenceOrderCode: string |
|||
referenceOrderRow: number |
|||
referenceCertificateCode: string |
|||
referenceCertificateRow: number |
|||
inspectionSchemeCode: string |
|||
inspectionStageCode: string |
|||
applicationPackageCode: string |
|||
inspectionLevel: string |
|||
aqlValue: number |
|||
available: string |
|||
} |
|||
|
|||
|
|||
// 查询检验申请列表
|
|||
export const getInspectionRecordDetailPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/inspection/inspection-recordord-detail/senior', data }) |
|||
return await request.post({ url: '/qms/inspection-record-detail/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/inspection/inspectirecordrecord-detail/page`, params }) |
|||
return await request.get({ url: `/qms/inspection-record-detail/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询检验申请列表
|
|||
export const getInspectionRecordDetailList = async (id: number) => { |
|||
return await request.get({ url: `/qms/inspection-record-detail/list?masterId=` + id }) |
|||
} |
|||
// 查询检验申请详情
|
|||
export const getInspectionRecordDetail = async (id: number) => { |
|||
return await request.get({ url: `/inspection/insperecordon-record-detail/get?id=` + id }) |
|||
return await request.get({ url: `/qms/inspection-record-detail/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增检验申请
|
|||
export const createInspectionRecordDetail = async (data: InspectionRecordDetailVO) => { |
|||
return await request.post({ url: `/inspection/inrecordction-record-detail/create`, data }) |
|||
export const createInspectionRecordDetail = async (data) => { |
|||
return await request.post({ url: `/qms/inspection-record-detail/create`, data }) |
|||
} |
|||
|
|||
// 修改检验申请
|
|||
export const updateInspectionRecordDetail = async (data: InspectionRecordDetailVO) => { |
|||
return await request.put({ url: `/inspectionrecordspection-record-detail/update`, data }) |
|||
export const updateInspectionRecordDetail = async (data) => { |
|||
return await request.put({ url: `/qms/inspection-record-detail/update`, data }) |
|||
} |
|||
|
|||
// 删除检验申请
|
|||
export const deleteInspectionRecordDetail = async (id: number) => { |
|||
return await request.delete({ url: `/inspectrecord/inspection-record-detail/delete?id=` + id }) |
|||
return await request.delete({ url: `/qms/inspection-record-detail/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出检验申请 Excel
|
|||
export const exportInspectionRecordDetail = async (params) => { |
|||
return await request.download({ url: `/insprecordion/inspection-record-detail/export-excel`, params }) |
|||
return await request.download({ url: `/qms/inspection-record-detail/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/irecordection/inspection-record-detail/get-import-template' }) |
|||
return request.download({ url: '/qms/inspection-record-detail/get-import-template' }) |
|||
} |
|||
|
@ -0,0 +1,310 @@ |
|||
<template> |
|||
<div> |
|||
<el-drawer |
|||
v-model="isShowDrawer" |
|||
title="详情" |
|||
direction="rtl" |
|||
size="80%" |
|||
v-loading="detailLoading" |
|||
> |
|||
<template #header> |
|||
<div class="font-size-18px"> |
|||
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span> |
|||
</div> |
|||
</template> |
|||
<ContentWrap v-if="!isBasic"> |
|||
<Descriptions |
|||
:data="data" |
|||
labelClassName="label-class-name" |
|||
label-align="left" |
|||
direction="vertical" |
|||
:column="8" |
|||
:schema="allSchemas.detailSchema" |
|||
:columns="2" |
|||
width="200px" |
|||
/> |
|||
</ContentWrap> |
|||
<ContentWrap> |
|||
<el-tabs |
|||
v-model="editableTabsValue" |
|||
class="demo-tabs" |
|||
type="border-card" |
|||
tab-position="left" |
|||
:stretch="false" |
|||
> |
|||
<el-tab-pane |
|||
v-for="item in data.subList" |
|||
:key="item.name" |
|||
:label="item.processCode" |
|||
:name="item.name" |
|||
> |
|||
<div class="small-title">检验工序</div> |
|||
<el-form :model="item" label-width="auto" ref="formProcessRef"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="编码" prop="processCode"> |
|||
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检验方案模板编码"> |
|||
<el-input |
|||
v-model="item.inspectionCode" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="描述" prop="processDescribe"> |
|||
<el-input v-model="item.processDescribe" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="顺序号" prop="sequenceCode"> |
|||
<el-input v-model="item.sequenceCode" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检验特性编码"> |
|||
<el-input |
|||
v-model="item.inspectionCharCode" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="small-title">检验特性</div> |
|||
<el-form :model="item" label-width="auto" ref="formFeaturesRef"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="编码"> |
|||
<el-input |
|||
v-model="item.inspectionJobCharacteristicsRespVO.number" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="描述" prop="inspectionJobCharacteristicsRespVO.description"> |
|||
<el-input v-model="item.inspectionJobCharacteristicsRespVO.description" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="检验方法" |
|||
prop="inspectionJobCharacteristicsRespVO.inspectionMethodCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionJobCharacteristicsRespVO.inspectionMethodName" |
|||
disabled |
|||
placeholder="请选择检验方法" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="采样过程编码" |
|||
prop="inspectionJobCharacteristicsRespVO.inspectionMethod" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionJobCharacteristicsRespVO.inspectionName" |
|||
disabled |
|||
placeholder="请选择采样过程编码" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="12"> |
|||
<el-form-item |
|||
label="动态修改规则编码" |
|||
prop="inspectionJobCharacteristicsRespVO.dynamicUpdateCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionJobCharacteristicsRespVO.dynamicUpdateName" |
|||
disabled |
|||
placeholder="请选择动态修改规则编码" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="是否允许修改特征值" |
|||
prop="inspectionJobCharacteristicsRespVO.isCanUpdate" |
|||
> |
|||
<el-switch |
|||
v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="结果录入方式" |
|||
prop="inspectionJobCharacteristicsRespVO.resultEntryMethod" |
|||
> |
|||
<el-select |
|||
v-model="item.inspectionJobCharacteristicsRespVO.resultEntryMethod" |
|||
placeholder="请选择结果录入方式" |
|||
@change="resultEntryMethodChange($event,item)" |
|||
disabled |
|||
> |
|||
<el-option |
|||
v-for="dict in getStrDictOptions( |
|||
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY |
|||
)" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsRespVO.featureType"> |
|||
<el-select |
|||
v-model="item.inspectionJobCharacteristicsRespVO.featureType" |
|||
placeholder="请选择特征类型" |
|||
@change="changeFeatureType" |
|||
disabled |
|||
> |
|||
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsRespVO.inspectionStartTime"> |
|||
<el-date-picker |
|||
v-model="item.inspectionJobCharacteristicsRespVO.inspectionStartTime" |
|||
type="datetime" |
|||
placeholder="请选择开始时间" |
|||
style="width: 100%" |
|||
value-format="x" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsRespVO.inspectionEndTime"> |
|||
<el-date-picker |
|||
v-model="item.inspectionJobCharacteristicsRespVO.inspectionEndTime" |
|||
type="datetime" |
|||
placeholder="请选择结束时间" |
|||
style="width: 100%" |
|||
value-format="x" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
</ContentWrap> |
|||
</el-drawer> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail' |
|||
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|||
|
|||
defineOptions({ name: 'Detail' }) |
|||
|
|||
const editableTabsValue = ref('1') |
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const updateKey = ref(0) |
|||
|
|||
const props = defineProps({ |
|||
// 表单,列表 相关信息 |
|||
allSchemas: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 明细列表相关信息 |
|||
detailAllSchemas: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 详情列表扩展操作按钮 |
|||
buttondataTable: { |
|||
type: Array, |
|||
required: false, |
|||
default: ()=>{ |
|||
return [] |
|||
} |
|||
}, |
|||
}) |
|||
const isShowDrawer = ref(false) |
|||
const detailLoading = ref(false) |
|||
const data = ref({ |
|||
code: '', |
|||
itemCode: '', |
|||
version: '', |
|||
testTypeCode: '', |
|||
programmeTemplateCode: '', |
|||
splitRule: '', |
|||
aql: '', |
|||
inspectionLevel: '', |
|||
effectiveDate: '', |
|||
expirationDate: '', |
|||
available: 'TRUE', |
|||
subList: [] |
|||
}) |
|||
|
|||
/** 打开弹窗 */ |
|||
const formRef = ref() |
|||
const titleNameRef = ref() |
|||
const titleValueRef = ref() |
|||
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { |
|||
titleNameRef.value = titleName |
|||
titleValueRef.value = titleValue |
|||
|
|||
isShowDrawer.value = true |
|||
if (row) { |
|||
detailLoading.value = true |
|||
try { |
|||
data.value = row |
|||
let list = [] |
|||
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) |
|||
list.forEach((item, index) => { |
|||
editableTabsValue.value = index + 1 |
|||
item.name = index + 1 |
|||
}) |
|||
data.value.subList = list |
|||
} finally { |
|||
detailLoading.value = false |
|||
} |
|||
} |
|||
} |
|||
defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
|
|||
</script> |
|||
<style lang="scss"> |
|||
.el-drawer__body { |
|||
background: #f5f5f5 !important; |
|||
} |
|||
|
|||
::v-deep(.label-class-name) { |
|||
color: #dedede; |
|||
} |
|||
</style> |
|||
<style scoped lang="scss"></style> |
@ -0,0 +1,310 @@ |
|||
<template> |
|||
<div> |
|||
<el-drawer |
|||
v-model="isShowDrawer" |
|||
title="详情" |
|||
direction="rtl" |
|||
size="80%" |
|||
v-loading="detailLoading" |
|||
> |
|||
<template #header> |
|||
<div class="font-size-18px"> |
|||
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span> |
|||
</div> |
|||
</template> |
|||
<ContentWrap v-if="!isBasic"> |
|||
<Descriptions |
|||
:data="data" |
|||
labelClassName="label-class-name" |
|||
label-align="left" |
|||
direction="vertical" |
|||
:column="8" |
|||
:schema="allSchemas.detailSchema" |
|||
:columns="2" |
|||
width="200px" |
|||
/> |
|||
</ContentWrap> |
|||
<ContentWrap> |
|||
<el-tabs |
|||
v-model="editableTabsValue" |
|||
class="demo-tabs" |
|||
type="border-card" |
|||
tab-position="left" |
|||
:stretch="false" |
|||
> |
|||
<el-tab-pane |
|||
v-for="item in data.subList" |
|||
:key="item.name" |
|||
:label="item.processCode" |
|||
:name="item.name" |
|||
> |
|||
<div class="small-title">检验工序</div> |
|||
<el-form :model="item" label-width="auto" ref="formProcessRef"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="编码" prop="processCode"> |
|||
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检验方案模板编码"> |
|||
<el-input |
|||
v-model="item.inspectionCode" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="描述" prop="processDescribe"> |
|||
<el-input v-model="item.processDescribe" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="顺序号" prop="sequenceCode"> |
|||
<el-input v-model="item.sequenceCode" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检验特性编码"> |
|||
<el-input |
|||
v-model="item.inspectionCharCode" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="small-title">检验特性</div> |
|||
<el-form :model="item" label-width="auto" ref="formFeaturesRef"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="编码"> |
|||
<el-input |
|||
v-model="item.inspectionJobCharacteristicsRespVO.number" |
|||
placeholder="根据系统生成" |
|||
:disabled="true" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="描述" prop="inspectionJobCharacteristicsRespVO.description"> |
|||
<el-input v-model="item.inspectionJobCharacteristicsRespVO.description" :disabled="true" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="检验方法" |
|||
prop="inspectionJobCharacteristicsRespVO.inspectionMethodCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionJobCharacteristicsRespVO.inspectionMethodName" |
|||
disabled |
|||
placeholder="请选择检验方法" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="采样过程编码" |
|||
prop="inspectionJobCharacteristicsRespVO.inspectionMethod" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionJobCharacteristicsRespVO.inspectionName" |
|||
disabled |
|||
placeholder="请选择采样过程编码" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="12"> |
|||
<el-form-item |
|||
label="动态修改规则编码" |
|||
prop="inspectionJobCharacteristicsRespVO.dynamicUpdateCode" |
|||
> |
|||
<div style="display: flex; width: 100%"> |
|||
<el-input |
|||
v-model="item.inspectionJobCharacteristicsRespVO.dynamicUpdateName" |
|||
disabled |
|||
placeholder="请选择动态修改规则编码" |
|||
/> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="是否允许修改特征值" |
|||
prop="inspectionJobCharacteristicsRespVO.isCanUpdate" |
|||
> |
|||
<el-switch |
|||
v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="结果录入方式" |
|||
prop="inspectionJobCharacteristicsRespVO.resultEntryMethod" |
|||
> |
|||
<el-select |
|||
v-model="item.inspectionJobCharacteristicsRespVO.resultEntryMethod" |
|||
placeholder="请选择结果录入方式" |
|||
@change="resultEntryMethodChange($event,item)" |
|||
disabled |
|||
> |
|||
<el-option |
|||
v-for="dict in getStrDictOptions( |
|||
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY |
|||
)" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsRespVO.featureType"> |
|||
<el-select |
|||
v-model="item.inspectionJobCharacteristicsRespVO.featureType" |
|||
placeholder="请选择特征类型" |
|||
@change="changeFeatureType" |
|||
disabled |
|||
> |
|||
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsRespVO.inspectionStartTime"> |
|||
<el-date-picker |
|||
v-model="item.inspectionJobCharacteristicsRespVO.inspectionStartTime" |
|||
type="datetime" |
|||
placeholder="请选择开始时间" |
|||
style="width: 100%" |
|||
value-format="x" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsRespVO.inspectionEndTime"> |
|||
<el-date-picker |
|||
v-model="item.inspectionJobCharacteristicsRespVO.inspectionEndTime" |
|||
type="datetime" |
|||
placeholder="请选择结束时间" |
|||
style="width: 100%" |
|||
value-format="x" |
|||
disabled |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
</ContentWrap> |
|||
</el-drawer> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import * as InspectionRecordDetailPageApi from '@/api/qms/inspectionRecord/inspectionRecordDetail' |
|||
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|||
|
|||
defineOptions({ name: 'InspectionRecordDetail' }) |
|||
|
|||
const editableTabsValue = ref('1') |
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const updateKey = ref(0) |
|||
|
|||
const props = defineProps({ |
|||
// 表单,列表 相关信息 |
|||
allSchemas: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 明细列表相关信息 |
|||
detailAllSchemas: { |
|||
type: Object, |
|||
required: true, |
|||
default: null |
|||
}, |
|||
// 详情列表扩展操作按钮 |
|||
buttondataTable: { |
|||
type: Array, |
|||
required: false, |
|||
default: ()=>{ |
|||
return [] |
|||
} |
|||
}, |
|||
}) |
|||
const isShowDrawer = ref(false) |
|||
const detailLoading = ref(false) |
|||
const data = ref({ |
|||
code: '', |
|||
itemCode: '', |
|||
version: '', |
|||
testTypeCode: '', |
|||
programmeTemplateCode: '', |
|||
splitRule: '', |
|||
aql: '', |
|||
inspectionLevel: '', |
|||
effectiveDate: '', |
|||
expirationDate: '', |
|||
available: 'TRUE', |
|||
subList: [] |
|||
}) |
|||
|
|||
/** 打开弹窗 */ |
|||
const formRef = ref() |
|||
const titleNameRef = ref() |
|||
const titleValueRef = ref() |
|||
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { |
|||
titleNameRef.value = titleName |
|||
titleValueRef.value = titleValue |
|||
|
|||
isShowDrawer.value = true |
|||
if (row) { |
|||
detailLoading.value = true |
|||
try { |
|||
data.value = row |
|||
let list = [] |
|||
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(row.id) |
|||
list.forEach((item, index) => { |
|||
editableTabsValue.value = index + 1 |
|||
item.name = index + 1 |
|||
}) |
|||
data.value.subList = list |
|||
} finally { |
|||
detailLoading.value = false |
|||
} |
|||
} |
|||
} |
|||
defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗 |
|||
|
|||
|
|||
</script> |
|||
<style lang="scss"> |
|||
.el-drawer__body { |
|||
background: #f5f5f5 !important; |
|||
} |
|||
|
|||
::v-deep(.label-class-name) { |
|||
color: #dedede; |
|||
} |
|||
</style> |
|||
<style scoped lang="scss"></style> |
Loading…
Reference in new issue