|
@@ -5,7 +5,10 @@
|
|
|
<template #header>
|
|
|
<div class="text-18px">汇总分类</div>
|
|
|
</template>
|
|
|
- <div v-for="(item) in testOpt" :key="item.id" class="mb-4" :class="item.id === curItem?.id ? 'bg-slate-200' : ''" @click="handleItem(item)">
|
|
|
+ <div
|
|
|
+ v-for="(item) in testOpt" :key="item.id" class="mb-4"
|
|
|
+ :class="item.id === curItem?.id ? 'bg-slate-200' : ''" @click="handleItem(item)"
|
|
|
+ >
|
|
|
<i class="ri-circle-fill" />
|
|
|
{{ item.className }}
|
|
|
</div>
|
|
@@ -15,11 +18,17 @@
|
|
|
<template #header>
|
|
|
<div class="w-50">
|
|
|
<el-select v-model="searchForm.contractId" placeholder="请选择" @change="changeContract">
|
|
|
- <el-option v-for="item in contractOptions" :key="item.id" :label="item.contractName" :value="item.id" />
|
|
|
+ <el-option
|
|
|
+ v-for="item in contractOptions" :key="item.id" :label="item.contractName"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="ml-2 w-40">
|
|
|
- <el-select v-model="searchForm.detectionType" clearable block placeholder="检测类别" @change="changeType">
|
|
|
+ <el-select
|
|
|
+ v-model="searchForm.detectionType" clearable block placeholder="检测类别"
|
|
|
+ @change="changeType"
|
|
|
+ >
|
|
|
<el-option v-for="item in typeData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -110,7 +119,10 @@
|
|
|
</hc-new-dialog>
|
|
|
|
|
|
<!-- 查阅关联 -->
|
|
|
- <hc-dialog v-model="isRelatedSearch" :footer="false" is-table title="查阅关联" widths="80%" :padding="false" @close="relatedSearchModalClose">
|
|
|
+ <hc-dialog
|
|
|
+ v-model="isRelatedSearch" :footer="false" is-table title="查阅关联" widths="80%" :padding="false"
|
|
|
+ @close="relatedSearchModalClose"
|
|
|
+ >
|
|
|
<div class="hc-related-search-box relative mt-10px">
|
|
|
<hc-card-item title="样品信息">
|
|
|
<hc-table :column="relatedColumn1" :datas="relatedData1" :is-index="false" />
|
|
@@ -143,6 +155,7 @@ import { toPdfPage } from '~uti/btn-auth'
|
|
|
import dataApi from '~api/tentative/detect/test'
|
|
|
import testSampleApi from '~api/tentative/material/testSample'
|
|
|
import commissionApi from '~api/tentative/detect/commission'
|
|
|
+import acquisitionApi from '~api/tentative/acquisition/data'
|
|
|
import { download, getContractList, getPage, getSummaryList, removeByIds, save } from '~api/tentative/collect/test'
|
|
|
|
|
|
//变量
|
|
@@ -421,98 +434,216 @@ const downClick = async () => {
|
|
|
const isRelatedSearch = ref(false)
|
|
|
const relatedSearchClick = (row) => {
|
|
|
isRelatedSearch.value = true
|
|
|
- //获取样品信息
|
|
|
- getSampleList(row.id)
|
|
|
- //获取委托单
|
|
|
- getCommissionData(row.entrustId)
|
|
|
- //获取关联设备
|
|
|
- getAcquisitionData(row.loadDataId)
|
|
|
+ //获取样品信息
|
|
|
+ getSampleList(row.id)
|
|
|
+ //获取委托单
|
|
|
+ getCommissionData(row.entrustId)
|
|
|
+ //获取关联设备
|
|
|
+ getAcquisitionData(row.loadDataId)
|
|
|
}
|
|
|
|
|
|
//样品信息
|
|
|
const relatedColumn1 = [
|
|
|
- { key: 'materialName', name: '样品名称' },
|
|
|
- { key: 'samplingDate', name: '取样日期' },
|
|
|
- { key: 'specificationNumber', name: '样品编号' },
|
|
|
- { key: 'specificationModel', name: '规格型号' },
|
|
|
- { key: 'materialCount', name: '试样数量' },
|
|
|
- { key: 'calculationUnit', name: '计算单位' },
|
|
|
- { key: 'proposedPosition', name: '拟用部位' },
|
|
|
- { key: 'representativeCount', name: '代表数量' },
|
|
|
- { key: 'userName', name: '取样人' },
|
|
|
- { key: 'carryTime', name: '入库时间', align: 'center' },
|
|
|
- { key: 'createTime', name: '试验时间', align: 'center' },
|
|
|
- { key: 'no-key', name: '样品处理' },
|
|
|
- { key: 'no-key', name: '时间(或处理原因)' },
|
|
|
+ { key: 'materialName', name: '样品名称' },
|
|
|
+ { key: 'samplingDate', name: '取样日期' },
|
|
|
+ { key: 'specificationNumber', name: '样品编号' },
|
|
|
+ { key: 'specificationModel', name: '规格型号' },
|
|
|
+ { key: 'materialCount', name: '试样数量' },
|
|
|
+ { key: 'calculationUnit', name: '计算单位' },
|
|
|
+ { key: 'proposedPosition', name: '拟用部位' },
|
|
|
+ { key: 'representativeCount', name: '代表数量' },
|
|
|
+ { key: 'userName', name: '取样人' },
|
|
|
+ { key: 'carryTime', name: '入库时间', align: 'center' },
|
|
|
+ { key: 'createTime', name: '试验时间', align: 'center' },
|
|
|
+ { key: 'no-key', name: '样品处理' },
|
|
|
+ { key: 'no-key', name: '时间(或处理原因)' },
|
|
|
]
|
|
|
const relatedData1 = ref([])
|
|
|
const getSampleList = async (id) => {
|
|
|
- relatedData1.value = []
|
|
|
- if (isNullES(id) || id == 0) return
|
|
|
- const { data } = await dataApi.getSampleList({ id })
|
|
|
- relatedData1.value = getArrValue(data)
|
|
|
+ relatedData1.value = []
|
|
|
+ if (isNullES(id) || id == 0) return
|
|
|
+ const { data } = await dataApi.getSampleList({ id })
|
|
|
+ relatedData1.value = getArrValue(data)
|
|
|
}
|
|
|
|
|
|
//委托单信息
|
|
|
const relatedColumn2 = [
|
|
|
- { key: 'entrustInfo', name: '委托单位' },
|
|
|
- { key: 'entrustNo', name: '委托单编号' },
|
|
|
- { key: 'entrustName', name: '委托单名称' },
|
|
|
- { key: 'status', name: '委托单状态', width: 120, align: 'center' },
|
|
|
+ { key: 'entrustInfo', name: '委托单位' },
|
|
|
+ { key: 'entrustNo', name: '委托单编号' },
|
|
|
+ { key: 'entrustName', name: '委托单名称' },
|
|
|
+ { key: 'status', name: '委托单状态', width: 120, align: 'center' },
|
|
|
]
|
|
|
const relatedData2 = ref([])
|
|
|
const getCommissionData = async (id) => {
|
|
|
- relatedData2.value = []
|
|
|
- if (isNullES(id) || id == 0) return
|
|
|
- const { data } = await commissionApi.detail(id)
|
|
|
- const res = getObjVal(data)
|
|
|
- relatedData2.value = res ? [res] : []
|
|
|
+ relatedData2.value = []
|
|
|
+ if (isNullES(id) || id == 0) return
|
|
|
+ const { data } = await commissionApi.detail(id)
|
|
|
+ const res = getObjVal(data)
|
|
|
+ relatedData2.value = res ? [res] : []
|
|
|
}
|
|
|
|
|
|
//设备采集信息
|
|
|
const relatedColumn3 = [
|
|
|
- { key: 'key1', name: '工程部位' },
|
|
|
- { key: 'key2', name: '设备名称' },
|
|
|
- { key: 'key3', name: '设备采集编号' },
|
|
|
- { key: 'key4', name: '试验日期' },
|
|
|
- { key: 'key5', name: '样品编号' },
|
|
|
- { key: 'key6', name: '试验类型' },
|
|
|
- { key: 'key7', name: '承压面积(mm2)' },
|
|
|
- { key: 'key8', name: '试件尺寸(mm)' },
|
|
|
- { key: 'key9', name: '设计强度(MPa)' },
|
|
|
- { key: 'key10', name: '龄期(d)' },
|
|
|
- { key: 'key11', name: '荷载1(KN)' },
|
|
|
- { key: 'key12', name: '荷载1(KN)' },
|
|
|
- { key: 'key13', name: '荷载2(KN)' },
|
|
|
- { key: 'key14', name: '荷载3(KN)' },
|
|
|
- { key: 'key15', name: '荷载4(KN)' },
|
|
|
- { key: 'key16', name: '荷载5(KN)' },
|
|
|
- { key: 'key17', name: '荷载6(KN)' },
|
|
|
- { key: 'key18', name: '其余荷载(KN)' },
|
|
|
- { key: 'key19', name: '强度代表值(MPa)' },
|
|
|
+ { key: 'engineInfo', name: '工程部位' },
|
|
|
+ { key: 'deviceName', name: '设备名称' },
|
|
|
+ { key: 'equipmentAcquisitionNumber', name: '设备采集编号', width: 180, align: 'center' },
|
|
|
+ { key: 'testDate', name: '试验日期', width: 160, align: 'center' },
|
|
|
+ { key: 'specificationNumber', name: '样品编号', width: 180, align: 'center' },
|
|
|
+ { key: 'testTypeName', name: '试验类型', width: 100, align: 'center' },
|
|
|
+ { key: 'beArea', name: '承压面积(mm2)', width: 100, align: 'center' },
|
|
|
+ { key: 'specimenSize', name: '试件尺寸(mm)', width: 100, align: 'center' },
|
|
|
+ { key: 'desStrength', name: '设计强度(MPa)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '龄期(d)', width: 100, align: 'center' },
|
|
|
+ { key: 'load1', name: '荷载1(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'load2', name: '荷载2(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'load3', name: '荷载3(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '荷载4(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '荷载5(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '荷载6(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '强度代表值(MPa)', width: 100, align: 'center' },
|
|
|
{
|
|
|
name: '最大力总延伸(%)',
|
|
|
children: [
|
|
|
- { key: 'key20', name: '1' },
|
|
|
- { key: 'key21', name: '2' },
|
|
|
- { key: 'key22', name: '3' },
|
|
|
+ { key: 'maxConceal1', name: '1', width: 100, align: 'center' },
|
|
|
+ { key: 'maxConceal2', name: '2', width: 100, align: 'center' },
|
|
|
+ { key: 'maxConceal3', name: '3', width: 100, align: 'center' },
|
|
|
],
|
|
|
},
|
|
|
- { key: 'key23', name: '试验结果是否合格', width: 100, align: 'center' },
|
|
|
+ //{ key: 'dataQualified', name: '试验结果是否合格', width: 100, align: 'center' },
|
|
|
+ { key: 'dataStatus', name: '数据状态', width: 100, align: 'center' },
|
|
|
]
|
|
|
const relatedData3 = ref([])
|
|
|
const getAcquisitionData = async (id) => {
|
|
|
- relatedData3.value = []
|
|
|
- if (isNullES(id) || id == 0) return
|
|
|
- console.log(11)
|
|
|
+ relatedData3.value = []
|
|
|
+ if (isNullES(id) || id == 0) return
|
|
|
+ const { data } = await acquisitionApi.selectDataInfoById(id)
|
|
|
+ const res = getObjVal(data)
|
|
|
+ relatedData3.value = res ? [res] : []
|
|
|
+ //setRelatedColumn3(res.type)
|
|
|
+}
|
|
|
+
|
|
|
+//设置表头
|
|
|
+const setRelatedColumn3 = (type) => {
|
|
|
+ //压力机
|
|
|
+ if (type === '1') {
|
|
|
+ relatedColumn3.value = [
|
|
|
+ { key: 'engineInfo', name: '工程部位' },
|
|
|
+ { key: 'deviceName', name: '设备名称' },
|
|
|
+ { key: 'equipmentAcquisitionNumber', name: '设备采集编号', width: 180, align: 'center' },
|
|
|
+ { key: 'testDate', name: '试验日期', width: 160, align: 'center' },
|
|
|
+ { key: 'specificationNumber', name: '样品编号', width: 180, align: 'center' },
|
|
|
+ { key: 'testTypeName', name: '试验类型', width: 100, align: 'center' },
|
|
|
+ { key: 'beArea', name: '承压面积(mm2)', width: 100, align: 'center' },
|
|
|
+ { key: 'specimenSize', name: '试件尺寸(mm)', width: 100, align: 'center' },
|
|
|
+ { key: 'desStrength', name: '设计强度(MPa)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '龄期(d)', width: 100, align: 'center' },
|
|
|
+ { key: 'load1', name: '荷载1(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'load2', name: '荷载2(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'load3', name: '荷载3(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '荷载4(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '荷载5(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '荷载6(KN)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '强度代表值(MPa)', width: 100, align: 'center' },
|
|
|
+ {
|
|
|
+ name: '最大力总延伸(%)',
|
|
|
+ children: [
|
|
|
+ { key: 'maxConceal1', name: '1', width: 100, align: 'center' },
|
|
|
+ { key: 'maxConceal2', name: '2', width: 100, align: 'center' },
|
|
|
+ { key: 'maxConceal3', name: '3', width: 100, align: 'center' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ //{ key: 'dataQualified', name: '试验结果是否合格', width: 100, align: 'center' },
|
|
|
+ { key: 'dataStatus', name: '数据状态', width: 100, align: 'center' },
|
|
|
+ ]
|
|
|
+ } else if (type === '2') {
|
|
|
+ //万能机
|
|
|
+ relatedColumn3.value = [
|
|
|
+ { key: 'engineInfo', name: '工程部位' },
|
|
|
+ { key: 'deviceName', name: '设备名称' },
|
|
|
+ { key: 'equipmentAcquisitionNumber', name: '设备采集编号', width: 180, align: 'center' },
|
|
|
+ { key: 'testDate', name: '试验日期', width: 160, align: 'center' },
|
|
|
+ { key: 'specificationNumber', name: '样品编号', width: 180, align: 'center' },
|
|
|
+ { key: 'testTypeName', name: '试验类型', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '牌号', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '公称直径(mm)', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '规格', width: 100, align: 'center' },
|
|
|
+ {
|
|
|
+ name: '最大力/荷载(KN)',
|
|
|
+ children: [
|
|
|
+ { key: 'no-key', name: '1', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '2', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '3', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '4', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '5', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '6', width: 100, align: 'center' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '抗拉强度/强度代表值(MPa)',
|
|
|
+ children: [
|
|
|
+ { key: 'no-key', name: '1', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '2', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '3', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '4', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '5', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '6', width: 100, align: 'center' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '上屈服力(KN)',
|
|
|
+ children: [
|
|
|
+ { key: 'no-key', name: '1', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '2', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '3', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '4', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '5', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '6', width: 100, align: 'center' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '下屈服力(KN)',
|
|
|
+ children: [
|
|
|
+ { key: 'no-key', name: '1', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '2', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '3', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '4', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '5', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '6', width: 100, align: 'center' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '上屈服强度(MPa)',
|
|
|
+ children: [
|
|
|
+ { key: 'no-key', name: '1', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '2', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '3', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '4', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '5', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '6', width: 100, align: 'center' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '下屈服强度(MPa)',
|
|
|
+ children: [
|
|
|
+ { key: 'no-key', name: '1', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '2', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '3', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '4', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '5', width: 100, align: 'center' },
|
|
|
+ { key: 'no-key', name: '6', width: 100, align: 'center' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ { key: 'dataStatus', name: '数据状态', width: 100, align: 'center' },
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//关闭关联查阅
|
|
|
const relatedSearchModalClose = () => {
|
|
|
isRelatedSearch.value = false
|
|
|
- relatedData1.value = []
|
|
|
- relatedData2.value = []
|
|
|
- relatedData3.value = []
|
|
|
+ relatedData1.value = []
|
|
|
+ relatedData2.value = []
|
|
|
+ relatedData3.value = []
|
|
|
}
|
|
|
</script>
|
|
|
|