enginproject.vue 46 KB

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