Commit 7825da39 by crushh

update: 管理员列表

parent 7ccf1ed3
......@@ -9,69 +9,31 @@
<template>
<div class="daily-set-wrap ">
<div class="daily-set-content border-box">
<div class="admin-tip-body">
<div class="company-title m-b-20 m-t-26 flex flex-space-between flex-align-center">
<div role="alert" class="el-alert el-alert--info">
<i class="el-alert__icon el-icon-info"></i>
<div class="el-alert__content">
<span class="el-alert__title"
>1.超级管理员不可新增,默认为企业微信所添加的好办应用管理员,拥有好办所有管理权限;
>1.好办管理后台管理员需在企业微信后台添加,详情请见
<br />
2.企业微信后台新增管理员后,请在工作台-<el-button type="text" @click="changeRoute">通讯录</el-button>刷新企业成员,否则不会同步到好办管理员列表
2.企业微信后台新增管理员后,请点击右侧【刷新】按钮刷新企业成员,否则不会同步到好办管理员列表
</span>
</div>
</div>
<el-button type="primary" @click="refresh">刷新</el-button>
</div>
<div class="admin-table-body m-t-20">
<div class="admin-thead bg-ebecf0">
<div class="admin-th p-l-85 font-14 color-303133">角色</div>
</div>
<div class="admin-role-body">
<template v-for="(item, index) in roleList">
<div :key="index + 'role'">
<div class="admin-role-name line-50">
<el-row>
<el-col :span="24"
><div class="grid-content cursor-pointer" @click="changeToggle(item)">
<span style="font-size:14px;" :class="['iconfont cursor-pointer font-14 color-606266 p-l-30', item.expand ? 'iconjian' : 'iconjia']"> </span><span class="font-14 color-606266 p-l-40">{{ item.roleName }}</span>
</div></el-col
>
</el-row>
</div>
<div v-if="item.expand">
<el-row class="bg-ebecf0">
<el-col :span="6"><div class="grid-content font-14 color-303133 row-th p-l-85">姓名</div></el-col>
<el-col :span="6"><div class="grid-content font-14 color-303133 row-th">手机号</div></el-col>
<el-col :span="6"><div class="grid-content font-14 color-303133 row-th">部门</div></el-col>
<el-col :span="6"><div class="grid-content font-14 color-303133 row-th">操作</div></el-col>
</el-row>
<div class="admin-role-user">
<el-row class="line-50 border-set" v-for="(child, ind) in item.roleUser" :key="ind">
<el-col class="line-one" :span="6"
><div class="grid-content p-l-85 hide-border">{{ child.userName || '--' }}</div></el-col
>
<el-col :span="6"
><div class="grid-content">{{ child.userPhone || '--' }}</div></el-col
>
<el-col :span="6"
><div class="grid-content">{{ child.departmentName || '--' }}</div></el-col
>
<el-col :span="6"
><div class="grid-content">{{ '--' }}</div></el-col
>
</el-row>
</div>
</div>
</div>
</template>
</div>
</div>
<el-table :data="roleList" style="margin-top:20px">
<el-table-column prop="userName" label="姓名"> </el-table-column>
<el-table-column prop="userPhone" label="手机号"> </el-table-column>
<el-table-column prop="departmentName" label="部门"> </el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import { getRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
// import showMsg from '@/common/js/showmsg';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
export default {
props: {},
......@@ -99,9 +61,8 @@ export default {
* 获取数据
*/
getData(val) {
const that = this;
let para = {
wxEnterpriseId: that.wxEnterpriseId
wxEnterpriseId: this.wxEnterpriseId
};
getRequest('/haoban-manage3-web/admin-list', para)
.then(res => {
......@@ -112,17 +73,26 @@ export default {
ele.expand = false;
});
}
that.roleList = resData.result || [];
return;
resData.result.forEach(i => {
if (i.roleUser.length) {
this.roleList = this.roleList.concat(i.roleUser);
}
});
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
this.$message.error({
duration: 1000,
message: error.message
});
});
},
refresh() {
getRequest('/haoban-manage3-web/sync-qywx', {}).then(res => {
showMsg.showmsg('刷新成功', 'success');
this.getData();
});
}
},
watch: {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment