planDetail.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <template>
  2. <view>
  3. <u-navbar title="计划详情"></u-navbar>
  4. <view class="head">
  5. <view class="title">
  6. 接地线
  7. </view>
  8. <view class="item">
  9. <view class="name">
  10. 数量:
  11. </view>
  12. <view class="value">
  13. 7根
  14. </view>
  15. </view>
  16. <view class="item">
  17. <view class="name">
  18. 领用人:
  19. </view>
  20. <view class="value">
  21. 孙斌
  22. </view>
  23. </view>
  24. <view class="item">
  25. <view class="name">
  26. 计划日期:
  27. </view>
  28. <view class="value">
  29. 2023/03/15-2023/03/20
  30. </view>
  31. <view class="unfold" @click="changeShow()">
  32. 展开<u-icon size="28" name="arrow-down"></u-icon>
  33. </view>
  34. <view class="options" v-if="this.show==true" @click="changeShow()">
  35. 选项3
  36. </view>
  37. </view>
  38. </view>
  39. <view class="container">
  40. <view class="main">
  41. <view class="list-item" v-for="item in 2">
  42. <!--信息 -->
  43. <view class="list-infos">
  44. <view class="infos-head">
  45. <view class="name">
  46. 50KV直流高压电缆
  47. </view>
  48. </view>
  49. <view class="infos">
  50. <view class="infos-1">
  51. <view class="infos-item">
  52. <view class="item-name">
  53. 型号:
  54. </view>
  55. <view class="item-value">
  56. GZYV GYVZ-50
  57. </view>
  58. </view>
  59. </view>
  60. <view class="infos-2">
  61. <view class="infos-item">
  62. <view class="item-name">
  63. 设备编号:
  64. </view>
  65. <view class="item-value">
  66. ND920182001511
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="receive-options">
  73. <view class="title">
  74. 巡检结果
  75. </view>
  76. <view class="receive-radio">
  77. <u-radio-group v-model="value" @change="radioGroupChange">
  78. <u-radio @change="radioChange" v-for="(item, index) in list" :key="index"
  79. :name="item.name" :disabled="item.disabled">
  80. {{item.name}}
  81. </u-radio>
  82. </u-radio-group>
  83. </view>
  84. </view>
  85. <!-- 备注 -->
  86. <textarea placeholder="备注" name="" id="" cols="30" rows="10"></textarea>
  87. <!-- 上传图片 -->
  88. <view class="upload-img">
  89. <u-upload width="144" height="144" upload-text="" del-bg-color="#0051FF" :before-upload="beforeUpload"></u-upload>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </template>
  96. <script>
  97. export default {
  98. data() {
  99. return {
  100. list: [{
  101. name: '合格',
  102. disabled: false
  103. },
  104. {
  105. name: '不合格',
  106. disabled: false
  107. },
  108. ],
  109. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  110. value: '合格',
  111. show:false
  112. };
  113. },
  114. methods: {
  115. // 选中某个单选框时,由radio时触发
  116. radioChange(e) {
  117. // console.log(e);
  118. },
  119. // 选中任一radio时,由radio-group触发
  120. radioGroupChange(e) {
  121. // console.log(e);
  122. },
  123. beforeUpload(index, list) {
  124. // 只上传偶数索引的文件
  125. if(index % 2 == 0) return true;
  126. else return false;
  127. },
  128. changeShow(){
  129. this.show=!this.show
  130. }
  131. },
  132. };
  133. </script>
  134. <style scoped lang="scss">
  135. .head{
  136. background-color: #fff;
  137. padding: 32rpx;
  138. .title{
  139. color: rgba(51, 51, 51, 1);
  140. font-size: 36rpx;
  141. margin-bottom: 16rpx;
  142. }
  143. .item{
  144. display: flex;
  145. color: #777777 ;
  146. margin-top: 16rpx;
  147. .name,.value{
  148. font-weight: bold;
  149. }
  150. .unfold{
  151. margin-left: auto;
  152. position: relative;
  153. color:#929EA5;
  154. font-family: Microsoft Yahei;
  155. /deep/.uicon-arrow-down{
  156. margin-left: 8rpx;
  157. }
  158. }
  159. .options{
  160. width: 120rpx;
  161. height: 60rpx;
  162. line-height: 60rpx;
  163. text-align: center;
  164. background-color: #fff;
  165. color: rgba(65, 80, 88, 1);
  166. font-family: Microsoft Yahei;
  167. position: absolute;
  168. top: 320rpx;
  169. right: 24rpx;
  170. box-shadow:5px 5px 10px gray;
  171. }
  172. }
  173. }
  174. .container {
  175. .main {
  176. padding: 0 24rpx;
  177. .list-item {
  178. border-radius: 8px;
  179. padding: 24rpx;
  180. background-color: #fff;
  181. margin-top: 24rpx;
  182. }
  183. // 信息
  184. .list-infos {
  185. padding-bottom: 24rpx;
  186. border-bottom: 1px solid rgba(232, 232, 232, 1);
  187. .infos-head {
  188. display: flex;
  189. justify-content: space-between;
  190. align-items: center;
  191. margin-bottom: 24rpx;
  192. .name {
  193. color: rgba(51, 51, 51, 1);
  194. font-size: 32rpx;
  195. }
  196. .state {
  197. border: 1px solid rgba(69, 186, 69, 1);
  198. border-radius: 4px;
  199. color: rgba(69, 186, 69, 1);
  200. font-size: 24rpx;
  201. line-height: 48rpx;
  202. width: 160rpx;
  203. text-align: center;
  204. text {
  205. img {
  206. vertical-align: middle;
  207. margin-right: 4rpx;
  208. }
  209. }
  210. }
  211. }
  212. .infos {
  213. margin-top: 16rpx;
  214. display: flex;
  215. justify-content: space-between;
  216. color: #777777;
  217. font-size: 24rpx;
  218. .infos-item {
  219. display: flex;
  220. margin-bottom: 8rpx;
  221. .item-value{
  222. width: 200rpx;
  223. overflow: hidden;
  224. white-space: nowrap;
  225. text-overflow: ellipsis;
  226. }
  227. }
  228. }
  229. }
  230. // 接收选项
  231. .receive-options {
  232. display: flex;
  233. align-items: center;
  234. padding: 24rpx 0;
  235. .title {
  236. color: #333333;
  237. margin-right: 24rpx;
  238. font-weight: bold;
  239. }
  240. .receive-radio {
  241. flex: 1;
  242. /deep/.u-radio-group {
  243. width: 100%;
  244. }
  245. /deep/.u-radio {
  246. margin-right: 48rpx;
  247. }
  248. }
  249. }
  250. // 备注
  251. uni-textarea {
  252. width: 100%;
  253. height: 80rpx;
  254. line-height: 80rpx;
  255. text-indent: 24rpx;
  256. background-color: rgba(241, 242, 245, 1);
  257. color: rgba(136, 136, 136, 1);
  258. border-radius: 8px;
  259. font-family: Microsoft Yahei;
  260. font-size: 28rpx;
  261. }
  262. // 上传图片
  263. .upload-img{
  264. margin-top: 24rpx;
  265. /deep/.u-add-tips{
  266. margin-top: 0;
  267. }
  268. // 右上角删除图标
  269. /deep/.u-delete-icon{
  270. top: -8rpx;
  271. right: -8rpx;
  272. width: 36rpx;
  273. height: 36rpx;
  274. }
  275. /deep/.u-list-item{
  276. overflow: inherit;
  277. }
  278. /deep/.u-list-item{
  279. margin-right: 8rpx;
  280. }
  281. }
  282. }
  283. }
  284. </style>