historyDetailsCourtyard.vue 51 KB

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