Browse Source

Merge branch 'pre'

DESKTOP-USV654P\pc 3 weeks ago
parent
commit
9aa9dadb33

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 
 commit:
 commit:
 	git add . && \
 	git add . && \
-	git commit --no-verify -m "fix: change multiple select"
+	git commit --no-verify -m "fix: change evaluate"
 
 
 checkPre:
 checkPre:
 	git checkout pre
 	git checkout pre

+ 1 - 1
src/services/apis/EvaluateResultController.ts

@@ -25,6 +25,6 @@ export async function postEvaluateResultExportQuery(params:API.ResultViewingExce
 export async function getEvaluateResultIndexPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.EvaluateResultIndexPageVo>>
 export async function getEvaluateResultIndexPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.EvaluateResultIndexPageVo>>
         ({url: '/evaluate/evaluateResult/index-page', params:params},{errorMessageMode:mode});}
         ({url: '/evaluate/evaluateResult/index-page', params:params},{errorMessageMode:mode});}
 /** 结果查看(分页) GET /evaluate/evaluateResult/result-viewing-page */
 /** 结果查看(分页) GET /evaluate/evaluateResult/result-viewing-page */
-export async function getEvaluateResultResultViewingPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.ResultViewingPageVo>>
+export async function getEvaluateResultResultViewingPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.ResultViewingPageVo[]>
         ({url: '/evaluate/evaluateResult/result-viewing-page', params:params},{errorMessageMode:mode});}
         ({url: '/evaluate/evaluateResult/result-viewing-page', params:params},{errorMessageMode:mode});}
             
             

+ 7 - 11
src/services/typing.d.ts

@@ -9580,6 +9580,8 @@ orgName?: string;
 semesterName?: string;
 semesterName?: string;
 /** 开始时间 */
 /** 开始时间 */
 startTime?: string;
 startTime?: string;
+/** 状态(-1:未发布,1:进行中,0,暂停) */
+status?: number;
 }
 }
 
 
 type EvaluateResultSaveDto = {
 type EvaluateResultSaveDto = {
@@ -13025,14 +13027,6 @@ total?: number;
 totalPage?: number;
 totalPage?: number;
 }
 }
 
 
-type PageOutput<ResultViewingPageVo> = {
-currentPage?: number;
-list?: ResultViewingPageVo[];
-pageSize?: number;
-total?: number;
-totalPage?: number;
-}
-
 type PageOutput<RoomBedCheckRecordPageVo> = {
 type PageOutput<RoomBedCheckRecordPageVo> = {
 currentPage?: number;
 currentPage?: number;
 list?: RoomBedCheckRecordPageVo[];
 list?: RoomBedCheckRecordPageVo[];
@@ -14645,14 +14639,16 @@ objectIdCN?: string;
 planExecuterNum?: number;
 planExecuterNum?: number;
 /** 题目名称 */
 /** 题目名称 */
 problem?: string;
 problem?: string;
+/** 状态(2:已评分,0:未评分) */
+status?: number;
 /** 单个被评对象的每一道题的平均得分 */
 /** 单个被评对象的每一道题的平均得分 */
-sumScore?: number;
+sumScore?: string;
 /** 单个被评对象的综合平均得分 */
 /** 单个被评对象的综合平均得分 */
-synthesisScore?: number;
+synthesisScore?: string;
 /** 标题名称 */
 /** 标题名称 */
 topic?: string;
 topic?: string;
 /** 单个被评对象的每个标题的平均得分 */
 /** 单个被评对象的每个标题的平均得分 */
-topicScore?: number;
+topicScore?: string;
 }
 }
 
 
 type RoomBedCheckRecordEchoVo = {
 type RoomBedCheckRecordEchoVo = {

+ 64 - 68
src/views/course/statistics/components/detail.vue

@@ -73,7 +73,6 @@
     postClassTimeStatisticsRecordDetailExportQuery,
     postClassTimeStatisticsRecordDetailExportQuery,
     getClassTimeStatisticsRecordDetailInfo,
     getClassTimeStatisticsRecordDetailInfo,
   } from '/@/services/apis/ClassTimeStatisticsController';
   } from '/@/services/apis/ClassTimeStatisticsController';
-  import { useLoading } from '/@/components/Loading';
   import { formatToDate } from '/@/utils/dateUtil';
   import { formatToDate } from '/@/utils/dateUtil';
   import { downloadByData } from '/@/utils/file/download';
   import { downloadByData } from '/@/utils/file/download';
 
 
@@ -84,9 +83,6 @@
     index: 0,
     index: 0,
   });
   });
   const emit = defineEmits(['success', 'register']);
   const emit = defineEmits(['success', 'register']);
-  const [openFullLoading, closeFullLoading] = useLoading({
-    tip: '处理中...',
-  });
 
 
   const [registerTable, { setTableData, setColumns, redoHeight }] = useTable({
   const [registerTable, { setTableData, setColumns, redoHeight }] = useTable({
     title: '课时统计表',
     title: '课时统计表',
@@ -119,8 +115,7 @@
   });
   });
 
 
   const loadData = async () => {
   const loadData = async () => {
-    setModalProps({ confirmLoading: true });
-    openFullLoading();
+    setModalProps({ confirmLoading: true, loading: true });
     modelRef.value = dataSoruce.data[dataSoruce.index];
     modelRef.value = dataSoruce.data[dataSoruce.index];
     const resData = await getClassTimeStatisticsRecordDetailInfo({ id: unref(modelRef).id });
     const resData = await getClassTimeStatisticsRecordDetailInfo({ id: unref(modelRef).id });
 
 
@@ -133,87 +128,88 @@
       },
       },
     ];
     ];
     const dataList: Recordable[] = [];
     const dataList: Recordable[] = [];
-    if (resData) {
-      const { rowTitle, columnTitle, data, allClassTime } = JSON.parse(resData);
+    try {
+      if (resData) {
+        const { rowTitle, columnTitle, data, allClassTime } = resData;
 
 
-      const totalRow: Recordable = { timeName: '合计课时' };
+        const totalRow: Recordable = { timeName: '合计课时' };
 
 
-      rowTitle.forEach((item, index) => {
-        columns.push({
-          title: item.scheduleDate,
-          dataIndex: `day${index}`,
-          width: 120,
-          customRender: formatDay,
+        rowTitle.forEach((item, index) => {
+          columns.push({
+            title: item.scheduleDate,
+            dataIndex: `day${index}`,
+            width: 120,
+            customRender: formatDay,
+          });
         });
         });
-      });
 
 
-      columnTitle.forEach((col) => {
-        let row: Recordable = {
-          timeName: col.type,
-        };
+        columnTitle.forEach((col) => {
+          let row: Recordable = {
+            timeName: col.type,
+          };
 
 
-        rowTitle.forEach((item, index) => {
-          const filter = data.filter(
-            (f) =>
-              formatToDate(f.scheduleDate, 'MM.DD') === `${item.scheduleDate}` &&
-              f.type === col.type,
-          );
+          rowTitle.forEach((item, index) => {
+            const filter = data.filter(
+              (f) =>
+                formatToDate(f.scheduleDate, 'MM.DD') === `${item.scheduleDate}` &&
+                f.type === col.type,
+            );
 
 
-          const colName = `day${index}`;
+            const colName = `day${index}`;
 
 
-          totalRow[colName] = { courseName: item.content };
+            totalRow[colName] = { courseName: item.content };
 
 
-          row[colName] = {};
-          row['total'] = col.content === 0 ? '' : col.content;
+            row[colName] = {};
+            row['total'] = col.content === 0 ? '' : col.content;
 
 
-          if (filter.length > 0) {
-            // console.log('filter', filter);
-            const filterItem = filter[0];
-            if (filterItem.content) {
-              const contents = filterItem.content.split(',');
-              const courseName = contents[0];
-              let className = '';
-              if (contents.length > 1) {
-                className = contents[1];
-              }
+            if (filter.length > 0) {
+              // console.log('filter', filter);
+              const filterItem = filter[0];
+              if (filterItem.content) {
+                const contents = filterItem.content.split(',');
+                const courseName = contents[0];
+                let className = '';
+                if (contents.length > 1) {
+                  className = contents[1];
+                }
 
 
-              row[colName]['courseName'] = courseName;
-              row[colName]['className'] = className;
+                row[colName]['courseName'] = courseName;
+                row[colName]['className'] = className;
 
 
-              if (filterItem.adjustType === 'course_exchange') {
-                row[colName]['color'] = '#facd91';
-              }
-              if (filterItem.adjustType === 'course_substitute') {
-                row[colName]['color'] = '#ec808d';
+                if (filterItem.adjustType === 'course_exchange') {
+                  row[colName]['color'] = '#facd91';
+                }
+                if (filterItem.adjustType === 'course_substitute') {
+                  row[colName]['color'] = '#ec808d';
+                }
               }
               }
             }
             }
-          }
-        });
+          });
 
 
-        dataList.push(row);
-      });
-
-      totalRow['total'] = allClassTime;
-      dataList.push(totalRow);
+          dataList.push(row);
+        });
 
 
-      // console.log('dataList', dataList);
-    }
+        totalRow['total'] = allClassTime;
+        dataList.push(totalRow);
 
 
-    columns.push({
-      title: '合计(课时)',
-      dataIndex: 'total',
-      width: 90,
-    });
+        // console.log('dataList', dataList);
+      }
 
 
-    setColumns(columns);
-    setTableData(dataList);
+      columns.push({
+        title: '合计(课时)',
+        dataIndex: 'total',
+        width: 90,
+      });
 
 
-    setTimeout(() => {
-      redoHeight();
-    }, 500);
+      setColumns(columns);
+      setTableData(dataList);
 
 
-    setModalProps({ confirmLoading: false });
-    closeFullLoading();
+      setTimeout(() => {
+        redoHeight();
+      }, 500);
+    } finally {
+      setModalProps({ confirmLoading: false, loading: false });
+    }
   };
   };
 
 
   const formatDay = ({ text }) => {
   const formatDay = ({ text }) => {

+ 1 - 0
src/views/evaluate/maintenance/index.vue

@@ -19,6 +19,7 @@
               {
               {
                 label: '删除',
                 label: '删除',
                 color: 'error',
                 color: 'error',
+                disabled: record.useStatus === 1,
                 onClick: handleDelete.bind(null, record),
                 onClick: handleDelete.bind(null, record),
               },
               },
             ]"
             ]"

+ 8 - 8
src/views/evaluate/result/components/data.config.ts

@@ -43,7 +43,7 @@ export const tableColumns: BasicColumn[] = [
     dataIndex: 'action',
     dataIndex: 'action',
     slots: { customRender: 'action' },
     slots: { customRender: 'action' },
     align: 'center',
     align: 'center',
-    width: 180,
+    width: 210,
   },
   },
 ];
 ];
 //评价结果里面的搜索字段
 //评价结果里面的搜索字段
@@ -365,7 +365,7 @@ export const evaluateResultTableColumns: BasicColumn[] = [
     dataIndex: 'index',
     dataIndex: 'index',
     width: 60,
     width: 60,
     customCell: (record) => {
     customCell: (record) => {
-      return { rowSpan: record.rowSpanTopic };
+      return { rowSpan: record.rowSpanObject };
     },
     },
   },
   },
   {
   {
@@ -374,7 +374,7 @@ export const evaluateResultTableColumns: BasicColumn[] = [
     width: 120,
     width: 120,
     align: 'left',
     align: 'left',
     customCell: (record) => {
     customCell: (record) => {
-      return { rowSpan: record.rowSpanTopic };
+      return { rowSpan: record.rowSpanObject };
     },
     },
   },
   },
   {
   {
@@ -383,7 +383,7 @@ export const evaluateResultTableColumns: BasicColumn[] = [
     width: 100,
     width: 100,
     align: 'left',
     align: 'left',
     customCell: (record) => {
     customCell: (record) => {
-      return { rowSpan: record.rowSpanTopic };
+      return { rowSpan: record.rowSpanObject };
     },
     },
   },
   },
   {
   {
@@ -392,7 +392,7 @@ export const evaluateResultTableColumns: BasicColumn[] = [
     width: 110,
     width: 110,
     align: 'left',
     align: 'left',
     customCell: (record) => {
     customCell: (record) => {
-      return { rowSpan: record.rowSpanTopic };
+      return { rowSpan: record.rowSpanObject };
     },
     },
   },
   },
   {
   {
@@ -412,7 +412,7 @@ export const evaluateResultTableColumns: BasicColumn[] = [
     width: 200,
     width: 200,
     align: 'left',
     align: 'left',
     customCell: (record) => {
     customCell: (record) => {
-      return { rowSpan: record.rowSpanProblem };
+      return { rowSpan: record.rowSpanTopic };
     },
     },
   },
   },
   {
   {
@@ -421,7 +421,7 @@ export const evaluateResultTableColumns: BasicColumn[] = [
     width: 80,
     width: 80,
     align: 'left',
     align: 'left',
     customCell: (record) => {
     customCell: (record) => {
-      return { rowSpan: record.rowSpanProblem };
+      return { rowSpan: record.rowSpanTopic };
     },
     },
   },
   },
   {
   {
@@ -430,7 +430,7 @@ export const evaluateResultTableColumns: BasicColumn[] = [
     width: 80,
     width: 80,
     align: 'left',
     align: 'left',
     customCell: (record) => {
     customCell: (record) => {
-      return { rowSpan: record.rowSpanTopic };
+      return { rowSpan: record.rowSpanObject };
     },
     },
   },
   },
 ];
 ];

+ 21 - 3
src/views/evaluate/result/components/resultView.vue

@@ -35,16 +35,33 @@
     bordered: true,
     bordered: true,
     immediate: false,
     immediate: false,
     canResize: true,
     canResize: true,
+    pagination: false,
     afterFetch: (t) => {
     afterFetch: (t) => {
-      const dataList = sortBy(t, ['topic', 'problem'], ['asc', 'asc']);
+      const dataList = sortBy(t, ['objectIdCN', 'topic', 'problem'], ['asc', 'asc', 'asc']);
       let topic = '';
       let topic = '';
       let problem = '';
       let problem = '';
+      let objectIdCN = '';
+      let objectIndex = 1;
       let topicIndex = 1;
       let topicIndex = 1;
       dataList.forEach((item) => {
       dataList.forEach((item) => {
+        if (item.objectIdCN !== objectIdCN) {
+          objectIdCN = item.objectIdCN;
+          topic = '';
+          problem = '';
+          const filterItme = dataList.filter((row) => row.objectIdCN === objectIdCN);
+          item.rowSpanObject = filterItme.length;
+          item.objectIndex = objectIndex++;
+        } else {
+          item.rowSpanObject = 0;
+          item.objectIndex = objectIndex;
+        }
+
         if (item.topic !== topic) {
         if (item.topic !== topic) {
           topic = item.topic;
           topic = item.topic;
           problem = '';
           problem = '';
-          const filterItme = dataList.filter((row) => row.topic === topic);
+          const filterItme = dataList.filter(
+            (row) => row.objectIdCN === objectIdCN && row.topic === topic,
+          );
           item.rowSpanTopic = filterItme.length;
           item.rowSpanTopic = filterItme.length;
           item.index = topicIndex++;
           item.index = topicIndex++;
         } else {
         } else {
@@ -55,7 +72,8 @@
         if (item.problem !== problem) {
         if (item.problem !== problem) {
           problem = item.problem;
           problem = item.problem;
           const filterItme = dataList.filter(
           const filterItme = dataList.filter(
-            (row) => row.topic === topic && row.problem === problem,
+            (row) =>
+              row.objectIdCN === objectIdCN && row.topic === topic && row.problem === problem,
           );
           );
           item.rowSpanProblem = filterItme.length;
           item.rowSpanProblem = filterItme.length;
         } else {
         } else {

+ 15 - 1
src/views/evaluate/result/index.vue

@@ -7,7 +7,8 @@
   import detailView from './components/detailView.vue';
   import detailView from './components/detailView.vue';
   import resultView from './components/resultView.vue';
   import resultView from './components/resultView.vue';
   import { getEvaluateResultIndexPage } from '/@/services/apis/EvaluateResultController';
   import { getEvaluateResultIndexPage } from '/@/services/apis/EvaluateResultController';
-  const [tableRegister] = useTable({
+  import { postEvaluateManageChangeStatus } from '/@/services/apis/EvaluateManageController';
+  const [tableRegister, { reload }] = useTable({
     api: getEvaluateResultIndexPage,
     api: getEvaluateResultIndexPage,
     columns: tableColumns,
     columns: tableColumns,
     title: '评价结果',
     title: '评价结果',
@@ -30,6 +31,14 @@
   const handleResult = (record: any) => {
   const handleResult = (record: any) => {
     openResultModal(true, { ...record });
     openResultModal(true, { ...record });
   };
   };
+
+  const handlePush = async (record: any) => {
+    await postEvaluateManageChangeStatus({
+      id: record.evaluateManageId,
+      status: 0,
+    });
+    reload();
+  };
 </script>
 </script>
 
 
 <template>
 <template>
@@ -46,6 +55,11 @@
               label: '结果查看',
               label: '结果查看',
               onClick: handleResult.bind(null, record),
               onClick: handleResult.bind(null, record),
             },
             },
+            {
+              label: '暂停',
+              disabled: record.status !== 1,
+              onClick: handlePush.bind(null, record),
+            },
           ]"
           ]"
         />
         />
       </template>
       </template>