piping_record.vue 21 KB

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