调整前端代码格式符合ESLint规范

This commit is contained in:
zer0Black
2023-02-28 22:43:03 +08:00
parent f5e5990a3b
commit 77b1ca8f0d
48 changed files with 3199 additions and 3179 deletions
+56 -56
View File
@@ -44,64 +44,64 @@
</template>
<script>
import {mapGetters} from 'vuex';
import {BASE_URL} from "../utils/http";
import { mapGetters } from 'vuex'
import { BASE_URL } from '../utils/http'
export default {
name: "Header",
data() {
return {
popoverValue: false
}
},
computed: {
...mapGetters({
menuData: 'menuData',
}),
isSystemManager() {
return this.menuData.some(menu => menu.id === 'AVL9YSB7ZF');
},
isSystemManagerBelong() {
return this.menuData.some(menu => menu.id === 'AVL9YSB7ZF' && menu.belong == 1);
},
},
methods: {
// 退出系统
logout() {
this.$confirm('确定退出系统?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.login.logout().then(_ => {
this.$message.success('退出成功');
this.$store.commit('saveUserInfo', null);
// var sevice = "http://"+window.location.host+"/";
// var serviceUrl = encodeURIComponent(sevice);
//正式
// window.open("https://caddmuat.changan.com.cn/cas/logout?service=http://10.64.23.30:7766/home", '_self');
//测试
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
this.$router.push('/login');
})
})
},
goSystemPage() {
if(this.isSystemManagerBelong){
if (this.$route.path === '/system/menu') return;
this.$store.commit('savePathUrl', '/system/menu');
this.$router.push({path: '/system/menu', query: {id: 'AVL9YSB7ZF'}});
}else{
if(this.$route.path == '/system/401Page'){
}else{
this.$router.replace({name: '401Page', query: {id: 'AVL9YSB7ZF'}});
}
}
}
}
export default {
name: 'Header',
data () {
return {
popoverValue: false
}
},
computed: {
...mapGetters({
menuData: 'menuData'
}),
isSystemManager () {
return this.menuData.some(menu => menu.id === 'AVL9YSB7ZF')
},
isSystemManagerBelong () {
return this.menuData.some(menu => menu.id === 'AVL9YSB7ZF' && menu.belong == 1)
}
},
methods: {
// 退出系统
logout () {
this.$confirm('确定退出系统?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.login.logout().then(_ => {
this.$message.success('退出成功')
this.$store.commit('saveUserInfo', null)
// var sevice = "http://"+window.location.host+"/";
// var serviceUrl = encodeURIComponent(sevice);
// 正式
// window.open("https://caddmuat.changan.com.cn/cas/logout?service=http://10.64.23.30:7766/home", '_self');
// 测试
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
this.$router.push('/login')
})
})
},
goSystemPage () {
if (this.isSystemManagerBelong) {
if (this.$route.path === '/system/menu') return
this.$store.commit('savePathUrl', '/system/menu')
this.$router.push({ path: '/system/menu', query: { id: 'AVL9YSB7ZF' } })
} else {
if (this.$route.path == '/system/401Page') {
} else {
this.$router.replace({ name: '401Page', query: { id: 'AVL9YSB7ZF' } })
}
}
}
}
}
</script>
<style lang="scss" scoped>