修复部分bug
This commit is contained in:
parent
d4934c40da
commit
29849c7a24
|
|
@ -17,6 +17,7 @@
|
|||
multiple
|
||||
placeholder="请选择方案课程"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.course.lists || []"
|
||||
|
|
@ -51,6 +52,7 @@
|
|||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button @click="constoleLog">log</el-button>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -87,6 +89,10 @@ const formData = reactive({
|
|||
assessmentType: '',
|
||||
status: ''
|
||||
})
|
||||
const queryParams = reactive({
|
||||
courseName: '',
|
||||
courseCode: ''
|
||||
})
|
||||
|
||||
const formRules = {
|
||||
id: [
|
||||
|
|
@ -102,7 +108,12 @@ const { optionsData } = useDictOptions<{
|
|||
course: any
|
||||
}>({
|
||||
course: {
|
||||
api: courseLists
|
||||
api: courseLists,
|
||||
params: {
|
||||
status: 1,
|
||||
courseName: queryParams.courseName,
|
||||
courseCode: queryParams.courseCode
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -115,6 +126,10 @@ const handleSubmit = async () => {
|
|||
emit('success')
|
||||
}
|
||||
|
||||
const constoleLog = async () => {
|
||||
console.log('courseId:', formData.courseId)
|
||||
}
|
||||
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
|
|
@ -123,11 +138,16 @@ const open = (type = 'add') => {
|
|||
const setFormData = async (data: Record<string, any>) => {
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
if (key === 'courseId') {
|
||||
//@ts-ignore
|
||||
formData[key] = Array.isArray(data[key]) ? data[key] : data[key] ? [data[key]] : []
|
||||
} else {
|
||||
//@ts-ignore
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await curriculumDetail({
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ const fetchVersionLists = async (data: Record<string, any>) => {
|
|||
|
||||
const handleVersionChange = (versionId: string | number) => {
|
||||
selectedVersion.value = getVersionLists.value.find((v) => v.id === versionId)
|
||||
console.log('selectedVersion:', selectedVersion.value)
|
||||
getLists()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue