historyDetailsCourtyard.vue 51 KB

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