|
@@ -103,33 +103,33 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="form-box">
|
|
|
- <el-form :model="basicInfoData.trialSampleInfoList" label-width="auto">
|
|
|
+ <el-form :model="basicInfoData.trialSampleInfo" label-width="auto">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="样品名称">
|
|
|
- <el-input v-model="basicInfoData.trialSampleInfoList.materialName" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfo.materialName" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="样品编号">
|
|
|
- <el-input v-model="basicInfoData.trialSampleInfoList.specificationNumber" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfo.specificationNumber" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="样品描述">
|
|
|
- <el-input v-model="basicInfoData.trialSampleInfoList.sampleDescription" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfo.sampleDescription" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="来样/取样时间">
|
|
|
- <el-input v-model="basicInfoData.trialSampleInfoList.samplingDate" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfo.samplingDate" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="样品数量">
|
|
|
- <el-input v-model="basicInfoData.trialSampleInfoList.materialCount" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfo.materialCount" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -218,7 +218,7 @@ import dataApi from '~api/tentative/detect/test'
|
|
|
import LinkAssociation from '../../detect/components/linkAssociation.vue'
|
|
|
import LinkAcquisition from '../../detect/components/linkAcquisition.vue'
|
|
|
import codeApi from '~api/basic/code'
|
|
|
-import { arrToId, arrToKey, formValidate, getArrValue, getObjVal, getObjValue, isNullES, isString } from 'js-fast-way'
|
|
|
+import { getArrValue, getObjValue } from 'js-fast-way'
|
|
|
const props = defineProps({
|
|
|
nodeId:{
|
|
|
type: [String, Number],
|
|
@@ -323,7 +323,7 @@ watch(isShow, (newVal) => {
|
|
|
}
|
|
|
})
|
|
|
const basicInfoData = ref({
|
|
|
- trialSampleInfoList:{
|
|
|
+ trialSampleInfo:{
|
|
|
materialName:'',
|
|
|
specificationNumber:'',
|
|
|
sampleDescription:'',
|
|
@@ -356,9 +356,9 @@ infoLoad.value = false
|
|
|
|
|
|
|
|
|
|
|
|
- const { trialSampleInfoList, trailDeviceUseInfoDTOS } = basicInfoData.value
|
|
|
- if (!trialSampleInfoList) {
|
|
|
- basicInfoData.value.trialSampleInfoList = {
|
|
|
+ const { trialSampleInfo, trailDeviceUseInfoDTOS } = basicInfoData.value
|
|
|
+ if (!trialSampleInfo) {
|
|
|
+ basicInfoData.value.trialSampleInfo = {
|
|
|
materialName:'',
|
|
|
specificationNumber:'',
|
|
|
sampleDescription:'',
|
|
@@ -463,7 +463,7 @@ const linksSampleModalSave = () => {
|
|
|
linksSampleModal.value = false
|
|
|
console.log(tableSampleCheckedKeys.value, 'tableSampleCheckedKeys.value')
|
|
|
if (tableSampleCheckedKeys.value.length > 0) {
|
|
|
- basicInfoData.value.trialSampleInfoList = tableSampleCheckedKeys.value[0]
|
|
|
+ basicInfoData.value.trialSampleInfo = tableSampleCheckedKeys.value[0]
|
|
|
basicInfoData.value.sampleIds = tableSampleCheckedKeys.value[0].id
|
|
|
|
|
|
|
|
@@ -557,7 +557,7 @@ const handleSave = async () => {
|
|
|
basicInfoData.value.oldReportNumber = oldReportNumber.value
|
|
|
basicInfoData.value.type = type.value
|
|
|
|
|
|
- // emit('change', basicInfoData.value)
|
|
|
+
|
|
|
handleSaveLoad.value = true
|
|
|
const { error, code, data, msg } = await codeApi.saveBaseInfo({
|
|
|
...basicInfoData.value,
|
|
@@ -567,7 +567,8 @@ const handleSave = async () => {
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success(msg)
|
|
|
isShow.value = false
|
|
|
-
|
|
|
+ dataId.value = data
|
|
|
+ emit('change', dataId.value)
|
|
|
|
|
|
}
|
|
|
}
|