| | |
| | | </el-cascader> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="queryInfo()" |
| | | ><i class="el-icon-search"></i> {{ |
| | | $t("operatManage.ELM.search") |
| | | }}</el-button |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="queryInfo()" |
| | | icon="el-icon-search" |
| | | >{{ $t("operatManage.ELM.search") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="resetInfo('queryForm')" |
| | | ><i class="el-icon-delete"></i> {{ |
| | | $t("operatManage.ELM.reset") |
| | | }}</el-button |
| | | <el-button |
| | | size="small" |
| | | @click="resetInfo('queryForm')" |
| | | icon="el-icon-refresh" |
| | | > |
| | | {{ $t("operatManage.ELM.reset") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | <br /> |
| | | <el-form-item> |
| | | <el-button type="success" size="small" @click="showAddDialog" |
| | | ><i class="el-icon-plus"></i> {{ |
| | | $t("common.append") |
| | | }}</el-button |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | @click="showAddDialog" |
| | | icon="el-icon-plus" |
| | | > |
| | | {{ $t("common.append") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="danger" size="small" @click="deleteUserInfo" |
| | | ><i class="el-icon-delete"></i> {{ |
| | | $t("common.delete") |
| | | }}</el-button |
| | | <el-button |
| | | type="danger" |
| | | size="small" |
| | | @click="deleteUserInfo" |
| | | icon="el-icon-delete" |
| | | > |
| | | {{ $t("common.delete") }} |
| | | </el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="danger" size="small" @click="editPwd" |
| | | ><i class="el-icon-unlock"></i> 重置密码</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | @click="editPwd" |
| | | icon="el-icon-unlock" |
| | | >重置密码 |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | :label="$t('common.operate')" |
| | | width="80px" |
| | | fixed="right" |
| | | v-if="menuStatus.update" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <!-- <el-button type="primary" size="small">修改</el-button> --> |
| | |
| | | } |
| | | }; |
| | | return { |
| | | menuStatus: { |
| | | delete: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | isNewUser: false, |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | |
| | | }, |
| | | methods: { |
| | | ...mapActions(["login", "getpublickey"]), |
| | | getUserInfo(params) { |
| | | getUserInfo() { |
| | | queryDepTree() |
| | | .then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | //搜索按钮 |
| | | queryInfo() { |
| | | let searchData = { |
| | | uname: this.queryForm.uname, |
| | | uname: this.queryForm.uname.trim(), |
| | | depid: this.queryForm.depid, |
| | | pageIndex: this.pageIndex, |
| | | pageSize: this.pageSize, |
| | |
| | | setTimeout(() => { |
| | | this.fullscreenLoading = false; |
| | | if (res.code == 200) { |
| | | this.getUserInfo(1, 10); |
| | | this.getUserInfo(); |
| | | this.$message({ |
| | | message: "添加成功", |
| | | type: "success", |
| | |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | //多选 |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | //删除按钮 |
| | | deleteUserInfo() { |
| | |
| | | message: "删除成功!", |
| | | }); |
| | | this.multipleSelection = []; |
| | | this.getUserInfo(1, 10); |
| | | this.getUserInfo(); |
| | | } else { |
| | | this.$message.error("删除失败"); |
| | | } |
| | |
| | | setTimeout(() => { |
| | | this.fullscreenLoading = false; |
| | | if (res.code == 200) { |
| | | this.getUserInfo(1, 10); |
| | | this.getUserInfo(); |
| | | this.$message({ |
| | | message: "修改成功", |
| | | type: "success", |
| | |
| | | setTimeout(() => { |
| | | this.fullscreenLoading = false; |
| | | if (res.code == 200) { |
| | | this.getUserInfo(1, 10); |
| | | this.getUserInfo(); |
| | | this.$message({ |
| | | message: "修改成功", |
| | | type: "success", |
| | |
| | | this.editForm = JSON.parse(this.initialForm); |
| | | }); |
| | | }, |
| | | //多选 |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | |
| | | handleSizeChange(val) { |
| | | // console.log(`每页 ${val} 条`); |
| | | this.pageSize = val; |
| | |
| | | this.currentPage = val; |
| | | this.queryInfo(); |
| | | }, |
| | | showPermsMenu(res) { |
| | | console.log(res.tag); |
| | | switch (res.tag) { |
| | | case "/delete": |
| | | this.menuStatus.delete = true; |
| | | break; |
| | | case "/insert": |
| | | this.menuStatus.insert = true; |
| | | break; |
| | | case "/update": |
| | | this.menuStatus.update = true; |
| | | break; |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getUserInfo(1, 10); |
| | | this.getUserInfo(); |
| | | this.getpublickey(); |
| | | }, |
| | | created() { |
| | | var val = this.$store.state.currentPerms; |
| | | var permsEntity = this.$store.state.permsEntity; |
| | | for (var i = 0; i < permsEntity.length; i++) { |
| | | if (permsEntity[i].perms == val) { |
| | | this.showPermsMenu(permsEntity[i]); |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | <style> |