result.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div class="page-box">
  3. <div class="card-box">
  4. <div class="title">
  5. <h5>Result Details</h5>
  6. </div>
  7. <div class="content-box">
  8. <div class="base-info">
  9. <div>任务ID:{{ jobId }}</div>
  10. <div>
  11. Status:
  12. <el-tag type="info">{{ getStatus(detail.status) }}</el-tag>
  13. </div>
  14. </div>
  15. </div>
  16. <div>
  17. <img v-if="detail.SC_GRS" :src="detail.SC_GRS" alt="" />
  18. <img v-if="detail.OR_GRS" :src="detail.OR_GRS" alt="" />
  19. <img v-if="detail.DL_GRS" :src="detail.DL_GRS" alt="" />
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import { createOrder, orderDetail } from "@/api";
  26. export default {
  27. name: "result",
  28. data() {
  29. return {
  30. jobId: "",
  31. detail: {},
  32. };
  33. },
  34. mounted() {
  35. this.jobId = this.$route.query.jobId;
  36. this.getDetailFn();
  37. },
  38. methods: {
  39. async getDetailFn() {
  40. if (!this.jobId) return;
  41. const res = await orderDetail({
  42. id: this.jobId,
  43. });
  44. if (res.code === 200) {
  45. this.detail = res.data;
  46. }
  47. },
  48. getTag(row) {
  49. if (row.status === "success") {
  50. return "success";
  51. }
  52. if (row.status === "waiting") {
  53. return "info";
  54. }
  55. return "danger";
  56. },
  57. getStatus(status) {
  58. if (status === 0) {
  59. return "已创建";
  60. }
  61. if (status === 1) {
  62. return "已创建任务";
  63. }
  64. if (status === 2) {
  65. return "任务运行中";
  66. }
  67. if (status === 3) {
  68. return "已完成";
  69. }
  70. return "正在初始化中";
  71. },
  72. },
  73. };
  74. </script>
  75. <style lang="less" scoped>
  76. .page-box {
  77. padding: 24px;
  78. .card-box {
  79. background-color: rgb(255, 255, 255);
  80. color: rgba(0, 0, 0, 0.87);
  81. transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  82. border-radius: 4px;
  83. box-shadow: rgba(0, 0, 0, 0.2) 0px 3px 3px -2px,
  84. rgba(0, 0, 0, 0.14) 0px 3px 4px 0px, rgba(0, 0, 0, 0.12) 0px 1px 8px 0px;
  85. min-width: 300px;
  86. margin-top: 16px;
  87. margin-bottom: 16px;
  88. overflow: hidden;
  89. padding-right: 15px;
  90. padding-top: 15px;
  91. padding-bottom: 15px;
  92. .title {
  93. border-left: 6px solid rgb(246, 144, 61);
  94. border-top-color: rgb(246, 144, 61);
  95. border-right-color: rgb(246, 144, 61);
  96. border-bottom-color: rgb(246, 144, 61);
  97. background-color: rgb(16, 126, 100);
  98. color: rgb(255, 255, 255);
  99. padding: 8px 8px 8px 16px;
  100. h5 {
  101. font-size: 24px;
  102. margin: 0px;
  103. font-family: Roboto, Helvetica, Arial, sans-serif;
  104. font-weight: 400;
  105. font-size: 1.5rem;
  106. line-height: 1.334;
  107. letter-spacing: 0em;
  108. display: flex;
  109. -webkit-box-align: center;
  110. align-items: center;
  111. }
  112. }
  113. .content-box {
  114. display: flex;
  115. .base-info {
  116. width: 150px;
  117. padding: 15px;
  118. }
  119. }
  120. }
  121. }
  122. </style>