|
@@ -1,38 +1,157 @@ |
|
|
<template> |
|
|
<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> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
export default { |
|
|
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> |
|
|
</style> |