|
|
@ -4,20 +4,29 @@ |
|
|
|
<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.modelId"> |
|
|
|
<el-radio-group v-model="queryParams.modelId" @change="changeCarType"> |
|
|
|
<el-radio label="10001" value="10001">多旋翼</el-radio> |
|
|
|
<el-radio |
|
|
|
<el-radio label="10002" value="10002">垂直起降固定翼</el-radio> |
|
|
|
v-for="item in cartypeOptions" |
|
|
|
<el-radio label="10003" value="10003">直升机</el-radio> |
|
|
|
:key="item.modelId" |
|
|
|
<el-radio label="10004" value="10004">固定翼</el-radio> |
|
|
|
:label="item.modelId" |
|
|
|
|
|
|
|
:value="item.modelId" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ item.modelName }} |
|
|
|
|
|
|
|
</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</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.typeId"> |
|
|
|
<el-radio-group v-model="queryParams.typeId"> |
|
|
|
<el-radio label="20001" value="20001">视距内驾驶员</el-radio> |
|
|
|
<el-radio |
|
|
|
<el-radio label="20002" value="20002">超视距驾驶员</el-radio> |
|
|
|
v-for="item in driverOptions" |
|
|
|
<el-radio label="20003" value="20003">教员</el-radio> |
|
|
|
:key="item.typeId" |
|
|
|
|
|
|
|
:label="item.typeId" |
|
|
|
|
|
|
|
:value="item.typeId" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{{ item.typeName }} |
|
|
|
|
|
|
|
</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
@ -50,6 +59,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" @click="handleQuery"> 搜索 </el-button> |
|
|
|
<el-button type="primary" @click="handleQuery"> 搜索 </el-button> |
|
|
|
|
|
|
|
<el-button plain @click="reset"> 重置 </el-button> |
|
|
|
<el-button type="primary" @click="handleAdd" v-hasPermi="['Question:UAV:add']"> |
|
|
|
<el-button type="primary" @click="handleAdd" v-hasPermi="['Question:UAV:add']"> |
|
|
|
新增 |
|
|
|
新增 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
@ -61,9 +71,9 @@ |
|
|
|
v-loading="loading" |
|
|
|
v-loading="loading" |
|
|
|
:data="tableList" |
|
|
|
:data="tableList" |
|
|
|
highlight-current-row |
|
|
|
highlight-current-row |
|
|
|
max-height="calc(100vh - 320px)" |
|
|
|
max-height="calc(100vh - 260px)" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-table-column type="index" width="55" align="center" /> |
|
|
|
<el-table-column label="序号" width="60" prop="showOrder" /> |
|
|
|
<el-table-column label="题目" align="left" prop="question" min-width="140" /> |
|
|
|
<el-table-column label="题目" align="left" prop="question" min-width="140" /> |
|
|
|
<el-table-column label="选项" align="left" min-width="140"> |
|
|
|
<el-table-column label="选项" align="left" min-width="140"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
@ -137,7 +147,12 @@ |
|
|
|
<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 { searchChapter } from '@/api/uav/chapter' |
|
|
|
import { searchQuestion, deleteQuestion } from '@/api/uav/question.js' |
|
|
|
import { |
|
|
|
|
|
|
|
searchQuestion, |
|
|
|
|
|
|
|
deleteQuestion, |
|
|
|
|
|
|
|
getCarTypeOptions, |
|
|
|
|
|
|
|
getDriverTypeOptions |
|
|
|
|
|
|
|
} from '@/api/uav/question.js' |
|
|
|
|
|
|
|
|
|
|
|
const message = useMessage() |
|
|
|
const message = useMessage() |
|
|
|
|
|
|
|
|
|
|
@ -145,7 +160,7 @@ const loading = ref(false) |
|
|
|
const total = ref(0) |
|
|
|
const total = ref(0) |
|
|
|
const tableList = ref([]) |
|
|
|
const tableList = ref([]) |
|
|
|
const queryParams = ref({ |
|
|
|
const queryParams = ref({ |
|
|
|
question: '', |
|
|
|
question: undefined, |
|
|
|
modelId: undefined, |
|
|
|
modelId: undefined, |
|
|
|
typeId: undefined, |
|
|
|
typeId: undefined, |
|
|
|
isPic: undefined, |
|
|
|
isPic: undefined, |
|
|
@ -154,10 +169,41 @@ const queryParams = ref({ |
|
|
|
pageSize: 100 |
|
|
|
pageSize: 100 |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const cartypeOptions = ref([]) |
|
|
|
|
|
|
|
const driverOptions = ref([]) |
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
onMounted(() => { |
|
|
|
getQuestionChapter() |
|
|
|
getQuestionChapter() |
|
|
|
|
|
|
|
getCarTypeOptions().then((res) => { |
|
|
|
|
|
|
|
cartypeOptions.value = res |
|
|
|
|
|
|
|
if (res.length) { |
|
|
|
|
|
|
|
queryParams.value.modelId = res[0].modelId |
|
|
|
|
|
|
|
changeCarType() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function changeCarType() { |
|
|
|
|
|
|
|
getDriverTypeOptions({ modelId: queryParams.value.modelId }).then((res) => { |
|
|
|
|
|
|
|
driverOptions.value = res |
|
|
|
|
|
|
|
if (res.length) { |
|
|
|
|
|
|
|
queryParams.value.typeId = res[0].typeId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function reset() { |
|
|
|
|
|
|
|
queryParams.value = { |
|
|
|
|
|
|
|
question: undefined, |
|
|
|
|
|
|
|
modelId: undefined, |
|
|
|
|
|
|
|
typeId: undefined, |
|
|
|
|
|
|
|
isPic: undefined, |
|
|
|
|
|
|
|
chapter: undefined, |
|
|
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
|
|
pageSize: 100 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const chapterOptions = ref([]) |
|
|
|
const chapterOptions = ref([]) |
|
|
|
const getQuestionChapter = () => { |
|
|
|
const getQuestionChapter = () => { |
|
|
|
searchChapter().then((res) => { |
|
|
|
searchChapter().then((res) => { |
|
|
@ -187,7 +233,7 @@ function handleQuery() { |
|
|
|
|
|
|
|
|
|
|
|
const dialogAddForm = ref(null) |
|
|
|
const dialogAddForm = ref(null) |
|
|
|
function handleEdit(item) { |
|
|
|
function handleEdit(item) { |
|
|
|
dialogAddForm.value.open(item, chapterOptions.value) |
|
|
|
dialogAddForm.value.open({ ...item, chapter: Number(item.chapter) }, chapterOptions.value) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleAdd() { |
|
|
|
function handleAdd() { |
|
|
|