main
parent
d7c155ba8e
commit
cdf810507c
@ -1,11 +1,257 @@ |
|||||||
<template> |
<template> |
||||||
<div> |
<div> |
||||||
<div>线索池</div> |
<el-form :model="searchForm" inline @submit.prevent> |
||||||
<div>权限:</div> |
<el-form-item> |
||||||
<div>修改:UAVClue:CluePool:edit</div> |
<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> |
</div> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script setup name="CluePool"></script> |
<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> |
<style lang="scss" scoped></style> |
||||||
|
@ -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> |
@ -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> |
@ -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> |
@ -0,0 +1,7 @@ |
|||||||
|
<template> |
||||||
|
<div>收藏</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script setup></script> |
||||||
|
|
||||||
|
<style lang="scss" scoped></style> |
@ -1,14 +1,58 @@ |
|||||||
<template> |
<template> |
||||||
<div> |
<div> |
||||||
<div>学习记录</div> |
<el-tabs v-model="tabIndex"> |
||||||
<div>权限:</div> |
<el-tab-pane v-for="item in panes" :key="item.name" :label="item.label" :name="item.name"> |
||||||
<div>做题记录:UAVClue:StudyRecord:practice</div> |
<component :is="item.component" /> |
||||||
<div>模考记录:UAVClue:StudyRecord:exam</div> |
</el-tab-pane> |
||||||
<div>错题记录:UAVClue:StudyRecord:wrong</div> |
</el-tabs> |
||||||
<div>收藏记录:UAVClue:StudyRecord:collect</div> |
|
||||||
</div> |
</div> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script setup name="StudyRecord"></script> |
<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> |
<style lang="scss" scoped></style> |
||||||
|
Loading…
Reference in new issue