inspection-report-detail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  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="wrap">
  11. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  12. @clickLeft="toBack">
  13. <view class="nav-title">
  14. <text>{{title}}</text>
  15. </view>
  16. </uni-nav-bar>
  17. <view class="container">
  18. <uni-card title="处理人">
  19. <view class="item-text-line">
  20. <text class="item-title">{{dataInfo.servicePersonName}}</text>
  21. </view>
  22. </uni-card>
  23. <uni-card title="处理时间">
  24. <view class="item-text-line">
  25. <text class="item-title">{{dataInfo.createTime}}</text>
  26. </view>
  27. </uni-card>
  28. <uni-card title="巡检内容">
  29. <view class="item-text-line">
  30. <text class="item-title">{{dataInfo.inspectionDesc}}</text>
  31. </view>
  32. </uni-card>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import {
  38. role
  39. } from "@/api/role.js";
  40. import http from '@/http/api.js';
  41. import {
  42. oss
  43. } from '@/common/setting';
  44. export default {
  45. components: {
  46. },
  47. props: {
  48. // id: {
  49. // type: String,
  50. // required: true,
  51. // },
  52. },
  53. data() {
  54. return {
  55. query: {},
  56. title: '巡检详情',
  57. dataInfo: {
  58. },
  59. data: {
  60. rtuCode: '',
  61. rtuName: '',
  62. isRain: false,
  63. isRiver: false,
  64. isRes: false,
  65. isGround: false,
  66. isCamera: false,
  67. lng: '',
  68. lat: '',
  69. adCity: '',
  70. adDist: '',
  71. locationDesc: '',
  72. //站点状态检查项
  73. siteCheckStatus: {
  74. items: [{
  75. 'id': '0',
  76. 'dictValue': '水毁'
  77. }, {
  78. 'id': '1',
  79. 'dictValue': '丢失'
  80. }, {
  81. 'id': '2',
  82. 'dictValue': '损坏'
  83. }, {
  84. 'id': '3',
  85. 'dictValue': '正常'
  86. }],
  87. current: 3
  88. },
  89. siteCheckPhotos: [],
  90. siteCheckRemark: '',
  91. //雨量站检查数据
  92. rainSiteCheckItems: {
  93. items: [{
  94. 'id': '0',
  95. 'checked': false,
  96. 'dictValue': '故障排查'
  97. }, {
  98. 'id': '1',
  99. 'checked': false,
  100. 'dictValue': '清理堵塞'
  101. }, {
  102. 'id': '2',
  103. 'checked': false,
  104. 'dictValue': '雨量计校核'
  105. }],
  106. current: 0
  107. },
  108. rainSiteCheckPhotos: [],
  109. rainSiteCheckResult: 1,
  110. rainSiteCheckRemark: '',
  111. //水位站检查数据
  112. waterSiteCheckItems: {
  113. items: [{
  114. 'id': '0',
  115. 'checked': false,
  116. 'dictValue': '故障排查'
  117. }, {
  118. 'id': '1',
  119. 'checked': false,
  120. 'dictValue': '水位计校核'
  121. }],
  122. current: 0
  123. },
  124. waterSiteCheckPhotos: [],
  125. waterSiteCheckResult: 1,
  126. waterSiteCheckRemark: '',
  127. //墒情站检查数据
  128. groundSiteCheckItems: {
  129. items: [{
  130. 'id': '0',
  131. 'checked': false,
  132. 'dictValue': '故障排查'
  133. }, {
  134. 'id': '1',
  135. 'checked': false,
  136. 'dictValue': '墒情计校核'
  137. }],
  138. current: 0
  139. },
  140. groundSiteCheckPhotos: [],
  141. groundSiteCheckRemark: '',
  142. groundSiteCheckResult: 1,
  143. //其他设备检查
  144. othersEquipmentCheckItems: {
  145. items: [{
  146. 'id': '0',
  147. 'checked': false,
  148. 'dictValue': '设备接地检测'
  149. }, {
  150. 'id': '1',
  151. 'checked': false,
  152. 'dictValue': '电源电压检测'
  153. }, {
  154. 'id': '2',
  155. 'checked': false,
  156. 'dictValue': '太阳能板检查'
  157. }, {
  158. 'id': '3',
  159. 'checked': false,
  160. 'dictValue': '蓄电池检查'
  161. }, {
  162. 'id': '4',
  163. 'checked': false,
  164. 'dictValue': '网络通信检查'
  165. }],
  166. current: 0
  167. },
  168. othersEquipmentCheckPhotos: [],
  169. othersEquipmentCheckRemark: '',
  170. otherEquipmentCheckResult: 1,
  171. //设备替换
  172. equipmentsReplaceItems: {
  173. items: [{
  174. 'id': '0',
  175. 'checked': false,
  176. 'dictValue': 'RTU'
  177. }, {
  178. 'id': '1',
  179. 'checked': false,
  180. 'dictValue': '雨量计'
  181. }, {
  182. 'id': '2',
  183. 'checked': false,
  184. 'dictValue': '水位计'
  185. }, {
  186. 'id': '3',
  187. 'checked': false,
  188. 'dictValue': '墒情计'
  189. }, {
  190. 'id': '4',
  191. 'checked': false,
  192. 'dictValue': '蓄电池'
  193. }, {
  194. 'id': '5',
  195. 'checked': false,
  196. 'dictValue': '太阳能板'
  197. }, {
  198. 'id': '6',
  199. 'checked': false,
  200. 'dictValue': '充电控制器'
  201. }, {
  202. 'id': '7',
  203. 'checked': false,
  204. 'dictValue': '其他'
  205. }],
  206. current: 0
  207. },
  208. rtuModelRemark: '',
  209. rtuReplacePhotos: [],
  210. rainSensorModelRemark: '',
  211. rainSensorReplacePhotos: [],
  212. waterSensorModelRemark: '',
  213. waterSensorReplacePhotos: [],
  214. groundSensorModelRemark: '',
  215. groundSensorReplacePhotos: [],
  216. batteryModelRemark: '',
  217. batteryReplacePhotos: [],
  218. sunPowerModelRemark: '',
  219. sunPowerReplacePhotos: [],
  220. batteryControlModelRemark: '',
  221. batteryControlReplacePhotos: [],
  222. otherEquipmentModelRemark: '',
  223. otherEquipmentReplacePhotos: [],
  224. //巡检遗留问题描述
  225. inspectionRemainProblemsRemark: '',
  226. //工作留存数据
  227. inspectionWorkPhotos: [],
  228. id: '',
  229. },
  230. }
  231. },
  232. onLoad(options) {
  233. // console.log("ddddd onLoad")
  234. let params = {};
  235. params['id'] = options.id;
  236. // console.log("id " + this.inspectionId)
  237. this.getDetail(params);
  238. },
  239. onShow() {
  240. // console.log("ddd onShow")
  241. },
  242. created() {
  243. // console.log("dddd created")
  244. // console.log("id " + this.inspectionId)
  245. // let params = {};
  246. // params['id'] = this.inspectionId;
  247. // console.log("id " + this.inspectionId)
  248. // this.getDetail(params);
  249. },
  250. computed: {
  251. getSiteKind() {
  252. let htmltext = '';
  253. if (this.data.isRain === 1) {
  254. htmltext = htmltext + "雨量站";
  255. }
  256. if (this.data.isRiver == 1 || this.data.isRes == 1) {
  257. if (htmltext.length > 0) {
  258. htmltext = htmltext + ' / ';
  259. }
  260. htmltext = htmltext + '水位站';
  261. }
  262. if (this.data.isGround == 1) {
  263. if (htmltext.length > 0) {
  264. htmltext = htmltext + ' / ';
  265. }
  266. htmltext = htmltext + '墒情站';
  267. }
  268. if (this.data.isVideo == 1) {
  269. if (htmltext.length > 0) {
  270. htmltext = htmltext + ' / ';
  271. }
  272. htmltext = htmltext + '视频站';
  273. }
  274. return htmltext;
  275. },
  276. getAreaName() {
  277. let htmltext = '';
  278. if (this.data.adCity) {
  279. htmltext = htmltext + this.data.adCity;
  280. }
  281. if (this.data.adDist) {
  282. if (htmltext.length > 0) {
  283. htmltext = htmltext + ' / ';
  284. }
  285. htmltext = htmltext + this.data.adDist;
  286. }
  287. return htmltext;
  288. },
  289. getSiteCheckStatus() {
  290. return this.data.siteCheckStatus.items[this.data.siteCheckStatus.current].dictValue;
  291. },
  292. getRainSiteCheckItems() {
  293. //console.log(JSON.stringify(this.data.rainSiteCheckItems))
  294. let text = '';
  295. for (let i = 0; i < this.data.rainSiteCheckItems.items.length; i++) {
  296. if (this.data.rainSiteCheckItems.items[i].checked) {
  297. if (text.length > 0) {
  298. text = text + ' / ';
  299. }
  300. text = text + this.data.rainSiteCheckItems.items[i].dictValue;
  301. }
  302. }
  303. return text;
  304. },
  305. getWaterSiteCheckItems() {
  306. let text = '';
  307. for (let i = 0; i < this.data.waterSiteCheckItems.items.length; i++) {
  308. if (this.data.waterSiteCheckItems.items[i].checked) {
  309. if (text.length > 0) {
  310. text = text + ' / ';
  311. }
  312. text = text + this.data.waterSiteCheckItems.items[i].dictValue;
  313. }
  314. }
  315. return text;
  316. },
  317. getGroundSiteCheckItems() {
  318. let text = '';
  319. for (let i = 0; i < this.data.groundSiteCheckItems.items.length; i++) {
  320. if (this.data.groundSiteCheckItems.items[i].checked) {
  321. if (text.length > 0) {
  322. text = text + ' / ';
  323. }
  324. text = text + this.data.groundSiteCheckItems.items[i].dictValue;
  325. }
  326. }
  327. return text;
  328. },
  329. getOthersEquipmentCheckItems() {
  330. let text = '';
  331. for (let i = 0; i < this.data.othersEquipmentCheckItems.items.length; i++) {
  332. if (this.data.othersEquipmentCheckItems.items[i].checked) {
  333. if (text.length > 0) {
  334. text = text + ' / ';
  335. }
  336. text = text + this.data.othersEquipmentCheckItems.items[i].dictValue;
  337. }
  338. }
  339. return text;
  340. },
  341. },
  342. methods: {
  343. toOss(path) {
  344. return oss + path;
  345. },
  346. toBack() {
  347. uni.navigateBack({
  348. delta: 1
  349. })
  350. },
  351. getDetail(params = {}) {
  352. let that = this;
  353. this.query = {};
  354. Object.assign(this.query, params);
  355. http.request({
  356. url: '/galaxy-business/equipment/inspection/report/detail',
  357. method: 'GET',
  358. params: this.query
  359. }).then(res => {
  360. if (res.success) {
  361. that.dataInfo = res.data;
  362. }
  363. }).catch(err => {
  364. console.log(err)
  365. })
  366. },
  367. }
  368. }
  369. </script>
  370. <style>
  371. /* page {
  372. background-color: rgb(240, 242, 244);
  373. } */
  374. </style>
  375. <style lang="scss" scoped>
  376. .uni-body {
  377. font-size: 0.7rem;
  378. }
  379. .decoration {
  380. width: 6px;
  381. height: 6px;
  382. margin-right: 4px;
  383. border-radius: 50%;
  384. background-color: cadetblue;
  385. }
  386. .view-flex-rs {
  387. display: flex;
  388. flex-direction: row;
  389. justify-content: flex-start;
  390. align-items: center;
  391. }
  392. .view-flex-rs-flex-wrap {
  393. display: flex;
  394. flex-direction: row;
  395. justify-content: flex-start;
  396. flex-wrap: wrap;
  397. }
  398. .view-flex-rc {
  399. display: flex;
  400. flex-direction: row;
  401. justify-content: center;
  402. align-items: center;
  403. }
  404. .view-flex-re {
  405. display: flex;
  406. flex-direction: row;
  407. justify-content: flex-end;
  408. align-items: center;
  409. }
  410. .view-flex-cs {
  411. display: flex;
  412. flex-direction: column;
  413. justify-content: flex-start;
  414. align-items: center;
  415. }
  416. .view-flex-cc {
  417. display: flex;
  418. flex-direction: column;
  419. justify-content: center;
  420. align-items: center;
  421. }
  422. .view-flex-ce {
  423. display: flex;
  424. flex-direction: column;
  425. justify-content: flex-end;
  426. align-items: center;
  427. }
  428. .cell-hover-class {
  429. background-color: rgb(235, 237, 238);
  430. }
  431. .view-flex-ce {
  432. display: flex;
  433. flex-direction: column;
  434. justify-content: flex-end;
  435. }
  436. .line-body {
  437. padding-left: 10px;
  438. padding-right: 10px;
  439. }
  440. .item-text-line {
  441. width: 100%;
  442. display: flex;
  443. flex-direction: row;
  444. justify-content: flex-start;
  445. .item-title {
  446. font-size: 0.7rem;
  447. font-weight: bold;
  448. }
  449. .item-text {
  450. overflow: hidden;
  451. margin-left: 5px;
  452. font-size: 0.7rem;
  453. white-space: nowrap;
  454. text-overflow: ellipsis;
  455. }
  456. .item-text-block {
  457. margin-left: 5px;
  458. font-size: 0.7rem;
  459. word-wrap: break-word;
  460. word-break: normal;
  461. }
  462. .error-text {
  463. color: #FF0000;
  464. }
  465. .normally-text {
  466. color: darkgreen;
  467. }
  468. .select-text {
  469. color: royalblue;
  470. }
  471. }
  472. .required-star {
  473. color: #FF0000;
  474. font-size: 15px;
  475. width: 20px;
  476. text-align: center;
  477. padding-left: 0px;
  478. padding-right: 2px;
  479. }
  480. .item-title {
  481. color: #909399;
  482. font-size: 15px;
  483. }
  484. .mline-text {
  485. padding-left: 2px;
  486. width: 100%;
  487. /* background-color:#909399; */
  488. height: 70px;
  489. border: 1px solid #FF5A5F;
  490. border-radius: 5px;
  491. }
  492. .img-container {
  493. margin-bottom: 0px;
  494. width: 100px;
  495. height: 100px;
  496. .note-image-box {
  497. margin-top: 0px;
  498. display: flex;
  499. flex-wrap: wrap;
  500. padding: 10px;
  501. .note-image-item {
  502. position: relative;
  503. width: 100%;
  504. height: 0;
  505. padding-top: 100%;
  506. box-sizing: border-box;
  507. // background-color: #18B566;
  508. .close-icon {
  509. display: flex;
  510. justify-content: center;
  511. align-items: center;
  512. position: absolute;
  513. right: 0px;
  514. top: 0px;
  515. width: 22px;
  516. height: 22px;
  517. border-radius: 50%;
  518. background-color: #d5d5d5;
  519. z-index: 2;
  520. }
  521. .image-box {
  522. display: flex;
  523. justify-content: center;
  524. align-items: center;
  525. position: absolute;
  526. top: 0px;
  527. right: 0px;
  528. border: 0px;
  529. left: 0px;
  530. border: 1px #eee solid;
  531. border-radius: 5px;
  532. overflow: hidden;
  533. width: 99%;
  534. height: 99%;
  535. }
  536. }
  537. }
  538. }
  539. .input-body {
  540. background-color: #fff;
  541. padding: 10px;
  542. }
  543. </style>