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

修改章节增加试卷接口

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