【新增】 word出题页面,半完善
This commit is contained in:

committed by
陆光LG

parent
47c5b20707
commit
5ce98a1e7f
@@ -16,6 +16,11 @@ export const getSimpleWordList = async (): Promise<WordVO[]> => {
|
|||||||
return await request.get({ url: '/wps/word/simple-list' })
|
return await request.get({ url: '/wps/word/simple-list' })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询Word节点列表(小类)
|
||||||
|
export const getWordInfos = async (params: any) => {
|
||||||
|
return await request.get({ url: '/wps/word/listInfo', params })
|
||||||
|
}
|
||||||
|
|
||||||
// 查询Word节点列表
|
// 查询Word节点列表
|
||||||
export const getWordPage = async (params: PageParam) => {
|
export const getWordPage = async (params: PageParam) => {
|
||||||
return await request.get({ url: '/wps/word/list', params })
|
return await request.get({ url: '/wps/word/list', params })
|
||||||
@@ -40,3 +45,11 @@ export const updateWord = async (params: WordVO) => {
|
|||||||
export const deleteWord = async (id: number) => {
|
export const deleteWord = async (id: number) => {
|
||||||
return await request.delete({ url: '/wps/word/delete?id=' + id })
|
return await request.delete({ url: '/wps/word/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
// 获取Word考点(大类)
|
||||||
|
export const getWordInfo = async (path: String) => {
|
||||||
|
return await request.get({ url: '/tool/wps/runWpsWord?path=' + path })
|
||||||
|
}
|
||||||
|
// 获取Word考点()
|
||||||
|
export const getWordListInfos = async (data: any) => {
|
||||||
|
return await request.post({ url: '/tool/wps/runWpsWordInfo' , data })
|
||||||
|
}
|
||||||
|
@@ -115,6 +115,7 @@ export enum DICT_TYPE {
|
|||||||
|
|
||||||
WPS_WORD = "wps_word",
|
WPS_WORD = "wps_word",
|
||||||
WORD_BELONG_TO = "word_belong_to",
|
WORD_BELONG_TO = "word_belong_to",
|
||||||
|
WORD_ISBOO = "word_isboo",
|
||||||
WPS_PPTX = "wps_pptx",
|
WPS_PPTX = "wps_pptx",
|
||||||
PPTX_BELONG_TO = "pptx_belong_to",
|
PPTX_BELONG_TO = "pptx_belong_to",
|
||||||
QUESTION_AUDIT="question_audit",
|
QUESTION_AUDIT="question_audit",
|
||||||
|
@@ -9,8 +9,8 @@
|
|||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="昵称" prop="nickname">
|
<el-form-item label="姓名" prop="nickname">
|
||||||
<el-input v-model="formData.nickname" placeholder="请输入昵称" />
|
<el-input v-model="formData.nickname" placeholder="请输入姓名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -144,7 +144,7 @@ const formData = ref({
|
|||||||
})
|
})
|
||||||
const formRules = reactive<FormRules>({
|
const formRules = reactive<FormRules>({
|
||||||
username: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }],
|
username: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }],
|
||||||
nickname: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
|
nickname: [{ required: true, message: '用户姓名不能为空', trigger: 'blur' }],
|
||||||
password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }],
|
password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }],
|
||||||
className: [{ required: true, message: '班级不能为空', trigger: 'blur' }]
|
className: [{ required: true, message: '班级不能为空', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
|
@@ -9,8 +9,8 @@
|
|||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="教师昵称" prop="nickname">
|
<el-form-item label="教师姓名" prop="nickname">
|
||||||
<el-input v-model="formData.nickname" placeholder="请输入教师昵称" />
|
<el-input v-model="formData.nickname" placeholder="请输入教师姓名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -162,8 +162,8 @@ const formData = ref({
|
|||||||
specialtyIds: []
|
specialtyIds: []
|
||||||
})
|
})
|
||||||
const formRules = reactive<FormRules>({
|
const formRules = reactive<FormRules>({
|
||||||
username: [{ required: true, message: '教师名称不能为空', trigger: 'blur' }],
|
username: [{ required: true, message: '教师账号不能为空', trigger: 'blur' }],
|
||||||
nickname: [{ required: true, message: '教师昵称不能为空', trigger: 'blur' }],
|
nickname: [{ required: true, message: '教师姓名不能为空', trigger: 'blur' }],
|
||||||
password: [{ required: true, message: '教师密码不能为空', trigger: 'blur' }],
|
password: [{ required: true, message: '教师密码不能为空', trigger: 'blur' }],
|
||||||
mobile: [
|
mobile: [
|
||||||
{
|
{
|
||||||
|
682
src/views/paper/question/WpsWordForm.vue
Normal file
682
src/views/paper/question/WpsWordForm.vue
Normal file
@@ -0,0 +1,682 @@
|
|||||||
|
<template>
|
||||||
|
<div class="edit-dialog">
|
||||||
|
<Dialog v-model="dialogVisible" :title="dialogTitle" width="85%" top="10vh">
|
||||||
|
<el-scrollbar>
|
||||||
|
<div class="main">
|
||||||
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
v-loading="formLoading"
|
||||||
|
:model="formData"
|
||||||
|
:rules="formRules"
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="专业" prop="specialtyName">
|
||||||
|
<el-input v-model="formData.specialtyName" placeholder="请输入专业" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="知识点" prop="pointNames">
|
||||||
|
<el-input v-model="formData.pointNames" placeholder="请输入知识点" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="课程" prop="courseName">
|
||||||
|
<el-input v-model="formData.courseName" placeholder="请输入课程" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="题型难度" prop="quLevel">
|
||||||
|
<el-input v-model="formData.quLevel" placeholder="请输入题型难度" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="题型" prop="subjectName">
|
||||||
|
<el-input v-model="formData.subjectName" placeholder="请输入题型" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="章节名称" prop="chapteridDictText">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.chapteridDictText"
|
||||||
|
placeholder="请输入章节名称"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="启用状态" prop="status">
|
||||||
|
<el-radio-group v-model="formData.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.SYS_STATUS)"
|
||||||
|
:key="dict.value"
|
||||||
|
:value="dict.value"
|
||||||
|
>
|
||||||
|
{{ dict.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="edit-bottom">
|
||||||
|
<div class="edit-left bottom-common">
|
||||||
|
<el-tabs v-model="leftActiveName" class="demo-tabs">
|
||||||
|
<el-tab-pane label="试题描述" name="desc">
|
||||||
|
<div class="block">
|
||||||
|
<Editor v-model="formData.content" height="150px" />
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
<div class="edit-right bottom-common">
|
||||||
|
<el-tabs v-model="rightActiveName" class="demo-tabs" @tab-click="rightHandleClick">
|
||||||
|
<el-tab-pane label="试题解析" name="analysis">
|
||||||
|
<div class="block">
|
||||||
|
<Editor v-model="formData.analysis" height="150px" />
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="试题考点" name="answer">
|
||||||
|
<el-button type="warning" @click="addWordInfo">新增</el-button>
|
||||||
|
<el-button type="danger">删除</el-button>
|
||||||
|
<div class="block">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="list"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column label="考点" align="center" prop="contentIn" />
|
||||||
|
<el-table-column label="权值" align="center" prop="scoreRate" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<!-- <el-tab-pane name="medium">
|
||||||
|
<template #label>
|
||||||
|
<div class="custom-tabs-label">
|
||||||
|
<p>媒体文件</p>
|
||||||
|
<el-dropdown>
|
||||||
|
<span class="el-dropdown-link" @click.stop="false">
|
||||||
|
<div class="setting_icon"></div>
|
||||||
|
</span>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
class="upload-demo"
|
||||||
|
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
|
||||||
|
>
|
||||||
|
<el-button>导入</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item>导出</el-dropdown-item>
|
||||||
|
<el-dropdown-item>播放</el-dropdown-item>
|
||||||
|
<el-dropdown-item>编辑</el-dropdown-item>
|
||||||
|
<el-dropdown-item>删除选中</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div class="block">
|
||||||
|
<el-table
|
||||||
|
:data="mediumList"
|
||||||
|
style="width: 100%"
|
||||||
|
@selection-change="handleMediumSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="type" label="媒体类型" width="80" />
|
||||||
|
<el-table-column prop="title" label="标题" />
|
||||||
|
<el-table-column prop="displayIndex" label="显示序号" />
|
||||||
|
<el-table-column prop="size" label="大小" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane> -->
|
||||||
|
<el-tab-pane name="annex">
|
||||||
|
<template #label>
|
||||||
|
<div class="custom-tabs-label">
|
||||||
|
<p>试题附件</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<!-- 提示 -->
|
||||||
|
<el-alert type="warning" show-icon :closable="false">
|
||||||
|
<template #default>
|
||||||
|
<span>提示:文件名称可默认不设置</span>
|
||||||
|
</template>
|
||||||
|
</el-alert>
|
||||||
|
<div class="block">
|
||||||
|
<el-table :data="documentList" style="width: 100%">
|
||||||
|
<el-table-column type="index" label="#" width="50" />
|
||||||
|
<el-table-column label="文件名称" width="250">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="scope.row.fileName"
|
||||||
|
size="small"
|
||||||
|
placeholder="请输入文件名称"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="fileType"
|
||||||
|
label="类型"
|
||||||
|
:formatter="fileTypeFormatter"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="url" label="地址" width="200">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div
|
||||||
|
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
|
||||||
|
:title="row.url"
|
||||||
|
>
|
||||||
|
{{ row.url }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" plain @click="openForm(scope.row.fileType)">
|
||||||
|
<Icon icon="ep:upload" class="mr-5px" /> 上传
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-scrollbar>
|
||||||
|
<template #footer>
|
||||||
|
<el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
|
</div>
|
||||||
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
|
<FileForm ref="FileRef" @success="handleUploadSuccess" />
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogFormVisibleWordInfo" title="考点设置" width="400px">
|
||||||
|
<el-tree
|
||||||
|
style="max-width: 600px"
|
||||||
|
:data="wordPointsList"
|
||||||
|
:props="defaultProps"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
@node-click="handleNodelClick"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogFormVisibleWordInfos" :title="titles" width="300px">
|
||||||
|
<el-tree
|
||||||
|
style="max-width: 600px"
|
||||||
|
:data="wordPointsInfoList"
|
||||||
|
:props="defaultProps"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
show-checkbox
|
||||||
|
@check-change="handleCheckChange"
|
||||||
|
/>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" @click="submitWordPoints">确 定</el-button>
|
||||||
|
<el-button @click="dialogFormVisibleWordInfos = false">取 消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||||
|
import { FormRules } from 'element-plus'
|
||||||
|
import * as QuestionApi from '@/api/paper/question'
|
||||||
|
import * as WordApi from '@/api/wps/word'
|
||||||
|
import FileForm from './components/FileForm.vue'
|
||||||
|
import WordInfo from './components/WordInfo.vue'
|
||||||
|
import WordInfos from './components/WordInfos.vue'
|
||||||
|
import { defaultProps, handleTree } from '@/utils/tree'
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
|
defineOptions({ name: 'WpsWordFrom' })
|
||||||
|
const wordPointsList = ref<Tree[]>([]) // 树形结构
|
||||||
|
const wordPointsInfoList = ref<Tree[]>([]) // 树形结构
|
||||||
|
|
||||||
|
const list = ref([]) // 列表的数
|
||||||
|
const { t } = useI18n() // 国际化
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
const loading = ref(false) // 列表的加载中
|
||||||
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
|
const formData = ref({
|
||||||
|
content: '',
|
||||||
|
specialtyName: '',
|
||||||
|
courseName: '',
|
||||||
|
quBankName: '',
|
||||||
|
required: '',
|
||||||
|
chapteridDictText: '',
|
||||||
|
analysis: '',
|
||||||
|
quLevel: '',
|
||||||
|
pointNames: '',
|
||||||
|
audit: '',
|
||||||
|
subjectName: '',
|
||||||
|
status: ' ',
|
||||||
|
resourceValue: ''
|
||||||
|
})
|
||||||
|
const wordPointsFun = ref({
|
||||||
|
chineseName: '',
|
||||||
|
function: ''
|
||||||
|
})
|
||||||
|
const wordPoints = ref({
|
||||||
|
id: '',
|
||||||
|
chineseName: '',
|
||||||
|
englishName: '',
|
||||||
|
filePath: '',
|
||||||
|
type: '',
|
||||||
|
belongTo: '',
|
||||||
|
parameter: '',
|
||||||
|
function: [] as {
|
||||||
|
chineseName: string
|
||||||
|
function: string
|
||||||
|
}[]
|
||||||
|
})
|
||||||
|
let wordPointsInfosList: (typeof wordPoints)[] = []
|
||||||
|
|
||||||
|
function fileTypeFormatter(row, column, cellValue) {
|
||||||
|
if (cellValue === '1') return '考试文件'
|
||||||
|
if (cellValue === '2') return '结果文件'
|
||||||
|
return '未知类型'
|
||||||
|
}
|
||||||
|
const documentList = ref([
|
||||||
|
{
|
||||||
|
quId: '',
|
||||||
|
url: '',
|
||||||
|
fileType: '1',
|
||||||
|
fileName: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
quId: '',
|
||||||
|
url: '',
|
||||||
|
fileType: '2',
|
||||||
|
fileName: ''
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const dialogFormVisibleWordInfo = ref(false)
|
||||||
|
const dialogFormVisibleWordInfos = ref(false)
|
||||||
|
const nodeFunction = ref('')
|
||||||
|
const titles = ref('')
|
||||||
|
const englishName = ref('')
|
||||||
|
const filePath = ref('')
|
||||||
|
const upFilePath = ref('')
|
||||||
|
|
||||||
|
const functionList = ref<string[]>([])
|
||||||
|
const wordData = reactive({
|
||||||
|
chineseName: '',
|
||||||
|
englishName: '',
|
||||||
|
filePath: '',
|
||||||
|
function: [] as string[]
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleCheckChange = (data: Tree, checked: boolean, indeterminate: boolean) => {
|
||||||
|
if (checked || indeterminate) {
|
||||||
|
wordPoints.value.belongTo = data.belongTo
|
||||||
|
wordPoints.value.parameter = data.isboo
|
||||||
|
wordPoints.value.type = data.type
|
||||||
|
wordPointsFun.value = {
|
||||||
|
chineseName: '',
|
||||||
|
function: ''
|
||||||
|
}
|
||||||
|
wordPointsFun.value.chineseName = data.name
|
||||||
|
wordPointsFun.value.function = data.nodeFunction
|
||||||
|
wordPoints.value.function.push(cloneDeep(wordPointsFun.value))
|
||||||
|
console.log(wordPoints)
|
||||||
|
}
|
||||||
|
console.log(data, checked, indeterminate)
|
||||||
|
}
|
||||||
|
|
||||||
|
const addWordInfo = async () => {
|
||||||
|
// http://115.120.213.238:9000/exam/9f7d8f5d7c68cc2bfd03a23c19045efe7ba13a4bebeb833abece146908bcd0c6.docx documentList.value[1].url
|
||||||
|
if (documentList.value[1].url == '' || documentList.value[1].url == null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const res = await WordApi.getWordInfo(documentList.value[1].url)
|
||||||
|
wordPointsList.value = []
|
||||||
|
wordPointsList.value.push(...handleTree(res))
|
||||||
|
dialogFormVisibleWordInfo.value = true
|
||||||
|
}
|
||||||
|
const queryParams = reactive({
|
||||||
|
nodeFunction: undefined
|
||||||
|
})
|
||||||
|
const handleSpecialtyNodeClick = async (row: any) => {
|
||||||
|
titles.value = row.name
|
||||||
|
englishName.value = row.englishName
|
||||||
|
filePath.value = row.filePath
|
||||||
|
nodeFunction.value = row.selectName
|
||||||
|
dialogFormVisibleWordInfos.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleNodelClick = async (row: any) => {
|
||||||
|
queryParams.nodeFunction = row.selectName
|
||||||
|
wordPoints.value.chineseName = row.name.split(':')[0]
|
||||||
|
wordPoints.value.englishName = row.englishName
|
||||||
|
wordPoints.value.filePath = row.filePath
|
||||||
|
wordPoints.value.id = row.id
|
||||||
|
const res = await WordApi.getWordInfos(queryParams)
|
||||||
|
wordPointsInfoList.value = []
|
||||||
|
wordPointsInfoList.value.push(...handleTree(res))
|
||||||
|
dialogFormVisibleWordInfos.value = true
|
||||||
|
}
|
||||||
|
const submitWordPoints = async () => {
|
||||||
|
wordPointsInfosList.push(wordPoints.value)
|
||||||
|
const res = await WordApi.getWordListInfos(wordPointsInfosList)
|
||||||
|
wordPoints.value = {
|
||||||
|
id: '',
|
||||||
|
chineseName: '',
|
||||||
|
englishName: '',
|
||||||
|
filePath: '',
|
||||||
|
type: '',
|
||||||
|
belongTo: '',
|
||||||
|
parameter: '',
|
||||||
|
function: []
|
||||||
|
}
|
||||||
|
wordPointsInfosList = []
|
||||||
|
list.value = res
|
||||||
|
dialogFormVisibleWordInfo.value = false
|
||||||
|
dialogFormVisibleWordInfos.value = false
|
||||||
|
}
|
||||||
|
const formRules = reactive<FormRules>({
|
||||||
|
// specialtyName: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }]
|
||||||
|
})
|
||||||
|
const formRef = ref() // 表单 Ref
|
||||||
|
// 左侧试题描述
|
||||||
|
const leftActiveName = ref('desc')
|
||||||
|
// 右侧tab
|
||||||
|
const rightActiveName = ref('annex')
|
||||||
|
const rightHandleClick = (tab, e) => {
|
||||||
|
rightActiveName.value = tab.paneName.value
|
||||||
|
}
|
||||||
|
const radio = ref('A')
|
||||||
|
// 保留选项的值
|
||||||
|
const optionsContent = reactive({})
|
||||||
|
|
||||||
|
// 关键字
|
||||||
|
const multipleKeywordSelection = ref([] as any)
|
||||||
|
const handleKeywordSelectionChange = (val: any) => {
|
||||||
|
multipleKeywordSelection.value = val
|
||||||
|
}
|
||||||
|
const selections = ref([])
|
||||||
|
const handleSelectionChange = (rows) => {
|
||||||
|
selections.value = rows
|
||||||
|
}
|
||||||
|
const keyWord = ref([null])
|
||||||
|
|
||||||
|
/** 添加/修改操作 */
|
||||||
|
const FileRef = ref()
|
||||||
|
const openForm = (type: string) => {
|
||||||
|
FileRef.value.open(type)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 媒体文件
|
||||||
|
const mediumList = ref([] as any)
|
||||||
|
const multipleMediumSelection = ref([] as any)
|
||||||
|
const handleMediumSelectionChange = (val: any) => {
|
||||||
|
multipleMediumSelection.value = val
|
||||||
|
}
|
||||||
|
const fileList = []
|
||||||
|
|
||||||
|
const multipleDocumentSelection = ref([] as any)
|
||||||
|
const handleDocumentSelectionChange = (val: any) => {
|
||||||
|
multipleDocumentSelection.value = val
|
||||||
|
}
|
||||||
|
const handleUploadSuccess = ({ url, fileType }) => {
|
||||||
|
const index = documentList.value.findIndex((item) => item.fileType === fileType)
|
||||||
|
if (index !== -1) {
|
||||||
|
documentList.value[index].url = url
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** 打开弹窗 */
|
||||||
|
const open = async (queryParams: any, type: string, id?: number) => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
dialogTitle.value = t('action.' + type)
|
||||||
|
formType.value = type
|
||||||
|
|
||||||
|
// 修改时,设置数据
|
||||||
|
if (id) {
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = await QuestionApi.getQuestion(id)
|
||||||
|
formData.value = res
|
||||||
|
documentList.value = res.fileUploads
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
resetForm()
|
||||||
|
formData.value.specialtyName = queryParams.specialtyName
|
||||||
|
formData.value.courseName = queryParams.courseName
|
||||||
|
formData.value.subjectName = queryParams.subjectName
|
||||||
|
formData.value.pointNames = queryParams.pointNames
|
||||||
|
formData.value.chapteridDictText = queryParams.chapteridDictText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
// 转换函数:将大写字母 A-Z 映射为 0-25
|
||||||
|
const mappedNumber = computed(() => {
|
||||||
|
const char = radio.value.toUpperCase()
|
||||||
|
const code = char.charCodeAt(0)
|
||||||
|
if (code >= 65 && code <= 90) {
|
||||||
|
return code - 65
|
||||||
|
} else {
|
||||||
|
return '请输入 A-Z 的字母'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
/** 提交表单 */
|
||||||
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
|
const submitForm = async () => {
|
||||||
|
const values = Object.values(optionsContent)
|
||||||
|
console.log(values)
|
||||||
|
|
||||||
|
// 校验表单
|
||||||
|
if (!formRef) return
|
||||||
|
const valid = await formRef.value.validate()
|
||||||
|
if (!valid) return
|
||||||
|
// 提交请求
|
||||||
|
formLoading.value = true
|
||||||
|
try {
|
||||||
|
const data = formData.value as unknown
|
||||||
|
if (formType.value === 'create') {
|
||||||
|
await QuestionApi.addQuestion(data)
|
||||||
|
message.success(t('common.createSuccess'))
|
||||||
|
} else {
|
||||||
|
await QuestionApi.editQuestion(data)
|
||||||
|
message.success(t('common.updateSuccess'))
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
|
// 发送操作成功的事件
|
||||||
|
emit('success')
|
||||||
|
} finally {
|
||||||
|
formLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置表单 */
|
||||||
|
const resetForm = () => {
|
||||||
|
formData.value = {
|
||||||
|
content: '',
|
||||||
|
specialtyName: '',
|
||||||
|
courseName: '',
|
||||||
|
quBankName: '',
|
||||||
|
required: '',
|
||||||
|
chapteridDictText: '',
|
||||||
|
analysis: '',
|
||||||
|
quLevel: '',
|
||||||
|
pointNames: '',
|
||||||
|
audit: '',
|
||||||
|
subjectName: '',
|
||||||
|
status: '',
|
||||||
|
resourceValue: ''
|
||||||
|
}
|
||||||
|
documentList.value = [
|
||||||
|
{
|
||||||
|
quId: '',
|
||||||
|
url: '',
|
||||||
|
fileType: '1',
|
||||||
|
fileName: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
quId: '',
|
||||||
|
url: '',
|
||||||
|
fileType: '2',
|
||||||
|
fileName: ''
|
||||||
|
}
|
||||||
|
]
|
||||||
|
formRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.edit-dialog {
|
||||||
|
:deep(.el-dialog) {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.el-dialog__header {
|
||||||
|
border-bottom: 1px solid #ededed;
|
||||||
|
}
|
||||||
|
.el-dialog__footer {
|
||||||
|
border-top: 1px solid #ededed;
|
||||||
|
}
|
||||||
|
.el-dialog__body {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
.main {
|
||||||
|
.el-form {
|
||||||
|
padding: 10px;
|
||||||
|
.el-row {
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.el-form-item {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 0;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.edit-bottom {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
.bottom-common {
|
||||||
|
width: calc(50% - 10px);
|
||||||
|
.el-tabs {
|
||||||
|
height: 100%;
|
||||||
|
.el-tabs__content {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
.block {
|
||||||
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.answer {
|
||||||
|
.tip {
|
||||||
|
color: #8a6d3b;
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
border-color: #faebcc;
|
||||||
|
padding: 10px 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> p {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-radio-group {
|
||||||
|
width: 100%;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
font-size: 0;
|
||||||
|
flex-direction: column;
|
||||||
|
.options {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 15px;
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
.text {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
border: 1px solid #ededed;
|
||||||
|
.el-textarea__inner {
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.more-btn {
|
||||||
|
margin-top: 8px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-color: #007bff;
|
||||||
|
color: #007bff;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
padding: 10px 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-tabs-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.setting_icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
background: url('@/assets/icon/setting_blue.png') no-repeat center;
|
||||||
|
background-size: 100%;
|
||||||
|
margin-left: 3px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.is-active {
|
||||||
|
.custom-tabs-label {
|
||||||
|
.setting_icon {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.ele-pro-table) {
|
||||||
|
flex: 1;
|
||||||
|
margin-top: 10px;
|
||||||
|
.el-table--fit {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.tox-tinymce) {
|
||||||
|
.tox-statusbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-table) {
|
||||||
|
.el-table__header-wrapper {
|
||||||
|
.el-table__header {
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
th {
|
||||||
|
background: #ebebeb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@@ -337,6 +337,8 @@
|
|||||||
|
|
||||||
<BdesignForm ref="bformRef" @success="getList" />
|
<BdesignForm ref="bformRef" @success="getList" />
|
||||||
<FdesignForm ref="fformRef" @success="getList" />
|
<FdesignForm ref="fformRef" @success="getList" />
|
||||||
|
<WpsWordForm ref="wformRef" @success="getList" />
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -353,6 +355,7 @@ import MdesignForm from './MysqlForm.vue'
|
|||||||
import BdesignForm from './BrowerForm.vue'
|
import BdesignForm from './BrowerForm.vue'
|
||||||
import FdesignForm from './FileForm.vue'
|
import FdesignForm from './FileForm.vue'
|
||||||
import UserImportForm from './UserImportForm.vue'
|
import UserImportForm from './UserImportForm.vue'
|
||||||
|
import WpsWordForm from './WpsWordForm.vue'
|
||||||
import UserAssignRoleForm from './UserAssignRoleForm.vue'
|
import UserAssignRoleForm from './UserAssignRoleForm.vue'
|
||||||
import DeptTree from './DeptTree.vue'
|
import DeptTree from './DeptTree.vue'
|
||||||
import SpecialtyTree from './SpecialtyTree.vue'
|
import SpecialtyTree from './SpecialtyTree.vue'
|
||||||
@@ -664,6 +667,8 @@ const cformRef = ref()
|
|||||||
const mformRef = ref()
|
const mformRef = ref()
|
||||||
const bformRef = ref()
|
const bformRef = ref()
|
||||||
const fformRef = ref()
|
const fformRef = ref()
|
||||||
|
const wformRef = ref()
|
||||||
|
|
||||||
const openForm = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
console.log(queryParams)
|
console.log(queryParams)
|
||||||
if (queryParams.subjectName == "") {
|
if (queryParams.subjectName == "") {
|
||||||
@@ -679,6 +684,8 @@ const openForm = (type: string, id?: number) => {
|
|||||||
bformRef.value.open(queryParams,type, id)
|
bformRef.value.open(queryParams,type, id)
|
||||||
}else if(chooseQuestionType.value.includes("文件处理")) {
|
}else if(chooseQuestionType.value.includes("文件处理")) {
|
||||||
fformRef.value.open(queryParams,type, id)
|
fformRef.value.open(queryParams,type, id)
|
||||||
|
} else if (chooseQuestionType.value.includes("文字")){
|
||||||
|
wformRef.value.open(queryParams,type, id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -127,7 +127,7 @@
|
|||||||
>
|
>
|
||||||
菜单权限
|
菜单权限
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-hasPermi="['system:permission:assign-role-data-scope']"
|
v-hasPermi="['system:permission:assign-role-data-scope']"
|
||||||
link
|
link
|
||||||
preIcon="ep:coin"
|
preIcon="ep:coin"
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
@click="openDataPermissionForm(scope.row)"
|
@click="openDataPermissionForm(scope.row)"
|
||||||
>
|
>
|
||||||
数据权限
|
数据权限
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPermi="['system:role:delete']"
|
v-hasPermi="['system:role:delete']"
|
||||||
link
|
link
|
||||||
|
@@ -5,13 +5,13 @@
|
|||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="80px"
|
label-width="120px"
|
||||||
>
|
>
|
||||||
<el-form-item label="租户名" prop="name">
|
<el-form-item label="学校用户名" prop="name">
|
||||||
<el-input v-model="formData.name" placeholder="请输入租户名" />
|
<el-input v-model="formData.name" placeholder="请输入学校用户名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="租户套餐" prop="packageId">
|
<el-form-item label="学校用户权限" prop="packageId">
|
||||||
<el-select v-model="formData.packageId" clearable placeholder="请选择租户套餐">
|
<el-select v-model="formData.packageId" clearable placeholder="请选择学校用户权限">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in packageList"
|
v-for="item in packageList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -37,14 +37,14 @@
|
|||||||
type="password"
|
type="password"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="账号额度" prop="accountCount">
|
<!-- <el-form-item label="账号额度" prop="accountCount">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="formData.accountCount"
|
v-model="formData.accountCount"
|
||||||
:min="0"
|
:min="0"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
placeholder="请输入账号额度"
|
placeholder="请输入账号额度"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="过期时间" prop="expireTime">
|
<el-form-item label="过期时间" prop="expireTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.expireTime"
|
v-model="formData.expireTime"
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<el-form-item label="绑定域名" prop="website">
|
<el-form-item label="绑定域名" prop="website">
|
||||||
<el-input v-model="formData.website" placeholder="请输入绑定域名" />
|
<el-input v-model="formData.website" placeholder="请输入绑定域名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="租户状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-radio-group v-model="formData.status">
|
<el-radio-group v-model="formData.status">
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
@@ -111,11 +111,10 @@ const formData = ref({
|
|||||||
password: undefined
|
password: undefined
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
name: [{ required: true, message: '租户名不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '学校用户名不能为空', trigger: 'blur' }],
|
||||||
packageId: [{ required: true, message: '租户套餐不能为空', trigger: 'blur' }],
|
packageId: [{ required: true, message: '学校用户权限不能为空', trigger: 'blur' }],
|
||||||
contactName: [{ required: true, message: '联系人不能为空', trigger: 'blur' }],
|
contactName: [{ required: true, message: '联系人不能为空', trigger: 'blur' }],
|
||||||
status: [{ required: true, message: '租户状态不能为空', trigger: 'blur' }],
|
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
|
||||||
accountCount: [{ required: true, message: '账号额度不能为空', trigger: 'blur' }],
|
|
||||||
expireTime: [{ required: true, message: '过期时间不能为空', trigger: 'blur' }],
|
expireTime: [{ required: true, message: '过期时间不能为空', trigger: 'blur' }],
|
||||||
website: [{ required: true, message: '绑定域名不能为空', trigger: 'blur' }],
|
website: [{ required: true, message: '绑定域名不能为空', trigger: 'blur' }],
|
||||||
username: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }],
|
username: [{ required: true, message: '用户名称不能为空', trigger: 'blur' }],
|
||||||
@@ -171,6 +170,7 @@ const submitForm = async () => {
|
|||||||
// 拼接子表的数据
|
// 拼接子表的数据
|
||||||
data.tenantSpecialtyPointsVOList = demo03CourseFormRef.value.getData()
|
data.tenantSpecialtyPointsVOList = demo03CourseFormRef.value.getData()
|
||||||
if (formType.value === 'create') {
|
if (formType.value === 'create') {
|
||||||
|
data.accountCount = 99999;
|
||||||
await TenantApi.createTenant(data)
|
await TenantApi.createTenant(data)
|
||||||
message.success(t('common.createSuccess'))
|
message.success(t('common.createSuccess'))
|
||||||
} else {
|
} else {
|
||||||
|
@@ -10,10 +10,10 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="租户名" prop="name">
|
<el-form-item label="学校用户名" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入租户名"
|
placeholder="请输入学校用户名"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
@@ -99,11 +99,11 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="租户编号" align="center" prop="id" />
|
<el-table-column label="学校用户编号" align="center" prop="id" />
|
||||||
<el-table-column label="租户名" align="center" prop="name" />
|
<el-table-column label="学校用户名" align="center" prop="name" />
|
||||||
<el-table-column label="租户套餐" align="center" prop="packageId">
|
<el-table-column label="学校用户权限" align="center" prop="packageId">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.packageId === 0" type="danger">系统租户</el-tag>
|
<el-tag v-if="scope.row.packageId === 0" type="danger">中心服务器</el-tag>
|
||||||
<template v-else v-for="item in packageList">
|
<template v-else v-for="item in packageList">
|
||||||
<el-tag type="success" :key="item.id" v-if="item.id === scope.row.packageId">
|
<el-tag type="success" :key="item.id" v-if="item.id === scope.row.packageId">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
@@ -113,11 +113,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系人" align="center" prop="contactName" />
|
<el-table-column label="联系人" align="center" prop="contactName" />
|
||||||
<el-table-column label="联系手机" align="center" prop="contactMobile" />
|
<el-table-column label="联系手机" align="center" prop="contactMobile" />
|
||||||
<el-table-column label="账号额度" align="center" prop="accountCount">
|
<!-- <el-table-column label="账号额度" align="center" prop="accountCount">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag>{{ scope.row.accountCount }}</el-tag>
|
<el-tag>{{ scope.row.accountCount }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="过期时间"
|
label="过期时间"
|
||||||
align="center"
|
align="center"
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="绑定域名" align="center" prop="website" width="180" />
|
<el-table-column label="绑定域名" align="center" prop="website" width="180" />
|
||||||
<el-table-column label="租户状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
@@ -292,7 +292,7 @@ const handleExport = async () => {
|
|||||||
// 发起导出
|
// 发起导出
|
||||||
exportLoading.value = true
|
exportLoading.value = true
|
||||||
const data = await TenantApi.exportTenant(queryParams)
|
const data = await TenantApi.exportTenant(queryParams)
|
||||||
download.excel(data, '租户列表.xls')
|
download.excel(data, '学校用户列表.xls')
|
||||||
} catch {
|
} catch {
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false
|
exportLoading.value = false
|
||||||
|
@@ -7,10 +7,10 @@
|
|||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
>
|
>
|
||||||
<el-form-item label="套餐名" prop="name">
|
<el-form-item label="权限名称" prop="name">
|
||||||
<el-input v-model="formData.name" placeholder="请输入套餐名" />
|
<el-input v-model="formData.name" placeholder="请输入学校用户权限名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="菜单权限">
|
<el-form-item label="权限">
|
||||||
<el-card class="w-full h-400px !overflow-y-scroll" shadow="never">
|
<el-card class="w-full h-400px !overflow-y-scroll" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
全选/全不选:
|
全选/全不选:
|
||||||
@@ -86,7 +86,7 @@ const formData = ref({
|
|||||||
status: CommonStatusEnum.ENABLE
|
status: CommonStatusEnum.ENABLE
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
name: [{ required: true, message: '套餐名不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '学校用户权限名称不能为空', trigger: 'blur' }],
|
||||||
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
|
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }],
|
||||||
menuIds: [{ required: true, message: '关联的菜单编号不能为空', trigger: 'blur' }]
|
menuIds: [{ required: true, message: '关联的菜单编号不能为空', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
|
@@ -10,10 +10,10 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="套餐名" prop="name">
|
<el-form-item label="用户编号" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入套餐名"
|
placeholder="请输入用户编号"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
@@ -58,8 +58,8 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="套餐编号" align="center" prop="id" width="120" />
|
<el-table-column label="用户编号" align="center" prop="id" width="120" />
|
||||||
<el-table-column label="套餐名" align="center" prop="name" />
|
<el-table-column label="学校用户权限名称" align="center" prop="name" />
|
||||||
<el-table-column label="状态" align="center" prop="status" width="100">
|
<el-table-column label="状态" align="center" prop="status" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
<el-form-item label="类型" prop="type">
|
<el-form-item label="类型" prop="type">
|
||||||
<el-select v-model="formData.type" clearable placeholder="请选择状态">
|
<el-select v-model="formData.type" clearable placeholder="请选择状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.WPS_WORD)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.WPS_PPTX)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<el-form-item label="归属" prop="belongTo">
|
<el-form-item label="归属" prop="belongTo">
|
||||||
<el-select v-model="formData.belongTo" clearable placeholder="请选择归属">
|
<el-select v-model="formData.belongTo" clearable placeholder="请选择归属">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.WORD_BELONG_TO)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.PPTX_BELONG_TO)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
<el-input-number v-model="formData.sort" :min="0" controls-position="right" />
|
<el-input-number v-model="formData.sort" :min="0" controls-position="right" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="节点方法" prop="nodeFunction">
|
<el-form-item label="节点方法" prop="nodeFunction">
|
||||||
<el-input v-model="formData.nodeFunction" maxlength="11" placeholder="请输入节点方法" />
|
<el-input v-model="formData.nodeFunction" placeholder="请输入节点方法" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="转中文" prop="toChinese">
|
<el-form-item label="转中文" prop="toChinese">
|
||||||
<el-input v-model="formData.toChinese" maxlength="50" placeholder="请输入转中文" />
|
<el-input v-model="formData.toChinese" maxlength="50" placeholder="请输入转中文" />
|
||||||
@@ -60,6 +60,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="值类型" prop="isboo">
|
||||||
|
<el-select v-model="formData.isboo" clearable placeholder="请选择归属">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.WORD_ISBOO)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@@ -93,7 +103,8 @@ const formData = ref({
|
|||||||
toChinese: undefined,
|
toChinese: undefined,
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
type: CommonStatusEnum.ENABLE,
|
type: CommonStatusEnum.ENABLE,
|
||||||
belongTo: CommonStatusEnum.ENABLE
|
belongTo: CommonStatusEnum.ENABLE,
|
||||||
|
isboo: CommonStatusEnum.ENABLE
|
||||||
})
|
})
|
||||||
const formRules = reactive<FormRules>({
|
const formRules = reactive<FormRules>({
|
||||||
parentId: [{ required: true, message: '上级Word节点不能为空', trigger: 'blur' }],
|
parentId: [{ required: true, message: '上级Word节点不能为空', trigger: 'blur' }],
|
||||||
@@ -162,7 +173,8 @@ const resetForm = () => {
|
|||||||
toChinese: undefined,
|
toChinese: undefined,
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
type: CommonStatusEnum.ENABLE,
|
type: CommonStatusEnum.ENABLE,
|
||||||
belongTo: CommonStatusEnum.ENABLE
|
belongTo: CommonStatusEnum.ENABLE,
|
||||||
|
isboo: CommonStatusEnum.ENABLE
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
@@ -71,6 +71,11 @@
|
|||||||
<dict-tag :type="DICT_TYPE.WPS_WORD" :value="scope.row.type" />
|
<dict-tag :type="DICT_TYPE.WPS_WORD" :value="scope.row.type" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="isboo" label="值类型" width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.WORD_ISBOO" :value="scope.row.isboo" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="status" label="状态" width="100">
|
<el-table-column prop="status" label="状态" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
|
Reference in New Issue
Block a user