提交 5154ef9f authored 作者: matian's avatar matian

updates

上级 0c160cc9
......@@ -55,6 +55,10 @@ export function getCategoryList(params: { type: string; category_name?: string }
}
// 获取项目列表
export function getProjectList(params: { organization_id?: string, project_id?: string }) {
export function getProjectList(params: { organization_id?: string; project_id?: string }) {
return httpRequest.get('/api/resource/v1/util/members', { params })
}
// 获取试题分类
export function getQuestionCategory(params: { project_tag: string }) {
return httpRequest.get(`/api/qbs/admin/v2/question-category/tree/${params.project_tag}`, { params })
}
import { getQuestionCategory } from '@/api/base'
export function useQuestionList() {
const list = ref([])
const params = { project_tag: 'resourse_ci' }
getQuestionCategory(params).then((res: any) => {
list.value = res.data.filter((item: any) => {
item.children = detailChild(item.children)
return parseInt(item.status)
})
})
const detailChild = (child: any) => {
if (!child) return []
return child.filter((item: any) => {
item.children = detailChild(item.children)
return parseInt(item.status)
})
}
return { list }
}
......@@ -23,7 +23,7 @@ export function searchExam(params: {
page?: string
limit?: string
}) {
return httpRequest.get('/api/qbs/admin/v2/question-papers/{project_tag}', { params })
return httpRequest.get(`/api/qbs/admin/v2/question-papers/${params.project_tag}`, { params })
}
// 新建课件
......@@ -204,3 +204,4 @@ export function delCharacter(data: { id: string; course_id: string }) {
export function getLiveList(params: { name: string; page?: number; ['page_size']?: number }) {
return httpRequest.get('/api/resource/v1/course/course/search-live', { params })
}
<script setup lang="ts">
import { searchExam, createCharacter } from '../../api'
import { useGetCategoryList } from '@/composables/useGetCategoryList'
import { useQuestionList } from '@/composables/useQuestionList'
const appList = ref()
let { list: selectTree } = useGetCategoryList()
let { list: selectTree } = useQuestionList()
const tabValue = ref('1')
const multipleSelection: any = ref([])
......@@ -16,7 +16,6 @@ const props = defineProps({
type: String,
required: true
},
chapterName: {
type: String,
required: true
......@@ -119,13 +118,16 @@ const typeFilter = () => {
const handleSelectionChange = (val: any) => {
multipleSelection.value = val
}
const title = computed(() => {
return `添加${props.btnInfo.btn_name}`
})
</script>
<template>
<el-drawer :model-value="isShowExamDialog" draggable :before-close="handleCancel" size="60%" :title="title">
<el-drawer
:model-value="isShowExamDialog"
draggable
:before-close="handleCancel"
size="60%"
:title="`添加${props.btnInfo.btn_name}`"
>
<div class="video-head">
<el-tabs @tab-change="tabChange" v-model="tabValue">
<el-tab-pane label="我的资源" name="1"></el-tab-pane>
......
......@@ -49,9 +49,6 @@ const defaultProps = {
const typeFilter = () => {
appList.value.refetch()
}
const title = computed(() => {
return `添加${props.btnInfo.btn_name}`
})
const listOptions = computed(() => {
console.log(props.btnInfo.resource_type)
......@@ -110,7 +107,13 @@ const handleSave = () => {
</script>
<template>
<el-drawer :model-value="isShowAddDialog" draggable :before-close="handleCancel" size="60%" :title="title">
<el-drawer
:model-value="isShowAddDialog"
draggable
:before-close="handleCancel"
size="60%"
:title="`添加${props.btnInfo.btn_name}`"
>
<div class="video-head">
<el-tabs @tab-change="tabChange" v-model="tabValue">
<el-tab-pane label="我的资源" name="1"></el-tab-pane>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论