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> <!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 \ 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) => { ...@@ -94,7 +94,7 @@ router.beforeEach(async (to, from, next) => {
if (localStorage.getItem('token')) { if (localStorage.getItem('token')) {
let userinfo = localStorage.getItem("userinfo") let userinfo = localStorage.getItem("userinfo")
if (!userinfo) { if (!userinfo) {
result = await axios.get("user/userdetail", 'get') var res = await axios.get("user/userdetail", 'get')
userinfo = res.data.data userinfo = res.data.data
} else { } else {
userinfo = JSON.parse(userinfo) userinfo = JSON.parse(userinfo)
......
...@@ -46,9 +46,10 @@ ...@@ -46,9 +46,10 @@
<ListItem>邮箱:{{ userinfo.email_address }}</ListItem> <ListItem>邮箱:{{ userinfo.email_address }}</ListItem>
<template #footer> <template #footer>
<Button type="primary" <Button type="primary"
@click="$router.push({ name: 'userinfo', query: { id: userinfo.id } })" size="small">修改信息</Button> @click="$router.push({ name: 'userinfo', query: { id: userinfo.id } })"
<Button type="primary" size="small">修改信息</Button>
@click="loginout" style="margin-left: 5px;" size="small">退出登录</Button> <Button type="primary" @click="loginout" style="margin-left: 5px;"
size="small">退出登录</Button>
</template> </template>
</List> </List>
</template> </template>
...@@ -124,16 +125,16 @@ export default { ...@@ -124,16 +125,16 @@ export default {
getinfo() { 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)); }) 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(){ loginout() {
this.$request('post','user/logout',null,this,(data)=>{ this.$request('post', 'user/logout', null, this, (data) => {
localStorage.removeItem('token'), localStorage.removeItem('token'),
this.$router.push('login') this.$router.push('login')
}) })
} }
}, },
watch: { watch: {
isCollapsed(value1) { 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) { menu(value) {
const a = (value) => { const a = (value) => {
......
...@@ -18,9 +18,8 @@ ...@@ -18,9 +18,8 @@
</Space> </Space>
</template> </template>
</PageHeader> </PageHeader>
<div style="margin-top: 8px;"> <div style="margin-top: 8px">
<Table row-key="id" :columns="columns" :data="users" show-context-menu <Table row-key="id" :columns="columns" :data="users" show-context-menu @on-contextmenu="choiceRowMethod">
@on-contextmenu="choiceRowMethod">
<template #date="{ row, index }"> <template #date="{ row, index }">
<div>{{ row.create_date }}</div> <div>{{ row.create_date }}</div>
</template> </template>
...@@ -38,8 +37,8 @@ ...@@ -38,8 +37,8 @@
<DropdownItem @click="goEdit()">编辑</DropdownItem> <DropdownItem @click="goEdit()">编辑</DropdownItem>
</template> </template>
</Table> </Table>
<Page :total="totals" :page-size="searchinfo.page_size" :model-value="searchinfo.page_num" show-total <Page :total="totals" :page-size="searchinfo.page_size" v-model="searchinfo.page_num" @on-change="getusers()"
style="position: fixed;bottom: 10px;" /> show-total style="margin-top: 20px;" />
</div> </div>
</template> </template>
...@@ -49,7 +48,7 @@ export default { ...@@ -49,7 +48,7 @@ export default {
props: ['isCollapsed',], props: ['isCollapsed',],
data() { data() {
return { return {
page_id:17, page_id: 17,
title: "用户管理", title: "用户管理",
choiceRow: null, choiceRow: null,
columns: [ columns: [
...@@ -89,11 +88,11 @@ export default { ...@@ -89,11 +88,11 @@ export default {
} }
}, },
methods: { methods: {
choiceRowMethod(row){ choiceRowMethod(row) {
if (this.elements.indexOf("4-3")==-1) return if (this.elements.indexOf("4-3") == -1) return
this.choiceRow = row this.choiceRow = row
}, },
goEdit(){ goEdit() {
if (!this.choiceRow) return this.$Message.error("权限不足") if (!this.choiceRow) return this.$Message.error("权限不足")
this.$router.push({ name: 'userinfo', query: { id: this.choiceRow.id } }) this.$router.push({ name: 'userinfo', query: { id: this.choiceRow.id } })
}, },
...@@ -104,10 +103,10 @@ export default { ...@@ -104,10 +103,10 @@ export default {
this.$request("post", "/user/updateuser", { id: row.id, disable: status ? 1 : 0 }, this) this.$request("post", "/user/updateuser", { id: row.id, disable: status ? 1 : 0 }, this)
}, },
getOrg() { 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() { 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) { jsonPath(target, key, key_value, get_value_key) {
const index = target.findindex(item => { item[key] == key_value }) const index = target.findindex(item => { item[key] == key_value })
...@@ -132,7 +131,7 @@ export default { ...@@ -132,7 +131,7 @@ export default {
} }
}, },
created() { 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.getOrg();
this.getRole(); this.getRole();
this.getusers(); 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