From b27ea54515f95e248da08072640d123d49de477f Mon Sep 17 00:00:00 2001 From: yz3456 <2753272399@qq.com> Date: 星期四, 27 六月 2024 23:34:36 +0800 Subject: [PATCH] 修改了用户管理 --- ruoyi-ui/src/views/marry/index.vue | 40 +++++++++++++++++++++++++++++----------- 1 files changed, 29 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/views/marry/index.vue b/ruoyi-ui/src/views/marry/index.vue index d70c533..19720b4 100644 --- a/ruoyi-ui/src/views/marry/index.vue +++ b/ruoyi-ui/src/views/marry/index.vue @@ -223,7 +223,7 @@ <el-container > - <el-row :gutter="10" class="mb8"> + <el-row :gutter="10" class="mb8" v-if="userId != 2"> <el-col > <el-button plain @@ -358,7 +358,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> @@ -539,13 +539,14 @@ import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; import {listMarry,updateMarry,delMarryOld,addMarryOld,updateMarryOld} from "@/api/marry/index"; import { blobValidate } from '../../utils/ruoyi' +import {getInfo} from "@/api/login"; export default { name: "show", dicts: ['sys_normal_disable'], data() { return { - +userId: undefined, showOldSpouse:false,//鏄剧ず鍓嶄换淇℃伅 // 閬僵灞� disabled: false, @@ -570,6 +571,7 @@ limitCountImg:1,//涓婁紶鍥剧墖鐨勬渶澶ф暟閲� //涓汉淇℃伅鏁版嵁 marryList:{ + id:undefined, name:undefined, sex:undefined, birthday:undefined, @@ -602,6 +604,7 @@ activeNames:['1'], // 寮瑰嚭灞傛爣棰� title: "", + iddd:undefined, // 鏄惁鏄剧ず寮瑰嚭灞� open: false, // open:true, @@ -672,13 +675,13 @@ }, // 琛ㄥ崟鏍¢獙 rules: { - id: [{ - required: true, + idNo: [{ + // required: true, message: '璇疯緭鍏ヨ韩浠借瘉鍙风爜', trigger: 'blur' }], name: [{ - required: true, + // required: true, message: '璇疯緭鍏ュ鍚�', trigger: 'blur' }], @@ -688,7 +691,7 @@ trigger: 'change' }], marryStatus: [{ - required: true, + // required: true, message: '璇烽�夋嫨濠氬Щ鐘跺喌', trigger: 'change' }], @@ -727,9 +730,16 @@ }, created() { this.getList() + this.getInfo() }, methods: { - + getInfo(){ + console.log('-----------------') + getInfo().then(response=>{ + console.log(response.user.roles[0].roleId,'roleID') + this.userId = response.user.roles[0].roleId + }) + }, handleMarryStatusChange() { // 鍒ゆ柇褰撳墠閫変腑鐨勫濮荤姸鎬佹槸鍚︿负鍐嶅 if (this.mrs === '3') { @@ -753,6 +763,7 @@ cancelData() { this.open = false; this.reset(); + }, //涓嬫媺 handleChange(val) { @@ -767,7 +778,7 @@ getList() { - this.loading = false; + this.loading = true; //涓汉淇℃伅 listMarry(this.queryParams).then(response => { @@ -782,7 +793,9 @@ this.oldSpouseList = this.marryList.oldSpouseList; console.log(111) console.log("淇℃伅") - console.log(this.marryList); + console.log(this.marryList,'1111111111111111111'); + this.iddd = this.marryList.id + console.log(this.iddd,'2222222222222') //alert(this.marryList.bearStatus) if(this.marryList.marryStatus===3){ this.showOldSpouse = true; @@ -833,7 +846,7 @@ deptCheckStrictly: true, remark: undefined }; - this.resetForm("form"); + this.resetForm("elForm"); }, @@ -969,7 +982,10 @@ this.marryList.handbookStatus =parseInt(this.handsj) this.marryList.sex = this.sinds this.marryList.spouseSex = this.inds + console.log(this.marryList,'marryListmarryListmarryListmarryList') + // this.marryList.id = this.iddd this.$refs['elForm'].validate(valid => { + // alert(valid) if (valid) { if (this.marryList.id !== undefined) { updateMarry(this.marryList).then(response => { @@ -980,6 +996,7 @@ this.dsb = true this.isShow_2=false this.isShow = true + this.getList() }).catch(error => { console.error(error); @@ -991,6 +1008,7 @@ } } }) + this.getList() // 鍒锋柊椤甸潰 // window.location.reload(); }, -- Gitblit v1.9.1