From 41c9d91da0c73303ea6f8eae03f030ce28b6cd1d Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期五, 16 一月 2026 16:08:02 +0800
Subject: [PATCH] 会议列表时间段修改

---
 src/pages/managementMeetings/meetingSettings/detail.vue |  344 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 344 insertions(+), 0 deletions(-)

diff --git a/src/pages/managementMeetings/meetingSettings/detail.vue b/src/pages/managementMeetings/meetingSettings/detail.vue
new file mode 100644
index 0000000..8e83099
--- /dev/null
+++ b/src/pages/managementMeetings/meetingSettings/detail.vue
@@ -0,0 +1,344 @@
+<template>
+  <view class="client-visit-detail">
+    <PageHeader title="浼氳瀹よ鎯�"
+                @back="goBack" />
+    <u-form ref="formRef"
+            label-width="90">
+      <!-- 瀹㈡埛淇℃伅 -->
+      <u-cell-group title="浼氳瀹や俊鎭�">
+        <u-form-item label="浼氳瀹ゅ悕绉�"
+                     prop="name"
+                     required
+                     border-bottom>
+          <u-input v-model="form.name"
+                   placeholder="璇疯緭鍏ヤ細璁鍚嶇О" />
+        </u-form-item>
+        <u-form-item label="浣嶇疆"
+                     required
+                     prop="location"
+                     border-bottom>
+          <u-input v-model="form.location"
+                   placeholder="璇疯緭鍏ヤ綅缃�" />
+        </u-form-item>
+        <u-form-item label="瀹圭撼浜烘暟"
+                     required
+                     prop="capacity"
+                     border-bottom>
+          <u-input v-model="form.capacity"
+                   placeholder="璇疯緭鍏ュ绾充汉鏁�" />
+        </u-form-item>
+        <u-form-item label="璁惧閰嶇疆"
+                     prop="equipment"
+                     border-bottom>
+          <u-input v-model="form.equipment"
+                   readonly
+                   placeholder="璇烽�夋嫨璁惧閰嶇疆"
+                   @click="showEquipmentSheet = true" />
+          <template #right>
+            <up-icon name="arrow-right"
+                     @click="openEquipmentSheet"></up-icon>
+          </template>
+        </u-form-item>
+        <u-form-item label="鐘舵��"
+                     prop="status"
+                     border-bottom>
+          <u-input v-model="statusname"
+                   readonly
+                   placeholder="璇烽�夋嫨鐘舵��"
+                   @click="showStatusSheet = true" />
+          <template #right>
+            <up-icon name="arrow-right"
+                     @click="showStatusSheet = true"></up-icon>
+          </template>
+        </u-form-item>
+        <u-form-item label="澶囨敞"
+                     prop="remark"
+                     border-bottom>
+          <u-input v-model="form.remark"
+                   placeholder="璇疯緭鍏ュ娉�" />
+        </u-form-item>
+      </u-cell-group>
+      <!-- 鎻愪氦鎸夐挳 -->
+      <view class="footer-btns">
+        <u-button class="cancel-btn"
+                  @click="goBack">鍙栨秷</u-button>
+        <u-button class="sign-btn"
+                  type="primary"
+                  @click="handleSubmit"
+                  :loading="loading">淇濆瓨</u-button>
+      </view>
+    </u-form>
+    <!-- 璁惧閰嶇疆閫夋嫨鍣� -->
+    <u-popup :show="showEquipmentSheet"
+             mode="bottom"
+             @close="showEquipmentSheet = false"
+             height="200px">
+      <view class="popup-content">
+        <view class="popup-body">
+          <u-checkbox-group v-model="form.equipment"
+                            @change="handleEquipmentChange"
+                            icon-placement="right"
+                            placement="row">
+            <view style="width:100%;padding:10px;margin-top:20px;">
+              <u-checkbox v-for="option in equipmentOptions"
+                          :key="option.value"
+                          :name="option.value"
+                          :label="option.name"
+                          class="checkbox-item"></u-checkbox>
+            </view>
+          </u-checkbox-group>
+        </view>
+      </view>
+    </u-popup>
+    <!-- 鐘舵�侀�夋嫨鍣� -->
+    <up-action-sheet :show="showStatusSheet"
+                     :actions="statusOptions"
+                     @select="onStatusSelect"
+                     @close="showStatusSheet = false" />
+  </view>
+</template>
+
+<script setup>
+  // 鏇挎崲 toast 鏂规硶
+  defineOptions({ name: "meeting-settings-detail" });
+  const showToast = message => {
+    uni.showToast({
+      title: message,
+      icon: "none",
+    });
+  };
+
+  import { ref, onMounted } from "vue";
+  import PageHeader from "@/components/PageHeader.vue";
+  import useUserStore from "@/store/modules/user";
+  import { saveRoom } from "@/api/managementMeetings/meetingSettings";
+
+  const userStore = useUserStore();
+
+  // 琛ㄥ崟鏁版嵁
+  const form = ref({
+    name: "",
+    location: "",
+    capacity: "",
+    equipment: [],
+    status: "",
+    remark: "",
+  });
+  const equipmentOptions = ref([
+    { value: "鎶曞奖浠�", name: "鎶曞奖浠�" },
+    { value: "鐢佃", name: "鐢佃" },
+    { value: "闊冲搷", name: "闊冲搷" },
+    { value: "鐢佃瘽", name: "鐢佃瘽" },
+    { value: "瑙嗛浼氳绯荤粺", name: "瑙嗛浼氳绯荤粺" },
+    { value: "鐧芥澘", name: "鐧芥澘" },
+    { value: "鍐欏瓧鏉�", name: "鍐欏瓧鏉�" },
+    { value: "鏃犵嚎缃戠粶", name: "鏃犵嚎缃戠粶" },
+  ]);
+  const statusOptions = ref([
+    { value: "1", name: "鍚敤" },
+    { value: "0", name: "绂佺敤" },
+  ]);
+  //// 椤甸潰鐘舵��
+  const loading = ref(false);
+  const formRef = ref(null);
+  const showEquipmentSheet = ref(false);
+  const showStatusSheet = ref(false);
+  const openEquipmentSheet = () => {
+    showEquipmentSheet.value = true;
+  };
+  // 杩斿洖涓婁竴椤�
+  const goBack = () => {
+    uni.navigateBack();
+  };
+  const statusname = ref("");
+  // 鐘舵�侀�夋嫨
+  const onStatusSelect = action => {
+    form.value.status = action.value;
+    statusname.value = action.name;
+    showStatusSheet.value = false;
+  };
+  // 璁惧閰嶇疆閫夋嫨
+  const handleEquipmentChange = val => {
+    form.value.equipment = val;
+    console.log("form.value.equipment", form.value.equipment);
+  };
+  // 鎻愪氦琛ㄥ崟
+  const handleSubmit = async () => {
+    if (!form.value.name) {
+      showToast("璇疯緭鍏ヤ細璁鍚嶇О");
+      return;
+    }
+
+    if (!form.value.location) {
+      showToast("璇疯緭鍏ヤ綅缃�");
+      return;
+    }
+
+    if (!form.value.capacity) {
+      showToast("璇疯緭鍏ュ绾充汉鏁�");
+      return;
+    }
+    try {
+      loading.value = true;
+      form.value.equipment = form.value.equipment.join(",");
+      form.value.status = Number(form.value.status);
+      form.value.capacity = Number(form.value.capacity);
+      // 浣跨敤瀹夊叏娴呮嫹璐濓紝閬垮厤瀵硅薄灞曞紑鍦ㄦ煇浜涜繍琛屾椂鎶涢敊
+      console.log("form.value", form.value);
+      saveRoom(form.value).then(res => {
+        if (res.code !== 200) {
+          showToast("淇濆瓨澶辫触锛岃閲嶈瘯");
+          return;
+        }
+        loading.value = false;
+        showToast("淇濆瓨鎴愬姛");
+        setTimeout(() => {
+          goBack();
+        }, 500);
+      });
+    } catch (e) {
+      loading.value = false;
+      console.error("淇濆瓨澶辫触:", e);
+      showToast("淇濆瓨澶辫触锛岃閲嶈瘯");
+    }
+  };
+
+  // 鍒濆鍖栭〉闈㈡暟鎹�
+  const initPageData = () => {
+    // 浠庢湰鍦板瓨鍌ㄤ腑鑾峰彇浼氳 room 鏁版嵁
+    const meetingRoom = uni.getStorageSync("meetingRoom");
+    if (meetingRoom) {
+      form.value = JSON.parse(JSON.stringify(meetingRoom));
+      if (meetingRoom.equipment) {
+        if (Array.isArray(meetingRoom.equipment)) {
+          form.value.equipment = meetingRoom.equipment;
+        } else {
+          form.value.equipment = meetingRoom.equipment.split(",");
+        }
+      }
+      statusname.value = meetingRoom.status === 1 ? "鍚敤" : "绂佺敤";
+
+      // 娓呴櫎鏈湴瀛樺偍涓殑鏁版嵁锛岄伩鍏嶄笅娆℃墦寮�鏃朵粛鐒舵樉绀�
+      uni.removeStorageSync("meetingRoom");
+    }
+  };
+
+  onMounted(() => {
+    initPageData();
+  });
+</script>
+
+<style scoped lang="scss">
+  @import "@/static/scss/form-common.scss";
+  .client-visit {
+    min-height: 100vh;
+    background: #f8f9fa;
+    padding-bottom: 5rem;
+  }
+
+  .footer-btns {
+    position: fixed;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    background: #fff;
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    padding: 0.75rem 0;
+    box-shadow: 0 -0.125rem 0.5rem rgba(0, 0, 0, 0.05);
+    z-index: 1000;
+  }
+
+  .cancel-btn {
+    font-weight: 400;
+    font-size: 1rem;
+    color: #666;
+    background: #f5f5f5;
+    border: 1px solid #ddd;
+    width: 45%;
+    height: 2.5rem;
+    border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
+  }
+
+  .sign-btn {
+    font-weight: 500;
+    font-size: 1rem;
+    color: #fff;
+    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+    border: none;
+    width: 45%;
+    height: 2.5rem;
+    border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
+  }
+
+  .location-icon {
+    color: #1989fa;
+    font-size: 1.2rem;
+  }
+
+  .selector-container {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    width: 100%;
+    height: 100%;
+  }
+
+  .selector-text {
+    font-size: 14px;
+    color: #333;
+  }
+
+  .popup-content {
+    padding: 20rpx;
+  }
+
+  .popup-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 20rpx;
+  }
+
+  .popup-title {
+    font-size: 16px;
+    font-weight: bold;
+    color: #333;
+  }
+
+  .close-icon {
+    font-size: 20px;
+    color: #999;
+  }
+
+  .popup-body {
+    max-height: 60vh;
+    overflow-y: auto;
+    margin-bottom: 20rpx;
+  }
+
+  .checkbox-item {
+    margin-bottom: 15rpx;
+    font-size: 14px;
+  }
+
+  .popup-footer {
+    display: flex;
+    justify-content: space-between;
+    gap: 15rpx;
+  }
+
+  .cancel-btn-popup {
+    flex: 1;
+    border-radius: 8rpx;
+  }
+
+  .confirm-btn-popup {
+    flex: 1;
+    border-radius: 8rpx;
+  }
+  .checkbox-item {
+    margin-top: 40rpx;
+  }
+</style>
\ No newline at end of file

--
Gitblit v1.9.3