satisfactionQuestions.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502
  1. <template>
  2. <view class="container">
  3. <scroll-view
  4. class="scroll_view"
  5. scroll-y
  6. scroll-with-animation
  7. scroll-anchoring
  8. :scroll-into-view="point"
  9. >
  10. <view class="top_bg_box">
  11. <image mode="widthFix" :src="icon.satisfaction.ques_top_bg"></image>
  12. <view class="ques_introduce displayFlexCol">
  13. <text>{{ quesList.SubjectTitle }}</text>
  14. <text>{{ quesList.Remark }}</text>
  15. </view>
  16. </view>
  17. <view class="main_box">
  18. <view class="mask_form" v-if="complete"></view>
  19. <block v-for="(item, index) in quesList.QuestionList" :key="index">
  20. <view
  21. class="ques_item_box"
  22. :id="'p' + index"
  23. v-if="!isQuestionHidden(item)"
  24. :class="item.QuestType == 'SubTitle' ? 'sub_title' : ''"
  25. >
  26. <view class="ques_title_box">
  27. <text class="mustQuest_tag" v-if="item.MustQuest">*</text>
  28. <text v-if="item.QuestType != 'SubTitle'">{{ item.Sort }}.{{ item.Question }}</text>
  29. <text v-if="item.QuestType == 'SubTitle'">{{ item.Num }}、{{ item.Question }}</text>
  30. </view>
  31. <!-- 大标题满意度 -->
  32. <view
  33. class="ques_options displayFlexCol"
  34. v-if="item.QuestType == 'SubTitle' && item.HasScaleInSubtitle"
  35. >
  36. <block
  37. v-for="(childItem, childIndex) in subtitleSatisfactionOptions"
  38. :key="`SubTitleSatisfaction-${index}-${childIndex}`"
  39. >
  40. <text
  41. class="choice_item"
  42. :class="
  43. isSubtitleSatisfactionActive(item.SubTitleIndex, childIndex) ? 'active_option' : ''
  44. "
  45. :data-subtitleindex="item.SubTitleIndex"
  46. :data-childindex="childIndex"
  47. @click="choiceSubtitleSatisfaction"
  48. >
  49. {{ childItem }}
  50. </text>
  51. </block>
  52. </view>
  53. <!-- 填空题 -->
  54. <view
  55. class="ques_options align_items_left displayFlexCol"
  56. v-if="item.QuestType == 'Input'"
  57. >
  58. <text class="input_label">{{ item.Question }}:</text>
  59. <view class="textarea_box">
  60. <textarea
  61. auto-height
  62. :data-index="index"
  63. :placeholder="'最多输入' + item.RuleInfo.MaxLength + '个字'"
  64. :maxlength="item.RuleInfo.MaxLength"
  65. :value="item.AnswerList"
  66. @blur="setVal"
  67. />
  68. </view>
  69. </view>
  70. <!-- 矩阵填空题 -->
  71. <view
  72. class="ques_options align_items_left displayFlexCol"
  73. v-if="item.QuestType == 'MatrixInput'"
  74. >
  75. <block
  76. v-for="(childItem, childIndex) in item.MatrixQuestionList"
  77. :key="`MatrixInput-${index}-${childIndex}`"
  78. >
  79. <view class="matrix_input_box margin_bottom_10 displayFlexRow">
  80. <text>{{ childItem.Question }}:</text>
  81. <view class="textarea_box matrix_textarea_box">
  82. <textarea
  83. auto-height
  84. :data-index="index"
  85. :data-childindex="childIndex"
  86. :placeholder="'最多输入' + childItem.RuleInfo.MaxLength + '个字'"
  87. :maxlength="childItem.RuleInfo.MaxLength"
  88. :value="childItem.AnswerList"
  89. @input="setVal"
  90. />
  91. </view>
  92. </view>
  93. </block>
  94. </view>
  95. <!-- 单选/多选题 -->
  96. <view
  97. class="ques_options displayFlexCol"
  98. v-if="item.QuestType == 'Radio' || item.QuestType == 'Checkbox'"
  99. >
  100. <block
  101. v-for="(childItem, childIndex) in item.QuestionItemList"
  102. :key="`Checkbox-${index}-${childIndex}`"
  103. >
  104. <text
  105. class="choice_item"
  106. :class="fn.answer(item, childItem.ItemId) ? 'active_option' : ''"
  107. :data-index="index"
  108. :data-childindex="childIndex"
  109. @click="choiceOption"
  110. >
  111. {{ childItem.ItemName }}
  112. </text>
  113. </block>
  114. </view>
  115. <!-- 选择题 -->
  116. <view class="ques_options displayFlexCol" v-if="item.QuestType == 'Select'">
  117. <picker
  118. class="picker_box"
  119. range-key="ItemName"
  120. :range="item.QuestionItemList"
  121. :data-index="index"
  122. :value="item.AnswerList"
  123. @change="bindPickerChange"
  124. >
  125. <view class="picker displayFlexRow">
  126. <text>{{ item.QuestionItemList[item.AnswerList].ItemName }}</text>
  127. <image :src="icon.satisfaction.right" mode="" />
  128. </view>
  129. </picker>
  130. </view>
  131. <!-- 矩阵单选题/矩阵多选题/矩阵量表 -->
  132. <view
  133. class="ques_options matrix_border displayFlexCol"
  134. v-if="
  135. item.QuestType == 'MatrixRadio' ||
  136. item.QuestType == 'MatrixCheckbox' ||
  137. item.QuestType == 'MatrixScale'
  138. "
  139. >
  140. <view class="matrix_options matrix_options_title displayFlexRow">
  141. <block
  142. v-for="(childItem, childIndex) in item.MatrixQuestionList[0].QuestionItemList"
  143. :key="`${item.QuestType}0-${index}-${childIndex}`"
  144. >
  145. <text
  146. :style="{
  147. width: fn.getWidth(item.MatrixQuestionList[0].QuestionItemList.length) + '%',
  148. }"
  149. >
  150. {{ childItem.ItemName }}
  151. </text>
  152. </block>
  153. </view>
  154. <block
  155. v-for="(childItem, childIndex) in item.MatrixQuestionList"
  156. :key="`${item.QuestType}-${index}-${childIndex}`"
  157. >
  158. <view class="matrix_icon_box displayFlexCol">
  159. <text
  160. :style="{
  161. width: fn.getWidth(item.MatrixQuestionList[0].QuestionItemList.length) + '%',
  162. }"
  163. >{{ childItem.Question }}</text
  164. >
  165. <view class="matrix_options displayFlexBetween">
  166. <block
  167. v-for="(sunItem, sunIndex) in childItem.QuestionItemList"
  168. :key="`${item.QuestType}-${index}-${childIndex}-${sunIndex}`"
  169. >
  170. <view
  171. class="displayFlexRow"
  172. :data-index="index"
  173. :data-childindex="childIndex"
  174. :data-sunindex="sunIndex"
  175. @click="choiceMatrixOption"
  176. >
  177. <!-- 矩阵单选/矩阵量表 -->
  178. <image
  179. :src="
  180. fn.answer(childItem, sunItem.ItemId)
  181. ? icon.satisfaction.circle_active
  182. : icon.satisfaction.circle
  183. "
  184. mode=""
  185. v-if="item.QuestType == 'MatrixRadio' || item.QuestType == 'MatrixScale'"
  186. />
  187. <!-- 矩阵多选 -->
  188. <image
  189. :src="
  190. fn.answer(childItem, sunItem.ItemId)
  191. ? icon.satisfaction.checkBox_circle_active
  192. : icon.satisfaction.checkBox_circle
  193. "
  194. mode=""
  195. v-if="item.QuestType == 'MatrixCheckbox'"
  196. />
  197. </view>
  198. </block>
  199. </view>
  200. </view>
  201. </block>
  202. </view>
  203. <!-- 上传文件题 -->
  204. <view class="ques_options displayFlexCol" v-if="item.QuestType == 'UploadImage'">
  205. <view class="img_list displayFlexRow">
  206. <image
  207. class="add_img"
  208. mode=""
  209. :src="icon.satisfaction.add"
  210. :data-index="index"
  211. @click="choiceFile"
  212. />
  213. <block
  214. v-for="(imgItem, imgIndex) in item.AnswerList"
  215. :key="`UploadImage-${index}-${imgIndex}`"
  216. >
  217. <view class="add_img">
  218. <image class="item_img" :src="imgItem" mode="" />
  219. <image
  220. class="cha_img"
  221. :src="icon.satisfaction.cha_green"
  222. mode=""
  223. :data-index="index"
  224. :data-imgitem="imgItem"
  225. @click="closeImg"
  226. />
  227. </view>
  228. </block>
  229. </view>
  230. <view class="add_img_tips p_flexStart">
  231. <text>限制:</text>
  232. <text> 仅支持图片上传、</text>
  233. <text>
  234. 大小不超过{{ item.RuleInfo.FileSize }}M数量不超过{{ item.RuleInfo.FileCount }}个
  235. </text>
  236. </view>
  237. </view>
  238. <!-- 量表题 -->
  239. <view class="ques_options displayFlexRow" v-if="item.QuestType == 'Scale'">
  240. <block
  241. v-for="(childItem, childIndex) in item.QuestionItemList"
  242. :key="`Scale-${index}-${childIndex}`"
  243. >
  244. <view
  245. class="options_item_box displayFlexCol"
  246. :data-index="index"
  247. :data-childindex="childIndex"
  248. @click="choiceOption"
  249. >
  250. <text>{{ childItem.ItemName }}</text>
  251. <image
  252. :src="
  253. fn.answer(item, childItem.ItemId)
  254. ? icon.satisfaction.circle_active
  255. : icon.satisfaction.circle
  256. "
  257. mode=""
  258. />
  259. </view>
  260. </block>
  261. </view>
  262. </view>
  263. </block>
  264. </view>
  265. </scroll-view>
  266. <!-- <view class="yjfl" @click="yjfk">
  267. <image :src="icon.satisfaction.yjfk" alt="" style="width: 140rpx; height: 140rpx" />
  268. <view class="title"> 意见反馈 </view>
  269. </view> -->
  270. <view class="footer_box displayFlexRow">
  271. <text :class="complete ? 'backgroundCustom_D9' : ''" @click="submit">提交</text>
  272. </view>
  273. <!-- 是否实名弹窗 -->
  274. <view class="modal_wrap" v-if="showModal_Anonymous">
  275. <view class="modal_box">
  276. <view class="modal_tit">是否实名填写</view>
  277. <view class="modal_con">
  278. <view class="modal_box_b1" @click="isAnonymous(1)">实名填写</view>
  279. <view class="modal_box_b1" @click="isAnonymous(2)">匿名填写</view>
  280. </view>
  281. </view>
  282. </view>
  283. <!-- 是否实名弹窗 -->
  284. <view class="modal_wrap" v-if="showModal_User">
  285. <view class="modal_box">
  286. <view class="modal_tit">请选择答卷人</view>
  287. <view class="modal_con">
  288. <view class="modal_user_item" v-if="currentUser.memberName" @click="goSelMember">
  289. <view>
  290. <view>
  291. <text class="modal_t1">{{ currentUser.memberName }}</text>
  292. <text class="modal_t2">
  293. {{ currentUser.sex == 1 ? '男' : currentUser.sex == 2 ? '女' : '未知' }} |
  294. {{ currentUser.age }}岁
  295. </text>
  296. </view>
  297. <view class="modal_t3">{{ currentUser.mobile }}</view>
  298. </view>
  299. <image class="modal_user_right_img" :src="icon.satisfaction.right"></image>
  300. </view>
  301. <view class="modal_user_item" v-else @click="goSelMember">
  302. <view>点击选择答卷人</view>
  303. <image class="modal_user_right_img" :src="icon.satisfaction.right"></image>
  304. </view>
  305. <view class="modal_btn_wrap displayFlexBetween" v-if="currentUser.memberName">
  306. <view class="modal_btn modal_btn1" @click="goBack">取消</view>
  307. <view class="modal_btn modal_btn2" @click="confirmMember">确定</view>
  308. </view>
  309. </view>
  310. </view>
  311. </view>
  312. </view>
  313. </template>
  314. <script lang="ts" setup>
  315. import { reactive, ref } from 'vue';
  316. import { useOnLoad } from '@/hook';
  317. import { useDomain } from '@kasite/uni-app-base';
  318. import { mapGetters } from '@kasite/uni-app-base/store/hook';
  319. import {
  320. QuerySubjectListToChannelTask_V3,
  321. QuerySubjectInfoById_V3,
  322. UploadZxFile,
  323. CommitAnswer_V3,
  324. QuerySample_V3,
  325. QueryMemberByCard_V3,
  326. } from '../../service';
  327. import icon from '@/utils/icon';
  328. import { common, throttle } from '@/utils';
  329. import fn from './fn';
  330. const app = getApp();
  331. let time = null;
  332. const currentUser = ref({} as any);
  333. const taskId = ref('');
  334. const objType = ref('3'); // 3门诊 4住院
  335. const quesList = ref({} as any);
  336. const imgList = ref([]);
  337. const point = ref('');
  338. const complete = ref(false);
  339. const subtitleSatisfactionOptions = ['非常满意', '比较满意', '一般', '不太满意', '很不满意'];
  340. const subtitleSatisfaction = reactive({} as Record<string, number | null>);
  341. const anonymousType = ref(0);
  342. const showModal_Anonymous = ref(false); // 是否实名填写弹窗显示
  343. const showModal_User = ref(false); // 实名用户选择弹窗显示
  344. let quesAnswers = reactive({
  345. MemberId: '',
  346. TaskId: '-1',
  347. SysAppId: 'visit',
  348. SubjectId: '',
  349. UserAgent: '',
  350. IP: '',
  351. Location: '',
  352. Mobile: '',
  353. UserName: '',
  354. Sex: '',
  355. Age: '',
  356. IdCard: '',
  357. ThirdPartyId: '',
  358. AnswerUseTime: 0,
  359. PushDept: '',
  360. PushDeptName: '',
  361. BedNo: '',
  362. HospitalNo: '',
  363. CardNo: '',
  364. AnswerList: [],
  365. });
  366. let queryPatient = reactive({
  367. cardNo: '',
  368. cardType: ''
  369. });
  370. const getAgeByBirthDate = (birthDate = '') => {
  371. const birth = `${birthDate}`.replace(/-/g, '');
  372. if (!/^\d{8}$/.test(birth)) return '';
  373. const year = Number(birth.slice(0, 4));
  374. const month = Number(birth.slice(4, 6));
  375. const day = Number(birth.slice(6, 8));
  376. const today = new Date();
  377. let age = today.getFullYear() - year;
  378. if (today.getMonth() + 1 < month || (today.getMonth() + 1 === month && today.getDate() < day)) {
  379. age--;
  380. }
  381. return age >= 0 ? `${age}` : '';
  382. };
  383. const { getCurrentUser } = mapGetters({
  384. getCurrentUser: 'getCurrentUser',
  385. });
  386. const main = async (options) => {
  387. currentUser.value = getCurrentUser();
  388. const params = {
  389. SubjectId: options.subjectId,
  390. TaskId: options.taskId,
  391. };
  392. const resp = await QuerySubjectListToChannelTask_V3(params);
  393. if (!common.isEmpty(resp)) {
  394. objType.value = resp[0].GroupType;
  395. //匿名有3种传参 ""(空) "true" "false" 转换字符串为布尔值
  396. let anonymous =
  397. resp[0].Anonymous === 'false'
  398. ? false
  399. : resp[0].Anonymous === 'true'
  400. ? true
  401. : resp[0].Anonymous || '';
  402. // type 1实名 2:匿名 3自行选择
  403. anonymousType.value = anonymous === '' ? 3 : anonymous === false ? 1 : 2;
  404. showModal_Anonymous.value = anonymous == 3 ? true : false;
  405. taskId.value = options.taskId;
  406. quesAnswers.SubjectId = options.subjectId;
  407. //如果不是执行选择直接调用对应填写按钮
  408. if (anonymous != 3) {
  409. isAnonymous(anonymousType.value);
  410. }
  411. await querySubjectInfoById_V3();
  412. // 查询样本和答案
  413. // await querySample_V3();
  414. // 开始计算答卷时间
  415. getSec();
  416. if(options?.type == "sms_myddc") {
  417. currentUser.value.cardNo = options.cardNo
  418. currentUser.value.cardType = options.cardType
  419. showModal_Anonymous.value = false
  420. showModal_User.value = false
  421. }
  422. } else {
  423. common.showModal('该任务已失效', () => {
  424. common.goToUrl(`/pages/business/tabbar/homePage/homePage`, { skipWay: 'reLaunch' });
  425. });
  426. return;
  427. }
  428. };
  429. /** 实名/匿名 */
  430. const isAnonymous = (type) => {
  431. //实名
  432. if (type == 1) {
  433. showModal_Anonymous.value = false;
  434. showModal_User.value = true;
  435. }
  436. //匿名
  437. else {
  438. // currentUser.value = {};
  439. showModal_Anonymous.value = false;
  440. }
  441. };
  442. /** 问卷详情 */
  443. const querySubjectInfoById_V3 = async () => {
  444. const resp = await QuerySubjectInfoById_V3({
  445. SubjectId: quesAnswers.SubjectId,
  446. });
  447. if (common.isNotEmpty(resp)) {
  448. if (resp[0].Status != 0) {
  449. common.showModal('该问卷已失效', () => {
  450. common.navigateBack(1);
  451. });
  452. return;
  453. }
  454. if (resp[0].State != 1) {
  455. common.showModal('该问卷未发布', () => {
  456. common.navigateBack(1);
  457. });
  458. return;
  459. }
  460. // 提交答案数据模版
  461. quesAnswers.PushDept = resp[0].DeptId;
  462. quesAnswers.PushDeptName = resp[0].PushDeptName;
  463. resp[0].QuestionList.forEach((item, index) => {
  464. item.AnswerList = [];
  465. item.MustQuest = item.MustQuest == 'false' ? false : true;
  466. item.RuleInfo = item.RuleInfo != '' ? JSON.parse(item.RuleInfo) : '';
  467. // 多选框
  468. if (item.QuestType == 'Select') {
  469. item.AnswerList = 0;
  470. }
  471. if (common.isNotEmpty(item.MatrixQuestionList)) {
  472. item.MatrixQuestionList.forEach((childItem) => {
  473. childItem.AnswerList = [];
  474. childItem.RuleInfo = childItem.RuleInfo != '' ? JSON.parse(childItem.RuleInfo) : '';
  475. // 答案列表模版
  476. let answerItem = {
  477. Answer: [],
  478. Blank: index,
  479. QuestId: childItem.QuestId,
  480. QuestType: item.QuestType,
  481. MustQuest: item.MustQuest,
  482. };
  483. quesAnswers.AnswerList.push(answerItem);
  484. if (common.isNotEmpty(childItem.QuestionItemList)) {
  485. childItem.QuestionItemList.forEach((sunItem) => {
  486. sunItem.Check = false;
  487. });
  488. }
  489. });
  490. } else {
  491. // 答案列表模版
  492. let answerItem = {
  493. Answer: [],
  494. Blank: index,
  495. QuestId: item.QuestId,
  496. QuestType: item.QuestType,
  497. MustQuest: item.MustQuest,
  498. };
  499. quesAnswers.AnswerList.push(answerItem);
  500. }
  501. });
  502. resp[0].QuestionList = bySort(resp[0].QuestionList);
  503. quesList.value = resp[0];
  504. }
  505. };
  506. /** 查询样本和答案 */
  507. const querySample_V3 = async () => {
  508. const resp = await QuerySample_V3({
  509. SubjectId: quesAnswers.SubjectId,
  510. IsGetAnswer: true,
  511. ThirdPartyId: currentUser.MemberId,
  512. State: 1
  513. });
  514. if (common.isNotEmpty(resp)) {
  515. quesList.value.QuestionList.forEach((item) => {
  516. resp[0].AnswerList.forEach((childItem) => {
  517. if(item.QuestId == childItem.QuestId) {
  518. if(item.QuestType == "Input") {
  519. item.AnswerList = childItem.Answer
  520. }
  521. if(item.QuestType == "UploadImage") {
  522. item.AnswerList = childItem.Answer.split(",")
  523. }
  524. if(common.isNotEmpty(item.QuestionItemList)) {
  525. if(item.QuestType == "Select"){
  526. item.QuestionItemList.forEach((sunItem,sunIndex) => {
  527. if(sunItem.ItemId == childItem.Answer) {
  528. item.AnswerList = sunIndex
  529. }
  530. })
  531. }else {
  532. item.AnswerList = childItem.Answer.split(",")
  533. }
  534. }
  535. }
  536. if(common.isNotEmpty(item.MatrixQuestionList)) {
  537. item.MatrixQuestionList.forEach((sunItem) => {
  538. if(sunItem.QuestId == childItem.QuestId) {
  539. if(sunItem.QuestType == "MatrixInput") {
  540. sunItem.AnswerList = childItem.Answer
  541. }
  542. if(sunItem.QuestType == "MatrixCheckbox" || sunItem.QuestType == "MatrixRadio" || sunItem.QuestType == "MatrixScale") {
  543. sunItem.AnswerList = childItem.Answer.split(",")
  544. }
  545. }
  546. })
  547. }
  548. })
  549. })
  550. complete.value = true;
  551. }
  552. }
  553. /** 计算答题时间 */
  554. const getSec = () => {
  555. time = setTimeout(() => {
  556. let answerUseTime = quesAnswers.AnswerUseTime;
  557. answerUseTime++;
  558. quesAnswers.AnswerUseTime = answerUseTime;
  559. getSec();
  560. }, 1000);
  561. };
  562. /** 根据子标题排序 */
  563. const bySort = (list: any[]) => {
  564. let find = 0;
  565. let sort = 0;
  566. let currentSubTitleIndex = -1;
  567. let currentSubTitleItem = null as any;
  568. let item = {} as any;
  569. for (var t = 0; t < list.length; t++) {
  570. item = list[t];
  571. //子标题
  572. if (item.QuestType == 'SubTitle') {
  573. //将子标题底下的题目从1开始排
  574. sort = 0;
  575. //判断是出现的第几个子标题
  576. //num是子标题的排序
  577. item.SubTitleIndex = find;
  578. item.HasScaleInSubtitle = false;
  579. currentSubTitleIndex = find;
  580. currentSubTitleItem = item;
  581. item.Num = toChinesNum(find + 1);
  582. find++;
  583. } else {
  584. //sort是子标题底下的排序
  585. item.SubTitleIndex = currentSubTitleIndex;
  586. item.Sort = sort + 1;
  587. sort++;
  588. if (item.QuestType == 'Scale' && currentSubTitleItem) {
  589. currentSubTitleItem.HasScaleInSubtitle = true;
  590. }
  591. }
  592. item.SortNum = t;
  593. if (common.isNotEmpty(item.QuestionItemList)) {
  594. item.QuestionItemList.forEach((childItem, childIndex) => {
  595. childItem.SortNum = childIndex;
  596. if (common.isNotEmpty(childItem.QuestionItem)) {
  597. childItem.QuestionItem.forEach((sunItem, sunIndex) => {
  598. sunItem.SortNum = sunIndex;
  599. });
  600. }
  601. });
  602. }
  603. }
  604. return list;
  605. };
  606. /** 汉字顺序 */
  607. const toChinesNum = (num) => {
  608. var changeNum = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'],
  609. newNum = '',
  610. arr = num.toString().split('');
  611. arr[0] = parseInt(arr[0]) - 1;
  612. if (arr[0] == -1 && arr.length == 1) {
  613. return '零';
  614. }
  615. if (arr.length > 1) {
  616. arr[1] = parseInt(arr[1]) - 1;
  617. if (!arr[0]) {
  618. newNum = !arr[0] && arr[1] == -1 ? changeNum[9] : changeNum[9] + changeNum[arr[1]];
  619. } else {
  620. newNum = changeNum[arr[0]] + changeNum[9] + (changeNum[arr[1]] ? changeNum[arr[1]] : '');
  621. }
  622. } else {
  623. newNum = changeNum[arr[0]];
  624. }
  625. return newNum;
  626. };
  627. /** 单选/多选/量表 */
  628. const isSubtitleScaleExpanded = (subtitleIndex) => {
  629. return Number(subtitleSatisfaction[subtitleIndex]) > 0;
  630. };
  631. const isSubtitleSatisfactionActive = (subtitleIndex, childIndex) => {
  632. return Number(subtitleSatisfaction[subtitleIndex]) === Number(childIndex);
  633. };
  634. const isQuestionHidden = (item) => {
  635. return item?.QuestType == 'Scale' && item.SubTitleIndex > -1 && !isSubtitleScaleExpanded(item.SubTitleIndex);
  636. };
  637. const getAnswerIndex = (answerList, questId) => {
  638. let answerIndex = -1;
  639. answerList.forEach((item, index) => {
  640. if (item.QuestId == questId) {
  641. answerIndex = index;
  642. }
  643. });
  644. return answerIndex;
  645. };
  646. const setSingleQuestionAnswer = (question, answerList, childIndex) => {
  647. if (!question?.QuestionItemList?.[childIndex]) return;
  648. const answerIndex = getAnswerIndex(answerList, question.QuestId);
  649. const answer = question.QuestionItemList[childIndex].ItemId;
  650. question.AnswerList = [answer];
  651. if (answerIndex > -1) {
  652. answerList[answerIndex].Answer = answer;
  653. }
  654. };
  655. const choiceSubtitleSatisfaction = (e) => {
  656. const subtitleIndex = Number(e.currentTarget.dataset.subtitleindex);
  657. const childIndex = Number(e.currentTarget.dataset.childindex);
  658. const questionList = quesList.value.QuestionList;
  659. const answerList = quesAnswers.AnswerList;
  660. subtitleSatisfaction[subtitleIndex] = childIndex;
  661. if (childIndex == 0) {
  662. questionList.forEach((item) => {
  663. if (item.SubTitleIndex == subtitleIndex && item.QuestType == 'Scale') {
  664. setSingleQuestionAnswer(item, answerList, 0);
  665. }
  666. });
  667. }
  668. quesList.value.QuestionList = questionList;
  669. quesAnswers.AnswerList = answerList;
  670. };
  671. const choiceOption = (e) => {
  672. let index = e.currentTarget.dataset.index;
  673. let childIndex = e.currentTarget.dataset.childindex;
  674. let answerIndex = 0;
  675. let questionList = quesList.value.QuestionList;
  676. let answerList = quesAnswers.AnswerList;
  677. answerList.forEach((itm, ind) => {
  678. if (itm.QuestId == questionList[index].QuestId) {
  679. answerIndex = ind;
  680. }
  681. });
  682. // 单选/量表
  683. if (questionList[index].QuestType == 'Radio' || questionList[index].QuestType == 'Scale') {
  684. if (
  685. questionList[index].AnswerList[0] != questionList[index].QuestionItemList[childIndex].ItemId
  686. ) {
  687. questionList[index].AnswerList = [];
  688. questionList[index].AnswerList.push(questionList[index].QuestionItemList[childIndex].ItemId);
  689. }
  690. answerList[answerIndex].Answer = questionList[index].QuestionItemList[childIndex].ItemId;
  691. }
  692. // 多选
  693. else if (questionList[index].QuestType == 'Checkbox') {
  694. let flag = false;
  695. questionList[index].AnswerList.forEach((item) => {
  696. if (item == questionList[index].QuestionItemList[childIndex].ItemId) {
  697. flag = true;
  698. }
  699. });
  700. if (flag) {
  701. questionList[index].AnswerList = questionList[index].AnswerList.filter((item) => {
  702. return item != questionList[index].QuestionItemList[childIndex].ItemId;
  703. });
  704. answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((fiItem) => {
  705. return fiItem != questionList[index].QuestionItemList[childIndex].ItemId;
  706. });
  707. } else {
  708. if (questionList[index].RuleInfo.MaxLength < questionList[index].AnswerList.length + 1) {
  709. common.showModal('最多选择' + questionList[index].RuleInfo.MaxLength + '项');
  710. return;
  711. }
  712. questionList[index].AnswerList.push(questionList[index].QuestionItemList[childIndex].ItemId);
  713. answerList[answerIndex].Answer.push(questionList[index].QuestionItemList[childIndex].ItemId);
  714. }
  715. }
  716. quesList.value.QuestionList = questionList;
  717. quesAnswers.AnswerList = answerList;
  718. };
  719. /** 选择题 */
  720. const bindPickerChange = (e) => {
  721. let index = e.currentTarget.dataset.index;
  722. let val = e.detail.value;
  723. let questionList = quesList.value.QuestionList;
  724. let answerList = quesAnswers.AnswerList;
  725. let answerIndex = 0;
  726. answerList.forEach((itm, ind) => {
  727. if (itm.QuestId == questionList[index].QuestId) {
  728. answerIndex = ind;
  729. }
  730. });
  731. questionList[index].AnswerList = val;
  732. answerList[answerIndex].Answer = questionList[index].QuestionItemList[val].ItemId;
  733. quesList.value.QuestionList = questionList;
  734. quesAnswers.AnswerList = answerList;
  735. };
  736. /** 矩阵单选 */
  737. const choiceMatrixOption = (e) => {
  738. let index = e.currentTarget.dataset.index;
  739. let childIndex = e.currentTarget.dataset.childindex;
  740. let sunIndex = e.currentTarget.dataset.sunindex;
  741. let questionList = quesList.value.QuestionList;
  742. let answerList = quesAnswers.AnswerList;
  743. let answerIndex = 0;
  744. answerList.forEach((itm, ind) => {
  745. if (itm.QuestId == questionList[index].MatrixQuestionList[childIndex].QuestId) {
  746. answerIndex = ind;
  747. }
  748. });
  749. // 矩阵单选/矩阵量表
  750. if (
  751. questionList[index].QuestType == 'MatrixRadio' ||
  752. questionList[index].QuestType == 'MatrixScale'
  753. ) {
  754. if (
  755. questionList[index].MatrixQuestionList[childIndex].AnswerList[0] !=
  756. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  757. ) {
  758. questionList[index].MatrixQuestionList[childIndex].AnswerList = [];
  759. questionList[index].MatrixQuestionList[childIndex].AnswerList.push(
  760. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  761. );
  762. }
  763. answerList[answerIndex].Answer =
  764. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId;
  765. }
  766. // 矩阵多选
  767. else if (questionList[index].QuestType == 'MatrixCheckbox') {
  768. let flag = false;
  769. questionList[index].MatrixQuestionList[childIndex].AnswerList.forEach((item) => {
  770. if (
  771. item == questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  772. ) {
  773. flag = true;
  774. }
  775. });
  776. if (flag) {
  777. questionList[index].MatrixQuestionList[childIndex].AnswerList = questionList[
  778. index
  779. ].MatrixQuestionList[childIndex].AnswerList.filter((item) => {
  780. return (
  781. item !=
  782. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  783. );
  784. });
  785. answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((fiItem) => {
  786. return (
  787. fiItem !=
  788. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  789. );
  790. });
  791. } else {
  792. questionList[index].MatrixQuestionList[childIndex].AnswerList.push(
  793. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  794. );
  795. answerList[answerIndex].Answer.push(
  796. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  797. );
  798. }
  799. }
  800. quesList.value.QuestionList = questionList;
  801. quesAnswers.AnswerList = answerList;
  802. };
  803. /** 选择文件 */
  804. const choiceFile = (e) => {
  805. let index = e.currentTarget.dataset.index;
  806. let questionList = quesList.value.QuestionList;
  807. let answerList = quesAnswers.AnswerList;
  808. let answerIndex = 0;
  809. answerList.forEach((itm, ind) => {
  810. if (itm.QuestId == questionList[index].QuestId) {
  811. answerIndex = ind;
  812. }
  813. });
  814. if (answerList[answerIndex].Answer.length >= questionList[index].RuleInfo.FileCount) {
  815. common.showModal('最多上传' + questionList[index].RuleInfo.FileCount + '张图片');
  816. return;
  817. }
  818. uni.chooseImage({
  819. count: questionList[index].RuleInfo.FileCount,
  820. sourceType: ['album', 'camera'],
  821. sizeType: ['compressed'],
  822. async success(res) {
  823. uni.showLoading({
  824. title: '上传中。。。',
  825. });
  826. for (var i = 0; i < res.tempFiles.length; i++) {
  827. let m = 1024 * 1024;
  828. if (res.tempFiles[i].size < m) {
  829. let imgUrl = (await uploadFile(
  830. res.tempFilePaths[i],
  831. questionList[index].RuleInfo.FileCount,
  832. answerList[answerIndex].Answer
  833. )) as string;
  834. if (common.isNotEmpty(imgUrl)) {
  835. imgUrl =
  836. imgUrl.indexOf('http') > -1 ? imgUrl : `${useDomain()}/${imgUrl.replace(/\\/g, '/')}`;
  837. answerList[answerIndex].Answer.push(imgUrl);
  838. questionList[index].AnswerList = answerList[answerIndex].Answer;
  839. quesList.value.QuestionList = questionList;
  840. quesAnswers.AnswerList = answerList;
  841. if (res.tempFiles.length - 1 == i) {
  842. uni.hideLoading();
  843. }
  844. }
  845. } else {
  846. uni.hideLoading();
  847. common.showModal('文件不得大于' + questionList[index].RuleInfo.FileSize + 'M');
  848. return;
  849. }
  850. }
  851. },
  852. });
  853. };
  854. /** 上传文件 */
  855. const uploadFile = (imgItem, fileCount, imgList) => {
  856. return new Promise((resolve, reject) => {
  857. if (imgList.length >= fileCount) {
  858. uni.hideLoading();
  859. common.showModal('最多上传' + fileCount + '张图片');
  860. return;
  861. }
  862. // 将图片上传至服务器
  863. uni.uploadFile({
  864. url: UploadZxFile,
  865. filePath: imgItem,
  866. name: 'newsFile',
  867. formData: {
  868. user: 'test',
  869. },
  870. header: {
  871. token: uni.getStorageSync('token'),
  872. },
  873. data: {},
  874. success(res) {
  875. const data = JSON.parse(res.data);
  876. if (data.RespCode == '10000') {
  877. resolve(data.url);
  878. } else {
  879. common.showModal(data.msg);
  880. }
  881. }
  882. });
  883. });
  884. };
  885. /** 删除图片 */
  886. const closeImg = (e) => {
  887. let index = e.currentTarget.dataset.index;
  888. let imgItem = e.currentTarget.dataset.imgitem;
  889. let questionList = quesList.value.QuestionList;
  890. let answerList = quesAnswers.AnswerList;
  891. let answerIndex = 0;
  892. answerList.forEach((itm, ind) => {
  893. if (itm.QuestId == questionList[index].QuestId) {
  894. answerIndex = ind;
  895. }
  896. });
  897. answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((item) => {
  898. return item != imgItem;
  899. });
  900. questionList[index].AnswerList = answerList[answerIndex].Answer;
  901. quesList.value.QuestionList = questionList;
  902. quesAnswers.AnswerList = answerList;
  903. };
  904. /** 获取input值 */
  905. const setVal = (e) => {
  906. let index = e.currentTarget.dataset.index;
  907. let childIndex = e.currentTarget.dataset.childindex;
  908. let questionList = quesList.value.QuestionList;
  909. let answerList = quesAnswers.AnswerList;
  910. let answerIndex = 0;
  911. // 矩阵填空题
  912. if (questionList[index].QuestType == 'MatrixInput') {
  913. if (
  914. questionList[index].MatrixQuestionList[childIndex].AnswerList.length ==
  915. questionList[index].MatrixQuestionList[childIndex].RuleInfo.MaxLength
  916. ) {
  917. common.showToast(
  918. '最多输入' + questionList[index].MatrixQuestionList[childIndex].RuleInfo.MaxLength + '个字'
  919. );
  920. return;
  921. }
  922. answerList.forEach((itm, ind) => {
  923. if (itm.QuestId == questionList[index].MatrixQuestionList[childIndex].QuestId) {
  924. answerIndex = ind;
  925. }
  926. });
  927. questionList[index].MatrixQuestionList[childIndex].AnswerList = e.detail.value;
  928. }
  929. // 填空题
  930. else {
  931. if (questionList[index].RuleInfo.DataType != '无') {
  932. let dataTypeOptions = questionList[index].RuleInfo.DataTypeOptions;
  933. for (var i = 0; i < dataTypeOptions.length; i++) {
  934. if (questionList[index].RuleInfo.DataType == dataTypeOptions[i].Value) {
  935. const regRule = dataTypeOptions[i].Rule;
  936. let reg = null;
  937. if (regRule.startsWith('/') && regRule.endsWith('/')) {
  938. reg = new RegExp(regRule.slice(1, -1));
  939. } else {
  940. reg = new RegExp(regRule);
  941. }
  942. if (!reg.test(e.detail.value)) {
  943. common.showModal('请输入' + dataTypeOptions[i].Text);
  944. questionList[index].AnswerList = '';
  945. answerList[answerIndex].Answer = '';
  946. this.setData({
  947. 'quesList.QuestionList': questionList,
  948. 'quesAnswers.AnswerList': answerList,
  949. });
  950. return;
  951. }
  952. }
  953. }
  954. }
  955. if (questionList[index].AnswerList.length == questionList[index].RuleInfo.MaxLength) {
  956. common.showToast('最多输入' + questionList[index].RuleInfo.MaxLength + '个字');
  957. return;
  958. }
  959. answerList.forEach((itm, ind) => {
  960. if (itm.QuestId == questionList[index].QuestId) {
  961. answerIndex = ind;
  962. }
  963. });
  964. questionList[index].AnswerList = e.detail.value;
  965. }
  966. answerList[answerIndex].Answer = e.detail.value;
  967. quesList.value.QuestionList = questionList;
  968. quesAnswers.AnswerList = answerList;
  969. };
  970. /** 提交 */
  971. const validateSubtitleSatisfaction = () => {
  972. const questionList = quesList.value.QuestionList || [];
  973. for (var i = 0; i < questionList.length; i++) {
  974. const item = questionList[i];
  975. if (
  976. item.QuestType == 'SubTitle' &&
  977. item.HasScaleInSubtitle &&
  978. subtitleSatisfaction[item.SubTitleIndex] == null
  979. ) {
  980. common.showToast('存在未填写的问卷');
  981. point.value = 'p' + i;
  982. return false;
  983. }
  984. }
  985. return true;
  986. };
  987. const submit = () => {
  988. throttle(async () => {
  989. await common.sleep(1000);
  990. if (complete.value) return;
  991. if (!validateSubtitleSatisfaction()) return;
  992. uni.showLoading();
  993. const answers = { ...quesAnswers } as any;
  994. for (var i = 0; i < answers.AnswerList.length; i++) {
  995. let item = answers.AnswerList[i];
  996. if (item.MustQuest && common.isEmpty(item.Answer)) {
  997. common.showToast('存在未填写的问卷');
  998. point.value = 'p' + item.Blank;
  999. return;
  1000. }
  1001. }
  1002. answers.AnswerList.forEach((item) => {
  1003. if (typeof item.Answer == 'object') {
  1004. item.Answer = item.Answer.join();
  1005. }
  1006. });
  1007. const cardNo = currentUser.value?.cardNo ?? '';
  1008. const cardType = currentUser.value?.cardType ?? '';
  1009. let mobile = currentUser.value?.mobile ?? '';
  1010. let memberName = currentUser.value?.memberName ?? '';
  1011. let sex = currentUser.value?.sex ?? '';
  1012. let age = currentUser.value?.age ?? '';
  1013. let idCard = currentUser.value?.idCard ?? currentUser.value?.certNum ?? '';
  1014. let memberId = currentUser.value?.MemberId ?? currentUser.value?.memberId ?? currentUser.value?.cardNo ?? '';
  1015. queryPatient.cardNo = cardNo;
  1016. queryPatient.cardType = cardType;
  1017. let patientInfoRes = await QueryMemberByCard_V3(queryPatient);
  1018. let patientInfo = patientInfoRes.resData;
  1019. if (!patientInfo) {
  1020. uni.hideLoading();
  1021. return;
  1022. }
  1023. if (patientInfo.RespCode === '10000' && patientInfo.Data && patientInfo.Data.length > 0) {
  1024. const patient = patientInfo.Data[0];
  1025. mobile = patient.mobile || mobile;
  1026. memberName = patient.memberName || memberName;
  1027. sex = patient.sex || sex;
  1028. age = currentUser.value?.age || getAgeByBirthDate(patient.birthDate);
  1029. idCard = patient.certNum || idCard;
  1030. memberId = patient.hisMemberId || patient.memberId || memberId;
  1031. }
  1032. answers.AnswerList = JSON.stringify(quesAnswers.AnswerList);
  1033. // quesAnswers.IP = (await getIP()).cip;
  1034. // quesAnswers.Location = (await getIP()).cname;
  1035. quesAnswers.UserAgent = app.globalData.smallPro_systemInfo;
  1036. quesAnswers.Mobile = mobile;
  1037. quesAnswers.UserName = memberName;
  1038. quesAnswers.MemberId = memberId;
  1039. quesAnswers.Sex = sex;
  1040. quesAnswers.Age = age;
  1041. quesAnswers.IdCard = idCard;
  1042. quesAnswers.ThirdPartyId = memberId || uni.getStorageSync('openid');
  1043. quesAnswers.BedNo = '';
  1044. quesAnswers.HospitalNo = objType.value == '4' ? cardNo : '';
  1045. quesAnswers.CardNo = objType.value == '3' ? cardNo : '';
  1046. quesAnswers.TaskId = taskId.value;
  1047. quesAnswers.CardType = objType.value == '3' ? cardType : '';
  1048. let res = await CommitAnswer_V3(quesAnswers);
  1049. clearTimeout(time);
  1050. if (common.isNotEmpty(res)) {
  1051. common.showModal('提交成功!', () => {
  1052. common.navigateBack(1);
  1053. });
  1054. }
  1055. }, 5 * 1000);
  1056. };
  1057. /** 获取IP */
  1058. const getIP = () => {
  1059. return new Promise((resolve, reject) => {
  1060. uni.request({
  1061. url: 'https://pv.sohu.com/cityjson?ie=utf-8',
  1062. success: (res: any) => {
  1063. const result = res.data.substring(res.data.indexOf('{'), res.data.lastIndexOf('}') + 1);
  1064. const obj = JSON.parse(result);
  1065. resolve(obj);
  1066. },
  1067. });
  1068. }) as Promise<any>;
  1069. };
  1070. const goBack = () => {
  1071. uni.navigateBack({
  1072. delta: 1,
  1073. });
  1074. };
  1075. const yjfk = () => {};
  1076. const goSelMember = () => {};
  1077. const confirmMember = () => {};
  1078. useOnLoad((options) => {
  1079. main(options);
  1080. });
  1081. </script>
  1082. <style lang="scss" scoped>
  1083. .align_items_left {
  1084. align-items: flex-start;
  1085. }
  1086. .active_option {
  1087. background: #18ba89 !important;
  1088. color: white !important;
  1089. }
  1090. .mask_form {
  1091. width: 100%;
  1092. height: 100%;
  1093. position: absolute;
  1094. top: 0;
  1095. left: 0;
  1096. z-index: 100;
  1097. }
  1098. .container {
  1099. overflow: hidden;
  1100. }
  1101. .scroll_view {
  1102. height: 100%;
  1103. }
  1104. .top_bg_box {
  1105. position: relative;
  1106. image {
  1107. width: 100%;
  1108. height: 456rpx;
  1109. position: absolute;
  1110. top: 0;
  1111. left: 0;
  1112. z-index: 1;
  1113. }
  1114. .ques_introduce {
  1115. padding: 46rpx 52rpx 0 52rpx;
  1116. box-sizing: border-box;
  1117. position: absolute;
  1118. top: 0;
  1119. left: 0;
  1120. z-index: 2;
  1121. text:nth-child(1) {
  1122. font-size: 36rpx;
  1123. font-weight: bold;
  1124. color: white;
  1125. margin-bottom: 20rpx;
  1126. }
  1127. text:nth-child(2) {
  1128. line-height: 45rpx;
  1129. font-size: 28rpx;
  1130. color: white;
  1131. }
  1132. }
  1133. }
  1134. .main_box {
  1135. padding: 470rpx 30rpx 190rpx 30rpx;
  1136. box-sizing: border-box;
  1137. position: relative;
  1138. z-index: 2;
  1139. }
  1140. .ques_item_box {
  1141. padding: 30rpx;
  1142. box-sizing: border-box;
  1143. background: white;
  1144. border-radius: 20rpx;
  1145. margin-bottom: 32rpx;
  1146. > .ques_title_box > text {
  1147. line-height: 50rpx;
  1148. font-size: 36rpx;
  1149. font-weight: bold;
  1150. color: #1c1c1c;
  1151. }
  1152. .mustQuest_tag {
  1153. color: #dc2828;
  1154. }
  1155. }
  1156. .ques_options {
  1157. margin-top: 34rpx;
  1158. }
  1159. .choice_item {
  1160. width: 100%;
  1161. line-height: 80rpx;
  1162. font-size: 30rpx;
  1163. color: #686868;
  1164. text-align: center;
  1165. margin-bottom: 16rpx;
  1166. border-radius: 10rpx;
  1167. background: #f8f8fa;
  1168. &:last-child {
  1169. margin-bottom: 0;
  1170. }
  1171. }
  1172. .input_label {
  1173. line-height: 40rpx;
  1174. font-size: 32rpx;
  1175. color: #474747;
  1176. }
  1177. .textarea_box {
  1178. width: 100%;
  1179. padding: 20rpx;
  1180. box-sizing: border-box;
  1181. border-radius: 10rpx;
  1182. background: #f8f8fa;
  1183. margin-top: 22rpx;
  1184. textarea {
  1185. width: 100%;
  1186. }
  1187. }
  1188. .matrix_textarea_box {
  1189. width: 70%;
  1190. }
  1191. .picker_box {
  1192. width: 100%;
  1193. }
  1194. .picker {
  1195. width: 100%;
  1196. height: 80rpx;
  1197. padding: 22rpx;
  1198. box-sizing: border-box;
  1199. background: #f9f9f9;
  1200. border-radius: 20rpx;
  1201. justify-content: space-between;
  1202. text {
  1203. white-space: nowrap;
  1204. font-size: 28rpx;
  1205. color: #686868;
  1206. }
  1207. image {
  1208. width: 12rpx;
  1209. height: 24rpx;
  1210. }
  1211. }
  1212. .matrix_options {
  1213. width: 100%;
  1214. margin-bottom: 34rpx;
  1215. justify-content: space-between;
  1216. text {
  1217. font-size: 30rpx;
  1218. color: #1c1c1c;
  1219. text-align: center;
  1220. padding: 20rpx;
  1221. box-sizing: border-box;
  1222. word-wrap: break-word;
  1223. word-break: break-all;
  1224. }
  1225. }
  1226. .matrix_border {
  1227. border: 1px solid #f0f0f0;
  1228. }
  1229. .matrix_options_title {
  1230. background: #f5f5f5;
  1231. }
  1232. .matrix_icon_box {
  1233. width: 100%;
  1234. align-items: flex-start;
  1235. text {
  1236. font-size: 30rpx;
  1237. color: #1c1c1c;
  1238. margin-bottom: 36rpx;
  1239. padding: 0 20rpx;
  1240. box-sizing: border-box;
  1241. }
  1242. image {
  1243. width: 40rpx;
  1244. height: 40rpx;
  1245. }
  1246. }
  1247. .sub_title {
  1248. background: none;
  1249. }
  1250. .img_list {
  1251. width: 100%;
  1252. margin-bottom: 24rpx;
  1253. justify-content: flex-start;
  1254. flex-wrap: wrap;
  1255. .item_img {
  1256. width: 100%;
  1257. height: 100%;
  1258. }
  1259. }
  1260. .add_img {
  1261. width: 32%;
  1262. height: 200rpx;
  1263. margin-right: 2%;
  1264. margin-bottom: 3%;
  1265. position: relative;
  1266. &:nth-child(3n) {
  1267. margin-right: 0;
  1268. }
  1269. }
  1270. .add_img_tips {
  1271. width: 100%;
  1272. text {
  1273. font-size: 30rpx;
  1274. color: #474747;
  1275. }
  1276. }
  1277. .cha_img {
  1278. width: 50rpx;
  1279. height: 50rpx;
  1280. position: absolute;
  1281. top: -15rpx;
  1282. right: -5rpx;
  1283. }
  1284. .options_item_box {
  1285. width: 100%;
  1286. padding: 0 10rpx;
  1287. box-sizing: border-box;
  1288. margin-bottom: 20rpx;
  1289. justify-content: space-between;
  1290. text {
  1291. font-size: 28rpx;
  1292. color: #686868;
  1293. word-wrap: break-word;
  1294. word-break: break-all;
  1295. }
  1296. image {
  1297. width: 40rpx;
  1298. height: 40rpx;
  1299. margin: 20rpx 0;
  1300. }
  1301. }
  1302. .matrix_input_box {
  1303. width: 100%;
  1304. text {
  1305. width: 30%;
  1306. white-space: nowrap;
  1307. }
  1308. input {
  1309. width: 70%;
  1310. }
  1311. }
  1312. .footer_box {
  1313. width: 100%;
  1314. padding: 30rpx 30rpx 60rpx 30rpx;
  1315. box-sizing: border-box;
  1316. background: white;
  1317. position: fixed;
  1318. bottom: 0;
  1319. left: 0;
  1320. z-index: 10;
  1321. text {
  1322. width: 100%;
  1323. line-height: 88rpx;
  1324. font-size: 36rpx;
  1325. color: white;
  1326. text-align: center;
  1327. border-radius: 88rpx;
  1328. background: #18ba89;
  1329. display: block;
  1330. }
  1331. }
  1332. .modal_wrap {
  1333. width: 100%;
  1334. height: 100%;
  1335. background-color: rgba(0, 0, 0, 0.6);
  1336. position: fixed;
  1337. left: 0;
  1338. top: 0;
  1339. z-index: 99;
  1340. display: flex;
  1341. align-items: center;
  1342. justify-content: center;
  1343. }
  1344. .modal_box {
  1345. width: 600rpx;
  1346. max-height: 600rpx;
  1347. background-color: #fff;
  1348. border-radius: 5px;
  1349. padding: 40rpx 40rpx 60rpx;
  1350. }
  1351. .modal_tit {
  1352. text-align: center;
  1353. font-size: 30rpx;
  1354. }
  1355. .modal_box_b1 {
  1356. background-color: #f2f2f2;
  1357. border-radius: 5px;
  1358. line-height: 80rpx;
  1359. margin-top: 40rpx;
  1360. /* padding-left: 40rpx; */
  1361. text-align: center;
  1362. }
  1363. .modal_user_item {
  1364. background: #f2f2f2;
  1365. padding: 30rpx;
  1366. margin-top: 40rpx;
  1367. position: relative;
  1368. }
  1369. .modal_user_right_img {
  1370. width: 12rpx;
  1371. height: 21rpx;
  1372. position: absolute;
  1373. right: 30rpx;
  1374. top: 0;
  1375. bottom: 0;
  1376. margin: auto 0;
  1377. }
  1378. .modal_t1 {
  1379. font-weight: bold;
  1380. display: inline-block;
  1381. margin-right: 20rpx;
  1382. font-size: 32rpx;
  1383. }
  1384. .modal_t3 {
  1385. margin-top: 20rpx;
  1386. }
  1387. .modal_btn {
  1388. width: 46%;
  1389. line-height: 75rpx;
  1390. text-align: center;
  1391. border-radius: 50rpx;
  1392. margin-top: 40rpx;
  1393. }
  1394. .modal_btn1 {
  1395. background: #aaaaaa;
  1396. color: #fff;
  1397. }
  1398. .modal_btn2 {
  1399. background: #61c88f;
  1400. color: #fff;
  1401. }
  1402. .yjfl {
  1403. position: fixed;
  1404. bottom: 340rpx;
  1405. right: 0;
  1406. z-index: 100;
  1407. width: 160rpx;
  1408. text-align: center;
  1409. .title {
  1410. color: #fff;
  1411. position: absolute;
  1412. bottom: 10rpx;
  1413. right: 4rpx;
  1414. width: 100%;
  1415. text-align: center;
  1416. font-size: 24rpx;
  1417. }
  1418. }
  1419. </style>