orderprocessreportdetail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  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-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  12. @clickLeft="toBack">
  13. <view style="width:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
  14. <text style="color: white;font-size: 1rem;">{{title}}</text>
  15. </view>
  16. </uni-nav-bar>
  17. <uni-section v-for="item in list" :key="item.id" :title="item.createTime" type="circle">
  18. <view v-if="item.orderStatusKey==orderStatusCreateKey">
  19. <uni-card title="维修任务创建" :is-shadow="false">
  20. <text class="uni-body">{{item.processDesc}}</text>
  21. </uni-card>
  22. </view>
  23. <view v-else-if="item.orderStatusKey==orderStatusConfirmKey">
  24. <uni-card title="维修任务确认" :is-shadow="false">
  25. <view class="uni-body">{{item.processDesc}}</view>
  26. </uni-card>
  27. </view>
  28. <view v-else-if="item.orderStatusKey==orderStatusProcessKey">
  29. <uni-card title="填报人姓名" :is-shadow="false">
  30. <view class="uni-body">{{item.orderProcessUserName}}</view>
  31. </uni-card>
  32. <uni-card title="RTU设备运行状态" :is-shadow="false">
  33. <text v-if="item.rtuStatus == 0" style="font-size: 0.7rem;color: green;margin-left: 4px;">正常</text>
  34. <text v-else style="font-size: 0.7rem;color: orangered;margin-left: 4px;">故障</text>
  35. </uni-card>
  36. <uni-card title="是否更换RTU" :is-shadow="false">
  37. <text v-if="item.rtuReplace==0" class="uni-body">否</text>
  38. <text v-else class="uni-body">更换</text>
  39. </uni-card>
  40. <uni-card title="RTU设备维修说明" :is-shadow="false">
  41. <text class="uni-body">{{item.rtuDesc}}</text>
  42. </uni-card>
  43. <uni-card v-if="item.rtuPhotoTake==1" padding="0" spacing="0" :is-shadow="false">
  44. <template v-slot:cover>
  45. <view class="custom-cover">
  46. <image v-if="item.rtuPhotoUrl" class="cover-image" style="width: 100%;" mode="aspectFill"
  47. :src="toOss(item.rtuPhotoUrl)">
  48. </image>
  49. <view class="cover-content" style="text-align: center;">
  50. <text class="uni-subtitle uni-white" style="color: gray;">RTU设备照片</text>
  51. </view>
  52. </view>
  53. </template>
  54. </uni-card>
  55. <view v-if="item.isRain ==1">
  56. <uni-card title="雨量传感器运行状态" :is-shadow="false">
  57. <text v-if="item.rainSensorStatus == 0"
  58. style="font-size: 0.7rem;color: green;margin-left: 4px;">正常</text>
  59. <text v-else style="font-size: 0.7rem;color: orangered;margin-left: 4px;">故障</text>
  60. </uni-card>
  61. <uni-card title="是否更换雨量传感器" :is-shadow="false">
  62. <text v-if="item.rainSensorReplace==0" class="uni-body">否</text>
  63. <text v-else class="uni-body">更换</text>
  64. </uni-card>
  65. <uni-card title="雨量传感器维修说明" :is-shadow="false">
  66. <text class="uni-body">{{item.rainSensorDesc}}</text>
  67. </uni-card>
  68. <uni-card v-if="item.rainSensorPhotoTake==1" padding="0" spacing="0" :is-shadow="false">
  69. <template v-slot:cover>
  70. <view class="custom-cover">
  71. <image v-if="item.rainSensorPhotoUrl" class="cover-image" style="width: 100%;"
  72. mode="aspectFill" :src="toOss(item.rainSensorPhotoUrl)">
  73. </image>
  74. <view class="cover-content" style="text-align: center;">
  75. <text class="uni-subtitle uni-white" style="color: gray;">雨量传感器照片</text>
  76. </view>
  77. </view>
  78. </template>
  79. </uni-card>
  80. </view>
  81. <view v-if="item.isRiver ==1 || item.isRes ==1 ">
  82. <uni-card title="水位传感器运行状态" :is-shadow="false">
  83. <text v-if="item.waterLevelSensorStatus == 0"
  84. style="font-size: 0.7rem;color: green;margin-left: 4px;">正常</text>
  85. <text v-else style="font-size: 0.7rem;color: orangered;margin-left: 4px;">故障</text>
  86. </uni-card>
  87. <uni-card title="是否更换水位传感器" :is-shadow="false">
  88. <text v-if="item.waterSensorReplace==0" class="uni-body">否</text>
  89. <text v-else class="uni-body">更换</text>
  90. </uni-card>
  91. <uni-card title="水位传感器维修说明" :is-shadow="false">
  92. <text class="uni-body">{{item.waterSensorDesc}}</text>
  93. </uni-card>
  94. <uni-card v-if="item.waterSensorPhotoTake==1" padding="0" spacing="0" :is-shadow="false">
  95. <template v-slot:cover>
  96. <view class="custom-cover">
  97. <image v-if="item.waterSensorPhotoUrl" class="cover-image" style="width: 100%;"
  98. mode="aspectFill" :src="toOss(item.waterSensorPhotoUrl)">
  99. </image>
  100. <view class="cover-content" style="text-align: center;">
  101. <text class="uni-subtitle uni-white" style="color: gray;">水位传感器照片</text>
  102. </view>
  103. </view>
  104. </template>
  105. </uni-card>
  106. </view>
  107. <view v-if="item.isGround ==1">
  108. <uni-card title="墒情传感器运行状态" :is-shadow="false">
  109. <text v-if="item.groundWaterSensorStatus == 0"
  110. style="font-size: 0.7rem;color: green;margin-left: 4px;">正常</text>
  111. <text v-else style="font-size: 0.7rem;color: orangered;margin-left: 4px;">故障</text>
  112. </uni-card>
  113. <uni-card title="是否更换墒情传感器" :is-shadow="false">
  114. <text v-if="item.groundSensorReplace==0" class="uni-body">否</text>
  115. <text v-else class="uni-body">更换</text>
  116. </uni-card>
  117. <uni-card title="墒情传感器维修说明" :is-shadow="false">
  118. <text class="uni-body">{{item.groundSensorDesc}}</text>
  119. </uni-card>
  120. <uni-card v-if="item.groundSensorPhotoTake==1" padding="0" spacing="0" :is-shadow="false">
  121. <template v-slot:cover>
  122. <view class="custom-cover">
  123. <image v-if="item.groundSensorPhotoUrl" class="cover-image" style="width: 100%;"
  124. mode="aspectFill" :src="toOss(item.groundSensorPhotoUrl)">
  125. </image>
  126. <view class="cover-content" style="text-align: center;">
  127. <text class="uni-subtitle uni-white" style="color: gray;">墒情传感器照片</text>
  128. </view>
  129. </view>
  130. </template>
  131. </uni-card>
  132. </view>
  133. <uni-card title="供电系统运行状态" :is-shadow="false">
  134. <text v-if="item.powerStatus == 0"
  135. style="font-size: 0.7rem;color: green;margin-left: 4px;">正常</text>
  136. <text v-else style="font-size: 0.7rem;color: orangered;margin-left: 4px;">故障</text>
  137. </uni-card>
  138. <uni-card title="是否更换蓄电池" :is-shadow="false">
  139. <text v-if="item.batteryReplace==0" class="uni-body">否</text>
  140. <text v-else class="uni-body">更换</text>
  141. </uni-card>
  142. <uni-card title="是否更换太阳能板" :is-shadow="false">
  143. <text v-if="item.sunPowerReplace==0" class="uni-body">否</text>
  144. <text v-else class="uni-body">更换</text>
  145. </uni-card>
  146. <uni-card title="供电系统维修说明" :is-shadow="false">
  147. <text class="uni-body">{{item.powerDesc}}</text>
  148. </uni-card>
  149. <uni-card v-if="item.batteryPhotoTake==1" padding="0" spacing="0" :is-shadow="false">
  150. <template v-slot:cover>
  151. <view class="custom-cover">
  152. <image v-if="item.batteryPhotoUrl" class="cover-image" style="width: 100%;"
  153. mode="aspectFill" :src="toOss(item.batteryPhotoUrl)">
  154. </image>
  155. <view class="cover-content" style="text-align: center;">
  156. <text class="uni-subtitle uni-white" style="color: gray;">蓄电池照片</text>
  157. </view>
  158. </view>
  159. </template>
  160. </uni-card>
  161. <uni-card v-if="item.sunPhotoTake==1" padding="0" spacing="0" :is-shadow="false">
  162. <template v-slot:cover>
  163. <view class="custom-cover">
  164. <image v-if="item.sunPhotoUrl" class="cover-image" style="width: 100%;" mode="aspectFill"
  165. :src="toOss(item.sunPhotoUrl)">
  166. </image>
  167. <view class="cover-content" style="text-align: center;">
  168. <text class="uni-subtitle uni-white" style="color: gray;">太阳能板照片</text>
  169. </view>
  170. </view>
  171. </template>
  172. </uni-card>
  173. <uni-card title="是否欠费" :is-shadow="false">
  174. <text v-if="item.networkOverdue==0" class="uni-body">否</text>
  175. <text v-else class="uni-body">欠费</text>
  176. </uni-card>
  177. <uni-card v-if="item.isSatellite ==0" title="4G移动网络维修说明" :is-shadow="false">
  178. <text class="uni-body">{{item.networkDesc}}</text>
  179. </uni-card>
  180. <uni-card v-else title="北斗通讯维修说明" :is-shadow="false">
  181. <text class="uni-body">{{item.satelliteDesc}}</text>
  182. </uni-card>
  183. <uni-card title="维修总结说明" :is-shadow="false">
  184. <text class="uni-body">{{item.processDesc}}</text>
  185. </uni-card>
  186. <uni-card v-if="item.baseBeforePhoto1Take ==1" padding="0" spacing="0" :is-shadow="false">
  187. <template v-slot:cover>
  188. <view class="custom-cover">
  189. <image v-if="item.baseBeforePhoto1Url" class="cover-image" style="width: 100%;"
  190. mode="aspectFill" :src="toOss(item.baseBeforePhoto1Url)">
  191. </image>
  192. <view class="cover-content" style="text-align: center;">
  193. <text class="uni-subtitle uni-white" style="color: gray;">维修前照片一</text>
  194. </view>
  195. </view>
  196. </template>
  197. </uni-card>
  198. <uni-card v-if="item.baseBeforePhoto2Take==1" padding="0" spacing="0" :is-shadow="false">
  199. <template v-slot:cover>
  200. <view class="custom-cover">
  201. <image v-if="item.baseBeforePhoto2Url" class="cover-image" style="width: 100%;"
  202. mode="aspectFill" :src="toOss(item.baseBeforePhoto2Url)">
  203. </image>
  204. <view class="cover-content" style="text-align: center;">
  205. <text class="uni-subtitle uni-white" style="color: gray;">维修前照片二</text>
  206. </view>
  207. </view>
  208. </template>
  209. </uni-card>
  210. <uni-card v-if="item.baseAfterPhoto1Take ==1" padding="0" spacing="0" :is-shadow="false">
  211. <template v-slot:cover>
  212. <view class="custom-cover">
  213. <image v-if="item.baseAfterPhoto1Url" class="cover-image" style="width: 100%;"
  214. mode="aspectFill" :src="toOss(item.baseAfterPhoto1Url)">
  215. </image>
  216. <view class="cover-content" style="text-align: center;">
  217. <text class="uni-subtitle uni-white" style="color: gray;">维修后照片一</text>
  218. </view>
  219. </view>
  220. </template>
  221. </uni-card>
  222. <uni-card v-if="item.baseAfterPhoto2Take==1" padding="0" spacing="0" :is-shadow="false">
  223. <template v-slot:cover>
  224. <view class="custom-cover">
  225. <image v-if="item.baseAfterPhoto2Url" class="cover-image" style="width: 100%;"
  226. mode="aspectFill" :src="toOss(item.baseAfterPhoto2Url)">
  227. </image>
  228. <view class="cover-content" style="text-align: center;">
  229. <text class="uni-subtitle uni-white" style="color: gray;">维修后照片二</text>
  230. </view>
  231. </view>
  232. </template>
  233. </uni-card>
  234. </view>
  235. <view v-else>
  236. <uni-card title="维修完成" :is-shadow="false">
  237. <view class="uni-body">{{item.processDesc}}</view>
  238. </uni-card>
  239. </view>
  240. </uni-section>
  241. </view>
  242. </template>
  243. <script>
  244. import http from '@/http/api.js';
  245. import {
  246. pathToBase64,
  247. base64ToPath
  248. } from '@/js_sdk/mmmm-image-tools/index.js';
  249. import {
  250. oss,
  251. devUrl,
  252. prodUrl
  253. } from '@/common/setting';
  254. export default {
  255. components: {},
  256. onLoad(options) {
  257. this.orderId = options.orderId;
  258. },
  259. data() {
  260. return {
  261. list: [],
  262. orderId: 0,
  263. reportId: 0,
  264. orderStatusCreateKey: 0,
  265. orderStatusConfirmKey: 0,
  266. orderStatusProcessKey: 0,
  267. orderStatusCloseKey: 0,
  268. title: '维修任务处理详情',
  269. }
  270. },
  271. computed: {},
  272. onShow() {
  273. this.getReportDict();
  274. },
  275. created() {},
  276. methods: {
  277. toOss(path) {
  278. return oss + path;
  279. },
  280. toBack() {
  281. uni.navigateBack({
  282. delta: 1
  283. })
  284. },
  285. getReportDict() {
  286. var that = this;
  287. http.request({
  288. url: '/galaxy-system/dict-biz/dictionary?code=rtu_check_order_status',
  289. method: 'GET'
  290. }).then(res => {
  291. if (res.data != null) {
  292. const dictLength = res.data['length'];
  293. for (var i = 0; i < dictLength; i++) {
  294. let dict = res.data[i];
  295. if (dict.dictKey === '1') {
  296. that.orderStatusCreateKey = dict.id;
  297. } else if (dict.dictKey === '2') {
  298. that.orderStatusConfirmKey = dict.id;
  299. } else if (dict.dictKey === '3') {
  300. that.orderStatusProcessKey = dict.id;
  301. } else if (dict.dictKey === '4') {
  302. that.orderStatusCloseKey = dict.id;
  303. }
  304. }
  305. this.getOrderProcessList();
  306. }
  307. }).catch(err => {
  308. console.log(err)
  309. })
  310. },
  311. getOrderProcessList() {
  312. let that = this;
  313. let postData = {};
  314. postData['id'] = this.orderId;
  315. http.request({
  316. url: '/galaxy-business/rtu/check/order/process/list',
  317. method: 'GET',
  318. data: postData,
  319. }).then(res => {
  320. if (res.data != null) {
  321. that.list = res.data;
  322. }
  323. }).catch(err => {
  324. console.log(err)
  325. })
  326. },
  327. }
  328. }
  329. </script>
  330. <style>
  331. /* page {
  332. background-color: rgb(240, 242, 244);
  333. } */
  334. .cell-hover-class {
  335. background-color: rgb(235, 237, 238);
  336. }
  337. .view-flex-rs {
  338. display: flex;
  339. flex-direction: row;
  340. justify-content: flex-start;
  341. }
  342. .view-flex-rc {
  343. display: flex;
  344. flex-direction: row;
  345. justify-content: center;
  346. }
  347. .view-flex-re {
  348. display: flex;
  349. flex-direction: row;
  350. justify-content: flex-end;
  351. }
  352. .view-flex-cs {
  353. display: flex;
  354. flex-direction: column;
  355. justify-content: flex-start;
  356. }
  357. .view-flex-cc {
  358. display: flex;
  359. flex-direction: column;
  360. justify-content: center;
  361. }
  362. .view-flex-ce {
  363. display: flex;
  364. flex-direction: column;
  365. justify-content: flex-end;
  366. }
  367. .line-body {
  368. padding-left: 10px;
  369. padding-right: 10px;
  370. }
  371. .required-star {
  372. color: #FF0000;
  373. font-size: 15px;
  374. width: 20px;
  375. text-align: center;
  376. padding-left: 0px;
  377. padding-right: 2px;
  378. }
  379. .item-title {
  380. color: #909399;
  381. font-size: 15px;
  382. }
  383. .mline-text {
  384. padding-left: 2px;
  385. width: 100%;
  386. /* background-color:#909399; */
  387. height: 70px;
  388. border: 1px solid #FF5A5F;
  389. border-radius: 5px;
  390. }
  391. </style>
  392. <style lang="scss" scoped>
  393. .container {
  394. padding: 0 0 50rpx;
  395. }
  396. .uni-body {
  397. font-size: 0.7rem;
  398. }
  399. .img-container {
  400. margin-bottom: 0px;
  401. width: 100px;
  402. height: 100px;
  403. .note-image-box {
  404. margin-top: 0px;
  405. display: flex;
  406. flex-wrap: wrap;
  407. padding: 10px;
  408. .note-image-item {
  409. position: relative;
  410. width: 100%;
  411. height: 0;
  412. padding-top: 100%;
  413. box-sizing: border-box;
  414. // background-color: #18B566;
  415. .close-icon {
  416. display: flex;
  417. justify-content: center;
  418. align-items: center;
  419. position: absolute;
  420. right: 0px;
  421. top: 0px;
  422. width: 22px;
  423. height: 22px;
  424. border-radius: 50%;
  425. background-color: #d5d5d5;
  426. z-index: 2;
  427. }
  428. .image-box {
  429. display: flex;
  430. justify-content: center;
  431. align-items: center;
  432. position: absolute;
  433. top: 5px;
  434. right: 5px;
  435. border: 5px;
  436. left: 5px;
  437. border: 1px #eee solid;
  438. border-radius: 5px;
  439. overflow: hidden;
  440. width: 98%;
  441. height: 98%;
  442. }
  443. }
  444. }
  445. }
  446. </style>