Commit 0c6f8a19 authored by “yiyousong”'s avatar “yiyousong”

perf:修改用户列表

parent 71d430ba
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
style="width: 150px" style="width: 150px"
> >
<a-select-option <a-select-option
v-for="v in userDict" v-for="(v, key) in userDict"
:key="v.key" :key="key"
:value="v.key" :value="key"
>{{ v.value }}</a-select-option >{{ v }}</a-select-option
> >
</a-select> </a-select>
<a-button type="primary" class="addclass" @click="getUserList" <a-button type="primary" class="addclass" @click="getUserList"
...@@ -191,15 +191,6 @@ export default { ...@@ -191,15 +191,6 @@ export default {
this.tablePagination.pageSize = pag.pageSize; this.tablePagination.pageSize = pag.pageSize;
this.getUserList(); this.getUserList();
}, },
// 对象转对象数组
transverter(obj) {
return Object.keys(obj).map((v) => {
return {
key: v,
value: obj[v],
};
});
},
// 获取用户列表 // 获取用户列表
async getUserList() { async getUserList() {
...@@ -226,7 +217,7 @@ export default { ...@@ -226,7 +217,7 @@ export default {
this.tablePagination.current -= 1; this.tablePagination.current -= 1;
this.getUserList(); this.getUserList();
} }
this.userDict = this.transverter(roleId); this.userDict = roleId;
let { loginName } = this.userData; let { loginName } = this.userData;
if (this.loginNames.includes(loginName)) { if (this.loginNames.includes(loginName)) {
this.tableSourceData = data; this.tableSourceData = data;
......
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