tearOldPipe.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  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)" style="margin-top: 10;"
  10. @click="pickerShow('gczq')">
  11. <span style="color: darkgray;">请选择工程周期</span>
  12. </view>
  13. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gczq')">
  14. <span style="color: black;">{{projectValue.dictLabel}}</span>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="uni-list">
  19. <view class="container">
  20. <view>
  21. 行政区
  22. </view>
  23. <view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
  24. @click="pickerShow('xzq')">
  25. <span style="color: darkgray;">请选择行政区</span>
  26. </view>
  27. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
  28. <span style="color: black;">{{XZQValue.dictLabel}}</span>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="uni-list">
  33. <view class="container">
  34. <view>
  35. 小区
  36. </view>
  37. <view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  38. @click="pickerShow('xq')">
  39. <span style="color: darkgray;">请选择小区</span>
  40. </view>
  41. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
  42. <span style="color: black;">{{XQValue.name}}</span>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="uni-list">
  47. <view class="container">
  48. <view class="uni-list-cell-left">
  49. 楼栋
  50. </view>
  51. <view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  52. @click="pickerShow('ld')">
  53. <span style="color: darkgray;">请选择楼栋</span>
  54. </view>
  55. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
  56. <span style="color: black;">{{LDValue.name}}</span>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="uni-list" style="margin-top: 10;">
  61. <view class="container">
  62. <view class="uni-list-cell-left">
  63. 单元
  64. </view>
  65. <view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  66. @click="pickerShow('dy')">
  67. <span style="color: darkgray;">请选择单元</span>
  68. </view>
  69. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
  70. <span style="color: black;">{{DYValue.name}}</span>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="uni-list">
  75. <view class="container">
  76. <view class="uni-list-cell-left">
  77. 房间
  78. </view>
  79. <view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  80. @click="pickerShow('fj')">
  81. <span style="color: darkgray;">请选择房间</span>
  82. </view>
  83. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
  84. <span style="color: black;">{{FJValue.name}}</span>
  85. </view>
  86. </view>
  87. </view>
  88. <view class="container">
  89. <view class="title">是否按照施工图纸施工</view>
  90. <span style="color: black;">{{this.form}}</span>
  91. <switch style="transform: scale(0.6,0.6);" @change="switchChange" checked="isChick" />
  92. </view>
  93. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  94. subtitleKey="id" v-model="name"></SelectPicker>
  95. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
  96. titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  97. </view>
  98. <view class="background">
  99. <view v-if="objValue.enginClassValue=='dismantling_old_pipe'">
  100. <view class="uni-list">
  101. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  102. 拆旧管
  103. <span
  104. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;">历史</span>
  105. </view>
  106. <view class="container" style="margin-bottom: 20PX;">
  107. <view>
  108. 腐蚀等级
  109. </view>
  110. <view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
  111. @click="pickerShow('fsdj')">
  112. <span style="color: darkgray;">请选择腐蚀等级</span>
  113. </view>
  114. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fsdj')">
  115. <span style="color: black;">{{LevelValue.dictLabel}}</span>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <view v-if="objValue.enginClassValue=='vertical_bar'">
  121. <view class="uni-list" style="margin-bottom: 20px;">
  122. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
  123. 立杠
  124. <span
  125. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 15px;">历史</span>
  126. </view>
  127. <view class="container">
  128. <view>
  129. 材 质
  130. </view>
  131. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  132. @click="pickerShow('cz')">
  133. <span style="color: darkgray;">请选择材质</span>
  134. </view>
  135. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  136. <span style="color: black;">{{materialValue.name}}</span>
  137. </view>
  138. </view>
  139. <view class="container">
  140. <view>
  141. 规 格
  142. </view>
  143. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  144. @click="pickerShow('gg')">
  145. <span style="color: darkgray;">请选择规格</span>
  146. </view>
  147. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  148. <span style="color: black;">{{specificationValue.name}}</span>
  149. </view>
  150. </view>
  151. <view class="container">
  152. <text>数 量</text>
  153. <input class="uni-input" type="number" v-model="number" placeholder="请填写数量"
  154. style="margin-left: 10px;text-align: right;"></input>
  155. </view>
  156. </view>
  157. </view>
  158. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  159. <view class="container" style="color: gainsboro;">*请上传照片</view>
  160. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  161. <image src="/static/images/chooseimg.png" mode=""
  162. style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="choose()"></image>
  163. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  164. <view
  165. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ">
  166. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  167. @click="showPhoto(index)">
  168. </image>
  169. </view>
  170. <view v-else>
  171. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  172. </view>
  173. <view @click="remove(index)"
  174. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  175. <uni-icons type="close" color="darkgray" size="18"></uni-icons>
  176. </view>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. <view class="action-btn">
  182. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  183. </view>
  184. </view>
  185. </template>
  186. <script>
  187. import SelectPicker from '../../../components/selectPicker/select_picker.vue'
  188. import uniIcons from '../../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  189. import {
  190. getDicts
  191. } from "@/api/system/dict/data";
  192. import {
  193. getAreaList,
  194. getBuildingList,
  195. getUnitList,
  196. getHousesList,
  197. addTearOldPipe,
  198. getEnginMaterialQualityList,
  199. getEnginSpecificationsList,
  200. } from '@/api/common'
  201. import {
  202. getToken
  203. } from '../../../utils/auth';
  204. export default {
  205. components: {
  206. SelectPicker,
  207. uniIcons
  208. },
  209. data() {
  210. return {
  211. headers: {
  212. Authorization: "Bearer " + getToken()
  213. },
  214. type: '',
  215. open: false,
  216. objValue: '', //上一页面传过来的值 新增接口用
  217. openDict: false,
  218. selectList: [],
  219. dictOptions: [],
  220. imgArr: [],
  221. XQValue: {},
  222. XZQValue: {},
  223. projectValue: {},
  224. LevelValue: {},
  225. LDValue: {},
  226. DYValue: {},
  227. FJValue: {},
  228. FSValue: {},
  229. specificationValue: {}, //规格
  230. materialValue: {}, //材质
  231. materialList: '', //材质list
  232. XQList: '',
  233. LDList: '',
  234. DYList: '',
  235. FJList: '',
  236. progress: 0, //上传图片进度百分比
  237. loading: false,
  238. isCheck: true, //是否按照施工图纸施工
  239. number: '',
  240. title: '',
  241. }
  242. },
  243. created() {
  244. },
  245. onLoad(options) {
  246. if ('params' in options) {
  247. this.objValue = JSON.parse(decodeURIComponent(options.params));
  248. if (this.objValue.enginType == `old_renovation` && this.objValue.enginClassification == 'indoor_engin') {
  249. this.title = '旧改工程-室内'
  250. } else {
  251. this.title = '新建工程-室内'
  252. }
  253. uni.setNavigationBarTitle({
  254. title: this.title
  255. })
  256. }
  257. },
  258. methods: {
  259. //判断是否选择
  260. isEmpty(str) {
  261. return (!str || 0 === str.length);
  262. },
  263. showPhoto(index) {
  264. uni.previewImage({
  265. current: index,
  266. urls: this.imgArr,
  267. })
  268. },
  269. remove(index) {
  270. uni.showModal({
  271. title: '提示',
  272. content: '是否删除该图片或视频?',
  273. success: (res) => {
  274. if (res.confirm) {
  275. this.imgArr.splice(index, 1)
  276. console.log('this.imgarr', this.imgArr)
  277. if (this.imgArr.length <= 0) {
  278. this.photo = true;
  279. }
  280. }
  281. }
  282. })
  283. },
  284. choose() {
  285. let _this = this;
  286. uni.showActionSheet({
  287. title: '上传',
  288. itemList: ['图片', '视频'],
  289. success: (res) => {
  290. console.log(res)
  291. if (res.tapIndex == 0) {
  292. this.chooseimage()
  293. } else {
  294. this.choosevideo()
  295. }
  296. }
  297. })
  298. },
  299. chooseimage() {
  300. let _this = this;
  301. console.log('图片', _this.headers)
  302. uni.chooseImage({
  303. sizeType: ['album', 'camera'],
  304. success(resp) {
  305. resp.tempFiles.forEach((item, index) => {
  306. const task = uni.uploadFile({
  307. url: _this.$HTTP + `/obs`,
  308. filePath: item.path,
  309. name: 'file',
  310. formData: {},
  311. header: _this.headers,
  312. success: res => {
  313. // 判断是否json字符串,将其转为json格式
  314. console.log("结果", res)
  315. // let data = _this.$u.test.jsonString(res
  316. // .data) ? JSON.parse(res.data) : res.data;
  317. let data = JSON.parse(res.data);
  318. if (![200].includes(data.code)) {
  319. // this.uploadError(index, data);
  320. _this.$modal.msg(data.msg)
  321. } else {
  322. if (_this.progress === 100) {
  323. console.log('_this.progress', _this.progress)
  324. //console.log('data----', data)data
  325. console.log('res--', res)
  326. _this.imgArr.push(data.data.url)
  327. console.log('imgArr', _this.imgArr)
  328. _this.$modal.msg('上传成功!')
  329. _this.photo = false;
  330. }
  331. }
  332. },
  333. fail: e => {
  334. console.log(e)
  335. _this.$modal.msg('上传失败!')
  336. //_this.uploadError(index, e);
  337. },
  338. complete: res => {
  339. uni.hideLoading();
  340. _this.uploading = false;
  341. }
  342. });
  343. task.onProgressUpdate(res => {
  344. _this.progress = res.progress;
  345. console.log('onProgressUpdate', res)
  346. console.log('task.onProgressUpdate', _this.progress)
  347. uni.showLoading({
  348. title: '上传中'
  349. })
  350. if (_this.progress != 100) {
  351. _this.loading = false
  352. console.log('_this.loading false', _this.loading)
  353. } else {
  354. _this.loading = true
  355. console.log('_this.loading true', _this.loading)
  356. }
  357. });
  358. })
  359. },
  360. })
  361. },
  362. choosevideo() {
  363. let _this = this;
  364. console.log('视频')
  365. uni.chooseVideo({
  366. sourceType: ['album', 'camera'],
  367. maxDuration: 30,
  368. success(resp) {
  369. const task = uni.uploadFile({
  370. url: _this.$HTTP + `/obs`,
  371. filePath: resp.tempFilePath,
  372. name: 'file',
  373. formData: {},
  374. header: _this.headers,
  375. success: res => {
  376. // 判断是否json字符串,将其转为json格式
  377. let data = JSON.parse(res.data);
  378. if (![200].includes(res.statusCode)) {
  379. this.uploadError(index, data);
  380. } else {
  381. //上传成功
  382. if (_this.progress === 100) {
  383. console.log('_this.progress', _this.progress)
  384. _this.imgArr.push(data.data.url)
  385. console.log('imgArr', _this.imgArr)
  386. _this.$UTILS.showPrompt('上传成功!')
  387. _this.photo = false;
  388. }
  389. }
  390. },
  391. fail: e => {
  392. _this.$UTILS.showPrompt('上传失败!')
  393. this.uploadError(index, e);
  394. },
  395. complete: res => {
  396. uni.hideLoading();
  397. _this.uploading = false;
  398. }
  399. });
  400. task.onProgressUpdate(res => {
  401. _this.progress = res.progress;
  402. console.log('onProgressUpdate', res)
  403. uni.showLoading({
  404. title: '上传中'
  405. })
  406. if (_this.progress != 100) {
  407. _this.loading = false
  408. console.log('_this.loading false', _this.loading)
  409. } else {
  410. _this.loading = true
  411. console.log('_this.loading true', _this.loading)
  412. }
  413. });
  414. },
  415. })
  416. },
  417. pickerShow(e) {
  418. this.type = e; //赋值类型
  419. if (e == 'cz') { //材质
  420. this.open = true;
  421. getEnginMaterialQualityList("0").then(response => {
  422. console.log(response.data)
  423. this.selectList = response.data;
  424. });
  425. } else if (e == 'gg') { //规格
  426. if (this.isEmpty(this.materialValue.id)) {
  427. this.$modal.msg('请选择材质')
  428. } else {
  429. this.open = true;
  430. this.selectList = this.materialList;
  431. }
  432. } else if (e == 'fsdj') {
  433. //腐蚀等级
  434. this.openDict = true;
  435. //腐蚀等级
  436. getDicts("corrosion_level").then(response => {
  437. console.log(response)
  438. this.dictOptions = response.data;
  439. });
  440. } else if (e == 'gczq') { //工程周期
  441. this.openDict = true;
  442. getDicts("engin_cycle").then(response => {
  443. this.dictOptions = response.data;
  444. });
  445. } else if (e == 'xzq') { //行政区
  446. if (this.isEmpty(this.projectValue.dictValue)) {
  447. this.$modal.msg('请选择工程周期')
  448. } else {
  449. this.openDict = true;
  450. getDicts("district").then(response => {
  451. this.dictOptions = response.data;
  452. });
  453. }
  454. //this.selectList = this.dictOptions;
  455. } else if (e == 'xq') { //小区
  456. if (this.isEmpty(this.XZQValue.dictValue)) {
  457. this.$modal.msg('请选择行政区')
  458. } else {
  459. this.open = true;
  460. this.selectList = this.XQList;
  461. }
  462. } else if (e == 'ld') { //楼栋
  463. if (this.isEmpty(this.XQValue.id)) {
  464. this.$modal.msg('请选择小区')
  465. } else {
  466. this.open = true;
  467. this.selectList = this.LDList;
  468. }
  469. } else if (e == 'dy') { //单元
  470. if (this.isEmpty(this.LDValue.id)) {
  471. this.$modal.msg('请选择楼栋')
  472. } else {
  473. this.open = true;
  474. this.selectList = this.DYList;
  475. }
  476. } else if (e == 'fj') { //房间
  477. if (this.isEmpty(this.DYValue.id)) {
  478. this.$modal.msg('请选择单元')
  479. } else {
  480. this.open = true;
  481. this.selectList = this.FJList;
  482. }
  483. }
  484. },
  485. switchChange(e) {
  486. console.log('switch2 发生 change 事件,携带值为', e.detail.value)
  487. this.isCheck = e.detail.value;
  488. },
  489. changeSelectDict(item, index) {
  490. this.openDict = false;
  491. if (this.type == 'gczq') {
  492. this.projectValue = item
  493. } else if (this.type == 'xzq') {
  494. this.XZQValue = item;
  495. //根据行政区id获取小区数据
  496. this.XQValue = ''; //重置小区数据
  497. this.LDValue = ''; //重置楼栋数据
  498. this.DYValue = ''; //重置单元数据
  499. this.FJValue = ''; //重置房间数据
  500. getAreaList(item.dictValue).then(res => {
  501. this.XQList = res.data;
  502. })
  503. } else {
  504. this.LevelValue = item;
  505. }
  506. },
  507. changeSelect(item, index) {
  508. // this.index = index;
  509. // this.address = item.communityName;
  510. this.open = false;
  511. if (this.type == 'cz') {
  512. this.materialValue = item;
  513. this.specificationValue = ''; //重置规格
  514. //根据材质ID 获取规格数据
  515. console.log('材质id', item.id)
  516. getEnginSpecificationsList(item.id).then(res => {
  517. console.log("规格数据", res.data)
  518. this.materialList = res.data
  519. })
  520. } else if (this.type == 'gg') {
  521. this.specificationValue = item;
  522. } else if (this.type == 'xq') {
  523. this.XQValue = item;
  524. //根据小区id 获取楼栋数据
  525. this.LDValue = ''; //重置楼栋数据
  526. this.DYValue = ''; //重置单元数据
  527. this.FJValue = ''; //重置房间数据
  528. getBuildingList(item.id).then(res => {
  529. this.LDList = res.data
  530. // console.log("楼栋=", res)
  531. })
  532. } else if (this.type == 'ld') {
  533. this.LDValue = item;
  534. //根据楼栋ID 获取单元数据
  535. this.DYValue = ''; //重置单元数据
  536. this.FJValue = ''; //重置房间数据
  537. getUnitList(item.id).then(res => {
  538. this.DYList = res.data
  539. // console.log("单元=", res)
  540. })
  541. } else if (this.type == 'dy') {
  542. this.DYValue = item;
  543. //根据单元数据 获取房间数据
  544. this.FJValue = ''; //重置房间数据
  545. getHousesList(item.id).then(res => {
  546. this.FJList = res.data
  547. // console.log("房间=", res)
  548. })
  549. } else if (this.type == 'fj') {
  550. this.FJValue = item;
  551. }
  552. },
  553. //关闭弹窗
  554. close(e) {
  555. this.open = false
  556. },
  557. //关闭弹窗
  558. closeDict(e) {
  559. this.openDict = false
  560. },
  561. //提交数据
  562. submit() {
  563. if (this.isEmpty(this.projectValue.dictValue)) {
  564. this.$modal.msg("请选择工程周期")
  565. } else if (this.isEmpty(this.XZQValue.dictValue)) {
  566. this.$modal.msg("请选择行政区")
  567. } else if (this.isEmpty(this.XQValue.id)) {
  568. this.$modal.msg("请选择小区")
  569. } else if (this.isEmpty(this.LDValue.id)) {
  570. this.$modal.msg("请选择楼栋")
  571. } else if (this.isEmpty(this.DYValue.id)) {
  572. this.$modal.msg("请选择单元")
  573. } else if (this.isEmpty(this.FJValue.id)) {
  574. this.$modal.msg("请选择房间")
  575. } else if (this.isEmpty(this.LevelValue.dictValue)) {
  576. this.$modal.msg("请选择腐蚀等级")
  577. } else if (this.imgArr.length <= 0) {
  578. this.$modal.msg('请上传照片')
  579. } else if (this.loading == false) {
  580. this.$modal.msg('照片未上传完毕,无法提交!')
  581. } else {
  582. //提交
  583. let param = {
  584. district: this.XZQValue.dictValue,
  585. areaId: this.XQValue.id,
  586. buildingId: this.LDValue.id,
  587. unitId: this.DYValue.id,
  588. houseId: this.FJValue.id,
  589. enginType: this.objValue.enginType, //写死 上一页面传过来的
  590. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  591. enginCycle: this.projectValue.dictValue, //工程周期
  592. zEngineeringNodeBo: {
  593. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  594. zEngineeringInfoBo: {
  595. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  596. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  597. zEngineeringMaterialBo: [{
  598. corrosionLevel: this.LevelValue.dictValue
  599. }]
  600. }
  601. }
  602. }
  603. addTearOldPipe(param).then(res => {
  604. if (res.code == '200') {
  605. uni.navigateBack();
  606. uni.showToast({
  607. title: res.msg,
  608. icon: 'none',
  609. //显示持续时间为 1秒
  610. duration: 1000
  611. });
  612. }
  613. })
  614. }
  615. }
  616. }
  617. }
  618. </script>
  619. <style>
  620. .container {
  621. display: flex;
  622. margin-left: 10px;
  623. margin-top: 10px;
  624. margin-right: 10px;
  625. align-items: flex-start;
  626. justify-content: space-between;
  627. }
  628. .text {
  629. font-size: 16px;
  630. color: #333;
  631. }
  632. .background {
  633. border: 15px solid hsla(0, 0%, 100%, .5);
  634. background: white;
  635. background-clip: padding-box;
  636. /*从padding开始往外面裁剪背景*/
  637. }
  638. .btn {
  639. margin-top: 40px;
  640. margin-right: 20px;
  641. margin-bottom: 120px;
  642. margin-left: 20px;
  643. height: 45px;
  644. }
  645. .number {
  646. display: flex;
  647. /* 水平居中显示子元素 */
  648. align-items: flex-start;
  649. /* 垂直居中显示子元素 */
  650. justify-content: space-between;
  651. /* 左右间距等于间距大小 */
  652. padding: 10px;
  653. /* 设置padding以提高视觉效果 */
  654. }
  655. </style>