transferNum.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div class="commonTitle">流转卡号</div>
  3. <div class="body">
  4. <el-scrollbar class="scrollbar">
  5. <div
  6. v-if="selectSeqArray.length < 1"
  7. class="titleText"
  8. style="
  9. display: flex;
  10. align-items: center;
  11. justify-content: center;
  12. min-height: calc(100vh - 210px);
  13. "
  14. >
  15. 请选择工序
  16. </div>
  17. <Transition>
  18. <div v-if="selectSeqArray.length > 0">
  19. <div
  20. v-for="(item, index) in selectSeqArray"
  21. :key="index"
  22. class="row"
  23. @click="clickCardNum(index)"
  24. >
  25. <el-tooltip
  26. :content="item.seqNo"
  27. effect="dark"
  28. placement="left"
  29. trigger="hover"
  30. >
  31. <span
  32. :class="
  33. index == selectSeqIndex
  34. ? 'describeText active'
  35. : 'describeText'
  36. "
  37. >{{ item.seqNo }}</span
  38. >
  39. </el-tooltip>
  40. <div
  41. :class="
  42. dictS.getLableByValue(
  43. 'work_order_seq_state',
  44. String(item.state)
  45. ) == '完成'
  46. ? 'status success'
  47. : 'status'
  48. "
  49. >
  50. {{
  51. dictS.getLableByValue(
  52. "work_order_seq_state",
  53. String(item.state)
  54. )
  55. }}
  56. </div>
  57. </div>
  58. </div>
  59. </Transition>
  60. </el-scrollbar>
  61. </div>
  62. </template>
  63. <script lang="ts" setup>
  64. import { useDictionaryStore, useProcessStore } from "@/store";
  65. import { Transition } from "vue";
  66. const store = useProcessStore();
  67. const dictS = useDictionaryStore();
  68. const selectSeqIndex = inject("selectSeqIndex");
  69. const selectSeqArray = inject("selectSeqArray");
  70. const clickCardNum = (index: number) => {
  71. selectSeqIndex.value = index;
  72. store.useSeqNo = selectSeqArray.value[selectSeqIndex.value].seqNo;
  73. };
  74. onMounted(() => {
  75. if (!selectSeqIndex.value) store.useSeqNo = "";
  76. });
  77. </script>
  78. <style lang="scss" scoped>
  79. .success {
  80. color: #64bb5c;
  81. }
  82. .body {
  83. width: 100%;
  84. background-color: white;
  85. border-radius: 16px;
  86. padding: 20px;
  87. .row {
  88. display: flex;
  89. justify-content: space-between;
  90. align-items: bottom;
  91. vertical-align: center;
  92. .status {
  93. width: 50px;
  94. font-size: 18px;
  95. line-height: 24px;
  96. margin-bottom: 10px;
  97. text-align: center;
  98. }
  99. }
  100. }
  101. .describeText {
  102. color: black;
  103. font-weight: $Medium;
  104. font-size: 22px;
  105. margin-bottom: $p10;
  106. overflow: hidden;
  107. text-overflow: ellipsis;
  108. word-break: break-all;
  109. cursor: pointer;
  110. }
  111. .active {
  112. color: $select-hover;
  113. animation-name: cardHover;
  114. animation-duration: 0.5s;
  115. }
  116. .scrollbar {
  117. height: calc(100vh - 210px);
  118. }
  119. </style>