historyDetailsCourtyard.vue 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456
  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. if (numStr != null && numStr != undefined && numStr != '') {
  603. return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
  604. }
  605. },
  606. setInfoBoNumber(key, index, number, i) {
  607. let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index]
  608. .number;
  609. let resAry = Ynumber.toString().split('.');
  610. resAry[i] = number
  611. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index].number = resAry
  612. .join('.');
  613. },
  614. bindTextAreaBlur(e, index) {
  615. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].remark = e;
  616. },
  617. removeht(index, key, type) {
  618. uni.showModal({
  619. title: '提示',
  620. content: '是否删除该图片或视频?',
  621. success: (res) => {
  622. if (res.confirm) {
  623. if (type == 'sfht') {
  624. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].stonePowder
  625. .splice(index, 1)
  626. } else if (type == 'jsdps') {
  627. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].warningtTape
  628. .splice(index, 1)
  629. } else if (type == 'hth') {
  630. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].photosAfter
  631. .splice(index, 1)
  632. } else if (type == 'gdsgjl') {
  633. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  634. .constructionRecords
  635. .splice(index, 1)
  636. } else if (type == 'gspsdcl') {
  637. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  638. .ductalEpithelium
  639. .splice(index, 1)
  640. } else if (type == 'ggyj') {
  641. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  642. .trenchProspect
  643. .splice(index, 1)
  644. } else if (type == 'video') {
  645. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  646. .video
  647. .splice(index, 1)
  648. } else if (type == 'Box') {
  649. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  650. .boxBrand
  651. .splice(index, 1)
  652. } else if (type == 'Sfht') {
  653. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  654. .stonePowder
  655. .splice(index, 1)
  656. } else if (type == 'Fljd') {
  657. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  658. .lightning
  659. .splice(index, 1)
  660. } else if (type == 'Dtlj') {
  661. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  662. .bottomLeg
  663. .splice(index, 1)
  664. } else if (type == 'Hldmyh') {
  665. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  666. .groundHardening
  667. .splice(index, 1)
  668. } else if (type == 'Tg') {
  669. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  670. .cannula
  671. .splice(index, 1)
  672. } else if (type == 'Nbmh') {
  673. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  674. .wallPlaster
  675. .splice(index, 1)
  676. } else if (type == 'Fhw') {
  677. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  678. .protectiveNet
  679. .splice(index, 1)
  680. } else if (type == 'Bj') {
  681. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  682. .starAnise
  683. .splice(index, 1)
  684. }
  685. }
  686. }
  687. })
  688. },
  689. remove(index, key) {
  690. uni.showModal({
  691. title: '提示',
  692. content: '是否删除该图片或视频?',
  693. success: (res) => {
  694. if (res.confirm) {
  695. this.dataJson.zEngineeringNodeBo
  696. .zEngineeringInfoBoList[key]
  697. .zEngiineeringPhotoBoList.splice(index, 1)
  698. }
  699. }
  700. })
  701. },
  702. chooseType(type, index) {
  703. this.dataIndex = index;
  704. let _this = this;
  705. if (type == 'video') {
  706. this.choosevideo(type)
  707. } else {
  708. this.chooseimage(type)
  709. }
  710. },
  711. choose(type, index) {
  712. this.dataIndex = index;
  713. let _this = this;
  714. uni.showActionSheet({
  715. title: '上传',
  716. itemList: ['图片', '视频'],
  717. success: (res) => {
  718. if (res.tapIndex == 0) {
  719. this.chooseimage(type)
  720. } else {
  721. this.choosevideo(type)
  722. }
  723. }
  724. })
  725. },
  726. chooseimage(e) {
  727. let _this = this;
  728. uni.chooseImage({
  729. sourceType: this.enginType == `old_renovation` ? ['camera'] : ['album', 'camera'],
  730. success(resp) {
  731. resp.tempFiles.forEach((item, index) => {
  732. const task = uni.uploadFile({
  733. url: _this.$HTTP + `/obs`,
  734. filePath: item.path,
  735. name: 'file',
  736. formData: {},
  737. header: _this.headers,
  738. success: res => {
  739. let data = JSON.parse(res.data);
  740. if (![200].includes(data.code)) {
  741. _this.$modal.msg(data.msg)
  742. } else {
  743. if (_this.progress === 100) {
  744. if (e == 'other') {
  745. _this.dataJson.zEngineeringNodeBo
  746. .zEngineeringInfoBoList[_this.dataIndex]
  747. .zEngiineeringPhotoBoList.push(data.data
  748. .url);
  749. } else if (e == 'sfht') {
  750. _this.dataJson.zEngineeringNodeBo
  751. .zEngineeringInfoBoList[_this.dataIndex]
  752. .stonePowder.push(data.data
  753. .url);
  754. } else if (e == 'jsdps') {
  755. _this.dataJson.zEngineeringNodeBo
  756. .zEngineeringInfoBoList[_this.dataIndex]
  757. .warningtTape.push(data.data
  758. .url);
  759. } else if (e == 'hth') {
  760. _this.dataJson.zEngineeringNodeBo
  761. .zEngineeringInfoBoList[_this.dataIndex]
  762. .photosAfter.push(data.data
  763. .url);
  764. } else if (e == 'gdsgjl') {
  765. _this.dataJson.zEngineeringNodeBo
  766. .zEngineeringInfoBoList[_this.dataIndex]
  767. .constructionRecords.push(data.data
  768. .url);
  769. } else if (e == 'gspsdcl') {
  770. _this.dataJson.zEngineeringNodeBo
  771. .zEngineeringInfoBoList[_this.dataIndex]
  772. .ductalEpithelium.push(data.data
  773. .url);
  774. } else if (e == 'ggyj') {
  775. _this.dataJson.zEngineeringNodeBo
  776. .zEngineeringInfoBoList[_this.dataIndex]
  777. .trenchProspect.push(data.data
  778. .url);
  779. } else if (e == 'Box') {
  780. _this.dataJson.zEngineeringNodeBo
  781. .zEngineeringInfoBoList[_this.dataIndex]
  782. .boxBrand.push(data
  783. .data
  784. .url);
  785. } else if (e == 'Sfht') {
  786. _this.dataJson.zEngineeringNodeBo
  787. .zEngineeringInfoBoList[_this.dataIndex]
  788. .stonePowder.push(data
  789. .data
  790. .url);
  791. } else if (e == 'Fljd') {
  792. _this.dataJson.zEngineeringNodeBo
  793. .zEngineeringInfoBoList[_this.dataIndex]
  794. .lightning.push(data
  795. .data
  796. .url);
  797. } else if (e == 'Dtlj') {
  798. _this.dataJson.zEngineeringNodeBo
  799. .zEngineeringInfoBoList[_this.dataIndex]
  800. .bottomLeg.push(data
  801. .data
  802. .url);
  803. } else if (e == 'Hldmyh') {
  804. _this.dataJson.zEngineeringNodeBo
  805. .zEngineeringInfoBoList[_this.dataIndex]
  806. .groundHardening.push(data
  807. .data
  808. .url);
  809. } else if (e == 'Tg') {
  810. _this.dataJson.zEngineeringNodeBo
  811. .zEngineeringInfoBoList[_this.dataIndex]
  812. .cannula.push(data
  813. .data
  814. .url);
  815. } else if (e == 'Nbmh') {
  816. _this.dataJson.zEngineeringNodeBo
  817. .zEngineeringInfoBoList[_this.dataIndex]
  818. .wallPlaster.push(data
  819. .data
  820. .url);
  821. } else if (e == 'Fhw') {
  822. _this.dataJson.zEngineeringNodeBo
  823. .zEngineeringInfoBoList[_this.dataIndex]
  824. .protectiveNet.push(data
  825. .data
  826. .url);
  827. } else if (e == 'Bj') {
  828. _this.dataJson.zEngineeringNodeBo
  829. .zEngineeringInfoBoList[_this.dataIndex]
  830. .starAnise.push(data
  831. .data
  832. .url);
  833. }
  834. _this.$modal.msg('上传成功!')
  835. }
  836. }
  837. },
  838. fail: e => {
  839. _this.$modal.msg('上传失败!')
  840. },
  841. complete: res => {
  842. uni.hideLoading();
  843. _this.uploading = false;
  844. }
  845. });
  846. task.onProgressUpdate(res => {
  847. _this.progress = res.progress;
  848. uni.showLoading({
  849. title: '上传中'
  850. })
  851. if (_this.progress != 100) {
  852. _this.loading = false
  853. } else {
  854. _this.loading = true
  855. }
  856. });
  857. })
  858. },
  859. })
  860. },
  861. choosevideo(e) {
  862. let _this = this;
  863. uni.chooseVideo({
  864. sourceType: this.enginType == `old_renovation` ? ['camera'] : ['album', 'camera'],
  865. maxDuration: 30,
  866. success(resp) {
  867. const task = uni.uploadFile({
  868. url: _this.$HTTP + `/obs`,
  869. filePath: resp.tempFilePath,
  870. name: 'file',
  871. formData: {},
  872. header: _this.headers,
  873. success: res => {
  874. let data = JSON.parse(res.data);
  875. if (![200].includes(res.statusCode)) {
  876. this.uploadError(index, data);
  877. } else {
  878. //上传成功
  879. if (_this.progress === 100) {
  880. if (e == 'other') {
  881. _this.dataJson.zEngineeringNodeBo
  882. .zEngineeringInfoBoList[_this.dataIndex]
  883. .zEngiineeringPhotoBoList.push(data.data.url);
  884. } else if (e == 'sfht') {
  885. _this.dataJson.zEngineeringNodeBo
  886. .zEngineeringInfoBoList[_this.dataIndex]
  887. .stonePowder.push(data.data.url);
  888. } else if (e == 'jsdps') {
  889. _this.dataJson.zEngineeringNodeBo
  890. .zEngineeringInfoBoList[_this.dataIndex]
  891. .warningtTape.push(data.data.url);
  892. } else if (e == 'hth') {
  893. _this.dataJson.zEngineeringNodeBo
  894. .zEngineeringInfoBoList[_this.dataIndex]
  895. .photosAfter.push(data.data.url);
  896. } else if (e == 'video') {
  897. _this.dataJson.zEngineeringNodeBo
  898. .zEngineeringInfoBoList[_this.dataIndex]
  899. .video.push(data.data.url);
  900. } else if (e == 'Box') {
  901. _this.dataJson.zEngineeringNodeBo
  902. .zEngineeringInfoBoList[_this.dataIndex]
  903. .boxBrand.push(data.data.url);
  904. } else if (e == 'Sfht') {
  905. _this.dataJson.zEngineeringNodeBo
  906. .zEngineeringInfoBoList[_this.dataIndex]
  907. .stonePowder.push(data.data.url);
  908. } else if (e == 'Fljd') {
  909. _this.dataJson.zEngineeringNodeBo
  910. .zEngineeringInfoBoList[_this.dataIndex]
  911. .lightning.push(data.data.url);
  912. } else if (e == 'Dtlj') {
  913. _this.dataJson.zEngineeringNodeBo
  914. .zEngineeringInfoBoList[_this.dataIndex]
  915. .bottomLeg.push(data.data.url);
  916. } else if (e == 'Hldmyh') {
  917. _this.dataJson.zEngineeringNodeBo
  918. .zEngineeringInfoBoList[_this.dataIndex]
  919. .groundHardening.push(data.data.url);
  920. } else if (e == 'Tg') {
  921. _this.dataJson.zEngineeringNodeBo
  922. .zEngineeringInfoBoList[_this.dataIndex]
  923. .cannula.push(data.data.url);
  924. } else if (e == 'Nbmh') {
  925. _this.dataJson.zEngineeringNodeBo
  926. .zEngineeringInfoBoList[_this.dataIndex]
  927. .wallPlaster.push(data.data.url);
  928. } else if (e == 'Fhw') {
  929. _this.dataJson.zEngineeringNodeBo
  930. .zEngineeringInfoBoList[_this.dataIndex]
  931. .protectiveNet.push(data.data.url);
  932. } else if (e == 'Bj') {
  933. _this.dataJson.zEngineeringNodeBo
  934. .zEngineeringInfoBoList[_this.dataIndex]
  935. .starAnise.push(data.data.url);
  936. }
  937. _this.$modal.msg('上传成功!')
  938. }
  939. }
  940. },
  941. fail: e => {
  942. _this.$modal.msg('上传失败!')
  943. this.uploadError(index, e);
  944. },
  945. complete: res => {
  946. uni.hideLoading();
  947. _this.uploading = false;
  948. }
  949. });
  950. task.onProgressUpdate(res => {
  951. _this.progress = res.progress;
  952. uni.showLoading({
  953. title: '上传中'
  954. })
  955. if (_this.progress != 100) {
  956. _this.loading = false
  957. } else {
  958. _this.loading = true
  959. }
  960. });
  961. },
  962. })
  963. },
  964. showPhoto(index, arr) {
  965. let newArr = [];
  966. arr.forEach((item, index) => {
  967. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
  968. item.substring(item.length - 4) == 'jpeg') {
  969. newArr.push(item)
  970. }
  971. });
  972. uni.previewImage({
  973. current: index,
  974. urls: newArr,
  975. })
  976. },
  977. // showVideo(arr) {
  978. // this.playVideo = true;
  979. // this.playVideoSrc = arr;
  980. // },
  981. // closeVideo(){
  982. // this.playVideo = false;
  983. // },
  984. isEmpty(str) {
  985. return (!str || 0 === str.length);
  986. },
  987. isEdit(item) {
  988. var isShow = item.createBy == this.$user.state.name;
  989. return isShow;
  990. },
  991. submit() {
  992. let isSubmit = true;
  993. if (this.title == '回填') {
  994. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  995. // if (res.stonePowder.length == 0) {
  996. // this.$modal.msg("请上传石粉回填照片");
  997. // isSubmit = false;
  998. // }
  999. if (res.warningtTape.length == 0) {
  1000. this.$modal.msg("请上传警示带铺设照片");
  1001. isSubmit = false;
  1002. }
  1003. if (res.photosAfter.length == 0) {
  1004. this.$modal.msg("请上传回填后照片");
  1005. isSubmit = false;
  1006. }
  1007. })
  1008. } else if (this.title == '下沟') {
  1009. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1010. res.zEngineeringMaterialBo.forEach((itme) => {
  1011. if (itme.specifications == '') {
  1012. this.$modal.msg("请选择规格");
  1013. isSubmit = false;
  1014. }
  1015. if (itme.number == '') {
  1016. this.$modal.msg("请输入米数");
  1017. isSubmit = false;
  1018. }
  1019. })
  1020. // if (res.constructionRecords.length <= 0) {
  1021. // this.$modal.msg('请上传管道施工记录照片')
  1022. // isSubmit = false;
  1023. // }
  1024. if (res.ductalEpithelium.length <= 0) {
  1025. this.$modal.msg('请上传管上皮深度测量照片')
  1026. isSubmit = false;
  1027. }
  1028. if (res.trenchProspect.length <= 0) {
  1029. this.$modal.msg('请上传管沟远景照片')
  1030. isSubmit = false;
  1031. }
  1032. if (res.video.length <= 0) {
  1033. this.$modal.msg('请上传视频')
  1034. isSubmit = false;
  1035. }
  1036. })
  1037. } else if (this.title == '调压柜') {
  1038. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1039. if (res.boxBrand.length == 0) {
  1040. this.$modal.msg("请上传调压箱铭牌照片");
  1041. isSubmit = false;
  1042. }
  1043. if (res.stonePowder.length == 0) {
  1044. this.$modal.msg("请上传调压箱内石粉回填照片");
  1045. isSubmit = false;
  1046. }
  1047. if (res.lightning.length == 0) {
  1048. this.$modal.msg("请上传调压箱防雷接地照片");
  1049. isSubmit = false;
  1050. }
  1051. if (res.bottomLeg.length == 0) {
  1052. this.$modal.msg("请上传调压箱底腿连接照片");
  1053. isSubmit = false;
  1054. }
  1055. if (res.groundHardening.length == 0) {
  1056. this.$modal.msg("请上传调压箱护栏及地面硬化(远景)照片");
  1057. isSubmit = false;
  1058. }
  1059. })
  1060. } else if (this.title == '阀井') {
  1061. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1062. if (res.cannula.length == 0) {
  1063. this.$modal.msg("请上传套管照片");
  1064. isSubmit = false;
  1065. }
  1066. if (res.wallPlaster.length == 0) {
  1067. this.$modal.msg("请上传内壁抹灰照片");
  1068. isSubmit = false;
  1069. }
  1070. if (res.protectiveNet.length == 0) {
  1071. this.$modal.msg("请上传防护网照片");
  1072. isSubmit = false;
  1073. }
  1074. if (res.starAnise.length == 0) {
  1075. this.$modal.msg("请上传八角照片");
  1076. isSubmit = false;
  1077. }
  1078. })
  1079. } else {
  1080. if (this.title == '全貌照片') {
  1081. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1082. res.zEngineeringMaterialBo.forEach((itme) => {
  1083. if (itme.specifications == '') {
  1084. this.$modal.msg("请选择规格");
  1085. isSubmit = false;
  1086. }
  1087. if (itme.number == '') {
  1088. this.$modal.msg("请输入米数");
  1089. isSubmit = false;
  1090. }
  1091. })
  1092. })
  1093. }
  1094. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  1095. if (res.zEngiineeringPhotoBoList.length == 0) {
  1096. this.$modal.msg("请上传照片");
  1097. isSubmit = false;
  1098. }
  1099. })
  1100. }
  1101. if (!isSubmit) {
  1102. return
  1103. }
  1104. putHistory(this.dataJson).then(
  1105. response => {
  1106. if (response.code == '200') {
  1107. uni.hideLoading()
  1108. uni.showToast({
  1109. title: response.msg,
  1110. icon: 'none',
  1111. duration: 2000
  1112. });
  1113. setTimeout(function() {
  1114. uni.navigateBack();
  1115. }, 1000)
  1116. }
  1117. });
  1118. }
  1119. }
  1120. }
  1121. </script>
  1122. <style lang="scss">
  1123. .uni-media-list-body {
  1124. background: #fff;
  1125. border: 1px solid #eee;
  1126. border-radius: 40rpx;
  1127. margin: 20rpx;
  1128. padding: 10rpx 0 40rpx;
  1129. box-shadow: 0 0 5px #eee;
  1130. }
  1131. .uni-media-list-text-top {
  1132. display: flex;
  1133. align-items: center;
  1134. justify-content: space-between;
  1135. padding: 10px;
  1136. position: relative;
  1137. }
  1138. .to-right-icon {
  1139. width: 15px;
  1140. height: 15px;
  1141. position: absolute;
  1142. top: 50%;
  1143. transform: translateY(-50%);
  1144. }
  1145. .share {
  1146. width: 100%;
  1147. height: 100%;
  1148. }
  1149. .tit-text {
  1150. color: #4f535a;
  1151. margin-right: 20rpx;
  1152. }
  1153. .normal-text {}
  1154. .cz-style {
  1155. background: #e8f4f9;
  1156. margin: 20rpx;
  1157. padding: 10rpx;
  1158. border-radius: 20rpx;
  1159. border: 1px solid #d4e3f0;
  1160. }
  1161. .uni-media-list-text-top {
  1162. font-size: 14px;
  1163. color: #696969;
  1164. padding: 20rpx 20rpx;
  1165. border-bottom: 1px solid #eee;
  1166. display: flex;
  1167. align-items: center;
  1168. }
  1169. .share-box {
  1170. width: 100%;
  1171. height: 100%;
  1172. position: fixed;
  1173. top: 0rpx;
  1174. left: 0rpx;
  1175. bottom: 0rpx;
  1176. right: 0rpx;
  1177. background-color: rgba(0, 0, 0, 0.4);
  1178. transition: .3s;
  1179. z-index: 999;
  1180. }
  1181. // 进入分享动画
  1182. .share-show {
  1183. transition: all 0.3s ease;
  1184. transform: translateY(0%) !important;
  1185. border-radius: 20px 20px 0px 0px;
  1186. }
  1187. .scroll-Y {
  1188. height: 58vh;
  1189. }
  1190. // 离开分享动画
  1191. .share-item {
  1192. position: fixed;
  1193. left: 0;
  1194. bottom: 0;
  1195. width: 100%;
  1196. height: 70%;
  1197. background-color: #FFFFFF;
  1198. transition: all 0.3s ease;
  1199. transform: translateY(100%);
  1200. z-index: 1999;
  1201. .share-to {
  1202. width: 100%;
  1203. height: 30px;
  1204. display: flex;
  1205. justify-content: center;
  1206. margin: 30rpx 0;
  1207. align-items: center;
  1208. }
  1209. .content {
  1210. width: 100%;
  1211. height: auto;
  1212. display: flex;
  1213. flex-wrap: wrap;
  1214. .block {
  1215. width: 100%;
  1216. display: flex;
  1217. flex-direction: column;
  1218. justify-content: center;
  1219. align-items: left;
  1220. height: auto;
  1221. image {
  1222. width: 80rpx;
  1223. height: 80rpx;
  1224. }
  1225. text {
  1226. margin-top: 16rpx;
  1227. font-size: 28rpx;
  1228. color: #606266;
  1229. }
  1230. }
  1231. }
  1232. .cancel {
  1233. width: 100%;
  1234. height: 3rem;
  1235. display: flex;
  1236. justify-content: center;
  1237. align-items: center;
  1238. border-top: 1rpx solid #E4E7ED;
  1239. }
  1240. }
  1241. .uni-media-list-text-top {
  1242. display: flex;
  1243. align-items: center;
  1244. justify-content: space-between;
  1245. padding: 10px;
  1246. position: relative;
  1247. }
  1248. .uni-list {
  1249. border: 1xp solid #eee;
  1250. }
  1251. .to-right-icon {
  1252. width: 15px;
  1253. height: 15px;
  1254. position: absolute;
  1255. top: 50%;
  1256. transform: translateY(-50%);
  1257. }
  1258. .text {
  1259. font-size: 16px;
  1260. color: #333;
  1261. }
  1262. .tj-btn {
  1263. height: 69rpx;
  1264. background: #3184f0;
  1265. border-radius: 6rpx;
  1266. font-size: 25rpx;
  1267. font-weight: 400;
  1268. color: #FFFFFF;
  1269. line-height: 69rpx;
  1270. margin: 40rpx 70rpx;
  1271. }
  1272. .sc-btn {
  1273. height: 69rpx;
  1274. background: #f0686b;
  1275. border-radius: 6rpx;
  1276. font-size: 25rpx;
  1277. font-weight: 400;
  1278. color: #FFFFFF;
  1279. line-height: 69rpx;
  1280. margin: 40rpx;
  1281. }
  1282. // .gesture-area {
  1283. // //加浮动弹窗
  1284. // width: 100%;
  1285. // height: 100%;
  1286. // }
  1287. </style>