hcDetails.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <view class="details">
  3. <view class="search">
  4. <van-icon name="wap-nav" @click="returnList" />
  5. </view>
  6. <van-sticky :offset-top="-10">
  7. <van-tabs sticky v-model="active" class="tabs">
  8. <van-tab v-for="(item, key) in tabOptions" :key="key" :title="item">
  9. <view class="hclist" v-if="key==0">
  10. <van-cell v-for="(item, i) in jbxxs" :key="i" :title="item.name" :value="infoObj[item.prop]" />
  11. </view>
  12. <view class="hclist" v-if="active==1">
  13. <van-tabs sticky v-if="sheets.length" v-model="ywyptab">
  14. <van-tab v-for="ypitem in sheets" :key="ypitem.sheet" :title="ypitem.type"
  15. :name="ypitem.sheet">
  16. <view>
  17. <img :src="ypitem.photo" width="100%" />
  18. 压占{{ ypitem.type }}面积共{{ ypitem.mjj }}平方米
  19. <van-cell>
  20. <van-row>
  21. <van-col :span="8" v-for="(item, i) in tdxzTable"
  22. :key="i">{{item.label}}</van-col>
  23. </van-row>
  24. </van-cell>
  25. <van-cell>
  26. <van-row v-for="(row, index) in ypitem.data_list" :key="index">
  27. <van-col :span="8" v-for="(item, i) in tdxzTable" :key="i">
  28. <div v-if="item.slot == 'ratio'">
  29. {{ ((row.yzmj / ypitem.yzmj) * 100).toFixed(2) }}%
  30. </div>
  31. <span v-else>{{ row[item.prop] }}</span>
  32. </van-col>
  33. </van-row>
  34. </van-cell>
  35. </view>
  36. </van-tab>
  37. </van-tabs>
  38. </view>
  39. <view class="hclist" v-if="key==2">
  40. <van-uploader v-model="fileList" multiple :after-read="afterRead" />
  41. </view>
  42. <view class="hclist" v-if="key==3">
  43. <uni-forms ref="form" :model="checkform" labelWidth="80px">
  44. <uni-forms-item label="实际地类" name="nickName">
  45. <uni-data-select v-model="checkform.phonenumber" :localdata="range"></uni-data-select>
  46. </uni-forms-item>
  47. <uni-forms-item label="核查初判" name="phonenumber">
  48. <uni-data-select v-model="checkform.phonenumber" :localdata="range"></uni-data-select>
  49. </uni-forms-item>
  50. <uni-forms-item label="其它材料" name="email">
  51. <van-uploader v-model="checkform.fileList" multiple :after-read="afterRead" />
  52. </uni-forms-item>
  53. <uni-forms-item label="其它说明" name="sex" required>
  54. <uni-easyinput v-model="checkform.phonenumber" type="textarea" placeholder="请输入其它说明" />
  55. </uni-forms-item>
  56. </uni-forms>
  57. </view>
  58. </van-tab>
  59. </van-tabs>
  60. </van-sticky>
  61. <div class="btns">
  62. <button type="primary" @click="toggle">举证说明</button>
  63. <button type="primary" @click="affirm(0)">确认</button>
  64. <button type="primary" @click="affirm(1)">退回</button>
  65. <button type="primary" @click="save">保存</button>
  66. <button type="primary" @click="tj">提交</button>
  67. </div>
  68. <uni-popup ref="popup" background-color="#fff">
  69. <uni-popup-dialog :type="msgType" title="举证说明" :content="nowobj.notes"></uni-popup-dialog>
  70. </uni-popup>
  71. </view>
  72. </template>
  73. <script>
  74. import {
  75. getDkjbxx,
  76. getDkjbywy,
  77. getStep,
  78. hcWork,
  79. getHcInfo,
  80. tjWork,
  81. getTjInfo
  82. } from "@/api/dkjbxx.js";
  83. import {
  84. jbxxs,
  85. tdxzTable,
  86. } from "../config";
  87. export default {
  88. name: "list",
  89. data() {
  90. return {
  91. nowobj: {},
  92. active: 0,
  93. tabOptions: ['基本信息', '业务研判', '实地拍照', '核查信息'],
  94. loading: false,
  95. steps: [],
  96. jbxxs: jbxxs,
  97. tdxzTable: tdxzTable,
  98. activeName: "jbxx",
  99. infoObj: {},
  100. activities: [],
  101. //业务研判
  102. ywyptab: "1",
  103. sheets: [],
  104. //上传拍照
  105. fileList: [],
  106. checkform: {},
  107. range: [{
  108. value: 0,
  109. text: "篮球"
  110. },
  111. {
  112. value: 1,
  113. text: "足球"
  114. },
  115. {
  116. value: 2,
  117. text: "游泳"
  118. },
  119. ],
  120. };
  121. },
  122. mounted() {},
  123. methods: {
  124. handleClick(val) {
  125. this.nowobj = val
  126. let id = val.dkjdxxId
  127. getDkjbxx(id).then((res) => {
  128. this.infoObj = res.data;
  129. });
  130. getDkjbywy(id).then((res) => {
  131. if (res.data) {
  132. this.sheets = JSON.parse(res.data.sheetJson);
  133. this.ywyptab = this.sheets[0].sheet;
  134. }
  135. console.log(this.sheets);
  136. });
  137. getStep({
  138. dkjdxxId: id
  139. }).then((res) => {
  140. this.steps = res.data;
  141. });
  142. getHcInfo({
  143. dkid: id,
  144. auditflowStep: 'WYDC',
  145. auditflowId: '',
  146. fieldworkId: ''
  147. }).then((res) => {
  148. this.checkform = res.data;
  149. });
  150. getTjInfo({
  151. dkid: id,
  152. auditflowStep: 'WYTJ',
  153. auditflowId: '',
  154. fieldworkId: ''
  155. }).then((res) => {
  156. // this.tjinfo = res.data;
  157. });
  158. },
  159. returnList() {
  160. this.$emit('returnList')
  161. },
  162. reset() {
  163. },
  164. afterRead(files, detail) {
  165. // files.forEach(element => {
  166. // setTimeout(() => {
  167. // element.status = null;
  168. // }, 2000);
  169. // });
  170. },
  171. toggle() {
  172. this.$refs.popup.open('center')
  173. },
  174. affirm(confirmState) {
  175. uni.$globalData = this.nowobj
  176. this.$tab.navigateTo('/pages/index/common/edit?confirmState=' + confirmState)
  177. },
  178. },
  179. };
  180. </script>
  181. <style lang="scss">
  182. .details {
  183. width: 100%;
  184. .van-icon {
  185. position: absolute;
  186. right: 20rpx;
  187. top: 70rpx;
  188. width: 70rpx;
  189. line-height: 74rpx;
  190. font-size: 60rpx;
  191. }
  192. // position: relative;
  193. .tabs {
  194. margin-bottom: 20rpx;
  195. }
  196. .hclist {
  197. height: 30vh;
  198. overflow-x: hidden;
  199. overflow-y: auto;
  200. }
  201. .btns {
  202. width: 100%;
  203. position: absolute;
  204. bottom: 200rpx;
  205. display: flex;
  206. }
  207. }
  208. </style>