提交 6dd63cd2 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 59178fba
......@@ -33,6 +33,6 @@ module.exports = {
},
ProvidePlugin: {},
others: {
loginUrl: 'https://login2.ezijing.com/xtraining/login/index'
loginUrl: 'https://login2.ezijing.com/'
}
}
......@@ -14,6 +14,6 @@ module.exports = {
},
ProvidePlugin: {},
others: {
loginUrl: 'https://login.ezijing.com/xtraining/login/index'
loginUrl: 'https://login.ezijing.com/'
}
}
......@@ -14,6 +14,6 @@ module.exports = {
},
ProvidePlugin: {},
others: {
loginUrl: 'https://login2.ezijing.com/xtraining/login/index'
loginUrl: 'https://login2.ezijing.com/'
}
}
......@@ -3,3 +3,26 @@
<router-view />
</div>
</template>
<script>
import * as api from '@/api/common.js'
export default {
mounted() {
if (!parseInt(window.sessionStorage.isLogin)) {
window.sessionStorage.isLogin = 1
this.addLogs('登录')
}
console.log(111)
},
methods: {
addLogs(msg) {
api
.addLog({ description: msg })
.then(response => {
})
.finally(() => {
})
}
}
}
</script>
......@@ -25,6 +25,7 @@
<script>
import defaultAvatar from '@/assets/images/avatar.png'
import * as api from '@/api/common.js'
export default {
name: 'AppHeader',
......@@ -44,8 +45,18 @@ export default {
methods: {
// 退出登录
logout() {
this.addLogs('退出登录')
},
addLogs(msg) {
api
.addLog({ description: msg })
.then(response => {
this.$store.dispatch('logout').then(() => {
window.location.href = webConf.others.loginUrl
window.sessionStorage.isLogin = 0
window.location.href = `${webConf.others.loginUrl}?rd=${window.location.href}`
})
})
.finally(() => {
})
}
}
......
......@@ -17,7 +17,7 @@
</div>
<div class="table-box">
<el-table
:data="tableData"
:data="tableData.data"
style="width: 100%">
<el-table-column
align="center"
......@@ -44,7 +44,9 @@
<div class="page-box">
<el-pagination
layout="prev, pager, next"
:total="1">
:page-size=9
@current-change="changePage"
:total="tableData.total">
</el-pagination>
</div>
</div>
......@@ -64,14 +66,17 @@ export default {
}
},
mounted() {
this.getLogList()
this.getLogList({ page: 1, limit: 9 })
},
methods: {
changePage(n) {
this.getLogList({ page: n, limit: 9 })
},
getLogList(param) {
api
.getLogList(param)
.then(response => {
this.tableData = response.data.data
this.tableData = response.data
})
.finally(() => {
})
......
......@@ -157,6 +157,14 @@ export default {
this.page.page--
this.getMsgTempList(this.page)
},
addLogs(msg) {
api
.addLog({ description: msg })
.then(response => {
})
.finally(() => {
})
},
deleteTampList() {
const arr = []
this.selectItem.map(item => {
......@@ -166,6 +174,7 @@ export default {
.deleteTampList({ ids: arr.toString() })
.then(response => {
this.getMsgTempList()
this.addLogs('删除模板')
})
.finally(() => {
})
......
......@@ -172,6 +172,7 @@ export default {
.addGroup({ name: this.addGrounpInput })
.then(response => {
if (response.code === 0) {
this.addLogs('添加用户组')
this.getGroupList({ page: 1, limit: 9 })
this.addGrounpInput = ''
this.addGroupPop = false
......@@ -216,11 +217,20 @@ export default {
})
}
},
addLogs(msg) {
api
.addLog({ description: msg })
.then(response => {
})
.finally(() => {
})
},
delGroup(id) {
api
.delGroup(id)
.then(response => {
this.getGroupList()
this.addLogs('删除用户组')
})
.finally(() => {
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论