aridRegion.vue 4.7 KB

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