|
|
|
@ -19,11 +19,16 @@ |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<a-col :span="24"> |
|
|
|
|
<a-form-item label="题目" v-bind="validateInfos.timul"> |
|
|
|
|
<!-- {{formData1}}--> |
|
|
|
|
<a-select |
|
|
|
|
v-model:value="formData.timul" |
|
|
|
|
v-if="isTimeSelect" |
|
|
|
|
v-model:value="formData.id" |
|
|
|
|
style="width: 400px" :disabled="formData.status!=0&&formData.status!=3" |
|
|
|
|
:default-value="formData.id" |
|
|
|
|
@change="selectChange" |
|
|
|
|
> |
|
|
|
|
<a-select-option v-for="item in formData1" :key="item.id" :value="item.id"> |
|
|
|
|
<!-- :disabled="formData.status!=0&&formData.status!=3"--> |
|
|
|
|
<a-select-option v-for="item in formData1" :key="item.id" :value="item.id.toString()" :label="item.name"> |
|
|
|
|
{{ item.name }} |
|
|
|
|
</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
@ -86,7 +91,9 @@ const formData = reactive<Record<string, any>>({ |
|
|
|
|
status: '', |
|
|
|
|
black: '', |
|
|
|
|
}); |
|
|
|
|
const formData1 = ref(); |
|
|
|
|
const formData1 = ref({ |
|
|
|
|
timul:'' |
|
|
|
|
}); |
|
|
|
|
const {createMessage} = useMessage(); |
|
|
|
|
const labelCol = ref<any>({xs: {span: 24}, sm: {span: 5}}); |
|
|
|
|
const wrapperCol = ref<any>({xs: {span: 24}, sm: {span: 16}}); |
|
|
|
@ -106,7 +113,9 @@ const disabled = computed(() => { |
|
|
|
|
} |
|
|
|
|
return props.formDisabled; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const selectChange = (e:any) => { |
|
|
|
|
console.log(e,formData1.value.timul) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 新增 |
|
|
|
@ -121,12 +130,16 @@ function click1(status1) { |
|
|
|
|
/** |
|
|
|
|
* 编辑 |
|
|
|
|
*/ |
|
|
|
|
const isTimeSelect = ref(false) |
|
|
|
|
function edit(record) { |
|
|
|
|
|
|
|
|
|
list4({enrollCode: record.enrollCode}).then((res) => { |
|
|
|
|
console.log(res, 'rs') |
|
|
|
|
// formData1.value=res |
|
|
|
|
formData1.value = res |
|
|
|
|
formData.id = res[0].id |
|
|
|
|
isTimeSelect.value = true |
|
|
|
|
// console.log(formData1.value,'formData1.value') |
|
|
|
|
}) |
|
|
|
|
nextTick(() => { |
|
|
|
|
resetFields(); |
|
|
|
|