zhangwencui
2 天以前 3a0f25f9d38c08e1b78afedb2f67b7bb73f8c84f
会议审批列表查不出,会议申请参会人列表查不出问题修改
已修改2个文件
166 ■■■■ 文件已修改
src/pages/managementMeetings/meetApplication/index.vue 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/managementMeetings/meetExamine/index.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/managementMeetings/meetApplication/index.vue
@@ -139,21 +139,30 @@
                     @close="showRoomPicker = false" />
    <u-popup :show="showEquipmentSheet"
             mode="bottom"
             @close="showEquipmentSheet = false"
             height="200px">
      <view class="popup-content">
        <view class="popup-body">
             @close="showEquipmentSheet = false">
      <view class="participant-sheet">
        <view class="sheet-handle" />
        <view class="sheet-header">
          <text class="sheet-title">选择参会人员</text>
          <text class="sheet-action"
                @click="showEquipmentSheet = false">完成</text>
        </view>
        <view class="sheet-body">
          <u-checkbox-group v-model="meetingForm.participants"
                            @change="handleParticipantChange"
                            icon-placement="right"
                            placement="row">
            <view style="width:100%;padding:10px;margin-top:20px;">
              <u-checkbox v-for="option in employees"
                          :key="option.id"
                          :name="option.id"
                          :label="`${option.staffName} (${option.postName})`"
                          class="checkbox-item"></u-checkbox>
            </view>
                            placement="column">
            <scroll-view scroll-y
                         class="sheet-scroll"
                         :show-scrollbar="false">
              <view v-for="option in employees"
                    :key="option.id"
                    class="sheet-item">
                <u-checkbox :name="option.id"
                            :label="`${option.staffName}${option.postName ? ` (${option.postName})` : ''}`"
                            class="checkbox-item" />
              </view>
            </scroll-view>
          </u-checkbox-group>
        </view>
      </view>
@@ -195,7 +204,7 @@
    endTime: "",
    participants: [],
    description: "",
    participantsNames: [],
    participantsNames: "",
    applicationType: "department",
  });
  // 申请类型选项
@@ -257,7 +266,7 @@
    meetingForm.startTime = "";
    meetingForm.endTime = "";
    meetingForm.participants = [];
    meetingForm.participantsNames = [];
    meetingForm.participantsNames = "";
    meetingForm.description = "";
    meetingForm.applicationType = "department";
  };
@@ -267,7 +276,8 @@
    meetingForm.participants = val;
    meetingForm.participantsNames = employees.value
      .filter(employee => val.includes(employee.id))
      .map(employee => employee.staffName);
      .map(employee => employee.staffName)
      .join("、");
  };
  // 提交表单
  const handleSubmit = async () => {
@@ -414,8 +424,9 @@
    getMeetingRooms();
    staffOnJobListPage().then(res => {
      console.log(res.data.records, "res.data.records");
      employees.value = res.data.records.sort((a, b) =>
        a.postName.localeCompare(b.postName)
      const records = res?.data?.records || [];
      employees.value = records.sort((a, b) =>
        String(a?.postName || "").localeCompare(String(b?.postName || ""))
      );
      console.log(employees.value, "employees.value");
    });
@@ -496,4 +507,70 @@
  .application-type-item.active .application-type-desc {
    color: #0078a3;
  }
</style>
  .participant-sheet {
    display: flex;
    flex-direction: column;
    max-height: 60vh;
    background: #fff;
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
  }
  .sheet-handle {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: #e5e6eb;
    margin: 10px auto 6px;
  }
  .sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f2f3f5;
  }
  .sheet-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2129;
  }
  .sheet-action {
    font-size: 14px;
    color: #0078a3;
    padding: 6px 8px;
  }
  .sheet-body {
    flex: 1;
    min-height: 0;
  }
  .sheet-scroll {
    max-height: 48vh;
    padding: 12px 12px 16px;
    box-sizing: border-box;
  }
  .sheet-item {
    background: #f7f8fa;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    padding: 12px 12px;
    margin-bottom: 10px;
  }
  :deep(.sheet-item .u-checkbox) {
    width: 100%;
  }
  :deep(.sheet-item .u-checkbox__label) {
    color: #1d2129;
    font-size: 14px;
    line-height: 20px;
  }
</style>
src/pages/managementMeetings/meetExamine/index.vue
@@ -159,25 +159,46 @@
      ...searchForm.value,
    })
      .then(res => {
        console.log(res.data.records, "res.data.records");
        ledgerList.value = res.data.records.map(it => {
          console.log(it, "it1");
          let room = roomEnum.value.find(room => it.roomId === room.id);
          it.location = `${room.name}(${room.location})`;
          let staffs = JSON.parse(it.participants);
          it.staffCount = staffs.size;
        const records = res?.data?.records || [];
        console.log(records, "res.data.records");
        const parseStaffIds = value => {
          if (!value) return [];
          if (Array.isArray(value)) return value;
          if (typeof value === "string") {
            try {
              const parsed = JSON.parse(value);
              return Array.isArray(parsed) ? parsed : [];
            } catch (e) {
              return [];
            }
          }
          return [];
        };
        ledgerList.value = records.map(raw => {
          const it = { ...raw };
          const room = roomEnum.value.find(
            r => String(r?.id) === String(it.roomId)
          );
          it.location = room ? `${room.name}(${room.location})` : "";
          const staffIds = parseStaffIds(it.participants);
          it.staffCount = staffIds.length;
          it.meetingTime = `${it.meetingDate} ${dayjs(it.startTime).format(
            "HH:mm:ss"
          )} ~ ${dayjs(it.endTime).format("HH:mm:ss")}`;
          it.participants = staffList.value
            .filter(staff => staffs.some(id => id == staff.id))
            .map(staff => {
              return {
                id: staff.id,
                name: `${staff.staffName}(${staff.postName})`,
              };
            });
          console.log(it, "it2");
            .filter(staff => staffIds.some(id => String(id) === String(staff.id)))
            .map(staff => ({
              id: staff.id,
              name: `${staff.staffName}${
                staff.postName ? `(${staff.postName})` : ""
              }`,
            }));
          return it;
        });
@@ -349,4 +370,4 @@
    line-height: 28px;
    padding: 0 12px;
  }
</style>
</style>