From b29f1588f2bb8b46df38a52cbae07ea8590f099a Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期二, 08 八月 2023 19:10:27 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-ui/src/views/marry/index.vue | 111 ++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 68 insertions(+), 43 deletions(-) diff --git a/ruoyi-ui/src/views/marry/index.vue b/ruoyi-ui/src/views/marry/index.vue index 00e2ae4..4f41c1e 100644 --- a/ruoyi-ui/src/views/marry/index.vue +++ b/ruoyi-ui/src/views/marry/index.vue @@ -8,16 +8,7 @@ </el-backtop> <h2 style="font-size:30px;padding-top:0px">濠氬Щ鐘跺喌鐧昏琛�</h2> <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['system:role:add']" - >鏂板</el-button> - </el-col> + <el-col :span="1.5"> <el-button type="warning" @@ -68,11 +59,11 @@ </template> <template v-else> - <el-select v-model="marryList.marryStatus" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}"> - <el-option label="鏈" value="0"></el-option> - <el-option label="鍒濆" value="1"></el-option> - <el-option label="绂诲" value="2"></el-option> - <el-option label="鍐嶅" value="3"></el-option> + <el-select v-model="mrs" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}"> + <el-option label="鏈" value='0'></el-option> + <el-option label="鍒濆" value='1'></el-option> + <el-option label="绂诲" value='2'></el-option> + <el-option label="鍐嶅" value='3'></el-option> </el-select> </template> @@ -96,9 +87,17 @@ <el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange"> <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"> <el-row :span="16"> + <el-form-item label="鎬у埆" prop="sex" label-width="40px"> - <el-input v-model="marryList.sex === 1 ? '鐢�':'濂�' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> + <template v-if="!isEditing"> + <el-input v-model="marryList.sex === '鐢�' ? sinds='鐢�':sinds='濂�'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> + </template> + <template v-else> + <el-select v-model="sinds" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}" :disabled="dsb"> + <el-option label="鐢�" value='鐢�'></el-option> + <el-option label="濂�" value='濂�'></el-option> + </el-select> + </template> </el-form-item> </el-row> <el-row :span="16"> @@ -139,11 +138,7 @@ >缂栬緫</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> + </el-row> </el-container> @@ -185,7 +180,7 @@ </template> <template v-else> - <el-select v-model="marryList.spouseMarryStatus" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}"> + <el-select v-model="smrs" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}"> <el-option label="鏈" value="0"></el-option> <el-option label="鍒濆" value="1"></el-option> <el-option label="绂诲" value="2"></el-option> @@ -213,8 +208,17 @@ <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"> <el-row :span="16"> <el-form-item label="鎬у埆" prop="spouseSex" label-width="40px"> - <el-input v-model="marryList.spouseSex === 1 ? '鐢�':'濂�' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> + + <template v-if="!isEditing"> + <el-input v-model="marryList.spouseSex === '鐢�' ? inds='鐢�':inds='濂�'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> + </template> + <template v-else> + <el-select v-model="inds" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}" :disabled="dsb"> + <el-option label="鐢�" value='鐢�'></el-option> + <el-option label="濂�" value='濂�'></el-option> + </el-select> + </template> + </el-form-item> </el-row> <el-row :span="16"> @@ -702,7 +706,9 @@ // 閬僵灞� disabled: false, - + isEditing:false, + inds: undefined, + sinds: undefined, loading: false, formData:[], // 閫変腑鏁扮粍 @@ -720,10 +726,10 @@ noneBtnImg:false, limitCountImg:1,//涓婁紶鍥剧墖鐨勬渶澶ф暟閲� //涓汉淇℃伅鏁版嵁 - marryList:[], + marryList:{}, fit:['fill'], - oldSpouseList:[], + oldSpouseList:{}, //涓嬫媺瀹炵幇 activeNames:['1'], // 寮瑰嚭灞傛爣棰� @@ -732,6 +738,8 @@ open: false, // open:true, // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛� + mrs:undefined, + smrs:undefined, openDataScope: false, menuExpand: false, menuNodeAll: false, @@ -874,7 +882,7 @@ },{ value:'1', label:'鐢�' - },], + }], //鐢熻偛鎯呭喌 @@ -925,20 +933,18 @@ getList() { this.loading = false; - alert(344) //涓汉淇℃伅 listMarry(this.queryParams).then(response => { - alert(124) console.log(response.data) if(response.data.length == 0){ this.loading = false; - this.marryList=[]; - this.total = 0; - this.oldSpouseList = []; + this.marryList={}; + + this.oldSpouseList = {}; } else{ this.marryList = response.data; - this.total = response.data.total; + this.oldSpouseList = this.marryList.oldSpouseList; this.loading = false; @@ -1038,6 +1044,22 @@ this.isShow=false this.isShow_2=true this.isEditing=true + if(this.marryList.marryStatus == 0) + this.mrs = '鏈' + else if(this.marryList.marryStatus == 1) + this.mrs = '鍒濆' + else if(this.marryList.marryStatus == 2) + this.mrs = '绂诲' + else + this.mrs = '鍐嶅'// this.isEdit=false + if(this.marryList.spouseMarryStatus == 0) + this.smrs = '鏈' + else if(this.marryList.spouseMarryStatus == 1) + this.smrs = '鍒濆' + else if(this.marryList.spouseMarryStatus == 2) + this.smrs = '绂诲' + else + this.smrs = '鍐嶅'// this.isEdit=false // this.isEdit=false }, @@ -1119,14 +1141,12 @@ //淇敼鍚庣殑淇濆瓨 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.marryList.url = ul+","+uls - + if(parseInt(this.mrs)) + this.marryList.marryStatus = parseInt(this.mrs) + if(parseInt(this.smrs)) + this.marryList.spouseMarryStatus = parseInt(this.smrs) + this.marryList.sex = this.sinds + this.marryList.spouseSex = this.inds this.$refs['elForm'].validate(valid => { if (valid) { if (this.marryList.id !== undefined) { @@ -1134,6 +1154,11 @@ this.$modal.msgSuccess("淇敼鎴愬姛"); // this.open = false; this.btn=false + this.isEditing = false + this.dsb = true + this.isShow_2=false + this.isShow = true + }); } else { this.$modal.msgSuccess("淇敼澶辫触"); -- Gitblit v1.9.1