index.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <el-container class="flex-column">
  3. <div class="table-search" style="border-bottom: 0;">
  4. <search @success="handleSuccess"></search>
  5. </div>
  6. <el-main class="nopadding">
  7. <div class="table-container">
  8. <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" @total="orderTotal"></tablePage>
  9. </div>
  10. </el-main>
  11. </el-container>
  12. </template>
  13. <script>
  14. import search from './components/search';
  15. import tablePage from './components/table';
  16. import scStatistic from '@/components/scStatistic';
  17. export default {
  18. components: {
  19. search,tablePage,scStatistic
  20. },
  21. data(){
  22. return {
  23. totalLoading:true,
  24. searchKey:{},
  25. dataSelect:[],
  26. dataSelectFull:[],
  27. totalData:{},
  28. searchData:null
  29. }
  30. },
  31. methods: {
  32. orderTotal(data,searchKey){
  33. this.totalLoading = false;
  34. this.totalData = data;
  35. if (searchKey.create) {
  36. var start = this.$TOOL.dateFormat(searchKey.create[0], "yyyy-MM-dd");
  37. var end = this.$TOOL.dateFormat(searchKey.create[1], "yyyy-MM-dd");
  38. this.searchData = start+"-"+end;
  39. }
  40. },
  41. tableHandle(data){
  42. this.dataSelect = data;
  43. },
  44. tableHandleFull(data){
  45. this.dataSelectFull = data;
  46. },
  47. handleSuccess(data){
  48. this.$refs.tablePage.upData(data)
  49. },
  50. handleClick(name){
  51. this.activeName = name;
  52. this.searchKey.type = name;
  53. this.$refs.tablePage.upData(this.searchKey)
  54. }
  55. }
  56. }
  57. </script>
  58. <style>
  59. .user-card-body{display: flex;align-items: center;justify-content: space-around;padding: 10px 0;}
  60. .user-card-body .card-item{text-align: center;}
  61. .user-card-body .card-item .card-num span{font-size: 12px;color: #666;font-weight: normal;}
  62. .user-card-body .card-tips{font-size: 12px;color: #666;display: flex;align-items: center;}
  63. .user-card-body .card-tips i{font-style: normal;margin-left: 5px;}
  64. .user-card-body .card-num{font-size: 20px;font-weight: bold;}
  65. .mb10{margin-bottom: 15px;}
  66. .news-title{
  67. font-size: 16px;
  68. color: #000;
  69. font-weight: bold;
  70. margin-bottom: 10px;
  71. display: flex;
  72. align-items: center;
  73. }
  74. .news-title::before{
  75. content: "";
  76. width: 4px;
  77. height: 16px;
  78. display: block;
  79. background-color: var(--el-color-primary);;
  80. margin-right: 8px;
  81. }
  82. .news-title span{margin-left: 10px;font-weight: normal;color: #666;font-size: 12px;}
  83. </style>