From 97819279661596858ab40a40d321db61f297df93 Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期六, 27 五月 2023 19:24:40 +0800
Subject: [PATCH] 成长经历阅历的新增以弹窗形式展示(但还有一点问题正在解决),可删除单独的一条数据 新增荣誉证书详情页面(但数据调不出来)

---
 ruoyi-ui/src/views/honor/index.vue     |   19 
 ruoyi-ui/src/views/self/show.vue       |  338 +++++++++++++++++++---
 ruoyi-ui/src/api/self/index.js         |    4 
 ruoyi-ui/src/views/honor/honorInfo.vue |  487 ++++++++++++++++++++++++++++++++
 ruoyi-ui/src/router/index.js           |   15 +
 5 files changed, 803 insertions(+), 60 deletions(-)

diff --git a/ruoyi-ui/src/api/self/index.js b/ruoyi-ui/src/api/self/index.js
index 58824f2..84f17bc 100644
--- a/ruoyi-ui/src/api/self/index.js
+++ b/ruoyi-ui/src/api/self/index.js
@@ -148,10 +148,10 @@
 }
 
 //鍒犻櫎鍑哄浗鎯呭喌
-export function delAbroad()
+export function delAbroad(ids)
 {
   return request({
-    url: '/zAbroad/1' ,
+    url: '/zAbroad/' +ids ,
     method: 'delete',
   })
 }
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index d6089d5..1c99ad5 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -330,7 +330,22 @@
       }
     ]
   },
+//璇佷功銆佽祫璐�
+  {
+    path: '/self/honor',
+    component: Layout,
+    hidden: true,
+    permissions: ['self:honor:info'],
 
+    children: [
+      {
+        path: 'honorInfo/:id(\\d+)',
+        component: () => import('@/views/honor/honorInfo'),
+        name: 'honorInfo',
+        meta: { title: '鑽h獕璇佷功璇︽儏',activeMenu: '/self/zHonor'}
+      }
+    ]
+  },
   {
     path: '/system/role-auth',
     component: Layout,
diff --git a/ruoyi-ui/src/views/honor/honorInfo.vue b/ruoyi-ui/src/views/honor/honorInfo.vue
new file mode 100644
index 0000000..2ad5826
--- /dev/null
+++ b/ruoyi-ui/src/views/honor/honorInfo.vue
@@ -0,0 +1,487 @@
+<template>
+  <div class="app-container">
+    <div class="form-header mt">
+      <h4 class="dt h4">鑽h獕璇佷功璇︾粏淇℃伅 </h4>
+      <!--      <el-button v-if="isShow" type="primary" class="pt"  icon="el-icon-edit" @click="handleEdit()" >缂栬緫</el-button>-->
+      <!--      <br>-->
+      <!--      <el-button type="primary" class="pt"   @click="handleExport"-->
+      <!--                 v-hasPermi="['self:user:export']" >瀵煎嚭</el-button>-->
+    </div>
+    <div>
+      <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-position="left" label-width="100px">
+        <!--      <el-form-item label="id" prop="id">-->
+        <!--        <el-input v-model="formData.id" placeholder="璇疯緭鍏d" :maxlength="11" show-word-limit :disabled="true"-->
+        <!--                  clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>-->
+        <!--      </el-form-item>-->
+        <el-container>
+          <div>
+            <el-container>
+              <el-row>
+                <el-cow :span="8">
+                  <el-form-item label="鏃堕棿" prop="createTime" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.createTime" placeholder="璇疯緭鍏ユ椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">
+                    </el-input>
+                  </el-form-item>
+                </el-cow>
+                <el-cow :span="8">
+                  <el-form-item label="绫诲埆" prop="type" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.type" placeholder="璇疯緭鍏ョ被鍒�" clearable :style="{width: '100%'}" :disabled="dsb">
+                    </el-input>
+                  </el-form-item>
+                </el-cow>
+                <el-cow :span="8">
+                  <el-form-item label="鍚嶇О" prop="name" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.name" placeholder="璇疯緭鍏ュ悕绉�" clearable :style="{width: '100%'}" :disabled="dsb">
+                    </el-input>
+                  </el-form-item>
+                </el-cow>
+                <el-cow :span="8">
+                  <el-form-item label="璇佸彿/涓撲笟" prop="idNo" label-width="90px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.idNo" placeholder="璇疯緭鍏ヨ瘉鍙�/涓撲笟" clearable :style="{width: '100%'}" :disabled="dsb">
+                    </el-input>
+                  </el-form-item>
+                </el-cow>
+                <el-cow :span="8">
+                  <el-form-item label="绾у埆" prop="grade" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.grade" placeholder="璇疯緭鍏ョ骇鍒�" clearable :style="{width: '100%'}" :disabled="dsb">
+                    </el-input>
+                  </el-form-item>
+                </el-cow>
+                <el-cow :span="8">
+                  <el-form-item label="澶囨敞" prop="remark" label-width="45px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
+                  </el-form-item>
+                </el-cow>
+              </el-row>
+            </el-container>
+          </div>
+          <div style="padding-left:120px">
+            <el-container>
+              <el-row>
+                <el-cow :span="8">
+                  <el-form-item label="鏈夋晥鏃堕棿" prop="validityDate" label-width="68px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.validityDate" placeholder="璇疯緭鍏ユ湁鏁堟椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">
+                    </el-input>
+                  </el-form-item>
+                </el-cow>
+                <el-cow :span="8">
+                  <el-form-item label="鑾峰緱鏃堕棿" prop="getDate" label-width="68px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.getDate" placeholder="璇疯緭鍏ヨ幏寰楁椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">
+                    </el-input>
+                  </el-form-item>
+                </el-cow>
+                <el-cow :span="8">
+                  <el-form-item label="瀛樻斁浣嶇疆" prop="location" label-width="68px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
+                    <el-input v-model="formData.location" placeholder="璇疯緭鍏ュ瓨鏀句綅缃�" clearable :style="{width: '100%'}" :disabled="dsb">
+                    </el-input>
+                  </el-form-item>
+                </el-cow>
+              </el-row>
+            </el-container>
+          </div>
+        </el-container>
+        <h4 class="form-header">鐢靛瓙鏂囦欢 </h4>
+        <el-upload
+          action="#"
+          list-type="picture-card"
+          multiple
+          :http-request="requestUpload"
+          :file-list="fileList"
+        >
+          <i slot="default" class="el-icon-plus"></i>
+          <div slot="file" slot-scope="{file}">
+            <img
+              class="el-upload-list__item-thumbnail"
+              :src="file.url"
+              alt=""
+              style="width: 147px; height: 147px"
+              fit="cover"
+              :preview-src-list="[file.url]"
+            >
+            <span class="el-upload-list__item-actions">
+        <span
+          v-if="isShow"
+          class="el-upload-list__item-preview"
+          @click="handlePictureCardPreview(file)"
+        >
+          <i class="el-icon-zoom-in"></i>
+        </span>
+        <span
+          v-if="isShow"
+          class="el-upload-list__item-delete"
+          @click="handleDownload(file.url)"
+        >
+          <i class="el-icon-download"></i>
+        </span>
+        <span
+          v-if="isShow"
+          class="el-upload-list__item-delete"
+          @click="handleRemove(file)"
+        >
+          <i class="el-icon-delete"></i>
+        </span>
+      </span>
+
+
+          </div>
+        </el-upload>
+
+        <h4 class="form-header">鍏朵粬闄勪欢 </h4>
+        <el-upload
+          action=""
+          :file-list="fileListOther"
+          class="upload-demo"
+          multiple
+          list-type="picture-card"
+          :on-preview="handleFileCardPreview"
+          :on-remove="handleRemove"
+          :http-request="requestUpload"
+          :show-file-list="true"
+        >
+
+          <i slot="default" class="el-icon-plus"></i>
+          <div slot="file" slot-scope="{file}">
+            <img
+              class="el-upload-list__item-thumbnail"
+              src="../../assets/401_images/401.gif"
+              alt=""
+              style="width: 147px; height: 147px"
+              fit="cover"
+            >
+            <span class="el-upload-list__item-actions">
+                <span
+                  v-if="isShow"
+                  class="el-upload-list__item-preview"
+                  @click="handleFileCardPreview(file)"
+                >
+                  <i class="el-icon-zoom-in"></i>
+                </span>
+                <span
+                  v-if="isShow"
+                  @click="handleRemove(file)"
+                  class="el-upload-list__item-delete"
+
+                >
+                  <i class="el-icon-download"></i>
+                </span>
+                <span
+                  v-if="isShow"
+                  class="el-upload-list__item-delete"
+                  @click="handleRemoveFile(file)"
+                >
+                  <i class="el-icon-delete"></i>
+                </span>
+              </span>
+
+
+          </div>
+
+
+        </el-upload>
+
+        <el-form-item size="large">
+          <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <el-dialog  :visible.sync="dialogVisible">
+      <img w-full :src="dialogImageUrl" alt="Preview Image" />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {addRole, updateRole} from "@/api/system/role";
+import {blobValidate} from "@/utils/ruoyi";
+import errorCode from "@/utils/errorCode";
+import {Message} from "element-ui";
+import { download,uploadPic} from "@/api/doctor/index";
+import {listHonor,updateHonor} from "@/api/honor/index";
+
+export default {
+  components: {},
+  props: [],
+  data() {
+    return {
+      cdi:"鑽h獕璇佷功璇︾粏淇℃伅",
+      udi:"鑽h獕璇佷功淇℃伅璇︽儏",
+      fot:[".jpg",".jif","png"],
+      fileList:[
+      ],
+      fileListOther:[
+
+      ],
+      dsb:true,
+      btn:false,
+      isShow:true,
+      // 鑽h獕琛ㄦ牸鏁版嵁
+      honorList: [],
+
+      formData: {
+        //鑽h獕璇佷功璁板綍
+        id:undefined,
+        type:undefined,
+        createTime:undefined,
+        name:undefined,
+        idNo:undefined,
+        grade:undefined,
+        validityDate:undefined,
+        getDate:undefined,
+        location:undefined,
+        remark:undefined,
+        url: undefined,
+      },
+      dialogImageUrl: '',
+      dialogVisible: false,
+      disabled: false,
+      rules: {
+        createTime: [{
+          required: true,
+          message: '璇疯緭鍏ュ垱寤烘椂闂�',
+          trigger: 'blur'
+        }],
+        type: [{
+          required: true,
+          message: '璇疯緭鍏ョ被鍨�',
+          trigger: 'blur'
+        }],
+        name: [{
+          required: true,
+          message: '璇疯緭鍏ュ悕绉�',
+          trigger: 'blur'
+        }],
+        grade: [{
+          required: true,
+          message: '璇疯緭鍏ョ骇鍒�',
+          trigger: 'blur'
+        }],
+        idNo: [{
+          required: true,
+          message: '璇疯緭鍏ヨ瘉浠跺彿/涓撲笟',
+          trigger: 'blur'
+        }],
+        validityDate: [{
+          // required: true,
+          message: '璇疯緭鍏ユ湁鏁堟椂闂�',
+          trigger: 'blur'
+        }],
+        getDate: [{
+          // required: true,
+          message: '璇疯緭鍏ヨ幏寰楁椂闂�',
+          trigger: 'blur'
+        }],
+        location: [{
+          // required: true,
+          message: '璇疯緭鍏ュ瓨鏀句綅缃�',
+          trigger: 'blur'
+        }],
+        remark: [{
+          // required: true,
+          message: '璇疯緭鍏ュ娉�',
+          trigger: 'blur'
+        }],
+      },
+      typeOptions: [],
+    }
+  },
+  computed: {},
+  watch: {},
+  created() {
+    const id = this.$route.params && this.$route.params.id;
+    let jd;
+    if(this.$route.query.detail!=undefined)
+    {
+      jd =  this.$route.query.detail
+      this.btn= jd
+      this.dsb = !jd
+      this.isShow=true
+      document.title = "淇敼鑽h獕璇佷功璇︾粏淇℃伅";
+      this.$route.meta.title = "淇敼鑽h獕璇佷功璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
+    }
+    else{
+      document.title = "鏌ョ湅鑽h獕璇佷功璇︾粏淇℃伅";
+      this.$route.meta.title = "鏌ョ湅鑽h獕璇佷功璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
+      this.isShow=false
+    }
+
+    let _this = this
+    if (id) {
+      this.loading = true;
+      listHonor(id).then((response) => {
+        this.formData = response.data;
+        let paths = response.data.url.split(",");
+        for(let i = 0; i < paths.length; i++)
+        {
+          if(paths[i]!="") {
+
+            let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
+
+            if (_this.fot.includes(pth) === true)
+              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
+            else {
+              // alert(paths[i])
+              let nms = paths[i].split("\/")
+              let nm = nms[nms.length - 1]
+              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
+            }
+          }
+        }
+        this.loading = false;
+      });
+      this.getCateInfor()
+
+    }
+  },
+  mounted() {},
+  methods: {
+    /** 鏌ヨ绫诲埆淇℃伅 */
+    // getCateInfor()
+    // {
+    //   let _this = this
+    //   getCategory().then(response=>{
+    //
+    //     response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
+    //       _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
+    //     })
+    //   })
+    // },
+    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
+
+      this.$refs['elForm'].validate(valid => {
+
+
+        if (valid) {
+          if (this.formData.id != undefined) {
+            updateHonor(this.formData).then(response => {
+              this.$modal.msgSuccess("淇敼鎴愬姛");
+              // this.open = false;
+              this.btn=false
+            });
+          } else {
+            this.$modal.msgSuccess("淇敼澶辫触");
+
+          }
+        }
+      })
+    },
+    resetForm() {
+      this.$refs['elForm'].resetFields()
+    },
+    handlePreview(file)
+    {
+      let formData = {'path':"/"+file.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")};
+      let lens = formData.path.split(".")
+      let suffix = lens[lens.length-1]
+      download(formData).then(async (response) => {
+        const isLogin = await blobValidate(response);
+        let nt = new Date().getTime()
+        let filename = 'property_'+nt+'.'+suffix
+        const blob = new Blob([response])
+        saveAs(blob, filename)
+      })
+    },
+    handleRemoveFile(file) {
+      for(let i = 0; i < this.fileListOther.length; i++)
+      {
+        if(this.fileListOther[i].url==file.url)
+          this.$delete(this.fileListOther,i);
+      }
+    },
+    handleRemove(file) {
+      for(let i = 0; i < this.fileList.length; i++)
+      {
+        if(this.fileList[i].url==file.url)
+          this.$delete(this.fileList,i);
+      }
+    },
+    handleFileCardPreview(file){
+      this.dialogFileUrl = file.url;
+      const Base64 = require('js-base64').Base64
+      this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
+      myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+    },
+    handleDownload(url) {
+      var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")};
+
+      let lens = formData.path.split(".")
+      let suffix = lens[lens.length-1]
+      download(formData).then(async (response) => {
+        const isLogin = await blobValidate(response);
+        let nt = new Date().getTime()
+        let filename = 'honor_'+nt+'.'+suffix
+        const blob = new Blob([response])
+        saveAs(blob, filename)
+      })
+    },
+    handleEdit()
+    {
+      this.dsb = false
+      // this.btn = true
+      this.isShow=false
+    },
+    requestUpload(params)
+    {
+      var file = params.file;
+      var formData = new FormData();
+      formData.append('uploadFile', file);
+      let _this = this
+
+      uploadPic(formData).then(response => {
+        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
+
+        if(_this.fot.includes(pth) === true)
+        {
+          _this.fileList.push({name:response.data.fileName, "url":response.data.url})
+
+        }
+
+        else{
+          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
+
+        }
+      })
+
+    },
+
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    handleExport() {
+      this.download('/zHonor/export', {
+        ...this.queryParams
+      }, `zfHonor_${new Date().getTime()}.xlsx`)
+    }
+
+  }
+}
+
+</script>
+
+<style scoped>
+.app-container{
+  background-color: #FEF7FC;
+}
+.mt
+{
+  position: relative;
+}
+.dt{
+  display: block;
+
+}
+.pt{
+  right: 10px;
+  top:-3px;
+  display: block;
+  position: absolute;
+}
+</style>
diff --git a/ruoyi-ui/src/views/honor/index.vue b/ruoyi-ui/src/views/honor/index.vue
index bb75692..a5f3bf5 100644
--- a/ruoyi-ui/src/views/honor/index.vue
+++ b/ruoyi-ui/src/views/honor/index.vue
@@ -187,6 +187,9 @@
       <el-table-column label="鑾峰緱鏃堕棿" prop="getDate" sortable width="170" align="center" >
         <template slot-scope="scope">{{scope.row.getDate? scope.row.getDate: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
+      <el-table-column label="瀛樻斁浣嶇疆" prop="location" sortable width="170" align="center" >
+        <template slot-scope="scope">{{scope.row.location? scope.row.location: '鈥斺�斺�斺��'}}</template>
+      </el-table-column>
       <el-table-column label="鐢靛瓙鏂囦欢" prop="url" width="160" align="center">
         <template slot-scope="scope" >
           <img
@@ -228,12 +231,12 @@
             v-hasPermi="['system:role:remove']"
           >鍒犻櫎</el-button>
 
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-d-arrow-right"-->
-<!--            @click="handleCheck(scope.row)">-->
-<!--            鏌ョ湅璇︽儏</el-button>-->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-d-arrow-right"
+            @click="handleCheck(scope.row)">
+            鏌ョ湅璇︽儏</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -626,7 +629,7 @@
     /** 鏌ョ湅璇︾粏淇℃伅 */
     handleCheck(row){
       const id = row.id;
-      this.$router.push("/familymodel/Doctor/doctorInfo/" + id);
+      this.$router.push("/self/honor/honorInfo/" + id);
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
@@ -634,7 +637,7 @@
       let jd = true
 
       this.$router.push({
-        path:"/familymodel/Doctor/doctorInfo/" + id,
+        path:"/self/honor/honorInfo/" + id,
         query:{
           detail:jd
         }
diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index 7526b7e..a0c9311 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -209,9 +209,9 @@
 
     <!--鎶樺彔闈㈡澘-->
     <el-collapse v-model="activeNames" @change="handleChange">
-      <el-collapse-item title="涓昏瀛︿範鍙婂伐浣滅粡鍘�" name="1">
+      <el-collapse-item title="涓昏瀛︿範鍙婂伐浣滅粡鍘�" name="1" >
         <el-table v-loading="loading" :data="experienceList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
-          <el-table-column label="璧锋鏃ユ湡" prop="startDate" sortable width="300" align="center" />
+          <el-table-column label="寮�濮嬫棩鏈�" prop="startDate" sortable width="300" align="center" />
           <el-table-column label="涓昏瀛︿範缁忓巻銆佸伐浣滃崟浣嶅強浠昏亴鎯呭喌" prop="content" sortable width="350" align="center" />
           <el-table-column label="璇佹槑浜�" prop="witness" sortable width="300" align="center" />
           <!--      鎿嶄綔-->
@@ -222,9 +222,9 @@
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
-                @click="handleAdd"
+                @click="showDialog1"
                 v-hasPermi="['system:role:edit']"
-              >淇敼</el-button>
+              >鏂板</el-button>
               <el-button
                 size="mini"
                 type="text"
@@ -232,10 +232,14 @@
                 @click="handleExperienceDelete(scope.row)"
                 v-hasPermi="['system:role:remove']"
               >鍒犻櫎</el-button>
-              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
-                <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button>
+<!--              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
+<!--                <el-button size="mini" -->
+<!--                           type="text" -->
+<!--                           icon="el-icon-d-arrow-right"  -->
+<!--                           @click="handleCheck(scope.row)"-->
+<!--                >鏌ョ湅璇︽儏</el-button>-->
 
-              </el-dropdown>
+<!--              </el-dropdown>-->
             </template>
           </el-table-column>
         </el-table>
@@ -257,6 +261,13 @@
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
+                @click="showDialog2"
+                v-hasPermi="['system:role:edit']"
+              >鏂板</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
                 @click="handleUpdate(scope.row)"
                 v-hasPermi="['system:role:edit']"
               >淇敼</el-button>
@@ -264,13 +275,13 @@
                 size="mini"
                 type="text"
                 icon="el-icon-delete"
-                @click="handleCertificateDelete(scope.row)"
+                @click="handDelete(scope.row)"
                 v-hasPermi="['system:role:remove']"
               >鍒犻櫎</el-button>
-              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
-                <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button>
+<!--              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
+<!--                <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button>-->
 
-              </el-dropdown>
+<!--              </el-dropdown>-->
             </template>
           </el-table-column>
         </el-table>
@@ -305,17 +316,97 @@
           <el-table-column label="璇佷欢鍚嶇О" prop="cerName" sortable width="280" align="center" />
           <el-table-column label="鎸佹湁鎯呭喌" prop="ownStatus" sortable width="280" align="center" />
           <el-table-column label="璇佷欢鍙风爜" prop="idNo" sortable width="280" align="center" />
-          <el-table-column label="鏈夋晥鏈�" prop="validityDate"  sortable width="280" align="center">
+          <el-table-column label="鏈夋晥鏈�" prop="startTime endTime"  sortable width="280" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.startTime || scope.row.endTime  == true">
+                {{scope.row.startTime}} 鑷� {{scope.row.endTime}}
+              </span>
+              <span v-else>鈥斺�斺�斺��</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope" v-if="scope.row.roleId !== 1">
+              <!--              @click="handleUpdate(scope.row)"-->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="showDialog3"
+                v-hasPermi="['system:role:edit']"
+              >鏂板</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="handleAdd"
+                v-hasPermi="['system:role:edit']"
+              >淇敼</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleCertificateDelete(scope.row)"
+                v-hasPermi="['system:role:remove']"
+              >鍒犻櫎</el-button>
+              <!--              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
+              <!--                <el-button size="mini" -->
+              <!--                           type="text" -->
+              <!--                           icon="el-icon-d-arrow-right"  -->
+              <!--                           @click="handleCheck(scope.row)"-->
+              <!--                >鏌ョ湅璇︽儏</el-button>-->
+
+              <!--              </el-dropdown>-->
+            </template>
           </el-table-column>
         </el-table>
       </el-collapse-item>
       <el-collapse-item title="鍑哄浗锛堝锛夋儏鍐�" name="5">
         <el-table v-loading="loading" :data="AbroadList" @selection-change="handleSelectionChange"
                   :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
-          <el-table-column label="璧锋鏃ユ湡" prop="startDate" sortable width="350" align="center" />
+          <el-table-column label="璧锋鏃ユ湡" prop="startTime endTime" sortable width="350" align="center" >
+            <template slot-scope="scope">
+              <span v-if="scope.row.startTime || scope.row.endTime  == true">
+                {{scope.row.startTime}} 鑷� {{scope.row.endTime}}
+              </span>
+              <span v-else>鈥斺�斺�斺��</span>
+            </template>
+          </el-table-column>
           <el-table-column label="鎵�鍒板浗瀹舵垨鑰呭湴鍖�" prop="destination" sortable width="350" align="center" />
           <el-table-column label="浜嬬敱锛堟梾娓搞�佽蛋璁裤�佹帰浜层�佺户鎵胯储浜с�佸叾浠栵級" prop="cause" sortable width="400" align="center" />
+          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+            <template slot-scope="scope" v-if="scope.row.roleId !== 1">
+              <!--              @click="handleUpdate(scope.row)"-->
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="showDialog4"
+                v-hasPermi="['system:role:edit']"
+              >鏂板</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="handleAdd"
+                v-hasPermi="['system:role:edit']"
+              >淇敼</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="handleAbroadDelete(scope.row)"
+                v-hasPermi="['system:role:remove']"
+              >鍒犻櫎</el-button>
+              <!--              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
+              <!--                <el-button size="mini" -->
+              <!--                           type="text" -->
+              <!--                           icon="el-icon-d-arrow-right"  -->
+              <!--                           @click="handleCheck(scope.row)"-->
+              <!--                >鏌ョ湅璇︽儏</el-button>-->
 
+              <!--              </el-dropdown>-->
+            </template>
+          </el-table-column>
         </el-table>
       </el-collapse-item>
     </el-collapse>
@@ -339,26 +430,6 @@
           <div v-if="item.term === '宸ヤ綔'"> {{item.content}}</div>
           <div v-if="item.term === '缁撳鍚�'"> {{item.content}}</div>
         </el-tab-pane>
-<!--        <el-tab-pane label="濠村効"  >-->
-<!--          <div v-if="AutobiographyList.term === '濠村効'" v-model="AutobiographyList.content">-->
-<!--            {{AutobiographyList.content}}-->
-<!--          </div>-->
-<!--        </el-tab-pane>-->
-<!--        <el-tab-pane label="3~6宀�(骞煎効鏈�)" name="2" ></el-tab-pane>-->
-<!--        <el-tab-pane label="6~12(灏忓)" name="3" ></el-tab-pane>-->
-<!--        <el-tab-pane label="12~15(鍒濅腑)" name="4"></el-tab-pane>-->
-<!--        <el-tab-pane label="15~18(楂樹腑)" name="5"></el-tab-pane>-->
-<!--        <el-tab-pane label="18~22(澶у)" name="6"></el-tab-pane>-->
-<!--        <el-tab-pane label="22~25(鐮旂┒鐢�)" name="7"></el-tab-pane>-->
-<!--        <el-tab-pane label="26~ (宸ヤ綔)" name="8"></el-tab-pane>-->
-<!--        <el-tab-pane label="锛熷瞾缁撳" name="9"></el-tab-pane>-->
-<!--        &lt;!&ndash;    </div>&ndash;&gt;-->
-<!--        &lt;!&ndash;        <el-tab-pane&ndash;&gt;-->
-<!--        &lt;!&ndash;          v-for="(item, index) in AutobiographyTermList"&ndash;&gt;-->
-<!--        &lt;!&ndash;          :key="index"&ndash;&gt;-->
-<!--        &lt;!&ndash;          :name="item"&ndash;&gt;-->
-<!--        &lt;!&ndash;          :label="item"&ndash;&gt;-->
-<!--        &lt;!&ndash;        />&ndash;&gt;-->
       </el-tabs>
 
 
@@ -372,11 +443,11 @@
       @pagination="getList"
     />
 
-    <!-- 淇敼涓昏缁忓巻淇℃伅閰嶇疆瀵硅瘽妗� -->
+    <!-- 鏂板涓昏缁忓巻淇℃伅閰嶇疆瀵硅瘽妗� -->
     <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
-      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px">
-        <el-form-item label="璧锋鏃ユ湡" prop="startDate">
-          <el-input v-model="formDat.startDate" placeholder="璇疯緭鍏ヨ捣姝㈡棩鏈�" clearable :style="{width: '100%'}" ></el-input>
+      <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" placeholder="璇疯緭鍏ュ紑濮嬫棩鏈�" clearable :style="{width: '100%'}" ></el-input>
         </el-form-item>
         <el-form-item label="涓昏瀛︿範缁忓巻銆佸伐浣滃崟浣嶅強浠昏亴鎯呭喌" prop="content">
           <el-input v-model="formDat.content" placeholder="璇疯緭鍏ヤ富瑕佸涔犵粡鍘嗐�佸伐浣滃崟浣嶅強浠昏亴鎯呭喌" clearable :style="{width: '100%'}" >
@@ -391,12 +462,98 @@
       <h4 class="form-header"> </h4>
 
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">淇� 瀛�</el-button>
+        <el-button type="primary" @click="submitDataScope">淇� 瀛�</el-button>
         <el-button @click="cancelData">鍙� 娑�</el-button>
       </div>
     </el-dialog>
+    <!-- 鏂板瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐典俊鎭厤缃璇濇 -->
+    <el-dialog :title="title" :visible.sync="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>
+        </el-form-item>
+        <el-form-item label="濮撳悕" prop="nickName">
+          <el-input v-model="formDat.nickName" placeholder="璇疯緭鍏ュ鍚�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="鍗曚綅" prop="unit">
+          <el-input v-model="formDat.unit" placeholder="璇疯緭鍏ュ崟浣�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="鑱屽姟" prop="position">
+          <el-input v-model="formDat.position" placeholder="璇疯緭鍏ヨ亴鍔�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="鏀挎不闈㈣矊" prop="politicalOutlook">
+          <el-input v-model="formDat.politicalOutlook" placeholder="璇疯緭鍏ユ斂娌婚潰璨�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
 
+      </el-form>
+      <h4 class="form-header"> </h4>
 
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDataScope">淇� 瀛�</el-button>
+        <el-button @click="cancelData">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
+    <!-- 鏂板鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐典俊鎭厤缃璇濇 -->
+    <el-dialog :title="title" :visible.sync="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%'}" >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="鎸佹湁鎯呭喌" prop="ownStatus">
+          <el-input v-model="formDat.ownStatus" placeholder="璇疯緭鍏ユ寔鏈夋儏鍐�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="璇佷欢鍙风爜" prop="idNo">
+          <el-input v-model="formDat.idNo" placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="寮�濮嬫棩鏈�" prop="startTime">
+          <el-input v-model="formDat.startTime" placeholder="璇疯緭鍏ュ紑濮嬫棩鏈�" clearable :style="{width: '100%'}" ></el-input>
+        </el-form-item>
+        <el-form-item label="缁撴潫鏃ユ湡" prop="endTime">
+          <el-input v-model="formDat.endTime" placeholder="璇疯緭鍏ョ粨鏉熸棩鏈�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+         </el-form>
+      <h4 class="form-header"> </h4>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDataScope">淇� 瀛�</el-button>
+        <el-button @click="cancelData">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
+    <!-- 鏂板鍑哄浗锛堝锛夋儏鍐典俊鎭厤缃璇濇 -->
+    <el-dialog :title="title" :visible.sync="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" placeholder="璇疯緭鍏ュ紑濮嬫棩鏈�" clearable :style="{width: '100%'}" ></el-input>
+        </el-form-item>
+        <el-form-item label="缁撴潫鏃ユ湡" prop="endTime">
+          <el-input v-model="formDat.endTime" placeholder="璇疯緭鍏ョ粨鏉熸棩鏈�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="鎵�鍒板浗瀹舵垨鑰呭湴鍖�" prop="destination">
+          <el-input v-model="formDat.destination" placeholder="璇疯緭鍏ユ墍鍒板浗瀹舵垨鑰呭湴鍖�" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+        <el-form-item label="浜嬬敱(鏃呮父銆佽蛋璁裤�佹帰浜层�佺户鎵胯储浜с�佸叾浠�)" prop="cause">
+          <el-input v-model="formDat.cause" placeholder="璇疯緭鍏ヤ簨鐢�(鏃呮父銆佽蛋璁裤�佹帰浜层�佺户鎵胯储浜с�佸叾浠�)" clearable :style="{width: '100%'}" >
+          </el-input>
+        </el-form-item>
+
+      </el-form>
+      <h4 class="form-header"> </h4>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDataScope">淇� 瀛�</el-button>
+        <el-button @click="cancelData">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
 
 
   </div>
@@ -409,10 +566,22 @@
 
 
 //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁�  --鎺ュソ浜�
-import {getIndividualList, getIndividualRelation, delIndividual, updateIndividual, addIndividual,listExperience,updateExperience,
-  addExperience,delExperience} from "@/api/self/index";
 import {
+  getIndividualList,
+  getIndividualRelation,
+  delIndividual,
+  updateIndividual,
+  addIndividual,
+  listExperience,
+  updateExperience,
+  addExperience,
+  delExperience,
   delCertificate,
+  addCertificate,
+  addAbroad,
+  delAbroad
+} from "@/api/self/index";
+import {
   getAbroadList,
   getAutobiography,
   getAutobiographyList,
@@ -422,6 +591,7 @@
 import { delFamilyevent, uploadPic } from '../../api/bignote'
 import { blobValidate } from '../../utils/ruoyi'
 import {getCategory} from "@/api/self/index";
+import {addContact} from "@/api/contacts";
 
 export default {
   name: "show",
@@ -482,6 +652,9 @@
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
       open: false,
+      relation1:false,
+      certificate:false,
+      abroad:false,
       // open:true,
       // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛�
       openDataScope: false,
@@ -543,6 +716,8 @@
         ownStatus:undefined,
         //鍑哄浗锛堝锛夋儏鍐�
         destination:undefined,
+        startTime:undefined,
+        endTime:undefined,
         cause:undefined,
         url: undefined,
       },
@@ -655,8 +830,52 @@
       this.reset();
     },
     //涓嬫媺
-    handleChange(val) {
-      console.log(val);
+    handleChange(activeNames) {
+      // console.log(val);
+      this.reset();
+      if (activeNames.includes('1')) {
+        this.showDialog1();
+      }else if (activeNames.includes('2')) {
+        this.showDialog2();
+      }else if (activeNames.includes('3')) {
+        this.showDialog3();
+      }else if (activeNames.includes('4')) {
+        this.showDialog4();
+      }else {
+        this.open = false;
+        this.relation1 = false;
+        this.certificate =false;
+        this.abroad=false
+      }
+    },
+    //鎵撳紑涓嶅悓鐨勬柊澧炲脊绐�
+    showDialog1() {
+      this.open = true;
+      this.relation1 = false;
+      this.certificate =false;
+      this.abroad=false;
+      this.title = "娣诲姞涓昏涓汉缁忓巻淇℃伅";
+    },
+    showDialog2() {
+      this.open = false;
+      this.relation1 = true;
+      this.certificate =false;
+      this.abroad=false;
+      this.title = "娣诲姞瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐�";
+    },
+    showDialog3() {
+      this.open = false;
+      this.relation1 = false;
+      this.certificate =true;
+      this.abroad=false;
+      this.title = "娣诲姞鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐�";
+    },
+    showDialog4() {
+      this.open = false;
+      this.relation1 = false;
+      this.certificate =false;
+      this.abroad=true;
+      this.title = "娣诲姞鍑哄浗锛堝锛夋儏鍐�";
     },
 
     //涓汉鑷紶
@@ -769,8 +988,6 @@
       this.formDat.url = ul+","+uls
 
       this.$refs['elForm'].validate(valid => {
-
-
         if (valid) {
           if (this.formDat.id != undefined) {
             updateIndividual(this.formDat).then(response => {
@@ -886,11 +1103,11 @@
       this.isShow_2=true
     },
     //淇敼鎸夐挳
-    /** 淇敼鎸夐挳鎿嶄綔 */
+    /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd() {
       this.reset();
-      this.open = true;
-      this.title = "淇敼璇︾粏淇℃伅";
+      // this.open = true;
+      this.title = "鏂板璇︾粏淇℃伅";
     },
     /** 鏌ヨ鑷紶淇℃伅 */
     getAutobiographyInfor()
@@ -916,9 +1133,20 @@
       this.$refs["elForm"].validate(valid => {
         if (valid) {
 
-          addIndividual(this.formDat).then(response => {
+
+          addExperience(this.formDat).then(response => {
             this.$modal.msgSuccess("鏂板鎴愬姛");
             this.open = false;
+            this.getList();
+          });
+          addCertificate(this.formDat).then(response => {
+            this.$modal.msgSuccess("鏂板鎴愬姛");
+            this.certificate = false;
+            this.getList();
+          });
+          addAbroad(this.formDat).then(response => {
+            this.$modal.msgSuccess("鏂板鎴愬姛");
+            this.abroad = false;
             this.getList();
           });
         }
@@ -950,7 +1178,7 @@
     /** 鍒犻櫎涓汉缁忓巻鎸夐挳鎿嶄綔 */
     handleExperienceDelete(row) {
       const Ids = row.id || this.ids;
-      this.$modal.confirm('鏄惁纭鍒犻櫎搴忓彿涓�"' + Ids + '"鐨勬暟鎹」锛�').then(function() {
+      this.$modal.confirm('鏄惁纭鍒犻櫎鏁版嵁椤癸紵').then(function() {
         return delExperience(Ids);
       }).then(() => {
         this.getList();
@@ -960,13 +1188,23 @@
     /** 鍒犻櫎鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐垫寜閽搷浣� */
     handleCertificateDelete(row) {
       const Ids = row.id || this.ids;
-      this.$modal.confirm('鏄惁纭鍒犻櫎搴忓彿涓�"' + Ids + '"鐨勬暟鎹」锛�').then(function() {
+      this.$modal.confirm('鏄惁纭鍒犻櫎鏁版嵁椤癸紵').then(function() {
         return delCertificate(Ids);
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       }).catch(() => {});
     },
+    /** 鍒犻櫎鍑哄浗锛堝锛夋儏鍐垫寜閽搷浣� */
+    handleAbroadDelete(row) {
+      const Ids = row.id || this.ids;
+      this.$modal.confirm('鏄惁纭鍒犻櫎鏁版嵁椤癸紵').then(function() {
+        return delAbroad(Ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      }).catch(() => {});
+    },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
       this.download('/self/user/export', {

--
Gitblit v1.9.1