| | |
| | | <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> |
| | |
| | | >修改</el-button> |
| | | </el-col> |
| | | |
| | | <el-col :span="1.5"> |
| | | <!-- <el-col :span="1.5"> |
| | | <el-button |
| | | type="info" |
| | | plain |
| | |
| | | @click="handleImport" |
| | | v-hasPermi="['system:user:import']" |
| | | >导入</el-button> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | |
| | | |
| | | <el-table-column label="用户角色" align="center" key="roleName" prop="roleName" width="120" /> |
| | | <el-table-column label="性别" align="center" key="sex" prop="sex" width="120" > |
| | | <template slot-scope="scope">{{scope.row.sex==0? '女': '男'}}</template> |
| | | <template slot-scope="scope">{{scope.row.sex==1? '女': '男'}}</template> |
| | | |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="操作" |
| | | fixed="right" label="操作" |
| | | align="center" |
| | | width="160" |
| | | class-name="small-padding fixed-width" |
| | |
| | | <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> |
| | |
| | | <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 |
| | |
| | | /** 查询用户列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | // alert(this.queryParams.name) |
| | | //alert(this.queryParams.pageNum) |
| | | listAncestor(this.queryParams).then(response => { |
| | | this.userList = response.data.data; |
| | |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.dateRange = []; |
| | | this.resetForm("queryForm"); |
| | | this.queryParams.deptId = undefined; |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: undefined, |
| | | role: undefined, |
| | | sex: undefined, |
| | | |
| | | }, |
| | | |
| | | // this.$refs.tree.setCurrentKey(null); |
| | | this.handleQuery(); |
| | | }, |
| | | // 多选框选中数据 |
| | | 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; |
| | | }, |
| | |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.a = 2 |
| | | this.pOID = row.userId |
| | | console.log(row) |
| | | console.log("000000000--") |
| | | this.pOID = row.id |
| | | this.sex = row.sex |
| | | // this.getSex(); |
| | | this.reset(); |
| | | const userId = row.userId || this.ids; |
| | | this.cuid= row.userId || this.ids; |
| | | const userId = row.id || this.ids; |
| | | this.cuid= row.id || this.ids; |
| | | // this.fid = response.data.familyId |
| | | alert(userId) |
| | | //alert(this.fid) |
| | | getUser(userId).then(response => { |
| | | this.form = response.data; |
| | | console.log(response.data,'formformformformform') |
| | | console.log(this.form.spouseId,'伴侣id') |
| | | // console.log(this.form.spouseId,'伴侣id') |
| | | this.postOptions = response.posts; |
| | | this.roleOptions= [] |
| | | this.roleOptions.push(response.roles[1]) |
| | |
| | | }, |
| | | /** 重置密码按钮操作 */ |
| | | 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(() => {}); |
| | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | 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() { |