|
@@ -36,7 +36,10 @@
|
|
|
<HcTabCard :tabs="authBtnTabdata" :tab-key="authBtnTabKey" @change="authBtnTabClick">
|
|
|
<template #extra>
|
|
|
<HcTooltip keys="tentative_detect_test_add">
|
|
|
- <el-button :disabled="!primaryKeyId" hc-btn color="#37c0fe" style="color: white;" @click="addFormModalClick">
|
|
|
+ <el-button
|
|
|
+ :disabled="!primaryKeyId" hc-btn color="#37c0fe" style="color: white;"
|
|
|
+ @click="addFormModalClick"
|
|
|
+ >
|
|
|
<HcIcon name="add-circle" />
|
|
|
<span>新增</span>
|
|
|
</el-button>
|
|
@@ -105,7 +108,10 @@
|
|
|
</div>
|
|
|
<div class="ml-2 w-200px">
|
|
|
<el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable block>
|
|
|
- <el-option v-for="item in contractData" :key="item.id" :label="item.contractName" :value="item.id" />
|
|
|
+ <el-option
|
|
|
+ v-for="item in contractData" :key="item.id" :label="item.contractName"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="ml-2 w-32">
|
|
@@ -187,7 +193,10 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 查看附件 -->
|
|
|
- <hc-new-dialog :footer="false" :show="viewAttachmentModal" is-table title="查看附件" widths="70rem" @close="viewAttachmentModalClose">
|
|
|
+ <hc-new-dialog
|
|
|
+ :footer="false" :show="viewAttachmentModal" is-table title="查看附件" widths="70rem"
|
|
|
+ @close="viewAttachmentModalClose"
|
|
|
+ >
|
|
|
<template #extra>
|
|
|
<HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" size="default" @change="tabTypeChange" />
|
|
|
</template>
|
|
@@ -217,7 +226,10 @@
|
|
|
</hc-new-dialog>
|
|
|
|
|
|
<!-- 查看样品信息 -->
|
|
|
- <hc-new-dialog :footer="false" :show="samplingRecordModal" is-table title="查看样品信息" widths="60%" @close="samplingRecordModalClose">
|
|
|
+ <hc-new-dialog
|
|
|
+ :footer="false" :show="samplingRecordModal" is-table title="查看样品信息" widths="60%"
|
|
|
+ @close="samplingRecordModalClose"
|
|
|
+ >
|
|
|
<HcTable
|
|
|
:column="samplingTableColumn" :datas="samplingTableData" :is-index="false"
|
|
|
:loading="samplingTableLoading" is-new
|
|
@@ -225,11 +237,16 @@
|
|
|
</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="样品信息">
|
|
|
<template #extra>
|
|
|
- <el-button :disabled="relatedData1.length <= 0" type="primary" size="small" @click="rowDispose">样品处理</el-button>
|
|
|
+ <el-button :disabled="relatedData1.length <= 0" type="primary" size="small" @click="rowDispose">
|
|
|
+ 样品处理
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<hc-table :column="relatedColumn1" :datas="relatedData1" :is-index="false" />
|
|
|
</hc-card-item>
|
|
@@ -291,13 +308,14 @@ import { useAppStore } from '~src/store'
|
|
|
import TestTree from '../material/components/TestTree.vue'
|
|
|
import { delStoreValue, getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
|
import HcDragUpload from './components/HcDragUpload.vue'
|
|
|
-import dataApi from '~api/tentative/detect/test'
|
|
|
import { getDictionary } from '~api/other'
|
|
|
import { eVisaTaskCheckApi } from '~api/other'
|
|
|
import { getErtractInfo } from '~api/other'
|
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
|
+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 { arrToId, formValidate, getArrValue, getObjVal, isNullES, isString } from 'js-fast-way'
|
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
@@ -598,7 +616,7 @@ const delModalClick = () => {
|
|
|
const rows = tableCheckedKeys.value
|
|
|
if (rows.length > 0) {
|
|
|
const ids = arrToId(rows)
|
|
|
- HcDelMsg(async ( resolve) => {
|
|
|
+ HcDelMsg(async (resolve) => {
|
|
|
await removeDataApi(ids)
|
|
|
resolve() //关闭弹窗的回调
|
|
|
})
|
|
@@ -1028,115 +1046,233 @@ const getCommissionData = async (id) => {
|
|
|
|
|
|
//设备采集信息
|
|
|
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)
|
|
|
+ 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 = []
|
|
|
}
|
|
|
|
|
|
//表单数据
|
|
|
const formRef = ref(null)
|
|
|
const formModel = ref({})
|
|
|
const formRules = {
|
|
|
- repealType: {
|
|
|
- required: true,
|
|
|
- trigger: 'blur',
|
|
|
- message: '请选择处理方式',
|
|
|
- },
|
|
|
- repealReason: {
|
|
|
- required: true,
|
|
|
- trigger: 'blur',
|
|
|
- message: '请填写处理原因',
|
|
|
- },
|
|
|
- resamStartTime: {
|
|
|
- required: true,
|
|
|
- trigger: 'blur',
|
|
|
- message: '请选择留样时间',
|
|
|
- },
|
|
|
+ repealType: {
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ message: '请选择处理方式',
|
|
|
+ },
|
|
|
+ repealReason: {
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ message: '请填写处理原因',
|
|
|
+ },
|
|
|
+ resamStartTime: {
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ message: '请选择留样时间',
|
|
|
+ },
|
|
|
}
|
|
|
|
|
|
//样品处理
|
|
|
const disposeModal = ref(false)
|
|
|
const rowDispose = () => {
|
|
|
- disposeModal.value = true
|
|
|
- const rows = relatedData1.value
|
|
|
- formModel.value = {
|
|
|
- id: arrToId(rows),
|
|
|
- repealType: 1,
|
|
|
- }
|
|
|
+ disposeModal.value = true
|
|
|
+ const rows = relatedData1.value
|
|
|
+ formModel.value = {
|
|
|
+ id: arrToId(rows),
|
|
|
+ repealType: 1,
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//日期时间被选择
|
|
|
const formTime = ref(null)
|
|
|
const formTimeUpdate = ({ arr }) => {
|
|
|
- formTime.value = arr
|
|
|
- if (arr.length > 0) {
|
|
|
- formModel.value.resamStartTime = arr[0]
|
|
|
- formModel.value.resamEndTime = arr[1]
|
|
|
- } else {
|
|
|
- formModel.value.resamStartTime = ''
|
|
|
- formModel.value.resamEndTime = ''
|
|
|
- }
|
|
|
+ formTime.value = arr
|
|
|
+ if (arr.length > 0) {
|
|
|
+ formModel.value.resamStartTime = arr[0]
|
|
|
+ formModel.value.resamEndTime = arr[1]
|
|
|
+ } else {
|
|
|
+ formModel.value.resamStartTime = ''
|
|
|
+ formModel.value.resamEndTime = ''
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//确定提交
|
|
|
const saveLoading = ref(false)
|
|
|
const disposeSave = async () => {
|
|
|
- const isForm = await formValidate(formRef.value)
|
|
|
- if (!isForm) return
|
|
|
- const { error, code, msg } = await testSampleApi.update(formModel.value)
|
|
|
- saveLoading.value = false
|
|
|
- if (!error && code === 200) {
|
|
|
- window.$message.success('提交成功')
|
|
|
- disposeClose()
|
|
|
- getTableData().then()
|
|
|
- } else {
|
|
|
- window.$message.error(msg || '操作失败')
|
|
|
- }
|
|
|
+ const isForm = await formValidate(formRef.value)
|
|
|
+ if (!isForm) return
|
|
|
+ const { error, code, msg } = await testSampleApi.update(formModel.value)
|
|
|
+ saveLoading.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window.$message.success('提交成功')
|
|
|
+ disposeClose()
|
|
|
+ getTableData().then()
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg || '操作失败')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//关闭弹窗
|
|
|
const disposeClose = () => {
|
|
|
disposeModal.value = false
|
|
|
- formModel.value = {}
|
|
|
+ formModel.value = {}
|
|
|
}
|
|
|
</script>
|
|
|
|