|
@@ -42,9 +42,7 @@
|
|
|
<el-col :span="12" class="flexLeft">异常登录:<span>{{ account.ExceptionCount }}</span></el-col>
|
|
|
</el-row> -->
|
|
|
<el-row class="content">
|
|
|
- <el-col :span="24"
|
|
|
- >权限项数:<span>{{ account.AuthCount }}</span></el-col
|
|
|
- >
|
|
|
+ <el-col :span="24">权限项数:<span>{{ account.AuthCount }}</span></el-col>
|
|
|
</el-row>
|
|
|
<el-row class="content">
|
|
|
<el-col :span="12">
|
|
@@ -73,8 +71,7 @@
|
|
|
<div class="del-dialog">
|
|
|
<div class="title del-title">删除账号</div>
|
|
|
<div class="content del-content">
|
|
|
- <i class="el-icon-error error r10" />你确定要删除<span class="error l10">{{ deleteUserName }}</span
|
|
|
- >?
|
|
|
+ <i class="el-icon-error error r10" />你确定要删除<span class="error l10">{{ deleteUserName }}</span>?
|
|
|
</div>
|
|
|
<div class="foot Delfoot right t30">
|
|
|
<el-button size="medium" type="danger" class="r24" @click="del()">删除</el-button>
|
|
@@ -134,7 +131,7 @@ import { GeneralDataReception, Query } from "@/api/dataIntegration";
|
|
|
import MD5 from "blueimp-md5";
|
|
|
export default {
|
|
|
components: { Search, Dialog, NoData },
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
pwdStruc: "",
|
|
|
pwdLengthBegin: 0,
|
|
@@ -182,19 +179,19 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(["systemSet"]),
|
|
|
- noMore() {
|
|
|
+ noMore () {
|
|
|
return this.PageIndex >= this.pages;
|
|
|
},
|
|
|
- disabled() {
|
|
|
+ disabled () {
|
|
|
return this.loading || this.noMore;
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
- searchInfo(val) {
|
|
|
+ searchInfo (val) {
|
|
|
val.length === 0 && this.pageInit();
|
|
|
},
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
// 获取系统配置
|
|
|
// if (this.systemSet) {
|
|
|
// let obj
|
|
@@ -219,11 +216,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 随机生成密码
|
|
|
- resetPwd() {
|
|
|
+ resetPwd () {
|
|
|
this.ruleForm.PassWord = pwdProduce(this.pwdLengthBegin, this.pwdLengthEnd, this.pwdStruc);
|
|
|
},
|
|
|
//
|
|
|
- async getGroupSelect() {
|
|
|
+ async getGroupSelect () {
|
|
|
const res = await Query({
|
|
|
id: DATACONTENT_ID.accountGroupSelId,
|
|
|
dataContent: [],
|
|
@@ -236,7 +233,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//获取用户组
|
|
|
- async getGroup() {
|
|
|
+ async getGroup () {
|
|
|
const res = await Query({
|
|
|
id: DATACONTENT_ID.accountGroupTableId,
|
|
|
dataContent: [""],
|
|
@@ -258,7 +255,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//用户组点击
|
|
|
- handleNodeClick(data) {
|
|
|
+ handleNodeClick (data) {
|
|
|
this.accountArr = [];
|
|
|
if (data.user_group_id != -1 && data.up_user_group_id != -2) {
|
|
|
this.PageIndex = 1;
|
|
@@ -272,7 +269,7 @@ export default {
|
|
|
this.clearSearchData();
|
|
|
}
|
|
|
},
|
|
|
- async getAccountData(id) {
|
|
|
+ async getAccountData (id) {
|
|
|
const res = await Query({
|
|
|
id: DATACONTENT_ID.accountGroupDetailsId,
|
|
|
dataContent: [id],
|
|
@@ -289,7 +286,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 编辑账号
|
|
|
- async saveEditAccount() {
|
|
|
+ async saveEditAccount () {
|
|
|
try {
|
|
|
if (this.oldPwd !== this.ruleForm.user_pwd) {
|
|
|
this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd);
|
|
@@ -310,7 +307,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 新增账号
|
|
|
- async saveAddAccount() {
|
|
|
+ async saveAddAccount () {
|
|
|
try {
|
|
|
this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd);
|
|
|
const res = await GeneralDataReception({
|
|
@@ -329,7 +326,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 获取当前账号信息
|
|
|
- async getAccountInfo() {
|
|
|
+ async getAccountInfo () {
|
|
|
const res = await Query({
|
|
|
id: DATACONTENT_ID.accountDetailsId,
|
|
|
dataContent: [this.roleId],
|
|
@@ -346,7 +343,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 新增/编辑-确认
|
|
|
- submitClickHandler() {
|
|
|
+ submitClickHandler () {
|
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.editType == "add") {
|
|
@@ -361,29 +358,29 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 滚动加载
|
|
|
- load() {
|
|
|
+ load () {
|
|
|
this.PageIndex += 1;
|
|
|
this.accountList();
|
|
|
},
|
|
|
// 回到第一页
|
|
|
- pageInit() {
|
|
|
+ pageInit () {
|
|
|
this.PageIndex = 1;
|
|
|
this.accountArr = [];
|
|
|
this.accountList();
|
|
|
},
|
|
|
// 查询
|
|
|
- getSearchData(val) {
|
|
|
+ getSearchData (val) {
|
|
|
this.searchInfo = val;
|
|
|
this.pageInit();
|
|
|
},
|
|
|
|
|
|
// 清除查询
|
|
|
- clearSearchData() {
|
|
|
+ clearSearchData () {
|
|
|
this.searchInfo = "";
|
|
|
this.pageInit();
|
|
|
},
|
|
|
// 修改状态
|
|
|
- async userActiveToggle(item) {
|
|
|
+ async userActiveToggle (item) {
|
|
|
item.event = 2;
|
|
|
item.user_status = item.Flag ? 2 : 0;
|
|
|
try {
|
|
@@ -401,19 +398,19 @@ export default {
|
|
|
console.log("出错了", error.message || error);
|
|
|
}
|
|
|
},
|
|
|
- deleteUser(user) {
|
|
|
+ deleteUser (user) {
|
|
|
this.dialogVisible = true;
|
|
|
- this.deleteUserName = user.UName;
|
|
|
+ this.deleteUserName = user.user_name;
|
|
|
this.ruleFormObj = user;
|
|
|
},
|
|
|
- toEdit(userId) {
|
|
|
+ toEdit (userId) {
|
|
|
this.editDialogVisible = true;
|
|
|
this.editType = "edit";
|
|
|
this.editDialogTitle = "编辑账号";
|
|
|
this.roleId = userId;
|
|
|
this.getAccountInfo();
|
|
|
},
|
|
|
- addAccount() {
|
|
|
+ addAccount () {
|
|
|
this.editDialogTitle = "新增账号";
|
|
|
this.editDialogVisible = true;
|
|
|
this.editType = "add";
|
|
@@ -424,12 +421,12 @@ export default {
|
|
|
// })
|
|
|
},
|
|
|
// 重置
|
|
|
- resetForm(formName) {
|
|
|
+ resetForm (formName) {
|
|
|
this.$refs[formName].resetFields();
|
|
|
this.editDialogVisible = false;
|
|
|
},
|
|
|
// 获取列表
|
|
|
- async accountList() {
|
|
|
+ async accountList () {
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
let result = null;
|
|
@@ -470,7 +467,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 删除接口
|
|
|
- async del() {
|
|
|
+ async del () {
|
|
|
this.ruleFormObj.event = 3;
|
|
|
const result = await GeneralDataReception({
|
|
|
serviceId: SERVICE_ID.accountScId,
|
|
@@ -488,7 +485,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 账号权限
|
|
|
- authAccount(item) {
|
|
|
+ authAccount (item) {
|
|
|
this.roleId = item.user_id;
|
|
|
this.$router.push({
|
|
|
path: "/account/accountAuth",
|
|
@@ -631,7 +628,8 @@ export default {
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
margin-left: 24px;
|
|
|
- background: url("../../../assets/status/ic_edit_default.png") no-repeat;
|
|
|
+ background: url("../../../assets/status/ic_edit_default.png")
|
|
|
+ no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
cursor: pointer;
|
|
|
}
|