orderprocessreport.vue 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756
  1. <template>
  2. <view class="container">
  3. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  4. @clickLeft="toBack">
  5. <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
  6. <text style="color: white;font-size: 1rem;">{{title}}</text>
  7. </view>
  8. </uni-nav-bar>
  9. <uni-forms ref="baseForm">
  10. <uSection title="维修总结情况" titleFontSize="0.8rem" type="line" style="width: 100%;">
  11. <uGroup margin-top="0">
  12. <uni-forms-item>
  13. <uni-easyinput type="textarea" v-model="baseInfo.processDesc" placeholder="请输入总结说明" />
  14. </uni-forms-item>
  15. </uGroup>
  16. <uGroup title="总体设施设备图片" margin-top="20">
  17. <view class="view-flex-rs" style="margin-top: 0px;">
  18. <view class="view-flex-cc" style="width: 120px;">
  19. <view class="img-container">
  20. <view class="note-image-box">
  21. <view v-if="baseInfo.photo1Take" class="note-image-item">
  22. <view class="close-icon" @click="onBasePhoto1DeleteClick()">
  23. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  24. </view>
  25. <view class="image-box">
  26. <image :src="toOss(baseInfo.photo1Url)" mode="widthFix"></image>
  27. </view>
  28. </view>
  29. <view v-else class="note-image-item" @click="getBasePhoto1()">
  30. <view class="image-box">
  31. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="view-flex-cc" style="width: 120px;">
  38. <view class="img-container">
  39. <view class="note-image-box">
  40. <view v-if="baseInfo.photo2Take" class="note-image-item">
  41. <view class="close-icon" @click="onBasePhoto2DeleteClick()">
  42. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  43. </view>
  44. <view class="image-box">
  45. <image :src="toOss(baseInfo.photo2Url)" mode="widthFix"></image>
  46. </view>
  47. </view>
  48. <view v-else class="note-image-item" @click="getBasePhoto2()">
  49. <view class="image-box">
  50. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </uGroup>
  58. </uSection>
  59. <uSection title="RTU设备" ftitleFontSize="0.8rem" type="line" style="width: 100%;">
  60. <uGroup margin-top="0">
  61. <uni-forms-item label="是否更换RTU" label-width="130px" required>
  62. <radio-group @change="onRtuReplaceRadioChange"
  63. style="display: flex;flex-direction: row;justify-content: flex-start;">
  64. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  65. v-for="(item, index) in rtuInfo.replaceItems.items" :key="item.id">
  66. <view>
  67. <radio :value="item.id" :checked="index === rtuInfo.replaceItems.current" />
  68. </view>
  69. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  70. </label>
  71. </radio-group>
  72. </uni-forms-item>
  73. <uni-forms-item label="运行状态" label-width="130px" required>
  74. <radio-group @change="onRtuStatusRadioChange"
  75. style="display: flex;flex-direction: row;justify-content: flex-start;">
  76. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  77. v-for="(item, index) in rtuInfo.runStatus.items" :key="item.id">
  78. <view>
  79. <radio :value="item.id" :checked="index === rtuInfo.runStatus.current" />
  80. </view>
  81. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  82. </label>
  83. </radio-group>
  84. </uni-forms-item>
  85. <uni-forms-item>
  86. <uni-easyinput label="备注说明" type="textarea" v-model="rtuInfo.remark" placeholder="请输入备注说明" />
  87. </uni-forms-item>
  88. </uGroup>
  89. <uGroup title="RTU图片" margin-top="20">
  90. <view class="view-flex-rs" style="margin-top: 0px;">
  91. <view class="view-flex-cc" style="width: 120px;">
  92. <view class="img-container">
  93. <view class="note-image-box">
  94. <view v-if="rtuInfo.photoTake" class="note-image-item">
  95. <view class="close-icon" @click="onRtuPhotoDeleteClick()">
  96. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  97. </view>
  98. <view class="image-box">
  99. <image :src="toOss(rtuInfo.photoUrl)" mode="widthFix"></image>
  100. </view>
  101. </view>
  102. <view v-else class="note-image-item" @click="getRtuPhoto()">
  103. <view class="image-box">
  104. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. </uGroup>
  112. </uSection>
  113. <uSection title="雨量传感器" ftitleFontSize="0.8rem" type="line" style="width: 100%;">
  114. <uGroup margin-top="0">
  115. <uni-forms-item label="是否更换雨量计" label-width="130px" required>
  116. <radio-group @change="onRainReplaceRadioChange"
  117. style="display: flex;flex-direction: row;justify-content: flex-start;">
  118. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  119. v-for="(item, index) in rainSensorInfo.replaceItems.items" :key="item.id">
  120. <view>
  121. <radio :value="item.id" :checked="index === rainSensorInfo.replaceItems.current" />
  122. </view>
  123. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  124. </label>
  125. </radio-group>
  126. </uni-forms-item>
  127. <uni-forms-item label="运行状态" label-width="130px" required>
  128. <radio-group @change="onRainSensorStatusRadioChange"
  129. style="display: flex;flex-direction: row;justify-content: flex-start;">
  130. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  131. v-for="(item, index) in rainSensorInfo.runStatus.items" :key="item.id">
  132. <view>
  133. <radio :value="item.id" :checked="index === rainSensorInfo.runStatus.current" />
  134. </view>
  135. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  136. </label>
  137. </radio-group>
  138. </uni-forms-item>
  139. <uni-forms-item>
  140. <uni-easyinput label="备注说明" type="textarea" v-model="rainSensorInfo.remark"
  141. placeholder="请输入备注说明" />
  142. </uni-forms-item>
  143. </uGroup>
  144. <uGroup title="雨量传感器图片" margin-top="20">
  145. <view class="view-flex-rs" style="margin-top: 0px;">
  146. <view class="view-flex-cc" style="width: 120px;">
  147. <view class="img-container">
  148. <view class="note-image-box">
  149. <view v-if="rainSensorInfo.photoTake" class="note-image-item">
  150. <view class="close-icon" @click="onRainPhotoDeleteClick()">
  151. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  152. </view>
  153. <view class="image-box">
  154. <image :src="toOss(rainSensorInfo.photoUrl)" mode="widthFix"></image>
  155. </view>
  156. </view>
  157. <view v-else class="note-image-item" @click="getRainSensorPhoto()">
  158. <view class="image-box">
  159. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </uGroup>
  167. </uSection>
  168. <uSection title="水位传感器" ftitleFontSize="0.8rem" type="line" style="width: 100%;">
  169. <uGroup margin-top="0">
  170. <uni-forms-item label="是否更换水位计" label-width="130px" required>
  171. <radio-group @change="onWaterReplaceRadioChange"
  172. style="display: flex;flex-direction: row;justify-content: flex-start;">
  173. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  174. v-for="(item, index) in waterSensorInfo.replaceItems.items" :key="item.id">
  175. <view>
  176. <radio :value="item.id" :checked="index === waterSensorInfo.replaceItems.current" />
  177. </view>
  178. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  179. </label>
  180. </radio-group>
  181. </uni-forms-item>
  182. <uni-forms-item label="运行状态" label-width="130px" required>
  183. <radio-group @change="onWaterSensorStatusRadioChange"
  184. style="display: flex;flex-direction: row;justify-content: flex-start;">
  185. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  186. v-for="(item, index) in waterSensorInfo.runStatus.items" :key="item.id">
  187. <view>
  188. <radio :value="item.id" :checked="index === waterSensorInfo.runStatus.current" />
  189. </view>
  190. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  191. </label>
  192. </radio-group>
  193. </uni-forms-item>
  194. <uni-forms-item>
  195. <uni-easyinput label="备注说明" type="textarea" v-model="waterSensorInfo.remark"
  196. placeholder="请输入备注说明" />
  197. </uni-forms-item>
  198. </uGroup>
  199. <uGroup title="水位传感器图片" margin-top="20">
  200. <view class="view-flex-rs" style="margin-top: 0px;">
  201. <view class="view-flex-cc" style="width: 120px;">
  202. <view class="img-container">
  203. <view class="note-image-box">
  204. <view v-if="waterSensorInfo.photoTake" class="note-image-item">
  205. <view class="close-icon" @click="onWaterPhotoDeleteClick()">
  206. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  207. </view>
  208. <view class="image-box">
  209. <image :src="toOss(waterSensorInfo.photoUrl)" mode="widthFix"></image>
  210. </view>
  211. </view>
  212. <view v-else class="note-image-item" @click="getWaterSensorPhoto()">
  213. <view class="image-box">
  214. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  215. </view>
  216. </view>
  217. </view>
  218. </view>
  219. </view>
  220. </view>
  221. </uGroup>
  222. </uSection>
  223. <uSection title="墒情传感器" ftitleFontSize="0.8rem" type="line" style="width: 100%;">
  224. <uGroup margin-top="0">
  225. <uni-forms-item label="是否更换墒情传感器" label-width="130px" required>
  226. <radio-group @change="onGroundReplaceRadioChange"
  227. style="display: flex;flex-direction: row;justify-content: flex-start;">
  228. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  229. v-for="(item, index) in groundSensorInfo.replaceItems.items" :key="item.id">
  230. <view>
  231. <radio :value="item.id"
  232. :checked="index === groundSensorInfo.replaceItems.current" />
  233. </view>
  234. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  235. </label>
  236. </radio-group>
  237. </uni-forms-item>
  238. <uni-forms-item label="运行状态" label-width="130px" required>
  239. <radio-group @change="onGroundSensorStatusRadioChange"
  240. style="display: flex;flex-direction: row;justify-content: flex-start;">
  241. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  242. v-for="(item, index) in groundSensorInfo.runStatus.items" :key="item.id">
  243. <view>
  244. <radio :value="item.id" :checked="index === groundSensorInfo.runStatus.current" />
  245. </view>
  246. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  247. </label>
  248. </radio-group>
  249. </uni-forms-item>
  250. <uni-forms-item>
  251. <uni-easyinput label="备注说明" type="textarea" v-model="groundSensorInfo.remark"
  252. placeholder="请输入备注说明" />
  253. </uni-forms-item>
  254. </uGroup>
  255. <uGroup title="墒情传感器图片" margin-top="20">
  256. <view class="view-flex-rs" style="margin-top: 0px;">
  257. <view class="view-flex-cc" style="width: 120px;">
  258. <view class="img-container">
  259. <view class="note-image-box">
  260. <view v-if="groundSensorInfo.photoTake" class="note-image-item">
  261. <view class="close-icon" @click="onGroundPhotoDeleteClick()">
  262. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  263. </view>
  264. <view class="image-box">
  265. <image :src="toOss(groundSensorInfo.photoUrl)" mode="widthFix"></image>
  266. </view>
  267. </view>
  268. <view v-else class="note-image-item" @click="getGroundSensorPhoto()">
  269. <view class="image-box">
  270. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  271. </view>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. </view>
  277. </uGroup>
  278. </uSection>
  279. <uSection title="供电系统" ftitleFontSize="0.8rem" type="line" style="width: 100%;">
  280. <uGroup margin-top="0">
  281. <uni-forms-item label="是否更换蓄电池" label-width="130px" required>
  282. <radio-group @change="onBatteryReplaceRadioChange"
  283. style="display: flex;flex-direction: row;justify-content: flex-start;">
  284. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  285. v-for="(item, index) in powerInfo.batteryReplaceItems.items" :key="item.id">
  286. <view>
  287. <radio :value="item.id"
  288. :checked="index === powerInfo.batteryReplaceItems.current" />
  289. </view>
  290. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  291. </label>
  292. </radio-group>
  293. </uni-forms-item>
  294. <uni-forms-item label="是否更换太阳能板" label-width="130px" required>
  295. <radio-group @change="onSunPowerReplaceRadioChange"
  296. style="display: flex;flex-direction: row;justify-content: flex-start;">
  297. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  298. v-for="(item, index) in powerInfo.sunPowerReplaceItems.items" :key="item.id">
  299. <view>
  300. <radio :value="item.id"
  301. :checked="index === powerInfo.sunPowerReplaceItems.current" />
  302. </view>
  303. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  304. </label>
  305. </radio-group>
  306. </uni-forms-item>
  307. <uni-forms-item label="运行状态" label-width="130px" required>
  308. <radio-group @change="onPowerStatusRadioChange"
  309. style="display: flex;flex-direction: row;justify-content: flex-start;">
  310. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  311. v-for="(item, index) in powerInfo.runStatus.items" :key="item.id">
  312. <view>
  313. <radio :value="item.id" :checked="index === powerInfo.runStatus.current" />
  314. </view>
  315. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  316. </label>
  317. </radio-group>
  318. </uni-forms-item>
  319. <uni-forms-item>
  320. <uni-easyinput label="备注说明" type="textarea" v-model="powerInfo.remark" placeholder="请输入备注说明" />
  321. </uni-forms-item>
  322. </uGroup>
  323. <uGroup title="供电系统图片" margin-top="20">
  324. <view class="view-flex-rs" style="margin-top: 0px;">
  325. <view class="view-flex-cc" style="width: 120px;">
  326. <view class="img-container">
  327. <view class="note-image-box">
  328. <view v-if="powerInfo.batteryPhotoTake" class="note-image-item">
  329. <view class="close-icon" @click="onBatteryPhotoDeleteClick()">
  330. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  331. </view>
  332. <view class="image-box">
  333. <image :src="toOss(powerInfo.batteryPhotoUrl)" mode="widthFix"></image>
  334. </view>
  335. </view>
  336. <view v-else class="note-image-item" @click="getBatteryPhoto()">
  337. <view class="image-box">
  338. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  339. </view>
  340. </view>
  341. </view>
  342. </view>
  343. </view>
  344. <view class="view-flex-cc" style="width: 120px;">
  345. <view class="img-container">
  346. <view class="note-image-box">
  347. <view v-if="powerInfo.sunPhotoTake" class="note-image-item">
  348. <view class="close-icon" @click="onSunPowerPhotoDeleteClick()">
  349. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  350. </view>
  351. <view class="image-box">
  352. <image :src="toOss(powerInfo.sunPhotoUrl)" mode="widthFix"></image>
  353. </view>
  354. </view>
  355. <view v-else class="note-image-item" @click="getSunPowerPhoto()">
  356. <view class="image-box">
  357. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  358. </view>
  359. </view>
  360. </view>
  361. </view>
  362. </view>
  363. </view>
  364. </uGroup>
  365. </uSection>
  366. <uSection title="4G移动网络" ftitleFontSize="0.8rem" type="line" style="width: 100%;">
  367. <uGroup margin-top="0">
  368. <uni-forms-item label="是否欠费" label-width="130px" required>
  369. <radio-group @change="onNetworkOverdueRadioChange"
  370. style="display: flex;flex-direction: row;justify-content: flex-start;">
  371. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  372. v-for="(item, index) in networkInfo.overdueItems.items" :key="item.id">
  373. <view>
  374. <radio :value="item.id" :checked="index === networkInfo.overdueItems.current" />
  375. </view>
  376. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  377. </label>
  378. </radio-group>
  379. </uni-forms-item>
  380. <uni-forms-item label="运行状态" label-width="130px" required>
  381. <radio-group @change="onNetworkStatusRadioChange"
  382. style="display: flex;flex-direction: row;justify-content: flex-start;">
  383. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  384. v-for="(item, index) in networkInfo.runStatus.items" :key="item.id">
  385. <view>
  386. <radio :value="item.id" :checked="index === networkInfo.runStatus.current" />
  387. </view>
  388. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  389. </label>
  390. </radio-group>
  391. </uni-forms-item>
  392. <uni-forms-item>
  393. <uni-easyinput label="备注说明" type="textarea" v-model="networkInfo.remark"
  394. placeholder="请输入备注说明" />
  395. </uni-forms-item>
  396. </uGroup>
  397. </uSection>
  398. <uSection title="北斗通讯" ftitleFontSize="0.8rem" type="line" style="width: 100%;">
  399. <uGroup margin-top="0">
  400. <uni-forms-item label="运行状态" label-width="130px" required>
  401. <radio-group @change="onSatelliteStatusRadioChange"
  402. style="display: flex;flex-direction: row;justify-content: flex-start;">
  403. <label style="margin-right: 20px;width:60px" class="view-flex-rs"
  404. v-for="(item, index) in satelliteInfo.runStatus.items" :key="item.id">
  405. <view>
  406. <radio :value="item.id" :checked="index === satelliteInfo.runStatus.current" />
  407. </view>
  408. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  409. </label>
  410. </radio-group>
  411. </uni-forms-item>
  412. <uni-forms-item>
  413. <uni-easyinput label="备注说明" type="textarea" v-model="satelliteInfo.remark"
  414. placeholder="请输入备注说明" />
  415. </uni-forms-item>
  416. </uGroup>
  417. </uSection>
  418. </uni-forms>
  419. <view class="footer">
  420. <view class="control">
  421. <view style="display: flex;flex-direction: row;justify-content: flex-start;">
  422. <view
  423. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightblue"
  424. @click="toSave()">
  425. <view style="display:flex;flex-direction: column;justify-content: center;">
  426. <uIcons class="input-uni-icon" type="folder-add" size="18" color="#999" />
  427. </view>
  428. <view style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  429. <text style="color:black;font-size:0.7rem">暂存</text>
  430. </view>
  431. </view>
  432. <view
  433. style="display:flex;flex-direction: row;justify-content: center;width: 90px;height:28px;margin-right: 10px;border-radius:7px;background-color:lightpink"
  434. @click="toSubmit()">
  435. <view style="display:flex;flex-direction: column;justify-content: center;">
  436. <uIcons class="input-uni-icon" type="upload" size="18" color="#999" />
  437. </view>
  438. <view style="display:flex;flex-direction: column;justify-content: center;padding-left:5px;">
  439. <text style="color:black;font-size:0.7rem">立即提交</text>
  440. </view>
  441. </view>
  442. </view>
  443. </view>
  444. </view>
  445. </view>
  446. </template>
  447. <script>
  448. // import pageNav from '@/components/page-nav/page-nav.vue';
  449. import http from '@/http/api.js';
  450. import {
  451. pathToBase64,
  452. base64ToPath
  453. } from '@/js_sdk/mmmm-image-tools/index.js';
  454. import {
  455. oss,
  456. devUrl,
  457. prodUrl
  458. } from '@/common/setting';
  459. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  460. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  461. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  462. import uFormsItem from '@/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue'
  463. import uFab from '@/uni_modules/uni-fab/components/uni-fab/uni-fab.vue'
  464. export default {
  465. components: {
  466. uIcons,
  467. uGroup,
  468. uSection,
  469. uFormsItem,
  470. uFab
  471. },
  472. onLoad(options) {
  473. this.orderId = options.orderId;
  474. this.baseURL = process.env.NODE_ENV === 'development' ? devUrl : prodUrl;
  475. //初始化字典
  476. //this.getReportDict();
  477. //查询计划信息
  478. //this.getPlanInfo();
  479. },
  480. data() {
  481. return {
  482. pattern: {
  483. color: '#7A7E83',
  484. backgroundColor: '#fff',
  485. selectedColor: '#007AFF',
  486. buttonColor: '#007AFF',
  487. iconColor: '#fff'
  488. },
  489. content: [{
  490. iconPath: '/static/images/user/c6.png',
  491. selectedIconPath: '/static/images/user/c6.png',
  492. text: '提交',
  493. active: false
  494. },
  495. {
  496. iconPath: '/static/images/user/c5.png',
  497. selectedIconPath: '/static/images/user/c5.png',
  498. text: '保存',
  499. active: false
  500. }
  501. ],
  502. baseURL: '',
  503. orderId: 0,
  504. rtuCode: '',
  505. planInfo: {},
  506. waterLevelSensorType: {
  507. items: [],
  508. current: 0,
  509. },
  510. groundSensorType: {
  511. items: [],
  512. current: 0,
  513. },
  514. satelliteModel: {
  515. items: [],
  516. current: 0,
  517. },
  518. datagramIp: {
  519. items: [{
  520. 'id': '0',
  521. 'checked': false,
  522. 'dictValue': '发往县'
  523. }, {
  524. 'id': '1',
  525. 'checked': false,
  526. 'dictValue': '发往市'
  527. }, {
  528. 'id': '2',
  529. 'checked': false,
  530. 'dictValue': '发往省'
  531. }],
  532. current: 0,
  533. },
  534. baseInfo: {
  535. processDesc: '',
  536. photo1Url: '',
  537. photo1Take: false,
  538. photo2Url: '',
  539. photo2Take: false
  540. },
  541. rtuInfo: {
  542. remark: '',
  543. rtuReplace: 0,
  544. photoUrl: '',
  545. photoTake: false,
  546. replaceItems: {
  547. items: [{
  548. 'id': '0',
  549. 'dictValue': '无'
  550. }, {
  551. 'id': '1',
  552. 'dictValue': '更换'
  553. }],
  554. current: 0,
  555. },
  556. runStatus: {
  557. items: [{
  558. 'id': '0',
  559. 'dictValue': '正常'
  560. }, {
  561. 'id': '1',
  562. 'dictValue': '故障'
  563. }],
  564. current: 0,
  565. },
  566. },
  567. rainSensorInfo: {
  568. rainSensorReplace: 0,
  569. replaceItems: {
  570. items: [{
  571. 'id': '0',
  572. 'dictValue': '无'
  573. }, {
  574. 'id': '1',
  575. 'dictValue': '更换'
  576. }],
  577. current: 0,
  578. },
  579. remark: '',
  580. photoUrl: '',
  581. photoTake: false,
  582. active: {
  583. items: [{
  584. 'id': '0',
  585. 'dictValue': '有'
  586. }, {
  587. 'id': '1',
  588. 'dictValue': '无'
  589. }],
  590. current: 0,
  591. },
  592. runStatus: {
  593. items: [{
  594. 'id': '0',
  595. 'dictValue': '正常'
  596. }, {
  597. 'id': '1',
  598. 'dictValue': '故障'
  599. }],
  600. current: 0,
  601. },
  602. },
  603. waterSensorInfo: {
  604. waterSensorReplace: 0,
  605. replaceItems: {
  606. items: [{
  607. 'id': '0',
  608. 'dictValue': '无'
  609. }, {
  610. 'id': '1',
  611. 'dictValue': '更换'
  612. }],
  613. current: 0,
  614. },
  615. remark: '',
  616. photoUrl: '',
  617. photoTake: false,
  618. active: {
  619. items: [{
  620. 'id': '0',
  621. 'dictValue': '有'
  622. }, {
  623. 'id': '1',
  624. 'dictValue': '无'
  625. }],
  626. current: 0,
  627. },
  628. runStatus: {
  629. items: [{
  630. 'id': '0',
  631. 'dictValue': '正常'
  632. }, {
  633. 'id': '1',
  634. 'dictValue': '故障'
  635. }],
  636. current: 0,
  637. },
  638. },
  639. groundSensorInfo: {
  640. groundSensorReplace: 0,
  641. replaceItems: {
  642. items: [{
  643. 'id': '0',
  644. 'dictValue': '无'
  645. }, {
  646. 'id': '1',
  647. 'dictValue': '更换'
  648. }],
  649. current: 0,
  650. },
  651. remark: '',
  652. photoUrl: '',
  653. photoTake: false,
  654. active: {
  655. items: [{
  656. 'id': '0',
  657. 'dictValue': '有'
  658. }, {
  659. 'id': '1',
  660. 'dictValue': '无'
  661. }],
  662. current: 0,
  663. },
  664. runStatus: {
  665. items: [{
  666. 'id': '0',
  667. 'dictValue': '正常'
  668. }, {
  669. 'id': '1',
  670. 'dictValue': '故障'
  671. }],
  672. current: 0,
  673. },
  674. },
  675. powerInfo: {
  676. batteryReplace: 0,
  677. batteryReplaceItems: {
  678. items: [{
  679. 'id': '0',
  680. 'dictValue': '无'
  681. }, {
  682. 'id': '1',
  683. 'dictValue': '更换'
  684. }],
  685. current: 0,
  686. },
  687. sunPowerReplace: 0,
  688. sunPowerReplaceItems: {
  689. items: [{
  690. 'id': '0',
  691. 'dictValue': '无'
  692. }, {
  693. 'id': '1',
  694. 'dictValue': '更换'
  695. }],
  696. current: 0,
  697. },
  698. batteryPhotoUrl: '',
  699. batteryPhotoTake: false,
  700. sunPhotoUrl: '',
  701. sunPhotoTake: false,
  702. remark: '',
  703. active: {
  704. items: [{
  705. 'id': '0',
  706. 'dictValue': '有'
  707. }, {
  708. 'id': '1',
  709. 'dictValue': '无'
  710. }],
  711. current: 0,
  712. },
  713. runStatus: {
  714. items: [{
  715. 'id': '0',
  716. 'dictValue': '正常'
  717. }, {
  718. 'id': '1',
  719. 'dictValue': '故障'
  720. }],
  721. current: 0,
  722. },
  723. },
  724. networkInfo: {
  725. overdueItems: {
  726. items: [{
  727. 'id': '0',
  728. 'dictValue': '正常'
  729. }, {
  730. 'id': '1',
  731. 'dictValue': '欠费'
  732. }],
  733. current: 0,
  734. },
  735. networkOverdue: 0,
  736. remark: '',
  737. active: {
  738. items: [{
  739. 'id': '0',
  740. 'dictValue': '有'
  741. }, {
  742. 'id': '1',
  743. 'dictValue': '无'
  744. }],
  745. current: 0,
  746. },
  747. runStatus: {
  748. items: [{
  749. 'id': '0',
  750. 'dictValue': '正常'
  751. }, {
  752. 'id': '1',
  753. 'dictValue': '故障'
  754. }],
  755. current: 0,
  756. },
  757. },
  758. satelliteInfo: {
  759. remark: '',
  760. active: {
  761. items: [{
  762. 'id': '0',
  763. 'dictValue': '有'
  764. }, {
  765. 'id': '1',
  766. 'dictValue': '无'
  767. }],
  768. current: 0,
  769. },
  770. runStatus: {
  771. items: [{
  772. 'id': '0',
  773. 'dictValue': '正常'
  774. }, {
  775. 'id': '1',
  776. 'dictValue': '故障'
  777. }],
  778. current: 0,
  779. },
  780. },
  781. localImageList: [],
  782. uploadImageList: [],
  783. title: '工单填报',
  784. desc: '',
  785. }
  786. },
  787. computed: {
  788. getIcon() {
  789. return path => {
  790. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  791. }
  792. },
  793. },
  794. onShow() {
  795. },
  796. created() {
  797. },
  798. methods: {
  799. toOss(path) {
  800. return oss + path;
  801. },
  802. toBack() {
  803. uni.navigateBack({
  804. delta: 1
  805. })
  806. },
  807. toSubmit() {
  808. var formdata = {};
  809. formdata['orderId'] = this.orderId;
  810. formdata['processDesc'] = this.baseInfo.processDesc;
  811. if (this.baseInfo.photo1Take) {
  812. formdata['basePhoto1Take'] = 1;
  813. formdata['basePhoto1Url'] = this.baseInfo.photo1Url;
  814. } else {
  815. formdata['basePhoto1Take'] = 0;
  816. }
  817. if (this.baseInfo.photo2Take) {
  818. formdata['basePhoto2Take'] = 1;
  819. formdata['basePhoto2Url'] = this.baseInfo.photo2Url;
  820. } else {
  821. formdata['basePhoto2Take'] = 0;
  822. }
  823. formdata['rtuStatus'] = this.rtuInfo.runStatus.current;
  824. formdata['rtuReplace'] = this.rtuInfo.replaceItems.current;
  825. formdata['rtuDesc'] = this.rtuInfo.remark;
  826. if (this.rtuInfo.photoTake) {
  827. formdata['rtuPhotoTake'] = 1;
  828. formdata['rtuPhotoUrl'] = this.rtuInfo.photoUrl;
  829. } else {
  830. formdata['rtuPhotoTake'] = 0;
  831. }
  832. formdata['rainSensorReplace'] = this.rainSensorInfo.replaceItems.current;
  833. formdata['rainSensorDesc'] = this.rainSensorInfo.remark;
  834. formdata['rainSensorStatus'] = this.rainSensorInfo.runStatus.current;
  835. if (this.rainSensorInfo.photoTake) {
  836. formdata['rainSensorPhotoTake'] = 1;
  837. formdata['rainSensorPhotoUrl'] = this.rainSensorInfo.photoUrl;
  838. } else {
  839. formdata['rainSensorPhotoTake'] = 0;
  840. }
  841. formdata['waterSensorReplace'] = this.waterSensorInfo.replaceItems.current;
  842. formdata['waterSensorDesc'] = this.waterSensorInfo.remark;
  843. formdata['waterLevelSensorStatus'] = this.waterSensorInfo.runStatus.current;
  844. if (this.waterSensorInfo.photoTake) {
  845. formdata['waterSensorPhotoTake'] = 1;
  846. formdata['waterSensorPhotoUrl'] = this.waterSensorInfo.photoUrl;
  847. } else {
  848. formdata['waterSensorPhotoTake'] = 0;
  849. }
  850. formdata['groundWaterSensorStatus'] = this.groundSensorInfo.runStatus.current;
  851. formdata['groundSensorReplace'] = this.groundSensorInfo.replaceItems.current;
  852. formdata['groundSensorDesc'] = this.groundSensorInfo.remark;
  853. if (this.groundSensorInfo.photoTake) {
  854. formdata['groundSensorPhotoTake'] = 1;
  855. formdata['groundSensorPhotoUrl'] = this.groundSensorInfo.photoUrl;
  856. } else {
  857. formdata['groundSensorPhotoTake'] = 0;
  858. }
  859. formdata['batteryReplace'] = this.powerInfo.batteryReplaceItems.current;
  860. formdata['sunPowerReplace'] = this.powerInfo.sunPowerReplaceItems.current;
  861. formdata['powerStatus'] = this.powerInfo.runStatus.current;
  862. formdata['powerDesc'] = this.powerInfo.remark;
  863. if (this.powerInfo.batteryPhotoTake) {
  864. formdata['batteryPhotoTake'] = 1;
  865. formdata['batteryPhotoUrl'] = this.powerInfo.batteryPhotoUrl;
  866. } else {
  867. formdata['batteryPhotoTake'] = 0;
  868. }
  869. if (this.powerInfo.sunPhotoTake) {
  870. formdata['sunPhotoTake'] = 1;
  871. formdata['sunPhotoUrl'] = this.powerInfo.sunPhotoUrl;
  872. } else {
  873. formdata['sunPhotoTake'] = 0;
  874. }
  875. formdata['networkOverdue'] = this.networkInfo.overdueItems.current;
  876. formdata['networkStatus'] = this.networkInfo.runStatus.current;
  877. formdata['networkDesc'] = this.networkInfo.remark;
  878. formdata['satelliteStatus'] = this.satelliteInfo.runStatus.current;
  879. formdata['satelliteDesc'] = this.satelliteInfo.remark;
  880. var that = this;
  881. http.request({
  882. url: '/galaxy-test/rtu/check/order/process/save',
  883. method: 'POST',
  884. data: formdata
  885. }).then(res => {
  886. if (res.success) {
  887. uni.showModal({
  888. content: '工单填报信息已成功提交',
  889. showCancel: false,
  890. success(res) {
  891. if (res.confirm) {
  892. that.toBack();
  893. }
  894. }
  895. });
  896. } else {
  897. uni.showModal({
  898. content: '' + res.msg,
  899. showCancel: false
  900. });
  901. }
  902. }).catch(err => {
  903. console.log(err)
  904. })
  905. },
  906. toSave() {
  907. },
  908. rtuReplaceDateClick(e) {
  909. console.log('maskClick事件:', e);
  910. },
  911. rainSensorReplaceDateClick(e) {
  912. console.log('maskClick事件:', e);
  913. },
  914. waterSensorReplaceDateClick(e) {
  915. console.log('maskClick事件:', e);
  916. },
  917. groundSensorReplaceDateClick(e) {
  918. console.log('maskClick事件:', e);
  919. },
  920. batteryReplaceDateClick(e) {
  921. console.log('maskClick事件:', e);
  922. },
  923. sunPowerReplaceDateClick(e) {
  924. console.log('maskClick事件:', e);
  925. },
  926. simPayEndDateClick(e) {
  927. console.log('maskClick事件:', e);
  928. },
  929. dateFormat(dt) {
  930. var text = "" + dt.getFullYear();
  931. text += "-";
  932. text += ((dt.getMonth() + 1) < 10) ? ("0" + (dt.getMonth() + 1)) : (dt
  933. .getMonth() +
  934. 1);
  935. text += "-";
  936. text += dt.getDate() < 10 ? "0" + dt.getDate() : dt.getDate();
  937. text += " ";
  938. text += dt.getHours() < 10 ? "0" + dt.getHours() : dt.getHours();
  939. text += ":";
  940. text += dt.getMinutes() < 10 ? "0" + dt.getMinutes() : dt.getMinutes();
  941. text += ":";
  942. text += dt.getSeconds() < 10 ? "0" + dt.getSeconds() : dt.getSeconds();
  943. return text;
  944. },
  945. getReportDict() {
  946. var that = this;
  947. var waterLevelSensorTypeDictList = [];
  948. //查询水位计
  949. http.request({
  950. url: '/galaxy-system/dict-biz/dictionary?code=water_level_sensor_type',
  951. method: 'GET'
  952. }).then(res => {
  953. console.log(res.data)
  954. if (res.data != null) {
  955. const dictLength = res.data['length'];
  956. for (var i = 0; i < dictLength; i++) {
  957. let dict = res.data['' + i];
  958. waterLevelSensorTypeDictList.push(dict);
  959. }
  960. that.waterLevelSensorType.items = waterLevelSensorTypeDictList;
  961. }
  962. }).catch(err => {
  963. console.log(err)
  964. })
  965. var groundSensorTypeDictList = [];
  966. //查询墒情传感器类型
  967. http.request({
  968. url: '/galaxy-system/dict-biz/dictionary?code=ground_water_sensor_type',
  969. method: 'GET'
  970. }).then(res => {
  971. console.log(res.data)
  972. if (res.data != null) {
  973. const dictLength = res.data['length'];
  974. for (var i = 0; i < dictLength; i++) {
  975. let dict = res.data['' + i];
  976. groundSensorTypeDictList.push(dict);
  977. }
  978. that.groundSensorType.items = groundSensorTypeDictList;
  979. }
  980. }).catch(err => {
  981. console.log(err)
  982. })
  983. //查询北斗模式
  984. var satelliteModelDictList = [];
  985. http.request({
  986. url: '/galaxy-system/dict-biz/dictionary?code=satellite_model',
  987. method: 'GET'
  988. }).then(res => {
  989. console.log(res.data)
  990. if (res.data != null) {
  991. const dictLength = res.data['length'];
  992. for (var i = 0; i < dictLength; i++) {
  993. let dict = res.data['' + i];
  994. satelliteModelDictList.push(dict);
  995. }
  996. that.satelliteModel.items = satelliteModelDictList;
  997. }
  998. }).catch(err => {
  999. console.log(err)
  1000. })
  1001. },
  1002. getPlanInfo() {
  1003. var that = this;
  1004. var postData = {};
  1005. postData['id'] = this.planId;
  1006. http.request({
  1007. url: '/galaxy-test/equipment/inspection/plan/detail',
  1008. method: 'GET',
  1009. data: postData
  1010. }).then(res => {
  1011. console.log(res)
  1012. if (res.data != null) {
  1013. that.planInfo = res.data;
  1014. }
  1015. }).catch(err => {
  1016. console.log(err)
  1017. })
  1018. },
  1019. onBasePhoto1DeleteClick() {
  1020. this.baseInfo.photo1Take = false;
  1021. },
  1022. onBasePhoto2DeleteClick() {
  1023. this.baseInfo.photo2Take = false;
  1024. },
  1025. onRtuPhotoDeleteClick() {
  1026. this.rtuInfo.photoTake = false;
  1027. },
  1028. onRainPhotoDeleteClick() {
  1029. this.rainSensorInfo.photoTake = false;
  1030. },
  1031. onWaterPhotoDeleteClick() {
  1032. this.waterSensorInfo.photoTake = false;
  1033. },
  1034. onGroundPhotoDeleteClick() {
  1035. this.groundSensorInfo.photoTake = false;
  1036. },
  1037. onBatteryPhotoDeleteClick() {
  1038. this.powerInfo.batteryPhotoTake = false;
  1039. },
  1040. onSunPowerPhotoDeleteClick() {
  1041. this.powerInfo.sunPhotoTake = false;
  1042. },
  1043. onRtuReplaceRadioChange: function(evt) {
  1044. for (let i = 0; i < this.rtuInfo.replaceItems.items.length; i++) {
  1045. if (this.rtuInfo.replaceItems.items[i].id === evt.detail.value) {
  1046. this.rtuInfo.replaceItems.current = i;
  1047. break;
  1048. }
  1049. }
  1050. },
  1051. onRainReplaceRadioChange: function(evt) {
  1052. for (let i = 0; i < this.rainSensorInfo.replaceItems.items.length; i++) {
  1053. if (this.rainSensorInfo.replaceItems.items[i].id === evt.detail.value) {
  1054. this.rainSensorInfo.replaceItems.current = i;
  1055. break;
  1056. }
  1057. }
  1058. },
  1059. onWaterReplaceRadioChange: function(evt) {
  1060. for (let i = 0; i < this.waterSensorInfo.replaceItems.items.length; i++) {
  1061. if (this.waterSensorInfo.replaceItems.items[i].id === evt.detail.value) {
  1062. this.waterSensorInfo.replaceItems.current = i;
  1063. break;
  1064. }
  1065. }
  1066. },
  1067. onGroundReplaceRadioChange: function(evt) {
  1068. for (let i = 0; i < this.groundSensorInfo.replaceItems.items.length; i++) {
  1069. if (this.groundSensorInfo.replaceItems.items[i].id === evt.detail.value) {
  1070. this.groundSensorInfo.replaceItems.current = i;
  1071. break;
  1072. }
  1073. }
  1074. },
  1075. onBatteryReplaceRadioChange: function(evt) {
  1076. for (let i = 0; i < this.powerInfo.batteryReplaceItems.items.length; i++) {
  1077. if (this.powerInfo.batteryReplaceItems.items[i].id === evt.detail.value) {
  1078. this.powerInfo.batteryReplaceItems.current = i;
  1079. break;
  1080. }
  1081. }
  1082. },
  1083. onSunPowerReplaceRadioChange: function(evt) {
  1084. for (let i = 0; i < this.powerInfo.sunPowerReplaceItems.items.length; i++) {
  1085. if (this.powerInfo.sunPowerReplaceItems.items[i].id === evt.detail.value) {
  1086. this.powerInfo.sunPowerReplaceItems.current = i;
  1087. break;
  1088. }
  1089. }
  1090. },
  1091. onNetworkOverdueRadioChange: function(evt) {
  1092. for (let i = 0; i < this.networkInfo.overdueItems.items.length; i++) {
  1093. if (this.networkInfo.overdueItems.items[i].id === evt.detail.value) {
  1094. this.networkInfo.overdueItems.current = i;
  1095. break;
  1096. }
  1097. }
  1098. },
  1099. onRtuStatusRadioChange: function(evt) {
  1100. for (let i = 0; i < this.rtuInfo.runStatus.items.length; i++) {
  1101. if (this.rtuInfo.runStatus.items[i].id === evt.detail.value) {
  1102. this.rtuInfo.runStatus.current = i;
  1103. break;
  1104. }
  1105. }
  1106. },
  1107. onRainSensorStatusRadioChange: function(evt) {
  1108. for (let i = 0; i < this.rainSensorInfo.runStatus.items.length; i++) {
  1109. if (this.rainSensorInfo.runStatus.items[i].id === evt.detail.value) {
  1110. this.rainSensorInfo.runStatus.current = i;
  1111. break;
  1112. }
  1113. }
  1114. },
  1115. onWaterSensorStatusRadioChange: function(evt) {
  1116. for (let i = 0; i < this.waterSensorInfo.runStatus.items.length; i++) {
  1117. if (this.waterSensorInfo.runStatus.items[i].id === evt.detail.value) {
  1118. this.waterSensorInfo.runStatus.current = i;
  1119. break;
  1120. }
  1121. }
  1122. },
  1123. onGroundSensorStatusRadioChange: function(evt) {
  1124. for (let i = 0; i < this.groundSensorInfo.runStatus.items.length; i++) {
  1125. if (this.groundSensorInfo.runStatus.items[i].id === evt.detail.value) {
  1126. this.groundSensorInfo.runStatus.current = i;
  1127. break;
  1128. }
  1129. }
  1130. },
  1131. onPowerStatusRadioChange: function(evt) {
  1132. for (let i = 0; i < this.powerInfo.runStatus.items.length; i++) {
  1133. if (this.powerInfo.runStatus.items[i].id === evt.detail.value) {
  1134. this.powerInfo.runStatus.current = i;
  1135. break;
  1136. }
  1137. }
  1138. },
  1139. onNetworkStatusRadioChange: function(evt) {
  1140. for (let i = 0; i < this.networkInfo.runStatus.items.length; i++) {
  1141. if (this.networkInfo.runStatus.items[i].id === evt.detail.value) {
  1142. this.networkInfo.runStatus.current = i;
  1143. break;
  1144. }
  1145. }
  1146. },
  1147. onSatelliteStatusRadioChange: function(evt) {
  1148. for (let i = 0; i < this.satelliteInfo.runStatus.items.length; i++) {
  1149. if (this.satelliteInfo.runStatus.items[i].id === evt.detail.value) {
  1150. this.satelliteInfo.runStatus.current = i;
  1151. break;
  1152. }
  1153. }
  1154. },
  1155. uploadPhotoCallback(path, photoIndex) {
  1156. if (photoIndex === 'basePhoto1') {
  1157. this.baseInfo.photo1Url = path;
  1158. this.baseInfo.photo1Take = true;
  1159. } else if (photoIndex === 'basePhoto2') {
  1160. this.baseInfo.photo2Url = path;
  1161. this.baseInfo.photo2Take = true;
  1162. } else if (photoIndex === 'rtu') {
  1163. this.rtuInfo.photoUrl = path;
  1164. this.rtuInfo.photoTake = true;
  1165. } else if (photoIndex === 'rain') {
  1166. this.rainSensorInfo.photoUrl = path;
  1167. this.rainSensorInfo.photoTake = true;
  1168. } else if (photoIndex === 'water') {
  1169. this.waterSensorInfo.photoUrl = path;
  1170. this.waterSensorInfo.photoTake = true;
  1171. } else if (photoIndex === 'ground') {
  1172. this.groundSensorInfo.photoUrl = path;
  1173. this.groundSensorInfo.photoTake = true;
  1174. } else if (photoIndex === 'battery') {
  1175. this.powerInfo.batteryPhotoUrl = path;
  1176. this.powerInfo.batteryPhotoTake = true;
  1177. } else if (photoIndex === 'sun') {
  1178. this.powerInfo.sunPhotoUrl = path;
  1179. this.powerInfo.sunPhotoTake = true;
  1180. }
  1181. },
  1182. uploadPhoto(imagePath, photoIndex) {
  1183. var that = this;
  1184. console.log("accessToken:" + uni.getStorageSync('accessToken'));
  1185. console.log("path " + imagePath);
  1186. uni.showLoading({
  1187. title: '上传中'
  1188. });
  1189. uni.uploadFile({
  1190. url: this.baseURL +
  1191. '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  1192. uni.getStorageSync('accessToken'),
  1193. fileType: 'image',
  1194. filePath: imagePath,
  1195. name: 'file',
  1196. success: (uploadFileRes) => {
  1197. uni.hideLoading()
  1198. if (uploadFileRes.statusCode == 200) {
  1199. let data = JSON.parse(uploadFileRes.data);
  1200. if (data.success) {
  1201. let path = data.data['name'];
  1202. console.log("paht " + path);
  1203. that.uploadPhotoCallback(path, photoIndex);
  1204. }
  1205. }
  1206. },
  1207. fail: (err) => {
  1208. uni.hideLoading()
  1209. console.log(err);
  1210. reject('err')
  1211. },
  1212. complete() {
  1213. uni.hideLoading()
  1214. }
  1215. });
  1216. },
  1217. getBasePhoto1() {
  1218. var that = this;
  1219. uni.chooseImage({
  1220. sourceType: ['album', 'camera'],
  1221. success: (res) => {
  1222. const len = res.tempFilePaths.length;
  1223. if (len === 1) {
  1224. res.tempFilePaths.forEach(path => {
  1225. that.uploadPhoto(path, 'basePhoto1');
  1226. })
  1227. } else {
  1228. uni.showModal({
  1229. content: '只能选择一张图片,请确认!',
  1230. showCancel: false
  1231. });
  1232. }
  1233. }
  1234. })
  1235. },
  1236. getBasePhoto2() {
  1237. var that = this;
  1238. uni.chooseImage({
  1239. sourceType: ['album', 'camera'],
  1240. success: (res) => {
  1241. const len = res.tempFilePaths.length;
  1242. if (len === 1) {
  1243. res.tempFilePaths.forEach(path => {
  1244. that.uploadPhoto(path, 'basePhoto2');
  1245. })
  1246. } else {
  1247. uni.showModal({
  1248. content: '只能选择一张图片,请确认!',
  1249. showCancel: false
  1250. });
  1251. }
  1252. }
  1253. })
  1254. },
  1255. getRtuPhoto() {
  1256. var that = this;
  1257. uni.chooseImage({
  1258. sourceType: ['album', 'camera'],
  1259. success: (res) => {
  1260. const len = res.tempFilePaths.length;
  1261. if (len === 1) {
  1262. res.tempFilePaths.forEach(path => {
  1263. that.uploadPhoto(path, 'rtu');
  1264. })
  1265. } else {
  1266. uni.showModal({
  1267. content: '只能选择一张图片,请确认!',
  1268. showCancel: false
  1269. });
  1270. }
  1271. }
  1272. })
  1273. },
  1274. getRainSensorPhoto() {
  1275. var that = this;
  1276. uni.chooseImage({
  1277. sourceType: ['album', 'camera'],
  1278. success: (res) => {
  1279. const len = res.tempFilePaths.length;
  1280. if (len === 1) {
  1281. res.tempFilePaths.forEach(path => {
  1282. that.uploadPhoto(path, 'rain');
  1283. })
  1284. } else {
  1285. uni.showModal({
  1286. content: '只能选择一张图片,请确认!',
  1287. showCancel: false
  1288. });
  1289. }
  1290. }
  1291. })
  1292. },
  1293. getWaterSensorPhoto() {
  1294. var that = this;
  1295. uni.chooseImage({
  1296. sourceType: ['album', 'camera'],
  1297. success: (res) => {
  1298. const len = res.tempFilePaths.length;
  1299. if (len === 1) {
  1300. res.tempFilePaths.forEach(path => {
  1301. that.uploadPhoto(path, 'water');
  1302. })
  1303. } else {
  1304. uni.showModal({
  1305. content: '只能选择一张图片,请确认!',
  1306. showCancel: false
  1307. });
  1308. }
  1309. }
  1310. })
  1311. },
  1312. getGroundSensorPhoto() {
  1313. var that = this;
  1314. uni.chooseImage({
  1315. sourceType: ['album', 'camera'],
  1316. success: (res) => {
  1317. const len = res.tempFilePaths.length;
  1318. if (len === 1) {
  1319. res.tempFilePaths.forEach(path => {
  1320. that.uploadPhoto(path, 'ground');
  1321. })
  1322. } else {
  1323. uni.showModal({
  1324. content: '只能选择一张图片,请确认!',
  1325. showCancel: false
  1326. });
  1327. }
  1328. }
  1329. })
  1330. },
  1331. getBatteryPhoto() {
  1332. var that = this;
  1333. uni.chooseImage({
  1334. sourceType: ['album', 'camera'],
  1335. success: (res) => {
  1336. const len = res.tempFilePaths.length;
  1337. if (len === 1) {
  1338. res.tempFilePaths.forEach(path => {
  1339. that.uploadPhoto(path, 'battery');
  1340. })
  1341. } else {
  1342. uni.showModal({
  1343. content: '只能选择一张图片,请确认!',
  1344. showCancel: false
  1345. });
  1346. }
  1347. }
  1348. })
  1349. },
  1350. getSunPowerPhoto() {
  1351. var that = this;
  1352. uni.chooseImage({
  1353. sourceType: ['album', 'camera'],
  1354. success: (res) => {
  1355. const len = res.tempFilePaths.length;
  1356. if (len === 1) {
  1357. res.tempFilePaths.forEach(path => {
  1358. that.uploadPhoto(path, 'sun');
  1359. })
  1360. } else {
  1361. uni.showModal({
  1362. content: '只能选择一张图片,请确认!',
  1363. showCancel: false
  1364. });
  1365. }
  1366. }
  1367. })
  1368. },
  1369. onSaveClick(e) {
  1370. if ((this.projectInfo.projectId != null && this.projectInfo.projectId.length > 0) &&
  1371. (this.checkAreaDict.id != null && this.checkAreaDict.id.length > 0) &&
  1372. (this.checkItemTypeDict.id != null && this.checkItemTypeDict.id.length > 0) &&
  1373. (this.checkItemLabelDict.id != null && this.checkItemLabelDict.id.length > 0) &&
  1374. (this.checkStandardDict.id != null && this.checkStandardDict.id.length > 0)) {
  1375. try {
  1376. var data = {};
  1377. data['failureHiddenDangerDesc'] = this.failureHiddenDangerDesc;
  1378. data['failureCheckPointDesc'] = this.failureCheckPointDesc;
  1379. data['failureCorrectiveSuggest'] = this.failureCorrectiveSuggest;
  1380. data['failureCheckNo'] = this.checkNo;
  1381. data['failureProjectId'] = this.projectInfo.projectId;
  1382. data['failureCheckArea'] = this.checkAreaDict.id;
  1383. data['failureCheckHiddenDangerType'] = this.checkItemTypeDict.id;
  1384. data['failureCheckHiddenDanger'] = this.checkItemLabelDict.id;
  1385. data['failureCheckHiddenDangerItemPoint'] = this.checkStandardDict.id;
  1386. data['failureCheckHiddenDangerStandard'] = this.checkItemStandardBasisDict.id;
  1387. data['failureHiddenDangerLevel'] = this.hiddenDangerRadio.items[this.hiddenDangerRadio.current]
  1388. .id;
  1389. data['failureCorrectivePlanTime'] = this.planTimeRadio.items[this.planTimeRadio.current]
  1390. .id;
  1391. data['createTime'] = this.dateFormat(new Date());
  1392. data['createUserName'] = this.userInfo1.nick_name;
  1393. this.saveLocalFiles();
  1394. console.log("save " + data);
  1395. var list = uni.getStorageSync('check_report_storage_index');
  1396. if (list != null && list.length > 0) {
  1397. list.push(this.checkNo);
  1398. uni.setStorageSync('check_report_storage_index', list);
  1399. uni.setStorageSync('check_report_storage_' + this.checkNo, data);
  1400. } else {
  1401. list = [];
  1402. list.push(this.checkNo);
  1403. uni.setStorageSync('check_report_storage_index', list);
  1404. uni.setStorageSync('check_report_storage_' + this.checkNo, data);
  1405. }
  1406. var that = this;
  1407. uni.showModal({
  1408. title: '流程确认',
  1409. content: '请选择复制或继续检查',
  1410. cancelText: '复制检查单',
  1411. confirmText: '继续检查',
  1412. success: function(res) {
  1413. if (res.confirm) {
  1414. that.onContinunClick();
  1415. } else if (res.cancel) {
  1416. that.onCopyClick();
  1417. }
  1418. }
  1419. });
  1420. //uni.navigateBack();
  1421. } catch (e) {
  1422. console.log(e)
  1423. uni.showModal({
  1424. content: '保存失败!',
  1425. showCancel: false
  1426. });
  1427. }
  1428. } else {
  1429. uni.showModal({
  1430. content: '请检查必填项',
  1431. showCancel: false
  1432. });
  1433. }
  1434. },
  1435. formReset: function(e) {
  1436. console.log('清空数据')
  1437. },
  1438. }
  1439. }
  1440. </script>
  1441. <style>
  1442. /* page {
  1443. background-color: rgb(240, 242, 244);
  1444. } */
  1445. </style>
  1446. <style lang="scss" scoped>
  1447. .cell-hover-class {
  1448. background-color: rgb(235, 237, 238);
  1449. }
  1450. .view-flex-rs {
  1451. display: flex;
  1452. flex-direction: row;
  1453. justify-content: flex-start;
  1454. align-items: center;
  1455. }
  1456. .view-flex-rc {
  1457. display: flex;
  1458. flex-direction: row;
  1459. justify-content: center;
  1460. align-items: center;
  1461. }
  1462. .view-flex-re {
  1463. display: flex;
  1464. flex-direction: row;
  1465. justify-content: flex-end;
  1466. align-items: center;
  1467. }
  1468. .view-flex-cs {
  1469. display: flex;
  1470. flex-direction: column;
  1471. justify-content: flex-start;
  1472. }
  1473. .view-flex-cc {
  1474. display: flex;
  1475. flex-direction: column;
  1476. justify-content: center;
  1477. }
  1478. .view-flex-ce {
  1479. display: flex;
  1480. flex-direction: column;
  1481. justify-content: flex-end;
  1482. }
  1483. .line-body {
  1484. padding-left: 10px;
  1485. padding-right: 10px;
  1486. }
  1487. .required-star {
  1488. color: #FF0000;
  1489. font-size: 15px;
  1490. width: 20px;
  1491. text-align: center;
  1492. padding-left: 0px;
  1493. padding-right: 2px;
  1494. }
  1495. .item-title {
  1496. color: #909399;
  1497. font-size: 15px;
  1498. }
  1499. .mline-text {
  1500. padding-left: 2px;
  1501. width: 100%;
  1502. /* background-color:#909399; */
  1503. height: 70px;
  1504. border: 1px solid #FF5A5F;
  1505. border-radius: 5px;
  1506. }
  1507. .footer {
  1508. position: fixed;
  1509. bottom: 0;
  1510. left: 0;
  1511. right: 0;
  1512. z-index: 1;
  1513. height: 100rpx;
  1514. padding: 20rpx;
  1515. box-sizing: border-box;
  1516. display: flex;
  1517. align-items: center;
  1518. justify-content: flex-end;
  1519. background-color: #ffffff;
  1520. .ipt {
  1521. width: 380rpx;
  1522. height: 77rpx;
  1523. background: #f7f7f7;
  1524. border-radius: 38px;
  1525. padding: 0 37rpx;
  1526. box-sizing: border-box;
  1527. margin-right: 20rpx;
  1528. }
  1529. .control {
  1530. flex: 1;
  1531. display: flex;
  1532. align-items: center;
  1533. justify-content: flex-end;
  1534. .block {
  1535. display: flex;
  1536. align-items: center;
  1537. justify-content: center;
  1538. flex: 1;
  1539. }
  1540. .icon {
  1541. height: auto;
  1542. }
  1543. .c {
  1544. width: 41rpx;
  1545. margin-right: 10rpx;
  1546. }
  1547. .s {
  1548. width: 36rpx;
  1549. }
  1550. .t {
  1551. width: 31rpx;
  1552. }
  1553. }
  1554. }
  1555. .container {
  1556. padding: 0 0 100rpx;
  1557. }
  1558. .u-cell-icon {
  1559. width: 36rpx;
  1560. height: 36rpx;
  1561. margin-right: 8rpx;
  1562. }
  1563. .slot-box {
  1564. /* #ifndef APP-NVUE */
  1565. display: flex;
  1566. /* #endif */
  1567. flex-direction: row;
  1568. align-items: center;
  1569. }
  1570. .slot-image {
  1571. /* #ifndef APP-NVUE */
  1572. display: block;
  1573. /* #endif */
  1574. margin-right: 10px;
  1575. width: 30px;
  1576. height: 30px;
  1577. }
  1578. .slot-text {
  1579. flex: 1;
  1580. font-size: 14px;
  1581. color: #4cd964;
  1582. margin-right: 10px;
  1583. }
  1584. .img-container {
  1585. margin-bottom: 0px;
  1586. width: 100px;
  1587. height: 100px;
  1588. .note-image-box {
  1589. margin-top: 0px;
  1590. display: flex;
  1591. flex-wrap: wrap;
  1592. padding: 10px;
  1593. .note-image-item {
  1594. position: relative;
  1595. width: 100%;
  1596. height: 0;
  1597. padding-top: 100%;
  1598. box-sizing: border-box;
  1599. // background-color: #18B566;
  1600. .close-icon {
  1601. display: flex;
  1602. justify-content: center;
  1603. align-items: center;
  1604. position: absolute;
  1605. right: 0px;
  1606. top: 0px;
  1607. width: 22px;
  1608. height: 22px;
  1609. border-radius: 50%;
  1610. background-color: #d5d5d5;
  1611. z-index: 2;
  1612. }
  1613. .image-box {
  1614. display: flex;
  1615. justify-content: center;
  1616. align-items: center;
  1617. position: absolute;
  1618. top: 5px;
  1619. right: 5px;
  1620. border: 5px;
  1621. left: 5px;
  1622. border: 1px #eee solid;
  1623. border-radius: 5px;
  1624. overflow: hidden;
  1625. width: 98%;
  1626. height: 98%;
  1627. }
  1628. }
  1629. }
  1630. }
  1631. .input-body {
  1632. background-color: #fff;
  1633. padding: 10px;
  1634. }
  1635. </style>