school.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <div class="School">
  3. <a-card
  4. :body-style="{padding: '24px 32px'}"
  5. :bordered="false"
  6. >
  7. <a-row
  8. class="number-list"
  9. >
  10. <a-col
  11. class="number-item"
  12. v-for="(item, index) in 9"
  13. :key="item"
  14. :style="{flex: index === 8 ? '40%' : '20%'}"
  15. >
  16. <div class="content">
  17. <div class="label">
  18. 签约金额
  19. </div>
  20. <div class="count">
  21. <count-to :start-val="0" :end-val="2000 || 0" :duration="2000"/>
  22. </div>
  23. </div>
  24. </a-col>
  25. </a-row>
  26. </a-card>
  27. <a-card
  28. style="margin-top: 20px"
  29. :body-style="{padding: '24px 32px'}"
  30. :bordered="false"
  31. >
  32. <a-row style="margin-bottom: 20px">
  33. <a-col :span="7">
  34. <span>签约时间:&nbsp;&nbsp;</span>
  35. <a-range-picker @change="onChange" />
  36. </a-col>
  37. <a-col :span="4">
  38. <span>选择老师:</span>&nbsp;&nbsp;
  39. <a-select default-value="lucy" style="width: 120px" @change="handleChange">
  40. <a-select-option value="jack">
  41. Jack
  42. </a-select-option>
  43. <a-select-option value="lucy">
  44. Lucy
  45. </a-select-option>
  46. <a-select-option value="disabled" disabled>
  47. Disabled
  48. </a-select-option>
  49. <a-select-option value="Yiminghe">
  50. yiminghe
  51. </a-select-option>
  52. </a-select>
  53. </a-col>
  54. <a-col :span="4">
  55. <span>排序方式&nbsp;&nbsp;</span>
  56. <a-select default-value="lucy" style="width: 120px" @change="handleChange">
  57. <a-select-option value="jack">
  58. Jack
  59. </a-select-option>
  60. <a-select-option value="lucy">
  61. Lucy
  62. </a-select-option>
  63. <a-select-option value="disabled" disabled>
  64. Disabled
  65. </a-select-option>
  66. <a-select-option value="Yiminghe">
  67. yiminghe
  68. </a-select-option>
  69. </a-select>
  70. </a-col>
  71. </a-row>
  72. <a-table :columns="columns" :data-source="data" >
  73. <a slot="name" slot-scope="text">{{ text }}</a>
  74. <span slot="customTitle"><a-icon type="smile-o" /> Name</span>
  75. <span slot="tags" slot-scope="tags">
  76. <a-tag
  77. v-for="tag in tags"
  78. :key="tag"
  79. :color="tag === 'loser' ? 'volcano' : tag.length > 5 ? 'geekblue' : 'green'"
  80. >
  81. {{ tag.toUpperCase() }}
  82. </a-tag>
  83. </span>
  84. <span slot="action" slot-scope="text, record">
  85. <a>Invite 一 {{ record.name }}</a>
  86. <a-divider type="vertical" />
  87. <a>Delete</a>
  88. <a-divider type="vertical" />
  89. <a class="ant-dropdown-link"> More actions <a-icon type="down" /> </a>
  90. </span>
  91. </a-table>
  92. </a-card>
  93. </div>
  94. </template>
  95. <script>
  96. const columns = [
  97. {
  98. dataIndex: 'rank',
  99. key: 'rank',
  100. title: '排行'
  101. },
  102. {
  103. title: '姓名',
  104. dataIndex: 'name',
  105. key: 'name'
  106. },
  107. {
  108. title: '跟进次数',
  109. dataIndex: 'price',
  110. key: 'price'
  111. },
  112. {
  113. title: '跟进线索数',
  114. key: 'count',
  115. dataIndex: 'count'
  116. },
  117. {
  118. title: '试听数',
  119. key: 'classPrice',
  120. dataIndex: 'classPrice'
  121. }
  122. ]
  123. const data = [
  124. {
  125. key: '1',
  126. name: 'John Brown',
  127. age: 32,
  128. address: 'New York No. 1 Lake Park',
  129. tags: ['nice', 'developer']
  130. },
  131. {
  132. key: '2',
  133. name: 'Jim Green',
  134. age: 42,
  135. address: 'London No. 1 Lake Park',
  136. tags: ['loser']
  137. },
  138. {
  139. key: '3',
  140. name: 'Joe Black',
  141. age: 32,
  142. address: 'Sidney No. 1 Lake Park',
  143. tags: ['cool', 'teacher']
  144. }
  145. ]
  146. export default {
  147. name: 'School',
  148. data () {
  149. return {
  150. data,
  151. columns
  152. }
  153. }
  154. }
  155. </script>
  156. <style scoped lang="less">
  157. @import '~ant-design-vue/es/style/themes/default.less';
  158. .number-list {
  159. display: flex;
  160. flex-wrap: wrap;
  161. .number-item {
  162. height: 50px;
  163. display: flex;
  164. margin-top: 20px;
  165. .content {
  166. width: 150px;
  167. display: flex;
  168. flex-direction: column;
  169. align-items: center;
  170. justify-content: space-between;
  171. .count {
  172. font-size: 18px;
  173. font-weight: bold;
  174. color: @primary-color;
  175. }
  176. }
  177. .line {
  178. width: 1px;
  179. height: 50px;
  180. background-color: #e8e8e8;
  181. }
  182. }
  183. }
  184. </style>