修改设备
parent
eab92b29ec
commit
10db79ded9
|
|
@ -54,10 +54,10 @@
|
|||
<el-form-item label="计划Id" prop="planId">d
|
||||
<el-input v-model="formData.planId" placeholder="请输入计划Id" />
|
||||
</el-form-item></el-col>-->
|
||||
<el-col :span="6">
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item label="课题实施所需的其他配套条件" prop="supportingCondition">
|
||||
<el-input v-model="formData.supportingCondition" placeholder="请输入课题实施所需的其他配套条件" />
|
||||
</el-form-item></el-col>
|
||||
</el-form-item></el-col> -->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-select v-model="formData.gender" placeholder="请选择性别">
|
||||
|
|
@ -190,7 +190,7 @@
|
|||
<UnitForm ref="unitFormRef" :contract-id="formData.id" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="项目所需设备" name="device">
|
||||
<DeviceForm ref="deviceFormRef" :contract-id="formData.id" />
|
||||
<DeviceForm ref="deviceFormRef" :contract-id="formData.id" @getData="setData"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="主要参加人员" name="participant">
|
||||
<ParticipantForm ref="participantFormRef" :contract-id="formData.id" />
|
||||
|
|
@ -239,7 +239,7 @@ const formData = ref({
|
|||
endDate: undefined,
|
||||
planName: undefined,
|
||||
planId: undefined,
|
||||
supportingCondition: undefined,
|
||||
supportingCondition: '',
|
||||
gender: undefined,
|
||||
age: undefined,
|
||||
education: undefined,
|
||||
|
|
@ -274,8 +274,8 @@ const formRules = reactive({
|
|||
beginDate: [{ required: true, message: '开始时间不能为空', trigger: 'blur' }],
|
||||
endDate: [{ required: true, message: '结束时间不能为空', trigger: 'blur' }],
|
||||
planName: [{ required: true, message: '计划类型不能为空', trigger: 'change' }],
|
||||
//planId: [{ required: true, message: '计划Id不能为空', trigger: 'blur' }],
|
||||
supportingCondition: [{ required: true, message: '课题实施所需的其他配套条件不能为空', trigger: 'blur' }],
|
||||
planId: [{ required: true, message: '计划Id不能为空', trigger: 'blur' }],
|
||||
// supportingCondition: [{ required: true, message: '课题实施所需的其他配套条件不能为空', trigger: 'blur' }],
|
||||
gender: [{ required: true, message: '性别不能为空', trigger: 'blur' }],
|
||||
age: [{ required: true, message: '年龄不能为空', trigger: 'blur' }],
|
||||
education: [{ required: true, message: '学历不能为空', trigger: 'blur' }],
|
||||
|
|
@ -416,6 +416,13 @@ const submitForm = async () => {
|
|||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
const setData = (data:any) =>{
|
||||
formData.value.supportingCondition = ''
|
||||
for(var i = 0; i<data.length;i++){
|
||||
formData.value.supportingCondition =formData.value.supportingCondition+Number(i+1)+"、"+data[i].complement +"<br />"
|
||||
}
|
||||
console.log(formData.value.supportingCondition)
|
||||
}
|
||||
const planChange = (e) => {
|
||||
formData.value.planId = e.value;
|
||||
formData.value.planName = e.label
|
||||
|
|
@ -434,7 +441,7 @@ const resetForm = () => {
|
|||
endDate: undefined,
|
||||
planName: undefined,
|
||||
planId: undefined,
|
||||
supportingCondition: undefined,
|
||||
supportingCondition: '',
|
||||
gender: undefined,
|
||||
age: undefined,
|
||||
education: undefined,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<el-table-column label="课题实施所需的其他配套条件" min-width="150">
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item :prop="`${$index}.complement`" :rules="formRules.complement" class="mb-0px!">
|
||||
<el-input v-model="row.complement" placeholder="请输入课题实施所需的其他配套条件" />
|
||||
<el-input v-model="row.complement" placeholder="请输入课题实施所需的其他配套条件" @change="setData"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -75,7 +75,7 @@ const formData = ref([])
|
|||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const emit = defineEmits(['getData'])
|
||||
/** 监听主表的关联字段的变化,加载对应的子表数据 */
|
||||
watch(
|
||||
() => props.contractId,
|
||||
|
|
@ -95,7 +95,9 @@ watch(
|
|||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
const setData = () =>{
|
||||
emit('getData',formData.value)
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
const row = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue