From 28a4ffa818ba6ae807c83c882a91f7125a7f0f0e Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 05 九月 2023 20:41:45 +0800
Subject: [PATCH] 修改旅游

---
 ruoyi-ui/src/views/self/show.vue |  104 ++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 69 insertions(+), 35 deletions(-)

diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index 489b71e..2889f83 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -8,35 +8,39 @@
                  class="el-icon-top"
       ></el-button>
     </el-backtop>
-    <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;">
+    <h1 style="font-size:21px;padding-top:30px;display: flex;">
       <span>涓汉绠�鍘�</span>
-      <div class="button-container">
+      <div class="button-container" >
           <el-button
             size="mini"
-            type="primary"
+            style="background: #E0EEFE;
+            border-radius: 7px 7px 7px 7px;opacity: 1; margin-left: 20px;"
             @click="handleEdit()"
             v-if="isShow"
             v-hasPermi="['system:role:edit']"
           >缂栬緫</el-button>
-          <el-button v-if="isShow_2" type="primary" @click="submitForm" :disabled="dsb">瀹屾垚</el-button>
+          <el-button v-if="isShow_2" size="mini"
+                     style=" width: 67px;height: 27px;background:#E0EEFE;
+            border-radius: 7px 7px 7px 7px;opacity: 1;margin-left: 20px; "@click="submitForm" :disabled="dsb">瀹屾垚</el-button>
 
           <el-button
             size="mini"
-            type="primary"
-
+            style=" width: 67px;height: 27px;background: #D2F3E0;
+            border-radius: 7px 7px 7px 7px;opacity: 1;margin-left: 20px; "
             @click="handleExport"
             v-hasPermi="['family:note:export']"
           >瀵煎嚭</el-button>
 
           <el-button
             size="mini"
-            type="primary"
+            style=" width: 67px;height: 27px;background: #FFDDE3;
+            border-radius: 7px 7px 7px 7px;opacity: 1; margin-left: 20px;"
             v-hasPermi="['family:note:export']"
           >鎵撳嵃</el-button>
       </div>
       <div   style="display: flex; align-items: center;">
-        <el-button size="mini" type="text" @click="toMemo" v-hasPermi="['person:information:memo']">
-          <div class="form" ><el-icon  style="padding-right:110px;"></el-icon>
+        <el-button size="mini" type="text" @click="toMemo" v-hasPermi="['person:information:memo']" style="margin-left: 20px">
+          <div class="form" ><el-icon  style="padding-right:100px;"></el-icon>
           <span class="text" style="width: 69px;height: 26px;font-size: 16px;
             font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">涓汉璁颁簨鏈�</span></div>
         </el-button>
@@ -51,19 +55,19 @@
           <el-col >
             <el-form ref="elForm" :model="individualList" :rules="rules" size="medium"  label-position="left"
                      v-loading="loading" :data="individualList" @selection-change="handleSelectionChange" >
-              <el-row :span="5">
+              <el-row :span="6">
                 <el-form-item label="濮撳悕" prop="nickName" label-width="40px">
                   <el-input v-model="individualList.nickName" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                   </el-input>
                 </el-form-item>
               </el-row>
-              <el-row :span="5">
+              <el-row :span="6">
                 <el-form-item label="鏇剧敤鍚�" prop="oldName" label-width="60px">
                   <el-input v-model="individualList.oldName" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                   </el-input>
                 </el-form-item>
               </el-row>
-              <el-row :span="5">
+              <el-row :span="6">
                 <el-form-item label="韬唤璇佸彿" prop="idNum" label-width="70px">
                   <el-input v-model="individualList.idNum" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
                   </el-input>
@@ -73,7 +77,7 @@
           </el-col>
         </el-container>
       </div>
-      <div style="padding-left:30px">
+      <div style="padding-left:60px">
         <el-container>
           <el-col v-loading="loading" :data="individualList" @selection-change="handleSelectionChange">
             <el-form ref="elForm" :model="individualList" :rules="rules" size="medium"  label-position="left">
@@ -108,7 +112,7 @@
           </el-col>
         </el-container>
       </div>
-      <div style="padding-left:30px">
+      <div style="padding-left:60px">
         <el-container>
           <el-col v-loading="loading" :data="individualList" @selection-change="handleSelectionChange">
             <el-form ref="elForm" :model="individualList" :rules="rules" size="medium"  label-position="left":disabled="dsb">
@@ -140,7 +144,7 @@
           </el-col>
         </el-container>
       </div>
-      <div style="padding-left:30px;padding-top:30px">
+      <div style="padding-left:100px;padding-top:30px">
         <el-col :span="6" :data="individualList">
           <div class="block" :model="individualList">
             <div v-if="!isEditing">
@@ -223,7 +227,7 @@
           </el-col>
         </el-container>
       </div>
-      <div style="padding-left:30px">
+      <div style="padding-left:60px">
         <el-container>
           <el-col v-loading="loading" :data="individualList" @selection-change="handleSelectionChange">
             <el-form ref="elForm" :model="individualList" :rules="rules" size="medium"  label-position="left">
@@ -622,10 +626,12 @@
           </el-input>
         </el-form-item>
         <el-form-item label="璇佷欢绫诲瀷" prop="type">
-          <el-select v-model="formDat.type" placeholder="璇烽�夋嫨绫诲瀷" clearable :style="{width: '100%'}"  >
+          <el-select v-model="formDat.type" placeholder="璇烽�夋嫨璇佷欢绫诲瀷" clearable :style="{width: '100%'}"  >
             <el-option v-for="(item, index) in typeOption" :key="index" :label="item.label" :value="item.value"
             ></el-option>
           </el-select>
+          <el-input v-model="newOption" v-if="showInput" placeholder="鑻ユ湭鍦ㄤ笂杩伴�夐」涓壘鍒板搴旂被鍨嬶紝璇峰湪姝よ緭鍏ユ柊鐨勮瘉浠剁被鍨�" @change="addNewOption"></el-input>
+
         </el-form-item>
         <el-form-item label="鎸佹湁鎯呭喌" prop="ownStatus">
           <el-input v-model="formDat.ownStatus" placeholder="璇疯緭鍏ユ寔鏈夋儏鍐�" clearable :style="{width: '100%'}" >
@@ -730,12 +736,11 @@
 import axios from 'axios';
 
 //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁�  --鎺ュソ浜�
-import {
-  getIndividualList, addIndividual, updateIndividual, delIndividual,
+import {getIndividualList, addIndividual, updateIndividual, delIndividual,
   listExperience, addExperience, updateExperience, delExperience,
   getIndividualRelation, addRelation, updateRelation, delRelation,
   getCertificateList, addCertificate, updateCertificate, delCertificate,
-  getAbroadList, addAbroad, updateAbroad, delAbroad,
+  getAbroadList, addAbroad, updateAbroad, delAbroad,listType,
   getAutobiographyList, getAutobiographyTermList, addAutobiography,updateAutobiography,
   getCategory,
 } from "@/api/self/index";
@@ -787,6 +792,7 @@
       relationList:[],
       //鍑哄叆澧冭瘉浠舵儏鍐�
       certificateList:[],
+      typeList:[],
       //鍑哄浗鎯呭喌
       AbroadList:[],
 
@@ -1012,16 +1018,9 @@
       },
       selectedOption:'',
       typeOptions:[],
-      typeOption: [{
-        value:'鎶ょ収',
-        label:'鎶ょ収'
-      },{
-        value:'閫氳璇�',
-        label:'閫氳璇�'
-      },{
-        value:'韬唤璇�',
-        label:'韬唤璇�'
-      }],
+      typeOption:[],
+      newOption: undefined,
+      showInput: true
     };
   },
   created() {
@@ -1097,7 +1096,14 @@
         return '鈥斺�斺�斺�斺�斺��'
       }
     },
-
+//绫诲埆
+    addNewOption() {
+      const newOption = this.newOption.trim();
+      if (newOption && !this.typeOption.includes(newOption)) {
+        this.typeOption.push(newOption);
+        this.$set(this.formDat, 'type', newOption); // 鏇存柊formDat.type鐨勫�间负鏂扮殑閫夐」
+      }
+    },
     /** 鏌ヨ瑙掕壊鍒楄〃 */
     getList() {
       this.loading = true;
@@ -1165,6 +1171,32 @@
       //   this.total = response.data.total;
       //   this.loading = false;
       // });
+      listType(this.queryParams).then(response => {
+          this.typeList = response.data;
+          this.total = response.data.total;
+          // console.log( this.typeList )
+          // 鍦ㄥ洖璋冨嚱鏁颁腑璋冪敤 getTypeOptions()
+          this.getTypeOptions();
+          this.loading = false;
+        }
+      );
+    },
+    getTypeOptions() {
+      const filteredOptions = this.typeList.filter(item => typeof item === 'string' && item !== '');
+      // 鍒涘缓涓�涓┖瀵硅薄鐢ㄤ簬瀛樺偍鍞竴鐨勫瓧绗︿覆閫夐」
+      const uniqueOptions = {};
+      // 鏋勫缓涓嬫媺閫夐」鍒楄〃
+      this.typeOption = filteredOptions.reduce((options, option) => {
+        if (!uniqueOptions[option]) {
+          uniqueOptions[option] = true;
+          options.push({
+            label: option,
+            value: option
+          });
+        }
+        return options;
+      }, []);
+
     },
 
     //鍥剧墖鐨勪笂浼犲強涓婁紶鎸夐挳闅愯棌
@@ -1689,9 +1721,7 @@
   background: #FFEFF2;
 
 }
-/*.co-item{*/
-/*  background-color: #EBAFB4;*/
-/*}*/
+
 .el-collapse-item__header {
   background-color:#FEF7FC;
 }
@@ -1706,9 +1736,13 @@
 .btn_edit{
   background:center no-repeat url('../../assets/icons/edit.png') ;
 }
+
 .button-container {
   text-align: right;
-  /*right:40px*/
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+  flex-grow: 1;
 }
 .button {
   background:center no-repeat url('../../assets/icons/add1.png') ;

--
Gitblit v1.9.1