indoor.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276
  1. <template>
  2. <view>
  3. <view class="background">
  4. <view class="uni-list">
  5. <view class="container">
  6. <view>
  7. 工程周期
  8. </view>
  9. <view v-if="this.isEmpty(this.projectValue.dictValue)" @click="pickerShow('gczq')">
  10. <view>
  11. <span style="color: darkgray;">请选择工程周期
  12. </span>
  13. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  14. size="15"></uni-icons>
  15. </view>
  16. </view>
  17. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gczq')">
  18. <span style="color: black;">{{projectValue.dictLabel}}
  19. </span>
  20. <uni-icons style=" position: absolute;" type="right" color="darkgray" size="15"></uni-icons>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="uni-list">
  25. <view class="container">
  26. <view>
  27. 行政区
  28. </view>
  29. <view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
  30. @click="pickerShow('xzq')">
  31. <span style="color: darkgray;">请选择行政区</span>
  32. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  33. size="15"></uni-icons>
  34. </view>
  35. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
  36. <span style="color: black;">{{XZQValue.dictLabel}}</span>
  37. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  38. size="15"></uni-icons>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="uni-list">
  43. <view class="container">
  44. <view>
  45. 小区
  46. </view>
  47. <view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  48. @click="pickerShow('xq')">
  49. <span style="color: darkgray;">请选择小区</span>
  50. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  51. size="15"></uni-icons>
  52. </view>
  53. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
  54. <span style="color: black;">{{XQValue.name}}</span>
  55. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  56. size="15"></uni-icons>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="uni-list">
  61. <view class="container">
  62. <view class="uni-list-cell-left">
  63. 楼栋
  64. </view>
  65. <view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  66. @click="pickerShow('ld')">
  67. <span style="color: darkgray;">请选择楼栋</span>
  68. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  69. size="15"></uni-icons>
  70. </view>
  71. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
  72. <span style="color: black;">{{LDValue.name}}</span>
  73. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  74. size="15"></uni-icons>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="uni-list" style="margin-top: 10;">
  79. <view class="container">
  80. <view class="uni-list-cell-left">
  81. 单元
  82. </view>
  83. <view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  84. @click="pickerShow('dy')">
  85. <span style="color: darkgray;">请选择单元</span>
  86. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  87. size="15"></uni-icons>
  88. </view>
  89. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
  90. <span style="color: black;">{{DYValue.name}}</span>
  91. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  92. size="15"></uni-icons>
  93. </view>
  94. </view>
  95. </view>
  96. <view class="uni-list">
  97. <view class="container">
  98. <view class="uni-list-cell-left">
  99. 房间
  100. </view>
  101. <view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  102. @click="pickerShow('fj')">
  103. <span style="color: darkgray;">请选择房间</span>
  104. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  105. size="15"></uni-icons>
  106. </view>
  107. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
  108. <span style="color: black;">{{FJValue.name}}</span>
  109. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  110. size="15"></uni-icons>
  111. </view>
  112. </view>
  113. </view>
  114. <view class="container">
  115. <view class="title">是否按照施工图纸施工</view>
  116. <span style="color: black;">{{this.form}}</span>
  117. <switch style="transform: scale(0.6,0.6);" @change="switchChange" checked="isChick" />
  118. </view>
  119. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  120. subtitleKey="id" v-model="name"></SelectPicker>
  121. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
  122. titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  123. </view>
  124. <!--拆旧管-->
  125. <view class="background">
  126. <view v-if="objValue.enginClassValue=='拆旧管'">
  127. <view class="uni-list">
  128. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  129. 拆旧管
  130. <span
  131. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;"
  132. @click="history">历史</span>
  133. </view>
  134. <view class="container" style="margin-bottom: 20PX;">
  135. <view>
  136. 腐蚀等级
  137. </view>
  138. <view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
  139. @click="pickerShow('fsdj')">
  140. <span style="color: darkgray;">请选择腐蚀等级</span>
  141. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  142. size="15"></uni-icons>
  143. </view>
  144. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fsdj')">
  145. <span style="color: black;">{{LevelValue.dictLabel}}</span>
  146. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  147. size="15"></uni-icons>
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. <view v-if="objValue.enginClassValue=='打孔'">
  153. <view class="uni-list">
  154. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  155. 打孔
  156. <span
  157. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;"
  158. @click="history">历史</span>
  159. </view>
  160. <view class="container" style="margin-bottom: 20PX;">
  161. <view>
  162. 孔距
  163. </view>
  164. <view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
  165. @click="pickerShow('kj')">
  166. <span style="color: darkgray;">请选择孔距</span>
  167. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  168. size="15"></uni-icons>
  169. </view>
  170. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('kj')">
  171. <span style="color: black;">{{LevelValue.dictLabel}}</span>
  172. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  173. size="15"></uni-icons>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. <!--立杠-->
  179. <view v-else-if="objValue.enginClassValue=='立杠'">
  180. <view class="uni-list" style="margin-bottom: 20px;">
  181. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  182. 立杠
  183. <span
  184. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;"
  185. @click="history">历史</span>
  186. </view>
  187. <view class="container">
  188. <view>
  189. 材 质
  190. </view>
  191. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  192. @click="pickerShow('cz')">
  193. <span style="color: darkgray;">请选择材质</span>
  194. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  195. size="15"></uni-icons>
  196. </view>
  197. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  198. <span style="color: black;">{{materialValue.name}}</span>
  199. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  200. size="15"></uni-icons>
  201. </view>
  202. </view>
  203. <view class="container">
  204. <view>
  205. 规 格
  206. </view>
  207. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  208. @click="pickerShow('gg')">
  209. <span style="color: darkgray;">请选择规格</span>
  210. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  211. size="15"></uni-icons>
  212. </view>
  213. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  214. <span style="color: black;">{{specificationValue.name}}</span>
  215. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  216. size="15"></uni-icons>
  217. </view>
  218. </view>
  219. <view class="container">
  220. <text>数 量</text>
  221. <input class="uni-input" type="number" v-model="inputNumberValue" placeholder="请填写数量"
  222. maxlength="11" style="margin-left: 10px;text-align: right;"></input>
  223. </view>
  224. </view>
  225. </view>
  226. <!--挂表-->
  227. <view v-else-if="objValue.enginClassValue=='挂表'">
  228. <view class="uni-list" style="margin-bottom: 20px;">
  229. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  230. 挂表
  231. <span
  232. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;"
  233. @click="history">历史</span>
  234. </view>
  235. <view class="container">
  236. <view>
  237. 品 牌
  238. </view>
  239. <view v-if="this.isEmpty(this.brandValue.dictValue)" style="margin-top: 10;"
  240. @click="pickerShow('brand')">
  241. <span style="color: darkgray;">请选择品牌</span>
  242. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  243. size="15"></uni-icons>
  244. </view>
  245. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
  246. <span style="color: black;">{{brandValue.dictLabel}}</span>
  247. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  248. size="15"></uni-icons>
  249. </view>
  250. </view>
  251. <view class="container">
  252. <text>数 量</text>
  253. <input class="uni-input" type="number" v-model="inputNumberValue" placeholder="请填写数量"
  254. maxlength="11" style="margin-left: 10px;text-align: right;"></input>
  255. </view>
  256. </view>
  257. </view>
  258. <!--表后管-->
  259. <view v-else-if="objValue.enginClassValue=='表后管'">
  260. <view class="uni-list" style="margin-bottom: 20px;">
  261. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  262. 表后管
  263. <span
  264. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;"
  265. @click="history">历史</span>
  266. </view>
  267. <view class="container">
  268. <view>
  269. 材 质
  270. </view>
  271. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  272. @click="pickerShow('cz')">
  273. <span style="color: darkgray;">请选择材质</span>
  274. </view>
  275. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  276. <span style="color: black;">{{materialValue.name}}</span>
  277. </view>
  278. </view>
  279. <view class="container">
  280. <view>
  281. 规 格
  282. </view>
  283. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  284. @click="pickerShow('gg')">
  285. <span style="color: darkgray;">请选择规格</span>
  286. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  287. size="15"></uni-icons>
  288. </view>
  289. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  290. <span style="color: black;">{{specificationValue.name}}</span>
  291. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  292. size="15"></uni-icons>
  293. </view>
  294. </view>
  295. <view class="container">
  296. <text>数 量</text>
  297. <input class="uni-input" type="number" v-model="inputNumberValue" placeholder="请填写数量"
  298. maxlength="11" style="margin-left: 10px;text-align: right;"></input>
  299. </view>
  300. </view>
  301. </view>
  302. <!--阀管-->
  303. <view v-else-if="objValue.enginClassValue=='阀管'">
  304. <view class="uni-list" style="margin-bottom: 20px;">
  305. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  306. 阀管
  307. <span
  308. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;"
  309. @click="history">历史</span>
  310. </view>
  311. <view class="container">
  312. <view>
  313. 上门类型
  314. </view>
  315. <view v-if="this.isEmpty(this.doorValue.dictValue)" style="margin-top: 10;"
  316. @click="pickerShow('door')">
  317. <span style="color: darkgray;">请选择上门类型</span>
  318. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  319. size="15"></uni-icons>
  320. </view>
  321. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('door')">
  322. <span style="color: black;">{{doorValue.dictLabel}}</span>
  323. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  324. size="15"></uni-icons>
  325. </view>
  326. </view>
  327. <view class="container">
  328. <view>
  329. 自闭阀类型
  330. </view>
  331. <view v-if="this.isEmpty(this.SelfClosValve.dictValue)" style="margin-top: 10;"
  332. @click="pickerShow('zbf')">
  333. <span style="color: darkgray;">请选择自闭阀类型</span>
  334. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  335. size="15"></uni-icons>
  336. </view>
  337. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('zbf')">
  338. <span style="color: black;">{{SelfClosValve.dictLabel}}</span>
  339. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  340. size="15"></uni-icons>
  341. </view>
  342. </view>
  343. <view class="container">
  344. <view>
  345. 材 质
  346. </view>
  347. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  348. @click="pickerShow('cz')">
  349. <span style="color: darkgray;">请选择材质</span>
  350. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  351. size="15"></uni-icons>
  352. </view>
  353. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  354. <span style="color: black;">{{materialValue.name}}</span>
  355. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  356. size="15"></uni-icons>
  357. </view>
  358. </view>
  359. <view class="container">
  360. <view>
  361. 规 格
  362. </view>
  363. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  364. @click="pickerShow('gg')">
  365. <span style="color: darkgray;">请选择规格</span>
  366. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  367. size="15"></uni-icons>
  368. </view>
  369. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  370. <span style="color: black;">{{specificationValue.name}}</span>
  371. <uni-icons style=" position: absolute;" type="right" color="darkgray"
  372. size="15"></uni-icons>
  373. </view>
  374. </view>
  375. <view class="container">
  376. <text>数 量</text>
  377. <input class="uni-input" type="number" v-model="inputNumberValue" placeholder="请填写数量"
  378. maxlength="11" style="margin-left: 10px;text-align: right;"></input>
  379. </view>
  380. </view>
  381. </view>
  382. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  383. <view class="container" style="color: gainsboro;">*请上传照片</view>
  384. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  385. <image src="/static/images/chooseimg.png" mode=""
  386. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="choose()"></image>
  387. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  388. <view
  389. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ">
  390. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  391. @click="showPhoto(index)">
  392. </image>
  393. </view>
  394. <view v-else>
  395. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  396. </view>
  397. <view @click="remove(index)"
  398. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  399. <uni-icons type="close" color="darkgray" size="18"></uni-icons>
  400. </view>
  401. </view>
  402. </view>
  403. </view>
  404. </view>
  405. <view class="action-btn">
  406. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  407. </view>
  408. <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
  409. </view>
  410. </template>
  411. <script>
  412. import SelectPicker from '../../../components/selectPicker/select_picker.vue'
  413. import bottomSheet from '../../../components/bottomSheet/bottomSheet.vue'
  414. import uniIcons from '../../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  415. import {
  416. getDicts
  417. } from "@/api/system/dict/data";
  418. import {
  419. getAreaList,
  420. getBuildingList,
  421. getUnitList,
  422. getHousesList,
  423. addTearOldPipe,
  424. getEnginMaterialQualityList,
  425. getEnginSpecificationsList,
  426. getRoomProjectList,
  427. getRoomProjectId,
  428. } from '@/api/common'
  429. import {
  430. getToken
  431. } from '../../../utils/auth';
  432. export default {
  433. components: {
  434. SelectPicker,
  435. uniIcons,
  436. bottomSheet
  437. },
  438. data() {
  439. return {
  440. headers: {
  441. Authorization: "Bearer " + getToken()
  442. },
  443. type: '',
  444. open: false,
  445. objValue: '', //上一页面传过来的值 新增接口用
  446. openDict: false,
  447. selectList: [],
  448. dictOptions: [],
  449. imgArr: [],
  450. XQValue: {},
  451. XZQValue: {},
  452. projectValue: {},
  453. LevelValue: {},
  454. LDValue: {},
  455. DYValue: {},
  456. FJValue: {},
  457. FSValue: {},
  458. specificationValue: {}, //规格
  459. materialValue: {}, //材质
  460. brandValue: {}, //品牌
  461. doorValue: {}, //上门类型
  462. SelfClosValve: {}, //自闭阀类型
  463. materialList: '', //材质list
  464. XQList: '',
  465. LDList: '',
  466. DYList: '',
  467. FJList: '',
  468. progress: 0, //上传图片进度百分比
  469. loading: false,
  470. isCheck: true, //是否按照施工图纸施工
  471. inputNumberValue: '',
  472. title: '',
  473. historyList: {} //历史数据
  474. }
  475. },
  476. created() {
  477. },
  478. onLoad(options) {
  479. if ('params' in options) {
  480. this.objValue = JSON.parse(decodeURIComponent(options.params));
  481. if (this.objValue.enginType == `old_renovation`) {
  482. this.title = '旧改工程-室内'
  483. } else if (this.objValue.enginType == `new_built`) {
  484. this.title = '新建工程-室内'
  485. }
  486. uni.setNavigationBarTitle({
  487. title: this.title
  488. })
  489. }
  490. },
  491. methods: {
  492. //判断是否选择
  493. isEmpty(str) {
  494. return (!str || 0 === str.length);
  495. },
  496. // 显示历史弹窗
  497. handleShowSheet() {
  498. this.shareState = true;
  499. },
  500. // 隐藏历史弹窗
  501. handleHiddenShare() {
  502. this.shareState = false;
  503. },
  504. showPhoto(index) {
  505. uni.previewImage({
  506. current: index,
  507. urls: this.imgArr,
  508. })
  509. },
  510. remove(index) {
  511. uni.showModal({
  512. title: '提示',
  513. content: '是否删除该图片或视频?',
  514. success: (res) => {
  515. if (res.confirm) {
  516. this.imgArr.splice(index, 1)
  517. console.log('this.imgarr', this.imgArr)
  518. if (this.imgArr.length <= 0) {
  519. this.photo = true;
  520. }
  521. }
  522. }
  523. })
  524. },
  525. choose() {
  526. let _this = this;
  527. uni.showActionSheet({
  528. title: '上传',
  529. itemList: ['图片', '视频'],
  530. success: (res) => {
  531. console.log(res)
  532. if (res.tapIndex == 0) {
  533. this.chooseimage()
  534. } else {
  535. this.choosevideo()
  536. }
  537. }
  538. })
  539. },
  540. chooseimage() {
  541. let _this = this;
  542. console.log('图片', _this.headers)
  543. uni.chooseImage({
  544. sizeType: ['album', 'camera'],
  545. success(resp) {
  546. resp.tempFiles.forEach((item, index) => {
  547. const task = uni.uploadFile({
  548. url: _this.$HTTP + `/obs`,
  549. filePath: item.path,
  550. name: 'file',
  551. formData: {},
  552. header: _this.headers,
  553. success: res => {
  554. // 判断是否json字符串,将其转为json格式
  555. console.log("结果", res)
  556. // let data = _this.$u.test.jsonString(res
  557. // .data) ? JSON.parse(res.data) : res.data;
  558. let data = JSON.parse(res.data);
  559. if (![200].includes(data.code)) {
  560. // this.uploadError(index, data);
  561. _this.$modal.msg(data.msg)
  562. } else {
  563. if (_this.progress === 100) {
  564. console.log('_this.progress', _this.progress)
  565. //console.log('data----', data)data
  566. console.log('res--', res)
  567. _this.imgArr.push(data.data.url)
  568. console.log('imgArr', _this.imgArr)
  569. _this.$modal.msg('上传成功!')
  570. _this.photo = false;
  571. }
  572. }
  573. },
  574. fail: e => {
  575. console.log(e)
  576. _this.$modal.msg('上传失败!')
  577. //_this.uploadError(index, e);
  578. },
  579. complete: res => {
  580. uni.hideLoading();
  581. _this.uploading = false;
  582. }
  583. });
  584. task.onProgressUpdate(res => {
  585. _this.progress = res.progress;
  586. console.log('onProgressUpdate', res)
  587. console.log('task.onProgressUpdate', _this.progress)
  588. uni.showLoading({
  589. title: '上传中'
  590. })
  591. if (_this.progress != 100) {
  592. _this.loading = false
  593. console.log('_this.loading false', _this.loading)
  594. } else {
  595. _this.loading = true
  596. console.log('_this.loading true', _this.loading)
  597. }
  598. });
  599. })
  600. },
  601. })
  602. },
  603. choosevideo() {
  604. let _this = this;
  605. console.log('视频')
  606. uni.chooseVideo({
  607. sourceType: ['album', 'camera'],
  608. maxDuration: 30,
  609. success(resp) {
  610. const task = uni.uploadFile({
  611. url: _this.$HTTP + `/obs`,
  612. filePath: resp.tempFilePath,
  613. name: 'file',
  614. formData: {},
  615. header: _this.headers,
  616. success: res => {
  617. // 判断是否json字符串,将其转为json格式
  618. let data = JSON.parse(res.data);
  619. if (![200].includes(res.statusCode)) {
  620. this.uploadError(index, data);
  621. } else {
  622. //上传成功
  623. if (_this.progress === 100) {
  624. console.log('_this.progress', _this.progress)
  625. _this.imgArr.push(data.data.url)
  626. console.log('imgArr', _this.imgArr)
  627. _this.$modal.msg('上传成功!')
  628. _this.photo = false;
  629. }
  630. }
  631. },
  632. fail: e => {
  633. _this.$modal.msg('上传失败!')
  634. this.uploadError(index, e);
  635. },
  636. complete: res => {
  637. uni.hideLoading();
  638. _this.uploading = false;
  639. }
  640. });
  641. task.onProgressUpdate(res => {
  642. _this.progress = res.progress;
  643. console.log('onProgressUpdate', res)
  644. uni.showLoading({
  645. title: '上传中'
  646. })
  647. if (_this.progress != 100) {
  648. _this.loading = false
  649. console.log('_this.loading false', _this.loading)
  650. } else {
  651. _this.loading = true
  652. console.log('_this.loading true', _this.loading)
  653. }
  654. });
  655. },
  656. })
  657. },
  658. pickerShow(e) {
  659. this.type = e; //赋值类型
  660. if (e == 'door') { //上门类型
  661. this.openDict = true;
  662. getDicts("visit_type").then(response => {
  663. this.dictOptions = response.data;
  664. });
  665. } else if (e == 'zbf') { //自闭阀类型
  666. this.openDict = true;
  667. getDicts("self_closing_valve_type").then(response => {
  668. this.dictOptions = response.data;
  669. });
  670. } else if (e == 'brand') { //品牌
  671. this.openDict = true;
  672. getDicts("brand").then(response => {
  673. this.dictOptions = response.data;
  674. });
  675. } else if (e == 'cz') { //材质
  676. this.open = true;
  677. getEnginMaterialQualityList("民用工程").then(response => {
  678. this.selectList = response.data;
  679. });
  680. } else if (e == 'gg') { //规格
  681. if (this.isEmpty(this.materialValue.id)) {
  682. this.$modal.msg('请选择材质')
  683. } else {
  684. this.open = true;
  685. this.selectList = this.materialList;
  686. }
  687. } else if (e == 'fsdj') {
  688. //腐蚀等级
  689. this.openDict = true;
  690. //腐蚀等级
  691. getDicts("corrosion_level").then(response => {
  692. this.dictOptions = response.data;
  693. });
  694. } else if (e == 'kj') {
  695. //孔距
  696. this.openDict = true;
  697. getDicts("perforated_pipe_diameter").then(response => {
  698. this.dictOptions = response.data;
  699. });
  700. } else if (e == 'gczq') { //工程周期
  701. this.openDict = true;
  702. getDicts("engin_cycle").then(response => {
  703. this.dictOptions = response.data;
  704. });
  705. } else if (e == 'xzq') { //行政区
  706. if (this.isEmpty(this.projectValue.dictValue)) {
  707. this.$modal.msg('请选择工程周期')
  708. } else {
  709. this.openDict = true;
  710. getDicts("district").then(response => {
  711. this.dictOptions = response.data;
  712. });
  713. }
  714. //this.selectList = this.dictOptions;
  715. } else if (e == 'xq') { //小区
  716. if (this.isEmpty(this.XZQValue.dictValue)) {
  717. this.$modal.msg('请选择行政区')
  718. } else {
  719. this.open = true;
  720. this.selectList = this.XQList;
  721. }
  722. } else if (e == 'ld') { //楼栋
  723. if (this.isEmpty(this.XQValue.id)) {
  724. this.$modal.msg('请选择小区')
  725. } else {
  726. this.open = true;
  727. this.selectList = this.LDList;
  728. }
  729. } else if (e == 'dy') { //单元
  730. if (this.isEmpty(this.LDValue.id)) {
  731. this.$modal.msg('请选择楼栋')
  732. } else {
  733. this.open = true;
  734. this.selectList = this.DYList;
  735. }
  736. } else if (e == 'fj') { //房间
  737. if (this.isEmpty(this.DYValue.id)) {
  738. this.$modal.msg('请选择单元')
  739. } else {
  740. this.open = true;
  741. this.selectList = this.FJList;
  742. }
  743. }
  744. },
  745. switchChange(e) {
  746. //'switch 发生 change 事件,携带值为', e.detail.value)
  747. this.isCheck = e.detail.value;
  748. },
  749. changeSelectDict(item, index) {
  750. this.openDict = false;
  751. if (this.type == 'door') {
  752. this.doorValue = item
  753. } else if (this.type == 'zbf') {
  754. this.SelfClosValve = item
  755. } else if (this.type == 'brand') {
  756. this.brandValue = item
  757. } else if (this.type == 'gczq') {
  758. this.projectValue = item
  759. } else if (this.type == 'xzq') {
  760. this.XZQValue = item;
  761. //根据行政区id获取小区数据
  762. this.XQValue = ''; //重置小区数据
  763. this.LDValue = ''; //重置楼栋数据
  764. this.DYValue = ''; //重置单元数据
  765. this.FJValue = ''; //重置房间数据
  766. getAreaList(item.dictValue).then(res => {
  767. this.XQList = res.data;
  768. })
  769. } else {
  770. this.LevelValue = item;
  771. }
  772. },
  773. changeSelect(item, index) {
  774. // this.index = index;
  775. // this.address = item.communityName;
  776. this.open = false;
  777. if (this.type == 'cz') {
  778. this.materialValue = item;
  779. this.specificationValue = ''; //重置规格
  780. //根据材质ID 获取规格数据
  781. getEnginSpecificationsList(item.id).then(res => {
  782. this.materialList = res.data
  783. })
  784. } else if (this.type == 'gg') {
  785. this.specificationValue = item;
  786. } else if (this.type == 'xq') {
  787. this.XQValue = item;
  788. //根据小区id 获取楼栋数据
  789. this.LDValue = ''; //重置楼栋数据
  790. this.DYValue = ''; //重置单元数据
  791. this.FJValue = ''; //重置房间数据
  792. getBuildingList(item.id).then(res => {
  793. this.LDList = res.data
  794. // console.log("楼栋=", res)
  795. })
  796. } else if (this.type == 'ld') {
  797. this.LDValue = item;
  798. //根据楼栋ID 获取单元数据
  799. this.DYValue = ''; //重置单元数据
  800. this.FJValue = ''; //重置房间数据
  801. getUnitList(item.id).then(res => {
  802. this.DYList = res.data
  803. // console.log("单元=", res)
  804. })
  805. } else if (this.type == 'dy') {
  806. this.DYValue = item;
  807. //根据单元数据 获取房间数据
  808. this.FJValue = ''; //重置房间数据
  809. getHousesList(item.id).then(res => {
  810. this.FJList = res.data
  811. // console.log("房间=", res)
  812. })
  813. } else if (this.type == 'fj') {
  814. this.FJValue = item;
  815. }
  816. },
  817. //关闭弹窗
  818. close(e) {
  819. this.open = false
  820. },
  821. //关闭弹窗
  822. closeDict(e) {
  823. this.openDict = false
  824. },
  825. //提交数据
  826. submit() {
  827. if (this.isEmpty(this.projectValue.dictValue)) {
  828. this.$modal.msg("请选择工程周期")
  829. } else if (this.isEmpty(this.XZQValue.dictValue)) {
  830. this.$modal.msg("请选择行政区")
  831. } else if (this.isEmpty(this.XQValue.id)) {
  832. this.$modal.msg("请选择小区")
  833. } else if (this.isEmpty(this.LDValue.id)) {
  834. this.$modal.msg("请选择楼栋")
  835. } else if (this.isEmpty(this.DYValue.id)) {
  836. this.$modal.msg("请选择单元")
  837. } else if (this.isEmpty(this.FJValue.id)) {
  838. this.$modal.msg("请选择房间")
  839. } else if (this.objValue.enginClassValue == '打孔') {
  840. if (this.isEmpty(this.LevelValue.dictValue)) {
  841. this.$modal.msg("请选择孔距") //打孔 判断孔距
  842. } else {
  843. this.onsubmit();
  844. }
  845. } else if (this.objValue.enginClassValue == '拆旧管') {
  846. if (this.isEmpty(this.LevelValue.dictValue)) {
  847. this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
  848. } else {
  849. this.onsubmit();
  850. }
  851. } else if (this.objValue.enginClassValue == '立杠') {
  852. //立杠 判断 材质 规格 数量
  853. if (this.isEmpty(this.materialValue.id)) {
  854. this.$modal.msg("请选择材质")
  855. } else if (this.isEmpty(this.specificationValue.id)) {
  856. this.$modal.msg("请选择规格")
  857. } else if (this.isEmpty(this.inputNumberValue)) {
  858. this.$modal.msg("请输入数量")
  859. } else {
  860. this.onsubmit();
  861. }
  862. } else if (this.objValue.enginClassValue == '挂表') {
  863. //挂表 判断 品牌 数量
  864. if (this.isEmpty(this.brandValue.dictValue)) {
  865. this.$modal.msg("请选择品牌")
  866. } else if (this.isEmpty(this.inputNumberValue)) {
  867. this.$modal.msg("请输入数量")
  868. } else {
  869. this.onsubmit();
  870. }
  871. } else if (this.objValue.enginClassValue == '表后管') {
  872. //表后管 判断 材质 规格 数量 (为必须有一张照片和一个视频)
  873. if (this.isEmpty(this.materialValue.id)) {
  874. this.$modal.msg("请选择材质")
  875. } else if (this.isEmpty(this.specificationValue.id)) {
  876. this.$modal.msg("请选择规格")
  877. } else if (this.isEmpty(this.inputNumberValue)) {
  878. this.$modal.msg("请输入数量")
  879. } else if (this.imgArr.length <= 0) {
  880. this.$modal.msg('请上传照片或视频')
  881. } else if (this.loading == false) {
  882. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  883. } else {
  884. const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith('.png') || item
  885. .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
  886. .endsWith('.JPEG'));
  887. const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
  888. if (hasImage && hasVideo) {
  889. //表后管 特殊 提交
  890. let param = {
  891. district: this.XZQValue.dictValue,
  892. areaId: this.XQValue.id,
  893. buildingId: this.LDValue.id,
  894. unitId: this.DYValue.id,
  895. houseId: this.FJValue.id,
  896. enginType: this.objValue.enginType, //写死 上一页面传过来的
  897. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  898. enginCycle: this.projectValue.dictValue, //工程周期
  899. zEngineeringNodeBo: {
  900. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  901. zEngineeringInfoBo: {
  902. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  903. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  904. zEngineeringMaterialBo: [{
  905. materialQuality: this.materialValue.id, //材质
  906. specifications: this.specificationValue.id, //规格
  907. number: this.inputNumberValue //数量
  908. }]
  909. }
  910. }
  911. }
  912. addTearOldPipe(param).then(res => {
  913. if (res.code == '200') {
  914. uni.showToast({
  915. title: res.msg,
  916. icon: 'none',
  917. //显示持续时间为 1秒
  918. duration: 1000
  919. });
  920. uni.navigateBack();
  921. }
  922. })
  923. } else {
  924. this.$modal.msg('请至少上传一张照片和一个视频')
  925. }
  926. }
  927. } else if (this.objValue.enginClassValue == '阀管') {
  928. //阀管 判断 材质 规格 数量
  929. if (this.isEmpty(this.doorValue.dictValue)) {
  930. this.$modal.msg("请选择上门类型")
  931. } else if (this.isEmpty(this.SelfClosValve.dictValue)) {
  932. this.$modal.msg("请选择自闭阀类型")
  933. } else if (this.isEmpty(this.materialValue.id)) {
  934. this.$modal.msg("请选择材质")
  935. } else if (this.isEmpty(this.specificationValue.id)) {
  936. this.$modal.msg("请选择规格")
  937. } else if (this.isEmpty(this.inputNumberValue)) {
  938. this.$modal.msg("请输入数量")
  939. } else {
  940. this.onsubmit();
  941. }
  942. }
  943. },
  944. onsubmit() {
  945. if (this.imgArr.length <= 0) {
  946. this.$modal.msg('请上传照片或视频')
  947. } else if (this.loading == false) {
  948. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  949. } else {
  950. //提交
  951. let param = ';'
  952. if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue == '打孔') { //拆旧管 打孔
  953. param = {
  954. district: this.XZQValue.dictValue,
  955. areaId: this.XQValue.id,
  956. buildingId: this.LDValue.id,
  957. unitId: this.DYValue.id,
  958. houseId: this.FJValue.id,
  959. enginType: this.objValue.enginType, //写死 上一页面传过来的
  960. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  961. enginCycle: this.projectValue.dictValue, //工程周期
  962. zEngineeringNodeBo: {
  963. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  964. zEngineeringInfoBo: {
  965. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  966. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  967. zEngineeringMaterialBo: [{
  968. corrosionLevel: this.LevelValue.dictValue //腐蚀等级 //孔距
  969. }]
  970. }
  971. }
  972. }
  973. //this.onsubmit(param)
  974. } else if (this.objValue.enginClassValue == '立杠') { //立杠
  975. param = {
  976. district: this.XZQValue.dictValue,
  977. areaId: this.XQValue.id,
  978. buildingId: this.LDValue.id,
  979. unitId: this.DYValue.id,
  980. houseId: this.FJValue.id,
  981. enginType: this.objValue.enginType, //写死 上一页面传过来的
  982. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  983. enginCycle: this.projectValue.dictValue, //工程周期
  984. zEngineeringNodeBo: {
  985. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  986. zEngineeringInfoBo: {
  987. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  988. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  989. zEngineeringMaterialBo: [{
  990. materialQuality: this.materialValue.id, //材质
  991. specifications: this.specificationValue.id, //规格
  992. number: this.inputNumberValue //数量
  993. }]
  994. }
  995. }
  996. }
  997. } else if (this.objValue.enginClassValue == '挂表') { //挂表
  998. param = {
  999. district: this.XZQValue.dictValue,
  1000. areaId: this.XQValue.id,
  1001. buildingId: this.LDValue.id,
  1002. unitId: this.DYValue.id,
  1003. houseId: this.FJValue.id,
  1004. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1005. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1006. enginCycle: this.projectValue.dictValue, //工程周期
  1007. zEngineeringNodeBo: {
  1008. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1009. zEngineeringInfoBo: {
  1010. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1011. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1012. zEngineeringMaterialBo: [{
  1013. brand: this.brandValue.dictValue, //品牌
  1014. number: this.inputNumberValue //数量
  1015. }]
  1016. }
  1017. }
  1018. }
  1019. } else if (this.objValue.enginClassValue == '阀管') { //自闭阀
  1020. param = {
  1021. district: this.XZQValue.dictValue,
  1022. areaId: this.XQValue.id,
  1023. buildingId: this.LDValue.id,
  1024. unitId: this.DYValue.id,
  1025. houseId: this.FJValue.id,
  1026. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1027. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1028. enginCycle: this.projectValue.dictValue, //工程周期
  1029. zEngineeringNodeBo: {
  1030. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1031. zEngineeringInfoBo: {
  1032. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1033. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1034. zEngineeringMaterialBo: [{
  1035. visitType: this.doorValue.dictValue, //上门类型
  1036. selfClosingValveType: this.SelfClosValve.dictValue, //自闭阀类型
  1037. materialQuality: this.materialValue.id, //材质
  1038. specifications: this.specificationValue.id, //规格
  1039. number: this.inputNumberValue //数量
  1040. }]
  1041. }
  1042. }
  1043. }
  1044. }
  1045. addTearOldPipe(param).then(res => {
  1046. if (res.code == '200') {
  1047. uni.showToast({
  1048. title: res.msg,
  1049. icon: 'none',
  1050. //显示持续时间为 3秒
  1051. duration: 2000
  1052. });
  1053. setTimeout(function() {
  1054. uni.navigateBack();
  1055. }, 1000)
  1056. }
  1057. })
  1058. }
  1059. },
  1060. history() {
  1061. if (this.isEmpty(this.projectValue.dictValue)) {
  1062. this.$modal.msg("请选择工程周期")
  1063. } else if (this.isEmpty(this.XZQValue.dictValue)) {
  1064. this.$modal.msg("请选择行政区")
  1065. } else if (this.isEmpty(this.XQValue.id)) {
  1066. this.$modal.msg("请选择小区")
  1067. } else if (this.isEmpty(this.LDValue.id)) {
  1068. this.$modal.msg("请选择楼栋")
  1069. } else if (this.isEmpty(this.DYValue.id)) {
  1070. this.$modal.msg("请选择单元")
  1071. } else if (this.isEmpty(this.FJValue.id)) {
  1072. this.$modal.msg("请选择房间")
  1073. } else {
  1074. let param = {
  1075. areaId: this.XQValue.id, // 小区id
  1076. buildingId: this.LDValue.id, // 楼宇id
  1077. unitId: this.DYValue.id, // 单元id
  1078. houseId: this.FJValue.id, // 房间id
  1079. enginCycle: this.projectValue.dictValue, // 工程周期
  1080. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1081. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1082. }
  1083. getRoomProjectId(param).then(res => {
  1084. if (res.code == '200') {
  1085. if (res.data != null) {
  1086. getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(res => {
  1087. this.historyList = res.data
  1088. if (res.data.zEngineeringNodeBo != null) {
  1089. this.showHistoryList();
  1090. } else {
  1091. this.$modal.msg("暂无历史信息")
  1092. }
  1093. })
  1094. } else {
  1095. this.$modal.msg("暂无工程信息")
  1096. }
  1097. } else {
  1098. this.$modal.msg(res.msg)
  1099. }
  1100. })
  1101. }
  1102. },
  1103. showHistoryList() {
  1104. this.$refs.refShare.handleShowShare();
  1105. }
  1106. }
  1107. }
  1108. </script>
  1109. <style>
  1110. .container {
  1111. display: flex;
  1112. margin-left: 10px;
  1113. margin-top: 10px;
  1114. margin-right: 10px;
  1115. align-items: flex-start;
  1116. justify-content: space-between;
  1117. }
  1118. .text {
  1119. font-size: 16px;
  1120. color: #333;
  1121. }
  1122. .background {
  1123. border: 15px solid hsla(0, 0%, 100%, .5);
  1124. background: white;
  1125. padding-left: 5px;
  1126. padding-right: 10px;
  1127. background-clip: padding-box;
  1128. /*从padding开始往外面裁剪背景*/
  1129. }
  1130. .btn {
  1131. margin-top: 40px;
  1132. margin-right: 20px;
  1133. margin-bottom: 120px;
  1134. margin-left: 20px;
  1135. height: 45px;
  1136. }
  1137. .number {
  1138. display: flex;
  1139. /* 水平居中显示子元素 */
  1140. align-items: flex-start;
  1141. /* 垂直居中显示子元素 */
  1142. justify-content: space-between;
  1143. /* 左右间距等于间距大小 */
  1144. padding: 10px;
  1145. /* 设置padding以提高视觉效果 */
  1146. }
  1147. </style>