Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

170 Zeilen
4.0 KiB

  1. <template>
  2. <div>
  3. <div class="head">
  4. <div>质控管家管理系统</div>
  5. <div class="callback" @click="goloign" style="cursor: pointer">
  6. {{ backFlag ? "返回" : "退出" }}
  7. </div>
  8. </div>
  9. <div class="hid">选择后台</div>
  10. <div class="content">
  11. <!-- 质控后台 -->
  12. <div class="tab" @click="goindex(0)">
  13. <div><img src="/img/checktab1.png" alt="" /></div>
  14. <div class="text">质控管家后台</div>
  15. </div>
  16. <div class="tab" @click="goindex(1)">
  17. <div><img src="/img/checktab2.png" alt="" /></div>
  18. <div class="text">代理商后台</div>
  19. </div>
  20. <div class="tab" @click="goindex(2)">
  21. <div><img src="/img/checktab3.png" alt="" /></div>
  22. <div class="text">公司后台</div>
  23. </div>
  24. <div class="tab" @click="goindex(3)">
  25. <div><img src="/img/checktab4.png" alt="" /></div>
  26. <div class="text">楼盘后台</div>
  27. </div>
  28. </div>
  29. </div>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. // 质控管家标志
  36. tabFlag1: false,
  37. // 代理商标志
  38. tabFlag2: false,
  39. // 公司后台标志
  40. tabFlag3: false,
  41. // 楼盘后台标志
  42. tabFlag4: false,
  43. backFlag: false,
  44. };
  45. },
  46. computed: {},
  47. mounted() {
  48. console.log(this.$route.query.backFlag);
  49. if (this.$route.query.backFlag) {
  50. this.backFlag = this.$route.query.backFlag;
  51. }
  52. this.getTab();
  53. // this.$message.success('123')
  54. },
  55. methods: {
  56. // 获取可选权限对
  57. getTab() {
  58. this.$api.api.getTab().then((res) => {
  59. // console.log(res)
  60. // 循环数组,给定各种标志
  61. res.data.map((item) => {
  62. if (item.orgType == 0) {
  63. this.tabFlag1 = true;
  64. }
  65. if (item.orgType == 1) {
  66. this.tabFlag2 = true;
  67. }
  68. if (item.orgType == 2) {
  69. this.tabFlag3 = true;
  70. }
  71. if (item.orgType == 3) {
  72. this.tabFlag4 = true;
  73. }
  74. });
  75. });
  76. },
  77. goloign() {
  78. // 对此进行判断,获取this.$route的参数,如果没有则退出登陆,有的话就返回之前的页面
  79. if (this.backFlag) {
  80. this.$router.back();
  81. } else {
  82. this.$confirm("是否退出系统, 是否继续?", "提示", {
  83. confirmButtonText: "确定",
  84. cancelButtonText: "取消",
  85. type: "warning",
  86. }).then(() => {
  87. this.$store.dispatch("LogOut").then(() => {
  88. this.$router.push({ path: "/login" });
  89. });
  90. });
  91. }
  92. },
  93. goindex(idx) {
  94. localStorage.setItem("orgType", idx);
  95. if (idx == 0) {
  96. // 质控管家后台
  97. this.$router.push({ path: "/wel" });
  98. }
  99. if (idx == 1) {
  100. // 代理商
  101. this.$router.push({ path: "/chose", query: { flag: 1 } });
  102. }
  103. if (idx == 2) {
  104. // 公司后台
  105. this.$router.push({ path: "/chose", query: { flag: 2 } });
  106. }
  107. if (idx == 3) {
  108. // 楼盘后台
  109. this.$router.push({ path: "/chose", query: { flag: 3 } });
  110. }
  111. // this.$router.push({ path: "/chose" });
  112. },
  113. },
  114. };
  115. </script>
  116. <style lang="scss" scoped >
  117. .head {
  118. height: 64px;
  119. background: #409eff;
  120. display: flex;
  121. padding: 0 20%;
  122. box-sizing: border-box;
  123. justify-content: space-between;
  124. line-height: 64px;
  125. color: #fff;
  126. font-size: 24px;
  127. .callback {
  128. font-size: 14px;
  129. }
  130. }
  131. .hid {
  132. margin-top: 25px;
  133. height: 50px;
  134. background: #f8f8f8;
  135. border-radius: 4px;
  136. text-align: center;
  137. line-height: 50px;
  138. font-size: 18px;
  139. color: #32363d;
  140. }
  141. .content {
  142. margin-top: 30px;
  143. padding: 0 20%;
  144. display: flex;
  145. justify-content: space-around;
  146. .tab {
  147. width: 225px;
  148. height: 225px;
  149. background: #ffffff;
  150. border: 1px solid #e0e0e0;
  151. text-align: center;
  152. cursor: pointer;
  153. img {
  154. height: 88px;
  155. width: 88px;
  156. margin-top: 47px;
  157. }
  158. .text {
  159. font-size: 20px;
  160. margin-top: 30px;
  161. color: #333333;
  162. line-height: 20px;
  163. }
  164. }
  165. }
  166. </style>