提交 62a0ea87 authored 作者: matian's avatar matian

bug fixes

上级 4638d63a
...@@ -16,7 +16,7 @@ const listOptions = computed(() => { ...@@ -16,7 +16,7 @@ const listOptions = computed(() => {
{ label: '所在章', prop: 'big', align: 'center', minWidth: '200' }, { label: '所在章', prop: 'big', align: 'center', minWidth: '200' },
{ label: '所在小节', prop: 'small', align: 'center' }, { label: '所在小节', prop: 'small', align: 'center' },
{ label: '创建日期', prop: 'created_time', align: 'center' }, { label: '创建日期', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
], ],
data: props.list data: props.list
} }
......
...@@ -109,7 +109,7 @@ const listOptions = computed(() => { ...@@ -109,7 +109,7 @@ const listOptions = computed(() => {
{ label: '类别名称', prop: 'category_name', align: 'center' }, { label: '类别名称', prop: 'category_name', align: 'center' },
{ label: '层级', prop: 'depth', align: 'center' }, { label: '层级', prop: 'depth', align: 'center' },
{ label: '状态', prop: 'status_name', align: 'center' }, { label: '状态', prop: 'status_name', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' } { label: '操作', slots: 'table-operate', width: 230, align: 'center', fixed: 'right' }
], ],
data: tableData data: tableData
} }
......
...@@ -58,8 +58,9 @@ const handleCancel = () => { ...@@ -58,8 +58,9 @@ const handleCancel = () => {
watch( watch(
() => form.organ_id, () => form.organ_id,
() => { value => {
if (form.organ_id !== '' || form.organ_id_name !== '') { console.log(value, 'value', form.organ_id_name)
if (value !== '' || form.organ_id_name !== undefined) {
handleGetTeacherList() handleGetTeacherList()
} }
} }
...@@ -86,7 +87,6 @@ const handleConfirm = async (formEl: FormInstance | undefined) => { ...@@ -86,7 +87,6 @@ const handleConfirm = async (formEl: FormInstance | undefined) => {
if (valid) { if (valid) {
if (props.isEdit === '0') { if (props.isEdit === '0') {
form.organ_id = form.organ_id || userStore.organization?.id form.organ_id = form.organ_id || userStore.organization?.id
const params: any = Object.assign({}, form) const params: any = Object.assign({}, form)
addClass(params).then(() => { addClass(params).then(() => {
ElMessage.success('新增班级成功') ElMessage.success('新增班级成功')
...@@ -155,6 +155,7 @@ getProList({ name: '', 'per-page': '100' }).then((res: any) => { ...@@ -155,6 +155,7 @@ getProList({ name: '', 'per-page': '100' }).then((res: any) => {
<el-input :placeholder="userStore.organization?.name" v-model="form.organ_id_name" v-else disabled> </el-input> <el-input :placeholder="userStore.organization?.name" v-model="form.organ_id_name" v-else disabled> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="班主任" prop="teacher_id"> <el-form-item label="班主任" prop="teacher_id">
<!-- {{ teacherList }} -->
<el-select <el-select
v-model="form.teacher_id" v-model="form.teacher_id"
clearable clearable
......
...@@ -40,7 +40,7 @@ const listOptions = $computed(() => { ...@@ -40,7 +40,7 @@ const listOptions = $computed(() => {
{ label: '学期开始时间', prop: 'start_time', align: 'center' }, { label: '学期开始时间', prop: 'start_time', align: 'center' },
{ label: ' 学期结束时间', prop: 'end_time', align: 'center' }, { label: ' 学期结束时间', prop: 'end_time', align: 'center' },
{ label: '教学周', prop: 'length', align: 'center' }, { label: '教学周', prop: 'length', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', minWidth: '200', fixed: 'right' } { label: '操作', slots: 'table-operate', align: 'center', width: 200, fixed: 'right' }
] ]
} }
}) })
......
...@@ -36,8 +36,8 @@ const listOptions = $computed(() => { ...@@ -36,8 +36,8 @@ const listOptions = $computed(() => {
{ label: '专业', prop: 'specialty_id_name', align: 'center' }, { label: '专业', prop: 'specialty_id_name', align: 'center' },
{ label: '入学年份', prop: 'start_year_name', align: 'center' }, { label: '入学年份', prop: 'start_year_name', align: 'center' },
{ label: '生效状态', slots: 'status', align: 'center' }, { label: '生效状态', slots: 'status', align: 'center' },
{ label: '更新时间', prop: 'updated_time', align: 'center' }, { label: '更新时间', prop: 'updated_time', align: 'center', width: 200 },
{ label: '操作', slots: 'table-operate', align: 'center', minWidth: '300', fixed: 'right' } { label: '操作', slots: 'table-operate', align: 'center', width: 300, fixed: 'right' }
] ]
} }
}) })
......
...@@ -25,8 +25,8 @@ const listOptions = $computed(() => { ...@@ -25,8 +25,8 @@ const listOptions = $computed(() => {
{ label: '学位门类', prop: 'degree_category_name', align: 'center' }, { label: '学位门类', prop: 'degree_category_name', align: 'center' },
{ label: '学位', prop: 'degree_name', align: 'center' }, { label: '学位', prop: 'degree_name', align: 'center' },
{ label: '生效状态', slots: 'status', align: 'center' }, { label: '生效状态', slots: 'status', align: 'center' },
{ label: '更新时间', prop: 'updated_time', align: 'center' }, { label: '更新时间', prop: 'updated_time', align: 'center', width: 200 },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', width: 200, fixed: 'right' }
] ]
} }
}) })
......
...@@ -31,7 +31,7 @@ const listOptions = $computed(() => { ...@@ -31,7 +31,7 @@ const listOptions = $computed(() => {
{ label: '教学周', prop: 'length', align: 'center' }, { label: '教学周', prop: 'length', align: 'center' },
{ label: '生效状态', slots: 'status', align: 'center' }, { label: '生效状态', slots: 'status', align: 'center' },
{ label: '更新时间', prop: 'updated_time', align: 'center' }, { label: '更新时间', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', width: 300, fixed: 'right' }
] ]
} }
}) })
......
...@@ -39,8 +39,8 @@ const listOptions = $computed(() => { ...@@ -39,8 +39,8 @@ const listOptions = $computed(() => {
{ label: '邮箱', prop: 'email', align: 'center', width: 200 }, { label: '邮箱', prop: 'email', align: 'center', width: 200 },
{ label: '角色类型', prop: 'role_name', align: 'center' }, { label: '角色类型', prop: 'role_name', align: 'center' },
{ label: '生效状态', slots: 'status', align: 'center' }, { label: '生效状态', slots: 'status', align: 'center' },
{ label: '更新时间', prop: 'updated_time', align: 'center' }, { label: '更新时间', prop: 'updated_time', align: 'center', width: 200 },
{ label: '操作', slots: 'table-operate', align: 'center', fixed: 'center' } { label: '操作', slots: 'table-operate', align: 'center', width: 200, fixed: 'right' }
] ]
} }
}) })
......
...@@ -49,7 +49,7 @@ const listOptions = computed(() => { ...@@ -49,7 +49,7 @@ const listOptions = computed(() => {
{ label: '是否可用', prop: 'status_name', align: 'center' }, { label: '是否可用', prop: 'status_name', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' }, { label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '编辑', prop: 'created_operator_name', align: 'center' }, { label: '编辑', prop: 'created_operator_name', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 300, align: 'center' } { label: '操作', slots: 'table-operate', width: 300, align: 'center', fixed: 'right' }
], ],
data: courseList.value data: courseList.value
} }
......
...@@ -36,7 +36,7 @@ const listOptions = $computed(() => { ...@@ -36,7 +36,7 @@ const listOptions = $computed(() => {
align: 'center' align: 'center'
}, },
{ label: '创建时间', prop: 'created_time', align: 'center' }, { label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' } { label: '操作', slots: 'table-operate', width: 230, align: 'center' , fixed: 'right'}
] ]
} }
}) })
......
...@@ -59,7 +59,7 @@ const listOptions = computed(() => { ...@@ -59,7 +59,7 @@ const listOptions = computed(() => {
}, },
{ label: '总分', prop: 'paper_total_score', align: 'center' }, { label: '总分', prop: 'paper_total_score', align: 'center' },
{ label: '及格分数', prop: 'pass_score', align: 'center' }, { label: '及格分数', prop: 'pass_score', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center' , fixed: 'right'}
] ]
} }
}) })
......
...@@ -17,7 +17,7 @@ const listOptions = computed(() => { ...@@ -17,7 +17,7 @@ const listOptions = computed(() => {
{ label: '头像', slots: 'table-avatar', align: 'center' }, { label: '头像', slots: 'table-avatar', align: 'center' },
{ label: '姓名', prop: 'name', align: 'center' }, { label: '姓名', prop: 'name', align: 'center' },
{ label: '简介', slots: 'table-summarize', align: 'center' }, { label: '简介', slots: 'table-summarize', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
], ],
data: props.modelValue data: props.modelValue
} }
......
...@@ -33,7 +33,7 @@ const listOptions = computed(() => { ...@@ -33,7 +33,7 @@ const listOptions = computed(() => {
return row.start_time ? dayjs(row.end_time * 1000).format('YYYY-MM-DD HH:mm:ss') : '-' return row.start_time ? dayjs(row.end_time * 1000).format('YYYY-MM-DD HH:mm:ss') : '-'
} }
}, },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
], ],
data: props.modelValue data: props.modelValue
} }
......
...@@ -43,7 +43,7 @@ const listOptions = computed(() => { ...@@ -43,7 +43,7 @@ const listOptions = computed(() => {
{ label: '更新人', prop: 'updated_operator_name', align: 'center' }, { label: '更新人', prop: 'updated_operator_name', align: 'center' },
{ label: '更新人部门', prop: 'organ_id_name', align: 'center' }, { label: '更新人部门', prop: 'organ_id_name', align: 'center' },
{ label: '更新日期', prop: 'updated_time', align: 'center' }, { label: '更新日期', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 200 } { label: '操作', slots: 'table-operate', align: 'center', width: 200 , fixed: 'right'}
] ]
if (tabValue.value === '2') { if (tabValue.value === '2') {
columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' }) columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' })
......
...@@ -127,7 +127,7 @@ const listOptions = computed(() => { ...@@ -127,7 +127,7 @@ const listOptions = computed(() => {
{ label: '总分', prop: 'paper_total_score', align: 'center' }, { label: '总分', prop: 'paper_total_score', align: 'center' },
{ label: '及格分数', prop: 'pass_score', align: 'center' }, { label: '及格分数', prop: 'pass_score', align: 'center' },
{ label: '更新时间', prop: 'updated_at', align: 'center' }, { label: '更新时间', prop: 'updated_at', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center' , fixed: 'right'}
], ],
data: resourceData.exam data: resourceData.exam
} }
...@@ -199,7 +199,7 @@ const liveOptions = computed(() => { ...@@ -199,7 +199,7 @@ const liveOptions = computed(() => {
return format(parseInt(row.end_time) * 1000) return format(parseInt(row.end_time) * 1000)
} }
}, },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
], ],
data: resourceData.live data: resourceData.live
} }
......
...@@ -54,7 +54,7 @@ const listOptions = $computed(() => { ...@@ -54,7 +54,7 @@ const listOptions = $computed(() => {
{ label: '更新人', prop: 'updated_operator_name', align: 'center' }, { label: '更新人', prop: 'updated_operator_name', align: 'center' },
{ label: '更新人部门', prop: 'organ_id_name', align: 'center' }, { label: '更新人部门', prop: 'organ_id_name', align: 'center' },
{ label: '更新日期', prop: 'updated_time', align: 'center' }, { label: '更新日期', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 200 } { label: '操作', slots: 'table-operate', align: 'center', width: 200 , fixed: 'right'}
] ]
if (tabValue.value === '2') { if (tabValue.value === '2') {
columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' }) columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' })
......
...@@ -19,7 +19,7 @@ const listOptions = { ...@@ -19,7 +19,7 @@ const listOptions = {
{ label: '资源类型', slots: 'table-type', align: 'center' }, { label: '资源类型', slots: 'table-type', align: 'center' },
{ label: '所在部门', prop: 'organ_id_name', align: 'center' }, { label: '所在部门', prop: 'organ_id_name', align: 'center' },
{ label: '更新人', prop: 'created_operator_name', align: 'center' }, { label: '更新人', prop: 'created_operator_name', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center' , fixed: 'right'}
], ],
data: prop.data.map((item: any) => { data: prop.data.map((item: any) => {
item.name = `${item.name.slice(0, 10)}...` item.name = `${item.name.slice(0, 10)}...`
......
...@@ -18,7 +18,7 @@ const listOptions = { ...@@ -18,7 +18,7 @@ const listOptions = {
{ label: '所在部门', prop: 'organ_id_name', align: 'center' }, { label: '所在部门', prop: 'organ_id_name', align: 'center' },
{ label: '更新人', prop: 'created_operator_name', align: 'center' }, { label: '更新人', prop: 'created_operator_name', align: 'center' },
{ label: '更新时间', prop: 'updated_time', align: 'center' }, { label: '更新时间', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
], ],
data: prop.data.map((item: any) => { data: prop.data.map((item: any) => {
item.name = item.name.length > 10 ? `${item.name.slice(0, 10)}...` : item.name item.name = item.name.length > 10 ? `${item.name.slice(0, 10)}...` : item.name
......
...@@ -19,7 +19,7 @@ const listOptions = { ...@@ -19,7 +19,7 @@ const listOptions = {
{ label: '所在部门', prop: 'organ_id_name', align: 'center' }, { label: '所在部门', prop: 'organ_id_name', align: 'center' },
{ label: '更新人', prop: 'created_operator_name', align: 'center' }, { label: '更新人', prop: 'created_operator_name', align: 'center' },
{ label: '更新时间', prop: 'updated_time', align: 'center' }, { label: '更新时间', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
], ],
data: prop.data.map((item: any) => { data: prop.data.map((item: any) => {
item.name = `${item.name.slice(0, 10)}...` item.name = `${item.name.slice(0, 10)}...`
......
...@@ -54,7 +54,7 @@ const listOptions = $computed(() => { ...@@ -54,7 +54,7 @@ const listOptions = $computed(() => {
{ label: '更新人', prop: 'updated_operator_name', align: 'center' }, { label: '更新人', prop: 'updated_operator_name', align: 'center' },
{ label: '更新人部门', prop: 'organ_id_name', align: 'center' }, { label: '更新人部门', prop: 'organ_id_name', align: 'center' },
{ label: '更新日期', prop: 'updated_time', align: 'center' }, { label: '更新日期', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 200 } { label: '操作', slots: 'table-operate', align: 'center', width: 200 , fixed: 'right'}
] ]
if (tabValue.value === '2') { if (tabValue.value === '2') {
columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' }) columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' })
......
...@@ -55,7 +55,7 @@ const listOptions = $computed(() => { ...@@ -55,7 +55,7 @@ const listOptions = $computed(() => {
{ label: '更新人', prop: 'updated_operator_name', align: 'center' }, { label: '更新人', prop: 'updated_operator_name', align: 'center' },
{ label: '更新人部门', prop: 'organ_id_name', align: 'center' }, { label: '更新人部门', prop: 'organ_id_name', align: 'center' },
{ label: '更新日期', prop: 'updated_time', align: 'center' }, { label: '更新日期', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 200 } { label: '操作', slots: 'table-operate', align: 'center', width: 200, fixed: 'right' }
] ]
if (tabValue.value === '2') { if (tabValue.value === '2') {
columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' }) columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' })
......
...@@ -29,7 +29,7 @@ const listOptions = $computed(() => { ...@@ -29,7 +29,7 @@ const listOptions = $computed(() => {
{ label: '课程图片', slots: 'table-cover', align: 'center' }, { label: '课程图片', slots: 'table-cover', align: 'center' },
{ label: '文件名', prop: 'name', align: 'center' }, { label: '文件名', prop: 'name', align: 'center' },
{ label: '时码', prop: 'point', align: 'center' }, { label: '时码', prop: 'point', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
], ],
data: videoPpt data: videoPpt
} }
...@@ -70,7 +70,7 @@ const uploadList = $computed(() => { ...@@ -70,7 +70,7 @@ const uploadList = $computed(() => {
{ label: '课程图片', slots: 'table-cover', align: 'center' }, { label: '课程图片', slots: 'table-cover', align: 'center' },
{ label: '文件名', prop: 'name', align: 'center' }, { label: '文件名', prop: 'name', align: 'center' },
{ label: '时码', slots: 'table-input', align: 'center' }, { label: '时码', slots: 'table-input', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
], ],
data: coverList data: coverList
} }
......
...@@ -52,7 +52,7 @@ const listOptions = $computed(() => { ...@@ -52,7 +52,7 @@ const listOptions = $computed(() => {
{ label: '更新人', prop: 'updated_operator_name', align: 'center' }, { label: '更新人', prop: 'updated_operator_name', align: 'center' },
{ label: '更新人部门', prop: 'organ_id_name', align: 'center' }, { label: '更新人部门', prop: 'organ_id_name', align: 'center' },
{ label: '更新日期', prop: 'updated_time', align: 'center' }, { label: '更新日期', prop: 'updated_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 200 } { label: '操作', slots: 'table-operate', align: 'center', width: 200, fixed: 'right' }
] ]
if (tabValue.value === '2') { if (tabValue.value === '2') {
columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' }) columns.splice(2, 0, { label: '部门共享', prop: 'department_public_name', align: 'center' })
......
...@@ -40,7 +40,7 @@ const listOptions = $computed(() => { ...@@ -40,7 +40,7 @@ const listOptions = $computed(() => {
align: 'center' align: 'center'
}, },
{ label: '创建时间', prop: 'created_time', align: 'center' }, { label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' } { label: '操作', slots: 'table-operate', width: 230, align: 'center', fixed: 'right' }
] ]
} }
}) })
......
...@@ -53,7 +53,7 @@ const listOptions = $computed(() => { ...@@ -53,7 +53,7 @@ const listOptions = $computed(() => {
}, },
{ label: '备注 ', prop: 'remark', align: 'center' }, { label: '备注 ', prop: 'remark', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' }, { label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', width: 300 } { label: '操作', slots: 'table-operate', align: 'center', width: 300, fixed: 'right' }
] ]
} }
}) })
......
...@@ -27,7 +27,7 @@ const listOptions = { ...@@ -27,7 +27,7 @@ const listOptions = {
}, },
{ label: '备注 ', prop: 'remark', align: 'center' }, { label: '备注 ', prop: 'remark', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' }, { label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center', minWidth: 180 } { label: '操作', slots: 'table-operate', align: 'center', minWidth: '180', fixed: 'right' }
] ]
} }
const handleAdd = () => { const handleAdd = () => {
......
...@@ -50,7 +50,7 @@ const listOptions = $computed(() => { ...@@ -50,7 +50,7 @@ const listOptions = $computed(() => {
{ label: '处理人', prop: 'operator_name', align: 'center' }, { label: '处理人', prop: 'operator_name', align: 'center' },
{ label: '处理时间', prop: 'updated_time', align: 'center' }, { label: '处理时间', prop: 'updated_time', align: 'center' },
{ label: '处理状态', prop: 'status_name', align: 'center' }, { label: '处理状态', prop: 'status_name', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', width: 200, fixed: 'right' }
] ]
} }
}) })
......
...@@ -40,7 +40,7 @@ const listOptions = $computed(() => { ...@@ -40,7 +40,7 @@ const listOptions = $computed(() => {
{ label: '试卷名称', prop: 'paper_name', align: 'center', minWidth: '150' }, { label: '试卷名称', prop: 'paper_name', align: 'center', minWidth: '150' },
{ label: '总分', prop: 'paper_total_score', align: 'center' }, { label: '总分', prop: 'paper_total_score', align: 'center' },
{ label: '及格分数', prop: 'pass_score', align: 'center' }, { label: '及格分数', prop: 'pass_score', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', minWidth: '100' , fixed: 'right'}
] ]
} }
}) })
......
...@@ -59,8 +59,8 @@ const listOptions = $computed(() => { ...@@ -59,8 +59,8 @@ const listOptions = $computed(() => {
{ label: '试卷名称', prop: 'paper_name', align: 'center' }, { label: '试卷名称', prop: 'paper_name', align: 'center' },
{ label: '得分', prop: 'score', align: 'center' }, { label: '得分', prop: 'score', align: 'center' },
{ label: '是否批改', prop: 'status_name', align: 'center' }, { label: '是否批改', prop: 'status_name', align: 'center' },
{ label: '更新时间', prop: 'updated_at', align: 'center' }, { label: '更新时间', prop: 'updated_at', align: 'center', width: 200 },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', width: 200, fixed: 'right' }
] ]
} }
}) })
......
...@@ -21,7 +21,7 @@ const listOptions = $computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = $computed(() => {
{ label: '问题标题', prop: 'name', align: 'center' }, { label: '问题标题', prop: 'name', align: 'center' },
{ label: '是否回复', prop: 'name', align: 'center' }, { label: '是否回复', prop: 'name', align: 'center' },
{ label: '更新时间', prop: 'update_time', align: 'center' }, { label: '更新时间', prop: 'update_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
] ]
} }
}) })
......
...@@ -51,20 +51,16 @@ const handleConfirm = async (formEl: FormInstance | undefined) => { ...@@ -51,20 +51,16 @@ const handleConfirm = async (formEl: FormInstance | undefined) => {
} }
}) })
} }
onMounted(() => { // 获取大作业详情
handleGetWorkDetail() getWorkDetail({ id: props.id }).then(res => {
}) Object.keys(form).forEach(key => {
const handleGetWorkDetail = () => { form[key] = res.data[key]
getWorkDetail({ id: props.id }).then(res => {
Object.keys(form).forEach(key => {
form[key] = res.data[key]
})
form.attachments = JSON.parse(form.attachments)
if (form.score === '0.00') {
form.score = ''
}
}) })
} if (form.score === '0.00') {
form.score = ''
}
form.attachments = JSON.parse(form.attachments)
})
</script> </script>
<template> <template>
<el-dialog :model-value="isShowCheckDialog" draggable :before-close="handleCancel" width="40%" title="批改大作业"> <el-dialog :model-value="isShowCheckDialog" draggable :before-close="handleCancel" width="40%" title="批改大作业">
......
...@@ -83,14 +83,14 @@ const listOptions = $computed(() => { ...@@ -83,14 +83,14 @@ const listOptions = $computed(() => {
prop: 'score', prop: 'score',
align: 'center', align: 'center',
computed(row: any) { computed(row: any) {
if (row.row.score === '0.00') { if (row.row.score === '0.00' || row.row.score === null) {
return '-' return '-'
} else { } else if (row.row.score > '0.00') {
return row.row.score return row.row.score
} }
} }
}, },
{ label: '操作', slots: 'table-operate', align: 'center' } { label: '操作', slots: 'table-operate', align: 'center', fixed: 'right' }
] ]
} }
}) })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论