| | |
| | | <template> |
| | | <div class="userInfo_box"> |
| | | <My-bread |
| | | :list="[ |
| | | <My-bread :list="[ |
| | | `${$t('operatManage.operatManage')}`, |
| | | `${$t('userManage.userManage')}`, |
| | | ]" |
| | | ></My-bread> |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | |
| | | <div class="inquire subpage_Div" ref="container"> |
| | | <el-form ref="queryForm" :model="queryForm" :inline="true"> |
| | | <div |
| | | class="inquire subpage_Div" |
| | | ref="container" |
| | | > |
| | | <el-form |
| | | ref="queryForm" |
| | | :model="queryForm" |
| | | :inline="true" |
| | | > |
| | | <div class="flex_box"> |
| | | <div style="margin-right: auto"> |
| | | <el-form-item |
| | | prop="uname" |
| | | :label="$t('userManage.userInfoObj.uname')" |
| | | > |
| | | <el-input v-model="queryForm.uname" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="depid" |
| | | :label="$t('userManage.userInfoObj.depName')" |
| | |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="queryForm.depName" |
| | | size="small" |
| | | placeholder="请选择" |
| | | style="width: 200px" |
| | | > |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="uname" |
| | | :label="$t('userManage.userInfoObj.uname')" |
| | | > |
| | | <el-input |
| | | v-model="queryForm.uname" |
| | | size="small" |
| | | :placeholder="$t('userManage.userInfoObj.unamePlaceholder')" |
| | | style="width: 200px" |
| | | > |
| | | <i slot="suffix" class="el-icon-search" @click="queryInfo"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div> |
| | | <!-- <el-form-item>--> |
| | | <!-- <el-button--> |
| | | <!-- type="primary"--> |
| | | <!-- size="small"--> |
| | | <!-- @click="queryInfo('queryForm')"--> |
| | | <!-- icon="el-icon-search"--> |
| | | <!-- >--> |
| | | <!-- {{ $t("operatManage.ELM.search") }}--> |
| | | <!-- </el-button>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="resetInfo('queryForm')" |
| | | icon="el-icon-refresh" |
| | | v-if="menuStatus.insert" |
| | | type="success" |
| | | size="small" |
| | | @click="showAddDialog" |
| | | icon="el-icon-plus" |
| | | > |
| | | {{ $t("operatManage.ELM.reset") }} |
| | | {{ $t("common.append") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | <el-form-item v-show="setbatchFlag"> |
| | |
| | | @click="editPwd" |
| | | type="warning" |
| | | icon="el-icon-unlock" |
| | | >{{ $t("common.changepassWord") }} |
| | | >{{ $t("common.changepassWord") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | type="success" |
| | | size="small" |
| | | @click="showAddDialog" |
| | | icon="el-icon-plus" |
| | | type="info" |
| | | size="small" |
| | | @click="resetInfo('queryForm')" |
| | | icon="el-icon-refresh" |
| | | > |
| | | {{ $t("common.append") }} |
| | | {{ $t("operatManage.ELM.reset") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box" :style="styleVar"> |
| | | <div class="dividing-line"></div> |
| | | <div |
| | | class="table_box" |
| | | :style="styleVar" |
| | | > |
| | | <el-table |
| | | ref="filterTable" |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | border |
| | | class="table_height" |
| | | height="calc(100% - 57px)" |
| | | height="calc(100% - 45px)" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | |
| | | :label="$t('userManage.userInfoObj.status')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag v-if="scope.row.status == 0" type="success">正常</el-tag> |
| | | <el-tag v-if="scope.row.status == 1" type="info">禁用</el-tag> |
| | | <el-tag v-if="scope.row.status == 2" type="warning">删除</el-tag> |
| | | <el-tag |
| | | v-if="scope.row.status == 0" |
| | | type="success" |
| | | >正常</el-tag> |
| | | <el-tag |
| | | v-if="scope.row.status == 1" |
| | | type="info" |
| | | >禁用</el-tag> |
| | | <el-tag |
| | | v-if="scope.row.status == 2" |
| | | type="warning" |
| | | >删除</el-tag> |
| | | <el-tag v-if="scope.row.status == 3">申请</el-tag> |
| | | <el-tag v-if="scope.row.status == 4" type="danger">拒批</el-tag> |
| | | <el-tag |
| | | v-if="scope.row.status == 4" |
| | | type="danger" |
| | | >拒批</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column |
| | | align="center" |
| | | prop="bak" |
| | | |
| | | |
| | | :label="$t('userManage.userInfoObj.bak')" |
| | | /> --> |
| | | <el-table-column |
| | |
| | | plain |
| | | @click="editInfo(scope.row)" |
| | | size="small" |
| | | >{{ $t("common.update") }}</el-button |
| | | > |
| | | >{{ $t("common.update") }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="margin-top: 25px" class="pagination_box"> |
| | | <div |
| | | style="margin-top: 10px;" |
| | | class="pagination_box" |
| | | > |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | |
| | | |
| | | <el-dialog |
| | | width="910px" |
| | | top="15vh" |
| | | :title=" |
| | | behavior == '新增用户' |
| | | ? `${$t('common.append')}` |
| | |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | | :model="editForm" |
| | | ref="editForm" |
| | | :rules="rules" |
| | | style="display: flex" |
| | | |
| | | > |
| | | <div> |
| | | <el-form-item |
| | |
| | | v-if="behavior == '新增用户'" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.uid" autocomplete="off"></el-input> |
| | | <div class="isNewUser" v-if="isNewUser"> |
| | | <el-input |
| | | v-model="editForm.uid" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <div |
| | | class="isNewUser" |
| | | v-if="isNewUser" |
| | | > |
| | | <img src="../../assets/img/success.png" /> |
| | | {{ $t("userManage.userInfoObj.uid") }} |
| | | </div> |
| | |
| | | :label="$t('userManage.userInfoObj.username')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.uname" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.uname" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="sex" |
| | |
| | | :label="$t('userManage.userInfoObj.nativePlace')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.natives" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.natives" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="depid" |
| | |
| | | :label="$t('userManage.userInfoObj.identityCard')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.idcard" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.idcard" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="width: 45%"> |
| | |
| | | :label="$t('userManage.userInfoObj.job')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.job" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.job" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="edu" |
| | | :label="$t('userManage.userInfoObj.edu')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.edu" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.edu" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="addr" |
| | | :label="$t('userManage.userInfoObj.addr')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.addr" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.addr" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="email" |
| | | :label="$t('userManage.userInfoObj.email')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.email" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.email" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="contact" |
| | | :label="$t('userManage.userInfoObj.contact')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.contact" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.contact" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="status" |
| | |
| | | :label="$t('userManage.userInfoObj.remarks')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="editForm.bak" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="editForm.bak" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <div v-if="behavior == '修改信息'" slot="footer" class="dialog-footer"> |
| | | <el-button size="small" type="info" @click="cancelEdit()">{{ |
| | | </div> |
| | | <div |
| | | v-if="behavior == '修改信息'" |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="cancelEdit()" |
| | | >{{ |
| | | $t("common.reset") |
| | | }}</el-button> |
| | | <el-button |
| | |
| | | type="primary" |
| | | @click="sendEdit('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t("common.submit") }}</el-button |
| | | > |
| | | >{{ $t("common.submit") }}</el-button> |
| | | </div> |
| | | <div v-else slot="footer" class="dialog-footer"> |
| | | <el-button size="small" type="info" @click="cancelAdd('editForm')">{{ |
| | | <div |
| | | v-else |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="cancelAdd('editForm')" |
| | | >{{ |
| | | $t("common.reset") |
| | | }}</el-button> |
| | | <el-button |
| | |
| | | type="primary" |
| | | @click="sendAdd('editForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t("common.submit") }}</el-button |
| | | > |
| | | >{{ $t("common.submit") }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | width="520px" |
| | | top="30vh" |
| | | :title="$t('common.changepassWord')" |
| | | :visible.sync="resetPwd" |
| | | :before-close="handleClose" |
| | | |
| | | > |
| | | <el-form :model="pwdForm" ref="pwdForm" :rules="rules"> |
| | | |
| | | <el-form |
| | | :model="pwdForm" |
| | | ref="pwdForm" |
| | | :rules="rules" |
| | | label-position="top" |
| | | > |
| | | <el-form-item |
| | | prop="adminPwd" |
| | | :label="$t('common.AdminPassword')" |
| | |
| | | v-model="pwdForm.adminPwd" |
| | | autocomplete="off" |
| | | show-password |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | v-model="pwdForm.newPwd" |
| | | autocomplete="off" |
| | | show-password |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | v-model="pwdForm.checkPwd" |
| | | autocomplete="off" |
| | | show-password |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button size="small" type="info" @click="cancelReset - 'pwdForm'">{{ |
| | | |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="cancelReset - 'pwdForm'" |
| | | >{{ |
| | | $t("common.reset") |
| | | }}</el-button> |
| | | <el-button |
| | |
| | | type="primary" |
| | | @click="sendReset('pwdForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t("common.submit") }}</el-button |
| | | > |
| | | >{{ $t("common.submit") }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | this.$nextTick(() => { |
| | | const rect = this.$refs.container.getBoundingClientRect(); |
| | | this.tableHeight = `${rect.height + 97}px`; |
| | | this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; |
| | | this.styleVar["height"] = `calc(100% - ${rect.height + 30}px)`; |
| | | }); |
| | | }, |
| | | ...mapActions(["login", "getpublickey"]), |
| | |
| | | if (res.code == 200) { |
| | | this.depList = this.treeData(res.result); |
| | | this.treeOptions = this.treeData(res.result); |
| | | this.queryForm.depName = this.depList[0].name; |
| | | this.queryInfo.depid = this.depList[0].id; |
| | | this.queryInfo(); |
| | | } else { |
| | | this.$notify.error({ |
| | | title: res.code, |
| | |
| | | }); |
| | | } |
| | | }) |
| | | .catch((res) => {}); |
| | | .catch((res) => { }); |
| | | |
| | | queryPageUser({ |
| | | pageIndex: 1, |
| | |
| | | }); |
| | | } |
| | | }) |
| | | .catch((res) => {}); |
| | | .catch((res) => { }); |
| | | }, |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | |
| | | }, |
| | | |
| | | handleNodeClickto(data, node, nodeData) { |
| | | this.queryForm.depid = data.id; |
| | | this.queryForm.depid = data.code; |
| | | this.queryForm.depName = data.name; |
| | | }, |
| | | //搜索按钮 |
| | | queryInfo() { |
| | | let searchData = { |
| | | uname: this.queryForm.uname.trim(), |
| | | depid: this.queryForm.depid, |
| | | depcode: this.queryForm.depid, |
| | | pageIndex: this.pageIndex, |
| | | pageSize: this.pageSize, |
| | | }; |
| | |
| | | //重置按钮 |
| | | resetInfo(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | this.queryForm.depName = this.depList[0].name; |
| | | this.queryInfo.depid = this.depList[0].id; |
| | | this.queryInfo(); |
| | | }, |
| | | //新增按钮 |
| | | showAddDialog() { |
| | |
| | | //重置密码 |
| | | editPwd() { |
| | | |
| | | |
| | | |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | |
| | | |
| | | if (std.length == 0) { |
| | | alert("请先选择用户"); |
| | | return; |
| | |
| | | handeditChange(data, node, nodeData) { |
| | | this.$set(this.editForm, "depid", data.id); |
| | | this.$set(this.editForm, "depName", data.name); |
| | | this.$set(this.editForm, "depcode", data.code); |
| | | this.$refs.editcaderHandle.dropDownVisible = false; |
| | | }, |
| | | //关闭弹出框 |
| | |
| | | |
| | | done(); |
| | | }) |
| | | .catch((_) => {}); |
| | | .catch((_) => { }); |
| | | }, |
| | | //提交编辑 |
| | | sendEdit(formName) { |
| | |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | |
| | | <style lang="less" scoped> |
| | | //@import url(); 引入公共css类 |
| | | .userInfo_box { |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | padding: 0.5%; |
| | | |
| | | .el-input { |
| | | width: 300px; |
| | |
| | | position: relative; |
| | | height: auto; |
| | | |
| | | padding: 8px; |
| | | margin-top: 20px; |
| | | //padding: 10px; |
| | | //margin-top: 20px; |
| | | |
| | | border-radius: 5px; |
| | | |
| | | margin-bottom: 20px; |
| | | //margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | |
| | | } |
| | | } |
| | | </style> |
| | | |
| | | |