hcDetails.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <template>
  2. <view class="details">
  3. <view class="search">
  4. <uni-icons type="bars" size="30" @click="returnList"></uni-icons>
  5. </view>
  6. <scroll-view class="top-menu-view" scroll-x="true">
  7. <view class="menu-topic-view" v-for="(item, key) in tabOptions" :key="key" @click="active=key">
  8. <view :class="active==key ? 'menu-topic-act' : 'menu-topic'">
  9. <text class="menu-topic-text">{{item}}</text>
  10. <view class="menu-topic-bottom">
  11. <view class="menu-topic-bottom-color"></view>
  12. </view>
  13. </view>
  14. </view>
  15. </scroll-view>
  16. <!-- <van-sticky :offset-top="-10">
  17. <van-tabs sticky v-model="active" class="tabs">
  18. <van-tab v-for="(item, key) in tabOptions" :key="key" :title="item">
  19. </van-tab>
  20. </van-tabs>
  21. </van-sticky> -->
  22. <view>
  23. <view class="hclist" v-if="active==0">
  24. <view class="menu-list">
  25. <view class="list-cell list-cell-arrow" v-for="(item, i) in jbxxs" :key="i">
  26. <view class="menu-item-box">
  27. <view>{{item.name}}</view>
  28. <view class="text-right">{{infoObj[item.prop]}}</view>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- <van-cell v-for="(item, i) in jbxxs" :key="i" :title="item.name" :value="infoObj[item.prop]" /> -->
  33. </view>
  34. <view class="hclist" v-if="active==1">
  35. <scroll-view v-if="sheets.length" class="top-menu-view" scroll-x="true">
  36. <view class="menu-topic-view" v-for="ypitem in sheets" :key="ypitem.sheet"
  37. @click="ywyptab=ypitem.sheet">
  38. <view :class="ywyptab==ypitem.sheet ? 'menu-topic-act' : 'menu-topic'">
  39. <text class="menu-topic-text">{{ypitem.type}}</text>
  40. <view class="menu-topic-bottom">
  41. <view class="menu-topic-bottom-color"></view>
  42. </view>
  43. </view>
  44. </view>
  45. </scroll-view>
  46. <!-- <van-tabs sticky v-if="sheets.length" v-model="ywyptab">
  47. <van-tab v-for="ypitem in sheets" :key="ypitem.sheet" :title="ypitem.type" :name="ypitem.sheet">
  48. </van-tab>
  49. </van-tabs> -->
  50. <view class="swiper-item" v-for="ypitem in sheets" :key="ypitem.sheet">
  51. <view v-if="ywyptab==ypitem.sheet">
  52. <img :src="ypitem.photo" width="100%" />
  53. 压占{{ ypitem.type }}面积共{{ ypitem.mjj }}平方米
  54. <view class="list-cell">
  55. <uni-row>
  56. <uni-col :span="8" v-for="(item, i) in tdxzTable" :key="i">{{item.label}}</uni-col>
  57. </uni-row>
  58. </view>
  59. <view class="list-cell">
  60. <uni-row v-for="(row, index) in ypitem.data_list" :key="index">
  61. <uni-col :span="8" v-for="(item, i) in tdxzTable" :key="i">
  62. <div v-if="item.slot == 'ratio'">
  63. {{ ((row.yzmj / ypitem.yzmj) * 100).toFixed(2) }}%
  64. </div>
  65. <span v-else>{{ row[item.prop] }}</span>
  66. </uni-col>
  67. </uni-row>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="hclist" v-if="active==2">
  73. <view class="example-body">
  74. <uni-file-picker v-model="fileList" limit="9" title="最多选择9张图片"></uni-file-picker>
  75. </view>
  76. </view>
  77. <view class="hclist" v-if="active==3">
  78. <uni-forms ref="form" :model="checkform" labelWidth="80px">
  79. <uni-forms-item label="实际地类" name="nickName">
  80. <uni-data-select v-model="checkform.phonenumber" :localdata="range"></uni-data-select>
  81. </uni-forms-item>
  82. <uni-forms-item label="核查初判" name="phonenumber">
  83. <uni-data-select v-model="checkform.phonenumber" :localdata="range"></uni-data-select>
  84. </uni-forms-item>
  85. <uni-forms-item label="其它材料" name="email">
  86. <uni-file-picker v-model="checkform.fileList" title="添加照片或文件"></uni-file-picker>
  87. </uni-forms-item>
  88. <uni-forms-item label="其它说明" name="sex" required>
  89. <uni-easyinput v-model="checkform.phonenumber" type="textarea" placeholder="请输入其它说明" />
  90. </uni-forms-item>
  91. </uni-forms>
  92. </view>
  93. </view>
  94. <div class="btns">
  95. <button type="primary" size="mini" @click=" toggle">举证说明</button>
  96. <button type="primary" size="mini" :disabled=" !qrdis" @click="affirm(0)">确认</button>
  97. <button type="primary" size="mini" :disabled=" !qrdis" @click="affirm(1)">退回</button>
  98. <button type="primary" size="mini" @click="save">保存</button>
  99. <button type="primary" size="mini" :disabled=" !tjdis" @click="tj">提交</button>
  100. </div>
  101. <uni-popup ref="popup" background-color="#fff">
  102. <uni-popup-dialog type="info" title="举证说明" :content="nowobj.notes"></uni-popup-dialog>
  103. </uni-popup>
  104. </view>
  105. </template>
  106. <script>
  107. import {
  108. getDkjbxx,
  109. getDkjbywy,
  110. getStep,
  111. hcWork,
  112. getHcInfo,
  113. tjWork,
  114. getTjInfo
  115. } from "@/api/dkjbxx.js";
  116. import {
  117. jbxxs,
  118. tdxzTable,
  119. } from "../config";
  120. export default {
  121. name: "list",
  122. data() {
  123. return {
  124. nowobj: {},
  125. active: 0,
  126. tabOptions: ['基本信息', '业务研判', '实地拍照', '核查信息'],
  127. loading: false,
  128. steps: [],
  129. qrdis: false,
  130. tjdis: false,
  131. jbxxs: jbxxs,
  132. tdxzTable: tdxzTable,
  133. activeName: "jbxx",
  134. infoObj: {},
  135. activities: [],
  136. //业务研判
  137. ywyptab: "1",
  138. sheets: [],
  139. //上传拍照
  140. fileList: [],
  141. checkform: {},
  142. range: [{
  143. value: 0,
  144. text: "篮球"
  145. },
  146. {
  147. value: 1,
  148. text: "足球"
  149. },
  150. {
  151. value: 2,
  152. text: "游泳"
  153. },
  154. ],
  155. };
  156. },
  157. mounted() {},
  158. methods: {
  159. handleClick(val) {
  160. this.nowobj = val
  161. let id = val.dkjdxxId
  162. getDkjbxx(id).then((res) => {
  163. this.infoObj = res.data;
  164. });
  165. getDkjbywy(id).then((res) => {
  166. if (res.data) {
  167. this.sheets = JSON.parse(res.data.sheetJson);
  168. this.ywyptab = this.sheets[0].sheet;
  169. }
  170. console.log(this.sheets);
  171. });
  172. this.steps = [];
  173. getStep({
  174. dkjdxxId: id
  175. }).then((res) => {
  176. this.steps = res.data;
  177. this.qrdis = this.steps.find((x) => x.auditflowStep.includes('WYQR'))
  178. this.tjdis = this.steps.find((x) => x.auditflowStep.includes('TJ'))
  179. });
  180. getHcInfo({
  181. dkid: id,
  182. auditflowStep: 'WYDC',
  183. auditflowId: '',
  184. fieldworkId: ''
  185. }).then((res) => {
  186. this.checkform = res.data || {};
  187. });
  188. getTjInfo({
  189. dkid: id,
  190. auditflowStep: 'WYTJ',
  191. auditflowId: '',
  192. fieldworkId: ''
  193. }).then((res) => {
  194. // this.tjinfo = res.data;
  195. });
  196. },
  197. returnList() {
  198. this.$emit('returnList')
  199. },
  200. reset() {
  201. },
  202. afterRead(files, detail) {
  203. // files.forEach(element => {
  204. // setTimeout(() => {
  205. // element.status = null;
  206. // }, 2000);
  207. // });
  208. },
  209. toggle() {
  210. this.$refs.popup.open('center')
  211. },
  212. affirm(confirmState) {
  213. uni.$globalData = this.nowobj
  214. this.$tab.navigateTo('/pages/index/common/edit?confirmState=' + confirmState)
  215. },
  216. tj() {
  217. uni.$globalData = this.nowobj
  218. this.$tab.navigateTo('/pages/index/common/tjDialog')
  219. },
  220. },
  221. };
  222. </script>
  223. <style lang="scss">
  224. .details {
  225. width: 100%;
  226. .uni-icons {
  227. position: absolute;
  228. right: 20rpx;
  229. top: 70rpx;
  230. }
  231. // position: relative;
  232. .tabs {
  233. margin-bottom: 20rpx;
  234. }
  235. .hclist {
  236. height: 40vh;
  237. overflow-x: hidden;
  238. overflow-y: auto;
  239. background: #fff;
  240. padding: 10rpx;
  241. }
  242. .btns {
  243. width: 100%;
  244. position: absolute;
  245. bottom: 20rpx;
  246. display: flex;
  247. }
  248. }
  249. </style>
  250. <style scoped lang="scss">
  251. @import "./tabs.scss";
  252. .menu-list {
  253. margin: 0;
  254. }
  255. .custom-image-box {
  256. /* #ifndef APP-NVUE */
  257. display: flex;
  258. /* #endif */
  259. flex-direction: row;
  260. justify-content: space-between;
  261. align-items: center;
  262. }
  263. </style>