enginproject.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594
  1. <template>
  2. <scroll-view>
  3. <view class="background">
  4. <view class="uni-list">
  5. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  6. <view>
  7. 工程名称
  8. </view>
  9. <!-- <view v-if="this.isEmpty(this.projectName.id)" style="margin-top: 10;"
  10. @click="pickerShow('gcmc',0)">
  11. <span style="color: darkgray;">请选择工程名称</span>
  12. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  13. </view> -->
  14. <view class="uni-list-cell-db" style="margin-top: 10;">
  15. <span style="color: black;">{{enginName}}</span>
  16. <!-- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image> -->
  17. </view>
  18. </view>
  19. </view>
  20. <view class="uni-list">
  21. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  22. <view>
  23. 工程类型
  24. </view>
  25. <!-- <view v-if="this.isEmpty(this.projectType.dictValue)" style="margin-top: 10;">
  26. <span style="color: darkgray;">请选择工程类型</span>
  27. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  28. </view> -->
  29. <view class="uni-list-cell-db" style="margin-top: 10;">
  30. <span style="color: black;">{{enginType}}</span>
  31. <!-- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image> -->
  32. </view>
  33. </view>
  34. </view>
  35. <view class="uni-list">
  36. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  37. <text>建设单位</text>
  38. <input class="uni-input" type="text" v-model="jsdwValue" maxlength="100" disabled="true"
  39. style="margin-left: 10px;text-align: right;"></input>
  40. </view>
  41. </view>
  42. <view class="uni-list">
  43. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  44. <text>项目负责人</text>
  45. <input class="uni-input" type="text" v-model="xmfzrValue" maxlength="16" disabled="true"
  46. style="margin-left: 10px;text-align: right;"></input>
  47. </view>
  48. </view>
  49. <view class="uni-list">
  50. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  51. <text>现场负责人</text>
  52. <input class="uni-input" type="text" v-model="xcfzrValue" maxlength="16" disabled="true"
  53. style="margin-left: 10px;text-align: right;"></input>
  54. </view>
  55. </view>
  56. <view class="uni-list">
  57. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  58. <text>设计单位</text>
  59. <input class="uni-input" type="text" v-model="sjdwValue" maxlength="100" disabled="true"
  60. style="margin-left: 10px;text-align: right;"></input>
  61. </view>
  62. </view>
  63. <view class="uni-list">
  64. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  65. <text>设计负责人</text>
  66. <input class="uni-input" type="text" v-model="sjfzrValue" maxlength="16" disabled="true"
  67. style="margin-left: 10px;text-align: right;"></input>
  68. </view>
  69. </view>
  70. <view class="uni-list">
  71. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  72. <text>设计联系电话</text>
  73. <input class="uni-input" type="number" v-model="sjPhoneValue" disabled="true" maxlength="11"
  74. style="margin-left: 10px;text-align: right;"></input>
  75. </view>
  76. </view>
  77. <view class="uni-list">
  78. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  79. <text>监理单位</text>
  80. <input class="uni-input" type="text" v-model="jldwValue" maxlength="100" disabled="true"
  81. style="margin-left: 10px;text-align: right;"></input>
  82. </view>
  83. </view>
  84. <view class="uni-list">
  85. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  86. <text>监理负责人</text>
  87. <input class="uni-input" type="text" v-model="jlfzrValue" maxlength="16" disabled="true"
  88. style="margin-left: 10px;text-align: right;"></input>
  89. </view>
  90. </view>
  91. <view class="uni-list">
  92. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  93. <text>监理联系电话</text>
  94. <input class="uni-input" type="number" v-model="jlPhoneValue" disabled="true" maxlength="11"
  95. style="margin-left: 10px;text-align: right;"></input>
  96. </view>
  97. </view>
  98. <view class="uni-list">
  99. <view class="align-items">
  100. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  101. <view v-for="(item,index) in fileArr" :key="index" style="position: relative;">
  102. <view
  103. v-if="item.picUrl.substring(item.picUrl.length - 3) == 'png' || item.picUrl.substring(item.picUrl.length - 3) == 'jpg'||item.picUrl.substring(item.picUrl.length-4)=='jpeg' ">
  104. <image :src="item.picUrl" mode=""
  105. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  106. @click="showPhotoFile(fileImageArr.indexOf(item.picUrl))">
  107. </image>
  108. </view>
  109. <view v-else-if="item.picUrl.substring(item.picUrl.length - 3) == 'mp4'">
  110. <video :src="item.picUrl"
  111. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  112. </view>
  113. <view v-else @click="chooseModel(item.picUrl,item.fileName)">
  114. {{item.fileName}}
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  121. subtitleKey="id" v-model="name"></SelectPicker>
  122. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
  123. titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  124. </view>
  125. <view class="background">
  126. <view>
  127. <view class="uni-list">
  128. <view
  129. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  130. {{objValue.value}}
  131. <span
  132. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  133. @click="history">历史</span>
  134. </view>
  135. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  136. <view>
  137. 施工时间
  138. </view>
  139. <view @click="openDatetimePicker()">
  140. <span style="color: black;">{{time}}</span>
  141. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  142. </view>
  143. </view>
  144. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  145. <view class="uni-common-mt" style="width: 100%;">
  146. <text class="uni-title uni-common-pl">施工内容</text>
  147. <view style="width: 100%;box-sizing: border-box;">
  148. <textarea class="textarea" placeholder="请输入施工内容" maxlength="255"
  149. placeholder-style="padding: 10rpx;"
  150. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  151. auto-height v-model="projectContent"></textarea>
  152. </view>
  153. </view>
  154. </view>
  155. <view
  156. v-if="objValue.value=='焊接、防腐'||objValue.value=='架空管线'||objValue.value=='下管'||objValue.value=='沟下连头'||objValue.value=='全貌照片'||objValue.value=='顶管材料米数'||objValue.value=='焊接'">
  157. <view v-for="(a,index) in czggslList" :key="index" class="num-style">
  158. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  159. <view>
  160. 材质
  161. </view>
  162. <view class="uni-list-cell-db" @click="pickerShow('cz',index)">
  163. <span style="color: black;">{{a.cz.id==''?'请选择材质':a.cz.name}}</span>
  164. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  165. </view>
  166. </view>
  167. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  168. <view>
  169. 规格
  170. </view>
  171. <view class="uni-list-cell-db" @click="pickerShow('gg',index)">
  172. <span style="color: black;">{{a.gg.id==''?'请选择规格':a.gg.name}}</span>
  173. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  174. </view>
  175. </view>
  176. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  177. <text>米 数</text>
  178. <!-- style="margin-left: 10px;text-align: right;" -->
  179. <view style="display: flex; justify-content: right; width: 70%;">
  180. <input class="uni-input" type="number" v-model="a.sl.inputIntegerNumberValue"
  181. maxlength="6"
  182. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  183. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  184. <input class="uni-input" type="number" v-model="a.sl.inputDecimalNumberValue"
  185. maxlength="1"
  186. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  187. </view>
  188. </view>
  189. <button v-if="index!=0" @click="this.czggslList.splice(index,1)" class="sc-btn">删除</button>
  190. </view>
  191. <button @click="this.czggslList.push({cz:{id: '',name: ''},gg:{id: '',name: ''},sl: {
  192. inputIntegerNumberValue: '',
  193. inputDecimalNumberValue: ''
  194. }})" class="tj-btn">添加</button>
  195. </view>
  196. </view>
  197. <view
  198. v-if="objValue.value!='回填、撤场'&&objValue.value!='调压柜'&&objValue.value!='阀井'&&objValue.value!='顶管材料米数'">
  199. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  200. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  201. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  202. <image :src="loadImgSrc('updateimg.png')" mode=""
  203. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('other')">
  204. </image>
  205. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  206. <view
  207. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  208. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  209. @click="showPhoto(index,'other')">
  210. </image>
  211. </view>
  212. <view v-else>
  213. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  214. </view>
  215. <view @click="remove(index,'other')"
  216. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  217. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  218. </image>
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. <view v-else-if="objValue.value=='回填、撤场'">
  225. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  226. <view class="container" style="color: #b2b2b2;">*请上传回填前照片</view>
  227. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  228. <image :src="loadImgSrc('updateimg.png')" mode=""
  229. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('htq')"
  230. v-show="reviewStatus!='1'"></image>
  231. <view v-for="(item,index) in imgHtqArr" :key="index" style="position: relative;">
  232. <view
  233. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  234. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  235. @click="showPhoto(index,'htq')">
  236. </image>
  237. </view>
  238. <view v-else>
  239. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  240. </view>
  241. <view @click="remove(index,'htq')"
  242. 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 class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  249. <view class="container" style="color: #b2b2b2;">*请上传警示带铺设照片</view>
  250. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  251. <image :src="loadImgSrc('updateimg.png')" mode=""
  252. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('jsdps')"
  253. v-show="reviewStatus!='1'"></image>
  254. <view v-for="(item,index) in imgJspsArr" :key="index" style="position: relative;">
  255. <view
  256. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  257. <image :src="item" mode=""
  258. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  259. @click="showPhoto(index,'jsdps')">
  260. </image>
  261. </view>
  262. <view v-else>
  263. <video :src="item"
  264. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  265. </view>
  266. <view @click="remove(index,'jsdps')"
  267. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  268. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  269. </image>
  270. </view>
  271. </view>
  272. </view>
  273. </view>
  274. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  275. <view class="container" style="color: #b2b2b2;">*请上传回填后照片</view>
  276. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  277. <image :src="loadImgSrc('updateimg.png')" mode=""
  278. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('hth')"
  279. v-show="reviewStatus!='1'"></image>
  280. <view v-for="(item,index) in imgHthArr" :key="index" style="position: relative;">
  281. <view
  282. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  283. <image :src="item" mode=""
  284. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  285. @click="showPhoto(index,'hth')">
  286. </image>
  287. </view>
  288. <view v-else>
  289. <video :src="item"
  290. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  291. </view>
  292. <view @click="remove(index,'hth')"
  293. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  294. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  295. </image>
  296. </view>
  297. </view>
  298. </view>
  299. </view>
  300. </view>
  301. </view>
  302. <view v-else-if="objValue.value=='调压柜'">
  303. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  304. <view class="container" style="color: #b2b2b2;">*请上传调压箱铭牌照片</view>
  305. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  306. <image :src="loadImgSrc('updateimg.png')" mode=""
  307. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Box')"
  308. v-show="reviewStatus!='1'"></image>
  309. <view v-for="(item,index) in imgBoxArr" :key="index" style="position: relative;">
  310. <view
  311. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  312. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  313. @click="showPhoto(index,'Box')">
  314. </image>
  315. </view>
  316. <view v-else>
  317. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  318. </view>
  319. <view @click="remove(index,'Box')"
  320. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  321. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  322. </image>
  323. </view>
  324. </view>
  325. </view>
  326. </view>
  327. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  328. <view class="container" style="color: #b2b2b2;">*请上传调压箱内石粉回填照片</view>
  329. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  330. <image :src="loadImgSrc('updateimg.png')" mode=""
  331. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Sfht')"
  332. v-show="reviewStatus!='1'"></image>
  333. <view v-for="(item,index) in imgSfhtArr" :key="index" style="position: relative;">
  334. <view
  335. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  336. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  337. @click="showPhoto(index,'Sfht')">
  338. </image>
  339. </view>
  340. <view v-else>
  341. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  342. </view>
  343. <view @click="remove(index,'Sfht')"
  344. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  345. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  346. </image>
  347. </view>
  348. </view>
  349. </view>
  350. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  351. <view class="container" style="color: #b2b2b2;">*请上传调压箱防雷接地照片</view>
  352. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  353. <image :src="loadImgSrc('updateimg.png')" mode=""
  354. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Fljd')"
  355. v-show="reviewStatus!='1'"></image>
  356. <view v-for="(item,index) in imgFljdArr" :key="index" style="position: relative;">
  357. <view
  358. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  359. <image :src="item" mode=""
  360. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  361. @click="showPhoto(index,'Fljd')">
  362. </image>
  363. </view>
  364. <view v-else>
  365. <video :src="item"
  366. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  367. </view>
  368. <view @click="remove(index,'Fljd')"
  369. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  370. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  371. </image>
  372. </view>
  373. </view>
  374. </view>
  375. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  376. <view class="container" style="color: #b2b2b2;">*请上传调压箱底腿连接照片</view>
  377. <view class=""
  378. style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  379. <image :src="loadImgSrc('updateimg.png')" mode=""
  380. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
  381. @click="choose('Dtlj')" v-show="reviewStatus!='1'"></image>
  382. <view v-for="(item,index) in imgDtljArr" :key="index" style="position: relative;">
  383. <view
  384. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  385. <image :src="item" mode=""
  386. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  387. @click="showPhoto(index,'Dtlj')">
  388. </image>
  389. </view>
  390. <view v-else>
  391. <video :src="item"
  392. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  393. </view>
  394. <view @click="remove(index,'Dtlj')"
  395. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  396. <image :src="loadImgSrc('icon_close.png')"
  397. style=" width: 15px; height: 15px;">
  398. </image>
  399. </view>
  400. </view>
  401. </view>
  402. </view>
  403. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  404. <view class="container" style="color: #b2b2b2;">*请上传调压箱护栏及地面硬化(远景)照片</view>
  405. <view class=""
  406. style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  407. <image :src="loadImgSrc('updateimg.png')" mode=""
  408. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
  409. @click="choose('Hldmyh')" v-show="reviewStatus!='1'"></image>
  410. <view v-for="(item,index) in imgHldmyhArr" :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-4)=='jpeg' ">
  414. <image :src="item" mode=""
  415. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  416. @click="showPhoto(index,'Hldmyh')">
  417. </image>
  418. </view>
  419. <view v-else>
  420. <video :src="item"
  421. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  422. </view>
  423. <view @click="remove(index,'Hldmyh')"
  424. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  425. <image :src="loadImgSrc('icon_close.png')"
  426. style=" width: 15px; height: 15px;">
  427. </image>
  428. </view>
  429. </view>
  430. </view>
  431. </view>
  432. </view>
  433. </view>
  434. </view>
  435. <view v-else-if="objValue.value=='阀井'">
  436. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  437. <view class="container" style="color: #b2b2b2;">*请上传套管照片</view>
  438. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  439. <image :src="loadImgSrc('updateimg.png')" mode=""
  440. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Tg')"
  441. v-show="reviewStatus!='1'"></image>
  442. <view v-for="(item,index) in imgTgArr" :key="index" style="position: relative;">
  443. <view
  444. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  445. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  446. @click="showPhoto(index,'Tg')">
  447. </image>
  448. </view>
  449. <view v-else>
  450. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  451. </view>
  452. <view @click="remove(index,'Tg')"
  453. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  454. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  455. </image>
  456. </view>
  457. </view>
  458. </view>
  459. </view>
  460. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  461. <view class="container" style="color: #b2b2b2;">*请上传内壁抹灰照片</view>
  462. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  463. <image :src="loadImgSrc('updateimg.png')" mode=""
  464. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Nbmh')"
  465. v-show="reviewStatus!='1'"></image>
  466. <view v-for="(item,index) in imgNbmhArr" :key="index" style="position: relative;">
  467. <view
  468. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  469. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  470. @click="showPhoto(index,'Nbmh')">
  471. </image>
  472. </view>
  473. <view v-else>
  474. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  475. </view>
  476. <view @click="remove(index,'Nbmh')"
  477. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  478. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  479. </image>
  480. </view>
  481. </view>
  482. </view>
  483. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  484. <view class="container" style="color: #b2b2b2;">*请上传防护网照片</view>
  485. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  486. <image :src="loadImgSrc('updateimg.png')" mode=""
  487. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Fhw')"
  488. v-show="reviewStatus!='1'"></image>
  489. <view v-for="(item,index) in imgFhwArr" :key="index" style="position: relative;">
  490. <view
  491. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  492. <image :src="item" mode=""
  493. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  494. @click="showPhoto(index,'Fhw')">
  495. </image>
  496. </view>
  497. <view v-else>
  498. <video :src="item"
  499. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  500. </view>
  501. <view @click="remove(index,'Fhw')"
  502. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  503. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  504. </image>
  505. </view>
  506. </view>
  507. </view>
  508. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  509. <view class="container" style="color: #b2b2b2;">*请上传调八角照片</view>
  510. <view class=""
  511. style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  512. <image :src="loadImgSrc('updateimg.png')" mode=""
  513. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Bj')"
  514. v-show="reviewStatus!='1'"></image>
  515. <view v-for="(item,index) in imgBjArr" :key="index" style="position: relative;">
  516. <view
  517. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  518. <image :src="item" mode=""
  519. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  520. @click="showPhoto(index,'Bj')">
  521. </image>
  522. </view>
  523. <view v-else>
  524. <video :src="item"
  525. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  526. </view>
  527. <view @click="remove(index,'Bj')"
  528. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  529. <image :src="loadImgSrc('icon_close.png')"
  530. style=" width: 15px; height: 15px;">
  531. </image>
  532. </view>
  533. </view>
  534. </view>
  535. </view>
  536. </view>
  537. </view>
  538. </view>
  539. </view>
  540. </view>
  541. <view class="action-btn">
  542. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  543. </view>
  544. <bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.value"></bottom-sheet>
  545. <yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
  546. :time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
  547. <!-- 下载提示页面 -->
  548. <mypopup :show="show_loding" :popupText="popupText" :titleText="titleText" :cancelText="cancelText"
  549. :confirmText="confirmText" @close="cancel_loding" @confirm="confirm_loding">
  550. </mypopup>
  551. </scroll-view>
  552. </template>
  553. <script>
  554. import SelectPicker from '../../components/selectPicker/select_picker.vue'
  555. import bottomSheet from '../../components/bottomSheet/bottomSheetMoreNew.vue'
  556. import mypopup from '../../components/mypopup/mypopup.vue'
  557. import {
  558. getDicts
  559. } from "@/api/system/dict/data";
  560. import {
  561. getEnginMaterialQualityList,
  562. getEnginSpecificationsList,
  563. getRoomProjectList,
  564. getRoomProjectId,
  565. SubmitengineeringNew,
  566. getengineeringNameListNew,
  567. getEngineeringDetailsNew,
  568. getEngineeringHistoryListNew,
  569. getEnginProjectDetailsByParams
  570. } from '@/api/common'
  571. import {
  572. getToken
  573. } from '../../utils/auth';
  574. export default {
  575. components: {
  576. SelectPicker,
  577. bottomSheet,
  578. mypopup
  579. },
  580. data() {
  581. return {
  582. historyList: {}, //历史数据
  583. show_loding: false,
  584. popupText: '', //对话框内容
  585. titleText: '',
  586. cancelText: '',
  587. confirmText: '',
  588. zEngineeringMaterialBo: [], //给后台传的值 用料列表
  589. czggslList: [{
  590. cz: {
  591. id: '',
  592. name: ''
  593. },
  594. gg: {
  595. id: '',
  596. name: ''
  597. },
  598. sl: {
  599. inputIntegerNumberValue: '',
  600. inputDecimalNumberValue: ''
  601. }
  602. }, ],
  603. conLists: [],
  604. headers: {
  605. Authorization: "Bearer " + getToken()
  606. },
  607. time: '', //施工时间
  608. loading: false,
  609. loadingFile: false,
  610. projectType: {}, //工程类型
  611. open: false,
  612. objValue: '', //上一页面传过来的值 新增接口用
  613. openDict: false,
  614. specificationValue: {}, //规格
  615. projectContent: '', //施工内容
  616. materialValue: {}, //材质
  617. selectList: [],
  618. dictOptions: [],
  619. imgArr: [],
  620. fileArr: [],
  621. fileImageArr: [],
  622. fileNameArr: [],
  623. type: '',
  624. jlPhoneValue: '', //监理电话
  625. jlfzrValue: '', //监理负责人
  626. jldwValue: '', //监理单位
  627. sjPhoneValue: '', //设计电话
  628. sjfzrValue: '', //设计负责人
  629. sjdwValue: '', //设计单位
  630. xcfzrValue: '', //现场负责人
  631. xmfzrValue: '', //项目负责人
  632. jsdwValue: '', //建设单位
  633. projectName: '', //工程名称
  634. SelectIndex: '', //选择的索引值
  635. fileUrl: '', //点击的文件地址
  636. fileName: '', //点击的文件名称
  637. enginList: {}, //工程信息
  638. enginId: '', //工程id
  639. createTime: '',
  640. infonId: '', //info id
  641. imgHtqArr: [],
  642. imgJspsArr: [],
  643. imgHthArr: [],
  644. //调压柜
  645. imgSfhtArr: [],
  646. imgFljdArr: [],
  647. imgBoxArr: [],
  648. imgDtljArr: [],
  649. imgHldmyhArr: [],
  650. //阀井
  651. imgTgArr: [],
  652. imgNbmhArr: [],
  653. imgFhwArr: [],
  654. imgBjArr: [],
  655. enginName: '',
  656. enginType: '',
  657. enginTitle: '',
  658. enginValue: '',
  659. }
  660. },
  661. created() {
  662. this.time = this.traversalTime(new Date().getTime()) //在data里定义变量-nowTime
  663. },
  664. onLoad(options) {
  665. if ('params' in options) {
  666. this.objValue = JSON.parse(decodeURIComponent(options.params));
  667. this.enginName = this.objValue.name;
  668. this.enginType = this.objValue.enginType;
  669. this.enginTitle = this.objValue.title;
  670. this.enginValue = this.objValue.value;
  671. }
  672. // this.projectName = item
  673. // 获取工程信息
  674. uni.showLoading({
  675. title: '加载中'
  676. })
  677. getEnginProjectDetailsByParams(this.enginName, this.enginType, this.enginTitle).then(
  678. response => {
  679. uni.hideLoading();
  680. // this.enginList = response.data
  681. this.jlPhoneValue = response.data.supervisionPhone; //监理电话
  682. this.jlfzrValue = response.data.supervisionHead; //监理负责人
  683. this.jldwValue = response.data.supervisionUnit; //监理单位
  684. this.sjPhoneValue = response.data.designPhone; //设计电话
  685. this.sjfzrValue = response.data.designHead; //设计负责人
  686. this.sjdwValue = response.data.designUnit; //设计单位
  687. this.xcfzrValue = response.data.sceneHead; //现场负责人
  688. this.xmfzrValue = response.data.projectHead; //项目负责人
  689. this.jsdwValue = response.data.constructUnit; //建设单位
  690. this.enginId = response.data.id; //工程id
  691. this.fileArr = response.data.pics
  692. this.createTime = response.data.createTime;
  693. this.fileArr.forEach((list, index) => {
  694. if (list.picUrl.substring(list.picUrl.length - 3) == 'png' || list.picUrl
  695. .substring(list.picUrl.length - 3) == 'jpg' || list.picUrl.substring(list
  696. .picUrl.length - 4) == 'jpeg') {
  697. this.fileImageArr.push(list.picUrl)
  698. }
  699. });
  700. });
  701. },
  702. methods: {
  703. //判断是否选择
  704. isEmpty(str) {
  705. return (!str || 0 === str.length);
  706. },
  707. handleSubmit(e) {
  708. this.time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
  709. },
  710. //获取当前时间
  711. traversalTime(timestamp) {
  712. //timestamp(时间戳)是整数,否则要parseInt转换
  713. let time = new Date(timestamp);
  714. let y = time.getFullYear();
  715. let m = time.getMonth() + 1;
  716. let d = time.getDate();
  717. let h = time.getHours();
  718. let mm = time.getMinutes();
  719. let s = time.getSeconds();
  720. return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this.addTimes(
  721. mm) + ':' + this.addTimes(s);
  722. },
  723. addTimes(m) {
  724. return m < 10 ? '0' + m : m
  725. },
  726. // 打开picker
  727. openDatetimePicker() {
  728. this.$refs.myPicker.show();
  729. },
  730. // 关闭picker
  731. closeDatetimePicker() {
  732. this.$refs.myPicker.hide();
  733. },
  734. pickerShow(e, index) {
  735. this.SelectIndex = index;
  736. this.type = e; //赋值类型
  737. if (e == 'cz') { //材质
  738. this.open = true;
  739. getEnginMaterialQualityList("工业工程").then(response => {
  740. this.selectList = response.data;
  741. });
  742. } else if (e == 'gg') { //规格
  743. if (this.isEmpty(this.czggslList[index].cz.id)) {
  744. this.$modal.msg('请选择材质')
  745. // this.czggslList[index].cz = this.materialValue.id
  746. } else {
  747. this.open = true;
  748. this.selectList = this.materialList;
  749. }
  750. } else if (e == 'gclx') { //工程类型
  751. this.openDict = true;
  752. getDicts("industry_engin_type").then(response => {
  753. this.dictOptions = response.data;
  754. });
  755. } else if (e == 'gcmc') { //工程名称
  756. // if (this.isEmpty(this.projectType.dictValue)) {
  757. // this.$modal.msg('请选择工程类型')
  758. // return
  759. // }
  760. // this.open = true;
  761. // //请求
  762. // getengineeringNameListNew(this.projectType.dictValue, this.objValue.title).then(response => {
  763. // this.selectList = response.data;
  764. // });
  765. }
  766. },
  767. showPhotoFile(index) {
  768. uni.previewImage({
  769. current: index,
  770. urls: this.fileImageArr,
  771. })
  772. },
  773. showPhoto(index, e) {
  774. let typeArr = [];
  775. let newArr = [];
  776. if (e == 'other') {
  777. typeArr = this.imgArr;
  778. } else if (e == 'htq') {
  779. typeArr = this.imgHtqArr;
  780. } else if (e == 'jsdps') {
  781. typeArr = this.imgJspsArr;
  782. } else if (e == 'hth') {
  783. typeArr = this.imgHthArr;
  784. } else if (e == 'Box') {
  785. typeArr = this.imgBoxArr;
  786. } else if (e == 'Sfht') {
  787. typeArr = this.imgSfhtArr;
  788. } else if (e == 'Fljd') {
  789. typeArr = this.imgFljdArr;
  790. } else if (e == 'Dtlj') {
  791. typeArr = this.imgDtljArr;
  792. } else if (e == 'Hldmyh') {
  793. typeArr = this.imgHldmyhArr;
  794. } else if (e == 'Tg') {
  795. typeArr = this.imgTgArr;
  796. } else if (e == 'Nbmh') {
  797. typeArr = this.imgNbmhArr;
  798. } else if (e == 'Fhw') {
  799. typeArr = this.imgFhwArr;
  800. } else if (e == 'Bj') {
  801. typeArr = this.imgBjArr;
  802. }
  803. typeArr.forEach((item, index) => {
  804. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
  805. item.substring(item.length - 4) == 'jpeg') {
  806. newArr.push(item)
  807. }
  808. });
  809. uni.previewImage({
  810. current: index,
  811. urls: newArr,
  812. })
  813. },
  814. remove(index, e) {
  815. let _this = this;
  816. uni.showModal({
  817. title: '提示',
  818. content: '是否删除该图片或视频?',
  819. success: (res) => {
  820. if (res.confirm) {
  821. if (e == 'other') {
  822. _this.imgArr.splice(index, 1)
  823. } else if (e == 'htq') {
  824. _this.imgHtqArr.splice(index, 1)
  825. } else if (e == 'jsdps') {
  826. _this.imgJspsArr.splice(index, 1)
  827. } else if (e == 'hth') {
  828. _this.imgHthArr.splice(index, 1)
  829. } else if (e == 'Box') {
  830. this.imgBoxArr.splice(index, 1)
  831. } else if (e == 'Sfht') {
  832. this.imgSfhtArr.splice(index, 1)
  833. } else if (e == 'Fljd') {
  834. this.imgFljdArr.splice(index, 1)
  835. } else if (e == 'Dtlj') {
  836. this.imgDtljArr.splice(index, 1)
  837. } else if (e == 'Hldmyh') {
  838. this.imgHldmyhArr.splice(index, 1)
  839. } else if (e == 'Tg') {
  840. this.imgTgArr.splice(index, 1)
  841. } else if (e == 'Nbmh') {
  842. this.imgNbmhArr.splice(index, 1)
  843. } else if (e == 'Fhw') {
  844. this.imgFhwArr.splice(index, 1)
  845. } else if (e == 'Bj') {
  846. this.imgBjArr.splice(index, 1)
  847. }
  848. }
  849. }
  850. })
  851. },
  852. choose(e) {
  853. let _this = this;
  854. uni.showActionSheet({
  855. title: '上传',
  856. itemList: ['图片', '视频'],
  857. success: (res) => {
  858. if (res.tapIndex == 0) {
  859. this.chooseimage(e)
  860. } else {
  861. this.choosevideo(e)
  862. }
  863. }
  864. })
  865. },
  866. chooseimage(e) {
  867. let _this = this;
  868. uni.chooseImage({
  869. sizeType: ['album', 'camera'],
  870. success(resp) {
  871. resp.tempFiles.forEach((item, index) => {
  872. const task = uni.uploadFile({
  873. url: _this.$HTTP + `/obs`,
  874. filePath: item.path,
  875. name: 'file',
  876. formData: {},
  877. header: _this.headers,
  878. success: res => {
  879. let data = JSON.parse(res.data);
  880. if (![200].includes(data.code)) {
  881. _this.$modal.msg(data.msg)
  882. } else {
  883. if (_this.progress === 100) {
  884. if (e == 'other') {
  885. _this.imgArr.push(data.data.url)
  886. } else if (e == 'htq') {
  887. _this.imgHtqArr.push(data.data.url)
  888. } else if (e == 'jsdps') {
  889. _this.imgJspsArr.push(data.data.url)
  890. } else if (e == 'hth') {
  891. _this.imgHthArr.push(data.data.url)
  892. } else if (e == 'Box') {
  893. _this.imgBoxArr.push(data.data.url)
  894. } else if (e == 'Sfht') {
  895. _this.imgSfhtArr.push(data.data.url)
  896. } else if (e == 'Fljd') {
  897. _this.imgFljdArr.push(data.data.url)
  898. } else if (e == 'Dtlj') {
  899. _this.imgDtljArr.push(data.data.url)
  900. } else if (e == 'Hldmyh') {
  901. _this.imgHldmyhArr.push(data.data.url)
  902. } else if (e == 'Tg') {
  903. _this.imgTgArr.push(data.data.url)
  904. } else if (e == 'Nbmh') {
  905. _this.imgNbmhArr.push(data.data.url)
  906. } else if (e == 'Fhw') {
  907. _this.imgFhwArr.push(data.data.url)
  908. } else if (e == 'Bj') {
  909. _this.imgBjArr.push(data.data.url)
  910. }
  911. _this.$modal.msg('上传成功!')
  912. }
  913. }
  914. },
  915. fail: e => {
  916. _this.$modal.msg('上传失败!')
  917. },
  918. complete: res => {
  919. uni.hideLoading();
  920. _this.uploading = false;
  921. }
  922. });
  923. task.onProgressUpdate(res => {
  924. _this.progress = res.progress;
  925. uni.showLoading({
  926. title: '上传中'
  927. })
  928. if (_this.progress != 100) {
  929. _this.loading = false
  930. } else {
  931. _this.loading = true
  932. }
  933. });
  934. })
  935. },
  936. })
  937. },
  938. choosevideo(e) {
  939. let _this = this;
  940. uni.chooseVideo({
  941. sourceType: ['album', 'camera'],
  942. maxDuration: 30,
  943. success(resp) {
  944. const task = uni.uploadFile({
  945. url: _this.$HTTP + `/obs`,
  946. filePath: resp.tempFilePath,
  947. name: 'file',
  948. formData: {},
  949. header: _this.headers,
  950. success: res => {
  951. // 判断是否json字符串,将其转为json格式
  952. let data = JSON.parse(res.data);
  953. if (![200].includes(res.statusCode)) {
  954. this.uploadError(index, data);
  955. } else {
  956. //上传成功
  957. if (_this.progress === 100) {
  958. if (e == 'other') {
  959. _this.imgArr.push(data.data.url)
  960. } else if (e == 'htq') {
  961. _this.imgHtqArr.push(data.data.url)
  962. } else if (e == 'jsdps') {
  963. _this.imgJspsArr.push(data.data.url)
  964. } else if (e == 'hth') {
  965. _this.imgHthArr.push(data.data.url)
  966. } else if (e == 'Box') {
  967. _this.imgBoxArr.push(data.data.url)
  968. } else if (e == 'Sfht') {
  969. _this.imgSfhtArr.push(data.data.url)
  970. } else if (e == 'Fljd') {
  971. _this.imgFljdArr.push(data.data.url)
  972. } else if (e == 'Dtlj') {
  973. _this.imgDtljArr.push(data.data.url)
  974. } else if (e == 'Hldmyh') {
  975. _this.imgHldmyhArr.push(data.data.url)
  976. } else if (e == 'Tg') {
  977. _this.imgTgArr.push(data.data.url)
  978. } else if (e == 'Nbmh') {
  979. _this.imgNbmhArr.push(data.data.url)
  980. } else if (e == 'Fhw') {
  981. _this.imgFhwArr.push(data.data.url)
  982. } else if (e == 'Bj') {
  983. _this.imgBjArr.push(data.data.url)
  984. }
  985. _this.$modal.msg('上传成功!')
  986. //_this.photo = false;
  987. }
  988. }
  989. },
  990. fail: e => {
  991. _this.$modal.msg('上传失败!')
  992. this.uploadError(index, e);
  993. },
  994. complete: res => {
  995. uni.hideLoading();
  996. _this.uploading = false;
  997. }
  998. });
  999. task.onProgressUpdate(res => {
  1000. _this.progress = res.progress;
  1001. uni.showLoading({
  1002. title: '上传中'
  1003. })
  1004. if (_this.progress != 100) {
  1005. _this.loadingFile = false
  1006. } else {
  1007. _this.loadingFile = true
  1008. }
  1009. });
  1010. },
  1011. })
  1012. },
  1013. changeSelectDict(item, index) {
  1014. this.openDict = false;
  1015. this.projectType = item
  1016. this.projectName = ''; //重置工程名称
  1017. this.jlPhoneValue = ''; //重置监理电话
  1018. this.jlfzrValue = ''; //重置监理负责人
  1019. this.jldwValue = ''; //重置监理单位
  1020. this.sjPhoneValue = ''; //重置设计电话
  1021. this.sjfzrValue = ''; //重置设计负责人
  1022. this.sjdwValue = ''; //重置设计单位
  1023. this.xcfzrValue = ''; //重置现场负责人
  1024. this.xmfzrValue = ''; //重置项目负责人
  1025. this.jsdwValue = ''; //重置建设单位
  1026. this.enginId = ''; //重置工程id
  1027. this.fileArr = '';
  1028. this.fileImageArr = [];
  1029. this.createTime = '';
  1030. this.infonId = '';
  1031. },
  1032. changeSelect(item, index) {
  1033. // this.index = index;
  1034. // this.address = item.communityName;
  1035. this.open = false;
  1036. if (this.type == 'cz') {
  1037. this.materialValue = item;
  1038. this.specificationValue = ''; //重置规格
  1039. //根据材质ID 获取规格数据
  1040. getEnginSpecificationsList(item.id).then(res => {
  1041. this.materialList = res.data
  1042. this.czggslList[this.SelectIndex].cz.id = this.materialValue.id
  1043. this.czggslList[this.SelectIndex].cz.name = this.materialValue.name
  1044. })
  1045. } else if (this.type == 'gg') {
  1046. this.specificationValue = item;
  1047. this.czggslList[this.SelectIndex].gg.id = this.specificationValue.id
  1048. this.czggslList[this.SelectIndex].gg.name = this.specificationValue.name
  1049. } else if (this.type == 'gcmc') {
  1050. this.projectName = item
  1051. //根据工程id 获取工程信息
  1052. uni.showLoading({
  1053. title: '加载中'
  1054. })
  1055. getEngineeringDetailsNew(item.id).then(response => {
  1056. uni.hideLoading();
  1057. // this.enginList = response.data
  1058. this.jlPhoneValue = response.data.supervisionPhone; //监理电话
  1059. this.jlfzrValue = response.data.supervisionHead; //监理负责人
  1060. this.jldwValue = response.data.supervisionUnit; //监理单位
  1061. this.sjPhoneValue = response.data.designPhone; //设计电话
  1062. this.sjfzrValue = response.data.designHead; //设计负责人
  1063. this.sjdwValue = response.data.designUnit; //设计单位
  1064. this.xcfzrValue = response.data.sceneHead; //现场负责人
  1065. this.xmfzrValue = response.data.projectHead; //项目负责人
  1066. this.jsdwValue = response.data.constructUnit; //建设单位
  1067. this.enginId = response.data.id; //工程id
  1068. this.fileArr = response.data.pics
  1069. this.createTime = response.data.createTime;
  1070. //this.infonId = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0].id
  1071. this.fileArr.forEach((list, index) => {
  1072. if (list.picUrl.substring(list.picUrl.length - 3) == 'png' || list.picUrl
  1073. .substring(list.picUrl.length - 3) == 'jpg' || list.picUrl.substring(list
  1074. .picUrl.length - 4) == 'jpeg') {
  1075. this.fileImageArr.push(list.picUrl)
  1076. }
  1077. });
  1078. });
  1079. }
  1080. },
  1081. //关闭弹窗
  1082. close(e) {
  1083. this.open = false
  1084. },
  1085. //关闭弹窗
  1086. closeDict(e) {
  1087. this.openDict = false
  1088. },
  1089. chooseModel(url, name) {
  1090. this.cancelText = '复制';
  1091. this.confirmText = "下载";
  1092. this.titleText = "温馨提示"
  1093. this.popupText = "下载或者复制链接";
  1094. this.show_loding = true;
  1095. this.fileName = name;
  1096. this.fileUrl = url; //文件名称和下载地址赋值
  1097. },
  1098. //取消按钮
  1099. cancel_loding() {
  1100. let _this = this;
  1101. _this.show_loding = false;
  1102. if (!_this.isEmpty(_this.fileUrl)) {
  1103. uni.setClipboardData({
  1104. data: _this.fileUrl,
  1105. success() {
  1106. uni.showToast({
  1107. title: '已复制' + _this.fileName + '地址成功 请在浏览器打开',
  1108. icon: 'none'
  1109. });
  1110. },
  1111. fail(e) {
  1112. uni.showToast({
  1113. title: '复制失败',
  1114. icon: 'none'
  1115. });
  1116. }
  1117. });
  1118. }
  1119. },
  1120. //确定按钮
  1121. confirm_loding() {
  1122. this.show_loding = false;
  1123. this.download(this.fileUrl, this.fileName);
  1124. },
  1125. getDownLoadFilePath() {
  1126. let cachePath = `${uni.env.USER_DATA_PATH}/downloads`
  1127. let fm = uni.getFileSystemManager()
  1128. try {
  1129. // 访问成功则存在
  1130. fm.accessSync(cachePath)
  1131. } catch (error) {
  1132. // 不存在则新建
  1133. fm.mkdirSync(cachePath, true)
  1134. }
  1135. return cachePath
  1136. },
  1137. download(url, name) {
  1138. let savePath = this.getDownLoadFilePath();
  1139. //var savePath = uni.env.USER_DATA_PATH + '/savePath'
  1140. uni.downloadFile({
  1141. url: url,
  1142. success: response => {
  1143. if (response.statusCode === 200) {
  1144. uni.getFileSystemManager().saveFile({
  1145. tempFilePath: response.tempFilePath,
  1146. filePath: `${savePath}/${name}`,
  1147. success: (resData) => {
  1148. uni.showToast({
  1149. title: '下载成功'
  1150. })
  1151. },
  1152. fail: error => {}
  1153. })
  1154. }
  1155. }
  1156. })
  1157. },
  1158. //历史
  1159. history() {
  1160. // if (this.isEmpty(this.projectType.dictValue)) {
  1161. // this.$modal.msg('请选择工程类型')
  1162. // return
  1163. // }
  1164. // if (this.isEmpty(this.projectName.id)) {
  1165. // this.$modal.msg('请选择工程名称')
  1166. // return
  1167. // }
  1168. getEngineeringHistoryListNew(this.enginId, this.objValue.value).then(response => {
  1169. this.historyList = response.data
  1170. if (response.data.zEngineeringNodeBo != null) {
  1171. this.$refs.refShare.handleShowShare();
  1172. } else {
  1173. this.$modal.msg("暂无历史信息")
  1174. }
  1175. });
  1176. },
  1177. submit() {
  1178. // if (this.isEmpty(this.projectType.dictValue)) {
  1179. // this.$modal.msg('请选择工程类型')
  1180. // return
  1181. // }
  1182. // if (this.isEmpty(this.projectName.id)) {
  1183. // this.$modal.msg('请选择工程名称')
  1184. // return
  1185. // }
  1186. if (this.objValue.value == '焊接、防腐' || this.objValue.value == '架空管线' || this.objValue.value == '下管' || this
  1187. .objValue.value == '沟下连头' || this.objValue.value == '全貌照片' || this.objValue.value == '顶管材料米数' || this
  1188. .objValue.value == '焊接') {
  1189. try {
  1190. this.czggslList.forEach((list) => {
  1191. if (this.isEmpty(list.cz.id)) {
  1192. this.$modal.msg('材质不能为空')
  1193. throw new Error('End Loop')
  1194. }
  1195. if (this.isEmpty(list.gg.id)) {
  1196. this.$modal.msg('规格不能为空')
  1197. throw new Error('End Loop')
  1198. }
  1199. if (this.isEmpty(list.sl.inputIntegerNumberValue)) {
  1200. this.$modal.msg("请输入米数")
  1201. throw new Error('End Loop')
  1202. }
  1203. })
  1204. } catch (e) {
  1205. if (e.message === 'End Loop') throw e
  1206. }
  1207. this.zEngineeringMaterialBo = [];
  1208. this.czggslList.forEach((list) => {
  1209. this.zEngineeringMaterialBo.push({
  1210. materialQuality: list.cz.id,
  1211. specifications: list.gg.id,
  1212. number: list.sl.inputIntegerNumberValue + (list.sl
  1213. .inputDecimalNumberValue ==
  1214. '' ?
  1215. '' : "." + list.sl.inputDecimalNumberValue)
  1216. })
  1217. })
  1218. }
  1219. if (this.objValue.value == '回填、撤场') {
  1220. if (this.imgHtqArr.length <= 0 && this.imgJspsArr.length <= 0 && this.imgHthArr.length <= 0) {
  1221. this.$modal.msg('请上传照片')
  1222. return
  1223. }
  1224. // if (this.imgJspsArr.length <= 0) {
  1225. // this.$modal.msg('请上传警示带铺设照片')
  1226. // return
  1227. // }
  1228. // if (this.imgHthArr.length <= 0) {
  1229. // this.$modal.msg('请上传回填后照片')
  1230. // return
  1231. // }
  1232. }
  1233. if (this.objValue.value == '调压柜') {
  1234. if (this.imgBoxArr.length <= 0) {
  1235. this.$modal.msg('请上传调压箱铭牌照片')
  1236. return
  1237. }
  1238. if (this.imgSfhtArr.length <= 0) {
  1239. this.$modal.msg('请上传调压箱内石粉回填照片')
  1240. return
  1241. }
  1242. if (this.imgFljdArr.length <= 0) {
  1243. this.$modal.msg('请上传调压箱防雷接地照片')
  1244. return
  1245. }
  1246. if (this.imgDtljArr.length <= 0) {
  1247. this.$modal.msg('请上传调压箱底腿连接照片')
  1248. return
  1249. }
  1250. if (this.imgHldmyhArr.length <= 0) {
  1251. this.$modal.msg('请上传调压箱护栏及地面硬化(远景)照片')
  1252. return
  1253. }
  1254. } else if (this.objValue.value == '阀井') {
  1255. if (this.imgTgArr.length <= 0) {
  1256. this.$modal.msg('请上传套管照片')
  1257. return
  1258. }
  1259. if (this.imgNbmhArr.length <= 0) {
  1260. this.$modal.msg('请上传内壁抹灰照片')
  1261. return
  1262. }
  1263. if (this.imgFhwArr.length <= 0) {
  1264. this.$modal.msg('请上传防护网照片')
  1265. return
  1266. }
  1267. if (this.imgBjArr.length <= 0) {
  1268. this.$modal.msg('请上传八角照片')
  1269. return
  1270. }
  1271. } else {
  1272. if (this.objValue.value != '顶管材料米数') {
  1273. if (this.imgArr.length <= 0) {
  1274. this.$modal.msg('请上传照片或视频')
  1275. return
  1276. }
  1277. }
  1278. }
  1279. // if (this.loading == false) {
  1280. // this.$modal.msg('照片或视频未上传完毕,无法提交!')
  1281. // return
  1282. // }
  1283. let param = {
  1284. id: this.enginId, //工程id
  1285. enginName: this.projectName.name, //工程名称
  1286. enginType: this.projectType.dictValue, // 工程类型
  1287. constructUnit: this.jsdwValue, // 建筑单位
  1288. projectHead: this.xmfzrValue, // 项目负责人
  1289. sceneHead: this.xcfzrValue, // 现场负责人
  1290. designUnit: this.sjdwValue, // 设计单位
  1291. designHead: this.sjfzrValue, // 设计负责人
  1292. designPhone: this.sjPhoneValue, // 设计联系电话
  1293. supervisionUnit: this.jldwValue, // 监理单位
  1294. supervisionHead: this.jlfzrValue, // 监理负责人
  1295. supervisionPhone: this.jlPhoneValue, // 监理联系电话
  1296. enginClassification: this.objValue.title, // 工程分类 上一页面传过来的
  1297. createTime: this.createTime,
  1298. zEngineeringNodeBo: {
  1299. type: this.objValue.value,
  1300. zEngineeringInfoBo: {
  1301. //engInfoId: this.infonId,
  1302. remark: this.projectContent, //施工内容
  1303. constructTime: this.time, //施工时间
  1304. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1305. zEngiineeringPhotoBoListOne: this.imgHtqArr,
  1306. zEngiineeringPhotoBoListTwo: this.imgJspsArr,
  1307. zEngiineeringPhotoBoListThree: this.imgHthArr,
  1308. boxBrand: this.imgBoxArr,
  1309. stonePowder: this.imgSfhtArr,
  1310. lightning: this.imgFljdArr,
  1311. bottomLeg: this.imgDtljArr,
  1312. groundHardening: this.imgHldmyhArr,
  1313. boxBrand: this.imgBoxArr,
  1314. stonePowder: this.imgSfhtArr,
  1315. lightning: this.imgFljdArr,
  1316. bottomLeg: this.imgDtljArr,
  1317. groundHardening: this.imgHldmyhArr,
  1318. cannula: this.imgTgArr,
  1319. wallPlaster: this.imgNbmhArr,
  1320. protectiveNet: this.imgFhwArr,
  1321. starAnise: this.imgBjArr,
  1322. zEngineeringMaterialBo: this.zEngineeringMaterialBo // 用料对象
  1323. }
  1324. }
  1325. }
  1326. uni.showLoading()
  1327. SubmitengineeringNew(param).then(res => {
  1328. if (res.code == '200') {
  1329. uni.hideLoading()
  1330. uni.showToast({
  1331. title: res.msg,
  1332. icon: 'none',
  1333. //显示持续时间为 3秒
  1334. duration: 2000
  1335. });
  1336. setTimeout(function() {
  1337. uni.navigateBack();
  1338. }, 1000)
  1339. }
  1340. })
  1341. }
  1342. }
  1343. }
  1344. </script>
  1345. <style lang="scss">
  1346. .container {
  1347. display: flex;
  1348. align-items: center;
  1349. justify-content: space-between;
  1350. padding: 10px;
  1351. position: relative;
  1352. }
  1353. .uni-list {
  1354. border: 1xp solid #eee;
  1355. }
  1356. .to-right-icon {
  1357. width: 15px;
  1358. height: 15px;
  1359. position: absolute;
  1360. top: 50%;
  1361. transform: translateY(-50%);
  1362. }
  1363. .text {
  1364. font-size: 16px;
  1365. color: #333;
  1366. }
  1367. .background {
  1368. // border: 15px solid hsla(0, 0%, 100%, .5);
  1369. background: white;
  1370. background-clip: padding-box;
  1371. padding: 20rpx;
  1372. border-radius: 20rpx;
  1373. margin: 20rpx;
  1374. /*从padding开始往外面裁剪背景*/
  1375. }
  1376. .btn {
  1377. width: 715rpx;
  1378. height: 69rpx;
  1379. background: #79A4F0;
  1380. border-radius: 6rpx;
  1381. font-size: 25rpx;
  1382. font-family: Microsoft YaHei;
  1383. font-weight: 400;
  1384. color: #FFFFFF;
  1385. line-height: 69rpx;
  1386. margin-top: 40rpx;
  1387. margin-bottom: 100rpx;
  1388. }
  1389. .number {
  1390. display: flex;
  1391. /* 水平居中显示子元素 */
  1392. align-items: flex-start;
  1393. /* 垂直居中显示子元素 */
  1394. justify-content: space-between;
  1395. /* 左右间距等于间距大小 */
  1396. padding: 10px;
  1397. /* 设置padding以提高视觉效果 */
  1398. }
  1399. .textarea {
  1400. margin-top: 10upx;
  1401. width: 100%;
  1402. border: 1rpx solid red;
  1403. min-height: 100upx;
  1404. line-height: 20px;
  1405. }
  1406. .tj-btn {
  1407. height: 69rpx;
  1408. background: #3184f0;
  1409. border-radius: 6rpx;
  1410. font-size: 25rpx;
  1411. font-weight: 400;
  1412. color: #FFFFFF;
  1413. line-height: 69rpx;
  1414. margin: 40rpx 70rpx;
  1415. }
  1416. .sc-btn {
  1417. height: 69rpx;
  1418. background: #f0686b;
  1419. border-radius: 6rpx;
  1420. font-size: 25rpx;
  1421. font-weight: 400;
  1422. color: #FFFFFF;
  1423. line-height: 69rpx;
  1424. margin: 40rpx;
  1425. }
  1426. .num-style {
  1427. background: #e8f4f9;
  1428. margin: 20rpx;
  1429. padding: 10rpx;
  1430. border-radius: 20rpx;
  1431. border: 1px solid #d4e3f0;
  1432. }
  1433. </style>