verificationHistory.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <!-- @format -->
  2. <template>
  3. <view class="container">
  4. <view class="">
  5. <view style="">
  6. <!-- <u-search
  7. :showAction="false"
  8. bgColor="#fff"
  9. placeholder="请输入检定单编号"
  10. style="width: 95%; margin: 30rpx auto"
  11. ></u-search> -->
  12. <view
  13. class="contentItems"
  14. @click="handleVerDetails"
  15. v-for="item of recordList"
  16. >
  17. <view class="title">
  18. <span class="name">{{ item.name }}</span>
  19. <span
  20. class="createTime"
  21. :style="{
  22. color: verificationColor[recordStatus(item.checkRecordStatus)],
  23. }"
  24. >检定状态:{{ recordStatus(item.checkRecordStatus) }}</span
  25. >
  26. </view>
  27. <view class="contentItem">
  28. <view class="item">
  29. <span
  30. style="color: #fa3534; font-size: 28rpx; margin-right: 40rpx"
  31. >检定编号:{{ item.number }}</span
  32. >
  33. </view>
  34. <view class="item">
  35. <span>唯一标识:{{ item.instrNo }}</span>
  36. </view>
  37. <view class="item">
  38. <view>审核机构:{{ item.organizationName }}</view>
  39. </view>
  40. <view class="item">
  41. <view>检定部门:{{ item.deptName }}</view>
  42. </view>
  43. <view class="item">
  44. <span>申请时间:{{ item.createTime }}</span>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import { getCheckRecordList } from "@/api/Ledger";
  54. import { useDict, paraseDict } from "@/utils/index";
  55. export default {
  56. data() {
  57. return {
  58. recordId: null,
  59. recordList: [],
  60. verificationColor: {
  61. 未检定: "#909399",
  62. 已校准: "#19be6b",
  63. 已检定: "#19be6b",
  64. 不合格: "#fa3534",
  65. 已超期: "#fa3534",
  66. },
  67. verification: [], //备案字典
  68. };
  69. },
  70. computed: {
  71. //备案状态
  72. recordStatus() {
  73. return (row) => {
  74. return paraseDict(this.verification, row);
  75. };
  76. },
  77. },
  78. async onLoad(options) {
  79. useDict("ejian_instrCheckRecordStatus").then((res) => {
  80. this.verification = res;
  81. });
  82. this.recordId = options.id;
  83. try {
  84. let { data } = await getCheckRecordList({
  85. instrumentId: this.recordId,
  86. });
  87. this.recordList = data;
  88. } catch (error) {}
  89. },
  90. };
  91. </script>
  92. <style lang="scss">
  93. .item {
  94. color: #909399;
  95. font-size: 24rpx;
  96. margin: 15rpx 0;
  97. }
  98. .title {
  99. padding-bottom: 10rpx;
  100. border-bottom: 1px solid rgb(242, 242, 242);
  101. display: flex;
  102. align-items: center;
  103. justify-content: space-between;
  104. .name {
  105. font-size: 30rpx;
  106. color: black;
  107. font-weight: bold;
  108. }
  109. .createTime {
  110. color: #909399;
  111. font-size: 28rpx;
  112. font-weight: bold;
  113. }
  114. }
  115. .container {
  116. height: 100vh;
  117. background: rgb(248, 249, 250);
  118. padding: 30rpx;
  119. }
  120. .contentItems {
  121. width: 97%;
  122. border-radius: 6px;
  123. background: #fff;
  124. margin: 0rpx auto 30rpx;
  125. padding: 20rpx 30rpx 20rpx;
  126. .content {
  127. border-bottom: 1px solid rgb(242, 242, 242);
  128. padding: 24rpx 0;
  129. display: flex;
  130. justify-content: space-between;
  131. }
  132. .content:last-child {
  133. border-bottom: none;
  134. }
  135. .title {
  136. font-size: 26rpx;
  137. color: black;
  138. letter-spacing: 3rpx;
  139. }
  140. .message {
  141. font-size: 26rpx;
  142. color: rgb(146, 146, 146);
  143. }
  144. }
  145. </style>