diff --git a/test_client/src/views/exam/issue.vue b/test_client/src/views/exam/issue.vue index 8aa4d24..c6784db 100644 --- a/test_client/src/views/exam/issue.vue +++ b/test_client/src/views/exam/issue.vue @@ -48,7 +48,7 @@ - + @@ -259,7 +259,7 @@ import Pagination from '@/components/Pagination' const listQuery = { page: 1, limit: 20, - search: '' + ordering: 'opllevel' } export default { components: { Pagination }, @@ -281,13 +281,12 @@ export default { number: [{ required: true, message: '请输入编号', trigger: 'blur' }] }, typeOption:[ - { name: '初级工', value: '初级工' }, - { name: '中级工', value: '中级工'}, - { name: '高级工', value: '高级工' }, - { name: '技师', value: '技师'}, - { name: '高级技师', value: '高级技师' } + { name: '初级工', value: 2 }, + { name: '中级工', value: 1}, + { name: '高级工', value: 0}, + { name: '技师', value: 4}, + { name: '高级技师', value: 3 } ], - } }, computed: {}, @@ -299,6 +298,13 @@ export default { handleAvatarSuccess(res, file) { this.candidate.photo = res.data.path }, + getOpllevelName(value) { + console.log(value, 'value') + const numValue = Number(value) + const item = this.typeOption.find((item) => item.value === numValue); + console.log(item, 'item-name') + return item ? item.name : ''; + }, beforeAvatarUpload(file) { const isLt2M = file.size / 1024 / 1024 < 2 if (!isLt2M) { diff --git a/test_client/src/views/material/material.vue b/test_client/src/views/material/material.vue index 281ee6d..1c43c14 100644 --- a/test_client/src/views/material/material.vue +++ b/test_client/src/views/material/material.vue @@ -1,6 +1,6 @@