From 32148fb89c6cbedc24aaf9cb93a215a6cc665f2b Mon Sep 17 00:00:00 2001
From: yz3456 <2753272399@qq.com>
Date: 星期二, 09 七月 2024 16:56:14 +0800
Subject: [PATCH] 修改了一些报错,完善了用户管理配偶的选择模块

---
 ruoyi-ui/src/views/self/show.vue |  120 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 106 insertions(+), 14 deletions(-)

diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index 3dd4a39..9fb10c6 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -115,7 +115,7 @@
     </el-form>
     <div>
 
-      <el-row :gutter="10" class="mb8">
+      <el-row :gutter="10" class="mb8" v-if="userId != 2">
         <el-col :span="1.5">
           <el-button
             type="primary"
@@ -154,7 +154,7 @@
             plain
             icon="el-icon-download"
             size="mini"
-            @click="handleExportTemplatem"
+            @click="handleExportTemplate"
             v-hasPermi="['family:note:export']"
           >瀵煎叆妯℃澘涓嬭浇</el-button>
         </el-col>
@@ -220,7 +220,7 @@
       </el-table-column>
 
       <!--      </el-table-column>-->
-      <el-table-column label="鎿嶄綔" align="center" width="250" class-name="small-padding fixed-width">
+      <el-table-column label="鎿嶄綔" align="center" width="250" class-name="small-padding fixed-width" v-if="userId != 2">
         <template slot-scope="scope" v-if="scope.row.roleId !== 1">
           <div class="button-container">
             <el-button
@@ -364,7 +364,7 @@
             ></video>
             <img v-else
                  class="el-upload-list__item-thumbnail"
-                 :src="file.url"
+                 src="../../assets/images/deviceLis.png"
                  alt=""
                  style="width: 100%; height: 100%"
                  fit="cover"></img>
@@ -485,7 +485,7 @@
             </template>
           </el-table-column>
           <!--      鎿嶄綔-->
-          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2">
             <template slot-scope="scope" v-if="scope.row.roleId !== 1">
               <el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]"
                @click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button>
@@ -540,7 +540,7 @@
               <template v-else><el-input v-model="scope.row.otherPolitical"></el-input></template>
             </template>
           </el-table-column>
-          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2">
             <template slot-scope="scope" v-if="scope.row.roleId !== 1">
               <el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]"
                 @click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button>
@@ -605,7 +605,7 @@
               ></el-date-picker></template>
             </template>
           </el-table-column>
-          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2">
             <template slot-scope="scope" v-if="scope.row.roleId !== 1">
               <el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]"
                          @click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button>
@@ -658,7 +658,7 @@
               <template v-else><el-input v-model="scope.row.cause"></el-input></template>
             </template>
           </el-table-column>
-          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+          <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2">
             <template slot-scope="scope" v-if="scope.row.roleId !== 1">
               <el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]"
                          @click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button>
@@ -903,14 +903,14 @@
   getCertificateList, addCertificate, updateCertificate, delCertificate,
   getAbroadList, addAbroad, updateAbroad, delAbroad, listType,
   getAutobiographyList, getAutobiographyTermList, addAutobiography, updateAutobiography,delAutobiography,
-  getCategory,
+  getCategory,download
 } from "@/api/self/index";
 // import { listRole, getRole, delRole, addRole, updateRole, dataScope,changeRoleStatus, deptTreeSelect } from "@/api/system/role";
 // import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
 
 //瀵煎叆鎺ュ彛鍑芥暟
 import {listNote,enload,getNote, addNote,updateNote, delNote,uploadPic} from "@/api/memo/index";
-
+import {getInfo} from "@/api/login";
 import { Notification, MessageBox, Message, Loading } from 'element-ui'
 //import { delFamilyevent, uploadPic } from '../../api/bignote'
 import { blobValidate } from '../../utils/ruoyi'
@@ -923,6 +923,7 @@
 
   data() {
     return {
+      userId: undefined,
 	    uploadFileList: [],
       uploadFileList1: [],
       // 閬僵灞�
@@ -1106,6 +1107,21 @@
       },
       // 琛ㄥ崟鏍¢獙
       rules: {
+        happenTime: [{
+          required: true,
+          message: '璇烽�夋嫨鏃堕棿',
+          trigger: 'blur'
+        }],
+        people: [{
+          required: true,
+          message: '璇疯緭鍏ヤ汉鐗�',
+          trigger: 'blur'
+        }],
+        title: [{
+          required: true,
+          message: '璇疯緭鍏ヤ簨浠舵爣棰�',
+          trigger: 'blur'
+        }],
         //鍩烘湰淇℃伅
         nickName: [{
           // required: true,
@@ -1201,6 +1217,74 @@
           trigger: 'blur'
         }],
 
+        relation: [{
+          required: true,
+          message: '璇疯緭鍏ュ叧绯�',
+          trigger: 'blur'
+        }],
+        otherName: [{
+          required: true,
+          message: '璇疯緭鍏ュ鍚�',
+          trigger: 'blur'
+        }],
+        otherUnit: [{
+          required: true,
+          message: '璇疯緭鍏ュ崟浣�',
+          trigger: 'blur'
+        }],
+        otherPosition: [{
+          required: true,
+          message: '璇疯緭鍏ヨ亴鍔�',
+          trigger: 'blur'
+        }],
+        otherPolitical: [{
+          required: true,
+          message: '璇疯緭鍏ユ斂娌婚潰璨�',
+          trigger: 'blur'
+        }],
+
+        cerName: [{
+          required: true,
+          message: '璇疯緭鍏ヨ瘉浠跺悕绉�',
+          trigger: 'blur'
+        }],
+        type: [{
+          required: true,
+          message: '璇疯緭鍏ヨ瘉浠剁被鍨�',
+          trigger: 'blur'
+        }],
+        ownStatus: [{
+          required: true,
+          message: '璇疯緭鍏ユ寔鏈夋儏鍐�',
+          trigger: 'blur'
+        }],
+        idNo: [{
+          required: true,
+          message: '璇疯緭鍏ヨ瘉浠跺彿鐮�',
+          trigger: 'blur'
+        }],
+
+        startTime: [{
+          required: true,
+          message: '璇疯緭鍏ュ紑濮嬫椂闂�',
+          trigger: 'blur'
+        }],
+        endTime: [{
+          required: true,
+          message: '璇疯緭鍏ョ粨鏉熸椂闂�',
+          trigger: 'blur'
+        }],
+        destination: [{
+          required: true,
+          message: '璇疯緭鍏ユ墍鍒板湴鍖�',
+          trigger: 'blur'
+        }],
+        cause: [{
+          required: true,
+          message: '璇疯緭鍏ヤ簨鐢�',
+          trigger: 'blur'
+        }]
+
       },
       selectedOption:'',
       typeOptions:[],
@@ -1212,9 +1296,16 @@
   created() {
     this.getList();
     this.getAutobiographyInfor()
-
+    this.getInfo()
   },
   methods: {
+    getInfo(){
+          console.log('-----------------')
+          getInfo().then(response=>{
+            console.log(response.user.roles[0].roleId,'roleID')
+            this.userId = response.user.roles[0].roleId
+          })
+        },
     handleRemoveFile(file) {
       for(let i = 0; i < this.fileListOther.length; i++)
       {
@@ -1547,7 +1638,7 @@
           deptCheckStrictly: true,
           remark: undefined
         };
-      this.resetForm("form");
+      this.resetForm("elForm");
     },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
@@ -1641,10 +1732,10 @@
       }
     },
 
-    handleExportTemplatem(){
+    handleExportTemplate(){
       this.download('/zSelfNote/model', {
 
-      }, `zSelfNote${new Date().getTime()}.xlsx`)
+      }, `zSelfNote_${new Date().getTime()}.xlsx`)
     },
     /** 瀵煎叆鎿嶄綔*/
     handleEnportm(params){
@@ -1825,6 +1916,7 @@
         }
       });
       // 娓呯┖formDat瀵硅薄鐨勬暟鎹�
+      this.newOption=undefined
       Object.keys(this.formDat).forEach(key => {
         this.formDat[key] = '';
       });

--
Gitblit v1.9.1