index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <div class="app-container">
  3. <el-table v-loading="loading" border :data="distributionList">
  4. <el-table-column label="实验室" align="center" prop="subName" />
  5. <el-table-column label="学院" align="center" prop="groupDeptName" />
  6. <el-table-column label="实验室负责人" align="center" prop="adminName" />
  7. <el-table-column label="关联时间" align="center" prop="createTime" />
  8. <el-table-column label="关联结果" align="center" prop="distrName">
  9. <template scope="scope">
  10. <span v-if="scope.row.distrName=='关联成功'" class="succeed_color">关联成功</span>
  11. <span v-if="scope.row.distrName=='关联失败'" class="fail_color">关联失败</span>
  12. </template>
  13. </el-table-column>
  14. <el-table-column label="备注" align="center" prop="remark" />
  15. </el-table>
  16. <pagination :page-sizes="[20, 30, 40, 50]"
  17. v-show="total>0"
  18. :total="total"
  19. :page.sync="queryParams.pageNum"
  20. :limit.sync="queryParams.pageSize"
  21. @pagination="listDistribution"
  22. />
  23. </div>
  24. </template>
  25. <script>
  26. import { listDistribution,} from "@/api/laboratory/distribution";
  27. export default {
  28. props:{
  29. pageData3:{},
  30. },
  31. name: "Distribution",
  32. data() {
  33. return {
  34. // 遮罩层
  35. loading: true,
  36. // 总条数
  37. total: 0,
  38. // 分配记录日志表格数据
  39. distributionList: [],
  40. // 查询参数
  41. queryParams: {
  42. pageNum: 1,
  43. pageSize:20,
  44. riskPlanId: null,
  45. },
  46. // 表单参数
  47. form: {},
  48. // 表单校验
  49. rules: {
  50. }
  51. };
  52. },
  53. created() {
  54. this.listDistribution();
  55. },
  56. methods: {
  57. /** 查询分配记录日志列表 */
  58. listDistribution() {
  59. this.loading = true;
  60. this.queryParams.riskPlanId=this.pageData3.id
  61. listDistribution(this.queryParams).then( response => {
  62. this.distributionList = response.rows;
  63. this.total = response.total;
  64. this.loading = false;
  65. });
  66. },
  67. //切换页面
  68. backPage(){
  69. this.$parent.handleClick('','','back');
  70. },
  71. }
  72. };
  73. </script>
  74. <style scoped lang="scss">
  75. #app .app-container{
  76. background: #fff;
  77. border-radius: 0px;
  78. overflow: hidden;
  79. padding: 10px;
  80. margin: 0;
  81. box-shadow:none;
  82. }
  83. .go_back{
  84. width: 100%;
  85. text-align: right;
  86. margin: 20px 0;
  87. }
  88. .reset-button-one{
  89. display: inline-block;
  90. /* position: absolute;
  91. top:20px;
  92. right:0;*/
  93. }
  94. .succeed_color{
  95. color: #29B24D;
  96. }
  97. .fail_color{
  98. color: #FF5151;
  99. }
  100. </style>