Commit 142b07a3 authored by Wallen姚文辉's avatar Wallen姚文辉

修复bug

parent 12180971
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.233aa2e8.js"></script><script defer="defer" src="/js/app.e7298ba2.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.1eedf6d0.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.233aa2e8.js"></script><script defer="defer" src="/js/app.89043e63.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.1eedf6d0.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -94,7 +94,7 @@ router.beforeEach(async (to, from, next) => {
if (localStorage.getItem('token')) {
let userinfo = localStorage.getItem("userinfo")
if (!userinfo) {
result = await axios.get("user/userdetail", 'get')
var res = await axios.get("user/userdetail", 'get')
userinfo = res.data.data
} else {
userinfo = JSON.parse(userinfo)
......
......@@ -46,9 +46,10 @@
<ListItem>邮箱:{{ userinfo.email_address }}</ListItem>
<template #footer>
<Button type="primary"
@click="$router.push({ name: 'userinfo', query: { id: userinfo.id } })" size="small">修改信息</Button>
<Button type="primary"
@click="loginout" style="margin-left: 5px;" size="small">退出登录</Button>
@click="$router.push({ name: 'userinfo', query: { id: userinfo.id } })"
size="small">修改信息</Button>
<Button type="primary" @click="loginout" style="margin-left: 5px;"
size="small">退出登录</Button>
</template>
</List>
</template>
......@@ -124,16 +125,16 @@ export default {
getinfo() {
this.$request('get', 'user/userdetail', null, this, (data) => { this.menu = data.data.menu; this.userinfo = data.data; localStorage.setItem('userinfo', JSON.stringify(data.data)); })
},
loginout(){
this.$request('post','user/logout',null,this,(data)=>{
loginout() {
this.$request('post', 'user/logout', null, this, (data) => {
localStorage.removeItem('token'),
this.$router.push('login')
this.$router.push('login')
})
}
},
watch: {
isCollapsed(value1) {
this.screenHeigh = (!value1) ? window.innerHeight - 102 + 'px' : window.innerHeight - 72 + 'px'
this.screenHeigh = (!value1) ? window.innerHeight - 71 + 'px' : window.innerHeight - 72 + 'px'
},
menu(value) {
const a = (value) => {
......
......@@ -18,9 +18,8 @@
</Space>
</template>
</PageHeader>
<div style="margin-top: 8px;">
<Table row-key="id" :columns="columns" :data="users" show-context-menu
@on-contextmenu="choiceRowMethod">
<div style="margin-top: 8px">
<Table row-key="id" :columns="columns" :data="users" show-context-menu @on-contextmenu="choiceRowMethod">
<template #date="{ row, index }">
<div>{{ row.create_date }}</div>
</template>
......@@ -38,8 +37,8 @@
<DropdownItem @click="goEdit()">编辑</DropdownItem>
</template>
</Table>
<Page :total="totals" :page-size="searchinfo.page_size" :model-value="searchinfo.page_num" show-total
style="position: fixed;bottom: 10px;" />
<Page :total="totals" :page-size="searchinfo.page_size" v-model="searchinfo.page_num" @on-change="getusers()"
show-total style="margin-top: 20px;" />
</div>
</template>
......@@ -49,7 +48,7 @@ export default {
props: ['isCollapsed',],
data() {
return {
page_id:17,
page_id: 17,
title: "用户管理",
choiceRow: null,
columns: [
......@@ -89,11 +88,11 @@ export default {
}
},
methods: {
choiceRowMethod(row){
if (this.elements.indexOf("4-3")==-1) return
choiceRowMethod(row) {
if (this.elements.indexOf("4-3") == -1) return
this.choiceRow = row
},
goEdit(){
goEdit() {
if (!this.choiceRow) return this.$Message.error("权限不足")
this.$router.push({ name: 'userinfo', query: { id: this.choiceRow.id } })
},
......@@ -104,10 +103,10 @@ export default {
this.$request("post", "/user/updateuser", { id: row.id, disable: status ? 1 : 0 }, this)
},
getOrg() {
this.$request("get", "/identity/organization_list", null, this, (data) => { this.organization = data.data})
this.$request("get", "/identity/organization_list", null, this, (data) => { this.organization = data.data })
},
getRole() {
this.$request("get", "/identity/role_list", null, this, (data) => { this.role = data.data ;console.info(this.role)})
this.$request("get", "/identity/role_list", null, this, (data) => { this.role = data.data; console.info(this.role) })
},
jsonPath(target, key, key_value, get_value_key) {
const index = target.findindex(item => { item[key] == key_value })
......@@ -132,7 +131,7 @@ export default {
}
},
created() {
this.$getElements(this.page_id,this,(data)=>this.elements=data.data)
this.$getElements(this.page_id, this, (data) => this.elements = data.data)
this.getOrg();
this.getRole();
this.getusers();
......
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