|
@@ -15,64 +15,64 @@
|
|
|
<el-link type="primary" @click="linkCommission">关联委托单</el-link>
|
|
|
</div>
|
|
|
<div class="form-box">
|
|
|
- <el-form :model="formModal" label-width="auto">
|
|
|
+ <el-form :model="basicInfoData" label-width="auto">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="项目名称">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.projectName" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="工程名称">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.projectName" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="施工单位">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.constructionUnit" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="监理单位">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.supervisionUnit" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="实验室名称">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.labName" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="合同段/工区">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.contractName" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="工程部位/用途">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.projectPosition" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="委托单编号">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.entrustNo" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="记录编号">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.recordNo" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="报告编号">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.reportNo" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -80,15 +80,15 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="判断依据">
|
|
|
<el-select
|
|
|
- v-model="value"
|
|
|
+ v-model="standardId"
|
|
|
placeholder="请选择"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in checkOptions"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ v-for="item in basicInfoData.standardVos"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -103,33 +103,33 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="form-box">
|
|
|
- <el-form :model="formModal" label-width="auto">
|
|
|
+ <el-form :model="basicInfoData.trialSampleInfoList" label-width="auto">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="样品名称">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfoList.materialName" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="样品编号">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfoList.specificationNumber" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="样品描述">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfoList.sampleDescription" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="来样/取样时间">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfoList.samplingDate" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="样品数量">
|
|
|
- <el-input v-model="formModal.name" />
|
|
|
+ <el-input v-model="basicInfoData.trialSampleInfoList.materialCount" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -242,26 +242,123 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { nextTick, ref } from 'vue'
|
|
|
+import { nextTick, ref, watch } from 'vue'
|
|
|
import TestTree from '../../material/components/TestTree.vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
-import { getArrValue } from 'js-fast-way'
|
|
|
+
|
|
|
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'
|
|
|
+const props = defineProps({
|
|
|
+ nodeId:{
|
|
|
+ type: [String, Number],
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
+ dataId: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
+ contractId: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
+ projectId: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
+})
|
|
|
+
|
|
|
+
|
|
|
const useAppState = useAppStore()
|
|
|
const userInfo = ref(useAppState.getUserInfo)
|
|
|
-const projectId = ref(useAppState.getProjectId)
|
|
|
+
|
|
|
const projectInfo = ref(useAppState.getProjectInfo)
|
|
|
-const contractId = ref(useAppState.getContractId)
|
|
|
+
|
|
|
+const nodeId = ref(props.nodeId)
|
|
|
+const dataId = ref(props.dataId)
|
|
|
+const projectId = ref(props.projectId)
|
|
|
+const contractId = ref(props.contractId)
|
|
|
+
|
|
|
const handleSave = () => {}
|
|
|
const handleRefresh = () => {}
|
|
|
const isShow = defineModel('modelValue', {
|
|
|
default: false,
|
|
|
})
|
|
|
+const standardId = ref('')
|
|
|
+
|
|
|
+watch(()=>{
|
|
|
+
|
|
|
+})
|
|
|
+
|
|
|
+//监听
|
|
|
+watch(() => [
|
|
|
+
|
|
|
+ props.dataId,
|
|
|
+ props.nodeId,
|
|
|
+ props.projectId,
|
|
|
+ props.contractId,
|
|
|
+
|
|
|
+
|
|
|
+], ([did, nid, pid, cid]) => {
|
|
|
+ dataId.value = did
|
|
|
+ nodeId.value = nid
|
|
|
+ projectId.value = pid
|
|
|
+ contractId.value = cid
|
|
|
+
|
|
|
+
|
|
|
+})
|
|
|
+//获取基础信息数据
|
|
|
+watch(isShow, (newVal) => {
|
|
|
+ if (newVal) {
|
|
|
+ getInfoData()
|
|
|
+ }
|
|
|
+})
|
|
|
+const basicInfoData = ref({
|
|
|
+ trialSampleInfoList:{
|
|
|
+ materialName:'',
|
|
|
+ specificationNumber:'',
|
|
|
+ sampleDescription:'',
|
|
|
+ samplingDate:'',
|
|
|
+ },
|
|
|
+})
|
|
|
+
|
|
|
+const getInfoData = async () => {
|
|
|
+console.log(nodeId.value, dataId.value, projectId.value)
|
|
|
+ const { error, code, data } = await codeApi.getBaseInfo({
|
|
|
+ nodeId: nodeId.value,
|
|
|
+ id: dataId.value,
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+
|
|
|
+ })
|
|
|
+ //处理数据
|
|
|
+
|
|
|
+ if (!error && code === 200) {
|
|
|
+ console.log(data, '基础信息数据')
|
|
|
+ basicInfoData.value = getObjValue(data)
|
|
|
+ const { trialSampleInfoList } = basicInfoData.value
|
|
|
+ if (!trialSampleInfoList) {
|
|
|
+ console.log('111111111')
|
|
|
+ basicInfoData.value.trialSampleInfoList = {
|
|
|
+ materialName:'',
|
|
|
+ specificationNumber:'',
|
|
|
+ sampleDescription:'',
|
|
|
+ samplingDate:'',
|
|
|
+ }
|
|
|
+ console.log(' basicInfoData.value.trialSampleInfoList', basicInfoData.value.trialSampleInfoList)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
+ basicInfoData.value = {}
|
|
|
+ }
|
|
|
+}
|
|
|
const value = ref('')
|
|
|
|
|
|
-const formModal = ref({})
|
|
|
+
|
|
|
const checkOptions = ref([])
|
|
|
const tableColumn = [
|
|
|
{ key: 'name', name: '设备名称' },
|