equipmentinspectionreport.vue 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862
  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 class="nav-title">
  14. <text>{{title}}</text>
  15. </view>
  16. </uni-nav-bar>
  17. <uni-forms ref="baseForm" :model="formData">
  18. <uni-section title="移动网络信号" ftitleFontSize="0.8rem" style="width: 100%;">
  19. <template v-slot:decoration>
  20. <view class="decoration"></view>
  21. </template>
  22. <view style="padding-top: 10px;padding-bottom: 10px;padding-left: 15px;padding-right: 15px;">
  23. <uni-forms-item name="networkSignalStatus" label="手机网络信号" label-width="130px" required>
  24. <uni-data-checkbox v-model="formData.networkSignalStatus" :localdata="ispItems.items">
  25. </uni-data-checkbox>
  26. </uni-forms-item>
  27. <view
  28. style="margin-top: 10px;margin-bottom: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.6rem;color:skyblue;">
  29. 备注:如以下物联网卡信息发生变化,请仔细核对修改</view>
  30. <uni-forms-item name='networkPayer' label="物联网卡运营商" label-width="130px">
  31. <uni-easyinput v-model="formData.networkPayer" placeholder="请录入物联网卡运营商名称" />
  32. </uni-forms-item>
  33. <uni-forms-item name='networkSimId' label="物联网卡号" label-width="130px">
  34. <uni-easyinput v-model="formData.networkSimId" placeholder="请录入物联网卡号" />
  35. </uni-forms-item>
  36. </view>
  37. </uni-section>
  38. <uni-section title="基础信息" titleFontSize="0.8rem" style="width: 100%;">
  39. <template v-slot:decoration>
  40. <view class="decoration"></view>
  41. </template>
  42. <view style="padding-top: 10px;padding-bottom: 10px;padding-left: 15px;padding-right: 15px;">
  43. <uni-forms-item label="测站名称:" label-width="100px">
  44. <view class="view-flex-rs" style="height: 100%;">
  45. <view class="view-flex-cc"><text>{{rtuInfo.rtuName}}</text></view>
  46. </view>
  47. </uni-forms-item>
  48. <uni-forms-item label="测站编码:" label-width="100px">
  49. <view class="view-flex-rs" style="height: 100%;">
  50. <view class="view-flex-cc"><text>{{rtuInfo.rtuCode}}</text></view>
  51. </view>
  52. </uni-forms-item>
  53. <uni-forms-item label="测站类型:" label-width="100px">
  54. <view class="view-flex-rs" style="height: 100%;">
  55. <view class="view-flex-cc">
  56. <text>{{toRtuKind()}}</text>
  57. </view>
  58. </view>
  59. </uni-forms-item>
  60. </view>
  61. </uni-section>
  62. <uni-section title="地理信息" titleFontSize="0.8rem" style="width: 100%;">
  63. <template v-slot:decoration>
  64. <view class="decoration"></view>
  65. </template>
  66. <view style="padding-top: 10px;padding-bottom: 10px;padding-left: 15px;padding-right: 15px;">
  67. <!-- <view style="margin-bottom: 10px;font-size: 0.7rem;color:lightcoral;">备注:以下信息可以进行修改</view> -->
  68. <uni-forms-item label="测站安装地址:" label-width="100px">
  69. <view class="view-flex-rs" style="height: 100%;">
  70. <view class="view-flex-cc"><text>{{data.locationDesc}}</text></view>
  71. </view>
  72. </uni-forms-item>
  73. <uni-forms-item label="经纬度:" label-width="100px">
  74. <view class="view-flex-rs" style="height: 100%;">
  75. <view class="view-flex-cc"><text>{{data.lng}}/{{data.lat}}</text></view>
  76. </view>
  77. </uni-forms-item>
  78. </view>
  79. </uni-section>
  80. <uni-section title="站点状态检查" titleFontSize="0.8rem" style="width: 100%;">
  81. <template v-slot:decoration>
  82. <view class="decoration"></view>
  83. </template>
  84. <uni-card title="检查项(单选)" :is-shadow="false">
  85. <radio-group @change="onSiteCheckStatusRadioChange" class="view-flex-rs">
  86. <label style="margin-right: 10px;width:80px" class="view-flex-rs"
  87. v-for="(item, index) in data.siteCheckStatus.items" :key="item.id">
  88. <view>
  89. <radio :value="item.id" :checked="index === data.siteCheckStatus.current" />
  90. </view>
  91. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  92. </label>
  93. </radio-group>
  94. </uni-card>
  95. <uni-card title="拍摄照片" extra="点击下方按钮开始拍摄" :is-shadow="false">
  96. <view
  97. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  98. 备注:必填项,至少要拍一张照片</view>
  99. <view class="view-flex-rs-flex-wrap">
  100. <view v-for="(item, index) in data.siteCheckPhotos" :key="index" class="view-flex-cc"
  101. style="width: 100px;">
  102. <view class="img-container">
  103. <view class="note-image-box">
  104. <view class="note-image-item">
  105. <view class="close-icon" @click="onSiteCheckPhotoDel(index)">
  106. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  107. </view>
  108. <view class="image-box">
  109. <image :src="toOss(item)" mode="widthFix">
  110. </image>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. <view class="view-flex-cc" style="width: 80px;">
  117. <view class="img-container">
  118. <view class="note-image-box">
  119. <view class="note-image-item" @click="onSiteCheckPhotoAdd()">
  120. <view class="image-box">
  121. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. </uni-card>
  129. <uni-card title="站点检查补充说明:" :is-shadow="false">
  130. <uni-easyinput type="textarea" v-model="data.siteCheckRemark" placeholder="请输入站点检查补充说明" />
  131. </uni-card>
  132. </uni-section>
  133. <uni-section v-if="rtuInfo.isRain" title="雨量站检查" titleFontSize="0.8rem" style="width: 100%;">
  134. <template v-slot:decoration>
  135. <view class="decoration"></view>
  136. </template>
  137. <uni-card title="检查项(多选)" :is-shadow="false">
  138. <checkbox-group @change="onRainSiteCheckboxChange" class="view-flex-rs">
  139. <label class="view-flex-rs" style="margin-right: 10px;font-size: 0.7rem;"
  140. v-for="(item, index) in data.rainSiteCheckItems.items" :key="item.id">
  141. <view>
  142. <checkbox v-if="item.checked" :value="item.id" checked="true" />
  143. <checkbox v-else :value="item.id" />
  144. </view>
  145. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  146. </label>
  147. </checkbox-group>
  148. </uni-card>
  149. <uni-card title="拍摄照片" extra="点击下方按钮开始拍摄" :is-shadow="false">
  150. <view class="view-flex-rs-flex-wrap">
  151. <view v-for="(item, index) in data.rainSiteCheckPhotos" :key="index" class="view-flex-cc"
  152. style="width: 80px;">
  153. <view class="img-container">
  154. <view class="note-image-box">
  155. <view class="note-image-item">
  156. <view class="close-icon" @click="onRainSitePhotoDel(index)">
  157. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  158. </view>
  159. <view class="image-box">
  160. <image :src="toOss(item)" mode="widthFix">
  161. </image>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. <view class="view-flex-cc" style="width: 80px;">
  168. <view class="img-container">
  169. <view class="note-image-box">
  170. <view class="note-image-item" @click="onRainSiteCheckPhotoAdd()">
  171. <view class="image-box">
  172. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  173. </view>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. </uni-card>
  180. <uni-card title="巡检结果" :is-shadow="false">
  181. <radio-group @change="onRainSiteCheckStatusRadioChange" class="view-flex-rs">
  182. <label style="margin-right: 10px;width:80px" class="view-flex-rs"
  183. v-for="(item, index) in data.rainSiteCheckStatus.items" :key="item.id">
  184. <view>
  185. <radio :value="item.id" :checked="index === data.rainSiteCheckStatus.current" />
  186. </view>
  187. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  188. </label>
  189. </radio-group>
  190. </uni-card>
  191. <uni-card title="雨量站检查补充说明:" :is-shadow="false">
  192. <uni-easyinput type="textarea" v-model="data.rainSiteCheckRemark" placeholder="请输入雨量站检查补充说明" />
  193. </uni-card>
  194. </uni-section>
  195. <uni-section v-if="rtuInfo.isRiver || rtuInfo.isRes" title="水位站检查" titleFontSize="0.8rem"
  196. style="width: 100%;">
  197. <template v-slot:decoration>
  198. <view class="decoration"></view>
  199. </template>
  200. <uni-card title="检查项(多选)" :is-shadow="false">
  201. <checkbox-group @change="onWaterSiteCheckboxChange" class="view-flex-rs">
  202. <label class="view-flex-rs" style="margin-right: 10px;font-size: 0.7rem;"
  203. v-for="(item, index) in data.waterSiteCheckItems.items" :key="item.id">
  204. <view>
  205. <checkbox v-if="item.checked" :value="item.id" checked="true" />
  206. <checkbox v-else :value="item.id" />
  207. </view>
  208. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  209. </label>
  210. </checkbox-group>
  211. </uni-card>
  212. <uni-card title="拍摄照片" extra="点击下方按钮开始拍摄" :is-shadow="false">
  213. <view class="view-flex-rs-flex-wrap">
  214. <view v-for="(item, index) in data.waterSiteCheckPhotos" :key="index" class="view-flex-cc"
  215. style="width: 80px;">
  216. <view class="img-container">
  217. <view class="note-image-box">
  218. <view class="note-image-item">
  219. <view class="close-icon" @click="onWaterSitePhotoDel(index)">
  220. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  221. </view>
  222. <view class="image-box">
  223. <image :src="toOss(item)" mode="widthFix">
  224. </image>
  225. </view>
  226. </view>
  227. </view>
  228. </view>
  229. </view>
  230. <view class="view-flex-cc" style="width: 80px;">
  231. <view class="img-container">
  232. <view class="note-image-box">
  233. <view class="note-image-item" @click="onWaterSiteCheckPhotoAdd()">
  234. <view class="image-box">
  235. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  236. </view>
  237. </view>
  238. </view>
  239. </view>
  240. </view>
  241. </view>
  242. </uni-card>
  243. <uni-card title="巡检结果" :is-shadow="false">
  244. <radio-group @change="onWaterSiteCheckStatusRadioChange" class="view-flex-rs">
  245. <label style="margin-right: 10px;width:80px" class="view-flex-rs"
  246. v-for="(item, index) in data.waterSiteCheckStatus.items" :key="item.id">
  247. <view>
  248. <radio :value="item.id" :checked="index === data.waterSiteCheckStatus.current" />
  249. </view>
  250. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  251. </label>
  252. </radio-group>
  253. </uni-card>
  254. <uni-card title="水位站检查补充说明:" :is-shadow="false">
  255. <uni-easyinput type="textarea" v-model="data.waterSiteCheckRemark" placeholder="请输入水位站检查补充说明" />
  256. </uni-card>
  257. </uni-section>
  258. <uni-section v-if="rtuInfo.isGround" title="墒情站检查" titleFontSize="0.8rem" style="width: 100%;">
  259. <template v-slot:decoration>
  260. <view class="decoration"></view>
  261. </template>
  262. <uni-card title="检查项(多选)" :is-shadow="false">
  263. <checkbox-group @change="onGroundSiteCheckboxChange" class="view-flex-rs">
  264. <label class="view-flex-rs" style="margin-right: 10px;font-size: 0.7rem;"
  265. v-for="(item, index) in data.groundSiteCheckItems.items" :key="item.id">
  266. <view>
  267. <checkbox v-if="item.checked" :value="item.id" checked="true" />
  268. <checkbox v-else :value="item.id" />
  269. </view>
  270. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  271. </label>
  272. </checkbox-group>
  273. </uni-card>
  274. <uni-card title="拍摄照片" extra="点击下方按钮开始拍摄" :is-shadow="false">
  275. <view class="view-flex-rs-flex-wrap">
  276. <view v-for="(item, index) in data.groundSiteCheckPhotos" :key="index" class="view-flex-cc"
  277. style="width: 80px;">
  278. <view class="img-container">
  279. <view class="note-image-box">
  280. <view class="note-image-item">
  281. <view class="close-icon" @click="onGroundSitePhotoDel(index)">
  282. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  283. </view>
  284. <view class="image-box">
  285. <image :src="toOss(item)" mode="widthFix">
  286. </image>
  287. </view>
  288. </view>
  289. </view>
  290. </view>
  291. </view>
  292. <view class="view-flex-cc" style="width: 80px;">
  293. <view class="img-container">
  294. <view class="note-image-box">
  295. <view class="note-image-item" @click="onGroundSiteCheckPhotoAdd()">
  296. <view class="image-box">
  297. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  298. </view>
  299. </view>
  300. </view>
  301. </view>
  302. </view>
  303. </view>
  304. </uni-card>
  305. <uni-card title="巡检结果" :is-shadow="false">
  306. <radio-group @change="onGroundSiteCheckStatusRadioChange" class="view-flex-rs">
  307. <label style="margin-right: 10px;width:80px" class="view-flex-rs"
  308. v-for="(item, index) in data.groundSiteCheckStatus.items" :key="item.id">
  309. <view>
  310. <radio :value="item.id" :checked="index === data.groundSiteCheckStatus.current" />
  311. </view>
  312. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  313. </label>
  314. </radio-group>
  315. </uni-card>
  316. <uni-card title="墒情站检查补充说明:" :is-shadow="false">
  317. <uni-easyinput type="textarea" v-model="data.groundSiteCheckRemark" placeholder="请输入墒情站检查补充说明" />
  318. </uni-card>
  319. </uni-section>
  320. <uni-section title="其他设备检查" titleFontSize="0.8rem" style="width: 100%;">
  321. <template v-slot:decoration>
  322. <view class="decoration"></view>
  323. </template>
  324. <uni-card title="检查项(多选)" :is-shadow="false">
  325. <checkbox-group @change="onOthersEquipmentCheckboxChange" class="view-flex-rs-flex-wrap">
  326. <label class="view-flex-rs"
  327. style="width: 140px;margin-bottom: 10px;margin-right: 10px;font-size: 0.7rem;"
  328. v-for="(item, index) in data.othersEquipmentCheckItems.items" :key="item.id">
  329. <view>
  330. <checkbox v-if="item.checked" :value="item.id" checked="true" />
  331. <checkbox v-else :value="item.id" />
  332. </view>
  333. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  334. </label>
  335. </checkbox-group>
  336. </uni-card>
  337. <uni-card title="拍摄照片" extra="点击下方按钮开始拍摄" :is-shadow="false">
  338. <view class="view-flex-rs-flex-wrap">
  339. <view v-for="(item, index) in data.othersEquipmentCheckPhotos" :key="index" class="view-flex-cc"
  340. style="width: 80px;">
  341. <view class="img-container">
  342. <view class="note-image-box">
  343. <view class="note-image-item">
  344. <view class="close-icon" @click="onOthersEquipmentPhotoDel(index)">
  345. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  346. </view>
  347. <view class="image-box">
  348. <image :src="toOss(item)" mode="widthFix">
  349. </image>
  350. </view>
  351. </view>
  352. </view>
  353. </view>
  354. </view>
  355. <view class="view-flex-cc" style="width: 80px;">
  356. <view class="img-container">
  357. <view class="note-image-box">
  358. <view class="note-image-item" @click="onOthersEquipmentCheckPhotoAdd()">
  359. <view class="image-box">
  360. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  361. </view>
  362. </view>
  363. </view>
  364. </view>
  365. </view>
  366. </view>
  367. </uni-card>
  368. <uni-card title="巡检结果" :is-shadow="false">
  369. <radio-group @change="onOthersEquipmentCheckStatusRadioChange" class="view-flex-rs">
  370. <label style="margin-right: 10px;width:80px" class="view-flex-rs"
  371. v-for="(item, index) in data.othersEquipmentCheckStatus.items" :key="item.id">
  372. <view>
  373. <radio :value="item.id" :checked="index === data.othersEquipmentCheckStatus.current" />
  374. </view>
  375. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  376. </label>
  377. </radio-group>
  378. </uni-card>
  379. <uni-card title="其他设备检查补充说明:" :is-shadow="false">
  380. <uni-easyinput type="textarea" v-model="data.othersEquipmentCheckRemark"
  381. placeholder="请输入其他设备检查补充说明" />
  382. </uni-card>
  383. </uni-section>
  384. <uni-section title="设备更换" titleFontSize="0.8rem" style="width: 100%;">
  385. <template v-slot:decoration>
  386. <view class="decoration"></view>
  387. </template>
  388. <uni-card title="设备项(多选)" :is-shadow="false">
  389. <checkbox-group @change="onEquipmentReplaceCheckboxChange" class="view-flex-rs-flex-wrap">
  390. <label class="view-flex-rs"
  391. style="width: 140px;margin-bottom: 10px;margin-right: 10px;font-size: 0.7rem;"
  392. v-for="(item, index) in data.equipmentsReplaceItems.items" :key="item.id">
  393. <view>
  394. <checkbox v-if="item.checked" :value="item.id" checked="true" />
  395. <checkbox v-else :value="item.id" />
  396. </view>
  397. <view style="font-size: 0.7rem;">{{item.dictValue}}</view>
  398. </label>
  399. </checkbox-group>
  400. </uni-card>
  401. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.rtuReplace" title="RTU型号说明" :is-shadow="false">
  402. <uni-easyinput v-model="data.rtuModelRemark" placeholder="请录入RTU型号说明" />
  403. </uni-card>
  404. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.rtuReplace" title="RTU更换照片" extra="点击下方按钮开始拍摄"
  405. :is-shadow="false">
  406. <view
  407. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  408. 备注:必填项</view>
  409. <view class="view-flex-rs-flex-wrap">
  410. <view v-for="(item, index) in data.rtuReplacePhotos" :key="index" class="view-flex-cc"
  411. style="width: 80px;">
  412. <view class="img-container">
  413. <view class="note-image-box">
  414. <view class="note-image-item">
  415. <view class="close-icon" @click="onRtuReplacePhotoDel(index)">
  416. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  417. </view>
  418. <view class="image-box">
  419. <image :src="toOss(item)" mode="widthFix">
  420. </image>
  421. </view>
  422. </view>
  423. </view>
  424. </view>
  425. </view>
  426. <view class="view-flex-cc" style="width: 80px;">
  427. <view class="img-container">
  428. <view class="note-image-box">
  429. <view class="note-image-item" @click="onRtuReplacePhotoAdd()">
  430. <view class="image-box">
  431. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  432. </view>
  433. </view>
  434. </view>
  435. </view>
  436. </view>
  437. </view>
  438. </uni-card>
  439. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.rainSensorReplace" title="雨量计型号说明"
  440. :is-shadow="false">
  441. <uni-easyinput v-model="data.rainSensorModelRemark" placeholder="请录入雨量计型号说明" />
  442. </uni-card>
  443. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.rainSensorReplace" title="雨量计更换照片"
  444. extra="点击下方按钮开始拍摄" :is-shadow="false">
  445. <view
  446. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  447. 备注:必填项</view>
  448. <view class="view-flex-rs-flex-wrap">
  449. <view v-for="(item, index) in data.rainSensorReplacePhotos" :key="index" class="view-flex-cc"
  450. style="width: 80px;">
  451. <view class="img-container">
  452. <view class="note-image-box">
  453. <view class="note-image-item">
  454. <view class="close-icon" @click="onRainSensorReplacePhotoDel(index)">
  455. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  456. </view>
  457. <view class="image-box">
  458. <image :src="toOss(item)" mode="widthFix">
  459. </image>
  460. </view>
  461. </view>
  462. </view>
  463. </view>
  464. </view>
  465. <view class="view-flex-cc" style="width: 80px;">
  466. <view class="img-container">
  467. <view class="note-image-box">
  468. <view class="note-image-item" @click="onRainSensorReplacePhotoAdd()">
  469. <view class="image-box">
  470. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  471. </view>
  472. </view>
  473. </view>
  474. </view>
  475. </view>
  476. </view>
  477. </uni-card>
  478. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.waterSensorReplace" title="水位计型号说明"
  479. :is-shadow="false">
  480. <uni-easyinput v-model="data.waterSensorModelRemark" placeholder="请录入水位计型号说明" />
  481. </uni-card>
  482. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.waterSensorReplace" title="水位计更换照片"
  483. extra="点击下方按钮开始拍摄" :is-shadow="false">
  484. <view
  485. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  486. 备注:必填项</view>
  487. <view class="view-flex-rs-flex-wrap">
  488. <view v-for="(item, index) in data.waterSensorReplacePhotos" :key="index" class="view-flex-cc"
  489. style="width: 80px;">
  490. <view class="img-container">
  491. <view class="note-image-box">
  492. <view class="note-image-item">
  493. <view class="close-icon" @click="onWaterSensorReplacePhotoDel(index)">
  494. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  495. </view>
  496. <view class="image-box">
  497. <image :src="toOss(item)" mode="widthFix">
  498. </image>
  499. </view>
  500. </view>
  501. </view>
  502. </view>
  503. </view>
  504. <view class="view-flex-cc" style="width: 80px;">
  505. <view class="img-container">
  506. <view class="note-image-box">
  507. <view class="note-image-item" @click="onWaterSensorReplacePhotoAdd()">
  508. <view class="image-box">
  509. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  510. </view>
  511. </view>
  512. </view>
  513. </view>
  514. </view>
  515. </view>
  516. </uni-card>
  517. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.groundSensorReplace" title="墒情计型号说明"
  518. :is-shadow="false">
  519. <uni-easyinput v-model="data.groundSensorModelRemark" placeholder="请录入墒情计型号说明" />
  520. </uni-card>
  521. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.groundSensorReplace" title="墒情计更换照片"
  522. extra="点击下方按钮开始拍摄" :is-shadow="false">
  523. <view
  524. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  525. 备注:必填项</view>
  526. <view class="view-flex-rs-flex-wrap">
  527. <view v-for="(item, index) in data.groundSensorReplacePhotos" :key="index" class="view-flex-cc"
  528. style="width: 80px;">
  529. <view class="img-container">
  530. <view class="note-image-box">
  531. <view class="note-image-item">
  532. <view class="close-icon" @click="onGroundSensorReplacePhotoDel(index)">
  533. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  534. </view>
  535. <view class="image-box">
  536. <image :src="toOss(item)" mode="widthFix">
  537. </image>
  538. </view>
  539. </view>
  540. </view>
  541. </view>
  542. </view>
  543. <view class="view-flex-cc" style="width: 80px;">
  544. <view class="img-container">
  545. <view class="note-image-box">
  546. <view class="note-image-item" @click="onGroundSensorReplacePhotoAdd()">
  547. <view class="image-box">
  548. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  549. </view>
  550. </view>
  551. </view>
  552. </view>
  553. </view>
  554. </view>
  555. </uni-card>
  556. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.batteryReplace" title="蓄电池型号说明" :is-shadow="false">
  557. <uni-easyinput v-model="data.batteryModelRemark" placeholder="请录入蓄电池型号说明" />
  558. </uni-card>
  559. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.batteryReplace" title="蓄电池更换照片" extra="点击下方按钮开始拍摄"
  560. :is-shadow="false">
  561. <view
  562. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  563. 备注:必填项</view>
  564. <view class="view-flex-rs-flex-wrap">
  565. <view v-for="(item, index) in data.batteryReplacePhotos" :key="index" class="view-flex-cc"
  566. style="width: 80px;">
  567. <view class="img-container">
  568. <view class="note-image-box">
  569. <view class="note-image-item">
  570. <view class="close-icon" @click="onBatteryReplacePhotoDel(index)">
  571. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  572. </view>
  573. <view class="image-box">
  574. <image :src="toOss(item)" mode="widthFix">
  575. </image>
  576. </view>
  577. </view>
  578. </view>
  579. </view>
  580. </view>
  581. <view class="view-flex-cc" style="width: 80px;">
  582. <view class="img-container">
  583. <view class="note-image-box">
  584. <view class="note-image-item" @click="onBatteryReplacePhotoAdd()">
  585. <view class="image-box">
  586. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  587. </view>
  588. </view>
  589. </view>
  590. </view>
  591. </view>
  592. </view>
  593. </uni-card>
  594. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.sunPowerReplace" title="太阳能板型号说明"
  595. :is-shadow="false">
  596. <uni-easyinput v-model="data.sunPowerModelRemark" placeholder="请录入太阳能板型号说明" />
  597. </uni-card>
  598. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.sunPowerReplace" title="太阳能板更换照片" extra="点击下方按钮开始拍摄"
  599. :is-shadow="false">
  600. <view
  601. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  602. 备注:必填项</view>
  603. <view class="view-flex-rs-flex-wrap">
  604. <view v-for="(item, index) in data.sunPowerReplacePhotos" :key="index" class="view-flex-cc"
  605. style="width: 80px;">
  606. <view class="img-container">
  607. <view class="note-image-box">
  608. <view class="note-image-item">
  609. <view class="close-icon" @click="onSunPowerReplacePhotoDel(index)">
  610. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  611. </view>
  612. <view class="image-box">
  613. <image :src="toOss(item)" mode="widthFix">
  614. </image>
  615. </view>
  616. </view>
  617. </view>
  618. </view>
  619. </view>
  620. <view class="view-flex-cc" style="width: 80px;">
  621. <view class="img-container">
  622. <view class="note-image-box">
  623. <view class="note-image-item" @click="onSunPowerReplacePhotoAdd()">
  624. <view class="image-box">
  625. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  626. </view>
  627. </view>
  628. </view>
  629. </view>
  630. </view>
  631. </view>
  632. </uni-card>
  633. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.batteryControllerReplace" title="充电控制器型号说明"
  634. :is-shadow="false">
  635. <uni-easyinput v-model="data.batteryControlModelRemark" placeholder="请录入充电控制器型号说明" />
  636. </uni-card>
  637. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.batteryControllerReplace" title="充电控制器更换照片"
  638. extra="点击下方按钮开始拍摄" :is-shadow="false">
  639. <view
  640. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  641. 备注:必填项</view>
  642. <view class="view-flex-rs-flex-wrap">
  643. <view v-for="(item, index) in data.batteryControlReplacePhotos" :key="index"
  644. class="view-flex-cc" style="width: 80px;">
  645. <view class="img-container">
  646. <view class="note-image-box">
  647. <view class="note-image-item">
  648. <view class="close-icon" @click="onBatteryControllerReplacePhotoDel(index)">
  649. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  650. </view>
  651. <view class="image-box">
  652. <image :src="toOss(item)" mode="widthFix">
  653. </image>
  654. </view>
  655. </view>
  656. </view>
  657. </view>
  658. </view>
  659. <view class="view-flex-cc" style="width: 80px;">
  660. <view class="img-container">
  661. <view class="note-image-box">
  662. <view class="note-image-item" @click="onBatteryControllerReplacePhotoAdd()">
  663. <view class="image-box">
  664. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  665. </view>
  666. </view>
  667. </view>
  668. </view>
  669. </view>
  670. </view>
  671. </uni-card>
  672. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.otherEquipmentReplace" title="其他设备说明"
  673. :is-shadow="false">
  674. <uni-easyinput v-model="data.otherEquipmentModelRemark" placeholder="请录入其他设备说明" />
  675. </uni-card>
  676. <uni-card v-if="data.equipmentsReplaceItemsCheckBox.otherEquipmentReplace" title="其他设备更换照片"
  677. extra="点击下方按钮开始拍摄" :is-shadow="false">
  678. <view
  679. style="padding-top: 10px;padding-left: 0px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  680. 备注:必填项</view>
  681. <view class="view-flex-rs-flex-wrap">
  682. <view v-for="(item, index) in data.otherEquipmentReplacePhotos" :key="index"
  683. class="view-flex-cc" style="width: 80px;">
  684. <view class="img-container">
  685. <view class="note-image-box">
  686. <view class="note-image-item">
  687. <view class="close-icon" @click="onOtherEquipmentReplacePhotoDel(index)">
  688. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  689. </view>
  690. <view class="image-box">
  691. <image :src="toOss(item)" mode="widthFix">
  692. </image>
  693. </view>
  694. </view>
  695. </view>
  696. </view>
  697. </view>
  698. <view class="view-flex-cc" style="width: 80px;">
  699. <view class="img-container">
  700. <view class="note-image-box">
  701. <view class="note-image-item" @click="onOtherEquipmentReplacePhotoAdd()">
  702. <view class="image-box">
  703. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  704. </view>
  705. </view>
  706. </view>
  707. </view>
  708. </view>
  709. </view>
  710. </uni-card>
  711. </uni-section>
  712. <uni-section title="遗留问题补充说明" titleFontSize="0.8rem" style="width: 100%;">
  713. <template v-slot:decoration>
  714. <view class="decoration"></view>
  715. </template>
  716. <view style="padding-top: 10px;padding-bottom: 10px;padding-left: 15px;padding-right: 15px;">
  717. <uni-easyinput type="textarea" v-model="data.inspectionRemainProblemsRemark"
  718. placeholder="请输入遗留问题补充说明" />
  719. </view>
  720. </uni-section>
  721. <uni-section title="巡检工作留存照片" titleFontSize="0.8rem" style="width: 100%;">
  722. <template v-slot:decoration>
  723. <view class="decoration"></view>
  724. </template>
  725. <view
  726. style="padding-top: 10px;padding-left: 15px;padding-right: 15px;font-size: 0.7rem;color:lightcoral;">
  727. 备注:必填项,至少要拍一张整体的站点照片</view>
  728. <uni-card title="拍摄照片" extra="点击下方按钮开始拍摄" :is-shadow="false">
  729. <view class="view-flex-rs-flex-wrap">
  730. <view v-for="(item, index) in data.inspectionWorkPhotos" :key="index" class="view-flex-cc"
  731. style="width: 80px;">
  732. <view class="img-container">
  733. <view class="note-image-box">
  734. <view class="note-image-item">
  735. <view class="close-icon" @click="onInspectionWorkPhotoDel(index)">
  736. <uni-icons type="closeempty" size="18" color="#fff"></uni-icons>
  737. </view>
  738. <view class="image-box">
  739. <image :src="toOss(item)" mode="widthFix">
  740. </image>
  741. </view>
  742. </view>
  743. </view>
  744. </view>
  745. </view>
  746. <view class="view-flex-cc" style="width: 80px;">
  747. <view class="img-container">
  748. <view class="note-image-box">
  749. <view class="note-image-item" @click="onInspectionWorkCheckPhotoAdd()">
  750. <view class="image-box">
  751. <uni-icons type="plusempty" size="50" color="#eee"></uni-icons>
  752. </view>
  753. </view>
  754. </view>
  755. </view>
  756. </view>
  757. </view>
  758. </uni-card>
  759. </uni-section>
  760. </uni-forms>
  761. <view class="footer">
  762. <view class="control">
  763. <view class="view-flex-rc">
  764. <view class="block"
  765. style="width: 120px;height:28px;margin-left: 10px;margin-right: 10px;border-radius:7px;background-color:lightblue"
  766. @click="toSave()">
  767. <view class="view-flex-cc">
  768. <uni-icons class="input-uni-icon" type="folder-add" size="18" color="#999" />
  769. </view>
  770. <view class="view-flex-cc" style="padding-left:5px;">
  771. <text style="color:black;font-size:0.7rem">暂存</text>
  772. </view>
  773. </view>
  774. <view class="block"
  775. style="width: 120px;height:28px;margin-left: 10px;margin-right: 10px;border-radius:7px;background-color:lightpink"
  776. @click="toSubmit()">
  777. <view class="view-flex-cc">
  778. <uni-icons class="input-uni-icon" type="checkmarkempty" size="18" color="#999" />
  779. </view>
  780. <view class="view-flex-cc" style="padding-left:5px;">
  781. <text style="color:black;font-size:0.7rem">立即提交</text>
  782. </view>
  783. </view>
  784. </view>
  785. </view>
  786. </view>
  787. </view>
  788. </template>
  789. <script>
  790. import http from '@/http/api.js';
  791. import {
  792. pathToBase64,
  793. base64ToPath
  794. } from '@/js_sdk/mmmm-image-tools/index.js';
  795. import {
  796. oss,
  797. devUrl,
  798. prodUrl
  799. } from '@/common/setting';
  800. export default {
  801. components: {
  802. },
  803. data() {
  804. return {
  805. formData: {
  806. },
  807. rules: {
  808. networkSignalStatus: {
  809. rules: [{
  810. required: true,
  811. errorMessage: '必填项,请选择手机网络信号',
  812. }]
  813. },
  814. },
  815. title: '设备巡检填报',
  816. baseURL: '',
  817. baseOSS: '',
  818. rtuCode: '',
  819. ispItems: {
  820. items: [{
  821. 'value': 0,
  822. 'text': '正常'
  823. }, {
  824. 'value': 1,
  825. 'text': '三大运营商均无信号'
  826. }],
  827. current: -1,
  828. },
  829. rtuInfo: {
  830. isRain: 0,
  831. isRiver: 0,
  832. isRes: 0,
  833. isGround: 0,
  834. rtuCode: '',
  835. rtuName: '',
  836. lng: '',
  837. lat: '',
  838. locationDesc: '',
  839. isRain: false,
  840. isWaterLevel: false,
  841. isGround: false,
  842. isCamera: false,
  843. },
  844. data: {
  845. lng: '',
  846. lat: '',
  847. locationDesc: '',
  848. //站点状态检查项
  849. siteCheckStatus: {
  850. items: [{
  851. 'id': '0',
  852. 'dictValue': '水毁'
  853. }, {
  854. 'id': '1',
  855. 'dictValue': '丢失'
  856. }, {
  857. 'id': '2',
  858. 'dictValue': '损坏'
  859. }, {
  860. 'value': '3',
  861. 'dictValue': '正常'
  862. }],
  863. current: 3,
  864. },
  865. siteCheckPhotos: [],
  866. siteCheckRemark: '',
  867. //雨量站检查数据
  868. rainSiteCheckItems: {
  869. items: [{
  870. 'id': '0',
  871. 'checked': false,
  872. 'dictValue': '故障排查'
  873. }, {
  874. 'id': '1',
  875. 'checked': false,
  876. 'dictValue': '清理堵塞'
  877. }, {
  878. 'id': '2',
  879. 'checked': false,
  880. 'dictValue': '雨量计校核'
  881. }],
  882. current: -1,
  883. },
  884. rainSiteCheckItemsCheckBox: {
  885. equipmentFaultCheck: 0,
  886. equipmentClear: 0,
  887. rainSensorCheck: 0,
  888. },
  889. rainSiteCheckPhotos: [],
  890. rainSiteCheckStatus: {
  891. items: [{
  892. 'id': '0',
  893. 'dictValue': '异常'
  894. }, {
  895. 'id': '1',
  896. 'dictValue': '正常'
  897. }],
  898. current: 1,
  899. },
  900. rainSiteCheckRemark: '',
  901. //水位站检查数据
  902. waterSiteCheckItems: {
  903. items: [{
  904. 'id': '0',
  905. 'checked': false,
  906. 'dictValue': '故障排查'
  907. }, {
  908. 'id': '1',
  909. 'checked': false,
  910. 'dictValue': '水位计校核'
  911. }],
  912. current: -1,
  913. },
  914. waterSiteCheckItemsCheckBox: {
  915. equipmentFaultCheck: 0,
  916. waterSensorCheck: 0,
  917. },
  918. waterSiteCheckPhotos: [],
  919. waterSiteCheckStatus: {
  920. items: [{
  921. 'id': '0',
  922. 'dictValue': '异常'
  923. }, {
  924. 'id': '1',
  925. 'dictValue': '正常'
  926. }],
  927. current: 1,
  928. },
  929. waterSiteCheckRemark: '',
  930. //墒情站检查数据
  931. groundSiteCheckItems: {
  932. items: [{
  933. 'id': '0',
  934. 'checked': false,
  935. 'dictValue': '故障排查'
  936. }, {
  937. 'id': '1',
  938. 'checked': false,
  939. 'dictValue': '墒情计校核'
  940. }],
  941. current: -1,
  942. },
  943. groundSiteCheckItemsCheckBox: {
  944. equipmentFaultCheck: 0,
  945. groundSensorCheck: 0,
  946. },
  947. groundSiteCheckPhotos: [],
  948. groundSiteCheckStatus: {
  949. items: [{
  950. 'id': '0',
  951. 'dictValue': '异常'
  952. }, {
  953. 'id': '1',
  954. 'dictValue': '正常'
  955. }],
  956. current: 1,
  957. },
  958. groundSiteCheckRemark: '',
  959. //其他设备检查
  960. othersEquipmentCheckItems: {
  961. items: [{
  962. 'id': '0',
  963. 'checked': false,
  964. 'dictValue': '设备接地检测'
  965. }, {
  966. 'id': '1',
  967. 'checked': false,
  968. 'dictValue': '电源电压检测'
  969. }, {
  970. 'id': '2',
  971. 'checked': false,
  972. 'dictValue': '太阳能板检查'
  973. }, {
  974. 'id': '3',
  975. 'checked': false,
  976. 'dictValue': '蓄电池检查'
  977. }, {
  978. 'id': '4',
  979. 'checked': false,
  980. 'dictValue': '网络通信检查'
  981. }],
  982. current: -1,
  983. },
  984. othersEquipmentCheckItemsCheckBox: {
  985. equipmentGroundWireCheck: 0,
  986. bvCheck: 0,
  987. sunPowerCheck: 0,
  988. btCheck: 0,
  989. netCheck: 0,
  990. },
  991. othersEquipmentCheckPhotos: [],
  992. othersEquipmentCheckStatus: {
  993. items: [{
  994. 'id': '0',
  995. 'dictValue': '异常'
  996. }, {
  997. 'id': '1',
  998. 'dictValue': '正常'
  999. }],
  1000. current: 1,
  1001. },
  1002. othersEquipmentCheckRemark: '',
  1003. //设备替换
  1004. equipmentsReplaceItems: {
  1005. items: [{
  1006. 'id': '0',
  1007. 'checked': false,
  1008. 'dictValue': 'RTU'
  1009. }, {
  1010. 'id': '1',
  1011. 'checked': false,
  1012. 'dictValue': '雨量计'
  1013. }, {
  1014. 'id': '2',
  1015. 'checked': false,
  1016. 'dictValue': '水位计'
  1017. }, {
  1018. 'id': '3',
  1019. 'checked': false,
  1020. 'dictValue': '墒情计'
  1021. }, {
  1022. 'id': '4',
  1023. 'checked': false,
  1024. 'dictValue': '蓄电池'
  1025. }, {
  1026. 'id': '5',
  1027. 'checked': false,
  1028. 'dictValue': '太阳能板'
  1029. }, {
  1030. 'id': '6',
  1031. 'checked': false,
  1032. 'dictValue': '充电控制器'
  1033. }, {
  1034. 'id': '7',
  1035. 'checked': false,
  1036. 'dictValue': '其他'
  1037. }],
  1038. current: -1,
  1039. },
  1040. equipmentsReplaceItemsCheckBox: {
  1041. rtuReplace: 0,
  1042. rainSensorReplace: 0,
  1043. waterSensorReplace: 0,
  1044. groundSensorReplace: 0,
  1045. batteryReplace: 0,
  1046. sunPowerReplace: 0,
  1047. batteryControllerReplace: 0,
  1048. otherEquipmentReplace: 0
  1049. },
  1050. rtuModelRemark: '',
  1051. rtuReplacePhotos: [],
  1052. rainSensorModelRemark: '',
  1053. rainSensorReplacePhotos: [],
  1054. waterSensorModelRemark: '',
  1055. waterSensorReplacePhotos: [],
  1056. groundSensorModelRemark: '',
  1057. groundSensorReplacePhotos: [],
  1058. batteryModelRemark: '',
  1059. batteryReplacePhotos: [],
  1060. sunPowerModelRemark: '',
  1061. sunPowerReplacePhotos: [],
  1062. batteryControlModelRemark: '',
  1063. batteryControlReplacePhotos: [],
  1064. otherEquipmentModelRemark: '',
  1065. otherEquipmentReplacePhotos: [],
  1066. //巡检遗留问题描述
  1067. inspectionRemainProblemsRemark: '',
  1068. //工作留存数据
  1069. inspectionWorkPhotos: [],
  1070. },
  1071. }
  1072. },
  1073. computed: {
  1074. getIcon() {
  1075. return path => {
  1076. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  1077. }
  1078. },
  1079. },
  1080. onShow() {},
  1081. created() {},
  1082. onReady() {
  1083. console.log("onReady++++++++++++++")
  1084. // 需要在onReady中设置规则
  1085. this.$refs.baseForm.setRules(this.rules)
  1086. },
  1087. onLoad(options) {
  1088. this.rtuCode = options.rtuCode;
  1089. this.baseOSS = oss;
  1090. this.baseURL = process.env.NODE_ENV === 'development' ? devUrl : prodUrl;
  1091. this.loadRtuInfo();
  1092. },
  1093. methods: {
  1094. toOss(path) {
  1095. let url = this.baseOSS + path;
  1096. return url;
  1097. },
  1098. toBack() {
  1099. uni.navigateBack({
  1100. delta: 1
  1101. })
  1102. },
  1103. getDetail() {
  1104. console.log("ddddddddddddddddddddd")
  1105. //this.formData.networkSimId='1111'
  1106. let that = this;
  1107. let postData = {};
  1108. postData['id'] = this.orderId;
  1109. http.request({
  1110. url: '/galaxy-business/rtu/check/order/detail',
  1111. method: 'GET',
  1112. data: postData
  1113. }).then(res => {
  1114. console.log("ddddddddddddddddddddd " + JSON.stringify(res.data))
  1115. //if (res.data != null) {
  1116. let p = {};
  1117. p['networkSimId'] = res.data.networkSimId;
  1118. p['networkPayer'] = res.data.networkPayer;
  1119. that.formData = p;
  1120. //}
  1121. }).catch(err => {
  1122. console.log(err)
  1123. })
  1124. },
  1125. toRtuKind() {
  1126. let htmltext = '';
  1127. if (this.rtuInfo.isRain === 1) {
  1128. htmltext = htmltext + "雨量站";
  1129. }
  1130. if (this.rtuInfo.isRiver == 1 || this.rtuInfo.isRes == 1) {
  1131. if (htmltext.length > 0) {
  1132. htmltext = htmltext + ' / ';
  1133. }
  1134. htmltext = htmltext + '水位站';
  1135. }
  1136. if (this.rtuInfo.isGround == 1) {
  1137. if (htmltext.length > 0) {
  1138. htmltext = htmltext + ' / ';
  1139. }
  1140. htmltext = htmltext + '墒情站';
  1141. }
  1142. if (this.rtuInfo.isVideo == 1) {
  1143. if (htmltext.length > 0) {
  1144. htmltext = htmltext + ' / ';
  1145. }
  1146. htmltext = htmltext + '视频站';
  1147. }
  1148. return htmltext;
  1149. },
  1150. loadCacheData() {
  1151. let formdata = uni.getStorageSync('inspection_report_storage_' + this.rtuCode);
  1152. if (null != formdata && '' != formdata) {
  1153. this.data = formdata;
  1154. let p = {};
  1155. p['networkSignalStatus'] = formdata.networkSignalStatus;
  1156. p['networkSimId'] = formdata.networkSimId;
  1157. p['networkPayer'] = formdata.networkPayer;
  1158. that.formData = p;
  1159. //雨位计
  1160. if (this.data.rainSiteCheckItemsCheckBox.equipmentFaultCheck == 1) {
  1161. this.data.rainSiteCheckItems.items[0].checked = true;
  1162. }
  1163. if (this.data.rainSiteCheckItemsCheckBox.equipmentClear == 1) {
  1164. this.data.rainSiteCheckItems.items[1].checked = true;
  1165. }
  1166. if (this.data.rainSiteCheckItemsCheckBox.rainSensorCheck == 1) {
  1167. this.data.rainSiteCheckItems.items[2].checked = true;
  1168. }
  1169. //水位计
  1170. if (this.data.waterSiteCheckItemsCheckBox.equipmentFaultCheck == 1) {
  1171. this.data.waterSiteCheckItems.items[0].checked = true;
  1172. }
  1173. if (this.data.waterSiteCheckItemsCheckBox.waterSensorCheck == 1) {
  1174. this.data.waterSiteCheckItems.items[1].checked = true;
  1175. }
  1176. //墒情计
  1177. if (this.data.groundSiteCheckItemsCheckBox.equipmentFaultCheck == 1) {
  1178. this.data.groundSiteCheckItems.items[0].checked = true;
  1179. }
  1180. if (this.data.groundSiteCheckItemsCheckBox.groundSensorCheck == 1) {
  1181. this.data.groundSiteCheckItems.items[1].checked = true;
  1182. }
  1183. //其他设备
  1184. if (this.data.othersEquipmentCheckItemsCheckBox.equipmentGroundWireCheck == 1) {
  1185. this.data.othersEquipmentCheckItems.items[0].checked = true;
  1186. }
  1187. if (this.data.othersEquipmentCheckItemsCheckBox.bvCheck == 1) {
  1188. this.data.othersEquipmentCheckItems.items[1].checked = true;
  1189. }
  1190. if (this.data.othersEquipmentCheckItemsCheckBox.sunPowerCheck == 1) {
  1191. this.data.othersEquipmentCheckItems.items[2].checked = true;
  1192. }
  1193. if (this.data.othersEquipmentCheckItemsCheckBox.btCheck == 1) {
  1194. this.data.othersEquipmentCheckItems.items[3].checked = true;
  1195. }
  1196. if (this.data.othersEquipmentCheckItemsCheckBox.netCheck == 1) {
  1197. this.data.othersEquipmentCheckItems.items[4].checked = true;
  1198. }
  1199. //设备更换
  1200. if (this.data.equipmentsReplaceItemsCheckBox.rtuReplace == 1) {
  1201. this.data.equipmentsReplaceItems.items[0].checked = true;
  1202. }
  1203. if (this.data.equipmentsReplaceItemsCheckBox.rainSensorReplace == 1) {
  1204. this.data.equipmentsReplaceItems.items[1].checked = true;
  1205. }
  1206. if (this.data.equipmentsReplaceItemsCheckBox.waterSensorReplace == 1) {
  1207. this.data.equipmentsReplaceItems.items[2].checked = true;
  1208. }
  1209. if (this.data.equipmentsReplaceItemsCheckBox.groundSensorReplace == 1) {
  1210. this.data.equipmentsReplaceItems.items[3].checked = true;
  1211. }
  1212. if (this.data.equipmentsReplaceItemsCheckBox.batteryReplace == 1) {
  1213. this.data.equipmentsReplaceItems.items[4].checked = true;
  1214. }
  1215. if (this.data.equipmentsReplaceItemsCheckBox.sunPowerReplace == 1) {
  1216. this.data.equipmentsReplaceItems.items[5].checked = true;
  1217. }
  1218. if (this.data.equipmentsReplaceItemsCheckBox.batteryControllerReplace == 1) {
  1219. this.data.equipmentsReplaceItems.items[6].checked = true;
  1220. }
  1221. if (this.data.equipmentsReplaceItemsCheckBox.otherEquipmentReplace == 1) {
  1222. this.data.equipmentsReplaceItems.items[7].checked = true;
  1223. }
  1224. } else {
  1225. //this.getDetail();
  1226. }
  1227. },
  1228. clearCache() {
  1229. uni.removeStorageSync('inspection_report_storage_' + this.rtuCode);
  1230. },
  1231. loadRtuInfo() {
  1232. let that = this;
  1233. let postData = {};
  1234. postData['rtuCode'] = this.rtuCode;
  1235. http.request({
  1236. url: '/galaxy-business/rtu/base/detail',
  1237. method: 'GET',
  1238. data: postData
  1239. }).then(res => {
  1240. if (res.data != null) {
  1241. console.log(JSON.stringify(res.data))
  1242. that.rtuInfo = res.data;
  1243. that.rtuInfo.isRain = 1;
  1244. that.rtuInfo.isRiver = 1;
  1245. that.rtuInfo.isRes = 1;
  1246. that.rtuInfo.isGround = 1;
  1247. that.data['lng'] = that.rtuInfo.lng;
  1248. that.data['lat'] = that.rtuInfo.lat;
  1249. that.data['locationDesc'] = that.rtuInfo.locationDesc;
  1250. let p = {};
  1251. p['networkSimId'] = that.rtuInfo.networkSimId;
  1252. p['networkPayer'] = that.rtuInfo.networkPayer;
  1253. that.formData = p;
  1254. that.loadCacheData();
  1255. }
  1256. }).catch(err => {
  1257. console.log(err)
  1258. })
  1259. },
  1260. toSave() {
  1261. let that = this;
  1262. uni.setStorageSync('inspection_report_storage_' + this.rtuCode, this.data);
  1263. uni.showModal({
  1264. content: '已成功缓存,确认返回!',
  1265. showCancel: true,
  1266. success(res) {
  1267. if (res.confirm) {
  1268. that.toBack();
  1269. }
  1270. }
  1271. });
  1272. },
  1273. toSubmit() {
  1274. let that = this;
  1275. this.$refs.baseForm.validate().then(res => {
  1276. console.log('表单数据信息1:', res);
  1277. //console.log('表单数据信息2:', that.formData);
  1278. if (that.formData.networkSignalStatus == 0) {
  1279. let next = false;
  1280. let msg = '';
  1281. if (that.data.siteCheckPhotos.length > 0) {
  1282. next = true;
  1283. } else {
  1284. next = false;
  1285. msg = "站点状态检查照片为必填项,请至少要拍一张照片,请检查!";
  1286. }
  1287. if (next) {
  1288. if (this.data.equipmentsReplaceItemsCheckBox.rtuReplace == 1) {
  1289. if (this.data.rtuReplacePhotos.length > 0) {
  1290. next = true;
  1291. } else {
  1292. next = false;
  1293. msg = "更换RTU设备时,请至少要拍一张照片,请检查!";
  1294. }
  1295. }
  1296. }
  1297. if (next) {
  1298. if (this.data.equipmentsReplaceItemsCheckBox.rainSensorReplace == 1) {
  1299. if (this.data.rainSensorReplacePhotos.length > 0) {
  1300. next = true;
  1301. } else {
  1302. next = false;
  1303. msg = "更换雨量计时,请至少要拍一张照片,请检查!";
  1304. }
  1305. }
  1306. }
  1307. if (next) {
  1308. if (this.data.equipmentsReplaceItemsCheckBox.waterSensorReplace == 1) {
  1309. if (this.data.waterSensorReplacePhotos.length > 0) {
  1310. next = true;
  1311. } else {
  1312. next = false;
  1313. msg = "更换水位计时,请至少要拍一张照片,请检查!";
  1314. }
  1315. }
  1316. }
  1317. if (next) {
  1318. if (this.data.equipmentsReplaceItemsCheckBox.groundSensorReplace == 1) {
  1319. if (this.data.groundSensorReplacePhotos.length > 0) {
  1320. next = true;
  1321. } else {
  1322. next = false;
  1323. msg = "更换墒情计时,请至少要拍一张照片,请检查!";
  1324. }
  1325. }
  1326. }
  1327. if (next) {
  1328. if (this.data.equipmentsReplaceItemsCheckBox.batteryReplace == 1) {
  1329. if (this.data.batteryReplacePhotos.length > 0) {
  1330. next = true;
  1331. } else {
  1332. next = false;
  1333. msg = "更换蓄电池时,请至少要拍一张照片,请检查!";
  1334. }
  1335. }
  1336. }
  1337. if (next) {
  1338. if (this.data.equipmentsReplaceItemsCheckBox.sunPowerReplace == 1) {
  1339. if (this.data.sunPowerReplacePhotos.length > 0) {
  1340. next = true;
  1341. } else {
  1342. next = false;
  1343. msg = "更换太阳能板时,请至少要拍一张照片,请检查!";
  1344. }
  1345. }
  1346. }
  1347. if (next) {
  1348. if (this.data.equipmentsReplaceItemsCheckBox.batteryControllerReplace == 1) {
  1349. if (this.data.batteryControlReplacePhotos.length > 0) {
  1350. next = true;
  1351. } else {
  1352. next = false;
  1353. msg = "更换充电控制器时,请至少要拍一张照片,请检查!";
  1354. }
  1355. }
  1356. }
  1357. if (next) {
  1358. if (this.data.equipmentsReplaceItemsCheckBox.otherEquipmentReplace == 1) {
  1359. if (this.data.otherEquipmentReplacePhotos.length > 0) {
  1360. next = true;
  1361. } else {
  1362. next = false;
  1363. msg = "更换其他设备时,请至少要拍一张照片,请检查!";
  1364. }
  1365. }
  1366. }
  1367. if (next) {
  1368. if (that.data.inspectionWorkPhotos.length > 0) {
  1369. next = true;
  1370. } else {
  1371. next = false;
  1372. msg = "巡检工作留存照片为必填项,请至少要拍一张整体的站点照片,请检查!";
  1373. }
  1374. }
  1375. if (next) {
  1376. that.submitData();
  1377. } else {
  1378. uni.showModal({
  1379. content: msg,
  1380. showCancel: false,
  1381. success(res) {
  1382. if (res.confirm) {
  1383. }
  1384. }
  1385. });
  1386. }
  1387. } else {
  1388. that.submitData();
  1389. }
  1390. }).catch(err => {
  1391. console.log('表单错误信息:', err);
  1392. uni.showModal({
  1393. content: "内容填报错误,请根据提示信息检查录入内容!",
  1394. showCancel: false,
  1395. success(res) {
  1396. if (res.confirm) {
  1397. //that.$refs.baseForm.clearValidate();
  1398. }
  1399. }
  1400. });
  1401. })
  1402. },
  1403. submitData() {
  1404. let formdata = this.formData;
  1405. formdata['rtuCode'] = this.rtuCode;
  1406. formdata['lng'] = this.data.lng;
  1407. formdata['lat'] = this.data.lat;
  1408. formdata['locationDesc'] = this.data.locationDesc;
  1409. formdata['siteCheckItem'] = '' + this.data.siteCheckStatus.current;
  1410. if (this.data.siteCheckPhotos.length > 0) {
  1411. let photos = '';
  1412. for (let i = 0; i < this.data.siteCheckPhotos.length; i++) {
  1413. if (photos.length > 0) {
  1414. photos = photos + ',';
  1415. }
  1416. photos = photos + this.data.siteCheckPhotos[i];
  1417. }
  1418. formdata['siteCheckPhotos'] = photos;
  1419. }
  1420. formdata['siteCheckRemark'] = this.data.siteCheckRemark;
  1421. //雨量站点检查信息
  1422. if (this.rtuInfo.isRain) {
  1423. let items = '';
  1424. if (this.data.rainSiteCheckItemsCheckBox.equipmentFaultCheck == 1) {
  1425. items = items + '1'
  1426. } else {
  1427. items = items + '0';
  1428. }
  1429. items = items + ',';
  1430. if (this.data.rainSiteCheckItemsCheckBox.equipmentClear == 1) {
  1431. items = items + '1'
  1432. } else {
  1433. items = items + '0';
  1434. }
  1435. items = items + ',';
  1436. if (this.data.rainSiteCheckItemsCheckBox.rainSensorCheck == 1) {
  1437. items = items + '1'
  1438. } else {
  1439. items = items + '0';
  1440. }
  1441. formdata['rainSiteCheckItem'] = items;
  1442. if (this.data.rainSiteCheckPhotos.length > 0) {
  1443. let photos = '';
  1444. for (let i = 0; i < this.data.rainSiteCheckPhotos.length; i++) {
  1445. if (photos.length > 0) {
  1446. photos = photos + ',';
  1447. }
  1448. photos = photos + this.data.rainSiteCheckPhotos[i];
  1449. }
  1450. formdata['rainSiteCheckPhotos'] = photos;
  1451. }
  1452. formdata['rainSiteCheckRemark'] = this.data.rainSiteCheckRemark;
  1453. formdata['rainSiteCheckResult'] = this.data.rainSiteCheckStatus.current;
  1454. }
  1455. //水位站点检查信息
  1456. if (this.rtuInfo.isRiver || this.rtuInfo.isRes) {
  1457. let items = '';
  1458. if (this.data.waterSiteCheckItemsCheckBox.equipmentFaultCheck == 1) {
  1459. items = items + '1'
  1460. } else {
  1461. items = items + '0';
  1462. }
  1463. items = items + ',';
  1464. if (this.data.waterSiteCheckItemsCheckBox.waterSensorCheck == 1) {
  1465. items = items + '1'
  1466. } else {
  1467. items = items + '0';
  1468. }
  1469. formdata['waterSiteCheckItem'] = items;
  1470. if (this.data.waterSiteCheckPhotos.length > 0) {
  1471. let photos = '';
  1472. for (let i = 0; i < this.data.waterSiteCheckPhotos.length; i++) {
  1473. if (photos.length > 0) {
  1474. photos = photos + ',';
  1475. }
  1476. photos = photos + this.data.waterSiteCheckPhotos[i];
  1477. }
  1478. formdata['waterSiteCheckPhotos'] = photos;
  1479. }
  1480. formdata['waterSiteCheckRemark'] = this.data.waterSiteCheckRemark;
  1481. formdata['waterSiteCheckResult'] = this.data.waterSiteCheckStatus.current;
  1482. }
  1483. //墒情站点检查信息
  1484. if (this.rtuInfo.isGround) {
  1485. let items = '';
  1486. if (this.data.groundSiteCheckItemsCheckBox.equipmentFaultCheck == 1) {
  1487. items = items + '1'
  1488. } else {
  1489. items = items + '0';
  1490. }
  1491. items = items + ',';
  1492. if (this.data.groundSiteCheckItemsCheckBox.groundSensorCheck == 1) {
  1493. items = items + '1'
  1494. } else {
  1495. items = items + '0';
  1496. }
  1497. formdata['groundSiteCheckItem'] = items;
  1498. if (this.data.groundSiteCheckPhotos.length > 0) {
  1499. let photos = '';
  1500. for (let i = 0; i < this.data.groundSiteCheckPhotos.length; i++) {
  1501. if (photos.length > 0) {
  1502. photos = photos + ',';
  1503. }
  1504. photos = photos + this.data.groundSiteCheckPhotos[i];
  1505. }
  1506. formdata['groundSiteCheckPhotos'] = photos;
  1507. }
  1508. formdata['groundSiteCheckRemark'] = this.data.groundSiteCheckRemark;
  1509. formdata['groundSiteCheckResult'] = this.data.groundSiteCheckStatus.current;
  1510. }
  1511. //其他设备检查信息
  1512. let otheritems = '';
  1513. if (this.data.othersEquipmentCheckItemsCheckBox.equipmentGroundWireCheck == 1) {
  1514. otheritems = otheritems + '1'
  1515. } else {
  1516. otheritems = otheritems + '0';
  1517. }
  1518. otheritems = otheritems + ',';
  1519. if (this.data.othersEquipmentCheckItemsCheckBox.bvCheck == 1) {
  1520. otheritems = otheritems + '1'
  1521. } else {
  1522. otheritems = otheritems + '0';
  1523. }
  1524. otheritems = otheritems + ',';
  1525. if (this.data.othersEquipmentCheckItemsCheckBox.sunPowerCheck == 1) {
  1526. otheritems = otheritems + '1'
  1527. } else {
  1528. otheritems = otheritems + '0';
  1529. }
  1530. otheritems = otheritems + ',';
  1531. if (this.data.othersEquipmentCheckItemsCheckBox.btCheck == 1) {
  1532. otheritems = otheritems + '1'
  1533. } else {
  1534. otheritems = otheritems + '0';
  1535. }
  1536. otheritems = otheritems + ',';
  1537. if (this.data.othersEquipmentCheckItemsCheckBox.netCheck == 1) {
  1538. otheritems = otheritems + '1'
  1539. } else {
  1540. otheritems = otheritems + '0';
  1541. }
  1542. formdata['otherEquipmentCheckItem'] = otheritems;
  1543. if (this.data.othersEquipmentCheckPhotos.length > 0) {
  1544. let photos = '';
  1545. for (let i = 0; i < this.data.othersEquipmentCheckPhotos.length; i++) {
  1546. if (photos.length > 0) {
  1547. photos = photos + ',';
  1548. }
  1549. photos = photos + this.data.othersEquipmentCheckPhotos[i];
  1550. }
  1551. formdata['otherEquipmentCheckPhotos'] = photos;
  1552. }
  1553. formdata['otherEquipmentCheckRemark'] = this.data.othersEquipmentCheckRemark;
  1554. formdata['otherEquipmentCheckResult'] = this.data.othersEquipmentCheckStatus.current;
  1555. formdata['rtuReplace'] = this.data.equipmentsReplaceItemsCheckBox.rtuReplace;
  1556. if (this.data.equipmentsReplaceItemsCheckBox.rtuReplace == 1) {
  1557. formdata['rtuModelRemark'] = this.data.rtuModelRemark;
  1558. if (this.data.rtuReplacePhotos.length > 0) {
  1559. let photos = '';
  1560. for (let i = 0; i < this.data.rtuReplacePhotos.length; i++) {
  1561. if (photos.length > 0) {
  1562. photos = photos + ',';
  1563. }
  1564. photos = photos + this.data.rtuReplacePhotos[i];
  1565. }
  1566. formdata['rtuReplacePhotos'] = photos;
  1567. }
  1568. }
  1569. formdata['rainSensorReplace'] = this.data.equipmentsReplaceItemsCheckBox.rainSensorReplace;
  1570. if (this.data.equipmentsReplaceItemsCheckBox.rainSensorReplace == 1) {
  1571. formdata['rainSensorModelRemark'] = this.data.rainSensorModelRemark;
  1572. if (this.data.rainSensorReplacePhotos.length > 0) {
  1573. let photos = '';
  1574. for (let i = 0; i < this.data.rainSensorReplacePhotos.length; i++) {
  1575. if (photos.length > 0) {
  1576. photos = photos + ',';
  1577. }
  1578. photos = photos + this.data.rainSensorReplacePhotos[i];
  1579. }
  1580. formdata['rainSensorReplacePhotos'] = photos;
  1581. }
  1582. }
  1583. formdata['waterSensorReplace'] = this.data.equipmentsReplaceItemsCheckBox.waterSensorReplace;
  1584. if (this.data.equipmentsReplaceItemsCheckBox.waterSensorReplace == 1) {
  1585. formdata['waterSensorModelRemark'] = this.data.waterSensorModelRemark;
  1586. if (this.data.waterSensorReplacePhotos.length > 0) {
  1587. let photos = '';
  1588. for (let i = 0; i < this.data.waterSensorReplacePhotos.length; i++) {
  1589. if (photos.length > 0) {
  1590. photos = photos + ',';
  1591. }
  1592. photos = photos + this.data.waterSensorReplacePhotos[i];
  1593. }
  1594. formdata['waterSensorReplacePhotos'] = photos;
  1595. }
  1596. }
  1597. formdata['groundSensorReplace'] = this.data.equipmentsReplaceItemsCheckBox.groundSensorReplace;
  1598. if (this.data.equipmentsReplaceItemsCheckBox.groundSensorReplace == 1) {
  1599. formdata['groundSensorModelRemark'] = this.data.groundSensorModelRemark;
  1600. if (this.data.groundSensorReplacePhotos.length > 0) {
  1601. let photos = '';
  1602. for (let i = 0; i < this.data.groundSensorReplacePhotos.length; i++) {
  1603. if (photos.length > 0) {
  1604. photos = photos + ',';
  1605. }
  1606. photos = photos + this.data.groundSensorReplacePhotos[i];
  1607. }
  1608. formdata['groundSensorReplacePhotos'] = photos;
  1609. }
  1610. }
  1611. formdata['batteryReplace'] = this.data.equipmentsReplaceItemsCheckBox.batteryReplace;
  1612. if (this.data.equipmentsReplaceItemsCheckBox.batteryReplace == 1) {
  1613. formdata['batteryModelRemark'] = this.data.batteryModelRemark;
  1614. if (this.data.batteryReplacePhotos.length > 0) {
  1615. let photos = '';
  1616. for (let i = 0; i < this.data.batteryReplacePhotos.length; i++) {
  1617. if (photos.length > 0) {
  1618. photos = photos + ',';
  1619. }
  1620. photos = photos + this.data.batteryReplacePhotos[i];
  1621. }
  1622. formdata['batteryReplacePhotos'] = photos;
  1623. }
  1624. }
  1625. formdata['sunPowerReplace'] = this.data.equipmentsReplaceItemsCheckBox.sunPowerReplace;
  1626. if (this.data.equipmentsReplaceItemsCheckBox.sunPowerReplace == 1) {
  1627. formdata['sunPowerModelRemark'] = this.data.sunPowerModelRemark;
  1628. if (this.data.sunPowerReplacePhotos.length > 0) {
  1629. let photos = '';
  1630. for (let i = 0; i < this.data.sunPowerReplacePhotos.length; i++) {
  1631. if (photos.length > 0) {
  1632. photos = photos + ',';
  1633. }
  1634. photos = photos + this.data.sunPowerReplacePhotos[i];
  1635. }
  1636. formdata['sunPowerReplacePhotos'] = photos;
  1637. }
  1638. }
  1639. formdata['batteryControllerReplace'] = this.data.equipmentsReplaceItemsCheckBox.batteryControllerReplace;
  1640. if (this.data.equipmentsReplaceItemsCheckBox.batteryControllerReplace == 1) {
  1641. formdata['batteryControllerModelRemark'] = this.data.batteryControlModelRemark;
  1642. if (this.data.batteryControlReplacePhotos.length > 0) {
  1643. let photos = '';
  1644. for (let i = 0; i < this.data.batteryControlReplacePhotos.length; i++) {
  1645. if (photos.length > 0) {
  1646. photos = photos + ',';
  1647. }
  1648. photos = photos + this.data.batteryControlReplacePhotos[i];
  1649. }
  1650. formdata['batteryControllerReplacePhotos'] = photos;
  1651. }
  1652. }
  1653. formdata['otherEquipmentReplace'] = this.data.equipmentsReplaceItemsCheckBox.otherEquipmentReplace;
  1654. if (this.data.equipmentsReplaceItemsCheckBox.otherEquipmentReplace == 1) {
  1655. formdata['otherEquipmentModelRemark'] = this.data.otherEquipmentModelRemark;
  1656. if (this.data.otherEquipmentReplacePhotos.length > 0) {
  1657. let photos = '';
  1658. for (let i = 0; i < this.data.otherEquipmentReplacePhotos.length; i++) {
  1659. if (photos.length > 0) {
  1660. photos = photos + ',';
  1661. }
  1662. photos = photos + this.data.otherEquipmentReplacePhotos[i];
  1663. }
  1664. formdata['otherEquipmentReplacePhotos'] = photos;
  1665. }
  1666. }
  1667. formdata['remainQuestion'] = this.data.inspectionRemainProblemsRemark;
  1668. if (this.data.inspectionWorkPhotos.length > 0) {
  1669. let photos = '';
  1670. for (let i = 0; i < this.data.inspectionWorkPhotos.length; i++) {
  1671. if (photos.length > 0) {
  1672. photos = photos + ',';
  1673. }
  1674. photos = photos + this.data.inspectionWorkPhotos[i];
  1675. }
  1676. formdata['inspectionWorkPhotos'] = photos;
  1677. }
  1678. console.log('toSubmit事件:', JSON.stringify(formdata));
  1679. let that = this;
  1680. http.request({
  1681. url: '/galaxy-business/equipment/inspection/report/save',
  1682. method: 'POST',
  1683. data: formdata
  1684. }).then(res => {
  1685. console.log('res ', JSON.stringify(res));
  1686. if (res.success) {
  1687. if (res.data.code == 0) {
  1688. that.clearCache();
  1689. uni.showModal({
  1690. content: '填报信息已成功提交',
  1691. showCancel: false,
  1692. success(res) {
  1693. if (res.confirm) {
  1694. uni.navigateBack();
  1695. }
  1696. }
  1697. });
  1698. } else {
  1699. uni.showModal({
  1700. content: res.data.msg,
  1701. showCancel: false
  1702. });
  1703. }
  1704. } else {
  1705. uni.showModal({
  1706. content: '提交失败',
  1707. showCancel: false
  1708. });
  1709. }
  1710. }).catch(err => {
  1711. // console.log('errr3',JSON.stringify(err));
  1712. uni.showModal({
  1713. content: '' + err.data.msg,
  1714. showCancel: false
  1715. });
  1716. })
  1717. },
  1718. //站点状态检查项
  1719. onSiteCheckStatusRadioChange: function(evt) {
  1720. for (let i = 0; i < this.data.siteCheckStatus.items.length; i++) {
  1721. if (this.data.siteCheckStatus.items[i].id === evt.detail.value) {
  1722. this.data.siteCheckStatus.current = i;
  1723. break;
  1724. }
  1725. }
  1726. },
  1727. //雨量站检查项
  1728. onRainSiteCheckboxChange: function(evt) {
  1729. this.data.rainSiteCheckItemsCheckBox.equipmentFaultCheck = 0;
  1730. this.data.rainSiteCheckItemsCheckBox.equipmentClear = 0;
  1731. this.data.rainSiteCheckItemsCheckBox.rainSensorCheck = 0;
  1732. for (let i = 0; i < evt.detail.value.length; i++) {
  1733. let c = evt.detail.value[i];
  1734. if (c === '0') {
  1735. this.data.rainSiteCheckItemsCheckBox.equipmentFaultCheck = 1;
  1736. } else if (c === '1') {
  1737. this.data.rainSiteCheckItemsCheckBox.equipmentClear = 1;
  1738. } else if (c === '2') {
  1739. this.data.rainSiteCheckItemsCheckBox.rainSensorCheck = 1;
  1740. }
  1741. }
  1742. },
  1743. //雨量站检查结果
  1744. onRainSiteCheckStatusRadioChange: function(evt) {
  1745. for (let i = 0; i < this.data.rainSiteCheckStatus.items.length; i++) {
  1746. if (this.data.rainSiteCheckStatus.items[i].id === evt.detail.value) {
  1747. this.data.rainSiteCheckStatus.current = i;
  1748. break;
  1749. }
  1750. }
  1751. },
  1752. //水位站检查项
  1753. onWaterSiteCheckboxChange: function(evt) {
  1754. this.data.waterSiteCheckItemsCheckBox.equipmentFaultCheck = 0;
  1755. this.data.waterSiteCheckItemsCheckBox.waterSensorCheck = 0;
  1756. for (let i = 0; i < evt.detail.value.length; i++) {
  1757. let c = evt.detail.value[i];
  1758. if (c === '0') {
  1759. this.data.waterSiteCheckItemsCheckBox.equipmentFaultCheck = 1;
  1760. } else if (c === '1') {
  1761. this.data.waterSiteCheckItemsCheckBox.waterSensorCheck = 1;
  1762. }
  1763. }
  1764. },
  1765. //水位站检查结果
  1766. onWaterSiteCheckStatusRadioChange: function(evt) {
  1767. for (let i = 0; i < this.data.waterSiteCheckStatus.items.length; i++) {
  1768. if (this.data.waterSiteCheckStatus.items[i].id === evt.detail.value) {
  1769. this.data.waterSiteCheckStatus.current = i;
  1770. break;
  1771. }
  1772. }
  1773. },
  1774. //墒情站检查项
  1775. onGroundSiteCheckboxChange: function(evt) {
  1776. this.data.groundSiteCheckItemsCheckBox.equipmentFaultCheck = 0;
  1777. this.data.groundSiteCheckItemsCheckBox.groundSensorCheck = 0;
  1778. for (let i = 0; i < evt.detail.value.length; i++) {
  1779. let c = evt.detail.value[i];
  1780. if (c === '0') {
  1781. this.data.groundSiteCheckItemsCheckBox.equipmentFaultCheck = 1;
  1782. } else if (c === '1') {
  1783. this.data.groundSiteCheckItemsCheckBox.groundSensorCheck = 1;
  1784. }
  1785. }
  1786. },
  1787. //墒情站检查结果
  1788. onGroundSiteCheckStatusRadioChange: function(evt) {
  1789. for (let i = 0; i < this.data.groundSiteCheckStatus.items.length; i++) {
  1790. if (this.data.groundSiteCheckStatus.items[i].id === evt.detail.value) {
  1791. this.data.groundSiteCheckStatus.current = i;
  1792. break;
  1793. }
  1794. }
  1795. },
  1796. //其他设备检查项
  1797. onOthersEquipmentCheckboxChange: function(evt) {
  1798. this.data.othersEquipmentCheckItemsCheckBox.equipmentGroundWireCheck = 0;
  1799. this.data.othersEquipmentCheckItemsCheckBox.bvCheck = 0;
  1800. this.data.othersEquipmentCheckItemsCheckBox.sunPowerCheck = 0;
  1801. this.data.othersEquipmentCheckItemsCheckBox.btCheck = 0;
  1802. this.data.othersEquipmentCheckItemsCheckBox.netCheck = 0;
  1803. for (let i = 0; i < evt.detail.value.length; i++) {
  1804. let c = evt.detail.value[i];
  1805. if (c === '0') {
  1806. this.data.othersEquipmentCheckItemsCheckBox.equipmentGroundWireCheck = 1;
  1807. } else if (c === '1') {
  1808. this.data.othersEquipmentCheckItemsCheckBox.bvCheck = 1;
  1809. } else if (c === '2') {
  1810. this.data.othersEquipmentCheckItemsCheckBox.sunPowerCheck = 1;
  1811. } else if (c === '3') {
  1812. this.data.othersEquipmentCheckItemsCheckBox.btCheck = 1;
  1813. } else if (c === '4') {
  1814. this.data.othersEquipmentCheckItemsCheckBox.netCheck = 1;
  1815. }
  1816. }
  1817. },
  1818. //其他设备检查结果
  1819. onOthersEquipmentCheckStatusRadioChange: function(evt) {
  1820. for (let i = 0; i < this.data.othersEquipmentCheckStatus.items.length; i++) {
  1821. if (this.data.othersEquipmentCheckStatus.items[i].id === evt.detail.value) {
  1822. this.data.othersEquipmentCheckStatus.current = i;
  1823. break;
  1824. }
  1825. }
  1826. },
  1827. //设备更换
  1828. onEquipmentReplaceCheckboxChange: function(evt) {
  1829. this.data.equipmentsReplaceItemsCheckBox.rtuReplace = 0;
  1830. this.data.equipmentsReplaceItemsCheckBox.rainSensorReplace = 0;
  1831. this.data.equipmentsReplaceItemsCheckBox.waterSensorReplace = 0;
  1832. this.data.equipmentsReplaceItemsCheckBox.groundSensorReplace = 0;
  1833. this.data.equipmentsReplaceItemsCheckBox.batteryReplace = 0;
  1834. this.data.equipmentsReplaceItemsCheckBox.sunPowerReplace = 0;
  1835. this.data.equipmentsReplaceItemsCheckBox.batteryControllerReplace = 0;
  1836. this.data.equipmentsReplaceItemsCheckBox.otherEquipmentReplace = 0;
  1837. for (let i = 0; i < evt.detail.value.length; i++) {
  1838. let c = evt.detail.value[i];
  1839. if (c === '0') {
  1840. this.data.equipmentsReplaceItemsCheckBox.rtuReplace = 1;
  1841. } else if (c === '1') {
  1842. this.data.equipmentsReplaceItemsCheckBox.rainSensorReplace = 1;
  1843. } else if (c === '2') {
  1844. this.data.equipmentsReplaceItemsCheckBox.waterSensorReplace = 1;
  1845. } else if (c === '3') {
  1846. this.data.equipmentsReplaceItemsCheckBox.groundSensorReplace = 1;
  1847. } else if (c === '4') {
  1848. this.data.equipmentsReplaceItemsCheckBox.batteryReplace = 1;
  1849. } else if (c === '5') {
  1850. this.data.equipmentsReplaceItemsCheckBox.sunPowerReplace = 1;
  1851. } else if (c === '6') {
  1852. this.data.equipmentsReplaceItemsCheckBox.batteryControllerReplace = 1;
  1853. } else if (c === '7') {
  1854. this.data.equipmentsReplaceItemsCheckBox.otherEquipmentReplace = 1;
  1855. }
  1856. }
  1857. },
  1858. onSiteCheckPhotoAdd() {
  1859. let that = this;
  1860. uni.chooseImage({
  1861. sourceType: ['camera'],
  1862. sizeType: ['compressed'],
  1863. success: (res) => {
  1864. const len = res.tempFilePaths.length;
  1865. if (len === 1) {
  1866. res.tempFilePaths.forEach(path => {
  1867. that.uploadSiteCheckPhoto(path);
  1868. })
  1869. } else {
  1870. uni.showModal({
  1871. content: '只能选择一张图片,请确认!',
  1872. showCancel: false
  1873. });
  1874. }
  1875. }
  1876. })
  1877. },
  1878. uploadSiteCheckPhoto(imagePath) {
  1879. let that = this;
  1880. uni.showLoading({
  1881. title: '上传中'
  1882. });
  1883. uni.uploadFile({
  1884. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  1885. uni.getStorageSync('accessToken'),
  1886. fileType: 'image',
  1887. filePath: imagePath,
  1888. name: 'file',
  1889. success: (uploadFileRes) => {
  1890. if (uploadFileRes.statusCode == 200) {
  1891. let data = JSON.parse(uploadFileRes.data);
  1892. if (data.success) {
  1893. let path = data.data['name'];
  1894. that.data.siteCheckPhotos.push(path);
  1895. }
  1896. }
  1897. },
  1898. fail: (err) => {
  1899. console.log(err);
  1900. reject('err')
  1901. },
  1902. complete() {
  1903. uni.hideLoading()
  1904. }
  1905. });
  1906. },
  1907. onSiteCheckPhotoDel(index) {
  1908. this.data.siteCheckPhotos.splice(index, 1);
  1909. },
  1910. onRainSiteCheckPhotoAdd() {
  1911. let that = this;
  1912. uni.chooseImage({
  1913. sourceType: ['camera'],
  1914. sizeType: ['compressed'],
  1915. success: (res) => {
  1916. const len = res.tempFilePaths.length;
  1917. if (len === 1) {
  1918. res.tempFilePaths.forEach(path => {
  1919. that.uploadRainSiteCheckPhoto(path);
  1920. })
  1921. } else {
  1922. uni.showModal({
  1923. content: '只能选择一张图片,请确认!',
  1924. showCancel: false
  1925. });
  1926. }
  1927. }
  1928. })
  1929. },
  1930. uploadRainSiteCheckPhoto(imagePath) {
  1931. let that = this;
  1932. uni.showLoading({
  1933. title: '上传中'
  1934. });
  1935. uni.uploadFile({
  1936. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  1937. uni.getStorageSync('accessToken'),
  1938. fileType: 'image',
  1939. filePath: imagePath,
  1940. name: 'file',
  1941. success: (uploadFileRes) => {
  1942. if (uploadFileRes.statusCode == 200) {
  1943. let data = JSON.parse(uploadFileRes.data);
  1944. if (data.success) {
  1945. let path = data.data['name'];
  1946. that.data.rainSiteCheckPhotos.push(path);
  1947. }
  1948. }
  1949. },
  1950. fail: (err) => {
  1951. console.log(err);
  1952. reject('err')
  1953. },
  1954. complete() {
  1955. uni.hideLoading()
  1956. }
  1957. });
  1958. },
  1959. onRainSitePhotoDel(index) {
  1960. this.data.rainSiteCheckPhotos.splice(index, 1);
  1961. },
  1962. onWaterSiteCheckPhotoAdd() {
  1963. let that = this;
  1964. uni.chooseImage({
  1965. sourceType: ['camera'],
  1966. sizeType: ['compressed'],
  1967. success: (res) => {
  1968. const len = res.tempFilePaths.length;
  1969. if (len === 1) {
  1970. res.tempFilePaths.forEach(path => {
  1971. that.uploadWaterSiteCheckPhoto(path);
  1972. })
  1973. } else {
  1974. uni.showModal({
  1975. content: '只能选择一张图片,请确认!',
  1976. showCancel: false
  1977. });
  1978. }
  1979. }
  1980. })
  1981. },
  1982. uploadWaterSiteCheckPhoto(imagePath) {
  1983. let that = this;
  1984. uni.showLoading({
  1985. title: '上传中'
  1986. });
  1987. uni.uploadFile({
  1988. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  1989. uni.getStorageSync('accessToken'),
  1990. fileType: 'image',
  1991. filePath: imagePath,
  1992. name: 'file',
  1993. success: (uploadFileRes) => {
  1994. if (uploadFileRes.statusCode == 200) {
  1995. let data = JSON.parse(uploadFileRes.data);
  1996. if (data.success) {
  1997. let path = data.data['name'];
  1998. that.data.waterSiteCheckPhotos.push(path);
  1999. }
  2000. }
  2001. },
  2002. fail: (err) => {
  2003. console.log(err);
  2004. reject('err')
  2005. },
  2006. complete() {
  2007. uni.hideLoading()
  2008. }
  2009. });
  2010. },
  2011. onWaterSitePhotoDel(index) {
  2012. this.data.waterSiteCheckPhotos.splice(index, 1);
  2013. },
  2014. onGroundSiteCheckPhotoAdd() {
  2015. let that = this;
  2016. uni.chooseImage({
  2017. sourceType: ['camera'],
  2018. sizeType: ['compressed'],
  2019. success: (res) => {
  2020. const len = res.tempFilePaths.length;
  2021. if (len === 1) {
  2022. res.tempFilePaths.forEach(path => {
  2023. that.uploadGroundSiteCheckPhoto(path);
  2024. })
  2025. } else {
  2026. uni.showModal({
  2027. content: '只能选择一张图片,请确认!',
  2028. showCancel: false
  2029. });
  2030. }
  2031. }
  2032. })
  2033. },
  2034. uploadGroundSiteCheckPhoto(imagePath) {
  2035. let that = this;
  2036. uni.showLoading({
  2037. title: '上传中'
  2038. });
  2039. uni.uploadFile({
  2040. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2041. uni.getStorageSync('accessToken'),
  2042. fileType: 'image',
  2043. filePath: imagePath,
  2044. name: 'file',
  2045. success: (uploadFileRes) => {
  2046. if (uploadFileRes.statusCode == 200) {
  2047. let data = JSON.parse(uploadFileRes.data);
  2048. if (data.success) {
  2049. let path = data.data['name'];
  2050. that.data.groundSiteCheckPhotos.push(path);
  2051. }
  2052. }
  2053. },
  2054. fail: (err) => {
  2055. console.log(err);
  2056. reject('err')
  2057. },
  2058. complete() {
  2059. uni.hideLoading()
  2060. }
  2061. });
  2062. },
  2063. onGroundSitePhotoDel(index) {
  2064. this.data.groundSiteCheckPhotos.splice(index, 1);
  2065. },
  2066. onOthersEquipmentCheckPhotoAdd() {
  2067. let that = this;
  2068. uni.chooseImage({
  2069. sourceType: ['camera'],
  2070. sizeType: ['compressed'],
  2071. success: (res) => {
  2072. const len = res.tempFilePaths.length;
  2073. if (len === 1) {
  2074. res.tempFilePaths.forEach(path => {
  2075. that.uploadOthersEquipmentCheckPhoto(path);
  2076. })
  2077. } else {
  2078. uni.showModal({
  2079. content: '只能选择一张图片,请确认!',
  2080. showCancel: false
  2081. });
  2082. }
  2083. }
  2084. })
  2085. },
  2086. uploadOthersEquipmentCheckPhoto(imagePath) {
  2087. let that = this;
  2088. uni.showLoading({
  2089. title: '上传中'
  2090. });
  2091. uni.uploadFile({
  2092. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2093. uni.getStorageSync('accessToken'),
  2094. fileType: 'image',
  2095. filePath: imagePath,
  2096. name: 'file',
  2097. success: (uploadFileRes) => {
  2098. if (uploadFileRes.statusCode == 200) {
  2099. let data = JSON.parse(uploadFileRes.data);
  2100. if (data.success) {
  2101. let path = data.data['name'];
  2102. that.data.othersEquipmentCheckPhotos.push(path);
  2103. }
  2104. }
  2105. },
  2106. fail: (err) => {
  2107. console.log(err);
  2108. reject('err')
  2109. },
  2110. complete() {
  2111. uni.hideLoading()
  2112. }
  2113. });
  2114. },
  2115. onOthersEquipmentPhotoDel(index) {
  2116. this.data.othersEquipmentCheckPhotos.splice(index, 1);
  2117. },
  2118. onInspectionWorkCheckPhotoAdd() {
  2119. let that = this;
  2120. uni.chooseImage({
  2121. sourceType: ['camera'],
  2122. sizeType: ['compressed'],
  2123. success: (res) => {
  2124. const len = res.tempFilePaths.length;
  2125. if (len === 1) {
  2126. res.tempFilePaths.forEach(path => {
  2127. that.uploadInspectionWorkCheckPhoto(path);
  2128. })
  2129. } else {
  2130. uni.showModal({
  2131. content: '只能选择一张图片,请确认!',
  2132. showCancel: false
  2133. });
  2134. }
  2135. }
  2136. })
  2137. },
  2138. uploadInspectionWorkCheckPhoto(imagePath) {
  2139. let that = this;
  2140. uni.showLoading({
  2141. title: '上传中'
  2142. });
  2143. uni.uploadFile({
  2144. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2145. uni.getStorageSync('accessToken'),
  2146. fileType: 'image',
  2147. filePath: imagePath,
  2148. name: 'file',
  2149. success: (uploadFileRes) => {
  2150. if (uploadFileRes.statusCode == 200) {
  2151. let data = JSON.parse(uploadFileRes.data);
  2152. if (data.success) {
  2153. let path = data.data['name'];
  2154. that.data.inspectionWorkPhotos.push(path);
  2155. }
  2156. }
  2157. },
  2158. fail: (err) => {
  2159. console.log(err);
  2160. reject('err')
  2161. },
  2162. complete() {
  2163. uni.hideLoading()
  2164. }
  2165. });
  2166. },
  2167. onInspectionWorkPhotoDel(index) {
  2168. this.data.inspectionWorkPhotos.splice(index, 1);
  2169. },
  2170. onRtuReplacePhotoDel(index) {
  2171. this.data.rtuReplacePhotos.splice(index, 1);
  2172. },
  2173. onRtuReplacePhotoAdd() {
  2174. let that = this;
  2175. uni.chooseImage({
  2176. sourceType: ['camera'],
  2177. sizeType: ['compressed'],
  2178. success: (res) => {
  2179. const len = res.tempFilePaths.length;
  2180. if (len === 1) {
  2181. res.tempFilePaths.forEach(path => {
  2182. that.uploadRtuReplacePhoto(path);
  2183. })
  2184. } else {
  2185. uni.showModal({
  2186. content: '只能选择一张图片,请确认!',
  2187. showCancel: false
  2188. });
  2189. }
  2190. }
  2191. })
  2192. },
  2193. uploadRtuReplacePhoto(imagePath) {
  2194. let that = this;
  2195. uni.showLoading({
  2196. title: '上传中'
  2197. });
  2198. uni.uploadFile({
  2199. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2200. uni.getStorageSync('accessToken'),
  2201. fileType: 'image',
  2202. filePath: imagePath,
  2203. name: 'file',
  2204. success: (uploadFileRes) => {
  2205. if (uploadFileRes.statusCode == 200) {
  2206. let data = JSON.parse(uploadFileRes.data);
  2207. if (data.success) {
  2208. let path = data.data['name'];
  2209. that.data.rtuReplacePhotos.push(path);
  2210. }
  2211. }
  2212. },
  2213. fail: (err) => {
  2214. console.log(err);
  2215. reject('err')
  2216. },
  2217. complete() {
  2218. uni.hideLoading()
  2219. }
  2220. });
  2221. },
  2222. onRainSensorReplacePhotoDel(index) {
  2223. this.data.rainSensorReplacePhotos.splice(index, 1);
  2224. },
  2225. onRainSensorReplacePhotoAdd() {
  2226. let that = this;
  2227. uni.chooseImage({
  2228. sourceType: ['camera'],
  2229. sizeType: ['compressed'],
  2230. success: (res) => {
  2231. const len = res.tempFilePaths.length;
  2232. if (len === 1) {
  2233. res.tempFilePaths.forEach(path => {
  2234. that.uploadRainSensorReplacePhoto(path);
  2235. })
  2236. } else {
  2237. uni.showModal({
  2238. content: '只能选择一张图片,请确认!',
  2239. showCancel: false
  2240. });
  2241. }
  2242. }
  2243. })
  2244. },
  2245. uploadRainSensorReplacePhoto(imagePath) {
  2246. let that = this;
  2247. uni.showLoading({
  2248. title: '上传中'
  2249. });
  2250. uni.uploadFile({
  2251. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2252. uni.getStorageSync('accessToken'),
  2253. fileType: 'image',
  2254. filePath: imagePath,
  2255. name: 'file',
  2256. success: (uploadFileRes) => {
  2257. if (uploadFileRes.statusCode == 200) {
  2258. let data = JSON.parse(uploadFileRes.data);
  2259. if (data.success) {
  2260. let path = data.data['name'];
  2261. that.data.rainSensorReplacePhotos.push(path);
  2262. }
  2263. }
  2264. },
  2265. fail: (err) => {
  2266. console.log(err);
  2267. reject('err')
  2268. },
  2269. complete() {
  2270. uni.hideLoading()
  2271. }
  2272. });
  2273. },
  2274. onWaterSensorReplacePhotoDel(index) {
  2275. this.data.waterSensorReplacePhotos.splice(index, 1);
  2276. },
  2277. onWaterSensorReplacePhotoAdd() {
  2278. let that = this;
  2279. uni.chooseImage({
  2280. sourceType: ['camera'],
  2281. sizeType: ['compressed'],
  2282. success: (res) => {
  2283. const len = res.tempFilePaths.length;
  2284. if (len === 1) {
  2285. res.tempFilePaths.forEach(path => {
  2286. that.uploadWaterSensorReplacePhoto(path);
  2287. })
  2288. } else {
  2289. uni.showModal({
  2290. content: '只能选择一张图片,请确认!',
  2291. showCancel: false
  2292. });
  2293. }
  2294. }
  2295. })
  2296. },
  2297. uploadWaterSensorReplacePhoto(imagePath) {
  2298. let that = this;
  2299. uni.showLoading({
  2300. title: '上传中'
  2301. });
  2302. uni.uploadFile({
  2303. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2304. uni.getStorageSync('accessToken'),
  2305. fileType: 'image',
  2306. filePath: imagePath,
  2307. name: 'file',
  2308. success: (uploadFileRes) => {
  2309. if (uploadFileRes.statusCode == 200) {
  2310. let data = JSON.parse(uploadFileRes.data);
  2311. if (data.success) {
  2312. let path = data.data['name'];
  2313. that.data.waterSensorReplacePhotos.push(path);
  2314. }
  2315. }
  2316. },
  2317. fail: (err) => {
  2318. console.log(err);
  2319. reject('err')
  2320. },
  2321. complete() {
  2322. uni.hideLoading()
  2323. }
  2324. });
  2325. },
  2326. onGroundSensorReplacePhotoDel(index) {
  2327. this.data.groundSensorReplacePhotos.splice(index, 1);
  2328. },
  2329. onGroundSensorReplacePhotoAdd() {
  2330. let that = this;
  2331. uni.chooseImage({
  2332. sourceType: ['camera'],
  2333. sizeType: ['compressed'],
  2334. success: (res) => {
  2335. const len = res.tempFilePaths.length;
  2336. if (len === 1) {
  2337. res.tempFilePaths.forEach(path => {
  2338. that.uploadGroundSensorReplacePhoto(path);
  2339. })
  2340. } else {
  2341. uni.showModal({
  2342. content: '只能选择一张图片,请确认!',
  2343. showCancel: false
  2344. });
  2345. }
  2346. }
  2347. })
  2348. },
  2349. uploadGroundSensorReplacePhoto(imagePath) {
  2350. let that = this;
  2351. uni.showLoading({
  2352. title: '上传中'
  2353. });
  2354. uni.uploadFile({
  2355. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2356. uni.getStorageSync('accessToken'),
  2357. fileType: 'image',
  2358. filePath: imagePath,
  2359. name: 'file',
  2360. success: (uploadFileRes) => {
  2361. if (uploadFileRes.statusCode == 200) {
  2362. let data = JSON.parse(uploadFileRes.data);
  2363. if (data.success) {
  2364. let path = data.data['name'];
  2365. that.data.groundSensorReplacePhotos.push(path);
  2366. }
  2367. }
  2368. },
  2369. fail: (err) => {
  2370. console.log(err);
  2371. reject('err')
  2372. },
  2373. complete() {
  2374. uni.hideLoading()
  2375. }
  2376. });
  2377. },
  2378. onBatteryReplacePhotoDel(index) {
  2379. this.data.batteryReplacePhotos.splice(index, 1);
  2380. },
  2381. onBatteryReplacePhotoAdd() {
  2382. let that = this;
  2383. uni.chooseImage({
  2384. sourceType: ['camera'],
  2385. sizeType: ['compressed'],
  2386. success: (res) => {
  2387. const len = res.tempFilePaths.length;
  2388. if (len === 1) {
  2389. res.tempFilePaths.forEach(path => {
  2390. that.uploadBatteryReplacePhoto(path);
  2391. })
  2392. } else {
  2393. uni.showModal({
  2394. content: '只能选择一张图片,请确认!',
  2395. showCancel: false
  2396. });
  2397. }
  2398. }
  2399. })
  2400. },
  2401. uploadBatteryReplacePhoto(imagePath) {
  2402. let that = this;
  2403. uni.showLoading({
  2404. title: '上传中'
  2405. });
  2406. uni.uploadFile({
  2407. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2408. uni.getStorageSync('accessToken'),
  2409. fileType: 'image',
  2410. filePath: imagePath,
  2411. name: 'file',
  2412. success: (uploadFileRes) => {
  2413. if (uploadFileRes.statusCode == 200) {
  2414. let data = JSON.parse(uploadFileRes.data);
  2415. if (data.success) {
  2416. let path = data.data['name'];
  2417. that.data.batteryReplacePhotos.push(path);
  2418. }
  2419. }
  2420. },
  2421. fail: (err) => {
  2422. console.log(err);
  2423. reject('err')
  2424. },
  2425. complete() {
  2426. uni.hideLoading()
  2427. }
  2428. });
  2429. },
  2430. onSunPowerReplacePhotoDel(index) {
  2431. this.data.sunPowerReplacePhotos.splice(index, 1);
  2432. },
  2433. onSunPowerReplacePhotoAdd() {
  2434. let that = this;
  2435. uni.chooseImage({
  2436. sourceType: ['camera'],
  2437. sizeType: ['compressed'],
  2438. success: (res) => {
  2439. const len = res.tempFilePaths.length;
  2440. if (len === 1) {
  2441. res.tempFilePaths.forEach(path => {
  2442. that.uploadSunPowerReplacePhoto(path);
  2443. })
  2444. } else {
  2445. uni.showModal({
  2446. content: '只能选择一张图片,请确认!',
  2447. showCancel: false
  2448. });
  2449. }
  2450. }
  2451. })
  2452. },
  2453. uploadSunPowerReplacePhoto(imagePath) {
  2454. let that = this;
  2455. uni.showLoading({
  2456. title: '上传中'
  2457. });
  2458. uni.uploadFile({
  2459. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2460. uni.getStorageSync('accessToken'),
  2461. fileType: 'image',
  2462. filePath: imagePath,
  2463. name: 'file',
  2464. success: (uploadFileRes) => {
  2465. if (uploadFileRes.statusCode == 200) {
  2466. let data = JSON.parse(uploadFileRes.data);
  2467. if (data.success) {
  2468. let path = data.data['name'];
  2469. that.data.sunPowerReplacePhotos.push(path);
  2470. }
  2471. }
  2472. },
  2473. fail: (err) => {
  2474. console.log(err);
  2475. reject('err')
  2476. },
  2477. complete() {
  2478. uni.hideLoading()
  2479. }
  2480. });
  2481. },
  2482. onBatteryControllerReplacePhotoDel(index) {
  2483. this.data.batteryControlReplacePhotos.splice(index, 1);
  2484. },
  2485. onBatteryControllerReplacePhotoAdd() {
  2486. let that = this;
  2487. uni.chooseImage({
  2488. sourceType: ['camera'],
  2489. sizeType: ['compressed'],
  2490. success: (res) => {
  2491. const len = res.tempFilePaths.length;
  2492. if (len === 1) {
  2493. res.tempFilePaths.forEach(path => {
  2494. that.uploadBatteryControllerReplacePhoto(path);
  2495. })
  2496. } else {
  2497. uni.showModal({
  2498. content: '只能选择一张图片,请确认!',
  2499. showCancel: false
  2500. });
  2501. }
  2502. }
  2503. })
  2504. },
  2505. uploadBatteryControllerReplacePhoto(imagePath) {
  2506. let that = this;
  2507. uni.showLoading({
  2508. title: '上传中'
  2509. });
  2510. uni.uploadFile({
  2511. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2512. uni.getStorageSync('accessToken'),
  2513. fileType: 'image',
  2514. filePath: imagePath,
  2515. name: 'file',
  2516. success: (uploadFileRes) => {
  2517. if (uploadFileRes.statusCode == 200) {
  2518. let data = JSON.parse(uploadFileRes.data);
  2519. if (data.success) {
  2520. let path = data.data['name'];
  2521. that.data.batteryControlReplacePhotos.push(path);
  2522. }
  2523. }
  2524. },
  2525. fail: (err) => {
  2526. console.log(err);
  2527. reject('err')
  2528. },
  2529. complete() {
  2530. uni.hideLoading()
  2531. }
  2532. });
  2533. },
  2534. onOtherEquipmentReplacePhotoDel(index) {
  2535. this.data.otherEquipmentReplacePhotos.splice(index, 1);
  2536. },
  2537. onOtherEquipmentReplacePhotoAdd() {
  2538. let that = this;
  2539. uni.chooseImage({
  2540. sourceType: ['camera'],
  2541. sizeType: ['compressed'],
  2542. success: (res) => {
  2543. const len = res.tempFilePaths.length;
  2544. if (len === 1) {
  2545. res.tempFilePaths.forEach(path => {
  2546. that.uploadOtherEquipmentReplacePhoto(path);
  2547. })
  2548. } else {
  2549. uni.showModal({
  2550. content: '只能选择一张图片,请确认!',
  2551. showCancel: false
  2552. });
  2553. }
  2554. }
  2555. })
  2556. },
  2557. uploadOtherEquipmentReplacePhoto(imagePath) {
  2558. let that = this;
  2559. uni.showLoading({
  2560. title: '上传中'
  2561. });
  2562. uni.uploadFile({
  2563. url: this.baseURL + '/galaxy-resource/oss/endpoint/put-file-attach?Blade-Auth=' +
  2564. uni.getStorageSync('accessToken'),
  2565. fileType: 'image',
  2566. filePath: imagePath,
  2567. name: 'file',
  2568. success: (uploadFileRes) => {
  2569. if (uploadFileRes.statusCode == 200) {
  2570. let data = JSON.parse(uploadFileRes.data);
  2571. if (data.success) {
  2572. let path = data.data['name'];
  2573. that.data.otherEquipmentReplacePhotos.push(path);
  2574. }
  2575. }
  2576. },
  2577. fail: (err) => {
  2578. console.log(err);
  2579. reject('err')
  2580. },
  2581. complete() {
  2582. uni.hideLoading()
  2583. }
  2584. });
  2585. },
  2586. }
  2587. }
  2588. </script>
  2589. <style>
  2590. /* page {
  2591. background-color: rgb(240, 242, 244);
  2592. } */
  2593. </style>
  2594. <style lang="scss" scoped>
  2595. .cell-hover-class {
  2596. background-color: rgb(235, 237, 238);
  2597. }
  2598. .view-flex-rs {
  2599. display: flex;
  2600. flex-direction: row;
  2601. justify-content: flex-start;
  2602. align-items: center;
  2603. }
  2604. .view-flex-rs-flex-wrap {
  2605. display: flex;
  2606. flex-direction: row;
  2607. justify-content: flex-start;
  2608. flex-wrap: wrap;
  2609. }
  2610. .view-flex-rc {
  2611. display: flex;
  2612. flex-direction: row;
  2613. justify-content: center;
  2614. align-items: center;
  2615. }
  2616. .view-flex-re {
  2617. display: flex;
  2618. flex-direction: row;
  2619. justify-content: flex-end;
  2620. align-items: center;
  2621. }
  2622. .view-flex-cs {
  2623. display: flex;
  2624. flex-direction: column;
  2625. justify-content: flex-start;
  2626. align-items: center;
  2627. }
  2628. .view-flex-cc {
  2629. display: flex;
  2630. flex-direction: column;
  2631. justify-content: center;
  2632. align-items: center;
  2633. }
  2634. .view-flex-ce {
  2635. display: flex;
  2636. flex-direction: column;
  2637. justify-content: flex-end;
  2638. align-items: center;
  2639. }
  2640. .line-body {
  2641. padding-left: 10px;
  2642. padding-right: 10px;
  2643. }
  2644. .required-star {
  2645. color: #FF0000;
  2646. font-size: 15px;
  2647. width: 20px;
  2648. text-align: center;
  2649. padding-left: 0px;
  2650. padding-right: 2px;
  2651. }
  2652. .item-title {
  2653. color: #909399;
  2654. font-size: 15px;
  2655. }
  2656. .mline-text {
  2657. padding-left: 2px;
  2658. width: 100%;
  2659. /* background-color:#909399; */
  2660. height: 70px;
  2661. border: 1px solid #FF5A5F;
  2662. border-radius: 5px;
  2663. }
  2664. .footer {
  2665. position: fixed;
  2666. bottom: 0;
  2667. left: 0;
  2668. right: 0;
  2669. z-index: 1;
  2670. height: 100rpx;
  2671. padding: 20rpx;
  2672. box-sizing: border-box;
  2673. display: flex;
  2674. align-items: center;
  2675. justify-content: flex-end;
  2676. background-color: whitesmoke;
  2677. .ipt {
  2678. width: 380rpx;
  2679. height: 77rpx;
  2680. background: #f7f7f7;
  2681. border-radius: 38px;
  2682. padding: 0 37rpx;
  2683. box-sizing: border-box;
  2684. margin-right: 20rpx;
  2685. }
  2686. .control {
  2687. flex: 1;
  2688. display: flex;
  2689. align-items: center;
  2690. justify-content: flex-end;
  2691. .block {
  2692. display: flex;
  2693. align-items: center;
  2694. justify-content: center;
  2695. flex: 1;
  2696. }
  2697. .icon {
  2698. height: auto;
  2699. }
  2700. .c {
  2701. width: 41rpx;
  2702. margin-right: 10rpx;
  2703. }
  2704. .s {
  2705. width: 36rpx;
  2706. }
  2707. .t {
  2708. width: 31rpx;
  2709. }
  2710. }
  2711. }
  2712. .container {
  2713. padding: 0 0 100rpx;
  2714. }
  2715. .img-container {
  2716. margin-bottom: 0px;
  2717. width: 100px;
  2718. height: 100px;
  2719. .note-image-box {
  2720. margin-top: 0px;
  2721. display: flex;
  2722. flex-wrap: wrap;
  2723. padding: 10px;
  2724. .note-image-item {
  2725. position: relative;
  2726. width: 100%;
  2727. height: 0;
  2728. padding-top: 100%;
  2729. box-sizing: border-box;
  2730. // background-color: #18B566;
  2731. .close-icon {
  2732. display: flex;
  2733. justify-content: center;
  2734. align-items: center;
  2735. position: absolute;
  2736. right: 0px;
  2737. top: 0px;
  2738. width: 22px;
  2739. height: 22px;
  2740. border-radius: 50%;
  2741. background-color: #d5d5d5;
  2742. z-index: 2;
  2743. }
  2744. .image-box {
  2745. display: flex;
  2746. justify-content: center;
  2747. align-items: center;
  2748. position: absolute;
  2749. top: 0px;
  2750. right: 0px;
  2751. border: 0px;
  2752. left: 0px;
  2753. border: 1px #eee solid;
  2754. border-radius: 5px;
  2755. overflow: hidden;
  2756. width: 99%;
  2757. height: 99%;
  2758. }
  2759. }
  2760. }
  2761. }
  2762. .input-body {
  2763. background-color: #fff;
  2764. padding: 10px;
  2765. }
  2766. .decoration {
  2767. width: 6px;
  2768. height: 6px;
  2769. margin-right: 4px;
  2770. border-radius: 50%;
  2771. background-color: cadetblue;
  2772. }
  2773. </style>