piping_record.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724
  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. this.historyList = res.data
  297. if (res.data.zEngineeringNodeBo != null) {
  298. this.showHistoryList();
  299. } else {
  300. this.$modal.msg("暂无历史信息")
  301. }
  302. })
  303. } else {
  304. this.$modal.msg("暂无工程信息")
  305. }
  306. } else {
  307. this.$modal.msg(res.msg)
  308. }
  309. })
  310. },
  311. showHistoryList() {
  312. this.$refs.refShare.handleShowShare();
  313. },
  314. submit() {
  315. if (this.isEmpty(this.projectValue.dictValue)) {
  316. this.$modal.msg("请选择工程周期")
  317. } else if (this.isEmpty(this.XZQValue.dictValue)) {
  318. this.$modal.msg("请选择行政区")
  319. } else if (this.isEmpty(this.XQValue.id)) {
  320. this.$modal.msg("请选择小区")
  321. } else if (this.isEmpty(this.LDValue.id)) {
  322. this.$modal.msg("请选择楼栋")
  323. }else if (this.imgArr.length <= 0) {
  324. this.$modal.msg("请上传照片")
  325. } else {
  326. let param = {
  327. district: this.XZQValue.dictValue,
  328. areaId: this.XQValue.id,
  329. buildingId: this.LDValue.id,
  330. unitId: this.DYValue.id,
  331. enginType: this.objValue.enginType, //写死 上一页面传过来的
  332. enginClassification: this.objValue
  333. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  334. enginCycle: this.projectValue.dictValue, //工程周期
  335. zEngineeringNodeBo: {
  336. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  337. zEngineeringInfoBo: {
  338. constructTime: this.time,
  339. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  340. }
  341. }
  342. }
  343. addTearOldPipe(param).then(res => {
  344. if (res.code == '200') {
  345. uni.showToast({
  346. title: res.msg,
  347. icon: 'none',
  348. //显示持续时间为 3秒
  349. duration: 2000
  350. });
  351. setTimeout(function() {
  352. uni.navigateBack();
  353. }, 1000)
  354. }
  355. })
  356. //提交接口执行逻辑
  357. }
  358. },
  359. // 显示历史弹窗
  360. handleShowSheet() {
  361. this.shareState = true;
  362. },
  363. // 隐藏历史弹窗
  364. handleHiddenShare() {
  365. this.shareState = false;
  366. },
  367. showPhoto(index) {
  368. uni.previewImage({
  369. current: index,
  370. urls: this.imgArr,
  371. })
  372. },
  373. remove(index) {
  374. uni.showModal({
  375. title: '提示',
  376. content: '是否删除该图片或视频?',
  377. success: (res) => {
  378. if (res.confirm) {
  379. this.imgArr.splice(index, 1)
  380. if (this.imgArr.length <= 0) {
  381. this.photo = true;
  382. }
  383. }
  384. }
  385. })
  386. },
  387. choose() {
  388. let _this = this;
  389. uni.showActionSheet({
  390. title: '上传',
  391. itemList: ['图片', '视频'],
  392. success: (res) => {
  393. if (res.tapIndex == 0) {
  394. this.chooseimage()
  395. } else {
  396. this.choosevideo()
  397. }
  398. }
  399. })
  400. },
  401. chooseimage() {
  402. let _this = this;
  403. uni.chooseImage({
  404. sizeType: ['album', 'camera'],
  405. success(resp) {
  406. resp.tempFiles.forEach((item, index) => {
  407. const task = uni.uploadFile({
  408. url: _this.$HTTP + `/obs`,
  409. filePath: item.path,
  410. name: 'file',
  411. formData: {},
  412. header: _this.headers,
  413. success: res => {
  414. // 判断是否json字符串,将其转为json格式
  415. let data = JSON.parse(res.data);
  416. if (![200].includes(data.code)) {
  417. _this.$modal.msg(data.msg)
  418. } else {
  419. if (_this.progress === 100) {
  420. _this.imgArr.push(data.data.url)
  421. _this.$modal.msg('上传成功!')
  422. _this.photo = false;
  423. }
  424. }
  425. },
  426. fail: e => {
  427. _this.$modal.msg('上传失败!')
  428. },
  429. complete: res => {
  430. uni.hideLoading();
  431. _this.uploading = false;
  432. }
  433. });
  434. task.onProgressUpdate(res => {
  435. _this.progress = res.progress;
  436. uni.showLoading({
  437. title: '上传中'
  438. })
  439. if (_this.progress != 100) {
  440. _this.loading = false
  441. } else {
  442. _this.loading = true
  443. }
  444. });
  445. })
  446. },
  447. })
  448. },
  449. choosevideo() {
  450. let _this = this;
  451. uni.chooseVideo({
  452. sourceType: ['album', 'camera'],
  453. maxDuration: 30,
  454. success(resp) {
  455. const task = uni.uploadFile({
  456. url: _this.$HTTP + `/obs`,
  457. filePath: resp.tempFilePath,
  458. name: 'file',
  459. formData: {},
  460. header: _this.headers,
  461. success: res => {
  462. // 判断是否json字符串,将其转为json格式
  463. let data = JSON.parse(res.data);
  464. if (![200].includes(res.statusCode)) {
  465. this.uploadError(index, data);
  466. } else {
  467. //上传成功
  468. if (_this.progress === 100) {
  469. _this.imgArr.push(data.data.url)
  470. _this.$modal.msg('上传成功!')
  471. _this.photo = false;
  472. }
  473. }
  474. },
  475. fail: e => {
  476. _this.$modal.msg('上传失败!')
  477. this.uploadError(index, e);
  478. },
  479. complete: res => {
  480. uni.hideLoading();
  481. _this.uploading = false;
  482. }
  483. });
  484. task.onProgressUpdate(res => {
  485. _this.progress = res.progress;
  486. uni.showLoading({
  487. title: '上传中'
  488. })
  489. if (_this.progress != 100) {
  490. _this.loading = false
  491. } else {
  492. _this.loading = true
  493. }
  494. });
  495. },
  496. })
  497. },
  498. pickerShow(e) {
  499. this.type = e; //赋值类型
  500. if (e == 'xzq') { //行政区
  501. if (this.isEmpty(this.projectValue.dictValue)) {
  502. this.$modal.msg('请选择工程周期')
  503. } else {
  504. this.openDict = true;
  505. getDicts("district").then(response => {
  506. this.dictOptions = response.data;
  507. });
  508. }
  509. } else if (e == 'xq') { //小区
  510. if (this.isEmpty(this.XZQValue.dictValue)) {
  511. this.$modal.msg('请选择行政区')
  512. } else {
  513. this.open = true;
  514. this.selectList = this.XQList;
  515. }
  516. } else if (e == 'ld') { //楼栋
  517. if (this.isEmpty(this.XQValue.id)) {
  518. this.$modal.msg('请选择小区')
  519. } else {
  520. this.open = true;
  521. this.selectList = this.LDList;
  522. }
  523. } else if (e == 'dy') { //单元
  524. if (this.isEmpty(this.LDValue.id)) {
  525. this.$modal.msg('请选择楼栋')
  526. } else {
  527. this.open = true;
  528. this.selectList = this.DYList;
  529. }
  530. } else if (e == 'fj') { //房间
  531. if (this.isEmpty(this.DYValue.id)) {
  532. this.$modal.msg('请选择单元')
  533. } else {
  534. this.open = true;
  535. this.selectList = this.FJList;
  536. }
  537. }
  538. },
  539. changeSelectDict(item, index) {
  540. this.openDict = false;
  541. if (this.type == 'xzq') {
  542. this.XZQValue = item;
  543. //根据行政区id获取小区数据
  544. this.XQValue = ''; //重置小区数据
  545. this.LDValue = ''; //重置楼栋数据
  546. this.DYValue = ''; //重置单元数据
  547. getAreaList(item.dictValue).then(res => {
  548. this.XQList = res.data;
  549. })
  550. }
  551. },
  552. changeSelect(item, index) {
  553. this.open = false;
  554. if (this.type == 'xq') {
  555. this.XQValue = item;
  556. //根据小区id 获取楼栋数据
  557. this.LDValue = ''; //重置楼栋数据
  558. this.DYValue = ''; //重置单元数据
  559. getBuildingList(item.id).then(res => {
  560. this.LDList = res.data
  561. })
  562. } else if (this.type == 'ld') {
  563. this.LDValue = item;
  564. //根据楼栋ID 获取单元数据
  565. this.DYValue = ''; //重置单元数据
  566. if (!this.isEmpty(this.projectValue.dictValue)) {
  567. //选完 判断 工程周期
  568. this.getStatus();
  569. }
  570. getUnitList(item.id).then(res => {
  571. this.DYList = res.data
  572. })
  573. } else if (this.type == 'dy') {
  574. this.DYValue = item;
  575. if (!this.isEmpty(this.projectValue.dictValue)) {
  576. //选完 判断 工程周期
  577. this.getStatus();
  578. }
  579. }
  580. },
  581. //关闭弹窗
  582. close(e) {
  583. this.open = false
  584. },
  585. //关闭弹窗
  586. closeDict(e) {
  587. this.openDict = false
  588. },
  589. }
  590. }
  591. </script>
  592. <style lang="scss">
  593. .container {
  594. display: flex;
  595. align-items: center;
  596. justify-content: space-between;
  597. padding: 10px;
  598. position: relative;
  599. }
  600. .uni-list {
  601. border: 1xp solid #eee;
  602. }
  603. .to-right-icon {
  604. width: 15px;
  605. height: 15px;
  606. position: absolute;
  607. top: 50%;
  608. transform: translateY(-50%);
  609. }
  610. .text {
  611. font-size: 16px;
  612. color: #333;
  613. }
  614. .background {
  615. // border: 15px solid hsla(0, 0%, 100%, .5);
  616. background: white;
  617. background-clip: padding-box;
  618. padding: 20rpx;
  619. border-radius: 20rpx;
  620. margin: 20rpx;
  621. /*从padding开始往外面裁剪背景*/
  622. }
  623. .btn {
  624. width: 715rpx;
  625. height: 69rpx;
  626. background: #79A4F0;
  627. border-radius: 6rpx;
  628. font-size: 25rpx;
  629. font-family: Microsoft YaHei;
  630. font-weight: 400;
  631. color: #FFFFFF;
  632. line-height: 69rpx;
  633. margin-top: 40rpx;
  634. margin-bottom: 100rpx;
  635. }
  636. .number {
  637. display: flex;
  638. /* 水平居中显示子元素 */
  639. align-items: flex-start;
  640. /* 垂直居中显示子元素 */
  641. justify-content: space-between;
  642. /* 左右间距等于间距大小 */
  643. padding: 10px;
  644. /* 设置padding以提高视觉效果 */
  645. }
  646. .textarea {
  647. margin-top: 10upx;
  648. width: 100%;
  649. border: 1rpx solid red;
  650. min-height: 100upx;
  651. line-height: 20px;
  652. }
  653. </style>