diyfieldsview.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <template>
  2. <view>
  3. <view class="tui-form">
  4. <view class="tui-view-input">
  5. <block v-for="(item,index) in registerfield" :key="index">
  6. <block v-if="item.inputtype == 'text' || item.inputtype == 'textarea'">
  7. <tui-list-cell :hover="false" padding="0">
  8. <view class="tui-line-cell">
  9. <view class="tui-title">{{item.viewmingcheng}}</view>
  10. <view v-if="item.fieldsvalue" class="tui-input">{{item.fieldsvalue}}</view>
  11. </view>
  12. </tui-list-cell>
  13. </block>
  14. <block v-if="item.inputtype == 'pics'">
  15. <tui-list-cell :hover="false" :lineLeft="false">
  16. <view class="tui-list-cell-img">
  17. <view class="img-title">{{item.viewmingcheng}}</view>
  18. <image :src="item.fieldsvalue || '/static/images/default_img.png'" class="tui-avatar">
  19. </image>
  20. </view>
  21. </tui-list-cell>
  22. </block>
  23. <block v-if="item.inputtype == 'lbs'">
  24. <tui-list-cell padding="0">
  25. <view class="tui-line-cell">
  26. <view class="tui-title"><text class="tui-title-city-text">{{item.viewmingcheng}}</text>
  27. </view>
  28. <view class="tui-input tui-pr__30">{{item.fieldsvalue.region_name}}</view>
  29. </view>
  30. </tui-list-cell>
  31. </block>
  32. <block v-if="item.inputtype == 'checkbox'">
  33. <tui-list-cell :hover="false" :lineLeft="false">
  34. <view class="uni-list">
  35. <block v-for="checkitem in item.selectvaluearray" :key="checkitem.val">
  36. <tui-tag v-if="item.fieldsvalue.includes(checkitem.val.toString())" plain
  37. size="24rpx" type="red" margin="8rpx 12rpx" padding="8rpx 12rpx">
  38. {{checkitem.key}}</tui-tag>
  39. </block>
  40. </view>
  41. </tui-list-cell>
  42. </block>
  43. <block v-if="item.inputtype === 'select'">
  44. <tui-list-cell :padding="0" :hover="true" :lineLeft="false" :arrow="true">
  45. <view class="tui-list-cell" style="padding: 0rpx;">
  46. <view v-if="item.fieldsvalue_name" class="weui-select">
  47. {{item.fieldsvalue_name}}
  48. </view>
  49. </view>
  50. </tui-list-cell>
  51. </block>
  52. </block>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. const util = require("@/utils/util.js")
  59. export default {
  60. name: 'diyfields',
  61. props: {
  62. ptype: {
  63. type: String,
  64. default: ''
  65. },
  66. orderid: {
  67. type: String,
  68. default: ''
  69. },
  70. technicalid: {
  71. type: String,
  72. default: ''
  73. },
  74. update: {
  75. type: String,
  76. default: ''
  77. },
  78. geturl: {
  79. type: String,
  80. default: 'registerfield.list'
  81. }
  82. },
  83. data() {
  84. return {
  85. registerfield: {},
  86. latitude: '',
  87. longitude: '',
  88. is_submitaudit: 1
  89. };
  90. },
  91. mounted() {
  92. let _this = this;
  93. _this.$request.get(_this.geturl, {
  94. ptype: _this.ptype,
  95. update: _this.update,
  96. technicalid: _this.technicalid,
  97. orderid: _this.orderid,
  98. samkey: (new Date()).valueOf()
  99. }).then(res => {
  100. console.log(res);
  101. if (res.errno == 0) {
  102. _this.registerfield = res.data;
  103. }
  104. });
  105. },
  106. methods: {}
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. .tui-list-cell {
  111. width: 100%;
  112. color: $uni-text-color;
  113. display: flex;
  114. align-items: center;
  115. justify-content: space-between;
  116. padding: 24rpx 60rpx 24rpx 30rpx;
  117. box-sizing: border-box;
  118. font-size: 30rpx;
  119. }
  120. .tui-list-cell-img {
  121. width: 100%;
  122. color: $uni-text-color;
  123. box-sizing: border-box;
  124. font-size: 30rpx;
  125. }
  126. .img-title {
  127. padding-bottom: 20rpx;
  128. }
  129. .tui-line-cell {
  130. width: 100%;
  131. padding: 24rpx 30rpx;
  132. box-sizing: border-box;
  133. display: flex;
  134. align-items: center;
  135. }
  136. .tui-title {
  137. width: 180rpx;
  138. font-size: 28rpx;
  139. flex-shrink: 0;
  140. }
  141. .tui-title-city-text {
  142. width: 180rpx;
  143. height: 40rpx;
  144. display: block;
  145. line-height: 46rpx;
  146. }
  147. .tui-input {
  148. width: 500rpx;
  149. }
  150. .tui-avatar {
  151. width: 130rpx;
  152. height: 130rpx;
  153. display: block;
  154. }
  155. .uni-list {
  156. width: 100%;
  157. padding-top: 15rpx;
  158. padding-bottom: 20rpx;
  159. padding-left: 20rpx;
  160. padding-right: 20rpx;
  161. box-sizing: border-box;
  162. display: flex;
  163. align-items: center;
  164. flex-wrap: wrap;
  165. }
  166. .ptypebut {
  167. width: 40%;
  168. display: flex;
  169. align-items: center;
  170. justify-content: center;
  171. flex-direction: column;
  172. padding-top: 15rpx;
  173. padding-bottom: 15rpx;
  174. margin-bottom: 10rpx;
  175. }
  176. .checkboxbox {
  177. padding: 20rpx;
  178. }
  179. .container {
  180. backgroundColor: #fff;
  181. padding-bottom: 80rpx;
  182. .tui-page-title {
  183. width: 100%;
  184. font-size: 48rpx;
  185. font-weight: bold;
  186. color: $uni-text-color;
  187. line-height: 42rpx;
  188. padding: 110rpx 40rpx 40rpx 40rpx;
  189. box-sizing: border-box;
  190. }
  191. .tui-form {
  192. .tui-view-input {
  193. width: 100%;
  194. box-sizing: border-box;
  195. padding: 0 0rpx;
  196. .tui-cell-input {
  197. width: 100%;
  198. display: flex;
  199. align-items: center;
  200. padding-top: 48rpx;
  201. padding-bottom: $uni-spacing-col-base;
  202. input {
  203. flex: 1;
  204. padding-left: $uni-spacing-row-base;
  205. }
  206. .tui-icon-close {
  207. margin-left: auto;
  208. }
  209. .tui-btn-send {
  210. width: 156rpx;
  211. text-align: right;
  212. flex-shrink: 0;
  213. font-size: $uni-font-size-base;
  214. color: $uni-color-primary;
  215. }
  216. .tui-gray {
  217. color: $uni-text-color-placeholder;
  218. }
  219. .tui-textarea {
  220. width: 100%;
  221. height: 300rpx;
  222. font-size: 28rpx;
  223. padding: 20rpx 30rpx;
  224. box-sizing: border-box;
  225. background-color: #fff;
  226. }
  227. }
  228. }
  229. .tui-cell-text {
  230. width: 100%;
  231. padding: 40rpx $uni-spacing-row-lg;
  232. box-sizing: border-box;
  233. font-size: $uni-font-size-sm;
  234. color: $uni-text-color-grey;
  235. display: flex;
  236. align-items: center;
  237. .tui-color-primary {
  238. color: $uni-color-primary;
  239. padding-left: $uni-spacing-row-sm;
  240. }
  241. }
  242. .tui-btn-box {
  243. width: 100%;
  244. padding: 0 $uni-spacing-row-lg;
  245. box-sizing: border-box;
  246. margin-top: 20rpx;
  247. }
  248. }
  249. }
  250. </style>