zhangwencui
3 天以前 3a0f25f9d38c08e1b78afedb2f67b7bb73f8c84f
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>