zcx 1 week ago
parent 99ed1be271
commit 0632fa2362
  1. 5
      .vscode/settings.json
  2. 16
      src/api/xjapplet/vipdatabase.js
  3. 4
      src/api/xjapplet/xjdatabase.js
  4. 58
      src/router/modules/remaining.ts
  5. 14
      src/styles/index.scss
  6. 24
      src/views/Basic/Swagger/index.vue
  7. 2
      src/views/Question/Database/Components/QuestionAddForm.vue
  8. 25
      src/views/Question/Database/index.vue
  9. 25
      src/views/Question/VipData/conponents/SecretData.vue
  10. 17
      src/views/Question/VipData/conponents/SimpleData.vue

@ -0,0 +1,5 @@
{
"i18n-ally.localesPaths": [
"src/locales"
]
}

@ -14,9 +14,9 @@ export const getJxQuestionList = async (params) => {
}) })
} }
export const delJxData = async (id) => { export const delJxData = async (id, source) => {
return await request.delete({ return await request.delete({
url: `/admin-api/applet/xunjia/question/jx/delete?id=${id}` url: `/admin-api/applet/xunjia/question/jx/delete?id=${id}&source=${source}`
}) })
} }
@ -34,15 +34,15 @@ export const getMjList = async (params) => {
}) })
} }
export const delMj = async (secretId) => { export const delMj = async (secretId, source) => {
return await request.delete({ return await request.delete({
url: `/admin-api/applet/xunjia/secret/delete?secretId=${secretId}` url: `/admin-api/applet/xunjia/secret/delete?secretId=${secretId}&source=${source}`
}) })
} }
export const clearMj = async (secretId) => { export const clearMj = async (secretId, source) => {
return await request.delete({ return await request.delete({
url: `/admin-api/applet/xunjia/secret/clear?secretId=${secretId}` url: `/admin-api/applet/xunjia/secret/clear?secretId=${secretId}&source=${source}`
}) })
} }
@ -60,8 +60,8 @@ export const addMjQuestion = async (data) => {
}) })
} }
export const delMjQuestion = async (id) => { export const delMjQuestion = async (id, source) => {
return await request.delete({ return await request.delete({
url: `/admin-api/applet/xunjia/secret/question/delete?id=${id}` url: `/admin-api/applet/xunjia/secret/question/delete?id=${id}&source=${source}`
}) })
} }

@ -20,9 +20,9 @@ export const addQuestion = async (data) => {
}) })
} }
export const deleteQuestion = async (id) => { export const deleteQuestion = async (id, source) => {
return await request.delete({ return await request.delete({
url: '/admin-api/applet/xunjia/question/delete?id=' + id url: `/admin-api/applet/xunjia/question/delete?id=${id}&source=${source}`
}) })
} }

@ -33,23 +33,23 @@ const { t } = useI18n()
} }
**/ **/
const remainingRouter: AppRouteRecordRaw[] = [ const remainingRouter: AppRouteRecordRaw[] = [
{ // {
path: '/redirect', // path: '/redirect',
component: Layout, // component: Layout,
name: 'Redirect', // name: 'Redirect',
children: [ // children: [
{ // {
path: '/redirect/:path(.*)', // path: '/redirect/:path(.*)',
name: 'Redirect', // name: 'Redirect',
component: () => import('@/views/Redirect/Redirect.vue'), // component: () => import('@/views/Redirect/Redirect.vue'),
meta: {} // meta: {}
} // }
], // ],
meta: { // meta: {
hidden: true, // hidden: true,
noTagsView: true // noTagsView: true
} // }
}, // },
{ {
path: '/', path: '/',
component: Layout, component: Layout,
@ -72,18 +72,18 @@ const remainingRouter: AppRouteRecordRaw[] = [
} }
] ]
}, },
// { {
// path: '/swagger', path: '/swagger',
// component: () => import('@/views/Basic/Swagger/index.vue'), component: () => import('@/views/Basic/Swagger/index.vue'),
// name: 'swagger', name: 'swagger',
// meta: { meta: {
// title: '接口文档', title: '接口文档',
// noCache: true, noCache: true,
// hidden: true, hidden: true,
// canTo: true, canTo: true,
// icon: '' icon: ''
// } }
// }, },
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,

@ -97,4 +97,18 @@
/* 去除 Firefox 中的指示器 */ /* 去除 Firefox 中的指示器 */
.el-input__inner[type='number'] { .el-input__inner[type='number'] {
-moz-appearance: textfield; -moz-appearance: textfield;
}
.flex-radio{
display: flex;
width: 100%;
align-items: center;
line-height: 40px;
height: 40px;
.el-radio__label {
display: flex;
width: 100%;
align-items: center;
font-size: 16px;
}
} }

@ -0,0 +1,24 @@
<template>
<IFrame :src="src" />
</template>
<script lang="ts" setup>
import * as ConfigApi from '@/api/infra/config'
defineOptions({ name: 'InfraSwagger' })
const loading = ref(true) //
const src = ref(import.meta.env.VITE_BASE_URL + '/doc.html') // Knife4j UI
// const src = ref(import.meta.env.VITE_BASE_URL + '/swagger-ui') // Swagger UI
/** 初始化 */
onMounted(async () => {
try {
const data = await ConfigApi.getConfigKey('url.swagger')
if (data && data.length > 0) {
src.value = data
}
} finally {
loading.value = false
}
})
</script>

@ -264,7 +264,7 @@ const open = (info = undefined, opts) => {
if (info) { if (info) {
dialogForm.value = { ...info, chapter: parseInt(info.chapter) } dialogForm.value = { ...info, chapter: parseInt(info.chapter) }
if (dialogForm.value.imageUrl) { if (dialogForm.value.imageUrl) {
imgUrl.value = 'https://ss-cloud.ahduima.com/xjxc/pic/' + dialogForm.value.imageUrl imgUrl.value = dialogForm.value.imageUrl.includes('http') ? dialogForm.value.imageUrl : 'https://ss-cloud.ahduima.com/xjxc/pic/' + dialogForm.value.imageUrl
} }
} }
info.source = info.source info.source = info.source

@ -82,8 +82,8 @@
<template #default="{ row }"> <template #default="{ row }">
<el-image <el-image
v-if="row.imageUrl" v-if="row.imageUrl"
:src="`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`" :src="getShowImg(row)"
:preview-src-list="[`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`]" :preview-src-list="[getShowImg(row)]"
:lazy="true" :lazy="true"
style="width: 80px" style="width: 80px"
preview-teleported preview-teleported
@ -176,6 +176,10 @@ const getQuestionChapter = () => {
}) })
} }
function getShowImg(row) {
return row.imageUrl.includes('http') ? row.imageUrl : `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
}
function getList() { function getList() {
loading.value = true loading.value = true
searchQuestion(queryParams.value).then((response) => { searchQuestion(queryParams.value).then((response) => {
@ -205,10 +209,19 @@ function handleAdd() {
) )
} }
function handleDelete(id) { function handleDelete(row) {
deleteQuestion(id).then(() => { message
getList() .confirm('是否确认删除该题?')
}) .then(function () {
deleteQuestion(row.id, row.source).then(() => {
getList()
})
})
.then(() => {
getQuestionList()
message.success('删除题目成功')
})
.catch(() => {})
} }
function handleChangeSource() { function handleChangeSource() {

@ -101,6 +101,7 @@
:src="`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`" :src="`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`"
:preview-src-list="[`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`]" :preview-src-list="[`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`]"
:lazy="true" :lazy="true"
preview-teleported
style="width: 80px" style="width: 80px"
/> />
</template> </template>
@ -142,9 +143,10 @@
<template #default="{ row }"> <template #default="{ row }">
<el-image <el-image
v-if="row.imageUrl" v-if="row.imageUrl"
:src="`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`" :src="getShowImg(row)"
:preview-src-list="[`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`]" :preview-src-list="[getShowImg(row)]"
:lazy="true" :lazy="true"
preview-teleported
style="width: 80px" style="width: 80px"
/> />
</template> </template>
@ -189,7 +191,8 @@ watch(
const queryParams = ref({ const queryParams = ref({
carTypeId: '1001', carTypeId: '1001',
subject: '1' subject: '1',
source: props.source
}) })
const mjIndex = ref(0) const mjIndex = ref(0)
const mjList = ref([]) const mjList = ref([])
@ -203,6 +206,10 @@ onMounted(() => {
searchMj() searchMj()
}) })
function getShowImg(row) {
return row.imageUrl.includes('http') ? row.imageUrl : `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
}
function addMjItem() { function addMjItem() {
addMj(queryParams.value).then((res) => { addMj(queryParams.value).then((res) => {
if (res) { if (res) {
@ -231,7 +238,7 @@ function removeMj(item) {
message message
.confirm('是否确认删除密卷?') .confirm('是否确认删除密卷?')
.then(function () { .then(function () {
return delMj(item.secretId) return delMj(item.secretId, queryParams.value.source)
}) })
.then(() => { .then(() => {
searchMj() searchMj()
@ -243,7 +250,7 @@ function clearMjDetail(item) {
message message
.confirm('是否确认清空密卷题目?') .confirm('是否确认清空密卷题目?')
.then(function () { .then(function () {
return clearMj(item.secretId) return clearMj(item.secretId, queryParams.value.source)
}) })
.then(() => { .then(() => {
getQuestionList() getQuestionList()
@ -277,7 +284,7 @@ function takeoutMj(row) {
message message
.confirm('是否确认将该题移出密卷?') .confirm('是否确认将该题移出密卷?')
.then(function () { .then(function () {
return delMjQuestion(row.id) return delMjQuestion(row.id, queryParams.value.source)
}) })
.then(() => { .then(() => {
getQuestionList() getQuestionList()
@ -287,7 +294,8 @@ function takeoutMj(row) {
} }
function getQuestionList() { function getQuestionList() {
getMjQuestionList({ getMjQuestionList({
secretId: mjList.value[mjIndex.value].secretId secretId: mjList.value[mjIndex.value].secretId,
source: queryParams.value.source
}).then((resp) => { }).then((resp) => {
tableList.value = resp tableList.value = resp
}) })
@ -295,7 +303,8 @@ 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 subId: row.subId,
source: queryParams.value.source
}) })
.then((resp) => { .then((resp) => {
if (resp) { if (resp) {

@ -56,9 +56,10 @@
<template #default="{ row }"> <template #default="{ row }">
<el-image <el-image
v-if="row.imageUrl" v-if="row.imageUrl"
:src="`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`" :src="getShowImg(row)"
:preview-src-list="[`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`]" :preview-src-list="[getShowImg(row)]"
:lazy="true" :lazy="true"
preview-teleported
style="width: 80px" style="width: 80px"
/> />
</template> </template>
@ -109,6 +110,7 @@
:src="`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`" :src="`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`"
:preview-src-list="[`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`]" :preview-src-list="[`https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`]"
:lazy="true" :lazy="true"
preview-teleported
style="width: 80px" style="width: 80px"
/> />
</template> </template>
@ -146,6 +148,7 @@ const message = useMessage() // 消息弹窗
const queryParams = ref({ const queryParams = ref({
carTypeId: '1001', carTypeId: '1001',
subject: '1', subject: '1',
source: props.source,
pageNo: 1, pageNo: 1,
pageSize: 100 pageSize: 100
}) })
@ -161,6 +164,11 @@ const quesLit = ref([])
onMounted(() => { onMounted(() => {
getQuestionList() getQuestionList()
}) })
function getShowImg(row) {
return row.imageUrl.includes('http') ? row.imageUrl : `https://ss-cloud.ahduima.com/xjxc/pic/${row.imageUrl}`
}
function addMjDetail() { function addMjDetail() {
showDialog.value = true showDialog.value = true
} }
@ -178,7 +186,7 @@ function takeoutMj(row) {
message message
.confirm('是否确认将该题移出精选?') .confirm('是否确认将该题移出精选?')
.then(function () { .then(function () {
return delJxData(row.id) return delJxData(row.id, queryParams.value.source)
}) })
.then(() => { .then(() => {
getQuestionList() getQuestionList()
@ -196,7 +204,8 @@ function sureAddQues(row) {
addJx({ addJx({
questionId: row.questionId, questionId: row.questionId,
carTypeId: queryParams.value.carTypeId, carTypeId: queryParams.value.carTypeId,
subject: queryParams.value.subject subject: queryParams.value.subject,
source: queryParams.value.source
}) })
.then((resp) => { .then((resp) => {
if (resp) { if (resp) {

Loading…
Cancel
Save