satisfactionQuestions.vue 35 KB

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