Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cacb84fd5f | |||
|
|
c70b530362 | ||
|
|
ef625e3dc1 | ||
|
|
cdf810507c | ||
|
|
d7c155ba8e | ||
|
|
cbaaec207b | ||
|
|
119aab5e3f | ||
|
|
e40cf44f84 | ||
|
|
1a3bfe93d2 | ||
| 0382424440 | |||
| 479a0d5580 | |||
| 7e04aface2 | |||
| 4d9aebc9e3 | |||
| 996288c808 | |||
| 29cf5bbeaf | |||
| 64c0728c34 |
@@ -4,14 +4,14 @@ VITE_NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
# VITE_BASE_URL='http://localhost:48080'
|
||||
VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
VITE_BASE_URL='http://47.98.161.246:48080'
|
||||
# VITE_BASE_URL='http://114.55.169.15:48080'
|
||||
# VITE_BASE_URL='http://114.215.207.150:48080'
|
||||
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload'
|
||||
# VITE_UPLOAD_URL='http://114.55.169.15:48080/admin-api/system/file/upload'
|
||||
|
||||
# 接口前缀
|
||||
|
||||
28
src/api/uav/chapter.js
Normal file
28
src/api/uav/chapter.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import request from '@/config/axios'
|
||||
export const searchChapter = async (param) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/wrj/chapter/list',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
export const updateChapter = async (data) => {
|
||||
return await request.put({
|
||||
url: '/admin-api/applet/wrj/chapter/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const addChapter = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/wrj/chapter/add',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
export const deleteChapter = async (id) => {
|
||||
return await request.delete({
|
||||
url: `/admin-api/applet/wrj/chapter/delete?id=${id}`
|
||||
})
|
||||
}
|
||||
51
src/api/uav/question.js
Normal file
51
src/api/uav/question.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import request from '@/config/axios'
|
||||
export const searchQuestion = async (param) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/wrj/question/list',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
export const updateQuestion = async (data) => {
|
||||
return await request.put({
|
||||
url: '/admin-api/applet/wrj/question/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const addQuestion = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/wrj/question/add',
|
||||
data: data,
|
||||
isSubmitForm: true
|
||||
})
|
||||
}
|
||||
|
||||
export const deleteQuestion = async (id) => {
|
||||
return await request.delete({
|
||||
url: `/admin-api/applet/wrj/question/delete?id=${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export const uploadFile = async (data) => {
|
||||
return await request.post({
|
||||
url: '/admin-api/applet/wrj/question/upload',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询无人机类型列表
|
||||
export const getCarTypeOptions = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/wrj/model/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询驾驶员类型列表
|
||||
export const getDriverTypeOptions = async (params) => {
|
||||
return await request.get({
|
||||
url: '/admin-api/applet/wrj/type/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -218,7 +218,7 @@ service.interceptors.response.use(
|
||||
resetRouter() // 重置静态路由表
|
||||
cache.local.clear()
|
||||
removeToken()
|
||||
window.location.href = `/login?tenantId=${tenantId}&appId=${appId}`
|
||||
window.location.href = `/tiku/login?tenantId=${tenantId}&appId=${appId}`
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -266,7 +266,7 @@ const handleAuthorized = () => {
|
||||
isRelogin.show = false
|
||||
// 干掉token后再走一次路由让它过router.beforeEach的校验
|
||||
// window.location.href = window.location.href
|
||||
window.location.href = `/login?tenantId=${tenantId}&appId=${appId}`
|
||||
window.location.href = `/tiku/login?tenantId=${tenantId}&appId=${appId}`
|
||||
})
|
||||
}
|
||||
return Promise.reject(t('sys.api.timeoutMessage'))
|
||||
|
||||
7
src/views/ExamVenue/Calendar/index.vue
Normal file
7
src/views/ExamVenue/Calendar/index.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div> 考试日历 </div>
|
||||
</template>
|
||||
|
||||
<script setup name="Calendar"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
13
src/views/ExamVenue/Room/index.vue
Normal file
13
src/views/ExamVenue/Room/index.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>无人机章节</div>
|
||||
<div>权限:</div>
|
||||
<div>新增:ExamVenue:Room:add</div>
|
||||
<div>修改:ExamVenue:Room:edit</div>
|
||||
<div>删除:ExamVenue:Room:delete</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ExamVenue"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
11
src/views/JoinUs/Coach/index.vue
Normal file
11
src/views/JoinUs/Coach/index.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>教员入驻</div>
|
||||
<div>权限:</div>
|
||||
<div>审核:JoinUs:Coach:audit</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Coach"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
11
src/views/JoinUs/Station/index.vue
Normal file
11
src/views/JoinUs/Station/index.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>机构入驻</div>
|
||||
<div>权限:</div>
|
||||
<div>审核:JoinUs:Station:audit</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Station"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -58,7 +58,7 @@
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
highlight-current-row
|
||||
max-height="calc(100vh - 260px)"
|
||||
max-height="calc(100vh - 320px)"
|
||||
>
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="题目" align="left" prop="question" min-width="140" />
|
||||
@@ -71,12 +71,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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 }">
|
||||
<span v-if="row.subject == '1'">科一</span>
|
||||
<span v-if="row.subject == '4'">科四</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="章节" align="center" prop="chapterName" min-width="100" />
|
||||
<el-table-column label="图片" align="center" width="100">
|
||||
<template #default="{ row }">
|
||||
@@ -85,17 +85,17 @@
|
||||
:src="getShowImg(row)"
|
||||
:preview-src-list="[getShowImg(row)]"
|
||||
:lazy="true"
|
||||
style="width: 80px"
|
||||
style="width: 90px"
|
||||
preview-teleported
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="100">
|
||||
<!-- <el-table-column label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.isActive == 0" type="success">使用中</el-tag>
|
||||
<el-tag v-else type="danger">已删除</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template #default="scope">
|
||||
@@ -110,7 +110,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleDelete(scope.row.id)"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['question:database:remove']"
|
||||
>
|
||||
删除
|
||||
@@ -120,6 +120,7 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
style="margin-bottom: 0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
@@ -137,6 +138,8 @@
|
||||
import { searchQuestion, deleteQuestion, getQuestionSort } from '@/api/xjapplet/xjdatabase'
|
||||
import QuestionAddForm from './components/QuestionAddForm.vue'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const loading = ref(false)
|
||||
const total = ref(0)
|
||||
const tableList = ref([])
|
||||
@@ -177,7 +180,9 @@ const getQuestionChapter = () => {
|
||||
}
|
||||
|
||||
function getShowImg(row) {
|
||||
return row.imageUrl.includes('http') ? row.imageUrl : `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
|
||||
return row.imageUrl.includes('http')
|
||||
? row.imageUrl
|
||||
: `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
|
||||
}
|
||||
|
||||
function getList() {
|
||||
@@ -213,15 +218,14 @@ function handleDelete(row) {
|
||||
message
|
||||
.confirm('是否确认删除该题?')
|
||||
.then(function () {
|
||||
deleteQuestion(row.id, row.source).then(() => {
|
||||
deleteQuestion(row.questionId, row.source).then(() => {
|
||||
getList()
|
||||
})
|
||||
})
|
||||
.then(() => {
|
||||
getQuestionList()
|
||||
message.success('删除题目成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
function handleChangeSource() {
|
||||
|
||||
34
src/views/Question/Setting/Components/SelectSource.vue
Normal file
34
src/views/Question/Setting/Components/SelectSource.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col
|
||||
:xs="24"
|
||||
:sm="12"
|
||||
:md="6"
|
||||
:lg="6"
|
||||
:xl="6"
|
||||
v-for="(item, index) in appSource"
|
||||
:key="index"
|
||||
style="display: flex; align-items: center; border: 1px solid #eee; padding: 10px"
|
||||
>
|
||||
<span style="width: 120px">{{ item.name }}</span>
|
||||
<el-select v-model="item.value" placeholder="请选择" class="flex-1">
|
||||
<el-option label="驾考精灵" value="1" />
|
||||
<el-option label="驾考宝典" value="2" />
|
||||
<el-option label="驾校一点通" value="3" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="SelectSource">
|
||||
const appSource = ref([
|
||||
{ name: '寻驾', value: '1' },
|
||||
{ name: '金武联', value: '3' },
|
||||
{ name: '通关考', value: '1' },
|
||||
{ name: '好驾到', value: '2' }
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -1,7 +1,18 @@
|
||||
<template>
|
||||
<div> 基础设置 </div>
|
||||
<div>
|
||||
<el-tabs v-model="settingName">
|
||||
<el-tab-pane label="选择题库" :name="1" v-if="checkPermi(['Question:Setting:DataSource'])">
|
||||
<SelectSource />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="QuestionSetting"></script>
|
||||
<script setup name="QuestionSetting">
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
import SelectSource from './Components/SelectSource.vue'
|
||||
|
||||
const settingName = ref(1)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
342
src/views/Question/UAV/Components/QuestionAddForm.vue
Normal file
342
src/views/Question/UAV/Components/QuestionAddForm.vue
Normal file
@@ -0,0 +1,342 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="无人机试题"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
v-model="visible"
|
||||
width="900px"
|
||||
>
|
||||
<div>
|
||||
<el-form
|
||||
ref="dialogFormRef"
|
||||
:model="dialogForm"
|
||||
:rules="dataRule"
|
||||
label-width="auto"
|
||||
label-position="right"
|
||||
@keyup.enter="dialogFormSubmit()"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="题目" prop="question">
|
||||
<el-input
|
||||
v-model="dialogForm.question"
|
||||
maxlength="200"
|
||||
placeholder="请输入题目"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="题目关键字" prop="titleWords">
|
||||
<el-input
|
||||
v-model="dialogForm.titleWords"
|
||||
maxlength="1000"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="章节" prop="chapter">
|
||||
<el-select v-model="dialogForm.chapter" style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in chapterOptions"
|
||||
:key="dict.chapterId"
|
||||
:label="dict.chapterName"
|
||||
:value="dict.chapterId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="题型" prop="type">
|
||||
<el-radio-group v-model="dialogForm.type">
|
||||
<el-radio label="1" value="1">判断题</el-radio>
|
||||
<el-radio label="2" value="2">单选题</el-radio>
|
||||
<el-radio label="3" value="3">多选题</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="排序" prop="showOrder">
|
||||
<el-input
|
||||
v-model="dialogForm.showOrder"
|
||||
maxlength="20"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项A" prop="chooseA">
|
||||
<el-input
|
||||
v-model="dialogForm.chooseA"
|
||||
maxlength="200"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项B" prop="chooseB">
|
||||
<el-input
|
||||
v-model="dialogForm.chooseB"
|
||||
maxlength="200"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项C" prop="chooseC">
|
||||
<el-input
|
||||
v-model="dialogForm.chooseC"
|
||||
maxlength="200"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="选项D" prop="chooseD">
|
||||
<el-input
|
||||
v-model="dialogForm.chooseD"
|
||||
maxlength="200"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="正确答案" prop="trueAnswer">
|
||||
<el-input
|
||||
v-model="dialogForm.trueAnswer"
|
||||
maxlength="200"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="答案解析" prop="bestAnswer">
|
||||
<el-input
|
||||
v-model="dialogForm.bestAnswer"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2 }"
|
||||
maxlength="1000"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="快速记忆" prop="skillInfo">
|
||||
<el-input
|
||||
v-model="dialogForm.skillInfo"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2 }"
|
||||
maxlength="1000"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="技巧关键字" prop="skillWords">
|
||||
<el-input
|
||||
v-model="dialogForm.skillWords"
|
||||
maxlength="1000"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="错误答案解析" prop="errorInfo">
|
||||
<el-input
|
||||
v-model="dialogForm.errorInfo"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2 }"
|
||||
maxlength="1000"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="题目图片" prop="imageUrl">
|
||||
<el-upload
|
||||
action="#"
|
||||
accept=".png,.jpg,.jpeg,.gif"
|
||||
:limit="1"
|
||||
:http-request="handleImport"
|
||||
:on-exceed="handleExceed"
|
||||
:show-file-list="false"
|
||||
>
|
||||
<img v-if="imgUrl" :src="imgUrl" style="width: 200px" />
|
||||
<!-- <i v-else class="el-icon-plus"></i> -->
|
||||
<Icon icon="ep:plus" style="width: 80px; height: 80px; border: 1px dashed #dcdfe6" />
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button plain @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup name="QuesAddForm">
|
||||
import { addQuestion, updateQuestion, uploadFile } from '@/api/uav/question.js'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const emit = defineEmits(['update'])
|
||||
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(true)
|
||||
const imgUrl = ref(undefined)
|
||||
const chapterOptions = ref([])
|
||||
const dialogForm = ref({
|
||||
id: undefined,
|
||||
showOrder: 0,
|
||||
categoryTitle: undefined,
|
||||
question: undefined,
|
||||
bestAnswer: undefined,
|
||||
chooseA: undefined,
|
||||
chooseB: undefined,
|
||||
chooseC: undefined,
|
||||
chooseD: undefined,
|
||||
imageUrl: undefined,
|
||||
type: undefined,
|
||||
trueAnswer: undefined,
|
||||
carTypeId: undefined,
|
||||
skillInfoPic: undefined,
|
||||
chapter: undefined,
|
||||
skillInfo: undefined,
|
||||
skillWords: undefined
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
schoolName: [{ required: true, message: '驾校名称不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const open = (info = undefined, opts) => {
|
||||
visible.value = true
|
||||
chapterOptions.value = opts
|
||||
resetDialogForm()
|
||||
dialogForm.value.driveTypeName = info.driveTypeName
|
||||
dialogForm.value.carTypeName = info.carTypeName
|
||||
if (info) {
|
||||
dialogForm.value = { ...info, chapter: info.chapter }
|
||||
if (dialogForm.value.imageUrl) {
|
||||
imgUrl.value = dialogForm.value.imageUrl.includes('http')
|
||||
? dialogForm.value.imageUrl
|
||||
: 'https://ss-cloud.ahduima.com/xjxc/pic/' + dialogForm.value.imageUrl
|
||||
} else {
|
||||
imgUrl.value = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open
|
||||
})
|
||||
|
||||
const resetDialogForm = () => {
|
||||
dialogForm.value = {
|
||||
id: undefined,
|
||||
showOrder: 0,
|
||||
question: undefined,
|
||||
bestAnswer: undefined,
|
||||
chooseA: undefined,
|
||||
chooseB: undefined,
|
||||
chooseC: undefined,
|
||||
chooseD: undefined,
|
||||
imageUrl: undefined,
|
||||
type: undefined,
|
||||
trueAnswer: undefined,
|
||||
carTypeId: undefined,
|
||||
skillInfoPic: undefined,
|
||||
skillInfo: undefined,
|
||||
jqtp: undefined,
|
||||
biaoji: undefined,
|
||||
titleWords: undefined,
|
||||
skillWords: undefined,
|
||||
optaWords: undefined,
|
||||
optbWords: undefined,
|
||||
optcWords: undefined,
|
||||
optdWords: undefined,
|
||||
carTypeId: undefined,
|
||||
chapter: '1'
|
||||
}
|
||||
}
|
||||
const dialogFormRef = ref(null)
|
||||
// 表单提交
|
||||
const dialogFormSubmit = async () => {
|
||||
if (!dialogFormRef.value) return
|
||||
const valid = await dialogFormRef.value.validate()
|
||||
if (!valid) return
|
||||
|
||||
if (dialogForm.value.questionId) {
|
||||
updateQuestion(dialogForm.value).then((response) => {
|
||||
if (response) {
|
||||
message.success('修改成功')
|
||||
emit('update')
|
||||
visible.value = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
addQuestion(dialogForm.value).then((response) => {
|
||||
if (response) {
|
||||
message.success('新增成功')
|
||||
visible.value = false
|
||||
emit('update')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const handleImport = (opt) => {
|
||||
const data = new FormData()
|
||||
data.append('file', opt.file)
|
||||
uploadFile(data).then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
message.success('文件上传成功')
|
||||
dialogForm.value.imageUrl = resp.data
|
||||
imgUrl.value = 'https://ss-cloud.ahduima.com/xjxc/pic/' + dialogForm.value.imageUrl
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleExceed = (files) => {
|
||||
handleImport({ file: files[0] })
|
||||
}
|
||||
</script>
|
||||
@@ -1,7 +1,263 @@
|
||||
<template>
|
||||
<div> 无人机题库 </div>
|
||||
<div class="app-container">
|
||||
<el-form :inline="true" label-width="100px" @submit.prevent>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="无人机类型">
|
||||
<el-radio-group v-model="queryParams.modelId" @change="changeCarType">
|
||||
<el-radio
|
||||
v-for="item in cartypeOptions"
|
||||
:key="item.modelId"
|
||||
:label="item.modelId"
|
||||
:value="item.modelId"
|
||||
>
|
||||
{{ item.modelName }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="驾驶员类型">
|
||||
<el-radio-group v-model="queryParams.typeId">
|
||||
<el-radio
|
||||
v-for="item in driverOptions"
|
||||
:key="item.typeId"
|
||||
:label="item.typeId"
|
||||
:value="item.typeId"
|
||||
>
|
||||
{{ item.typeName }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-form-item label="章节">
|
||||
<el-select v-model="queryParams.chapter" placeholder="选择章节" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in chapterOptions"
|
||||
:key="item.chapterId"
|
||||
:label="item.chapterName"
|
||||
:value="item.chapterId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片">
|
||||
<el-radio-group v-model="queryParams.isPic">
|
||||
<el-radio :label="true" :value="true">有</el-radio>
|
||||
<el-radio :label="false" :value="false">无</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="题目">
|
||||
<el-input
|
||||
v-model="queryParams.question"
|
||||
placeholder="请输入题目"
|
||||
clearable
|
||||
style="width: 400px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
highlight-current-row
|
||||
max-height="calc(100vh - 260px)"
|
||||
>
|
||||
<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" min-width="140">
|
||||
<template #default="{ row }">
|
||||
<p v-if="row.chooseA">A:{{ row.chooseA }}</p>
|
||||
<p v-if="row.chooseB">B:{{ row.chooseB }}</p>
|
||||
<p v-if="row.chooseC">C:{{ row.chooseC }}</p>
|
||||
<p v-if="row.chooseD">D:{{ row.chooseD }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="正确答案" align="center" prop="trueAnswer" width="100" />
|
||||
<!-- <el-table-column label="科目" align="center" prop="subject" width="100">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.subject == '1'">科一</span>
|
||||
<span v-if="row.subject == '4'">科四</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="章节" align="center" prop="chapterName" min-width="100" />
|
||||
<el-table-column label="图片" align="center" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
v-if="row.imageUrl"
|
||||
:src="getShowImg(row)"
|
||||
:preview-src-list="[getShowImg(row)]"
|
||||
:lazy="true"
|
||||
style="width: 90px"
|
||||
preview-teleported
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.isActive == 0" type="success">使用中</el-tag>
|
||||
<el-tag v-else type="danger">已删除</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['Question:UAVVip:edit']"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['Question:UAVVip:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
style="margin-bottom: 0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<QuestionAddForm ref="dialogAddForm" @update="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="UAV"></script>
|
||||
<script setup name="UAV">
|
||||
import QuestionAddForm from './components/QuestionAddForm.vue'
|
||||
import { searchChapter } from '@/api/uav/chapter'
|
||||
import {
|
||||
searchQuestion,
|
||||
deleteQuestion,
|
||||
getCarTypeOptions,
|
||||
getDriverTypeOptions
|
||||
} from '@/api/uav/question.js'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const loading = ref(false)
|
||||
const total = ref(0)
|
||||
const tableList = ref([])
|
||||
const queryParams = ref({
|
||||
question: undefined,
|
||||
modelId: undefined,
|
||||
typeId: undefined,
|
||||
isPic: undefined,
|
||||
chapter: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
|
||||
const cartypeOptions = ref([])
|
||||
const driverOptions = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
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 getQuestionChapter = () => {
|
||||
searchChapter().then((res) => {
|
||||
chapterOptions.value = res
|
||||
})
|
||||
}
|
||||
|
||||
function getShowImg(row) {
|
||||
return row.imageUrl.includes('http')
|
||||
? row.imageUrl
|
||||
: `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
|
||||
}
|
||||
|
||||
function getList() {
|
||||
loading.value = true
|
||||
searchQuestion(queryParams.value).then((response) => {
|
||||
tableList.value = response.list
|
||||
total.value = response.total
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
const dialogAddForm = ref(null)
|
||||
function handleEdit(item) {
|
||||
dialogAddForm.value.open({ ...item, chapter: Number(item.chapter) }, chapterOptions.value)
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
dialogAddForm.value.open(
|
||||
{
|
||||
chapter: queryParams.value.chapter
|
||||
},
|
||||
chapterOptions.value
|
||||
)
|
||||
}
|
||||
|
||||
function handleDelete(row) {
|
||||
message
|
||||
.confirm('是否确认删除该题?')
|
||||
.then(function () {
|
||||
deleteQuestion(row.questionId).then(() => {
|
||||
getList()
|
||||
message.success('删除题目成功')
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
185
src/views/Question/UAVChapter/index.vue
Normal file
185
src/views/Question/UAVChapter/index.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 查询条件 -->
|
||||
<el-form ref="queryParamsRef" :model="queryParams" inline label-width="0" @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="queryParams.chapterName"
|
||||
placeholder="请输入章节名称"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery"> 搜索 </el-button>
|
||||
<el-button type="primary" @click="handleAdd" v-hasPermi="['Question:UAVChapter:add']">
|
||||
新增
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
highlight-current-row
|
||||
max-height="calc(100vh - 320px)"
|
||||
>
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="章节名称" prop="chapterName" />
|
||||
<el-table-column label="排序" prop="sort" />
|
||||
<el-table-column label="创建时间" prop="createTime" />
|
||||
<el-table-column label="创建人" prop="creator" />
|
||||
<el-table-column label="最近修改时间" prop="updateTime" />
|
||||
<el-table-column label="修改人" prop="updater" />
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['Question:UAVChapter:edit']"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['Question:UAVChapter:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<Dialog v-model="showDialog" :title="dialogTitle" style="width: 880px">
|
||||
<el-form ref="dialogFormRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="章节名称" prop="chapterName">
|
||||
<el-input v-model="form.chapterName" placeholder="请输入章节名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序" type="number" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="知识总结" prop="remark">
|
||||
<Editor v-model="form.remark" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="showDialog = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="UAVChapter">
|
||||
import Editor from '@/components/Editor/src/Editor.vue'
|
||||
import * as ChapterApi from '@/api/uav/chapter'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const loading = ref(false)
|
||||
const tableList = ref([])
|
||||
const queryParams = ref({
|
||||
chapterName: ''
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery()
|
||||
})
|
||||
|
||||
function getList() {
|
||||
loading.value = true
|
||||
// 查询无人机章节列表
|
||||
ChapterApi.searchChapter(queryParams.value).then((response) => {
|
||||
tableList.value = response
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
function handleQuery() {
|
||||
getList()
|
||||
}
|
||||
|
||||
const form = ref({})
|
||||
const showDialog = ref(false)
|
||||
const rules = {
|
||||
chapterName: [{ required: true, message: '请输入章节名称', trigger: 'blur' }],
|
||||
sort: [{ required: true, message: '请输入排序', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const dialogTitle = ref('新增章节')
|
||||
const dialogFormRef = ref()
|
||||
function handleAdd() {
|
||||
showDialog.value = true
|
||||
dialogTitle.value = '新增章节'
|
||||
resetForm()
|
||||
}
|
||||
|
||||
function handleEdit(row) {
|
||||
showDialog.value = true
|
||||
resetForm()
|
||||
dialogTitle.value = '修改章节'
|
||||
form.value = {
|
||||
chapterName: row.chapterName,
|
||||
sort: row.sort,
|
||||
chapterId: row.chapterId,
|
||||
remark: row.remark
|
||||
}
|
||||
}
|
||||
|
||||
function resetForm() {
|
||||
form.value = {
|
||||
chapterName: undefined,
|
||||
sort: 1,
|
||||
remark: undefined
|
||||
}
|
||||
if (dialogFormRef.value) {
|
||||
dialogFormRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
function handleDelete(row) {
|
||||
message
|
||||
.confirm('是否确认删除该章节?')
|
||||
.then(function () {
|
||||
ChapterApi.deleteChapter(row.chapterId).then(() => {
|
||||
getList()
|
||||
message.success('删除成功')
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
const submitForm = async () => {
|
||||
try {
|
||||
if (!dialogFormRef.value) return
|
||||
const valid = await dialogFormRef.value.validate()
|
||||
if (!valid) return
|
||||
|
||||
if (form.value.chapterId) {
|
||||
await ChapterApi.updateChapter(form.value)
|
||||
message.success('修改成功')
|
||||
getList()
|
||||
showDialog.value = false
|
||||
} else {
|
||||
await ChapterApi.addChapter(form.value)
|
||||
message.success('新增成功')
|
||||
showDialog.value = false
|
||||
getList()
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -16,7 +16,7 @@
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="display: flex; padding: 10px; border: 1px solid #eee; height: calc(100vh - 80px)">
|
||||
<div style="display: flex; padding: 10px; border: 1px solid #eee; height: calc(100vh - 220px)">
|
||||
<div style="width: 300px; border-right: 1px solid #eee">
|
||||
<div style="display: flex; justify-content: space-between; padding-right: 20px">
|
||||
<div style="font-size: 18px; font-weight: bold">密卷</div>
|
||||
@@ -207,7 +207,9 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
function getShowImg(row) {
|
||||
return row.imageUrl.includes('http') ? row.imageUrl : `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
|
||||
return row.imageUrl.includes('http')
|
||||
? row.imageUrl
|
||||
: `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
|
||||
}
|
||||
|
||||
function addMjItem() {
|
||||
@@ -288,7 +290,7 @@ function takeoutMj(row) {
|
||||
})
|
||||
.then(() => {
|
||||
getQuestionList()
|
||||
message.success('清空题目成功')
|
||||
message.success('移除题目成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
@@ -303,7 +305,7 @@ function getQuestionList() {
|
||||
function sureAddQues(row) {
|
||||
addMjQuestion({
|
||||
secretId: mjList.value[mjIndex.value].secretId,
|
||||
subId: row.subId,
|
||||
questionId: row.questionId,
|
||||
source: queryParams.value.source
|
||||
})
|
||||
.then((resp) => {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="tableList" height="calc(100vh - 250px)">
|
||||
<el-table v-loading="loading" :data="tableList" height="calc(100vh - 270px)">
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="题目" align="left" prop="question" min-width="140" />
|
||||
<el-table-column label="选项" align="left" min-width="140">
|
||||
@@ -79,6 +79,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
style="margin-bottom: 0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
@@ -166,7 +167,9 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
function getShowImg(row) {
|
||||
return row.imageUrl.includes('http') ? row.imageUrl : `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
|
||||
return row.imageUrl.includes('http')
|
||||
? row.imageUrl
|
||||
: `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
|
||||
}
|
||||
|
||||
function addMjDetail() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-tabs v-model="source" @tab-click="handleChangeSource">
|
||||
<el-tab-pane v-for="item in sourceOptions" :key="item.key" :label="item.label" :name="item.key">
|
||||
<el-tabs v-model="tabIndex" tab-position="left" style="height: 400px" class="profile-tabs">
|
||||
<el-tabs v-model="tabIndex" tab-position="left" class="profile-tabs">
|
||||
<el-tab-pane label="精选题" :name="1" v-if="checkPermi(['question:vip-data:jx'])">
|
||||
<SimpleData v-if="tabIndex == 1" :source="source" />
|
||||
</el-tab-pane>
|
||||
|
||||
257
src/views/UAVClue/CluePool/index.vue
Normal file
257
src/views/UAVClue/CluePool/index.vue
Normal file
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="searchForm" inline @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.name" placeholder="输入姓名" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.phone" placeholder="输入手机号" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="searchForm.city"
|
||||
placeholder="输入城市或地址"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery"> 搜索 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
highlight-current-row
|
||||
max-height="calc(100vh - 320px)"
|
||||
>
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="姓名" prop="name" />
|
||||
<el-table-column label="手机号" prop="phone" />
|
||||
<el-table-column label="城市" prop="city" />
|
||||
<el-table-column label="意向机构" prop="likeOrg" />
|
||||
<el-table-column label="咨询类型" prop="cartype" />
|
||||
<el-table-column label="咨询日期" prop="createTime" />
|
||||
<el-table-column label="诉求" prop="need" />
|
||||
<el-table-column label="备注" prop="remark" />
|
||||
<el-table-column label="报名状态" prop="status">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.status == 1" type="primary">未报名</el-tag>
|
||||
<el-tag v-else-if="row.status == 2" type="success">报名成功</el-tag>
|
||||
<el-tag v-else-if="row.status == 3" type="info">已失效</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定机构" prop="bindSchoolName" />
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['UAVClue:CluePool:edit']"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
style="margin-bottom: 0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="searchForm.pageNo"
|
||||
v-model:limit="searchForm.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<Dialog v-model="showDialog" title="修改线索" style="width: 800px">
|
||||
<el-form ref="dialogFormRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="form.phone" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="城市" prop="city">
|
||||
<el-input v-model="form.city" placeholder="请输入城市或地址" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="意向机构" prop="likeOrg">
|
||||
<el-select
|
||||
v-model="form.likeOrg"
|
||||
placeholder="选择意向机构"
|
||||
clearable
|
||||
filterable
|
||||
@change="getCartypeOptions"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in orgOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="咨询类型" prop="carTypeId">
|
||||
<el-radio-group v-model="form.carTypeId">
|
||||
<el-radio label="10001" value="10001">多旋翼</el-radio>
|
||||
<el-radio label="10002" value="10002">垂直起降固定翼</el-radio>
|
||||
<el-radio label="10003" value="10003">直升机</el-radio>
|
||||
<el-radio label="10004" value="10004">固定翼</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="驾驶员类型" prop="driveType">
|
||||
<el-radio-group v-model="form.driveType">
|
||||
<el-radio label="1" value="1">视距内驾驶员</el-radio>
|
||||
<el-radio label="2" value="2">超视距驾驶员</el-radio>
|
||||
<el-radio label="3" value="3">教员</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="诉求" prop="need">
|
||||
<el-input type="textarea" v-model="form.need" placeholder="请输入诉求" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="报名状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="1" :value="1">未报名</el-radio>
|
||||
<el-radio :label="2" :value="2">已报名</el-radio>
|
||||
<el-radio :label="3" :value="3">已失效</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0" v-if="form.status == 2">
|
||||
<el-form-item label="绑定机构" prop="bindOrgId">
|
||||
<el-select v-model="form.bindOrgId" placeholder="选择意向机构" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in orgOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24" :offset="0">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.remark"
|
||||
placeholder="请输入备注"
|
||||
:autosize="{ minRows: 5, maxRows: 10 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="showDialog = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="CluePool">
|
||||
const loading = ref(false)
|
||||
const total = ref(0)
|
||||
const tableList = ref([])
|
||||
const searchForm = ref({
|
||||
name: '',
|
||||
phone: '',
|
||||
city: '',
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery()
|
||||
orgOptions.value = [
|
||||
{ label: '银湖低空经济发展有限公司', value: '1' },
|
||||
{ label: '中科未来飞行科技有限公司', value: '2' }
|
||||
]
|
||||
})
|
||||
|
||||
function handleQuery() {
|
||||
searchForm.value.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
function getList() {
|
||||
loading.value = true
|
||||
tableList.value = [
|
||||
{
|
||||
name: '张三',
|
||||
phone: '12345678901',
|
||||
city: '上海',
|
||||
status: 1
|
||||
},
|
||||
{
|
||||
name: '张三1',
|
||||
phone: '12345678901',
|
||||
city: '合肥',
|
||||
status: 2
|
||||
}
|
||||
]
|
||||
total.value = 0
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const cartypeOptions = ref([])
|
||||
const orgOptions = ref([])
|
||||
function getCartypeOptions() {
|
||||
cartypeOptions.value = []
|
||||
}
|
||||
|
||||
const form = ref({})
|
||||
const showDialog = ref(false)
|
||||
const rules = {
|
||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const dialogFormRef = ref()
|
||||
|
||||
function handleEdit(row) {
|
||||
form.value = row
|
||||
showDialog.value = true
|
||||
}
|
||||
|
||||
const submitForm = async () => {
|
||||
if (!dialogFormRef.value) return
|
||||
const valid = await dialogFormRef.value.validate()
|
||||
if (!valid) return
|
||||
|
||||
message.success('修改成功')
|
||||
getList()
|
||||
showDialog.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
82
src/views/UAVClue/StudyRecord/components/Collect.vue
Normal file
82
src/views/UAVClue/StudyRecord/components/Collect.vue
Normal file
@@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="searchForm" inline @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="searchForm.nameOrPhone"
|
||||
placeholder="输入学员姓名/手机号"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.question" placeholder="输入题目" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery"> 搜索 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
highlight-current-row
|
||||
max-height="calc(100vh - 320px)"
|
||||
>
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="题目" prop="question" />
|
||||
<el-table-column label="图片" prop="img" />
|
||||
<el-table-column label="选项" prop="option" />
|
||||
<el-table-column label="正确答案" prop="answer" />
|
||||
<el-table-column label="收藏人" prop="name" />
|
||||
<el-table-column label="手机号" prop="phone" />
|
||||
<el-table-column label="收藏时间" prop="yourAnswer" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
style="margin-bottom: 0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="searchForm.pageNo"
|
||||
v-model:limit="searchForm.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const searchForm = ref({
|
||||
question: '',
|
||||
nameOrPhone: '',
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const total = ref(0)
|
||||
const tableList = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery()
|
||||
})
|
||||
function getList() {
|
||||
loading.value = true
|
||||
tableList.value = [
|
||||
{
|
||||
id: 1,
|
||||
question: '1+1=?',
|
||||
answer: 'B',
|
||||
yourAnswer: 'B',
|
||||
status: '1',
|
||||
createTime: ''
|
||||
}
|
||||
]
|
||||
total.value = 1
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
function handleQuery() {
|
||||
searchForm.value.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
107
src/views/UAVClue/StudyRecord/components/Exam.vue
Normal file
107
src/views/UAVClue/StudyRecord/components/Exam.vue
Normal file
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="searchForm" inline @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="searchForm.nameOrPhone"
|
||||
placeholder="输入学员姓名/手机号"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select
|
||||
v-model="searchForm.status"
|
||||
placeholder="选择考试结果"
|
||||
@change="handleQuery"
|
||||
style="width: 150px"
|
||||
clearable
|
||||
>
|
||||
<el-option label="合格" :value="1" />
|
||||
<el-option label="不合格" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery"> 搜索 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
highlight-current-row
|
||||
max-height="calc(100vh - 320px)"
|
||||
>
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="姓名" prop="name" />
|
||||
<el-table-column label="手机号" prop="phone" />
|
||||
<el-table-column label="无人机类型" prop="carType" />
|
||||
<el-table-column label="驾驶员类型" prop="driverType" />
|
||||
<el-table-column label="交卷时间" prop="createTime" />
|
||||
<el-table-column label="模考时长" prop="during" />
|
||||
<el-table-column label="得分" prop="score" />
|
||||
<el-table-column label="答题结果" prop="status">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.status == 0" type="danger">不合格</el-tag>
|
||||
<el-tag v-else type="success">合格</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-button type="text" @click="handleView(row)">查看明细</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
style="margin-bottom: 0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="searchForm.pageNo"
|
||||
v-model:limit="searchForm.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const searchForm = ref({
|
||||
nameOrPhone: '',
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const total = ref(0)
|
||||
const tableList = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery()
|
||||
})
|
||||
function getList() {
|
||||
loading.value = true
|
||||
tableList.value = [
|
||||
{
|
||||
id: 1,
|
||||
question: '1+1=?',
|
||||
answer: 'B',
|
||||
yourAnswer: 'B',
|
||||
status: '1',
|
||||
createTime: ''
|
||||
}
|
||||
]
|
||||
total.value = 1
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
function handleQuery() {
|
||||
searchForm.value.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
function handleView(row) {
|
||||
console.log(row)
|
||||
|
||||
alert('查看每一题的记录,类似做题记录,+显示未做题')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
101
src/views/UAVClue/StudyRecord/components/Practice.vue
Normal file
101
src/views/UAVClue/StudyRecord/components/Practice.vue
Normal file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="searchForm" inline @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="searchForm.nameOrPhone"
|
||||
placeholder="输入学员姓名/手机号"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="searchForm.question" placeholder="输入题目" @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select
|
||||
v-model="searchForm.status"
|
||||
placeholder="选择答题结果"
|
||||
@change="handleQuery"
|
||||
style="width: 150px"
|
||||
clearable
|
||||
>
|
||||
<el-option label="答对" :value="1" />
|
||||
<el-option label="答错" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery"> 搜索 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableList"
|
||||
highlight-current-row
|
||||
max-height="calc(100vh - 320px)"
|
||||
>
|
||||
<el-table-column type="index" width="55" align="center" />
|
||||
<el-table-column label="题目" prop="question" />
|
||||
<el-table-column label="图片" prop="img" />
|
||||
<el-table-column label="选项" prop="option" />
|
||||
<el-table-column label="正确答案" prop="answer" />
|
||||
<el-table-column label="答题时间" prop="createTime" />
|
||||
<el-table-column label="姓名" prop="name" />
|
||||
<el-table-column label="手机号" prop="phone" />
|
||||
<el-table-column label="答题选择" prop="yourAnswer" />
|
||||
<el-table-column label="答题结果" prop="status">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.status == 0" type="danger">答错</el-tag>
|
||||
<el-tag v-else type="success">答对</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
style="margin-bottom: 0"
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="searchForm.pageNo"
|
||||
v-model:limit="searchForm.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const searchForm = ref({
|
||||
question: '',
|
||||
status: '',
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const total = ref(0)
|
||||
const tableList = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
handleQuery()
|
||||
})
|
||||
function getList() {
|
||||
loading.value = true
|
||||
tableList.value = [
|
||||
{
|
||||
id: 1,
|
||||
question: '1+1=?',
|
||||
answer: 'B',
|
||||
yourAnswer: 'B',
|
||||
status: '1',
|
||||
createTime: ''
|
||||
}
|
||||
]
|
||||
total.value = 1
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
function handleQuery() {
|
||||
searchForm.value.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
7
src/views/UAVClue/StudyRecord/components/Wrong.vue
Normal file
7
src/views/UAVClue/StudyRecord/components/Wrong.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>收藏</div>
|
||||
</template>
|
||||
|
||||
<script setup></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
58
src/views/UAVClue/StudyRecord/index.vue
Normal file
58
src/views/UAVClue/StudyRecord/index.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs v-model="tabIndex">
|
||||
<el-tab-pane v-for="item in panes" :key="item.name" :label="item.label" :name="item.name">
|
||||
<component :is="item.component" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="StudyRecord">
|
||||
import Practice from './components/Practice.vue'
|
||||
import Exam from './components/Exam.vue'
|
||||
import Wrong from './components/Wrong.vue'
|
||||
import Collect from './components/Collect.vue'
|
||||
import { checkPermi } from '@/utils/permission'
|
||||
|
||||
const tabIndex = ref('')
|
||||
const panes = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
panes.value = []
|
||||
const arr = [
|
||||
{
|
||||
label: '做题记录',
|
||||
name: 'practice',
|
||||
permi: 'UAVClue:StudyRecord:practice',
|
||||
component: markRaw(Practice)
|
||||
},
|
||||
{
|
||||
label: '模考记录',
|
||||
name: 'exam',
|
||||
permi: 'UAVClue:StudyRecord:exam',
|
||||
component: markRaw(Exam)
|
||||
},
|
||||
{
|
||||
label: '错题记录',
|
||||
name: 'wrong',
|
||||
permi: 'UAVClue:StudyRecord:wrong',
|
||||
component: markRaw(Wrong)
|
||||
},
|
||||
{
|
||||
label: '收藏记录',
|
||||
name: 'collect',
|
||||
permi: 'UAVClue:StudyRecord:collect',
|
||||
component: markRaw(Collect)
|
||||
}
|
||||
]
|
||||
arr.map((item) => {
|
||||
if (checkPermi([item.permi])) {
|
||||
panes.value.push(item)
|
||||
}
|
||||
})
|
||||
tabIndex.value = panes.value[0].name
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user