aridRegion.vue 4.0 KB

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