LuChongMei hai 7 meses
pai
achega
1fa9a03657
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  1. 7 3
      src/views/activityMan/personList.vue

+ 7 - 3
src/views/activityMan/personList.vue

@@ -124,6 +124,7 @@ export default {
   emits: ["selected"],
   props: ["type", "siteId"],
   setup(props, { emit }) {
+    const { siteId } = toRefs(props);
     const searchForm = ref({
       name: "",
       sex: "",
@@ -131,7 +132,7 @@ export default {
       idcard: "",
       phone: "",
       location: {
-        id: "",
+        id: siteId,
       },
       typeOfEmployees: "",
       personnelType: "",
@@ -141,7 +142,7 @@ export default {
       nativePlace: "",
       currentResidence: "",
     });
-    searchForm.value.location.id = props.value.siteId;
+
     // 搜索
     const onCancel = () => {
       list.value = [];
@@ -229,6 +230,7 @@ export default {
               !loading.value &&
               searchForm.value.location.id != ""
             ) {
+              checked.value.push(...list.value);
               checkAll();
             }
           } else {
@@ -236,7 +238,9 @@ export default {
           }
         });
     };
-
+    if (props.siteId != "" && searchForm.value.location.id != props.siteId) {
+      searchForm.value.location.id = props.siteId;
+    }
     return {
       // 人员
       list,