index.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <div class="sassPlatform">
  3. <div class="sp_header">
  4. <!-- <div class="sp_h_logo">
  5. </div> -->
  6. <div class="sp_h_tagArea">
  7. <span :class="{tagActive:tagIndex==0}" @click="tagIndex = 0">应用中心</span>
  8. <span :class="{tagActive:tagIndex==1}" @click="tagIndex = 1">智能分析</span>
  9. </div>
  10. </div>
  11. <div class="sp_bottom">
  12. <div class="sp_b_left">
  13. <div class="sp_b_l_form" v-for="(item,index) in formTypeList" :key="item.index">
  14. <span @click="item.open = !item.open">{{ item.name }}<svg :style="`transform: rotate(${item.open?'180':'0'}deg);`" t="1739262423649" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7079" width="200" height="200"><path d="M52.335 261.072c-31.269 30.397-31.269 79.722 0 110.194l403.212 391.718c31.325 30.382 82.114 30.382 113.377 0l403.197-391.718c31.325-30.466 31.325-79.793 0-110.194-31.28-30.449-82.058-30.449-113.39 0l-346.497 336.64-346.457-336.64c-31.325-30.448-82.105-30.448-113.446 0l0 0z" p-id="7080"></path></svg></span>
  15. <div v-show="item.open" v-if="item.children.length>0">
  16. <span v-for="(item2,index2) in item.children" :key="item2.index" @click="formTypeTag=item2.index" :class="{formActive:item2.index==formTypeTag}">{{ item2.name }}</span>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="sp_b_right">
  21. <tableView/>
  22. </div>
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. import tableView from './view/tableView.vue';
  28. export default {
  29. components:{
  30. tableView
  31. },
  32. data(){
  33. return{
  34. tagIndex:0,
  35. formTypeList:[
  36. {
  37. index:"0",
  38. name:"教师管理",
  39. open:false,
  40. children:[{
  41. index:'0-0',
  42. type:"form",
  43. name:"表单管理",
  44. },{
  45. index:'0-1',
  46. type:"card",
  47. name:"年度考核",
  48. },{
  49. index:'0-2',
  50. type:"card",
  51. name:"考核数据可视化",
  52. }]
  53. },
  54. {
  55. index:"1",
  56. name:"校园安全",
  57. open:false,
  58. children:[{
  59. index:'1-0',
  60. type:"form",
  61. name:"表单管理",
  62. }]
  63. },
  64. {
  65. index:"2",
  66. name:"成绩管理",
  67. open:false,
  68. children:[{
  69. index:'2-0',
  70. type:"form",
  71. name:"表单管理",
  72. }]
  73. },
  74. {
  75. index:"3",
  76. name:"后勤管理",
  77. open:false,
  78. children:[{
  79. index:'3-0',
  80. type:"form",
  81. name:"表单管理",
  82. }]
  83. },
  84. ],
  85. formTypeTag:'',
  86. }
  87. },
  88. methods: {
  89. },
  90. }
  91. </script>
  92. <style scoped>
  93. .sassPlatform{
  94. width: 100vw;
  95. height: 100vh;
  96. margin: 0;
  97. box-sizing: border-box;
  98. background-color: white;
  99. }
  100. .sp_header{
  101. width: 100%;
  102. height: 100px;
  103. display: flex;
  104. align-items: center;
  105. justify-content: center;
  106. box-sizing: border-box;
  107. border-bottom: solid 1px #BBBBBB;
  108. }
  109. .sp_h_tagArea{
  110. width: auto;
  111. height: auto;
  112. display: flex;
  113. align-items: center;
  114. }
  115. .sp_h_tagArea>span{
  116. margin-right: 40px;
  117. cursor: pointer;
  118. font-size: 20px;
  119. transition: .2s;
  120. position: relative;
  121. }
  122. .sp_h_tagArea>span:hover{
  123. color: #1684FC;
  124. }
  125. .tagActive{
  126. color: #1684FC;
  127. }
  128. .tagActive::after{
  129. content: '';
  130. width: 100%;
  131. height: 4px;
  132. background-color: #1684FC;
  133. position: absolute;
  134. bottom: -10px;
  135. left: 0;
  136. border-radius: 4px;
  137. }
  138. .sp_bottom{
  139. width: 100%;
  140. height: calc(100% - 100px);
  141. display: flex;
  142. }
  143. .sp_b_left{
  144. width: 15%;
  145. min-width: 200px;
  146. height: 100%;
  147. box-sizing: border-box;
  148. border-right:solid 1px #D5D5D5;
  149. }
  150. .sp_b_l_form{
  151. width: 100%;
  152. height: auto;
  153. background-color: white;
  154. }
  155. .sp_b_l_form>span{
  156. width: 100%;
  157. height: 60px;
  158. box-sizing: border-box;
  159. display: flex;
  160. align-items: center;
  161. justify-content: space-between;
  162. background-color: white;
  163. padding: 0 30px;
  164. cursor: pointer;
  165. transition: .3s;
  166. }
  167. .sp_b_l_form>span:hover{
  168. color: #1684FC;
  169. }
  170. .sp_b_l_form>span>svg{
  171. width: 15px;
  172. height: 15px;
  173. }
  174. .sp_b_l_form>div{
  175. width: 100%;
  176. height: auto;
  177. box-sizing: border-box;
  178. background-color: #F7F7F7;
  179. }
  180. .sp_b_l_form>div>span{
  181. width: 100%;
  182. height: 60px;
  183. display: flex;
  184. align-items: center;
  185. justify-content: space-between;
  186. box-sizing: border-box;
  187. padding: 0 40px;
  188. cursor: pointer;
  189. transition: .3s;
  190. }
  191. .sp_b_l_form>div>span:hover{
  192. color: #1684FC;
  193. }
  194. .formActive{
  195. color: #1684FC;
  196. }
  197. .sp_b_right{
  198. flex: 1;
  199. height: 100%;
  200. }
  201. </style>