InstitutionRank.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div>
  3. <el-table :data="tableData" :showHeader="true" border style="width: 100%">
  4. <el-table-column type="index" width="50" label="排名"></el-table-column>
  5. <el-table-column prop="logo" width="auto" label="机构logo">
  6. <template slot-scope="scope" >
  7. <img class="logo-img" :src="scope.row.logo==null?defaultValue.image:scope.row.logo"/>
  8. </template>
  9. </el-table-column>
  10. <el-table-column prop="name" label="机构名称">
  11. <template slot-scope="scope"><span class="institution-name" style="font-size: 12px">{{scope.row.name}}</span></template>
  12. </el-table-column>
  13. <el-table-column prop="name" label="金额">
  14. <template slot-scope="scope">
  15. <span class="institution-name" style="font-size: 12px">
  16. {{scope.row.allTaskPrice}}
  17. </span>
  18. </template>
  19. </el-table-column>
  20. </el-table>
  21. </div>
  22. </template>
  23. <script>
  24. import {defaultValue} from '@/js/index'
  25. export default {
  26. name: 'InstitutionRank',
  27. props: {item: {}},
  28. data () {
  29. return {
  30. tableData: this.item,
  31. defaultValue: defaultValue
  32. }
  33. },
  34. watch: {
  35. item () {
  36. this.tableData = this.item
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. .logo-img {
  43. height: 50px;
  44. width: 100px;
  45. object-fit: contain;
  46. }
  47. .institution-name {
  48. font-size: 16px;
  49. font-weight: 600;
  50. }
  51. </style>