aridRegion.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <view>
  3. <view class="title_box rx-bc">
  4. <view class="name">干燥区</view>
  5. </view>
  6. <view v-for="(item, index) in list" :key='index'>
  7. <view class="title_box rx-bc" v-if='!isType'>
  8. <view class="left rx-ss" @click="getDelete(index)">
  9. <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
  10. </view>
  11. <view class="btn_box rx-bc" @click="handleScan(index)">
  12. <image class="scan" src="@/static/pda/ScanIt.svg"></image>
  13. 更换干燥区
  14. </view>
  15. </view>
  16. <view class="material ">
  17. <view class="content_table">
  18. <view class="item">
  19. <view class="lable rx-cc">编号</view>
  20. <view class="content rx-bc">
  21. <view>{{ !isType ? item.code : item.aridRegionList[0].code}}</view>
  22. <view v-if='!isType' :style="{ color: item.status == 0 ? '#157A2C' :'#FFA929' }">
  23. {{ item.status == 0 ? '空闲' : item.status == 1 ? '占用' : ''}}</view>
  24. <view v-if='isType && remainingTime == 0 ' style=" color: #157A2C">
  25. {{ remainingTime }}
  26. </view>
  27. <view v-if='isType && remainingTime != 0 ' style="color: #FFA929">
  28. <u-count-down v-if='remainingTime > 0' :time="Number(remainingTime)" format="HH:mm:ss"></u-count-down>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="item">
  33. <view class="lable rx-cc">名称</view>
  34. <view class="content">{{ item.name }}</view>
  35. </view>
  36. <view class="item">
  37. <view class="lable rx-cc">位置</view>
  38. <view class="content">{{ !isType ? item.region : item.extInfo.region }} </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. props: {
  49. list: {
  50. type: Array,
  51. default: () => []
  52. },
  53. wordItem: {
  54. type: Object,
  55. default: () => {}
  56. },
  57. isType: {
  58. type: Boolean,
  59. default: false,
  60. },
  61. remainingTime: {
  62. type: Number,
  63. default: 0,
  64. }
  65. },
  66. data() {
  67. return {
  68. occupationTime: null,
  69. }
  70. },
  71. methods: {
  72. handleScan(index) {
  73. this.$emit('handleScan', index, 'aridRegion')
  74. },
  75. getDelete(index) {
  76. this.list.splice(index, 1)
  77. },
  78. }
  79. }
  80. </script>
  81. <style lang="scss" scoped>
  82. .title_box {
  83. margin-top: 20rpx;
  84. .name {
  85. font-size: 28rpx;
  86. font-style: normal;
  87. font-weight: 400;
  88. color: $theme-color;
  89. padding-left: 20rpx;
  90. position: relative;
  91. &:before {
  92. position: absolute;
  93. content: '';
  94. left: 0rpx;
  95. top: 0rpx;
  96. bottom: 0rpx;
  97. width: 4rpx;
  98. height: 28rpx;
  99. background: $theme-color;
  100. margin: auto;
  101. }
  102. }
  103. .left {
  104. width: 40rpx;
  105. }
  106. .btn_box {
  107. padding: 0 18rpx;
  108. height: 60rpx;
  109. background: $theme-color;
  110. font-size: 26rpx;
  111. font-style: normal;
  112. font-weight: 400;
  113. font-size: 24rpx;
  114. color: #fff;
  115. border-radius: 4rpx;
  116. .scan {
  117. width: 34rpx;
  118. height: 34rpx;
  119. margin-right: 12rpx;
  120. }
  121. }
  122. }
  123. .material {
  124. margin-top: 10rpx;
  125. .content_table {
  126. width: 100%;
  127. border: 2rpx solid $border-color;
  128. .item {
  129. display: flex;
  130. border-bottom: 2rpx solid $border-color;
  131. .lable {
  132. width: 132rpx;
  133. text-align: center;
  134. background-color: #F7F9FA;
  135. font-size: 26rpx;
  136. border-right: 2rpx solid $border-color;
  137. flex-shrink: 0;
  138. }
  139. .lable150 {
  140. width: 156rpx !important;
  141. font-size: 24rpx;
  142. }
  143. .ww80 {
  144. width: 80rpx;
  145. }
  146. .content {
  147. width: 518rpx;
  148. min-height: 64rpx;
  149. font-size: 28rpx;
  150. line-height: 28rpx;
  151. font-style: normal;
  152. font-weight: 400;
  153. padding: 18rpx 8rpx;
  154. box-sizing: border-box;
  155. word-wrap: break-word;
  156. flex-grow: 1 !important;
  157. .unit {
  158. padding: 0 4rpx;
  159. font-size: 24rpx;
  160. color: #404446;
  161. }
  162. }
  163. .content_num {
  164. display: flex;
  165. align-items: center;
  166. padding: 0 4rpx;
  167. /deep/ .uni-input-input {
  168. border: 2rpx solid #F0F8F2;
  169. background: #F0F8F2;
  170. color: $theme-color;
  171. }
  172. }
  173. .pd4 {
  174. padding: 4rpx 8rpx;
  175. }
  176. &:last-child {
  177. border-bottom: none;
  178. }
  179. }
  180. }
  181. }
  182. /deep/ .u-count-down__text{
  183. color: #FFA929;
  184. }
  185. </style>