historyDetailsCourtyard.vue 52 KB

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