|
|
@@ -156,15 +156,6 @@ export default {
|
|
|
mounted() {
|
|
|
},
|
|
|
methods: {
|
|
|
- dropdownHandle(command) {
|
|
|
- if (command == 'editPwd') {
|
|
|
- this.changePass()
|
|
|
- } else if (command == 'outSys') {
|
|
|
- this.outSys()
|
|
|
- } else {
|
|
|
- this.$router.push({ path: command })
|
|
|
- }
|
|
|
- },
|
|
|
getuserinfo() {
|
|
|
this.$axios({
|
|
|
method: 'post',
|
|
|
@@ -183,124 +174,6 @@ export default {
|
|
|
localStorage.setItem('staff', this.userinfo.staff) // 1是admin
|
|
|
})
|
|
|
},
|
|
|
- getNavList() {
|
|
|
- this.$axios({
|
|
|
- method: 'GET',
|
|
|
- url: '/home'
|
|
|
- }).then((res) => {
|
|
|
- let navList = res.data
|
|
|
- this.menuList1 = navList
|
|
|
- })
|
|
|
- },
|
|
|
- dropdownHandle(command) {
|
|
|
- if (command == 'editPwd') {
|
|
|
- this.changePass()
|
|
|
- } else if (command == 'outSys') {
|
|
|
- this.outSys()
|
|
|
- } else {
|
|
|
- this.$router.push({ path: command })
|
|
|
- }
|
|
|
- },
|
|
|
- handleCommand(command) {
|
|
|
- // this.$message('click on item ' + command);
|
|
|
- document.body.className = 'custom-' + command
|
|
|
- window.sessionStorage.setItem('bodyCalss', 'custom-' + command)
|
|
|
- },
|
|
|
- outSys() {
|
|
|
- this.$axios({
|
|
|
- method: 'POST',
|
|
|
- url: '/api_gateway?method=user.login.logout_user'
|
|
|
- }).then((res) => {
|
|
|
- if (res.data.message == '') {
|
|
|
- window.localStorage.removeItem('isLogin')
|
|
|
- window.localStorage.removeItem('session')
|
|
|
- this.$router.push('/login')
|
|
|
- // window.sessionStorage.setItem('activePath', '/index/home')
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- changePass() {
|
|
|
- this.resetPassDialogVisible = true
|
|
|
- },
|
|
|
- resetPassDialogClosed() {},
|
|
|
- resetPassSubm() {
|
|
|
- this.$refs.resetPassFormRef.validate((valid) => {
|
|
|
- if (!valid) return
|
|
|
- this.$axios({
|
|
|
- method: 'POST',
|
|
|
- url: '/api_gateway?method=user.login.changepwd',
|
|
|
- data: this.qs.stringify({
|
|
|
- old_password: this.resetPassForm.oldPass,
|
|
|
- new_password: this.resetPassForm.newPass,
|
|
|
- confirm_password: this.resetPassForm.checkNewPass
|
|
|
- })
|
|
|
- }).then((res) => {
|
|
|
- if (res.data.message == '') {
|
|
|
- this.$message({
|
|
|
- message: '密码修改成功!',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- this.resetPassDialogVisible = false
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- menuIndex(menu) {
|
|
|
- if (menu == 'bFourSituations') {
|
|
|
- return ''
|
|
|
- } else if (menu == 'equipDistribute') {
|
|
|
- return ''
|
|
|
- } else if (menu == 'bCbd') {
|
|
|
- return ''
|
|
|
- } else if (menu == 'bQxz') {
|
|
|
- return ''
|
|
|
- } else if (menu == 'bSy') {
|
|
|
- return ''
|
|
|
- } else if (menu == 'bBzy') {
|
|
|
- return ''
|
|
|
- } else {
|
|
|
- return '/index/' + menu
|
|
|
- }
|
|
|
- },
|
|
|
- //保存菜单的激活地址
|
|
|
- saveNavState(activePath) {
|
|
|
- // let path='/'+activePath.split('/')[activePath.split('/').length-1]
|
|
|
- let path = activePath.slice(6)
|
|
|
- // console.log(path)
|
|
|
- // console.log(activePath)
|
|
|
- if (activePath == '/index/bFourSituations') {
|
|
|
- // this.$router.replace('/index/home')
|
|
|
- this.BFourSituations(path) //跳转到大数据平台
|
|
|
- } else if (activePath == '/index/equipDistribute') {
|
|
|
- // this.$router.push('/index/home')
|
|
|
- this.BFourSituations(path) //跳转到大数据平台
|
|
|
- } else if (activePath == '/index/bCbd') {
|
|
|
- this.BFourSituations(path) //跳转到大数据平台
|
|
|
- // this.$router.push('/index/home')
|
|
|
- } else if (activePath == '/index/bQxz') {
|
|
|
- // this.$router.push('/index/home')
|
|
|
- this.BFourSituations(path) //跳转到大数据平台
|
|
|
- } else if (activePath == '/index/bSy') {
|
|
|
- // this.$router.push('/index/home')
|
|
|
- this.BFourSituations(path) //跳转到大数据平台
|
|
|
- } else if (activePath == '/index/bBzy') {
|
|
|
- // this.$router.push('/index/home')
|
|
|
- this.BFourSituations(path) //跳转到大数据平台
|
|
|
- }
|
|
|
- },
|
|
|
- BFourSituations(path) {
|
|
|
- const { href } = this.$router.resolve({
|
|
|
- path: path
|
|
|
- })
|
|
|
- window.open(href, '_blank')
|
|
|
- },
|
|
|
- goBD(path) {
|
|
|
- const { href } = this.$router.resolve({
|
|
|
- path: path
|
|
|
- })
|
|
|
- window.open(href, '_blank')
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
</script>
|