edit.vue 22 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004
  1. <template>
  2. <view class="container">
  3. <view class="container-body">
  4. <!-- 问卷 -->
  5. <view class="listbox multiplebox" v-for="(item,index) in list" :key="index">
  6. <view class="listbox-titlebox">
  7. <text>{{index + 1}}.</text>
  8. <view class="listbox-titletag" v-if="item.type == 2">多选</view>
  9. <text class="listbox-title">{{item.name}}</text>
  10. </view>
  11. <!-- 多选 -->
  12. <view class="listbox-option" v-if="item.type == 2">
  13. <view v-for="(option,i) in item.question" :key="i" class="listbox-option-flex">
  14. <view
  15. @click="handleMultiple(item,index,option)"
  16. :class="item.value.indexOf(option.name) === -1 ? 'listbox-option-item' : 'listbox-option-item option-active'">
  17. {{option.name}}
  18. </view>
  19. <view class="otherinput" v-if="option.isWrite == 1 && item.value.indexOf(option.name) !== -1" @click="handleEdit(index,i)">
  20. {{option.writeVal || '请输入相关描述'}}
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 单选 -->
  25. <view style="margin-top: 20rpx;" v-if="item.type == 1">
  26. <view class="listbox-choose" v-for="(option,i) in item.question" :key="i" @click="handleChoose(item,option)" >
  27. <image class="choose-icon" v-if="item.value == option.name"
  28. src="@/static/image/healthRecords/choose_icon.png" mode="aspectFill"></image>
  29. <image class="choose-icon" v-if="item.value != option.name"
  30. src="@/static/image/healthRecords/choose_no_icon.png" mode="aspectFill"></image>
  31. <text style="flex-shrink: 0;">{{option.name}}</text>
  32. <view class="choose-input" v-if="option.isWrite == 1 && item.value == option.name" @click.stop="handleEdit(index,i)">
  33. {{option.writeVal || '请输入相关描述'}}
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 饮食调查 -->
  38. <view class="dietary-survey" v-if="item.type == 3">
  39. <view class="dietary-survey-item" v-for="(option,i) in item.question" :key="i"
  40. @click="handleChoose(item,option)">
  41. <view class="dietary-survey-iteml" v-if="option.name !== '每周多少次'">
  42. <view :class="item.value == option.name ? 'dietary-survey-active':''">{{i+1}}</view>
  43. <text>{{option.name}}</text>
  44. </view>
  45. <view class="dietary-survey-input" v-if="item.name == '平时应酬' && option.name === '每周多少次' && option.writeVal">
  46. 每周{{option.writeVal || '--'}}次
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <uni-popup ref="popup">
  53. <view class="popbox">
  54. <view class="popbox-title" v-if="list&&list.length>0">{{chooseIndex+1}}.{{list[chooseIndex].name}}</view>
  55. <view class="popbox-desc" v-if="list&&list.length>0">选项:{{list[chooseIndex].question[chooseItemIdx].name}}</view>
  56. <view class="uni-textarea-wrapper">
  57. <textarea class="textarea" placeholder-style="font-size: 28rpx;" :focus="focus" placeholder="请输入相关描述" :value="writeVal" @input="handleinput"/>
  58. <view class="popbox-confirm-btn" v-if="this.formType!='dietList' && this.formType!='sleepList'&&this.formType!='sportList'" @click="popSubmit">确认</view>
  59. </view>
  60. </view>
  61. </uni-popup>
  62. <!-- footer -->
  63. <view class="footer" v-if="this.formType!='dietList' && this.formType!='sleepList'&&this.formType!='sportList'">
  64. <button class="footer-btn" :loading="btnLoading" :disabled="btnLoading" @click="handelSubmit">确认</button>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. import {
  70. HealthData,
  71. healthHistoryTempList,
  72. editRecord,
  73. myRecord,
  74. HealthLife
  75. } from "@/api/healthRecords.js"
  76. export default {
  77. data() {
  78. return {
  79. focus: false,
  80. chooseIndex: 0,
  81. chooseItemIdx: 0,
  82. writeVal: "",
  83. btnLoading: false,
  84. id: undefined,
  85. formType: "",
  86. title: "",
  87. user: {},
  88. list: [],
  89. // 饮食调查
  90. dietList: [
  91. {
  92. name: "三餐规律",
  93. type: 3,
  94. value: "",
  95. question: [
  96. {
  97. name: "非常规律",
  98. value: 1,
  99. isWrite: 0,
  100. writeVal: ""
  101. },{
  102. name: "比较规律",
  103. value: 2,
  104. isWrite: 0,
  105. writeVal: ""
  106. },{
  107. name: "没有规律",
  108. value: 3,
  109. isWrite: 0,
  110. writeVal: ""
  111. }
  112. ],
  113. },{
  114. name: "就餐习惯",
  115. type: 3,
  116. value: "",
  117. question: [
  118. {
  119. name: "暴饮暴食",
  120. value: 1,
  121. isWrite: 0,
  122. writeVal: ""
  123. },{
  124. name: "压力大经常进食",
  125. value: 2,
  126. isWrite: 0,
  127. writeVal: ""
  128. },{
  129. name: "就外就餐多",
  130. value: 3,
  131. isWrite: 0,
  132. writeVal: ""
  133. },{
  134. name: "夜宵",
  135. value: 4,
  136. isWrite: 0,
  137. writeVal: ""
  138. },{
  139. name: "不吃早餐",
  140. value: 5,
  141. isWrite: 0,
  142. writeVal: ""
  143. }
  144. ],
  145. },{
  146. name: "进食速度",
  147. type: 3,
  148. value: "",
  149. question: [
  150. {
  151. name: "大约20-30分钟",
  152. value: 1,
  153. isWrite: 0,
  154. writeVal: ""
  155. },{
  156. name: "大约10-20分钟",
  157. value: 2,
  158. isWrite: 0,
  159. writeVal: ""
  160. },{
  161. name: "大约5-10分钟",
  162. value: 3,
  163. isWrite: 0,
  164. writeVal: ""
  165. }
  166. ],
  167. },{
  168. name: "酒类",
  169. type: 3,
  170. value: "",
  171. question: [
  172. {
  173. name: "从不喝酒",
  174. value: 1,
  175. isWrite: 0,
  176. writeVal: ""
  177. },{
  178. name: "每天",
  179. value: 2,
  180. isWrite: 0,
  181. writeVal: ""
  182. },{
  183. name: "大于3次/周",
  184. value: 3,
  185. isWrite: 0,
  186. writeVal: ""
  187. },{
  188. name: "小于3次/周",
  189. value: 4,
  190. isWrite: 0,
  191. writeVal: ""
  192. }
  193. ],
  194. },{
  195. name: "平时应酬",
  196. type: 3,
  197. value: "",
  198. question: [
  199. {
  200. name: "多",
  201. value: 1,
  202. isWrite: 0,
  203. writeVal: ""
  204. },{
  205. name: "一般",
  206. value: 2,
  207. isWrite: 0,
  208. writeVal: ""
  209. },{
  210. name: "少",
  211. value: 3,
  212. isWrite: 0,
  213. writeVal: ""
  214. },{
  215. name: "每周多少次",
  216. value: 3,
  217. isWrite: 1,
  218. writeVal: ""
  219. }
  220. ],
  221. },{
  222. name: "喝水量",
  223. type: 3,
  224. value: "",
  225. question: [
  226. {
  227. name: "低于1000ml",
  228. value: 1,
  229. isWrite: 0,
  230. writeVal: ""
  231. },{
  232. name: "1000ml-1500ml",
  233. value: 2,
  234. isWrite: 0,
  235. writeVal: ""
  236. },{
  237. name: "1500ml-1700ml",
  238. value: 3,
  239. isWrite: 0,
  240. writeVal: ""
  241. },{
  242. name: "1700ml以上",
  243. value: 4,
  244. isWrite: 0,
  245. writeVal: ""
  246. }
  247. ],
  248. },{
  249. name: "您每天吃的食物种类多吗?",
  250. type: 3,
  251. value: "",
  252. question: [
  253. {
  254. name: "种类非常多,12种以上",
  255. value: 1,
  256. isWrite: 0,
  257. writeVal: ""
  258. },{
  259. name: "一般6-10种",
  260. value: 2,
  261. isWrite: 0,
  262. writeVal: ""
  263. },{
  264. name: "种类较少3-5种",
  265. value: 3,
  266. isWrite: 0,
  267. writeVal: ""
  268. },{
  269. name: "种类比较固定",
  270. value: 4,
  271. isWrite: 0,
  272. writeVal: ""
  273. }
  274. ],
  275. },{
  276. name: "您是否有抽烟习惯?",
  277. type: 3,
  278. value: "",
  279. question: [
  280. {
  281. name: "是",
  282. value: 1,
  283. isWrite: 0,
  284. writeVal: ""
  285. },{
  286. name: "无",
  287. value: 2,
  288. isWrite: 0,
  289. writeVal: ""
  290. }
  291. ],
  292. },
  293. ],
  294. sleepList: [
  295. {
  296. name: "睡眠状况",
  297. type: 3,
  298. value: "",
  299. question: [
  300. {
  301. name: "很差",
  302. value: 1,
  303. isWrite: 0,
  304. writeVal: ""
  305. },{
  306. name: "差",
  307. value: 2,
  308. isWrite: 0,
  309. writeVal: ""
  310. },{
  311. name: "一般",
  312. value: 3,
  313. isWrite: 0,
  314. writeVal: ""
  315. },{
  316. name: "良好",
  317. value: 4,
  318. isWrite: 0,
  319. writeVal: ""
  320. }
  321. ],
  322. },{
  323. name: "睡眠时间",
  324. type: 3,
  325. value: "",
  326. question: [
  327. {
  328. name: "<6小时",
  329. value: 1,
  330. isWrite: 0,
  331. writeVal: ""
  332. },{
  333. name: "6-8小时",
  334. value: 2,
  335. isWrite: 0,
  336. writeVal: ""
  337. },{
  338. name: "9-10小时",
  339. value: 3,
  340. isWrite: 0,
  341. writeVal: ""
  342. },{
  343. name: ">10小时",
  344. value: 4,
  345. isWrite: 0,
  346. writeVal: ""
  347. }
  348. ],
  349. },{
  350. name: "经常熬夜吗?",
  351. type: 3,
  352. value: "",
  353. question: [
  354. {
  355. name: "经常",
  356. value: 1,
  357. isWrite: 0,
  358. writeVal: ""
  359. },{
  360. name: "偶尔",
  361. value: 2,
  362. isWrite: 0,
  363. writeVal: ""
  364. },{
  365. name: "很少",
  366. value: 3,
  367. isWrite: 0,
  368. writeVal: ""
  369. },{
  370. name: "无",
  371. value: 4,
  372. isWrite: 0,
  373. writeVal: ""
  374. }
  375. ],
  376. },
  377. ],
  378. sportList: [
  379. {
  380. name: "日常运动量",
  381. type: 3,
  382. value: "",
  383. question: [
  384. {
  385. name: "久坐不动",
  386. value: 1,
  387. isWrite: 0,
  388. writeVal: ""
  389. },{
  390. name: "轻度运动(3000-6000步)",
  391. value: 2,
  392. isWrite: 0,
  393. writeVal: ""
  394. },{
  395. name: "中度运动(6000-10000步)",
  396. value: 3,
  397. isWrite: 0,
  398. writeVal: ""
  399. },{
  400. name: "大量运动(一万步以上)",
  401. value: 4,
  402. isWrite: 0,
  403. writeVal: ""
  404. }
  405. ],
  406. },{
  407. name: "日常是否有运动?",
  408. type: 2,
  409. value: "",
  410. question: [
  411. {
  412. name: "无",
  413. value: 1,
  414. isWrite: 0,
  415. writeVal: ""
  416. },{
  417. name: "散步",
  418. value: 2,
  419. isWrite: 0,
  420. writeVal: ""
  421. },{
  422. name: "跑步",
  423. value: 3,
  424. isWrite: 0,
  425. writeVal: ""
  426. },{
  427. name: "自行车",
  428. value: 4,
  429. isWrite: 0,
  430. writeVal: ""
  431. },{
  432. name: "舞蹈或太极拳",
  433. value: 5,
  434. isWrite: 0,
  435. writeVal: ""
  436. },{
  437. name: "上下楼梯",
  438. value: 6,
  439. isWrite: 0,
  440. writeVal: ""
  441. },{
  442. name: "球类",
  443. value: 7,
  444. isWrite: 0,
  445. writeVal: ""
  446. },{
  447. name: "游泳",
  448. value: 8,
  449. isWrite: 0,
  450. writeVal: ""
  451. },{
  452. name: "其他",
  453. value: 9,
  454. isWrite: 1,
  455. writeVal: ""
  456. }
  457. ],
  458. },{
  459. name: "您平均每周锻炼次数?",
  460. type: 3,
  461. value: "",
  462. question: [
  463. {
  464. name: "≤2次",
  465. value: 1,
  466. isWrite: 0,
  467. writeVal: ""
  468. },{
  469. name: "3-5次",
  470. value: 2,
  471. isWrite: 0,
  472. writeVal: ""
  473. },{
  474. name: "≥5次",
  475. value: 3,
  476. isWrite: 0,
  477. writeVal: ""
  478. }
  479. ],
  480. },{
  481. name: "平均每次锻炼时间是多少分钟?",
  482. type: 3,
  483. value: "",
  484. question: [
  485. {
  486. name: "≤20",
  487. value: 1,
  488. isWrite: 0,
  489. writeVal: ""
  490. },{
  491. name: "20-40",
  492. value: 2,
  493. isWrite: 0,
  494. writeVal: ""
  495. },{
  496. name: "41-60",
  497. value: 3,
  498. isWrite: 0,
  499. writeVal: ""
  500. },{
  501. name: ">60",
  502. value: 3,
  503. isWrite: 0,
  504. writeVal: ""
  505. }
  506. ],
  507. }
  508. ]
  509. }
  510. },
  511. onLoad(option) {
  512. this.id = option.id
  513. this.formType = option.formType
  514. const formTypeOption = {
  515. "healthHistory": "填写疾病史",
  516. "symptomHistory": "填写症状史",
  517. "familyHistory": "填写家族史",
  518. "drugHistory": "填写用药史",
  519. "allergyHistory": "填写过敏史",
  520. "dietList": "饮食",
  521. "sleepList": "睡眠情况",
  522. "sportList": "运动",
  523. }
  524. this.title = formTypeOption[this.formType] || ""
  525. uni.setNavigationBarTitle({
  526. title: this.title || "",
  527. });
  528. },
  529. onShow() {
  530. this.user = {}
  531. if (!this.$isLogin()) {
  532. this.$showLoginPage();
  533. } else {
  534. this.user = this.$getUserInfo();
  535. if(this.formType=="dietList" || this.formType=="sleepList"||this.formType=="sportList") {
  536. //this.getHealthLife()
  537. } else {
  538. this.getMyRecord()
  539. }
  540. }
  541. },
  542. methods: {
  543. handleEdit(index,i) {
  544. this.chooseIndex = index
  545. this.chooseItemIdx = i
  546. this.focus = true
  547. this.writeVal = this.list[index].question[i].writeVal
  548. this.$refs.popup.open("bottom")
  549. },
  550. close() {
  551. this.focus = false
  552. this.$refs.popup.close()
  553. },
  554. // 输入
  555. handleinput(e) {
  556. this.writeVal = e.detail.value
  557. },
  558. popSubmit() {
  559. this.list[this.chooseIndex].question[this.chooseItemIdx].writeVal = this.writeVal
  560. this.close()
  561. },
  562. // 健康生活回显
  563. getHealthLife() {
  564. const param = {
  565. type: this.formType=="dietList" ? 1 : this.formType=="sleepList" ? 2 :this.formType=="sportList" ? 3 : undefined,
  566. userId: this.user.userId
  567. }
  568. HealthLife(param).then(res => {
  569. if (res.code == 200 && res.data) {
  570. this.list = JSON.parse(res.data.formJson)
  571. }
  572. },
  573. rej => {}
  574. )
  575. },
  576. // 健康档案回显
  577. getMyRecord() {
  578. myRecord().then(res => {
  579. if (res.code == 200 && res.data) {
  580. if(this.formType) {
  581. this.list = res.data[this.formType] ? JSON.parse(res.data[this.formType]) : []
  582. }
  583. }
  584. },
  585. rej => {}
  586. )
  587. },
  588. // 单选
  589. handleChoose(item,option) {
  590. if(this.formType=="dietList" || this.formType=="sleepList"||this.formType=="sportList") return
  591. if(item.name == '平时应酬' && option.name === '每周多少次') return
  592. item.value = option.name
  593. },
  594. // 多选
  595. handleMultiple(item, index, option) {
  596. if(this.formType=="dietList" || this.formType=="sleepList"||this.formType=="sportList") return
  597. const arry = item.value ? item.value.split(',') : []
  598. if (arry.indexOf(option.name) === -1) {
  599. arry.push(option.name)
  600. item.value = arry.join(',')
  601. } else {
  602. arry.splice(arry.indexOf(option.name), 1)
  603. item.value = arry.join(',')
  604. }
  605. },
  606. // 提交健康档案
  607. handelSubmit() {
  608. for (let i = 0; i < this.list.length; i++) {
  609. // 检查当前项的字段是否有值
  610. if (!this.list[i].value) {
  611. uni.showToast({
  612. title: "请检查健康档案是否填写完整",
  613. icon: "none"
  614. })
  615. return
  616. }
  617. }
  618. const arry = this.list.map((item, index) => ({
  619. id: index + 1,
  620. name: item.name,
  621. sort: item.sort,
  622. type: item.type,
  623. value: item.value,
  624. questionType: item.questionType,
  625. question: item.question.map(it=>({
  626. ...it,
  627. writeVal: item.value.indexOf(it.name) == -1 ? '' : it.writeVal // 清空没有选中的选项输入的文字
  628. }))
  629. }));
  630. if(this.formType!="dietList" && this.formType!="sleepList" && this.formType!="sportList") {
  631. this.editHealthForm(arry)
  632. }
  633. },
  634. // 修改健康史
  635. editHealthForm(arry) {
  636. const filterByQuestionType = (questionType) => arry.filter(item => item.questionType && item
  637. .questionType === questionType);
  638. const symptomHistory = filterByQuestionType("symptomHistory");
  639. const drugHistory = filterByQuestionType("drugHistory");
  640. const allergyHistory = filterByQuestionType("allergyHistory");
  641. const familyHistory = filterByQuestionType("familyHistory");
  642. const healthHistory = arry.filter(item => !item.questionType);
  643. const param = {
  644. id: Number(this.id || 0),
  645. symptomHistory: this.formType == "symptomHistory" ? JSON.stringify(symptomHistory) : undefined, // 症状史
  646. healthHistory: this.formType == "healthHistory" ? JSON.stringify(healthHistory) : undefined, // 健康史
  647. drugHistory: this.formType == "drugHistory" ? JSON.stringify(drugHistory) : undefined, // 用药史
  648. allergyHistory: this.formType == "allergyHistory" ? JSON.stringify(allergyHistory) : undefined, // 过敏史
  649. familyHistory: this.formType == "familyHistory" ? JSON.stringify(familyHistory) : undefined // 家族史
  650. };
  651. this.btnLoading = true
  652. editRecord(param).then(res => {
  653. this.btnLoading = false
  654. if (res.code == 200) {
  655. uni.showToast({
  656. title: "修改成功",
  657. icon: 'none',
  658. duration: 1000,
  659. });
  660. var timer = setTimeout(function() {
  661. uni.redirectTo({
  662. url: "/pages/healthRecords/index"
  663. });
  664. clearTimeout('timer')
  665. }, 1000)
  666. } else {
  667. uni.showToast({
  668. title: res.msg,
  669. icon: "none"
  670. })
  671. }
  672. },
  673. rej => {
  674. this.btnLoading = false
  675. }
  676. ).catch(()=>{
  677. this.btnLoading = false
  678. });
  679. }
  680. }
  681. }
  682. </script>
  683. <style scoped lang="scss">
  684. @mixin u-flex($flexD, $alignI, $justifyC) {
  685. display: flex;
  686. flex-direction: $flexD;
  687. align-items: $alignI;
  688. justify-content: $justifyC;
  689. }
  690. .container {
  691. position: relative;
  692. font-family: PingFang SC, PingFang SC;
  693. &-body {
  694. position: relative;
  695. padding: 32rpx 24rpx;
  696. padding-bottom: calc(var(--window-bottom) + 152rpx);
  697. }
  698. }
  699. .userbox {
  700. padding: 32rpx;
  701. margin-bottom: 20rpx;
  702. background: #FFFFFF;
  703. border-radius: 16rpx 16rpx 16rpx 16rpx;
  704. @include u-flex(row, center, space-between);
  705. overflow: hidden;
  706. .userbind {
  707. width: 100%;
  708. padding: 8rpx 0;
  709. font-weight: 400;
  710. font-size: 34rpx;
  711. color: #FF5C03;
  712. @include u-flex(row, center, center);
  713. image {
  714. width: 48rpx;
  715. height: 48rpx;
  716. margin-right: 16rpx;
  717. }
  718. }
  719. &-headimg {
  720. flex-shrink: 0;
  721. width: 140rpx;
  722. height: 140rpx;
  723. }
  724. &-left {
  725. flex-shrink: 0;
  726. flex: 1;
  727. @include u-flex(row, center, flex-start);
  728. }
  729. &-name {
  730. @include u-flex(row, center, flex-start);
  731. flex-wrap: wrap;
  732. gap: 0 30rpx;
  733. }
  734. &-idcard {
  735. font-weight: 500;
  736. font-size: 28rpx;
  737. }
  738. &-info {
  739. margin-left: 24rpx;
  740. font-weight: 600;
  741. font-size: 32rpx;
  742. color: #222222;
  743. &-tag {
  744. margin-top: 30rpx;
  745. font-weight: 400;
  746. font-size: 22rpx;
  747. color: #FF5C03;
  748. @include u-flex(row, center, flex-start);
  749. view {
  750. min-width: 62rpx;
  751. height: 42rpx;
  752. padding: 0 20rpx;
  753. box-sizing: border-box;
  754. background: #FCF0E7;
  755. border-radius: 24rpx 24rpx 24rpx 24rpx;
  756. text-align: center;
  757. line-height: 42rpx;
  758. margin-right: 14rpx;
  759. }
  760. }
  761. }
  762. }
  763. .listbox {
  764. padding: 32rpx 24rpx;
  765. margin-bottom: 20rpx;
  766. background: #FFFFFF;
  767. border-radius: 16rpx 16rpx 16rpx 16rpx;
  768. font-family: PingFang SC, PingFang SC;
  769. font-weight: 400;
  770. font-size: 28rpx;
  771. color: #222222;
  772. &-titlebox {
  773. font-weight: 600;
  774. font-size: 34rpx;
  775. white-space: normal;
  776. }
  777. &-titletag {
  778. min-width: 80rpx;
  779. height: 40rpx;
  780. padding: 0 16rpx;
  781. margin: 0 12rpx;
  782. flex-shrink: 0;
  783. box-sizing: border-box;
  784. line-height: 40rpx;
  785. text-align: center;
  786. background: #FF5C03;
  787. border-radius: 8rpx 8rpx 8rpx 8rpx;
  788. font-weight: 400;
  789. font-size: 24rpx;
  790. color: #FFFFFF;
  791. display: inline-block;
  792. }
  793. &-option {
  794. margin-top: 34rpx;
  795. @include u-flex(row, center, flex-start);
  796. flex-wrap: wrap;
  797. gap: 18rpx;
  798. &-flex {
  799. @include u-flex(row, center, flex-start);
  800. gap: 18rpx;
  801. }
  802. &-item {
  803. display: inline-flex;
  804. min-width: 206rpx;
  805. min-height: 72rpx;
  806. padding: 16rpx;
  807. box-sizing: border-box;
  808. border-radius: 16rpx 16rpx 16rpx 16rpx;
  809. border: 2rpx solid #ECECEC;
  810. align-items: center;
  811. justify-content: center;
  812. }
  813. }
  814. .otherinput {
  815. width: 430rpx;
  816. height: 72rpx;
  817. overflow: hidden;
  818. padding: 16rpx 24rpx;
  819. box-sizing: border-box;
  820. background: #F5F7FA;
  821. border-radius: 16rpx 16rpx 16rpx 16rpx;
  822. font-weight: 400;
  823. font-size: 28rpx;
  824. color: #999999;
  825. justify-content: flex-start;
  826. overflow: hidden;
  827. white-space: nowrap;
  828. text-overflow: ellipsis;
  829. }
  830. .option-active {
  831. font-weight: 400;
  832. font-size: 28rpx;
  833. color: #FF5C03;
  834. background: #FCF0E7;
  835. border: 2rpx solid #FF5C03;
  836. }
  837. &-choose {
  838. @include u-flex(row, center, flex-start);
  839. min-height: 86rpx;
  840. image {
  841. flex-shrink: 0;
  842. width: 36rpx;
  843. height: 36rpx;
  844. margin-right: 18rpx;
  845. }
  846. }
  847. .choose-input {
  848. width: 430rpx;
  849. height: 72rpx;
  850. padding: 16rpx 24rpx;
  851. box-sizing: border-box;
  852. margin-left: 42rpx;
  853. background: #FFFFFF;
  854. border-radius: 16rpx 16rpx 16rpx 16rpx;
  855. border: 2rpx solid #ECECEC;
  856. display: inline-flex;
  857. align-items: center;
  858. justify-content: flex-start;
  859. font-weight: 400;
  860. font-size: 28rpx;
  861. color: #999999;
  862. overflow: hidden;
  863. white-space: nowrap;
  864. text-overflow: ellipsis;
  865. }
  866. .dietary-survey {
  867. @include u-flex(row, flex-start, flex-start);
  868. flex-wrap: wrap;
  869. gap: 18rpx;
  870. margin-top: 36rpx;
  871. }
  872. .dietary-survey-iteml {
  873. width: 206rpx;
  874. display: inline-flex;
  875. flex-direction: column;
  876. align-items: center;
  877. font-weight: 400;
  878. font-size: 32rpx;
  879. view {
  880. width: 206rpx;
  881. height: 90rpx;
  882. background: #F5F7FA;
  883. border-radius: 8rpx 8rpx 8rpx 8rpx;
  884. border: 2rpx solid #ECECEC;
  885. box-sizing: border-box;
  886. margin-bottom: 20rpx;
  887. text-align: center;
  888. line-height: 90rpx;
  889. }
  890. text {
  891. font-size: 24rpx;
  892. color: #757575;
  893. }
  894. }
  895. .dietary-survey-item {
  896. display: inline-flex;
  897. }
  898. .dietary-survey-input {
  899. width: 206rpx;
  900. height: 90rpx;
  901. }
  902. .dietary-survey-active {
  903. color: #fff !important;
  904. background: #FF5C03 !important;
  905. border: 2rpx solid #FF5C03 !important;
  906. }
  907. }
  908. .footer {
  909. width: 100%;
  910. height: 152rpx;
  911. padding: 20rpx 24rpx;
  912. box-sizing: border-box;
  913. background: #FFFFFF;
  914. box-shadow: 0rpx -6rpx 8rpx 0rpx rgba(114, 114, 114, 0.1);
  915. position: fixed;
  916. bottom: var(--window-bottom);
  917. left: 0;
  918. &-btn {
  919. height: 112rpx;
  920. background: #FF5C03;
  921. border-radius: 16rpx 16rpx 16rpx 16rpx;
  922. font-weight: 600;
  923. font-size: 34rpx;
  924. color: #FFFFFF;
  925. line-height: 112rpx;
  926. text-align: center;
  927. &::after {
  928. border: none;
  929. }
  930. }
  931. }
  932. .popbox {
  933. background: #fff;
  934. padding: 20rpx;
  935. font-family: PingFang SC, PingFang SC;
  936. color: #222222;
  937. font-weight: 400;
  938. font-size: 28rpx;
  939. &-title {
  940. font-weight: 600;
  941. font-size: 34rpx;
  942. }
  943. &-desc {
  944. margin: 20rpx 0;
  945. }
  946. .uni-textarea-wrapper {
  947. @include u-flex(row, flex-end, space-between);
  948. }
  949. .textarea {
  950. flex: 1;
  951. max-height: 146rpx;
  952. padding: 15rpx 24rpx;
  953. box-sizing: border-box;
  954. background: #FFFFFF;
  955. border-radius: 16rpx 16rpx 16rpx 16rpx;
  956. line-height: 36rpx;
  957. border: 2rpx solid #ECECEC;
  958. color: #222222;
  959. font-weight: 400;
  960. font-size: 28rpx;
  961. }
  962. .popbox-confirm-btn {
  963. flex-shrink: 0;
  964. width: 140rpx;
  965. height: 70rpx;
  966. margin-left: 10rpx;
  967. background: #FF5C03;
  968. border-radius: 16rpx;
  969. color: #fff;
  970. text-align: center;
  971. line-height: 70rpx;
  972. }
  973. }
  974. </style>