From 80e0b09695493b7f811f746dfb7158244088afe3 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期日, 22 九月 2024 11:02:56 +0800 Subject: [PATCH] 修改了多个bug --- ruoyi-ui/src/views/clanManager/ancestor/index.vue | 73 ++++++++++++------------------------ 1 files changed, 25 insertions(+), 48 deletions(-) diff --git a/ruoyi-ui/src/views/clanManager/ancestor/index.vue b/ruoyi-ui/src/views/clanManager/ancestor/index.vue index 45d8572..51c32da 100644 --- a/ruoyi-ui/src/views/clanManager/ancestor/index.vue +++ b/ruoyi-ui/src/views/clanManager/ancestor/index.vue @@ -8,48 +8,14 @@ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label="鐢ㄦ埛鍚嶇О" prop="userName"> <el-input - v-model="queryParams.userName" + v-model="queryParams.name" placeholder="璇疯緭鍏ョ敤鎴峰悕绉�" clearable style="width: 240px" @keyup.enter.native="handleQuery" /> </el-form-item> - <el-form-item label="鎵嬫満鍙风爜" prop="phonenumber"> - <el-input - v-model="queryParams.phonenumber" - placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" - clearable - style="width: 240px" - @keyup.enter.native="handleQuery" - /> - </el-form-item> - <el-form-item label="鐘舵��" prop="status"> - <el-select - v-model="queryParams.status" - placeholder="鐢ㄦ埛鐘舵��" - clearable - style="width: 240px" - > - <el-option - v-for="dict in dict.type.sys_normal_disable" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> - <el-form-item label="鍒涘缓鏃堕棿"> - <el-date-picker - v-model="dateRange" - style="width: 240px" - value-format="yyyy-MM-dd" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - </el-form-item> + <el-form-item> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> @@ -79,7 +45,7 @@ >淇敼</el-button> </el-col> - <el-col :span="1.5"> + <!-- <el-col :span="1.5"> <el-button type="info" plain @@ -88,7 +54,7 @@ @click="handleImport" v-hasPermi="['system:user:import']" >瀵煎叆</el-button> - </el-col> + </el-col> --> <el-col :span="1.5"> <el-button type="warning" @@ -102,7 +68,7 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" ></right-toolbar> </el-row> - <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> + <el-table v-loading="loading" border :data="userList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="50" align="center" /> <el-table-column label="鐢ㄦ埛缂栧彿" align="center" key="id" prop="id" /> <el-table-column label="鐢ㄦ埛鍚嶇О" align="center" key="name" prop="name" :show-overflow-tooltip="true" /> @@ -134,8 +100,7 @@ <el-dropdown-menu slot="dropdown"> <el-dropdown-item command="handleResetPwd" icon="el-icon-key" v-hasPermi="['system:user:resetPwd']">閲嶇疆瀵嗙爜</el-dropdown-item> - <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check" - v-hasPermi="['system:user:edit']">鍒嗛厤瑙掕壊</el-dropdown-item> + </el-dropdown-menu> </el-dropdown> </template> @@ -158,7 +123,7 @@ <el-row> <el-col :span="12" > - <el-form-item label="瀹舵棌鍚嶇О" prop="clanId"> + <el-form-item label="閫夊鏃忓彿" prop="clanId"> <el-select v-model="form.clanId" placeholder="璇疯緭鍏ュ鏃忓悕绉�"> <el-option @@ -460,6 +425,7 @@ /** 鏌ヨ鐢ㄦ埛鍒楄〃 */ getList() { this.loading = true; + alert(this.queryParams.name) //alert(this.queryParams.pageNum) listAncestor(this.queryParams).then(response => { this.userList = response.data.data; @@ -530,7 +496,8 @@ }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { - this.ids = selection.map(item => item.userId); + this.ids = selection.map(item => item.id); + console.log(this.ids+"----------") this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -624,14 +591,16 @@ }, /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */ handleResetPwd(row) { - this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", { + // alert(333) + // alert(row.sysId) + this.$prompt('璇疯緭鍏�"' + row.name + '"鐨勬柊瀵嗙爜', "鎻愮ず", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", closeOnClickModal: false, inputPattern: /^.{5,20}$/, inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿" }).then(({ value }) => { - resetUserPwd(row.userId, value).then(response => { + resetUserPwd(row.sysId, value).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value); }); }).catch(() => {}); @@ -714,9 +683,17 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('system/user/export', { - ...this.queryParams - }, `user_${new Date().getTime()}.xlsx`) + const Ids = this.ids; +alert(Ids) + if(Ids.length==0) + { + this.download('/ZfAncestor/export', { + ...this.queryParams + }, `zIdea_${new Date().getTime()}.xlsx`) + }else{ + this.download('/ZfAncestor/export1/'+Ids, { + }, `zIdea_${new Date().getTime()}.xlsx`) + } }, /** 瀵煎叆鎸夐挳鎿嶄綔 */ handleImport() { -- Gitblit v1.9.1