From ad03f0f8df9c4aaa6462995858bda3e7d3a8d558 Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期五, 01 九月 2023 00:58:03 +0800
Subject: [PATCH] 将自传加入折叠面板

---
 ruoyi-ui/src/views/self/show.vue |  206 +++++++++++++++++++++++++++++----------------------
 1 files changed, 116 insertions(+), 90 deletions(-)

diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index e44fbb8..489b71e 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -10,6 +10,30 @@
     </el-backtop>
     <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;">
       <span>涓汉绠�鍘�</span>
+      <div class="button-container">
+          <el-button
+            size="mini"
+            type="primary"
+            @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
+            size="mini"
+            type="primary"
+
+            @click="handleExport"
+            v-hasPermi="['family:note:export']"
+          >瀵煎嚭</el-button>
+
+          <el-button
+            size="mini"
+            type="primary"
+            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>
@@ -167,29 +191,7 @@
       </div>
 
       <div style="padding-left:30px;padding-top:30px" >
-        <el-container >
-          <el-row  >
-            <el-button
-              type="primary"
-              @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>
-            <br>
-            <el-button
-              type="primary"
-              @click="handleExport"
-              v-hasPermi="['family:note:export']"
-            >瀵煎嚭</el-button>
-            <br>
-            <el-button
-              type="primary"
-              v-hasPermi="['family:note:export']"
-            >鎵撳嵃</el-button>
-          </el-row>
 
-        </el-container>
       </div>
       <!--      </el-dialog> self:user:export-->
     </el-container>
@@ -291,13 +293,18 @@
           <el-table-column label="寮�濮嬫棩鏈�" prop="startDate" sortable width="250" align="center" >
             <template slot-scope="scope">
               <template v-if="!scope.row.isEdit">{{ scope.row.startDate }}</template>
-              <template v-else><el-input v-model="scope.row.startDate" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template>
+              <template v-else>
+                <el-date-picker v-model="scope.row.startDate" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                    :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+              ></el-date-picker></template>
             </template>
           </el-table-column>
           <el-table-column label="缁撴潫鏃ユ湡" prop="endDate" sortable width="250" align="center" >
             <template slot-scope="scope">
               <template v-if="!scope.row.isEdit">{{ scope.row.endDate }}</template>
-              <template v-else><el-input v-model="scope.row.endDate" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template>
+              <template v-else><el-date-picker v-model="scope.row.endDate" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                     :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+              ></el-date-picker></template>
             </template>
           </el-table-column>
           <el-table-column label="涓昏瀛︿範缁忓巻銆佸伐浣滃崟浣嶅強浠昏亴鎯呭喌" prop="content" sortable width="350" align="center" >
@@ -332,7 +339,8 @@
             瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐�
             <div>
             <el-button class="button2" size="mini" type="text"  @click="showDialog('relation1')">
-              <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button></div>
+              <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button>
+            </div>
           </div>
         </template>
         <el-table v-loading="loading" :data="relationList" @selection-change="handleSelectionChange"
@@ -383,7 +391,7 @@
       <el-collapse-item  name="4">
         <template v-slot:title>
           <div class="title-wrapper">
-            鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐�
+            鎸佹湁璇佷欢鎯呭喌
             <el-button class="button4" size="mini" type="text"  @click="showDialog('certificate')">
               <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button>
           </div>
@@ -417,13 +425,19 @@
           <el-table-column label="寮�濮嬫椂闂�" prop="startTime"  sortable width="230" align="center">
             <template slot-scope="scope">
               <template v-if="!scope.row.isEdit">{{ scope.row.startTime }}</template>
-              <template v-else><el-input v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template>
+              <template v-else>
+                <el-date-picker v-model="scope.row.startTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                    :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+              ></el-date-picker></template>
             </template>
           </el-table-column>
           <el-table-column label="缁撴潫鏃堕棿" prop="endTime"  sortable width="230" align="center">
             <template slot-scope="scope">
               <template v-if="!scope.row.isEdit">{{ scope.row.endTime }}</template>
-              <template v-else><el-input v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template>
+              <template v-else>
+                <el-date-picker v-model="scope.row.endTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                      :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+              ></el-date-picker></template>
             </template>
           </el-table-column>
           <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
@@ -452,13 +466,19 @@
           <el-table-column label="寮�濮嬫椂闂�" prop="startTime"  sortable width="200" align="center">
             <template slot-scope="scope">
               <template v-if="!scope.row.isEdit">{{ scope.row.startTime }}</template>
-              <template v-else><el-input v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template>
+              <template v-else>
+                <el-date-picker v-model="scope.row.startTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                                :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+                ></el-date-picker></template>
             </template>
           </el-table-column>
           <el-table-column label="缁撴潫鏃堕棿" prop="endTime"  sortable width="200" align="center">
             <template slot-scope="scope">
               <template v-if="!scope.row.isEdit">{{ scope.row.endTime }}</template>
-              <template v-else><el-input v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template>
+              <template v-else>
+                <el-date-picker v-model="scope.row.endTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                                :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+                ></el-date-picker></template>
             </template>
           </el-table-column>
           <el-table-column label="鎵�鍒板浗瀹舵垨鑰呭湴鍖�" prop="destination" sortable width="300" align="center" >
@@ -485,39 +505,45 @@
           </el-table-column>
         </el-table>
       </el-collapse-item>
+      <!--    鑷紶-->
+      <el-collapse-item  name="6">
+        <template v-slot:title>
+          <div class="title-wrapper">
+            鑷紶
+            <div>
+              <el-button size='mini' type="text" class="btn_autobiography" @click="showDialog('autobiography')" >
+                <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
+              </el-button>
+            </div>
+          </div>
+        </template>
+        <el-contain>
+          <div>
+            <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick"
+                     v-loading="loading" :data="AutobiographyList" >
+              <el-tab-pane v-for="(item, index) in AutobiographyList"
+                           :key='item.id' :label="item.ageBegin+'~'+item.ageEnd+'宀�'+'('+item.term+')'">
+                <div v-if="item.term === '濠村効'"> {{item.content}}</div>
+                <div v-if="item.term === '骞煎効'"> {{item.content}}</div>
+                <div v-if="item.term === '灏忓'"> {{item.content}}</div>
+                <div v-if="item.term === '鍒濅腑'"> {{item.content}}</div>
+                <div v-if="item.term === '楂樹腑'"> {{item.content}}</div>
+                <div v-if="item.term === '澶у'"> {{item.content}}</div>
+                <div v-if="item.term === '鐮旂┒鐢�'"> {{item.content}}</div>
+                <div v-if="item.term === '宸ヤ綔'"> {{item.content}}</div>
+                <div v-if="item.term === '缁撳鍚�'"> {{item.content}}</div>
+                <el-button size='mini' type="text" class="btn_edit" @click="editData(item)" style='position: absolute;right:10px;top:5px;'>
+                  <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
+                </el-button>
+              </el-tab-pane>
+            </el-tabs></div>
+        </el-contain>
+      </el-collapse-item>
+
     </el-collapse>
 
-    <!--    鑷紶-->
-    <div style="padding-top:30px">
-      <el-container>
-        <div style="width:100%"><h2 style="font-size:15px" >鑷紶</h2></div>
-      </el-container>
-      <div style='position: relative;'>
-        <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick"
-                 v-loading="loading" :data="AutobiographyList" >
-          <el-tab-pane v-for="(item, index) in AutobiographyList"
-                       :key='item.id' :label="item.ageBegin+'~'+item.ageEnd+'宀�'+'('+item.term+')'">
-            <div v-if="item.term === '濠村効'"> {{item.content}}</div>
-            <div v-if="item.term === '骞煎効'"> {{item.content}}</div>
-            <div v-if="item.term === '灏忓'"> {{item.content}}</div>
-            <div v-if="item.term === '鍒濅腑'"> {{item.content}}</div>
-            <div v-if="item.term === '楂樹腑'"> {{item.content}}</div>
-            <div v-if="item.term === '澶у'"> {{item.content}}</div>
-            <div v-if="item.term === '鐮旂┒鐢�'"> {{item.content}}</div>
-            <div v-if="item.term === '宸ヤ綔'"> {{item.content}}</div>
-            <div v-if="item.term === '缁撳鍚�'"> {{item.content}}</div>
-            <el-button size='mini' type="text" class="btn_edit" @click="editData(item)" style='position: absolute;right:10px;top:5px;'>
-              <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
-            </el-button>
-          </el-tab-pane>
-        </el-tabs>
 
-        <el-button size='mini' type="text" class="btn_autobiography" @click="showDialog('autobiography')" style='position: absolute;right:10px;top:5px;'>
-          <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
-        </el-button>
-      </div>
 
-    </div>
 
     <pagination
       v-show="total>0"
@@ -528,13 +554,17 @@
     />
 
     <!-- 鏂板涓昏缁忓巻淇℃伅閰嶇疆瀵硅瘽妗� -->
-    <el-dialog :title="title" :visible.sync="dialogVisible.open" width="900px" append-to-body>
+    <el-dialog title="鏂板涓昏缁忓巻淇℃伅" :visible.sync="dialogVisible.open" width="900px" append-to-body>
       <el-form ref="elForm1" :model="formDat" :rules="rules" size="medium" label-width="140px">
         <el-form-item label="寮�濮嬫棩鏈�" prop="startDate">
-          <el-input v-model="formDat.startDate" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input>
+          <el-date-picker v-model="formDat.startDate" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+          ></el-date-picker>
         </el-form-item>
         <el-form-item label="缁撴潫鏃ユ湡" prop="endDate">
-          <el-input v-model="formDat.endDate" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input>
+          <el-date-picker v-model="formDat.endDate" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+          ></el-date-picker>
         </el-form-item>
         <el-form-item label="涓昏瀛︿範缁忓巻銆佸伐浣滃崟浣嶅強浠昏亴鎯呭喌" prop="content">
           <el-input v-model="formDat.content" type="textarea" :rows="5" placeholder="璇疯緭鍏ヤ富瑕佸涔犵粡鍘嗐�佸伐浣滃崟浣嶅強浠昏亴鎯呭喌" clearable :style="{width: '100%'}" >
@@ -554,7 +584,7 @@
       </div>
     </el-dialog>
     <!-- 鏂板瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐典俊鎭厤缃璇濇 -->
-    <el-dialog :title="title" :visible.sync="dialogVisible.relation1" width="900px" append-to-body>
+    <el-dialog title="鏂板瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐�" :visible.sync="dialogVisible.relation1" width="900px" append-to-body>
       <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px">
         <el-form-item label="涓庢湰浜哄叧绯�" prop="relation">
           <el-input v-model="formDat.relation" placeholder="璇疯緭鍏ヤ笌鏈汉鍏崇郴" clearable :style="{width: '100%'}" ></el-input>
@@ -584,8 +614,8 @@
         <el-button @click="cancelData">鍙� 娑�</el-button>
       </div>
     </el-dialog>
-    <!-- 鏂板鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐典俊鎭厤缃璇濇 -->
-    <el-dialog :title="title" :visible.sync="dialogVisible.certificate" width="900px" append-to-body>
+    <!-- 鏂板鎸佹湁璇佷欢鎯呭喌淇℃伅閰嶇疆瀵硅瘽妗� -->
+    <el-dialog title="鏂板鎸佹湁璇佷欢鎯呭喌" :visible.sync="dialogVisible.certificate" width="900px" append-to-body>
       <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px">
         <el-form-item label="璇佷欢鍚嶇О" prop="cerName">
           <el-input v-model="formDat.cerName" placeholder="璇疯緭鍏ヨ瘉浠跺悕绉�" clearable :style="{width: '100%'}" >
@@ -606,11 +636,14 @@
           </el-input>
         </el-form-item>
         <el-form-item label="寮�濮嬫棩鏈�" prop="startTime">
-          <el-input v-model="formDat.startTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input>
-        </el-form-item>
+            <el-date-picker v-model="formDat.startTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                            :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+            ></el-date-picker>
+         </el-form-item>
         <el-form-item label="缁撴潫鏃ユ湡" prop="endTime">
-          <el-input v-model="formDat.endTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input>
-        </el-form-item>
+          <el-date-picker v-model="formDat.endTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+          ></el-date-picker></el-form-item>
          </el-form>
       <h4 class="form-header"> </h4>
 
@@ -620,14 +653,16 @@
       </div>
     </el-dialog>
     <!-- 鏂板鍑哄浗锛堝锛夋儏鍐典俊鎭厤缃璇濇 -->
-    <el-dialog :title="title" :visible.sync="dialogVisible.abroad" width="900px" append-to-body>
+    <el-dialog title="鏂板鍑哄浗锛堝锛夋儏鍐典俊鎭�" :visible.sync="dialogVisible.abroad" width="900px" append-to-body>
       <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px">
         <el-form-item label="寮�濮嬫棩鏈�" prop="startTime">
-          <el-input v-model="formDat.startTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input>
-        </el-form-item>
+          <el-date-picker v-model="formDat.startTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+          ></el-date-picker></el-form-item>
         <el-form-item label="缁撴潫鏃ユ湡" prop="endTime">
-          <el-input v-model="formDat.endTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" >
-          </el-input>
+          <el-date-picker v-model="formDat.endTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+          ></el-date-picker>
         </el-form-item>
         <el-form-item label="鎵�鍒板浗瀹舵垨鑰呭湴鍖�" prop="destination">
           <el-input v-model="formDat.destination" type="textarea" :rows="5" placeholder="璇疯緭鍏ユ墍鍒板浗瀹舵垨鑰呭湴鍖�" clearable :style="{width: '100%'}" >
@@ -783,8 +818,6 @@
       },
       // 寮瑰嚭灞傛爣棰�
       title: "",
-      // 鏄惁鏄剧ず寮瑰嚭灞�
-      open: false,
 
       // open:true,
       // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛�
@@ -1018,7 +1051,7 @@
 
     //涓嬫媺
     handleChange(activeNames) {
-      // console.log(val);
+      // console.log(activeNames);
       this.reset();
     },
     showDialog(dialogName) {
@@ -1212,12 +1245,6 @@
       });
     },
 
-    handleRemoveFile(file) {
-      alert(23)
-    },
-    handleRemove(file) {
-      alert("323")
-    },
     handlePictureCardPreview(file) {
       this.dialogImageUrl = file.url;
       this.dialogVisible = true;
@@ -1273,11 +1300,6 @@
         });
       });
 
-      // if(AutobiographyList.ageEnd==null){
-      //   this.AgeEnd='?'
-      // }else{
-      //   this.AgeEnd=this.ageEnd
-      // }
     },
 
     /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */
@@ -1679,11 +1701,15 @@
 }
 .btn_autobiography{
   background:center no-repeat url('../../assets/icons/add1.png') ;
+  margin-left: 76vw;
 }
 .btn_edit{
   background:center no-repeat url('../../assets/icons/edit.png') ;
 }
-
+.button-container {
+  text-align: right;
+  /*right:40px*/
+}
 .button {
   background:center no-repeat url('../../assets/icons/add1.png') ;
   margin-left: 69.5vw;
@@ -1695,7 +1721,7 @@
 }
 .button4 {
   background: center no-repeat url('../../assets/icons/add1.png') ;
-  margin-left: 69.5vw;
+  margin-left: 71.5vw;
 }
 .button5 {
   background:center no-repeat url('../../assets/icons/add1.png') ;

--
Gitblit v1.9.1