userCenterHomeCoreTechnology.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <div style="width: 100%;background: #fff;min-height: 700px;color: #666;" class="userCenterMyProject">
  3. <div style="height: 60px;line-height: 60px;margin-left: 30px;margin-right: 30px; ">
  4. <span style="margin-right:10px">{{$t('common.all')}}(0)</span>
  5. <span style="margin-right:10px">{{$t('common.ToAudit')}}(0)</span>
  6. <span style="margin-right:10px">{{$t('common.notApproved')}}(0)</span>
  7. <span style="margin-right:10px">{{$t('common.Approved')}}(0)</span>
  8. <el-button type="primary" style="float: right;margin-right: 90px;margin-top: 10px;" @click="toView('addHomeMaintenance','')">{{$t('common.Add')}}</el-button>
  9. </div>
  10. <div style="margin-left: 30px;">
  11. <el-table
  12. :data="tableData"
  13. stripe
  14. style="width: 100%" >
  15. <template slot="empty">
  16. {{$t('common.UserNoData')}}
  17. </template>
  18. <el-table-column fixed prop="date" :label="$t('common.Title')" width="210" > </el-table-column>
  19. <el-table-column prop="name" :label="$t('common.MainText')" width="120"> </el-table-column>
  20. <el-table-column prop="address" :label="$t('common.ReleaseState')" width="120"> </el-table-column>
  21. <el-table-column prop="address1" :label="$t('common.ReviewState')" width="120"></el-table-column>
  22. <el-table-column prop="address2" :label="$t('common.releaseTime')" width="120"> </el-table-column>
  23. <el-table-column fixed="right" prop="address5" :label="$t('common.Option')" width="210">
  24. <template slot-scope="scope">
  25. <el-button
  26. @click.native.prevent="change(scope.$index, tableData)"
  27. type="text"
  28. size="small">
  29. {{$t('common.Edit')}}
  30. </el-button>
  31. <el-button
  32. @click.native.prevent="release(scope.$index, tableData)"
  33. type="text"
  34. size="small">
  35. {{$t('common.release')}}
  36. </el-button>
  37. <el-button
  38. @click.native.prevent="withdraw(scope.$index, tableData)"
  39. type="text"
  40. size="small">
  41. {{$t('common.recall')}}
  42. </el-button>
  43. <el-button
  44. @click.native.prevent="deleteRow(scope.$index, tableData)"
  45. type="text"
  46. size="small">
  47. {{$t('common.Delete')}}
  48. </el-button>
  49. </template>
  50. </el-table-column>
  51. </el-table>
  52. </div>
  53. <div style="width: 100%;text-align: center;" v-if="tableData.length>0">
  54. <el-pagination
  55. style="margin-top: 50px;height: 80px;"
  56. background
  57. layout="prev, pager, next"
  58. :total=0 @size-change="handleSizeChange"
  59. @current-change="handleCurrentChange">
  60. </el-pagination>
  61. </div>
  62. </div>
  63. </template>
  64. <script>
  65. export default {
  66. name: 'userCenterHomeCoreTechnology',
  67. data () {
  68. return {
  69. formInline: {
  70. user: '',
  71. region: ''
  72. },
  73. tableData: []
  74. }
  75. },
  76. methods:{
  77. toView(router,json){
  78. this.$router.push({name:router,params:json})
  79. },
  80. // 发布
  81. release(index, rows) {
  82. console.log(index, rows)
  83. },
  84. // 编辑
  85. change(index, rows) {
  86. console.log(index, rows)
  87. },
  88. // 删除
  89. deleteRow(index, rows) {
  90. console.log(index, rows)
  91. },
  92. // 撤回
  93. withdraw(index,rows) {
  94. console.log(index, rows)
  95. },
  96. handleSizeChange(val) {
  97. console.log(`每页 ${val} 条`);
  98. },
  99. handleCurrentChange(val) {
  100. console.log(`当前页: ${val}`);
  101. }
  102. }
  103. }
  104. </script>
  105. <style scoped>
  106. .el-input {
  107. width: 200px ;
  108. }
  109. .el-form-item__content,.el-select {
  110. width: 200px !important;
  111. }
  112. .el-table thead {
  113. background: #eee;
  114. }
  115. .userCenterMyProject >>> .el-pagination .el-pager li,
  116. .userCenterMyProject >>> .el-pagination .btn-next,
  117. .userCenterMyProject >>> .el-pagination .btn-prev{
  118. width: 35px;
  119. height: 35px;
  120. line-height: 35px;
  121. }
  122. .userCenterMyProject >>> .el-pagination.is-background .el-pager li:not(.disabled).active {
  123. background: #0050d8;
  124. }
  125. </style>