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

修改bug

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