Browse Source

考情和阅卷

lvmax 3 tháng trước cách đây
mục cha
commit
1f5b3a6a27

+ 3 - 3
.env.development

@@ -6,10 +6,10 @@ VITE_PUBLIC_PATH = /
 
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
-VITE_PROXY = [["/exam-boot","http://10.11.12.100:8080/exam-boot"],["/upload","http://10.11.12.100:3300/upload"]]
+VITE_PROXY = [["/exam-boot","http://10.11.12.101:8080/exam-boot"],["/upload","http://10.11.12.101:3300/upload"]]
 
 #后台接口全路径地址(必填)
-VITE_GLOB_DOMAIN_URL=http://10.11.12.100:8080/exam-boot
+VITE_GLOB_DOMAIN_URL=http://10.11.12.101:8080/exam-boot
 
 #后台接口父地址(必填)
 VITE_GLOB_API_URL=/exam-boot
@@ -18,4 +18,4 @@ VITE_GLOB_API_URL=/exam-boot
 VITE_GLOB_API_URL_PREFIX=
 
 #微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
-VITE_APP_SUB_jeecg-app-1 = '//10.11.12.100:8092'
+VITE_APP_SUB_jeecg-app-1 = '//10.11.12.101:8092'

+ 7 - 7
README.md

@@ -76,11 +76,11 @@ pnpm install
 - 配置接口地址 `.env.development`
 
 ```bash
-VITE_PROXY = [["/jeecgboot","http://10.11.12.100:8080/jeecg-boot"],["/upload","http://10.11.12.100:3300/upload"]]
-VITE_GLOB_DOMAIN_URL=http://10.11.12.100:8080/jeecg-boot
+VITE_PROXY = [["/jeecgboot","http://10.11.12.101:8080/jeecg-boot"],["/upload","http://10.11.12.101:3300/upload"]]
+VITE_GLOB_DOMAIN_URL=http://10.11.12.101:8080/jeecg-boot
 ```
 
-> 说明:把`http://10.11.12.100:8080/jeecg-boot` 换成自己地址,其他不用改。
+> 说明:把`http://10.11.12.101:8080/jeecg-boot` 换成自己地址,其他不用改。
 
 
 - run
@@ -101,11 +101,11 @@ pnpm build
 
 - host设置
 
->注意: 需要把`10.11.12.100`替换成真实IP 比如`192.`开头,不然后端不通。
+>注意: 需要把`10.11.12.101`替换成真实IP 比如`192.`开头,不然后端不通。
 
 ```bash
-10.11.12.100 jeecg-boot-system
-10.11.12.100 jeecg-boot-gateway
+10.11.12.101 jeecg-boot-system
+10.11.12.101 jeecg-boot-gateway
 ```
 
 
@@ -141,7 +141,7 @@ docker run --name jeecgboot-vue3-nginx -p 80:80 -d jeecgboot-vue3
 
 - 访问前台
 
-http://10.11.12.100
+http://10.11.12.101
 
 ## Docker镜像启动前端(微服务模式)
 > 这里只写与单体的区别步骤

+ 2 - 2
src/components/jeecg/comment/useComment.ts

@@ -374,8 +374,8 @@ export function useFileList() {
         //数据库中地址
         let url = getFileAccessHttpUrl(file.url);
         await initViewDomain();
-        //本地测试需要将文件地址的10.11.12.100/10.11.12.100替换成IP, 或是直接修改全局domain
-        //url = url.replace('10.11.12.100', '192.168.1.100')
+        //本地测试需要将文件地址的10.11.12.101/10.11.12.101替换成IP, 或是直接修改全局domain
+        //url = url.replace('10.11.12.101', '192.168.1.100')
         //如果集成的KkFileview-v3.3.0+ 需要对url再做一层base64编码 encodeURIComponent(encryptByBase64(url))
         window.open(onlinePreviewDomain+'?officePreviewType=pdf&url='+encodeURIComponent(url));
       }

+ 1 - 1
src/router/routes/index.ts

@@ -76,7 +76,7 @@ export const ExamDetailRoute: AppRouteRecordRaw = {
 };
 
 export const ReviewRoute: AppRouteRecordRaw = {
-  path: '/exam/examReview/:id',
+  path: '/exam/examReview/:id/:paperId',
   name: 'ReviewRoute',
   component: () => import('/@/views/buss/exam/examreview/Review.vue'),
   meta: {

+ 27 - 2
src/views/buss/exam/exam/UserExamListModal.vue

@@ -1,7 +1,7 @@
 <template>
   <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="examTitle"
               :canFullscreen="false"
-              :width="1000" :height="550" :wrapStyle="{top:'-80px',left:'200px'}" :showOkBtn="false"
+              :width="1200" :height="550" :wrapStyle="{top:'-80px',left:'200px'}" :showOkBtn="false"
               cancelText="关闭">
     <BasicTable @register="registerTable">
 
@@ -10,7 +10,7 @@
             <span style="color: sandybrown" v-if="record.state ==1">
               待阅卷
             </span>
-            <span style="color: green" v-if="record.state ==2">
+          <span style="color: green" v-if="record.state ==2">
               已阅卷
             </span>
         </template>
@@ -40,11 +40,22 @@ import {examRecordList} from "/@/views/buss/exam/userexam/UserExam.api";
 import {BasicColumn, BasicTable, FormSchema} from '/@/components/Table';
 
 const examId = ref()
+const paperId = ref()
 const examTitle = ref()
+const option = ref([])
 //表单赋值
 const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
   examId.value = data.record.id
+  paperId.value = data.record.examPapers[0].paperId
   examTitle.value = data.record.title
+  console.log(data.record)
+  for (let i = 0; i < data.record.examPapers.length; i++) {
+    option.value.push({
+      label: data.record.examPapers[i].title,
+      value: data.record.examPapers[i].paperId
+    })
+  }
+  console.log(option.value)
   setModalProps({confirmLoading: false, showCancelBtn: !!data?.showFooter});
 });
 
@@ -70,6 +81,11 @@ const columns: BasicColumn[] = [
     align: "center",
     dataIndex: 'commitTime'
   },
+  {
+    title: '试卷名称',
+    align: "center",
+    dataIndex: 'title'
+  },
   {
     title: '状态',
     align: "center",
@@ -91,6 +107,15 @@ const searchFormSchema: FormSchema[] = [
     field: 'realName',
     component: 'Input',
     colProps: {span: 6},
+  },{
+    label: '试卷',
+    field: 'paperId',
+    component: 'Select',
+    componentProps: {
+      options: option,
+    },
+    defaultValue: paperId,
+    colProps: {span: 6},
   },
   {
     label: '是否通过',

+ 4 - 2
src/views/buss/exam/examreview/Review.vue

@@ -313,6 +313,7 @@ import { Tinymce } from "/@/components/Tinymce";
 const { createMessage } = useMessage();
 const route = useRoute();
 const userExamId = route.params?.id ?? -1;
+const paperId = route.params?.paperId ?? -1;
 const form: any = ref<any>({
   userExamQuestionList: []
 });
@@ -321,7 +322,7 @@ const router = useRouter();
 initFormData();
 
 async function initFormData() {
-  let params = { userExamId: userExamId };
+  let params = { userExamId: userExamId,'paperId':paperId };
   const data = await userExamResultDetail(params);
   form.value = { ...data };
 }
@@ -485,6 +486,7 @@ function commitPreview() {
 
   let params = {
     userExamId: userExamId,
+    'paperId': paperId,
     examPreviews: examPreviews
   };
   submitPreview(params).then(() => {
@@ -493,7 +495,7 @@ function commitPreview() {
       window.close();
       //打开考试结果详情页
       let url = router.resolve({
-        path: `/exam/userexamresult/examDetail/` + userExamId
+        path: `/exam/userexamresult/examDetail/` + userExamId+"/"+paperId
       });
       window.open(url.href, "_blank");
     }, 1000);

+ 1 - 1
src/views/buss/exam/examreview/UserExamReview.vue

@@ -135,7 +135,7 @@ const [registerTable, {reload}, {rowSelection, selectedRowKeys, selectedRows}] =
 function review(record: Recordable) {
   closeCurrent()
   let url = router.resolve({
-    path: `/exam/examReview/${record.id}`,
+    path: `/exam/examReview/${record.id}/${record.paperId}`,
   })
   window.open(url.href, '_blank')
 }

+ 4 - 4
src/views/buss/exam/question/QuestionFormPage.vue

@@ -565,7 +565,7 @@ function addConnectionRow(value) {
         formData.append('file', file); // 将文件添加到FormData对象中
 
         var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
-        xhr.open('POST', 'http://10.11.12.100:8080/exam-boot/sys/common/upload', true); // 初始化请求,这里的'/upload'是服务器上处理上传文件的路径
+        xhr.open('POST', 'http://10.11.12.101:8080/exam-boot/sys/common/upload', true); // 初始化请求,这里的'/upload'是服务器上处理上传文件的路径
         xhr.setRequestHeader("x-access-token", getToken())
 
         xhr.onload = function (date) {
@@ -577,7 +577,7 @@ function addConnectionRow(value) {
           //
           var message = JSON.parse(date.target.response).message;
           console.log(JSON.parse(date.target.response))
-          url = "http://10.11.12.100:8080/exam-boot/sys/common/static/" + message
+          url = "http://10.11.12.101:8080/exam-boot/sys/common/static/" + message
           console.log(file)
           if (file.type.includes('image')) {
             option.innerHTML += `<div id="option${index + "-" + (option.children.length + 1)}" style="width: 90px;height: 90px;background-color: #0a9fe5;margin: auto;margin-bottom: 10px">
@@ -664,7 +664,7 @@ function addItemImg() {
     formData.append('file', file); // 将文件添加到FormData对象中
 
     var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
-    xhr.open('POST', 'http://10.11.12.100:8080/exam-boot/sys/common/upload', true); // 初始化请求,这里的'/upload'是服务器上处理上传文件的路径
+    xhr.open('POST', 'http://10.11.12.101:8080/exam-boot/sys/common/upload', true); // 初始化请求,这里的'/upload'是服务器上处理上传文件的路径
     xhr.setRequestHeader("x-access-token", getToken())
 
     xhr.onload = function (date) {
@@ -676,7 +676,7 @@ function addItemImg() {
       //
       var message = JSON.parse(date.target.response).message;
       console.log(message)
-      url = "http://10.11.12.100:8080/exam-boot/sys/common/static/" + message
+      url = "http://10.11.12.101:8080/exam-boot/sys/common/static/" + message
       tzSize.value.sizeUrl = url
       console.log(tzSize.value.sizeUrl)
     };

+ 1 - 1
src/views/demo/feat/ws/index.vue

@@ -61,7 +61,7 @@
     },
     setup() {
       const state = reactive({
-        server: 'ws://10.11.12.100:3300/test',
+        server: 'ws://10.11.12.101:3300/test',
         sendValue: '',
         recordList: [] as { id: number; time: number; res: string }[],
       });

+ 12 - 12
src/views/monitor/datasource/datasource.data.ts

@@ -34,36 +34,36 @@ const dbDriverMap = {
 };
 const dbUrlMap = {
   // MySQL 数据库
-  '1': { dbUrl: 'jdbc:mysql://10.11.12.100:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false' },
+  '1': { dbUrl: 'jdbc:mysql://10.11.12.101:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false' },
   //MySQL5.7+ 数据库
   '4': {
     dbUrl:
-      'jdbc:mysql://10.11.12.100:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai',
+      'jdbc:mysql://10.11.12.101:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai',
   },
   // Oracle
-  '2': { dbUrl: 'jdbc:oracle:thin:@10.11.12.100:1521:ORCL' },
+  '2': { dbUrl: 'jdbc:oracle:thin:@10.11.12.101:1521:ORCL' },
   // SQLServer 数据库
-  '3': { dbUrl: 'jdbc:sqlserver://10.11.12.100:1433;SelectMethod=cursor;DatabaseName=jeecgboot' },
+  '3': { dbUrl: 'jdbc:sqlserver://10.11.12.101:1433;SelectMethod=cursor;DatabaseName=jeecgboot' },
   // Mariadb 数据库
-  '5': { dbUrl: 'jdbc:mariadb://10.11.12.100:3306/jeecg-boot?characterEncoding=UTF-8&useSSL=false' },
+  '5': { dbUrl: 'jdbc:mariadb://10.11.12.101:3306/jeecg-boot?characterEncoding=UTF-8&useSSL=false' },
   // Postgresql 数据库
-  '6': { dbUrl: 'jdbc:postgresql://10.11.12.100:5432/jeecg-boot' },
+  '6': { dbUrl: 'jdbc:postgresql://10.11.12.101:5432/jeecg-boot' },
   // 达梦 数据库
-  '7': { dbUrl: 'jdbc:dm://10.11.12.100:5236/?jeecg-boot&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8' },
+  '7': { dbUrl: 'jdbc:dm://10.11.12.101:5236/?jeecg-boot&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8' },
   // 人大金仓 数据库
-  '8': { dbUrl: 'jdbc:kingbase8://10.11.12.100:54321/jeecg-boot' },
+  '8': { dbUrl: 'jdbc:kingbase8://10.11.12.101:54321/jeecg-boot' },
   // 神通 数据库
   '9': { dbUrl: 'jdbc:oscar://192.168.1.125:2003/jeecg-boot' },
   // SQLite 数据库
   '10': { dbUrl: 'jdbc:sqlite://opt/test.db' },
   // DB2 数据库
-  '11': { dbUrl: 'jdbc:db2://10.11.12.100:50000/jeecg-boot' },
+  '11': { dbUrl: 'jdbc:db2://10.11.12.101:50000/jeecg-boot' },
   // Hsqldb 数据库
-  '12': { dbUrl: 'jdbc:hsqldb:hsql://10.11.12.100/jeecg-boot' },
+  '12': { dbUrl: 'jdbc:hsqldb:hsql://10.11.12.101/jeecg-boot' },
   // Derby 数据库
-  '13': { dbUrl: 'jdbc:derby://10.11.12.100:1527/jeecg-boot' },
+  '13': { dbUrl: 'jdbc:derby://10.11.12.101:1527/jeecg-boot' },
   // H2 数据库
-  '14': { dbUrl: 'jdbc:h2:tcp://10.11.12.100:8082/jeecg-boot' },
+  '14': { dbUrl: 'jdbc:h2:tcp://10.11.12.101:8082/jeecg-boot' },
   // 其他数据库
   '15': { dbUrl: '' },
 };

+ 1 - 1
tests/server/index.ts

@@ -59,5 +59,5 @@ app.use(router.allowedMethods());
 app.use(koaStatic(path.join(__dirname)));
 
 app.listen(PORT, () => {
-  console.log(`Application started successfully: http://10.11.12.100:${PORT}`);
+  console.log(`Application started successfully: http://10.11.12.101:${PORT}`);
 });

+ 1 - 1
tests/server/service/FileService.ts

@@ -1,7 +1,7 @@
 import path from 'path';
 import fs from 'fs-extra';
 
-const uploadUrl = 'http://10.11.12.100:3300/static/upload';
+const uploadUrl = 'http://10.11.12.101:3300/static/upload';
 const filePath = path.join(__dirname, '../static/upload/');
 
 fs.ensureDir(filePath);