|
|
@ -4,7 +4,7 @@ |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12" :offset="0"> |
|
|
|
<el-col :span="12" :offset="0"> |
|
|
|
<el-form-item label="无人机类型"> |
|
|
|
<el-form-item label="无人机类型"> |
|
|
|
<el-radio-group v-model="queryParams.carTypeId" @change="getQuestionChapter"> |
|
|
|
<el-radio-group v-model="queryParams.modelId"> |
|
|
|
<el-radio label="10001" value="10001">多旋翼</el-radio> |
|
|
|
<el-radio label="10001" value="10001">多旋翼</el-radio> |
|
|
|
<el-radio label="10002" value="10002">垂直起降固定翼</el-radio> |
|
|
|
<el-radio label="10002" value="10002">垂直起降固定翼</el-radio> |
|
|
|
<el-radio label="10003" value="10003">直升机</el-radio> |
|
|
|
<el-radio label="10003" value="10003">直升机</el-radio> |
|
|
@ -14,23 +14,17 @@ |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" :offset="0"> |
|
|
|
<el-col :span="12" :offset="0"> |
|
|
|
<el-form-item label="驾驶员类型"> |
|
|
|
<el-form-item label="驾驶员类型"> |
|
|
|
<el-radio-group v-model="queryParams.driveType" @change="getQuestionChapter"> |
|
|
|
<el-radio-group v-model="queryParams.typeId"> |
|
|
|
<el-radio label="1" value="1">视距内驾驶员</el-radio> |
|
|
|
<el-radio label="20001" value="20001">视距内驾驶员</el-radio> |
|
|
|
<el-radio label="2" value="2">超视距驾驶员</el-radio> |
|
|
|
<el-radio label="20002" value="20002">超视距驾驶员</el-radio> |
|
|
|
<el-radio label="3" value="3">教员</el-radio> |
|
|
|
<el-radio label="20003" value="20003">教员</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-form-item label="章节"> |
|
|
|
<el-form-item label="章节"> |
|
|
|
<el-select |
|
|
|
<el-select v-model="queryParams.chapter" placeholder="选择章节" clearable filterable> |
|
|
|
v-model="queryParams.chapterId" |
|
|
|
|
|
|
|
@change="getList" |
|
|
|
|
|
|
|
placeholder="选择章节" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
filterable |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in chapterOptions" |
|
|
|
v-for="item in chapterOptions" |
|
|
|
:key="item.chapterId" |
|
|
|
:key="item.chapterId" |
|
|
@ -79,13 +73,13 @@ |
|
|
|
<p v-if="row.chooseD">D:{{ row.chooseD }}</p> |
|
|
|
<p v-if="row.chooseD">D:{{ row.chooseD }}</p> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="答案" align="center" prop="trueAnswer" width="100" /> |
|
|
|
<el-table-column label="正确答案" align="center" prop="trueAnswer" width="100" /> |
|
|
|
<el-table-column label="科目" align="center" prop="subject" width="100"> |
|
|
|
<!-- <el-table-column label="科目" align="center" prop="subject" width="100"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<span v-if="row.subject == '1'">科一</span> |
|
|
|
<span v-if="row.subject == '1'">科一</span> |
|
|
|
<span v-if="row.subject == '4'">科四</span> |
|
|
|
<span v-if="row.subject == '4'">科四</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column label="章节" align="center" prop="chapterName" min-width="100" /> |
|
|
|
<el-table-column label="章节" align="center" prop="chapterName" min-width="100" /> |
|
|
|
<el-table-column label="图片" align="center" width="100"> |
|
|
|
<el-table-column label="图片" align="center" width="100"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
@ -142,6 +136,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script setup name="UAV"> |
|
|
|
<script setup name="UAV"> |
|
|
|
import QuestionAddForm from './components/QuestionAddForm.vue' |
|
|
|
import QuestionAddForm from './components/QuestionAddForm.vue' |
|
|
|
|
|
|
|
import { searchChapter } from '@/api/uav/chapter' |
|
|
|
|
|
|
|
import { searchQuestion, deleteQuestion } from '@/api/uav/question.js' |
|
|
|
|
|
|
|
|
|
|
|
const message = useMessage() |
|
|
|
const message = useMessage() |
|
|
|
|
|
|
|
|
|
|
@ -150,10 +146,10 @@ const total = ref(0) |
|
|
|
const tableList = ref([]) |
|
|
|
const tableList = ref([]) |
|
|
|
const queryParams = ref({ |
|
|
|
const queryParams = ref({ |
|
|
|
question: '', |
|
|
|
question: '', |
|
|
|
carTypeId: '10001', |
|
|
|
modelId: undefined, |
|
|
|
driveType: '1', |
|
|
|
typeId: undefined, |
|
|
|
isPic: undefined, |
|
|
|
isPic: undefined, |
|
|
|
chapterId: undefined, |
|
|
|
chapter: undefined, |
|
|
|
pageNo: 1, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100 |
|
|
|
pageSize: 100 |
|
|
|
}) |
|
|
|
}) |
|
|
@ -164,14 +160,9 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
|
|
|
const chapterOptions = ref([]) |
|
|
|
const chapterOptions = ref([]) |
|
|
|
const getQuestionChapter = () => { |
|
|
|
const getQuestionChapter = () => { |
|
|
|
chapterOptions.value = [ |
|
|
|
searchChapter().then((res) => { |
|
|
|
{ chapterId: '1', chapterName: '概述' }, |
|
|
|
chapterOptions.value = res |
|
|
|
{ chapterId: '2', chapterName: '无人机基础知识' }, |
|
|
|
}) |
|
|
|
{ chapterId: '3', chapterName: '飞行原理' }, |
|
|
|
|
|
|
|
{ chapterId: '4', chapterName: '飞行技术' }, |
|
|
|
|
|
|
|
{ chapterId: '5', chapterName: '飞行安全' }, |
|
|
|
|
|
|
|
{ chapterId: '6', chapterName: '飞行技能' } |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getShowImg(row) { |
|
|
|
function getShowImg(row) { |
|
|
@ -181,40 +172,12 @@ function getShowImg(row) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getList() { |
|
|
|
function getList() { |
|
|
|
// loading.value = true |
|
|
|
loading.value = true |
|
|
|
tableList.value = [ |
|
|
|
searchQuestion(queryParams.value).then((response) => { |
|
|
|
{ |
|
|
|
tableList.value = response.list |
|
|
|
question: '近程无人机活动半径在', |
|
|
|
total.value = response.total |
|
|
|
chooseA: '小于15km', |
|
|
|
loading.value = false |
|
|
|
chooseB: '15-50km', |
|
|
|
}) |
|
|
|
chooseC: '200-800km', |
|
|
|
|
|
|
|
chooseD: '', |
|
|
|
|
|
|
|
trueAnswer: 'B', |
|
|
|
|
|
|
|
chapterId: '1', |
|
|
|
|
|
|
|
chapterName: '概述', |
|
|
|
|
|
|
|
isActive: 1, |
|
|
|
|
|
|
|
questionId: '1', |
|
|
|
|
|
|
|
createTime: '2023-05-05 09:05:05' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
question: '无人机驾驶员考试科目一的考试内容包括', |
|
|
|
|
|
|
|
chooseA: '无人机基础知识', |
|
|
|
|
|
|
|
chooseB: '航空法规', |
|
|
|
|
|
|
|
chooseC: '气象学', |
|
|
|
|
|
|
|
chooseD: '飞行原理', |
|
|
|
|
|
|
|
trueAnswer: 'A', |
|
|
|
|
|
|
|
chapterId: '2', |
|
|
|
|
|
|
|
chapterName: '无人机基础知识', |
|
|
|
|
|
|
|
isActive: 1, |
|
|
|
|
|
|
|
questionId: '2', |
|
|
|
|
|
|
|
createTime: '2023-05-05 09:05:05' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
// searchQuestion(queryParams.value).then((response) => { |
|
|
|
|
|
|
|
// tableList.value = response.list |
|
|
|
|
|
|
|
// total.value = response.total |
|
|
|
|
|
|
|
// loading.value = false |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleQuery() { |
|
|
|
function handleQuery() { |
|
|
@ -230,9 +193,7 @@ function handleEdit(item) { |
|
|
|
function handleAdd() { |
|
|
|
function handleAdd() { |
|
|
|
dialogAddForm.value.open( |
|
|
|
dialogAddForm.value.open( |
|
|
|
{ |
|
|
|
{ |
|
|
|
driveTypeName: '视距内驾驶员', |
|
|
|
chapter: queryParams.value.chapter |
|
|
|
carTypeName: '多旋翼', |
|
|
|
|
|
|
|
chapter: queryParams.value.chapterId |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
chapterOptions.value |
|
|
|
chapterOptions.value |
|
|
|
) |
|
|
|
) |
|
|
@ -242,12 +203,10 @@ function handleDelete(row) { |
|
|
|
message |
|
|
|
message |
|
|
|
.confirm('是否确认删除该题?') |
|
|
|
.confirm('是否确认删除该题?') |
|
|
|
.then(function () { |
|
|
|
.then(function () { |
|
|
|
console.log(row) |
|
|
|
deleteQuestion(row.questionId).then(() => { |
|
|
|
|
|
|
|
getList() |
|
|
|
// deleteQuestion(row.questionId).then(() => { |
|
|
|
|
|
|
|
// getList() |
|
|
|
|
|
|
|
message.success('删除题目成功') |
|
|
|
message.success('删除题目成功') |
|
|
|
// }) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
.catch((err) => { |
|
|
|
console.log(err) |
|
|
|
console.log(err) |
|
|
|