提交 0c160cc9 authored 作者: matian's avatar matian

修改章节增加试卷接口

上级 315be603
......@@ -11,16 +11,19 @@ export function searchLive(params: { name: string; 'per-page'?: string }) {
}
// 试卷搜索
export function searchExam(data: {
nonce: string
timestamp: string
signature: string
paper_title: string
limit: string
is_all: number
project_prefix: string
export function searchExam(params: {
project_tag: string
id?: string
paper_title?: string
permission: string
paper_type?: string
paper_labels?: string
paper_category?: string
paper_categories?: string
page?: string
limit?: string
}) {
return httpRequest.post('/api/qbs/api/v1/question-papers/search', data)
return httpRequest.get('/api/qbs/admin/v2/question-papers/{project_tag}', { params })
}
// 新建课件
......@@ -154,18 +157,6 @@ export function getOtherList(params?: {
}) {
return httpRequest.get('/api/resource/v1/course/course/search-other-information', { params })
}
// 试卷搜索
export function gatExamList(data: {
nonce: string
timestamp: string
signature: string
paper_title: string
limit: string
is_all: number
project_prefix: string
}) {
return httpRequest.post('/api/qbs/api/v1/question-papers/search', data)
}
// 获取视频详情
export function getVideoDetails(params: { id: string }) {
......
......@@ -58,13 +58,14 @@ const remoteMethod = (query: string) => {
if (query) {
loading.value = true
searchExam({
paper_title: query,
limit: '100',
is_all: 1,
project_prefix: 'resourse_ci',
signature: 'UG7wBenexQhiuD2wpCwuxkU0jqcj006d',
timestamp: '32322323',
nonce: '3232'
project_tag: 'resourse_ci',
id: '',
paper_title: '',
permission: '1',
paper_type: '',
paper_labels: '',
paper_category: '',
paper_categories: ''
}).then((res: any) => {
loading.value = false
options.value = res.data.data
......
<script setup lang="ts">
import { gatExamList, createCharacter } from '../../api'
import { searchExam, createCharacter } from '../../api'
import { useGetCategoryList } from '@/composables/useGetCategoryList'
const appList = ref()
let { list: selectTree } = useGetCategoryList()
......@@ -36,23 +36,24 @@ interface Emits {
}
const listOptions = {
remote: {
httpRequest: gatExamList,
httpRequest: searchExam,
callback(data: any) {
return { list: data.data }
},
params: {
tab: tabValue,
project_tag: 'resourse_ci',
id: '',
paper_title: '',
is_all: 1,
project_prefix: 'x1',
signature: 'UG7wBenexQhiuD2wpCwuxkU0jqcj006d',
timestamp: '32322323',
nonce: '3232'
permission: tabValue,
paper_type: '',
paper_labels: '',
paper_category: '',
paper_categories: ''
}
},
filters: [
{ prop: 'classification', label: '类别:', slots: 'filter-type' },
{ type: 'input', prop: 'paper_category.name', label: '标题:' }
{ type: 'input', prop: 'paper_title', label: '标题:' }
],
columns: [
{ type: 'selection', fixed: 'left' },
......@@ -72,7 +73,7 @@ const listOptions = {
return map[row.row.paper_uses] || row.row.paper_uses
}
},
{ label: '试卷分类', prop: 'paper_category.name', minWidth: 200 },
{ label: '试卷分类', prop: 'paper_category', minWidth: 200 },
{ label: '试卷名称', prop: 'paper_title', minWidth: 200 },
{ label: '总分', prop: 'paper_total_score' },
{ label: '及格分数', prop: 'pass_score' },
......@@ -128,8 +129,7 @@ const title = computed(() => {
<div class="video-head">
<el-tabs @tab-change="tabChange" v-model="tabValue">
<el-tab-pane label="我的资源" name="1"></el-tab-pane>
<el-tab-pane label="部门资源" name="2"></el-tab-pane>
<el-tab-pane label="公开资源" name="3"></el-tab-pane>
<el-tab-pane label="公开资源" name="2"></el-tab-pane>
</el-tabs>
</div>
<AppList v-bind="listOptions" ref="appList" @selection-change="handleSelectionChange">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论