diff --git a/src/views/paper/audit/index.vue b/src/views/paper/audit/index.vue
index 317d0e1..d8e9063 100644
--- a/src/views/paper/audit/index.vue
+++ b/src/views/paper/audit/index.vue
@@ -1,227 +1,190 @@
+
+
+
+
+
+
+
+
-
-
+
+
+ 搜索
+
+ 重置
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- 搜索
-
-
- 重置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 全部
- 待审核
- 审核通过
- 审核未通过
-
-
+
+
+
+ 全部
+ 待审核
+ 审核通过
+ 审核未通过
+
+
-
-
-
-
- 搜索
- 重置
-
- 拉取
-
-
- 推送
-
-
-
- 审核通过
-
+
+ 搜索
+ 重置
+
+ 拉取
+
- 审核不通过
-
-
-
-
-
-
-
-
-
-
-
+
+ 审核通过
+
+
+ 审核不通过
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
- 修改
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -295,14 +254,13 @@
-
+
-
@@ -322,7 +280,7 @@ import WpsWordForm from './WpsWordForm.vue'
import WpsPptxForm from './WpsPptxForm.vue'
import UserImportForm from './UserImportForm.vue'
import UserAssignRoleForm from './UserAssignRoleForm.vue'
-import {handleTree} from "@/utils/tree";
+import { handleTree } from '@/utils/tree'
defineOptions({ name: 'SystemUser' })
@@ -330,7 +288,7 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const loading = ref(true) // 列表的加载中
-const schoolNameList = ref();
+const schoolNameList = ref()
const loadingSchool = ref(true)
const dialogTitle = ref('')
const total = ref(0) // 列表的总页数
@@ -338,32 +296,29 @@ const list = ref([]) // 列表的数
const totalSchool = ref(0) // 列表的总页数
const listSchool = ref([]) // 列表的数
const queryParams = reactive({
- specialtyName: "",
- courseName: "",
- subjectName: "",
+ specialtyName: '',
+ courseName: '',
+ subjectName: '',
audit: '',
- status:"",
- source:"",
+ status: '',
+ source: '',
pageNo: 1,
- pageSize: 10,
+ pageSize: 10
})
const queryParamsSchool = reactive({
- name:'',
+ name: '',
pageNo: 1,
- pageSize: 10,
+ pageSize: 10
})
const queryFormRef = ref() // 搜索的表单
const specialtyList = ref([]) // 树形结构
const queryFormRefSchool = ref() // 搜索的表单
-
-
const syncDialogVisible = ref(false)
const dialogType = ref('') // 用来区分是同步还是推送
-
const treeRef = ref()
const handleCloseSyncDialog = () => {
@@ -374,66 +329,66 @@ const handleCloseSyncDialog = () => {
}
const getSchool = async () => {
- const data = await QuestionApi.getSchoolNameNopage();
-schoolNameList.value=data
-console.log(data.list+"data.list")
+ const data = await QuestionApi.getSchoolNameNopage()
+ schoolNameList.value = data
+ console.log(data.list + 'data.list')
}
const confirmSync = () => {
if (selections.value.length === 0) {
- ElMessage.warning('请先选择要同步的学校');
- return;
+ ElMessage.warning('请先选择要同步的学校')
+ return
}
- const selectedIds = selections.value.map(item => item.ququeName);
- console.log('选中的ID:', selectedIds);
+ const selectedIds = selections.value.map((item) => item.ququeName)
+ console.log('选中的ID:', selectedIds)
if (dialogType.value === 'sync') {
- QuestionApi.syncUniversities(selectedIds).then(() => {
- ElMessage.success('同步成功');
- syncDialogVisible.value = false;
- getList();
- }).catch(() => {
- ElMessage.error('同步失败');
- });
+ QuestionApi.syncUniversities(selectedIds)
+ .then(() => {
+ ElMessage.success('同步成功')
+ syncDialogVisible.value = false
+ getList()
+ })
+ .catch(() => {
+ ElMessage.error('同步失败')
+ })
} else if (dialogType.value === 'push') {
- const rows = selectedQuestions.value;
- selectedRows.value = rows.map((d: any) => d.quId);
- console.log(selectedRows.value+"选中的试题")
+ const rows = selectedQuestions.value
+ selectedRows.value = rows.map((d: any) => d.quId)
+ console.log(selectedRows.value + '选中的试题')
const payload = {
- queueNames: selectedIds,
- questionIds: selectedRows.value
- };
- QuestionApi.doPush(payload).then(() => {
- ElMessage.success('推送成功');
- syncDialogVisible.value = false;
- getList();
- }).catch(() => {
- ElMessage.error('推送失败');
- });
+ queueNames: selectedIds,
+ questionIds: selectedRows.value
+ }
+ QuestionApi.doPush(payload)
+ .then(() => {
+ ElMessage.success('推送成功')
+ syncDialogVisible.value = false
+ getList()
+ })
+ .catch(() => {
+ ElMessage.error('推送失败')
+ })
}
-};
+}
const connectSchoolAll = () => {
if (selections.value.length === 0) {
- ElMessage.warning('请先选择要连接的学校');
- return;
+ ElMessage.warning('请先选择要连接的学校')
+ return
}
- const selectedIds = selections.value.map(item => item.ququeName);
- console.log('选中的ID:', selectedIds);
-
- QuestionApi.connectSchoolAll(selectedIds).then(() => {
- ElMessage.success('连接成功');
- }).catch(() => {
- ElMessage.error('同步失败');
- });
-};
-
-
-
-
-
+ const selectedIds = selections.value.map((item) => item.ququeName)
+ console.log('选中的ID:', selectedIds)
+ QuestionApi.connectSchoolAll(selectedIds)
+ .then(() => {
+ ElMessage.success('连接成功')
+ })
+ .catch(() => {
+ ElMessage.error('同步失败')
+ })
+}
/** 获得部门树 */
const getTree = async () => {
@@ -442,11 +397,10 @@ const getTree = async () => {
specialtyList.value.push(...handleTree(res))
}
-
const getSchoolList = async () => {
loadingSchool.value = true
try {
- const data = await QuestionApi.getSchoolName(queryParamsSchool);
+ const data = await QuestionApi.getSchoolName(queryParamsSchool)
listSchool.value = data.list
totalSchool.value = data.total
@@ -455,65 +409,62 @@ const getSchoolList = async () => {
}
}
-
-
/** 查询列表 */
const getList = async () => {
- await getTree();
+ await getTree()
loading.value = true
try {
- console.log(queryParams.audit+"queryParams.audit");
- const data = await QuestionApi.getQuestionAuditList(queryParams);
+ console.log(queryParams.audit + 'queryParams.audit')
+ const data = await QuestionApi.getQuestionAuditList(queryParams)
- if (!queryParams.audit) {
- list.value = data.list;
- } else {
- list.value = data.list.filter(item => item.audit?.toString() === queryParams.audit);
- }
- total.value = list.value.length;
+ if (!queryParams.audit) {
+ list.value = data.list
+ } else {
+ list.value = data.list.filter((item) => item.audit?.toString() === queryParams.audit)
+ }
+ total.value = list.value.length
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
-const handleQuery =async () => {
- const data = await QuestionApi.getQuestionAuditList(queryParams);
+const handleQuery = async () => {
+ const data = await QuestionApi.getQuestionAuditList(queryParams)
if (!queryParams.audit) {
- list.value = data.list;
+ list.value = data.list
} else {
- list.value = data.list.filter(item => item.audit?.toString() === queryParams.audit);
+ list.value = data.list.filter((item) => item.audit?.toString() === queryParams.audit)
}
- total.value = list.value.length;
+ total.value = list.value.length
}
const handleQuerySchool = () => {
queryParamsSchool.pageNo = 1
getSchoolList()
}
- const selectedRows = ref([])
+const selectedRows = ref([])
- /** 表格选中数据 */
- const selections = ref([]);
- const selectedQuestions = ref([]);
+/** 表格选中数据 */
+const selections = ref([])
+const selectedQuestions = ref([])
const handleSelectionChange = (rows) => {
- selections.value = rows;
+ selections.value = rows
}
const handleSelectionChangeQuestion = (rows) => {
- selectedQuestions.value = rows;
+ selectedQuestions.value = rows
}
const handleAudit = async () => {
try {
- const rows = selectedQuestions.value;
- if (!rows.length) {
- message.error('请至少选择一条数据');
- return;
- }
+ const rows = selectedQuestions.value
+ if (!rows.length) {
+ message.error('请至少选择一条数据')
+ return
+ }
- selectedRows.value = rows.map((d: any) => d.quId); // 保存选中的行数据
+ selectedRows.value = rows.map((d: any) => d.quId) // 保存选中的行数据
-
- await QuestionApi.auditQue(selectedRows.value)
+ await QuestionApi.auditQue(selectedRows.value)
message.success(t('操作成功'))
// 刷新列表
await getList()
@@ -521,44 +472,41 @@ const handleAudit = async () => {
}
const handleNoAudit = async () => {
try {
- const rows = selectedQuestions.value;
- if (!rows.length) {
- message.error('请至少选择一条数据');
- return;
- }
+ const rows = selectedQuestions.value
+ if (!rows.length) {
+ message.error('请至少选择一条数据')
+ return
+ }
- selectedRows.value = rows.map((d: any) => d.quId); // 保存选中的行数据
- console.log(selectedRows.value)
+ selectedRows.value = rows.map((d: any) => d.quId) // 保存选中的行数据
+ console.log(selectedRows.value)
-
- await QuestionApi.noauditQue(selectedRows.value)
+ await QuestionApi.noauditQue(selectedRows.value)
message.success(t('操作成功'))
// 刷新列表
await getList()
} catch {}
}
-
// 点击“同步”按钮触发,打开弹框
const handleTong = () => {
- dialogTitle.value = '同步确认'
- dialogType.value = 'sync'
-getSchoolList();
+ dialogTitle.value = '同步确认'
+ dialogType.value = 'sync'
+ getSchoolList()
syncDialogVisible.value = true
}
const handleTUI = () => {
- const rows = selectedQuestions.value;
+ const rows = selectedQuestions.value
if (!rows.length) {
- message.error('请至少选择一条数据');
- return;
+ message.error('请至少选择一条数据')
+ return
}
dialogTitle.value = '推送确认'
dialogType.value = 'push'
- getSchoolList();
+ getSchoolList()
syncDialogVisible.value = true
}
-
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields()
@@ -575,11 +523,11 @@ const handleDeptNodeClick = async (row) => {
}
/** 处理专业被点击 */
-const chooseQuestionType = ref('');
+const chooseQuestionType = ref('')
const handleSpecialtyNodeClick = async (row: any) => {
- chooseQuestionType.value = row.name;
+ chooseQuestionType.value = row.name
// 判断点击的层级结构,进行入参
- if (!row.children != null){
+ if (!row.children != null) {
// 说明是题型
queryParams.courseName = row.name
}
@@ -610,11 +558,7 @@ interface Tree {
* 递归查找路径
*/
/** 递归查找路径(根据 ID 返回 name 路径) */
-const findNamePath = (
- node: Tree,
- targetId: number,
- path: string[] = []
-): string[] | null => {
+const findNamePath = (node: Tree, targetId: number, path: string[] = []): string[] | null => {
const currentPath = [...path, node.name]
if (node.id === targetId) {
return currentPath
@@ -644,27 +588,26 @@ const fformRef = ref()
const wformRef = ref()
const pformRef = ref()
const openForm = (type: string, row: any) => {
- console.log(row.subjectName+"subjectName");
- if (row.subjectName == "") {
- return message.confirm('请选择题型!');
+ console.log(row.subjectName + 'subjectName')
+ if (row.subjectName == '') {
+ return message.confirm('请选择题型!')
+ }
+ if (row.subjectName.includes('选择题')) {
+ console.log(row.quId + 'row.quId')
+ formRef.value.open(queryParams, type, row.quId)
+ } else if (row.subjectName.includes('编程题')) {
+ cformRef.value.open(queryParams, type, row.quId)
+ } else if (row.subjectName.includes('程序设计')) {
+ mformRef.value.open(queryParams, type, row.quId)
+ } else if (row.subjectName.includes('网络题')) {
+ bformRef.value.open(queryParams, type, row.quId)
+ } else if (row.subjectName.includes('文件处理')) {
+ fformRef.value.open(queryParams, type, row.quId)
+ } else if (row.subjectName.includes('文字')) {
+ wformRef.value.open(queryParams, type, row.quId)
+ } else if (row.subjectName.includes('演示')) {
+ pformRef.value.open(queryParams, type, row.id)
}
- if (row.subjectName.includes("选择题")){
-
- console.log(row.quId+"row.quId")
- formRef.value.open(queryParams,type, row.quId)
- } else if(row.subjectName.includes("编程题")) {
- cformRef.value.open(queryParams,type, row.quId)
- }else if(row.subjectName.includes("程序设计")) {
- mformRef.value.open(queryParams,type, row.quId)
- }else if(row.subjectName.includes("网络题")) {
- bformRef.value.open(queryParams,type, row.quId)
- }else if(row.subjectName.includes("文件处理")) {
- fformRef.value.open(queryParams,type, row.quId)
- } else if (row.subjectName.includes("文字")){
- wformRef.value.open(queryParams,type, row.quId)
- }else if (row.subjectName.includes("演示")){
- pformRef.value.open(queryParams,type,row.id)
- }
}
/** 用户导入 */
diff --git a/src/views/wps/pptx/PptxForm.vue b/src/views/wps/pptx/PptxForm.vue
index 3926b10..291c141 100644
--- a/src/views/wps/pptx/PptxForm.vue
+++ b/src/views/wps/pptx/PptxForm.vue
@@ -5,90 +5,35 @@
v-loading="formLoading"
:model="formData"
:rules="formRules"
- label-width="160px"
+ label-width="120px"
>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -100,9 +45,6 @@
/>
-
-
-
确 定
@@ -117,7 +59,7 @@ import * as PptxApi from '@/api/wps/pptx'
import { CommonStatusEnum } from '@/utils/constants'
import { FormRules } from 'element-plus'
-defineOptions({ name: 'WpsWord' })
+defineOptions({ name: 'WpsPptx' })
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
@@ -128,27 +70,23 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
id: undefined,
+ title: '',
parentId: undefined,
name: undefined,
sort: undefined,
- title: undefined,
- valueList: undefined,
+ functions: undefined,
+ parameter: undefined,
chineseName: undefined,
- status: CommonStatusEnum.ENABLE,
- dataType: CommonStatusEnum.ENABLE,
- isText: CommonStatusEnum.ENABLE,
- isTrue: CommonStatusEnum.ENABLE,
- titleType: CommonStatusEnum.ENABLE,
- isParameter: CommonStatusEnum.ENABLE
+ status: CommonStatusEnum.ENABLE
})
const formRules = reactive({
- parentId: [{ required: true, message: '上级Word节点不能为空', trigger: 'blur' }],
+ parentId: [{ required: true, message: '上级Pptx节点不能为空', trigger: 'blur' }],
name: [{ required: true, message: '节点名称不能为空', trigger: 'blur' }],
sort: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }],
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
})
const formRef = ref() // 表单 Ref
-const wordTree = ref() // 树形结构
+const PptxTree = ref() // 树形结构
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
@@ -165,7 +103,7 @@ const open = async (type: string, id?: number) => {
formLoading.value = false
}
}
- // 获得Word节点树
+ // 获得Pptx节点树
await getTree()
}
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
@@ -200,28 +138,24 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: undefined,
+ title: '',
parentId: undefined,
name: undefined,
sort: undefined,
- title: undefined,
- valueList: undefined,
+ functions: undefined,
+ parameter: undefined,
chineseName: undefined,
- status: CommonStatusEnum.ENABLE,
- dataType: CommonStatusEnum.ENABLE,
- isText: CommonStatusEnum.ENABLE,
- isTrue: CommonStatusEnum.ENABLE,
- titleType: CommonStatusEnum.ENABLE,
- isParameter: CommonStatusEnum.ENABLE
+ status: CommonStatusEnum.ENABLE
}
formRef.value?.resetFields()
}
-/** 获得树 */
+/** 获得Pptx树 */
const getTree = async () => {
- wordTree.value = []
+ PptxTree.value = []
const data = await PptxApi.getSimplePptxList()
- let word: Tree = { id: 0, name: '顶级Word节点', children: [] }
- word.children = handleTree(data)
- wordTree.value.push(word)
+ let Pptx: Tree = { id: 0, name: '顶级Pptx节点', children: [] }
+ Pptx.children = handleTree(data)
+ PptxTree.value.push(Pptx)
}
diff --git a/src/views/wps/pptx/index.vue b/src/views/wps/pptx/index.vue
index a7779e5..9ac35ab 100644
--- a/src/views/wps/pptx/index.vue
+++ b/src/views/wps/pptx/index.vue
@@ -34,27 +34,9 @@
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+