From 6508e19c8d2e266c7405439ac32c06df6f602439 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期二, 06 一月 2026 16:14:50 +0800
Subject: [PATCH] 修改代码

---
 ruoyi-ui/src/views/bignote/familyeventInfo.vue |  180 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 162 insertions(+), 18 deletions(-)

diff --git a/ruoyi-ui/src/views/bignote/familyeventInfo.vue b/ruoyi-ui/src/views/bignote/familyeventInfo.vue
index 09a767a..d548fb8 100644
--- a/ruoyi-ui/src/views/bignote/familyeventInfo.vue
+++ b/ruoyi-ui/src/views/bignote/familyeventInfo.vue
@@ -47,6 +47,31 @@
          </div>
       </el-form-item>
 
+      <!-- 鍏跺畠浜烘樉绀哄尯鍩� -->
+      <el-form-item label="鍏跺畠浜�">
+        <!-- 宸查�夊叾瀹冧汉鏍囩鏄剧ず -->
+        <div v-if="otherPeople.length > 0" class="selected-members" style="display: inline-block; vertical-align: middle; margin-right: 10px;">
+          <el-tag
+            v-for="(name, index) in otherPeople"
+            :key="index"
+            closable
+            @close="handleOtherPeopleTagClose(index)"
+          >
+            {{ name }}
+          </el-tag>
+        </div>
+        <!-- 缂栬緫鎸夐挳 -->
+        <el-button
+          v-if="!dsb"
+          type="primary"
+          icon="el-icon-edit"
+          size="mini"
+          @click="openOtherPeopleDialog"
+        >
+          缂栬緫鍏跺畠浜�
+        </el-button>
+      </el-form-item>
+
 
       <el-form-item label="鍦扮偣" prop="address">
         <el-input v-model="formData.address" placeholder="璇疯緭鍏ュ湴鐐�" clearable :style="{width: '100%'}" :disabled="dsb">
@@ -292,6 +317,50 @@
       </div>
     </el-dialog>
 
+    <!-- 鍏跺畠浜虹紪杈戝脊绐� -->
+    <el-dialog
+      :visible.sync="otherPeopleDialogVisible"
+      title="缂栬緫鍏跺畠浜�"
+      width="500px"
+      :close-on-click-modal="false"
+      @close="handleOtherPeopleDialogClose"
+    >
+      <!-- 宸叉坊鍔犵殑鍏跺畠浜烘爣绛� -->
+      <div v-if="tempOtherPeople.length > 0" class="selected-members" style="margin-bottom: 20px;">
+        <el-tag
+          v-for="(name, index) in tempOtherPeople"
+          :key="index"
+          closable
+          @close="handleTempOtherPeopleTagClose(index)"
+        >
+          {{ name }}
+        </el-tag>
+      </div>
+      
+      <!-- 娣诲姞杈撳叆妗� -->
+      <div style="display: flex; align-items: center;">
+        <el-input
+          v-model="otherPeopleInput"
+          placeholder="璇疯緭鍏ュ鍚嶏紝鎸夊洖杞︽垨鐐瑰嚮娣诲姞"
+          clearable
+          style="flex: 1; margin-right: 10px;"
+          @keyup.enter.native="addOtherPeople"
+        ></el-input>
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          @click="addOtherPeople"
+        >
+          娣诲姞
+        </el-button>
+      </div>
+      
+      <!-- 寮圭獥搴曢儴鎸夐挳 -->
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="otherPeopleDialogVisible = false">鍙栨秷</el-button>
+        <el-button type="primary" @click="confirmOtherPeople">瀹屾垚</el-button>
+      </div>
+    </el-dialog>
 
   </div>
 </template>
@@ -316,6 +385,10 @@
       anotherFamilyMembers: [], //鍙﹀瀹舵棌鎴愬憳淇℃伅
       selectedMemberIds: [], // 寮圭獥涓复鏃堕�変腑鐨勬垚鍛業D锛堢敤浜庡閫変氦浜掞級
       displayMemberNames: [], // 鏄剧ず鐢ㄧ殑鎴愬憳鍚嶇О鏁扮粍
+      otherPeople: [], // 鍏跺畠浜哄垪琛�
+      tempOtherPeople: [], // 寮圭獥涓复鏃剁紪杈戠殑鍏跺畠浜哄垪琛�
+      otherPeopleInput: '', // 鍏跺畠浜鸿緭鍏ユ鍐呭
+      otherPeopleDialogVisible: false, // 鍏跺畠浜哄脊绐楀彲瑙佹��
       memberSearch: '', // 鎴愬憳鎼滅储鍏抽敭璇�
       loading: false, // 鍔犺浇鐘舵��
       cdi:"瀹跺涵澶т簨璁颁俊鎭�",
@@ -512,6 +585,60 @@
       console.log(this.selectedMemberNames)
 
     },
+    // 绉婚櫎鍏跺畠浜烘爣绛�
+    handleOtherPeopleTagClose(index) {
+      const removedName = this.otherPeople[index];
+      this.otherPeople.splice(index, 1);
+      this.$message.info(`宸茬Щ闄�: ${removedName}`);
+    },
+    
+    // 鎵撳紑鍏跺畠浜虹紪杈戝脊绐�
+    openOtherPeopleDialog() {
+      // 澶嶅埗褰撳墠鍏跺畠浜哄垪琛ㄥ埌涓存椂鍒楄〃
+      this.tempOtherPeople = [...this.otherPeople];
+      this.otherPeopleInput = '';
+      this.otherPeopleDialogVisible = true;
+    },
+    
+    // 寮圭獥鍐呮坊鍔犲叾瀹冧汉
+    addOtherPeople() {
+      const name = this.otherPeopleInput.trim();
+      if (!name) {
+        this.$message.warning('璇疯緭鍏ュ鍚�');
+        return;
+      }
+      if (this.tempOtherPeople.includes(name)) {
+        this.$message.warning('璇ュ鍚嶅凡娣诲姞');
+        return;
+      }
+      this.tempOtherPeople.push(name);
+      this.otherPeopleInput = '';
+      this.$message.success(`宸叉坊鍔�: ${name}`);
+    },
+    
+    // 寮圭獥鍐呯Щ闄ゅ叾瀹冧汉鏍囩
+    handleTempOtherPeopleTagClose(index) {
+      const removedName = this.tempOtherPeople[index];
+      this.tempOtherPeople.splice(index, 1);
+      this.$message.info(`宸茬Щ闄�: ${removedName}`);
+    },
+    
+    // 纭瀹屾垚锛堜繚瀛樺脊绐椾腑鐨勬洿鏀癸級
+    confirmOtherPeople() {
+      if (this.tempOtherPeople.length > 0) {
+        this.$message.success(`宸蹭繚瀛� ${this.tempOtherPeople.length} 鍚嶅叾瀹冧汉`);
+      } else {
+        this.$message.info('鏈坊鍔犱换浣曞叾瀹冧汉');
+      }
+      this.otherPeople = [...this.tempOtherPeople];
+      this.otherPeopleDialogVisible = false;
+    },
+    
+    // 鍏跺畠浜哄脊绐楀叧闂鐞�
+    handleOtherPeopleDialogClose() {
+      this.otherPeopleInput = '';
+      // 涓嶄繚瀛樹复鏃跺垪琛ㄧ殑鏇存敼
+    },
     // 纭閫夋嫨鎴愬憳锛堜繚瀛樺埌琛ㄥ崟锛�
     confirmMemberSelection() {
       console.log(this.selectedMemberIds)
@@ -530,16 +657,29 @@
       // 1. 鍒ゆ柇 people 鏄惁瀛樺湪涓斾负瀛楃涓诧紝閬垮厤鎶ラ敊
       if (!people || typeof people !== "string") {
         this.displayMemberNames = [];
+        this.otherPeople = [];
         return;
       }
-      console.log(people.split(","))
-      // 2. 鎸夐�楀彿鍒嗗壊瀛楃涓诧紝鍘婚櫎姣忎釜鍏冪礌鐨勫墠鍚庣┖鏍硷紝杩囨护绌哄�硷紙濡傝繛缁�楀彿鐨勬儏鍐碉級
-      this.displayMemberNames = people.split(",")
-      // people
-        //.split(",") // 鎸夐�楀彿鍒嗗壊涓烘暟缁�
-        //.map((name) => name.trim()) // 鍘婚櫎姣忎釜鍏冪礌鐨勫墠鍚庣┖鏍�
-      //  .filter((name) => name); // 杩囨护绌哄瓧绗︿覆锛堝鐞� "a,,b" 杩欑被鎯呭喌锛�
-      console.log(this.displayMemberNames)
+      
+      // 2. 鍏堟寜鍒嗗彿鍒嗗壊锛氱涓�閮ㄥ垎鏄鏃忔垚鍛橈紝绗簩閮ㄥ垎鏄叾瀹冧汉
+      const parts = people.split(';');
+      
+      // 绗竴閮ㄥ垎锛氭寜閫楀彿鍒嗗壊璧嬪�肩粰 displayMemberNames
+      if (parts[0]) {
+        this.displayMemberNames = parts[0].split(",").map(name => name.trim()).filter(name => name);
+      } else {
+        this.displayMemberNames = [];
+      }
+      
+      // 绗簩閮ㄥ垎锛氭寜閫楀彿鍒嗗壊璧嬪�肩粰 otherPeople
+      if (parts[1]) {
+        this.otherPeople = parts[1].split(",").map(name => name.trim()).filter(name => name);
+      } else {
+        this.otherPeople = [];
+      }
+      
+      console.log('瀹舵棌鎴愬憳:', this.displayMemberNames)
+      console.log('鍏跺畠浜�:', this.otherPeople)
     },
       // 鎵撳紑鎴愬憳澶氶�夊脊绐�
       async openMemberDialog() {
@@ -617,16 +757,11 @@
     },
 
     submitForm() {
-      // let ul = this.fileList.map(function (elem){
-      //   return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
-      // }).join(",")
-      // let uls = this.fileListOther.map(function (elem){
-      //   return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
-      // }).join(",")
-      // this.formData.url = ul+","+uls
-  var pel = ""
-      pel = pel + this.selectedMemberNames.join(",")
-      this.formData.people = pel;
+      // 缁勫悎鏁版嵁锛氬鏃忔垚鍛樻寜閫楀彿鍒嗛殧锛屽叾瀹冧汉鎸夐�楀彿鍒嗛殧锛屼袱閮ㄥ垎鐢ㄥ垎鍙峰垎闅�
+      const memberPart = this.selectedMemberNames.join(",");
+      const otherPart = this.otherPeople.join(",");
+      this.formData.people = `${memberPart};${otherPart}`;
+      
       this.$refs['elForm'].validate(valid => {
         if (valid) {
           if (this.formData.id != undefined) {
@@ -924,3 +1059,12 @@
   background:center/11% no-repeat url('../../assets/icons/form.png') ;
 }
 </style>
+
+
+
+
+
+
+
+
+

--
Gitblit v1.9.1