sc
This commit is contained in:
@@ -58,7 +58,7 @@
|
|||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="tableList"
|
:data="tableList"
|
||||||
highlight-current-row
|
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 type="index" width="55" align="center" />
|
||||||
<el-table-column label="题目" align="left" prop="question" min-width="140" />
|
<el-table-column label="题目" align="left" prop="question" min-width="140" />
|
||||||
@@ -85,17 +85,17 @@
|
|||||||
:src="getShowImg(row)"
|
:src="getShowImg(row)"
|
||||||
:preview-src-list="[getShowImg(row)]"
|
:preview-src-list="[getShowImg(row)]"
|
||||||
:lazy="true"
|
:lazy="true"
|
||||||
style="width: 80px"
|
style="width: 90px"
|
||||||
preview-teleported
|
preview-teleported
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" width="100">
|
<!-- <el-table-column label="状态" width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.isActive == 0" type="success">使用中</el-tag>
|
<el-tag v-if="row.isActive == 0" type="success">使用中</el-tag>
|
||||||
<el-tag v-else type="danger">已删除</el-tag>
|
<el-tag v-else type="danger">已删除</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" width="140">
|
<el-table-column label="操作" align="center" width="140">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
@click="handleDelete(scope.row.id)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['question:database:remove']"
|
v-hasPermi="['question:database:remove']"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
@@ -120,6 +120,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
style="margin-bottom: 0"
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
v-model:page="queryParams.pageNo"
|
v-model:page="queryParams.pageNo"
|
||||||
@@ -137,6 +138,8 @@
|
|||||||
import { searchQuestion, deleteQuestion, getQuestionSort } from '@/api/xjapplet/xjdatabase'
|
import { searchQuestion, deleteQuestion, getQuestionSort } from '@/api/xjapplet/xjdatabase'
|
||||||
import QuestionAddForm from './components/QuestionAddForm.vue'
|
import QuestionAddForm from './components/QuestionAddForm.vue'
|
||||||
|
|
||||||
|
const message = useMessage()
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const tableList = ref([])
|
const tableList = ref([])
|
||||||
@@ -177,7 +180,9 @@ const getQuestionChapter = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getShowImg(row) {
|
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() {
|
function getList() {
|
||||||
@@ -213,15 +218,14 @@ function handleDelete(row) {
|
|||||||
message
|
message
|
||||||
.confirm('是否确认删除该题?')
|
.confirm('是否确认删除该题?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
deleteQuestion(row.id, row.source).then(() => {
|
deleteQuestion(row.questionId, row.source).then(() => {
|
||||||
getList()
|
getList()
|
||||||
|
message.success('删除题目成功')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(() => {
|
.catch((err) => {
|
||||||
getQuestionList()
|
console.log(err)
|
||||||
message.success('删除题目成功')
|
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleChangeSource() {
|
function handleChangeSource() {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</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="width: 300px; border-right: 1px solid #eee">
|
||||||
<div style="display: flex; justify-content: space-between; padding-right: 20px">
|
<div style="display: flex; justify-content: space-between; padding-right: 20px">
|
||||||
<div style="font-size: 18px; font-weight: bold">密卷</div>
|
<div style="font-size: 18px; font-weight: bold">密卷</div>
|
||||||
@@ -207,7 +207,9 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function getShowImg(row) {
|
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() {
|
function addMjItem() {
|
||||||
@@ -288,7 +290,7 @@ function takeoutMj(row) {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getQuestionList()
|
getQuestionList()
|
||||||
message.success('清空题目成功')
|
message.success('移除题目成功')
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
@@ -303,7 +305,7 @@ function getQuestionList() {
|
|||||||
function sureAddQues(row) {
|
function sureAddQues(row) {
|
||||||
addMjQuestion({
|
addMjQuestion({
|
||||||
secretId: mjList.value[mjIndex.value].secretId,
|
secretId: mjList.value[mjIndex.value].secretId,
|
||||||
subId: row.subId,
|
questionId: row.questionId,
|
||||||
source: queryParams.value.source
|
source: queryParams.value.source
|
||||||
})
|
})
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</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 type="index" width="55" align="center" />
|
||||||
<el-table-column label="题目" align="left" prop="question" min-width="140" />
|
<el-table-column label="题目" align="left" prop="question" min-width="140" />
|
||||||
<el-table-column label="选项" align="left" min-width="140">
|
<el-table-column label="选项" align="left" min-width="140">
|
||||||
@@ -79,6 +79,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
|
style="margin-bottom: 0"
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
v-model:page="queryParams.pageNo"
|
v-model:page="queryParams.pageNo"
|
||||||
@@ -166,7 +167,9 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function getShowImg(row) {
|
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() {
|
function addMjDetail() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="source" @tab-click="handleChangeSource">
|
<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-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'])">
|
<el-tab-pane label="精选题" :name="1" v-if="checkPermi(['question:vip-data:jx'])">
|
||||||
<SimpleData v-if="tabIndex == 1" :source="source" />
|
<SimpleData v-if="tabIndex == 1" :source="source" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|||||||
Reference in New Issue
Block a user