Browse Source

init

newStyle
lancer 3 years ago
parent
commit
5008228004
9 changed files with 194 additions and 48 deletions
  1. BIN
      public/img/checktab1.png
  2. BIN
      public/img/checktab2.png
  3. BIN
      public/img/checktab3.png
  4. BIN
      public/img/checktab4.png
  5. +45
    -18
      src/page/check/chose.vue
  6. +145
    -26
      src/page/check/index.vue
  7. +1
    -1
      src/router/page/index.js
  8. +2
    -2
      src/router/router.js
  9. +1
    -1
      vue.config.js

BIN
public/img/checktab1.png View File

Before After
Width: 88  |  Height: 88  |  Size: 3.5 KiB

BIN
public/img/checktab2.png View File

Before After
Width: 88  |  Height: 88  |  Size: 2.9 KiB

BIN
public/img/checktab3.png View File

Before After
Width: 88  |  Height: 88  |  Size: 2.7 KiB

BIN
public/img/checktab4.png View File

Before After
Width: 88  |  Height: 88  |  Size: 2.7 KiB

+ 45
- 18
src/page/check/chose.vue View File

@@ -1,28 +1,55 @@
<template>
<div>
这是楼盘
<button @click="goindex">去</button>
</div>
<div>
<div class="head">
<div>质控管家管理系统</div>
<div class="callback" @click="goback" style="cursor: pointer">返回</div>
</div>
<div class="hid">选择后台</div>
这是楼盘
<button @click="goindex">去</button>
</div>
</template>

<script>
export default {
data(){
return{

}
data() {
return {};
},
computed:{
computed: {},
methods: {
goindex() {
this.$router.push({ path: "/wel" });
},
goback() {
this.$router.back();
},
},
methods:{
goindex(){
this.$router.push({ path: '/wel' });
}
}
}
};
</script>

<style lang="" scoped >


<style lang="scss" scoped >
.head {
height: 64px;
background: #409eff;
display: flex;
padding: 0 20%;
box-sizing: border-box;
justify-content: space-between;
line-height: 64px;
color: #fff;
font-size: 24px;
.callback {
font-size: 14px;
}
}
.hid {
margin-top: 25px;
height: 50px;
background: #f8f8f8;
border-radius: 4px;
text-align: center;
line-height: 50px;
font-size: 18px;
color: #32363d;
}
</style>

+ 145
- 26
src/page/check/index.vue View File

@@ -1,38 +1,157 @@
<template>
<div>
这是选择
<button @click="goindex">去</button>
</div>
<div>
<div class="head">
<div>质控管家管理系统</div>
<div class="callback" @click="goloign" style="cursor: pointer">退出</div>
</div>
<div class="hid">选择后台</div>
<div class="content">
<!-- 质控后台 -->
<div class="tab" @click="goindex(0)">
<div><img src="/img/checktab1.png" alt="" /></div>
<div class="text">质控管家后台</div>
</div>
<div class="tab" @click="goindex(1)">
<div><img src="/img/checktab2.png" alt="" /></div>
<div class="text">代理商后台</div>
</div>
<div class="tab" @click="goindex(2)">
<div><img src="/img/checktab3.png" alt="" /></div>
<div class="text">公司后台</div>
</div>
<div class="tab" @click="goindex(3)">
<div><img src="/img/checktab4.png" alt="" /></div>
<div class="text">楼盘后台</div>
</div>
</div>
</div>
</template>

<script>
export default {
data(){
return{

}
},
computed:{
data() {
return {
// 质控管家标志
tabFlag1: false,
// 代理商标志
tabFlag2: false,
// 公司后台标志
tabFlag3: false,
// 楼盘后台标志
tabFlag4: false,
};
},
mounted(){
console.log(123);
this.getTab()
computed: {},
mounted() {
// console.log(123);
this.getTab();
},
methods:{
getTab(){
this.$api.api.getTab()
.then(res=>{
console.log(res)
})
methods: {
// 获取可选权限对
getTab() {
this.$api.api.getTab().then((res) => {
// console.log(res)
// 循环数组,给定各种标志
res.data.map((item) => {
if (item.orgType == 0) {
this.tabFlag1 = true;
}
if (item.orgType == 1) {
this.tabFlag2 = true;
}
if (item.orgType == 2) {
this.tabFlag3 = true;
}
if (item.orgType == 3) {
this.tabFlag4 = true;
}
});
});
},
goindex(){
this.$router.push({ path: '/chose' });
goloign() {
// 对此进行判断,获取this.$route的参数,如果没有则退出登陆,有的话就返回之前的页面
this.$confirm("是否退出系统, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
this.$router.push({ path: "/login" });
});
});
},
goindex(idx) {
localStorage.setItem('orgType',idx)
if (idx == 0) {
// 质控管家后台
}
if (idx == 1) {
// 代理商
this.$router.push({ path: "/chose" });
}
if (idx == 2) {
// 公司后台
this.$router.push({ path: "/chose" });
}
if (idx == 3) {
// 楼盘后台
this.$router.push({ path: "/chose" });
}

// this.$router.push({ path: "/chose" });
},
},
};
</script>

<style lang="scss" scoped >
.head {
height: 64px;
background: #409eff;
display: flex;
padding: 0 20%;
box-sizing: border-box;
justify-content: space-between;
line-height: 64px;
color: #fff;
font-size: 24px;
.callback {
font-size: 14px;
}
}
.hid {
margin-top: 25px;
height: 50px;
background: #f8f8f8;
border-radius: 4px;
text-align: center;
line-height: 50px;
font-size: 18px;
color: #32363d;
}
.content {
margin-top: 30px;
padding: 0 20%;
display: flex;
justify-content: space-around;
.tab {
width: 225px;
height: 225px;
background: #ffffff;
border: 1px solid #e0e0e0;
text-align: center;
cursor: pointer;
img {
height: 88px;
width: 88px;
margin-top: 47px;
}
.text {
font-size: 20px;
margin-top: 30px;
color: #333333;
line-height: 20px;
}
}
}
</script>

<style lang="" scoped >


</style>

+ 1
- 1
src/router/page/index.js View File

@@ -93,7 +93,7 @@ export default [{
{
path: '/',
name: '主页',
redirect: '/wel'
redirect: '/check'
},
{
path: '/myiframe',


+ 2
- 2
src/router/router.js View File

@@ -6,8 +6,8 @@ import AvueRouter from './avue-router'
import Store from '../store/'
Vue.use(VueRouter)
//创建路由
console.log(PageRouter,ViewsRouter,'123')
console.log(Store)
// console.log(PageRouter,ViewsRouter,'123')
// console.log(Store)
export const createRouter = () => new VueRouter({
routes: [...PageRouter, ...ViewsRouter]
})


+ 1
- 1
vue.config.js View File

@@ -3,7 +3,7 @@
* https://cli.vuejs.org/zh/config/
*/
// const url = 'http://pigx-gateway'
const url = 'http://39.97.167.65/:9999' //测试
const url = 'http://39.97.167.65:9999' //测试
// const url = 'http://192.168.31.161:9999' //长龙
// const url = 'http://192.168.31.128:9999' //嘉豪



Loading…
Cancel
Save