historyDetailsCourtyard.vue 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454
  1. <template>
  2. <scroll-view>
  3. <view class="uni-media-list" v-for="(value, key) in dataJson.zEngineeringNodeBo.zEngineeringInfoBoList" :key="key" v-if="isEdit(value)">
  4. <view class="uni-media-list-body">
  5. <view>
  6. <view class="uni-media-list-text-top">
  7. <view class="tit-text">{{value.state == '1' ? '审核通过': value.state == '0' ? '审核未通过': value.state == '3' ? '前后照片不一致' : '暂未审核'}}:</view>
  8. {{value.state != '1'&&value.content!=null ? value.content:''}}
  9. </view>
  10. <view class="uni-media-list-text-top">
  11. <view class="tit-text">施工时间:</view>{{value.constructTime}}
  12. </view>
  13. <view class="uni-media-list-text-top">
  14. <view class="uni-common-mt" style="width: 100%;">
  15. <text class="tit-text" style=" font-size: 13px;color:
  16. #000;margin-top: 5px;">施工内容:</text>
  17. <view style="width: 100%;box-sizing: border-box;">
  18. <textarea class="textarea" maxlength="255" placeholder-style="padding: 10rpx;" style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;" auto-height :value="value.remark"
  19. @blur="bindTextAreaBlur($event.target.value,key)"></textarea>
  20. </view>
  21. </view>
  22. </view>
  23. <view v-if="title=='开挖前'||title=='开挖后'||title=='焊口照片'||title=='隐蔽工程'||title=='除锈刷油'||title=='打磨'||title=='全貌照片'||title=='焊接'||title=='管道施工记录'">
  24. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  25. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('other',key)">
  26. </image>
  27. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index" style="position: relative;">
  28. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  29. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  30. </image>
  31. </view>
  32. <view v-else>
  33. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  34. </view>
  35. <view @click="remove(index,key)" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  36. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  37. </image>
  38. </view>
  39. </view>
  40. </view>
  41. <view v-if="title=='全貌照片'">
  42. <view class="cz-style" v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
  43. <view class="uni-media-list-text-top" style=" ">
  44. <view class="tit-text">材质:</view>
  45. <view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz',key,index)">
  46. <span style="color: black;">{{a.materialQualityName==''?'请选择材质':a.materialQualityName}}</span>
  47. </view>
  48. </view>
  49. <view class="uni-media-list-text-top" style=" ">
  50. <view class="tit-text">规格:</view>
  51. <view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg',key,index)">
  52. <span style="color: black;">{{a.specificationsName==''?'请选择规格':a.specificationsName}}</span>
  53. </view>
  54. </view>
  55. <view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
  56. <text class="tit-text">米 数</text>
  57. <view style="display: flex; justify-content: right; width: 70%;">
  58. <input class="uni-input" type="number" :value="getIntegerPart(a.number,0)" @change="setInfoBoNumber(key,index,$event.target.value,0)" maxlength="6" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  59. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  60. <input class="uni-input" type="number" :value="getIntegerPart(a.number,1)" @change="setInfoBoNumber(key,index,$event.target.value,1)" maxlength="1" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  61. </view>
  62. </view>
  63. <button v-if="index!=0" @click="btnDel(key,index)" class="sc-btn">删除</button>
  64. </view>
  65. <button @click="btnAdd(key,index)" class="tj-btn">添加</button>
  66. </view>
  67. </view>
  68. <view v-if="title=='回填'">
  69. <view class="uni-common-mt" style="width: 100%;">
  70. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  71. #000;margin-top: 5px; margin-left: 8px;">石粉回填照片:</text>
  72. </view>
  73. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  74. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('sfht',key)">
  75. </image>
  76. <view v-for="(item,index) in value.stonePowder" :key="index" style="position: relative;">
  77. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  78. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.stonePowder)">
  79. </image>
  80. </view>
  81. <view v-else>
  82. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  83. </view>
  84. <view @click="removeht(index,key,'sfht')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  85. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  86. </image>
  87. </view>
  88. </view>
  89. </view>
  90. <view class="uni-common-mt" style="width: 100%;">
  91. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  92. #000;margin-top: 5px;margin-left: 8px;">警示带铺设照片:</text>
  93. </view>
  94. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  95. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('jsdps',key)">
  96. </image>
  97. <view v-for="(item,index) in value.warningtTape" :key="index" style="position: relative;">
  98. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  99. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.warningtTape)">
  100. </image>
  101. </view>
  102. <view v-else>
  103. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  104. </view>
  105. <view @click="removeht(index,key,'jsdps')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  106. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  107. </image>
  108. </view>
  109. </view>
  110. </view>
  111. <view class="uni-common-mt" style="width: 100%;">
  112. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  113. #000;margin-top: 5px;margin-left: 8px;">回填后照片:</text>
  114. </view>
  115. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  116. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('hth',key)">
  117. </image>
  118. <view v-for="(item,index) in value.photosAfter" :key="index" style="position: relative;">
  119. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  120. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.photosAfter)">
  121. </image>
  122. </view>
  123. <view v-else>
  124. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  125. </view>
  126. <view @click="removeht(index,key,'hth')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  127. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  128. </image>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. <view v-if="title=='下沟'">
  134. <view class="cz-style" v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
  135. <view class="uni-media-list-text-top" style=" ">
  136. <view class="tit-text">材质:</view>
  137. <view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz',key,index)">
  138. <span style="color: black;">{{a.materialQualityName==''?'请选择材质':a.materialQualityName}}</span>
  139. </view>
  140. </view>
  141. <view class="uni-media-list-text-top" style=" ">
  142. <view class="tit-text">规格:</view>
  143. <view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg',key,index)">
  144. <span style="color: black;">{{a.specificationsName==''?'请选择规格':a.specificationsName}}</span>
  145. </view>
  146. </view>
  147. <view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
  148. <text class="tit-text">米 数</text>
  149. <view style="display: flex; justify-content: right; width: 70%;">
  150. <input class="uni-input" type="number" :value="getIntegerPart(a.number,0)" @change="setInfoBoNumber(key,index,$event.target.value,0)" maxlength="6" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  151. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  152. <input class="uni-input" type="number" :value="getIntegerPart(a.number,1)" @change="setInfoBoNumber(key,index,$event.target.value,1)" maxlength="1" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  153. </view>
  154. </view>
  155. <button v-if="index!=0" @click="btnDel(key,index)" class="sc-btn">删除</button>
  156. </view>
  157. <button @click="btnAdd(key,index)" class="tj-btn">添加</button>
  158. <!-- <view class="uni-common-mt" style="width: 100%;">
  159. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  160. #000;margin-top: 5px; margin-left: 8px;">管道施工记录:</text>
  161. </view>
  162. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  163. <image :src="loadImgSrc('updateimg.png')" mode=""
  164. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
  165. @click="chooseType('gdsgjl',key)">
  166. </image>
  167. <view v-for="(item,index) in value.constructionRecords" :key="index"
  168. style="position: relative;">
  169. <view
  170. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  171. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"
  172. @click="showPhoto(index,value.constructionRecords)">
  173. </image>
  174. </view>
  175. <view v-else>
  176. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  177. </view>
  178. <view @click="removeht(index,key,'gdsgjl')"
  179. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  180. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  181. </image>
  182. </view>
  183. </view>
  184. </view> -->
  185. <view class="uni-common-mt" style="width: 100%;">
  186. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  187. #000;margin-top: 5px; margin-left: 8px;">管上皮深度测量照片:</text>
  188. </view>
  189. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  190. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="chooseType('gspsdcl',key)">
  191. </image>
  192. <view v-for="(item,index) in value.ductalEpithelium" :key="index" style="position: relative;">
  193. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  194. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.ductalEpithelium)">
  195. </image>
  196. </view>
  197. <view v-else>
  198. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  199. </view>
  200. <view @click="removeht(index,key,'gspsdcl')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  201. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  202. </image>
  203. </view>
  204. </view>
  205. </view>
  206. <view class="uni-common-mt" style="width: 100%;">
  207. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  208. #000;margin-top: 5px;margin-left: 8px;">管沟远景照片:</text>
  209. </view>
  210. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  211. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="chooseType('ggyj',key)">
  212. </image>
  213. <view v-for="(item,index) in value.trenchProspect" :key="index" style="position: relative;">
  214. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  215. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.trenchProspect)">
  216. </image>
  217. </view>
  218. <view v-else>
  219. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  220. </view>
  221. <view @click="removeht(index,key,'ggyj')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  222. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  223. </image>
  224. </view>
  225. </view>
  226. </view>
  227. <view class="uni-common-mt" style="width: 100%;">
  228. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  229. #000;margin-top: 5px;margin-left: 8px;">视频:</text>
  230. </view>
  231. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  232. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="chooseType('video',key)">
  233. </image>
  234. <view v-for="(item,index) in value.video" :key="index" style="position: relative;">
  235. <view>
  236. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  237. </view>
  238. <view @click="removeht(index,key,'video')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  239. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  240. </image>
  241. </view>
  242. </view>
  243. </view>
  244. </view>
  245. <view v-if="title=='调压柜'">
  246. <view class="uni-common-mt" style="width: 100%;">
  247. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  248. #000;margin-top: 5px; margin-left: 8px;">调压箱铭牌照片:</text>
  249. </view>
  250. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  251. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Box',key)">
  252. </image>
  253. <view v-for="(item,index) in value.boxBrand" :key="index" style="position: relative;">
  254. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  255. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.boxBrand)">
  256. </image>
  257. </view>
  258. <view v-else>
  259. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  260. </view>
  261. <view @click="removeht(index,key,'Box')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  262. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  263. </image>
  264. </view>
  265. </view>
  266. </view>
  267. <view class="uni-common-mt" style="width: 100%;">
  268. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  269. #000;margin-top: 5px; margin-left: 8px;">调压箱内石粉回填照片:</text>
  270. </view>
  271. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  272. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Sfht',key)">
  273. </image>
  274. <view v-for="(item,index) in value.stonePowder" :key="index" style="position: relative;">
  275. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  276. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.stonePowder)">
  277. </image>
  278. </view>
  279. <view v-else>
  280. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  281. </view>
  282. <view @click="removeht(index,key,'Sfht')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  283. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  284. </image>
  285. </view>
  286. </view>
  287. </view>
  288. <view class="uni-common-mt" style="width: 100%;">
  289. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  290. #000;margin-top: 5px; margin-left: 8px;">调压箱防雷接地照片:</text>
  291. </view>
  292. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  293. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Fljd',key)">
  294. </image>
  295. <view v-for="(item,index) in value.lightning" :key="index" style="position: relative;">
  296. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  297. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.lightning)">
  298. </image>
  299. </view>
  300. <view v-else>
  301. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  302. </view>
  303. <view @click="removeht(index,key,'Fljd')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  304. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  305. </image>
  306. </view>
  307. </view>
  308. </view>
  309. <view class="uni-common-mt" style="width: 100%;">
  310. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  311. #000;margin-top: 5px; margin-left: 8px;">调压箱底腿连接照片:</text>
  312. </view>
  313. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  314. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Fljd',key)">
  315. </image>
  316. <view v-for="(item,index) in value.bottomLeg" :key="index" style="position: relative;">
  317. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  318. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.bottomLeg)">
  319. </image>
  320. </view>
  321. <view v-else>
  322. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  323. </view>
  324. <view @click="removeht(index,key,'Fljd')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  325. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  326. </image>
  327. </view>
  328. </view>
  329. </view>
  330. <view class="uni-common-mt" style="width: 100%;">
  331. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  332. #000;margin-top: 5px; margin-left: 8px;">调压箱护栏及地面硬化(远景)照片:</text>
  333. </view>
  334. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  335. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Hldmyh',key)">
  336. </image>
  337. <view v-for="(item,index) in value.groundHardening" :key="index" style="position: relative;">
  338. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  339. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.groundHardening)">
  340. </image>
  341. </view>
  342. <view v-else>
  343. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  344. </view>
  345. <view @click="removeht(index,key,'Hldmyh')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  346. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  347. </image>
  348. </view>
  349. </view>
  350. </view>
  351. </view>
  352. <view v-if="title=='阀井'">
  353. <view class="uni-common-mt" style="width: 100%;">
  354. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  355. #000;margin-top: 5px; margin-left: 8px;">套管照片:</text>
  356. </view>
  357. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  358. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Tg',key)">
  359. </image>
  360. <view v-for="(item,index) in value.cannula" :key="index" style="position: relative;">
  361. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  362. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.cannula)">
  363. </image>
  364. </view>
  365. <view v-else>
  366. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  367. </view>
  368. <view @click="removeht(index,key,'Tg')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  369. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  370. </image>
  371. </view>
  372. </view>
  373. </view>
  374. <view class="uni-common-mt" style="width: 100%;">
  375. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  376. #000;margin-top: 5px; margin-left: 8px;">内壁抹灰照片:</text>
  377. </view>
  378. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  379. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Nbmh',key)">
  380. </image>
  381. <view v-for="(item,index) in value.wallPlaster" :key="index" style="position: relative;">
  382. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  383. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.wallPlaster)">
  384. </image>
  385. </view>
  386. <view v-else>
  387. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  388. </view>
  389. <view @click="removeht(index,key,'Nbmh')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  390. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  391. </image>
  392. </view>
  393. </view>
  394. </view>
  395. <view class="uni-common-mt" style="width: 100%;">
  396. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  397. #000;margin-top: 5px; margin-left: 8px;">防护网照片:</text>
  398. </view>
  399. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  400. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Fhw',key)">
  401. </image>
  402. <view v-for="(item,index) in value.protectiveNet" :key="index" style="position: relative;">
  403. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  404. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.protectiveNet)">
  405. </image>
  406. </view>
  407. <view v-else>
  408. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  409. </view>
  410. <view @click="removeht(index,key,'Fhw')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  411. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  412. </image>
  413. </view>
  414. </view>
  415. </view>
  416. <view class="uni-common-mt" style="width: 100%;">
  417. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  418. #000;margin-top: 5px; margin-left: 8px;">八角照片:</text>
  419. </view>
  420. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  421. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Bj',key)">
  422. </image>
  423. <view v-for="(item,index) in value.starAnise" :key="index" style="position: relative;">
  424. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  425. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,value.starAnise)">
  426. </image>
  427. </view>
  428. <view v-else>
  429. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  430. </view>
  431. <view @click="removeht(index,key,'Bj')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  432. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  433. </image>
  434. </view>
  435. </view>
  436. </view>
  437. </view>
  438. </view>
  439. </view>
  440. </view>
  441. </view>
  442. <!-- <view class="gesture-area" v-show="playVideo" >
  443. <view @click="closeVideo()"
  444. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  445. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  446. </image>
  447. </view>
  448. <video :src="playVideoSrc"></video>
  449. </view> -->
  450. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name" subtitleKey="id">
  451. </SelectPicker>
  452. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict" titleKey="dictLabel" subtitleKey="dictValue" v-model="name"></SelectPicker>
  453. <view class="action-btn" v-if="hideButton==false">
  454. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认</button>
  455. </view>
  456. </scroll-view>
  457. </template>
  458. <script>
  459. import SelectPicker from '../../components/selectPicker/select_picker.vue'
  460. import {
  461. getDicts
  462. } from "@/api/system/dict/data";
  463. import {
  464. getToken
  465. } from '../../utils/auth';
  466. import user from '@/store/modules/user'
  467. import {
  468. getHistoryDetails,
  469. getEnginMaterialQualityList,
  470. putHistory,
  471. getEnginSpecificationsList
  472. } from '@/api/common'
  473. export default {
  474. components: {
  475. SelectPicker,
  476. },
  477. data() {
  478. return {
  479. // playVideo: false,//视频播放放大
  480. // playVideoSrc:'',
  481. selectZbfList: [],
  482. dictOptions: [],
  483. openDict: false,
  484. dataIndex: 0, //数据用第几条
  485. selectIndex: 0, //材质规格用的第几条
  486. imageIndex: 0,
  487. headers: {
  488. Authorization: "Bearer " + getToken()
  489. },
  490. nodeId: '',
  491. type: '',
  492. title: '',
  493. dataJson: '',
  494. enginClassification: '',
  495. enginType: '',
  496. enginClassValue: '',
  497. selectList: [],
  498. open: false,
  499. selectType: '',
  500. hideButton: false,
  501. }
  502. },
  503. onLoad(options) {
  504. if ('params' in options) {
  505. let e = JSON.parse(decodeURIComponent(options.params));
  506. this.nodeId = e.id;
  507. this.type = e.type;
  508. getHistoryDetails(this.nodeId, this.type).then(response => {
  509. if (response.data.zEngineeringNodeBo != null) {
  510. let flag = false;
  511. for (let i in response.data.zEngineeringNodeBo.zEngineeringInfoBoList) {
  512. if (response.data.zEngineeringNodeBo.zEngineeringInfoBoList[i].createBy == this.$user
  513. .state.name) {
  514. flag = true;
  515. break;
  516. }
  517. }
  518. if (flag) {
  519. this.hideButton = false;
  520. this.dataJson = response.data;
  521. this.title = response.data.zEngineeringNodeBo.type;
  522. this.enginType = response.data.enginType;
  523. this.enginClassification = response.data.enginClassification;
  524. } else {
  525. this.hideButton = true;
  526. this.$modal.msg("暂无本人历史信息")
  527. }
  528. } else {
  529. this.hideButton = true;
  530. this.$modal.msg("暂无历史信息")
  531. }
  532. });
  533. }
  534. },
  535. methods: {
  536. //关闭弹窗
  537. close(e) {
  538. this.open = false
  539. },
  540. btnAdd(key, index) {
  541. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.push({
  542. 'materialQuality': '',
  543. 'materialQualityName': '',
  544. 'number': '',
  545. 'specifications': '',
  546. 'specificationsName': ''
  547. });
  548. },
  549. btnDel(key, index) {
  550. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.splice(index, 1);
  551. },
  552. pickerShow(e, index, indexTwo) {
  553. this.dataIndex = index;
  554. this.selectIndex = indexTwo; //材质规格 第几条
  555. this.selectType = e;
  556. if (e == 'cz') {
  557. this.open = true;
  558. getEnginMaterialQualityList("民用工程", this.enginType, this.enginClassification, this.title)
  559. .then(response => {
  560. this.selectList = response.data;
  561. });
  562. }
  563. if (e == 'gg') {
  564. if (this.isEmpty(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
  565. .zEngineeringMaterialBo[this.selectIndex].materialQuality)) {
  566. this.$modal.msg('请选择材质')
  567. } else {
  568. this.open = true;
  569. getEnginSpecificationsList(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
  570. .zEngineeringMaterialBo[this.selectIndex].materialQuality).then(res => {
  571. this.selectList = res.data
  572. })
  573. }
  574. }
  575. },
  576. changeSelect(item, index) {
  577. this.open = false;
  578. if (this.selectType == 'cz') {
  579. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  580. .selectIndex]
  581. .materialQuality = item.id;
  582. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  583. .selectIndex]
  584. .materialQualityName = item.name;
  585. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  586. .selectIndex]
  587. .specifications = '';
  588. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  589. .selectIndex]
  590. .specificationsName = '';
  591. } else if (this.selectType == 'gg') {
  592. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  593. .selectIndex]
  594. .specifications = item.id;
  595. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  596. .selectIndex]
  597. .specificationsName = item.name;
  598. }
  599. },
  600. // 截取小数点前的字符串
  601. getIntegerPart(numStr, i) {
  602. return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
  603. },
  604. setInfoBoNumber(key, index, number, i) {
  605. let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index]
  606. .number;
  607. let resAry = Ynumber.toString().split('.');
  608. resAry[i] = number
  609. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index].number = resAry
  610. .join('.');
  611. },
  612. bindTextAreaBlur(e, index) {
  613. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].remark = e;
  614. },
  615. removeht(index, key, type) {
  616. uni.showModal({
  617. title: '提示',
  618. content: '是否删除该图片或视频?',
  619. success: (res) => {
  620. if (res.confirm) {
  621. if (type == 'sfht') {
  622. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].stonePowder
  623. .splice(index, 1)
  624. } else if (type == 'jsdps') {
  625. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].warningtTape
  626. .splice(index, 1)
  627. } else if (type == 'hth') {
  628. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].photosAfter
  629. .splice(index, 1)
  630. } else if (type == 'gdsgjl') {
  631. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  632. .constructionRecords
  633. .splice(index, 1)
  634. } else if (type == 'gspsdcl') {
  635. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  636. .ductalEpithelium
  637. .splice(index, 1)
  638. } else if (type == 'ggyj') {
  639. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  640. .trenchProspect
  641. .splice(index, 1)
  642. } else if (type == 'video') {
  643. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  644. .video
  645. .splice(index, 1)
  646. } else if (type == 'Box') {
  647. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  648. .boxBrand
  649. .splice(index, 1)
  650. } else if (type == 'Sfht') {
  651. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  652. .stonePowder
  653. .splice(index, 1)
  654. } else if (type == 'Fljd') {
  655. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  656. .lightning
  657. .splice(index, 1)
  658. } else if (type == 'Dtlj') {
  659. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  660. .bottomLeg
  661. .splice(index, 1)
  662. } else if (type == 'Hldmyh') {
  663. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  664. .groundHardening
  665. .splice(index, 1)
  666. } else if (type == 'Tg') {
  667. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  668. .cannula
  669. .splice(index, 1)
  670. } else if (type == 'Nbmh') {
  671. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  672. .wallPlaster
  673. .splice(index, 1)
  674. } else if (type == 'Fhw') {
  675. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  676. .protectiveNet
  677. .splice(index, 1)
  678. } else if (type == 'Bj') {
  679. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  680. .starAnise
  681. .splice(index, 1)
  682. }
  683. }
  684. }
  685. })
  686. },
  687. remove(index, key) {
  688. uni.showModal({
  689. title: '提示',
  690. content: '是否删除该图片或视频?',
  691. success: (res) => {
  692. if (res.confirm) {
  693. this.dataJson.zEngineeringNodeBo
  694. .zEngineeringInfoBoList[key]
  695. .zEngiineeringPhotoBoList.splice(index, 1)
  696. }
  697. }
  698. })
  699. },
  700. chooseType(type, index) {
  701. this.dataIndex = index;
  702. let _this = this;
  703. if (type == 'video') {
  704. this.choosevideo(type)
  705. } else {
  706. this.chooseimage(type)
  707. }
  708. },
  709. choose(type, index) {
  710. this.dataIndex = index;
  711. let _this = this;
  712. uni.showActionSheet({
  713. title: '上传',
  714. itemList: ['图片', '视频'],
  715. success: (res) => {
  716. if (res.tapIndex == 0) {
  717. this.chooseimage(type)
  718. } else {
  719. this.choosevideo(type)
  720. }
  721. }
  722. })
  723. },
  724. chooseimage(e) {
  725. let _this = this;
  726. uni.chooseImage({
  727. sourceType: this.enginType == `old_renovation` ? ['camera'] : ['album', 'camera'],
  728. success(resp) {
  729. resp.tempFiles.forEach((item, index) => {
  730. const task = uni.uploadFile({
  731. url: _this.$HTTP + `/obs`,
  732. filePath: item.path,
  733. name: 'file',
  734. formData: {},
  735. header: _this.headers,
  736. success: res => {
  737. let data = JSON.parse(res.data);
  738. if (![200].includes(data.code)) {
  739. _this.$modal.msg(data.msg)
  740. } else {
  741. if (_this.progress === 100) {
  742. if (e == 'other') {
  743. _this.dataJson.zEngineeringNodeBo
  744. .zEngineeringInfoBoList[_this.dataIndex]
  745. .zEngiineeringPhotoBoList.push(data.data
  746. .url);
  747. } else if (e == 'sfht') {
  748. _this.dataJson.zEngineeringNodeBo
  749. .zEngineeringInfoBoList[_this.dataIndex]
  750. .stonePowder.push(data.data
  751. .url);
  752. } else if (e == 'jsdps') {
  753. _this.dataJson.zEngineeringNodeBo
  754. .zEngineeringInfoBoList[_this.dataIndex]
  755. .warningtTape.push(data.data
  756. .url);
  757. } else if (e == 'hth') {
  758. _this.dataJson.zEngineeringNodeBo
  759. .zEngineeringInfoBoList[_this.dataIndex]
  760. .photosAfter.push(data.data
  761. .url);
  762. } else if (e == 'gdsgjl') {
  763. _this.dataJson.zEngineeringNodeBo
  764. .zEngineeringInfoBoList[_this.dataIndex]
  765. .constructionRecords.push(data.data
  766. .url);
  767. } else if (e == 'gspsdcl') {
  768. _this.dataJson.zEngineeringNodeBo
  769. .zEngineeringInfoBoList[_this.dataIndex]
  770. .ductalEpithelium.push(data.data
  771. .url);
  772. } else if (e == 'ggyj') {
  773. _this.dataJson.zEngineeringNodeBo
  774. .zEngineeringInfoBoList[_this.dataIndex]
  775. .trenchProspect.push(data.data
  776. .url);
  777. } else if (e == 'Box') {
  778. _this.dataJson.zEngineeringNodeBo
  779. .zEngineeringInfoBoList[_this.dataIndex]
  780. .boxBrand.push(data
  781. .data
  782. .url);
  783. } else if (e == 'Sfht') {
  784. _this.dataJson.zEngineeringNodeBo
  785. .zEngineeringInfoBoList[_this.dataIndex]
  786. .stonePowder.push(data
  787. .data
  788. .url);
  789. } else if (e == 'Fljd') {
  790. _this.dataJson.zEngineeringNodeBo
  791. .zEngineeringInfoBoList[_this.dataIndex]
  792. .lightning.push(data
  793. .data
  794. .url);
  795. } else if (e == 'Dtlj') {
  796. _this.dataJson.zEngineeringNodeBo
  797. .zEngineeringInfoBoList[_this.dataIndex]
  798. .bottomLeg.push(data
  799. .data
  800. .url);
  801. } else if (e == 'Hldmyh') {
  802. _this.dataJson.zEngineeringNodeBo
  803. .zEngineeringInfoBoList[_this.dataIndex]
  804. .groundHardening.push(data
  805. .data
  806. .url);
  807. } else if (e == 'Tg') {
  808. _this.dataJson.zEngineeringNodeBo
  809. .zEngineeringInfoBoList[_this.dataIndex]
  810. .cannula.push(data
  811. .data
  812. .url);
  813. } else if (e == 'Nbmh') {
  814. _this.dataJson.zEngineeringNodeBo
  815. .zEngineeringInfoBoList[_this.dataIndex]
  816. .wallPlaster.push(data
  817. .data
  818. .url);
  819. } else if (e == 'Fhw') {
  820. _this.dataJson.zEngineeringNodeBo
  821. .zEngineeringInfoBoList[_this.dataIndex]
  822. .protectiveNet.push(data
  823. .data
  824. .url);
  825. } else if (e == 'Bj') {
  826. _this.dataJson.zEngineeringNodeBo
  827. .zEngineeringInfoBoList[_this.dataIndex]
  828. .starAnise.push(data
  829. .data
  830. .url);
  831. }
  832. _this.$modal.msg('上传成功!')
  833. }
  834. }
  835. },
  836. fail: e => {
  837. _this.$modal.msg('上传失败!')
  838. },
  839. complete: res => {
  840. uni.hideLoading();
  841. _this.uploading = false;
  842. }
  843. });
  844. task.onProgressUpdate(res => {
  845. _this.progress = res.progress;
  846. uni.showLoading({
  847. title: '上传中'
  848. })
  849. if (_this.progress != 100) {
  850. _this.loading = false
  851. } else {
  852. _this.loading = true
  853. }
  854. });
  855. })
  856. },
  857. })
  858. },
  859. choosevideo(e) {
  860. let _this = this;
  861. uni.chooseVideo({
  862. sourceType: this.enginType == `old_renovation` ? ['camera'] : ['album', 'camera'],
  863. maxDuration: 30,
  864. success(resp) {
  865. const task = uni.uploadFile({
  866. url: _this.$HTTP + `/obs`,
  867. filePath: resp.tempFilePath,
  868. name: 'file',
  869. formData: {},
  870. header: _this.headers,
  871. success: res => {
  872. let data = JSON.parse(res.data);
  873. if (![200].includes(res.statusCode)) {
  874. this.uploadError(index, data);
  875. } else {
  876. //上传成功
  877. if (_this.progress === 100) {
  878. if (e == 'other') {
  879. _this.dataJson.zEngineeringNodeBo
  880. .zEngineeringInfoBoList[_this.dataIndex]
  881. .zEngiineeringPhotoBoList.push(data.data.url);
  882. } else if (e == 'sfht') {
  883. _this.dataJson.zEngineeringNodeBo
  884. .zEngineeringInfoBoList[_this.dataIndex]
  885. .stonePowder.push(data.data.url);
  886. } else if (e == 'jsdps') {
  887. _this.dataJson.zEngineeringNodeBo
  888. .zEngineeringInfoBoList[_this.dataIndex]
  889. .warningtTape.push(data.data.url);
  890. } else if (e == 'hth') {
  891. _this.dataJson.zEngineeringNodeBo
  892. .zEngineeringInfoBoList[_this.dataIndex]
  893. .photosAfter.push(data.data.url);
  894. } else if (e == 'video') {
  895. _this.dataJson.zEngineeringNodeBo
  896. .zEngineeringInfoBoList[_this.dataIndex]
  897. .video.push(data.data.url);
  898. } else if (e == 'Box') {
  899. _this.dataJson.zEngineeringNodeBo
  900. .zEngineeringInfoBoList[_this.dataIndex]
  901. .boxBrand.push(data.data.url);
  902. } else if (e == 'Sfht') {
  903. _this.dataJson.zEngineeringNodeBo
  904. .zEngineeringInfoBoList[_this.dataIndex]
  905. .stonePowder.push(data.data.url);
  906. } else if (e == 'Fljd') {
  907. _this.dataJson.zEngineeringNodeBo
  908. .zEngineeringInfoBoList[_this.dataIndex]
  909. .lightning.push(data.data.url);
  910. } else if (e == 'Dtlj') {
  911. _this.dataJson.zEngineeringNodeBo
  912. .zEngineeringInfoBoList[_this.dataIndex]
  913. .bottomLeg.push(data.data.url);
  914. } else if (e == 'Hldmyh') {
  915. _this.dataJson.zEngineeringNodeBo
  916. .zEngineeringInfoBoList[_this.dataIndex]
  917. .groundHardening.push(data.data.url);
  918. } else if (e == 'Tg') {
  919. _this.dataJson.zEngineeringNodeBo
  920. .zEngineeringInfoBoList[_this.dataIndex]
  921. .cannula.push(data.data.url);
  922. } else if (e == 'Nbmh') {
  923. _this.dataJson.zEngineeringNodeBo
  924. .zEngineeringInfoBoList[_this.dataIndex]
  925. .wallPlaster.push(data.data.url);
  926. } else if (e == 'Fhw') {
  927. _this.dataJson.zEngineeringNodeBo
  928. .zEngineeringInfoBoList[_this.dataIndex]
  929. .protectiveNet.push(data.data.url);
  930. } else if (e == 'Bj') {
  931. _this.dataJson.zEngineeringNodeBo
  932. .zEngineeringInfoBoList[_this.dataIndex]
  933. .starAnise.push(data.data.url);
  934. }
  935. _this.$modal.msg('上传成功!')
  936. }
  937. }
  938. },
  939. fail: e => {
  940. _this.$modal.msg('上传失败!')
  941. this.uploadError(index, e);
  942. },
  943. complete: res => {
  944. uni.hideLoading();
  945. _this.uploading = false;
  946. }
  947. });
  948. task.onProgressUpdate(res => {
  949. _this.progress = res.progress;
  950. uni.showLoading({
  951. title: '上传中'
  952. })
  953. if (_this.progress != 100) {
  954. _this.loading = false
  955. } else {
  956. _this.loading = true
  957. }
  958. });
  959. },
  960. })
  961. },
  962. showPhoto(index, arr) {
  963. let newArr = [];
  964. arr.forEach((item, index) => {
  965. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
  966. item.substring(item.length - 4) == 'jpeg') {
  967. newArr.push(item)
  968. }
  969. });
  970. uni.previewImage({
  971. current: index,
  972. urls: newArr,
  973. })
  974. },
  975. // showVideo(arr) {
  976. // this.playVideo = true;
  977. // this.playVideoSrc = arr;
  978. // },
  979. // closeVideo(){
  980. // this.playVideo = false;
  981. // },
  982. isEmpty(str) {
  983. return (!str || 0 === str.length);
  984. },
  985. isEdit(item) {
  986. var isShow = item.createBy == this.$user.state.name;
  987. return isShow;
  988. },
  989. submit() {
  990. let isSubmit = true;
  991. if (this.title == '回填') {
  992. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  993. // if (res.stonePowder.length == 0) {
  994. // this.$modal.msg("请上传石粉回填照片");
  995. // isSubmit = false;
  996. // }
  997. if (res.warningtTape.length == 0) {
  998. this.$modal.msg("请上传警示带铺设照片");
  999. isSubmit = false;
  1000. }
  1001. if (res.photosAfter.length == 0) {
  1002. this.$modal.msg("请上传回填后照片");
  1003. isSubmit = false;
  1004. }
  1005. })
  1006. } else if (this.title == '下沟') {
  1007. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1008. res.zEngineeringMaterialBo.forEach((itme) => {
  1009. if (itme.specifications == '') {
  1010. this.$modal.msg("请选择规格");
  1011. isSubmit = false;
  1012. }
  1013. if (itme.number == '') {
  1014. this.$modal.msg("请输入米数");
  1015. isSubmit = false;
  1016. }
  1017. })
  1018. // if (res.constructionRecords.length <= 0) {
  1019. // this.$modal.msg('请上传管道施工记录照片')
  1020. // isSubmit = false;
  1021. // }
  1022. if (res.ductalEpithelium.length <= 0) {
  1023. this.$modal.msg('请上传管上皮深度测量照片')
  1024. isSubmit = false;
  1025. }
  1026. if (res.trenchProspect.length <= 0) {
  1027. this.$modal.msg('请上传管沟远景照片')
  1028. isSubmit = false;
  1029. }
  1030. if (res.video.length <= 0) {
  1031. this.$modal.msg('请上传视频')
  1032. isSubmit = false;
  1033. }
  1034. })
  1035. } else if (this.title == '调压柜') {
  1036. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1037. if (res.boxBrand.length == 0) {
  1038. this.$modal.msg("请上传调压箱铭牌照片");
  1039. isSubmit = false;
  1040. }
  1041. if (res.stonePowder.length == 0) {
  1042. this.$modal.msg("请上传调压箱内石粉回填照片");
  1043. isSubmit = false;
  1044. }
  1045. if (res.lightning.length == 0) {
  1046. this.$modal.msg("请上传调压箱防雷接地照片");
  1047. isSubmit = false;
  1048. }
  1049. if (res.bottomLeg.length == 0) {
  1050. this.$modal.msg("请上传调压箱底腿连接照片");
  1051. isSubmit = false;
  1052. }
  1053. if (res.groundHardening.length == 0) {
  1054. this.$modal.msg("请上传调压箱护栏及地面硬化(远景)照片");
  1055. isSubmit = false;
  1056. }
  1057. })
  1058. } else if (this.title == '阀井') {
  1059. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1060. if (res.cannula.length == 0) {
  1061. this.$modal.msg("请上传套管照片");
  1062. isSubmit = false;
  1063. }
  1064. if (res.wallPlaster.length == 0) {
  1065. this.$modal.msg("请上传内壁抹灰照片");
  1066. isSubmit = false;
  1067. }
  1068. if (res.protectiveNet.length == 0) {
  1069. this.$modal.msg("请上传防护网照片");
  1070. isSubmit = false;
  1071. }
  1072. if (res.starAnise.length == 0) {
  1073. this.$modal.msg("请上传八角照片");
  1074. isSubmit = false;
  1075. }
  1076. })
  1077. } else {
  1078. if (this.title == '全貌照片') {
  1079. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1080. res.zEngineeringMaterialBo.forEach((itme) => {
  1081. if (itme.specifications == '') {
  1082. this.$modal.msg("请选择规格");
  1083. isSubmit = false;
  1084. }
  1085. if (itme.number == '') {
  1086. this.$modal.msg("请输入米数");
  1087. isSubmit = false;
  1088. }
  1089. })
  1090. })
  1091. }
  1092. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1093. if (res.zEngiineeringPhotoBoList.length == 0) {
  1094. this.$modal.msg("请上传照片");
  1095. isSubmit = false;
  1096. }
  1097. })
  1098. }
  1099. if (!isSubmit) {
  1100. return
  1101. }
  1102. putHistory(this.dataJson).then(
  1103. response => {
  1104. if (response.code == '200') {
  1105. uni.hideLoading()
  1106. uni.showToast({
  1107. title: response.msg,
  1108. icon: 'none',
  1109. duration: 2000
  1110. });
  1111. setTimeout(function() {
  1112. uni.navigateBack();
  1113. }, 1000)
  1114. }
  1115. });
  1116. }
  1117. }
  1118. }
  1119. </script>
  1120. <style lang="scss">
  1121. .uni-media-list-body {
  1122. background: #fff;
  1123. border: 1px solid #eee;
  1124. border-radius: 40rpx;
  1125. margin: 20rpx;
  1126. padding: 10rpx 0 40rpx;
  1127. box-shadow: 0 0 5px #eee;
  1128. }
  1129. .uni-media-list-text-top {
  1130. display: flex;
  1131. align-items: center;
  1132. justify-content: space-between;
  1133. padding: 10px;
  1134. position: relative;
  1135. }
  1136. .to-right-icon {
  1137. width: 15px;
  1138. height: 15px;
  1139. position: absolute;
  1140. top: 50%;
  1141. transform: translateY(-50%);
  1142. }
  1143. .share {
  1144. width: 100%;
  1145. height: 100%;
  1146. }
  1147. .tit-text {
  1148. color: #4f535a;
  1149. margin-right: 20rpx;
  1150. }
  1151. .normal-text {}
  1152. .cz-style {
  1153. background: #e8f4f9;
  1154. margin: 20rpx;
  1155. padding: 10rpx;
  1156. border-radius: 20rpx;
  1157. border: 1px solid #d4e3f0;
  1158. }
  1159. .uni-media-list-text-top {
  1160. font-size: 14px;
  1161. color: #696969;
  1162. padding: 20rpx 20rpx;
  1163. border-bottom: 1px solid #eee;
  1164. display: flex;
  1165. align-items: center;
  1166. }
  1167. .share-box {
  1168. width: 100%;
  1169. height: 100%;
  1170. position: fixed;
  1171. top: 0rpx;
  1172. left: 0rpx;
  1173. bottom: 0rpx;
  1174. right: 0rpx;
  1175. background-color: rgba(0, 0, 0, 0.4);
  1176. transition: .3s;
  1177. z-index: 999;
  1178. }
  1179. // 进入分享动画
  1180. .share-show {
  1181. transition: all 0.3s ease;
  1182. transform: translateY(0%) !important;
  1183. border-radius: 20px 20px 0px 0px;
  1184. }
  1185. .scroll-Y {
  1186. height: 58vh;
  1187. }
  1188. // 离开分享动画
  1189. .share-item {
  1190. position: fixed;
  1191. left: 0;
  1192. bottom: 0;
  1193. width: 100%;
  1194. height: 70%;
  1195. background-color: #FFFFFF;
  1196. transition: all 0.3s ease;
  1197. transform: translateY(100%);
  1198. z-index: 1999;
  1199. .share-to {
  1200. width: 100%;
  1201. height: 30px;
  1202. display: flex;
  1203. justify-content: center;
  1204. margin: 30rpx 0;
  1205. align-items: center;
  1206. }
  1207. .content {
  1208. width: 100%;
  1209. height: auto;
  1210. display: flex;
  1211. flex-wrap: wrap;
  1212. .block {
  1213. width: 100%;
  1214. display: flex;
  1215. flex-direction: column;
  1216. justify-content: center;
  1217. align-items: left;
  1218. height: auto;
  1219. image {
  1220. width: 80rpx;
  1221. height: 80rpx;
  1222. }
  1223. text {
  1224. margin-top: 16rpx;
  1225. font-size: 28rpx;
  1226. color: #606266;
  1227. }
  1228. }
  1229. }
  1230. .cancel {
  1231. width: 100%;
  1232. height: 3rem;
  1233. display: flex;
  1234. justify-content: center;
  1235. align-items: center;
  1236. border-top: 1rpx solid #E4E7ED;
  1237. }
  1238. }
  1239. .uni-media-list-text-top {
  1240. display: flex;
  1241. align-items: center;
  1242. justify-content: space-between;
  1243. padding: 10px;
  1244. position: relative;
  1245. }
  1246. .uni-list {
  1247. border: 1xp solid #eee;
  1248. }
  1249. .to-right-icon {
  1250. width: 15px;
  1251. height: 15px;
  1252. position: absolute;
  1253. top: 50%;
  1254. transform: translateY(-50%);
  1255. }
  1256. .text {
  1257. font-size: 16px;
  1258. color: #333;
  1259. }
  1260. .tj-btn {
  1261. height: 69rpx;
  1262. background: #3184f0;
  1263. border-radius: 6rpx;
  1264. font-size: 25rpx;
  1265. font-weight: 400;
  1266. color: #FFFFFF;
  1267. line-height: 69rpx;
  1268. margin: 40rpx 70rpx;
  1269. }
  1270. .sc-btn {
  1271. height: 69rpx;
  1272. background: #f0686b;
  1273. border-radius: 6rpx;
  1274. font-size: 25rpx;
  1275. font-weight: 400;
  1276. color: #FFFFFF;
  1277. line-height: 69rpx;
  1278. margin: 40rpx;
  1279. }
  1280. // .gesture-area {
  1281. // //加浮动弹窗
  1282. // width: 100%;
  1283. // height: 100%;
  1284. // }
  1285. </style>