소스 검색

多选小组下拉框去掉“全部”选项

刘洋 1 년 전
부모
커밋
1c6057ec3b

+ 2 - 2
server.config.ts

@@ -3,11 +3,11 @@ import type { ServerOptions } from 'vite'
 const server: ServerOptions = {
 const server: ServerOptions = {
   proxy: {
   proxy: {
     '^/?(api|file)/': {
     '^/?(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.178:8200',
       // target: 'http://192.168.10.108:8200',
       // target: 'http://192.168.10.108:8200',
       // target: 'http://cet-test.markingtool.cn',
       // 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',
       // target: 'http://cet-dev.markingtool.cn:8200',
     },
     },
   },
   },

+ 4 - 2
src/hooks/useOptions.ts

@@ -152,7 +152,8 @@ const useOptions = (
   const groupListWithAll = computed(() => {
   const groupListWithAll = computed(() => {
     return groupList.value?.length &&
     return groupList.value?.length &&
       (isAdmin.value || isChief.value || isExpert.value || isLeader.value) &&
       (isAdmin.value || isChief.value || isExpert.value || isLeader.value) &&
-      showAllLabel
+      showAllLabel &&
+      !multGroup
       ? [{ label: '全部', value: void 0 } as unknown as Group].concat(groupList.value)
       ? [{ label: '全部', value: void 0 } as unknown as Group].concat(groupList.value)
       : groupList.value
       : groupList.value
   })
   })
@@ -209,7 +210,8 @@ const useOptions = (
         changeModelValue('group')(
         changeModelValue('group')(
           multGroup && showAllLabel
           multGroup && showAllLabel
             ? groupList.value?.length && (isAdmin.value || isChief.value || isExpert.value || isLeader.value)
             ? groupList.value?.length && (isAdmin.value || isChief.value || isExpert.value || isLeader.value)
-              ? [void 0]
+              ? // ? [void 0]
+                []
               : []
               : []
             : void 0
             : void 0
         )
         )

+ 10 - 9
src/modules/admin-data/task-setting/index.vue

@@ -123,15 +123,16 @@ const customGroupChange = (v: any) => {
   }
   }
 }
 }
 const transGroupOptions = computed(() => {
 const transGroupOptions = computed(() => {
-  return (taskSettingModel.markingGroupNumbers || []).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
-      })
+  // return (taskSettingModel.markingGroupNumbers || []).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
+  //     })
+  return groupListWithAll.value || []
 })
 })
 
 
 const items = computed<EpFormItem[]>(() => [
 const items = computed<EpFormItem[]>(() => [

+ 10 - 9
src/modules/analysis/group-monitoring/hooks/useFormFilter.ts

@@ -81,15 +81,16 @@ const useFormFilter = () => {
     }
     }
   }
   }
   const transGroupOptions = computed(() => {
   const transGroupOptions = computed(() => {
-    return (model.markingGroupNumbers || []).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
-        })
+    // return (model.markingGroupNumbers || []).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
+    //     })
+    return groupListWithAll.value || []
   })
   })
   const items = computed<EpFormItem[]>(() => [
   const items = computed<EpFormItem[]>(() => [
     OneRowSpan5({
     OneRowSpan5({

+ 10 - 9
src/modules/analysis/personnel-compare/hooks/useCompareFilter.ts

@@ -66,15 +66,16 @@ const useCompareFilter = () => {
     }
     }
   }
   }
   const transGroupOptions = computed(() => {
   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
-        })
+    // 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
+    //     })
+    return groupListWithAll.value || []
   })
   })
 
 
   const items = computed(() => [
   const items = computed(() => [

+ 10 - 9
src/modules/analysis/personnel-statistics/hooks/useStatisticsFilter.ts

@@ -144,15 +144,16 @@ const useStatisticsFilter = () => {
     }
     }
   }
   }
   const transGroupOptions = computed(() => {
   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
-        })
+    // 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
+    //     })
+    return groupListWithAll.value || []
   })
   })
 
 
   const items = computed<EpFormItem[]>(() => [
   const items = computed<EpFormItem[]>(() => [

+ 10 - 9
src/modules/marking/inquiry/index.vue

@@ -282,15 +282,16 @@ const customGroupChange = (v: any) => {
   }
   }
 }
 }
 const transGroupOptions = computed(() => {
 const transGroupOptions = computed(() => {
-  return (model.markingGroupNumbers || []).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
-      })
+  // return (model.markingGroupNumbers || []).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
+  //     })
+  return groupListWithAll.value || []
 })
 })
 
 
 const items = computed<EpFormItem[]>(() => [
 const items = computed<EpFormItem[]>(() => [

+ 10 - 9
src/modules/monitor/training-monitoring/hooks/useFormFilter.ts

@@ -134,15 +134,16 @@ const useFormFilter = () => {
     }
     }
   }
   }
   const transGroupOptions = computed(() => {
   const transGroupOptions = computed(() => {
-    return (model.markingGroupNumbers || []).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
-        })
+    // return (model.markingGroupNumbers || []).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
+    //     })
+    return groupListWithAll.value || []
   })
   })
 
 
   const items = computed<EpFormItem[]>(() => {
   const items = computed<EpFormItem[]>(() => {

+ 10 - 9
src/modules/quality/self-check/index.vue

@@ -108,15 +108,16 @@ const customGroupChange = (v: any) => {
   }
   }
 }
 }
 const transGroupOptions = computed(() => {
 const transGroupOptions = computed(() => {
-  return (model.markingGroupNumbers || []).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
-      })
+  // return (model.markingGroupNumbers || []).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
+  //     })
+  return groupListWithAll.value || []
 })
 })
 
 
 const items = computed<EpFormItem[]>(() => {
 const items = computed<EpFormItem[]>(() => {