Merge pull request 'sc' (#1) from dev-zcx into main

Reviewed-on: #1
dev-cl^2
qiushanhe 1 week ago
commit 479a0d5580
  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({
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({
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({
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({
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({
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[] = [
{
path: '/redirect',
component: Layout,
name: 'Redirect',
children: [
{
path: '/redirect/:path(.*)',
name: 'Redirect',
component: () => import('@/views/Redirect/Redirect.vue'),
meta: {}
}
],
meta: {
hidden: true,
noTagsView: true
}
},
// {
// path: '/redirect',
// component: Layout,
// name: 'Redirect',
// children: [
// {
// path: '/redirect/:path(.*)',
// name: 'Redirect',
// component: () => import('@/views/Redirect/Redirect.vue'),
// meta: {}
// }
// ],
// meta: {
// hidden: true,
// noTagsView: true
// }
// },
{
path: '/',
component: Layout,
@ -72,18 +72,18 @@ const remainingRouter: AppRouteRecordRaw[] = [
}
]
},
// {
// path: '/swagger',
// component: () => import('@/views/Basic/Swagger/index.vue'),
// name: 'swagger',
// meta: {
// title: '接口文档',
// noCache: true,
// hidden: true,
// canTo: true,
// icon: ''
// }
// },
{
path: '/swagger',
component: () => import('@/views/Basic/Swagger/index.vue'),
name: 'swagger',
meta: {
title: '接口文档',
noCache: true,
hidden: true,
canTo: true,
icon: ''
}
},
{
path: '/user',
component: Layout,

@ -97,4 +97,18 @@
/* 去除 Firefox 中的指示器 */
.el-input__inner[type='number'] {
-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) {
dialogForm.value = { ...info, chapter: parseInt(info.chapter) }
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

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

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

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

Loading…
Cancel
Save