inspectionreportdetail.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048
  1. <!--
  2. * @Title:
  3. * @Description: 巡检填报详情
  4. * @Author: swp
  5. * @Date: 2022-08-24 10:49:21
  6. * @LastEditors:
  7. * @LastEditTime: 2022-08-24 10:49:21
  8. -->
  9. <template>
  10. <view class="container">
  11. <uni-section title="站点基础信息">
  12. <template v-slot:decoration>
  13. <view class="decoration"></view>
  14. </template>
  15. <uni-card title="测站名称">
  16. <view class="item-text-line">
  17. <text class="item-title">{{data.rtuName}}</text>/<text class="item-text">{{data.rtuCode}}</text>
  18. </view>
  19. </uni-card>
  20. <uni-card title="测站类型">
  21. <view class="item-text-line">
  22. <text class="item-text">{{getSiteKind}}</text>
  23. </view>
  24. </uni-card>
  25. <uni-card title="测站安装地址">
  26. <view class="item-text-line">
  27. <text class="item-text-block">{{data.locationDesc}}</text>
  28. </view>
  29. </uni-card>
  30. <uni-card title="经纬度">
  31. <view class="item-text-line">
  32. <text class="item-text">{{data.lng}}/{{data.lat}}</text>
  33. </view>
  34. </uni-card>
  35. <uni-card title="行政区划">
  36. <view class="item-text-line">
  37. <text class="item-text">{{getAreaName}}</text>
  38. </view>
  39. </uni-card>
  40. </uni-section>
  41. <uni-section title="站点状态检查信息">
  42. <template v-slot:decoration>
  43. <view class="decoration"></view>
  44. </template>
  45. <uni-card title="已选检查项">
  46. <view class="item-text-line">
  47. <text class="item-title select-text">{{getSiteCheckStatus}}</text>
  48. </view>
  49. </uni-card>
  50. <uni-card title="站点检查补充说明">
  51. <view class="item-text-line">
  52. <text class="item-text-block">{{data.siteCheckRemark}}</text>
  53. </view>
  54. </uni-card>
  55. <uni-card title="拍摄照片">
  56. <view v-if="data.siteCheckPhotos && data.siteCheckPhotos.length>0" class="view-flex-cc">
  57. <image v-for="(item, index) in data.siteCheckPhotos" :key="index" class="cover-image"
  58. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  59. </image>
  60. </view>
  61. </uni-card>
  62. </uni-section>
  63. <uni-section title="雨量站检查信息">
  64. <template v-slot:decoration>
  65. <view class="decoration"></view>
  66. </template>
  67. <uni-card title="已选检查项">
  68. <view class="item-text-line">
  69. <text class="item-title select-text">{{getRainSiteCheckItems}}</text>
  70. </view>
  71. </uni-card>
  72. <uni-card title="拍摄照片">
  73. <view v-if="data.rainSiteCheckPhotos && data.rainSiteCheckPhotos.length>0" class="view-flex-cc">
  74. <image v-for="(item, index) in data.rainSiteCheckPhotos" :key="index" class="cover-image"
  75. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  76. </image>
  77. </view>
  78. </uni-card>
  79. <uni-card title="巡检结果">
  80. <view class="item-text-line">
  81. <text v-if="data.rainSiteCheckResult==0" class="item-title error-text">异常</text>
  82. <text v-else class="item-title normally-text">正常</text>
  83. </view>
  84. </uni-card>
  85. <uni-card title="雨量站检查补充说明">
  86. <view class="item-text-line">
  87. <text class="item-text-block">{{data.rainSiteCheckRemark}}</text>
  88. </view>
  89. </uni-card>
  90. </uni-section>
  91. <uni-section title="水位站检查信息">
  92. <template v-slot:decoration>
  93. <view class="decoration"></view>
  94. </template>
  95. <uni-card title="已选检查项">
  96. <view class="item-text-line">
  97. <text class="item-title select-text">{{getWaterSiteCheckItems}}</text>
  98. </view>
  99. </uni-card>
  100. <uni-card v-if="data.waterSiteCheckPhotos.length>0" title="拍摄照片">
  101. <view class="view-flex-cc">
  102. <image v-for="(item, index) in data.waterSiteCheckPhotos" :key="index" class="cover-image"
  103. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  104. </image>
  105. </view>
  106. </uni-card>
  107. <uni-card title="巡检结果">
  108. <view class="item-text-line">
  109. <text v-if="data.waterSiteCheckResult==0" class="item-title error-text">异常</text>
  110. <text v-else class="item-title normally-text">正常</text>
  111. </view>
  112. </uni-card>
  113. <uni-card title="检查补充说明">
  114. <view class="item-text-line">
  115. <text class="item-text-block">{{data.waterSiteCheckRemark}}</text>
  116. </view>
  117. </uni-card>
  118. </uni-section>
  119. <uni-section title="墒情站检查信息">
  120. <template v-slot:decoration>
  121. <view class="decoration"></view>
  122. </template>
  123. <uni-card title="已选检查项">
  124. <view class="item-text-line">
  125. <text class="item-title select-text">{{getGroundSiteCheckItems}}</text>
  126. </view>
  127. </uni-card>
  128. <uni-card title="拍摄照片">
  129. <view v-if="data.groundSiteCheckPhotos && data.groundSiteCheckPhotos.length>0" class="view-flex-cc">
  130. <image v-for="(item, index) in data.groundSiteCheckPhotos" :key="index" class="cover-image"
  131. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  132. </image>
  133. </view>
  134. </uni-card>
  135. <uni-card title="巡检结果">
  136. <view class="item-text-line">
  137. <text v-if="data.groundSiteCheckResult==0" class="item-title error-text">异常</text>
  138. <text v-else class="item-title normally-text">正常</text>
  139. </view>
  140. </uni-card>
  141. <uni-card title="检查补充说明">
  142. <view class="item-text-line">
  143. <text class="item-text-block">{{data.groundSiteCheckRemark}}</text>
  144. </view>
  145. </uni-card>
  146. </uni-section>
  147. <uni-section title="其他设备检查信息">
  148. <template v-slot:decoration>
  149. <view class="decoration"></view>
  150. </template>
  151. <uni-card title="已选检查项">
  152. <view class="item-text-line">
  153. <text class="item-title select-text">{{getOthersEquipmentCheckItems}}</text>
  154. </view>
  155. </uni-card>
  156. <uni-card title="拍摄照片">
  157. <view v-if="data.othersEquipmentCheckPhotos && data.othersEquipmentCheckPhotos.length>0"
  158. class="view-flex-cc">
  159. <image v-for="(item, index) in data.othersEquipmentCheckPhotos" :key="index" class="cover-image"
  160. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  161. </image>
  162. </view>
  163. </uni-card>
  164. <uni-card title="巡检结果">
  165. <view class="item-text-line">
  166. <text v-if="data.otherEquipmentCheckResult==0" class="item-title error-text">异常</text>
  167. <text v-else class="item-title normally-text">正常</text>
  168. </view>
  169. </uni-card>
  170. <uni-card title="其他设备检查补充说明">
  171. <view class="item-text-line">
  172. <text class="item-text-block">{{data.othersEquipmentCheckRemark}}</text>
  173. </view>
  174. </uni-card>
  175. </uni-section>
  176. <uni-section title="设备更换信息">
  177. <template v-slot:decoration>
  178. <view class="decoration"></view>
  179. </template>
  180. <view style="min-height: 50px;">
  181. <uni-card v-if="data.equipmentsReplaceItems.items[0].checked" title="更换RTU">
  182. <view class="item-text-line">
  183. <text class="item-text-block">{{data.rtuModelRemark}}</text>
  184. </view>
  185. </uni-card>
  186. <uni-card title="RTU更换照片">
  187. <view v-if="data.rtuReplacePhotos && data.rtuReplacePhotos.length>0" class="view-flex-cc">
  188. <image v-for="(item, index) in data.rtuReplacePhotos" :key="index" class="cover-image"
  189. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  190. </image>
  191. </view>
  192. </uni-card>
  193. <uni-card v-if="data.equipmentsReplaceItems.items[1].checked" title="更换雨量计">
  194. <view class="item-text-line">
  195. <text class="item-text-block">{{data.rainSensorModelRemark}}</text>
  196. </view>
  197. </uni-card>
  198. <uni-card title="雨量计更换照片">
  199. <view v-if="data.rainSensorReplacePhotos&&data.rainSensorReplacePhotos.length>0"
  200. class="view-flex-cc">
  201. <image v-for="(item, index) in data.rainSensorReplacePhotos" :key="index" class="cover-image"
  202. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  203. </image>
  204. </view>
  205. </uni-card>
  206. <uni-card v-if="data.equipmentsReplaceItems.items[2].checked" title="更换水位计">
  207. <view class="item-text-line">
  208. <text class="item-text-block">{{data.waterSensorModelRemark}}</text>
  209. </view>
  210. </uni-card>
  211. <uni-card title="水位计更换照片">
  212. <view v-if="data.waterSensorReplacePhotos &&data.waterSensorReplacePhotos.length>0"
  213. class="view-flex-cc">
  214. <image v-for="(item, index) in data.waterSensorReplacePhotos" :key="index" class="cover-image"
  215. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  216. </image>
  217. </view>
  218. </uni-card>
  219. <uni-card v-if="data.equipmentsReplaceItems.items[3].checked" title="更换墒情计">
  220. <view class="item-text-line">
  221. <text class="item-text-block">{{data.groundSensorModelRemark}}</text>
  222. </view>
  223. </uni-card>
  224. <uni-card v-if="data.groundSensorReplacePhotos&&data.groundSensorReplacePhotos.length>0"
  225. title="墒情计更换照片">
  226. <view class="view-flex-cc">
  227. <image v-for="(item, index) in data.groundSensorReplacePhotos" :key="index" class="cover-image"
  228. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  229. </image>
  230. </view>
  231. </uni-card>
  232. <uni-card v-if="data.equipmentsReplaceItems.items[4].checked" title="更换蓄电池">
  233. <view class="item-text-line">
  234. <text class="item-text-block">{{data.batteryModelRemark}}</text>
  235. </view>
  236. </uni-card>
  237. <uni-card v-if="data.batteryReplacePhotos&&data.batteryReplacePhotos.length>0" title="蓄电池更换照片">
  238. <view class="view-flex-cc">
  239. <image v-for="(item, index) in data.batteryReplacePhotos" :key="index" class="cover-image"
  240. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  241. </image>
  242. </view>
  243. </uni-card>
  244. <uni-card v-if="data.equipmentsReplaceItems.items[5].checked" title="更换太阳能板">
  245. <view class="item-text-line">
  246. <text class="item-text-block">{{data.sunPowerModelRemark}}</text>
  247. </view>
  248. </uni-card>
  249. <uni-card v-if="data.sunPowerReplacePhotos&&data.sunPowerReplacePhotos.length>0" title="太阳能板更换照片">
  250. <view class="view-flex-cc">
  251. <image v-for="(item, index) in data.sunPowerReplacePhotos" :key="index" class="cover-image"
  252. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  253. </image>
  254. </view>
  255. </uni-card>
  256. <uni-card v-if="data.equipmentsReplaceItems.items[6].checked" title="更换充电控制器">
  257. <view class="item-text-line">
  258. <text class="item-text-block">{{data.batteryControlModelRemark}}</text>
  259. </view>
  260. </uni-card>
  261. <uni-card v-if="data.batteryControllerReplacePhotos&&data.batteryControllerReplacePhotos.length>0"
  262. title="充电控制器更换照片">
  263. <view class="view-flex-cc">
  264. <image v-for="(item, index) in data.batteryControllerReplacePhotos" :key="index"
  265. class="cover-image" mode="widthFix" style="width: 100%;" :src="toOss(item)">
  266. </image>
  267. </view>
  268. </uni-card>
  269. <uni-card v-if="data.equipmentsReplaceItems.items[7].checked" title="更换其他设备">
  270. <view class="item-text-line">
  271. <text class="item-text-block">{{data.otherEquipmentModelRemark}}</text>
  272. </view>
  273. </uni-card>
  274. <uni-card v-if="data.otherEquipmentReplacePhotos&&data.otherEquipmentReplacePhotos.length>0"
  275. title="其他设备更换照片">
  276. <view class="view-flex-cc">
  277. <image v-for="(item, index) in data.otherEquipmentReplacePhotos" :key="index"
  278. class="cover-image" mode="widthFix" style="width: 100%;" :src="toOss(item)">
  279. </image>
  280. </view>
  281. </uni-card>
  282. </view>
  283. </uni-section>
  284. <uni-section title="遗留问题补充说明">
  285. <template v-slot:decoration>
  286. <view class="decoration"></view>
  287. </template>
  288. <view class="item-text-line"
  289. style="padding-left: 10px;padding-right: 10px;padding-top: 10px;min-height: 50px;">
  290. <text class="item-text-block">{{data.inspectionRemainProblemsRemark}}</text>
  291. </view>
  292. </uni-section>
  293. <uni-section title="巡检工作留存照片">
  294. <template v-slot:decoration>
  295. <view class="decoration"></view>
  296. </template>
  297. <view style="min-height: 50px;">
  298. <uni-card v-if="data.inspectionWorkPhotos&&data.inspectionWorkPhotos.length>0" title="拍摄照片">
  299. <view class="view-flex-cc">
  300. <image v-for="(item, index) in data.inspectionWorkPhotos" :key="index" class="cover-image"
  301. mode="widthFix" style="width: 100%;" :src="toOss(item)">
  302. </image>
  303. </view>
  304. </uni-card>
  305. </view>
  306. </uni-section>
  307. </view>
  308. </template>
  309. <script>
  310. import {
  311. role
  312. } from "@/api/role.js";
  313. import http from '@/http/api.js';
  314. import {
  315. oss
  316. } from '@/common/setting';
  317. export default {
  318. components: {
  319. },
  320. props: {
  321. inspectionId: {
  322. type: String,
  323. required: true,
  324. },
  325. },
  326. data() {
  327. return {
  328. query: {},
  329. title: '巡检填报详情',
  330. data: {
  331. rtuCode: '',
  332. rtuName: '',
  333. isRain: false,
  334. isRiver: false,
  335. isRes: false,
  336. isGround: false,
  337. isCamera: false,
  338. lng: '',
  339. lat: '',
  340. adCity: '',
  341. adDist: '',
  342. locationDesc: '',
  343. //站点状态检查项
  344. siteCheckStatus: {
  345. items: [{
  346. 'id': '0',
  347. 'dictValue': '水毁'
  348. }, {
  349. 'id': '1',
  350. 'dictValue': '丢失'
  351. }, {
  352. 'id': '2',
  353. 'dictValue': '损坏'
  354. }, {
  355. 'id': '3',
  356. 'dictValue': '正常'
  357. }],
  358. current: 3
  359. },
  360. siteCheckPhotos: [],
  361. siteCheckRemark: '',
  362. //雨量站检查数据
  363. rainSiteCheckItems: {
  364. items: [{
  365. 'id': '0',
  366. 'checked': false,
  367. 'dictValue': '故障排查'
  368. }, {
  369. 'id': '1',
  370. 'checked': false,
  371. 'dictValue': '清理堵塞'
  372. }, {
  373. 'id': '2',
  374. 'checked': false,
  375. 'dictValue': '雨量计校核'
  376. }],
  377. current: 0
  378. },
  379. rainSiteCheckPhotos: [],
  380. rainSiteCheckResult: 1,
  381. rainSiteCheckRemark: '',
  382. //水位站检查数据
  383. waterSiteCheckItems: {
  384. items: [{
  385. 'id': '0',
  386. 'checked': false,
  387. 'dictValue': '故障排查'
  388. }, {
  389. 'id': '1',
  390. 'checked': false,
  391. 'dictValue': '水位计校核'
  392. }],
  393. current: 0
  394. },
  395. waterSiteCheckPhotos: [],
  396. waterSiteCheckResult: 1,
  397. waterSiteCheckRemark: '',
  398. //墒情站检查数据
  399. groundSiteCheckItems: {
  400. items: [{
  401. 'id': '0',
  402. 'checked': false,
  403. 'dictValue': '故障排查'
  404. }, {
  405. 'id': '1',
  406. 'checked': false,
  407. 'dictValue': '墒情计校核'
  408. }],
  409. current: 0
  410. },
  411. groundSiteCheckPhotos: [],
  412. groundSiteCheckRemark: '',
  413. groundSiteCheckResult: 1,
  414. //其他设备检查
  415. othersEquipmentCheckItems: {
  416. items: [{
  417. 'id': '0',
  418. 'checked': false,
  419. 'dictValue': '设备接地检测'
  420. }, {
  421. 'id': '1',
  422. 'checked': false,
  423. 'dictValue': '电源电压检测'
  424. }, {
  425. 'id': '2',
  426. 'checked': false,
  427. 'dictValue': '太阳能板检查'
  428. }, {
  429. 'id': '3',
  430. 'checked': false,
  431. 'dictValue': '蓄电池检查'
  432. }, {
  433. 'id': '4',
  434. 'checked': false,
  435. 'dictValue': '网络通信检查'
  436. }],
  437. current: 0
  438. },
  439. othersEquipmentCheckPhotos: [],
  440. othersEquipmentCheckRemark: '',
  441. otherEquipmentCheckResult: 1,
  442. //设备替换
  443. equipmentsReplaceItems: {
  444. items: [{
  445. 'id': '0',
  446. 'checked': false,
  447. 'dictValue': 'RTU'
  448. }, {
  449. 'id': '1',
  450. 'checked': false,
  451. 'dictValue': '雨量计'
  452. }, {
  453. 'id': '2',
  454. 'checked': false,
  455. 'dictValue': '水位计'
  456. }, {
  457. 'id': '3',
  458. 'checked': false,
  459. 'dictValue': '墒情计'
  460. }, {
  461. 'id': '4',
  462. 'checked': false,
  463. 'dictValue': '蓄电池'
  464. }, {
  465. 'id': '5',
  466. 'checked': false,
  467. 'dictValue': '太阳能板'
  468. }, {
  469. 'id': '6',
  470. 'checked': false,
  471. 'dictValue': '充电控制器'
  472. }, {
  473. 'id': '7',
  474. 'checked': false,
  475. 'dictValue': '其他'
  476. }],
  477. current: 0
  478. },
  479. rtuModelRemark: '',
  480. rtuReplacePhotos: [],
  481. rainSensorModelRemark: '',
  482. rainSensorReplacePhotos: [],
  483. waterSensorModelRemark: '',
  484. waterSensorReplacePhotos: [],
  485. groundSensorModelRemark: '',
  486. groundSensorReplacePhotos: [],
  487. batteryModelRemark: '',
  488. batteryReplacePhotos: [],
  489. sunPowerModelRemark: '',
  490. sunPowerReplacePhotos: [],
  491. batteryControlModelRemark: '',
  492. batteryControlReplacePhotos: [],
  493. otherEquipmentModelRemark: '',
  494. otherEquipmentReplacePhotos: [],
  495. //巡检遗留问题描述
  496. inspectionRemainProblemsRemark: '',
  497. //工作留存数据
  498. inspectionWorkPhotos: [],
  499. },
  500. }
  501. },
  502. onLoad(options) {
  503. console.log("ddddd onLoad")
  504. },
  505. onShow() {
  506. console.log("ddd onShow")
  507. },
  508. created() {
  509. console.log("dddd created")
  510. console.log("id " + this.inspectionId)
  511. let params = {};
  512. params['id'] = this.inspectionId;
  513. console.log("id " + this.inspectionId)
  514. this.getDetail(params);
  515. },
  516. computed: {
  517. getSiteKind() {
  518. let htmltext = '';
  519. if (this.data.isRain === 1) {
  520. htmltext = htmltext + "雨量站";
  521. }
  522. if (this.data.isRiver == 1 || this.data.isRes == 1) {
  523. if (htmltext.length > 0) {
  524. htmltext = htmltext + ' / ';
  525. }
  526. htmltext = htmltext + '水位站';
  527. }
  528. if (this.data.isGround == 1) {
  529. if (htmltext.length > 0) {
  530. htmltext = htmltext + ' / ';
  531. }
  532. htmltext = htmltext + '墒情站';
  533. }
  534. if (this.data.isVideo == 1) {
  535. if (htmltext.length > 0) {
  536. htmltext = htmltext + ' / ';
  537. }
  538. htmltext = htmltext + '视频站';
  539. }
  540. return htmltext;
  541. },
  542. getAreaName() {
  543. let htmltext = '';
  544. if (this.data.adCity) {
  545. htmltext = htmltext + this.data.adCity;
  546. }
  547. if (this.data.adDist) {
  548. if (htmltext.length > 0) {
  549. htmltext = htmltext + ' / ';
  550. }
  551. htmltext = htmltext + this.data.adDist;
  552. }
  553. return htmltext;
  554. },
  555. getSiteCheckStatus() {
  556. return this.data.siteCheckStatus.items[this.data.siteCheckStatus.current].dictValue;
  557. },
  558. getRainSiteCheckItems() {
  559. //console.log(JSON.stringify(this.data.rainSiteCheckItems))
  560. let text = '';
  561. for (let i = 0; i < this.data.rainSiteCheckItems.items.length; i++) {
  562. if (this.data.rainSiteCheckItems.items[i].checked) {
  563. if (text.length > 0) {
  564. text = text + ' / ';
  565. }
  566. text = text + this.data.rainSiteCheckItems.items[i].dictValue;
  567. }
  568. }
  569. return text;
  570. },
  571. getWaterSiteCheckItems() {
  572. let text = '';
  573. for (let i = 0; i < this.data.waterSiteCheckItems.items.length; i++) {
  574. if (this.data.waterSiteCheckItems.items[i].checked) {
  575. if (text.length > 0) {
  576. text = text + ' / ';
  577. }
  578. text = text + this.data.waterSiteCheckItems.items[i].dictValue;
  579. }
  580. }
  581. return text;
  582. },
  583. getGroundSiteCheckItems() {
  584. let text = '';
  585. for (let i = 0; i < this.data.groundSiteCheckItems.items.length; i++) {
  586. if (this.data.groundSiteCheckItems.items[i].checked) {
  587. if (text.length > 0) {
  588. text = text + ' / ';
  589. }
  590. text = text + this.data.groundSiteCheckItems.items[i].dictValue;
  591. }
  592. }
  593. return text;
  594. },
  595. getOthersEquipmentCheckItems() {
  596. let text = '';
  597. for (let i = 0; i < this.data.othersEquipmentCheckItems.items.length; i++) {
  598. if (this.data.othersEquipmentCheckItems.items[i].checked) {
  599. if (text.length > 0) {
  600. text = text + ' / ';
  601. }
  602. text = text + this.data.othersEquipmentCheckItems.items[i].dictValue;
  603. }
  604. }
  605. return text;
  606. },
  607. },
  608. methods: {
  609. toOss(path) {
  610. return oss + path;
  611. },
  612. toBack() {
  613. uni.navigateBack({
  614. delta: 1
  615. })
  616. },
  617. getDetail(params = {}) {
  618. console.log(JSON.stringify(params))
  619. let that = this;
  620. this.query = {};
  621. Object.assign(this.query, params);
  622. console.log(JSON.stringify(this.query))
  623. http.request({
  624. url: '/galaxy-business/equipment/inspection/report/detail',
  625. method: 'GET',
  626. params: this.query
  627. }).then(res => {
  628. if (res.success) {
  629. that.data.rtuName = res.data['rtuName'];
  630. that.data.rtuCode = res.data['rtuCode'];
  631. that.data.isRain = res.data['isRain'];
  632. that.data.isRiver = res.data['isRiver'];
  633. that.data.isRes = res.data['isRes'];
  634. that.data.isGround = res.data['isGround'];
  635. that.data.lng = res.data['lng'];
  636. that.data.lat = res.data['lat'];
  637. that.data.adCity = res.data['adCity'];
  638. that.data.adDist = res.data['adDist'];
  639. that.data.locationDesc = res.data['locationDesc'];
  640. that.data.siteCheckStatus.current = Number(res.data['siteCheckItem']);
  641. that.data.siteCheckRemark = res.data['siteCheckRemark'];
  642. that.data.siteCheckPhotoCount = 0;
  643. that.data.siteCheckPhotos = [];
  644. let photos = res.data['siteCheckPhotos'];
  645. if (null != photos && photos.length > 0) {
  646. let photoList = photos.split(",");
  647. that.data.siteCheckPhotos = photoList;
  648. //that.data.siteCheckPhotoCount = photoList.length;
  649. }
  650. //雨量站检查
  651. let items = res.data['rainSiteCheckItem'];
  652. if (null != items && items.length > 0) {
  653. let itemList = items.split(",");
  654. that.data.rainSiteCheckItems.items[0].checked = (itemList[0] == 0) ? false : true;
  655. that.data.rainSiteCheckItems.items[1].checked = (itemList[1] == 0) ? false : true;
  656. that.data.rainSiteCheckItems.items[2].checked = (itemList[2] == 0) ? false : true;
  657. }
  658. that.data.rainSiteCheckResult = res.data['rainSiteCheckResult'];
  659. //that.data.rainSiteCheckPhotoCount = 0;
  660. that.data.rainSiteCheckPhotos = [];
  661. photos = res.data['rainSiteCheckPhotos'];
  662. if (null != photos && photos.length > 0) {
  663. let photoList = photos.split(",");
  664. that.data.rainSiteCheckPhotos = photoList;
  665. //that.data.rainSiteCheckPhotoCount = photoList.length;
  666. }
  667. that.data.rainSiteCheckRemark = res.data['rainSiteCheckRemark'];
  668. //水位站检查
  669. items = res.data['waterSiteCheckItem'];
  670. if (null != items && items.length > 0) {
  671. let itemList = items.split(",");
  672. that.data.waterSiteCheckItems.items[0].checked = (itemList[0] == 0) ? false : true;
  673. that.data.waterSiteCheckItems.items[1].checked = (itemList[1] == 0) ? false : true;
  674. }
  675. //that.data.waterSiteCheckPhotoCount = 0;
  676. that.data.waterSiteCheckPhotos = [];
  677. photos = res.data['waterSiteCheckPhotos'];
  678. if (null != photos && photos.length > 0) {
  679. let photoList = photos.split(",");
  680. that.data.waterSiteCheckPhotos = photoList;
  681. //that.data.waterSiteCheckPhotoCount = photoList.length;
  682. }
  683. that.data.waterSiteCheckRemark = res.data['waterSiteCheckRemark'];
  684. that.data.waterSiteCheckResult = res.data['waterSiteCheckResult'];
  685. items = res.data['groundSiteCheckItem'];
  686. if (null != items && items.length > 0) {
  687. let itemList = items.split(",");
  688. that.data.groundSiteCheckItems.items[0].checked = itemList[0] == 0 ? false : true;
  689. that.data.groundSiteCheckItems.items[1].checked = itemList[1] == 0 ? false : true;
  690. }
  691. //that.data.groundSiteCheckPhotoCount = 0;
  692. that.data.groundSiteCheckPhotos = [];
  693. photos = res.data['groundSiteCheckPhotos'];
  694. if (null != photos && photos.length > 0) {
  695. let photoList = photos.split(",");
  696. that.data.groundSiteCheckPhotos = photoList;
  697. //that.data.groundSiteCheckPhotoCount = photoList.length;
  698. }
  699. that.data.groundSiteCheckRemark = res.data['groundSiteCheckRemark'];
  700. that.data.groundSiteCheckResult = res.data['groundSiteCheckResult'];
  701. items = res.data['otherEquipmentCheckItem'];
  702. if (null != items && items.length > 0) {
  703. let itemList = items.split(",");
  704. that.data.othersEquipmentCheckItems.items[0].checked = itemList[0] == 0 ? false : true;
  705. that.data.othersEquipmentCheckItems.items[1].checked = itemList[1] == 0 ? false : true;
  706. that.data.othersEquipmentCheckItems.items[2].checked = itemList[2] == 0 ? false : true;
  707. that.data.othersEquipmentCheckItems.items[3].checked = itemList[3] == 0 ? false : true;
  708. that.data.othersEquipmentCheckItems.items[4].checked = itemList[4] == 0 ? false : true;
  709. }
  710. //that.data.othersEquipmentCheckPhotoCount = 0;
  711. that.data.othersEquipmentCheckPhotos = [];
  712. photos = res.data['otherEquipmentCheckPhotos'];
  713. if (null != photos && photos.length > 0) {
  714. let photoList = photos.split(",");
  715. that.data.othersEquipmentCheckPhotos = photoList;
  716. //that.data.othersEquipmentCheckPhotoCount = photoList.length;
  717. }
  718. that.data.othersEquipmentCheckRemark = res.data['otherEquipmentCheckRemark'];
  719. that.data.otherEquipmentCheckResult = res.data['otherEquipmentCheckResult'];
  720. that.data.equipmentsReplaceItems.items[0].checked = res.data['rtuReplace'] == 0 ? false :
  721. true;
  722. that.data.equipmentsReplaceItems.items[1].checked = res.data['rainSensorReplace'] == 0 ?
  723. false :
  724. true;
  725. that.data.equipmentsReplaceItems.items[2].checked = res.data['waterSensorReplace'] == 0 ?
  726. false :
  727. true;
  728. that.data.equipmentsReplaceItems.items[3].checked = res.data['groundSensorReplace'] == 0 ?
  729. false : true;
  730. that.data.equipmentsReplaceItems.items[4].checked = res.data['batteryReplace'] == 0 ?
  731. false :
  732. true;
  733. that.data.equipmentsReplaceItems.items[5].checked = res.data['sunPowerReplace'] == 0 ?
  734. false :
  735. true;
  736. that.data.equipmentsReplaceItems.items[6].checked = res.data['batteryControllerReplace'] ==
  737. 0 ?
  738. false : true;
  739. that.data.equipmentsReplaceItems.items[7].checked = res.data['otherEquipmentReplace'] ==
  740. 0 ?
  741. false : true;
  742. that.data.rtuModelRemark = res.data['rtuModelRemark'];
  743. that.data.rtuReplacePhotos = [];
  744. photos = res.data['rtuReplacePhotos'];
  745. if (null != photos && photos.length > 0) {
  746. let photoList = photos.split(",");
  747. that.data.rtuReplacePhotos = photoList;
  748. //that.data.inspectionWorkPhotoCount = photoList.length;
  749. }
  750. that.data.inspectionRemainProblemsRemark = res.data['remainQuestion'];
  751. that.data.rtuReplacePhotos = [];
  752. photos = res.data['rtuReplacePhotos'];
  753. if (null != photos && photos.length > 0) {
  754. let photoList = photos.split(",");
  755. that.data.rtuReplacePhotos = photoList;
  756. //that.data.inspectionWorkPhotoCount = photoList.length;
  757. }
  758. that.data.rainSensorModelRemark = res.data['rainSensorModelRemark'];
  759. that.data.rainSensorReplacePhotos = [];
  760. photos = res.data['rainSensorReplacePhotos'];
  761. if (null != photos && photos.length > 0) {
  762. let photoList = photos.split(",");
  763. that.data.rainSensorReplacePhotos = photoList;
  764. //that.data.inspectionWorkPhotoCount = photoList.length;
  765. }
  766. that.data.waterSensorModelRemark = res.data['waterSensorModelRemark'];
  767. that.data.waterSensorReplacePhotos = [];
  768. photos = res.data['waterSensorReplacePhotos'];
  769. if (null != photos && photos.length > 0) {
  770. let photoList = photos.split(",");
  771. that.data.waterSensorReplacePhotos = photoList;
  772. //that.data.inspectionWorkPhotoCount = photoList.length;
  773. }
  774. that.data.groundSensorModelRemark = res.data['groundSensorModelRemark'];
  775. that.data.groundSensorReplacePhotos = [];
  776. photos = res.data['groundSensorReplacePhotos'];
  777. if (null != photos && photos.length > 0) {
  778. let photoList = photos.split(",");
  779. that.data.groundSensorReplacePhotos = photoList;
  780. //that.data.inspectionWorkPhotoCount = photoList.length;
  781. }
  782. that.data.batteryModelRemark = res.data['batteryModelRemark'];
  783. that.data.batteryReplacePhotos = [];
  784. photos = res.data['batteryReplacePhotos'];
  785. if (null != photos && photos.length > 0) {
  786. let photoList = photos.split(",");
  787. that.data.batteryReplacePhotos = photoList;
  788. //that.data.inspectionWorkPhotoCount = photoList.length;
  789. }
  790. that.data.sunPowerModelRemark = res.data['sunPowerModelRemark'];
  791. that.data.sunPowerReplacePhotos = [];
  792. photos = res.data['sunPowerReplacePhotos'];
  793. if (null != photos && photos.length > 0) {
  794. let photoList = photos.split(",");
  795. that.data.sunPowerReplacePhotos = photoList;
  796. //that.data.inspectionWorkPhotoCount = photoList.length;
  797. }
  798. that.data.batteryControlModelRemark = res.data['batteryControllerModelRemark'];
  799. that.data.batteryControllerReplacePhotos = [];
  800. photos = res.data['batteryControllerReplacePhotos'];
  801. if (null != photos && photos.length > 0) {
  802. let photoList = photos.split(",");
  803. that.data.batteryControllerReplacePhotos = photoList;
  804. //that.data.inspectionWorkPhotoCount = photoList.length;
  805. }
  806. that.data.otherEquipmentModelRemark = res.data['otherEquipmentModelRemark'];
  807. that.data.otherEquipmentReplacePhotos = [];
  808. photos = res.data['otherEquipmentReplacePhotos'];
  809. if (null != photos && photos.length > 0) {
  810. let photoList = photos.split(",");
  811. that.data.otherEquipmentReplacePhotos = photoList;
  812. //that.data.inspectionWorkPhotoCount = photoList.length;
  813. }
  814. //that.data.inspectionWorkPhotoCount = 0;
  815. that.data.inspectionWorkPhotos = [];
  816. photos = res.data['inspectionWorkPhotos'];
  817. if (null != photos && photos.length > 0) {
  818. let photoList = photos.split(",");
  819. that.data.inspectionWorkPhotos = photoList;
  820. //that.data.inspectionWorkPhotoCount = photoList.length;
  821. }
  822. that.data.inspectionRemainProblemsRemark = res.data['remainQuestion'];
  823. }
  824. }).catch(err => {
  825. console.log(err)
  826. })
  827. },
  828. }
  829. }
  830. </script>
  831. <style>
  832. /* page {
  833. background-color: rgb(240, 242, 244);
  834. } */
  835. </style>
  836. <style lang="scss" scoped>
  837. .uni-body {
  838. font-size: 0.7rem;
  839. }
  840. .decoration {
  841. width: 6px;
  842. height: 6px;
  843. margin-right: 4px;
  844. border-radius: 50%;
  845. background-color: cadetblue;
  846. }
  847. .view-flex-rs {
  848. display: flex;
  849. flex-direction: row;
  850. justify-content: flex-start;
  851. align-items: center;
  852. }
  853. .view-flex-rs-flex-wrap {
  854. display: flex;
  855. flex-direction: row;
  856. justify-content: flex-start;
  857. flex-wrap: wrap;
  858. }
  859. .view-flex-rc {
  860. display: flex;
  861. flex-direction: row;
  862. justify-content: center;
  863. align-items: center;
  864. }
  865. .view-flex-re {
  866. display: flex;
  867. flex-direction: row;
  868. justify-content: flex-end;
  869. align-items: center;
  870. }
  871. .view-flex-cs {
  872. display: flex;
  873. flex-direction: column;
  874. justify-content: flex-start;
  875. align-items: center;
  876. }
  877. .view-flex-cc {
  878. display: flex;
  879. flex-direction: column;
  880. justify-content: center;
  881. align-items: center;
  882. }
  883. .view-flex-ce {
  884. display: flex;
  885. flex-direction: column;
  886. justify-content: flex-end;
  887. align-items: center;
  888. }
  889. .cell-hover-class {
  890. background-color: rgb(235, 237, 238);
  891. }
  892. .view-flex-ce {
  893. display: flex;
  894. flex-direction: column;
  895. justify-content: flex-end;
  896. }
  897. .line-body {
  898. padding-left: 10px;
  899. padding-right: 10px;
  900. }
  901. .item-text-line {
  902. width: 100%;
  903. display: flex;
  904. flex-direction: row;
  905. justify-content: flex-start;
  906. .item-title {
  907. font-size: 0.7rem;
  908. font-weight: bold;
  909. }
  910. .item-text {
  911. overflow: hidden;
  912. margin-left: 5px;
  913. font-size: 0.7rem;
  914. white-space: nowrap;
  915. text-overflow: ellipsis;
  916. }
  917. .item-text-block {
  918. margin-left: 5px;
  919. font-size: 0.7rem;
  920. word-wrap: break-word;
  921. word-break: normal;
  922. }
  923. .error-text {
  924. color: #FF0000;
  925. }
  926. .normally-text {
  927. color: darkgreen;
  928. }
  929. .select-text {
  930. color: royalblue;
  931. }
  932. }
  933. .required-star {
  934. color: #FF0000;
  935. font-size: 15px;
  936. width: 20px;
  937. text-align: center;
  938. padding-left: 0px;
  939. padding-right: 2px;
  940. }
  941. .item-title {
  942. color: #909399;
  943. font-size: 15px;
  944. }
  945. .mline-text {
  946. padding-left: 2px;
  947. width: 100%;
  948. /* background-color:#909399; */
  949. height: 70px;
  950. border: 1px solid #FF5A5F;
  951. border-radius: 5px;
  952. }
  953. .img-container {
  954. margin-bottom: 0px;
  955. width: 100px;
  956. height: 100px;
  957. .note-image-box {
  958. margin-top: 0px;
  959. display: flex;
  960. flex-wrap: wrap;
  961. padding: 10px;
  962. .note-image-item {
  963. position: relative;
  964. width: 100%;
  965. height: 0;
  966. padding-top: 100%;
  967. box-sizing: border-box;
  968. // background-color: #18B566;
  969. .close-icon {
  970. display: flex;
  971. justify-content: center;
  972. align-items: center;
  973. position: absolute;
  974. right: 0px;
  975. top: 0px;
  976. width: 22px;
  977. height: 22px;
  978. border-radius: 50%;
  979. background-color: #d5d5d5;
  980. z-index: 2;
  981. }
  982. .image-box {
  983. display: flex;
  984. justify-content: center;
  985. align-items: center;
  986. position: absolute;
  987. top: 0px;
  988. right: 0px;
  989. border: 0px;
  990. left: 0px;
  991. border: 1px #eee solid;
  992. border-radius: 5px;
  993. overflow: hidden;
  994. width: 99%;
  995. height: 99%;
  996. }
  997. }
  998. }
  999. }
  1000. .input-body {
  1001. background-color: #fff;
  1002. padding: 10px;
  1003. }
  1004. </style>