刘洋 hace 1 año
padre
commit
601744deb5

+ 2 - 2
server.config.ts

@@ -3,11 +3,11 @@ import type { ServerOptions } from 'vite'
 const server: ServerOptions = {
   proxy: {
     '^/?(api|file)/': {
-      target: 'http://192.168.10.41:8200',
+      // target: 'http://192.168.10.41:8200',
       // target: 'http://192.168.10.178:8200',
       // target: 'http://192.168.10.108:8200',
       // target: 'http://cet-test.markingtool.cn',
-      // target: 'http://192.168.10.136:80',
+      target: 'http://192.168.10.136:80',
       // target: 'http://cet-dev.markingtool.cn:8200',
     },
   },

+ 6 - 2
src/hooks/useTableCheck.ts

@@ -25,7 +25,7 @@ function isMultipleData(data: any): data is MultipleResultType {
   return isDefine(data?.result) && isDefine(data?.totalCount)
 }
 
-const useTableCheck = <T extends TableDataType<InputDataType>>(data: T, auto = true, queryPosition = null) => {
+const useTableCheck = <T extends TableDataType<InputDataType>>(data: T, auto = true, queryPosition: any = null) => {
   const tableRef = ref<InstanceTable>()
 
   const elTableRef = computed(() => {
@@ -79,7 +79,11 @@ const useTableCheck = <T extends TableDataType<InputDataType>>(data: T, auto = t
         if (!!queryPosition) {
           const key = Object.keys(queryPosition)[0]
           const fIndex = tableData.value.findIndex((item: any) => {
-            return item[key] == queryPosition?.[key]
+            if (queryPosition?.isFloat) {
+              return parseFloat(item[key]) == parseFloat(queryPosition?.[key])
+            } else {
+              return item[key] == queryPosition?.[key]
+            }
           })
           if (fIndex > -1) {
             positionIndex = fIndex

+ 35 - 2
src/modules/analysis/personnel-statistics/hooks/useStatisticsFilter.ts

@@ -66,6 +66,15 @@ const useStatisticsFilter = () => {
       })
     }
   })
+  // watch(
+  //   () => model.markingGroupNumber,
+  //   () => {
+  //     console.log('model.markingGroupNumber:', model.markingGroupNumber)
+  //     if (Array.isArray(model.markingGroupNumber) && model.markingGroupNumber.includes(undefined)) {
+  //       model.markingGroupNumber = [void 0]
+  //     }
+  //   }
+  // )
   watch(
     () => [model.subjectCode, model.questionMainNumber, model.markingGroupNumber],
     () => {
@@ -119,6 +128,30 @@ const useStatisticsFilter = () => {
   const TwoRowSpan4 = defineColumn(_, 'row-2', { span: 4 })
   const TwoRowSpan2 = defineColumn(_, 'row-2', { span: 1.3 })
 
+  const customGroupChange = (v: any) => {
+    if (groupListWithAll.value.find((item: any) => item.value == undefined)) {
+      if (model.markingGroupNumber.includes(undefined)) {
+        model.markingGroupNumber = [void 0]
+        changeModelValue('group')(model.markingGroupNumber)
+      } else {
+        changeModelValue('group')(v)
+      }
+    } else {
+      changeModelValue('group')(v)
+    }
+  }
+  const transGroupOptions = computed(() => {
+    return (model.markingGroupNumber || []).includes(undefined)
+      ? (groupListWithAll.value || []).map((item: any) => {
+          item.value != undefined && (item.disabled = true)
+          return item
+        })
+      : groupListWithAll.value.map((item: any) => {
+          item.disabled = false
+          return item
+        })
+  })
+
   const items = computed<EpFormItem[]>(() => [
     OneRowSpan4({
       labelWidth: '52px',
@@ -148,8 +181,8 @@ const useStatisticsFilter = () => {
       label: '小组',
       slotType: 'select',
       slot: {
-        options: groupListWithAll.value,
-        onChange: changeModelValue('group'),
+        options: transGroupOptions.value,
+        onChange: customGroupChange,
         multiple: true,
       },
     }),

+ 1 - 1
src/modules/analysis/view-marked-detail/index.vue

@@ -262,7 +262,7 @@ const { pagination, currentPage, data, fetchTable, loading } = useTable(
 const queryPosition: any = query.markScore
   ? { markScore: query.markScore }
   : query.markerRatio
-  ? { markerRatio: query.markerRatio }
+  ? { markerRatio: query.markerRatio, isFloat: true }
   : null
 const {
   tableRef,