satisfactionQuestions.vue 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337
  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 } 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(anonymous);
  366. }
  367. await querySubjectInfoById_V3();
  368. // 查询样本和答案
  369. await querySample_V3();
  370. // 开始计算答卷时间
  371. getSec();
  372. } else {
  373. common.showModal('该任务已失效', () => {
  374. common.goToUrl(`/pages/business/tabbar/homePage/homePage`, { skipWay: 'reLaunch' });
  375. });
  376. return;
  377. }
  378. };
  379. /** 实名/匿名 */
  380. const isAnonymous = (type) => {
  381. //实名
  382. if (type == 1) {
  383. showModal_Anonymous.value = false;
  384. showModal_User.value = true;
  385. }
  386. //匿名
  387. else {
  388. // currentUser.value = {};
  389. showModal_Anonymous.value = false;
  390. }
  391. };
  392. /** 问卷详情 */
  393. const querySubjectInfoById_V3 = async () => {
  394. const resp = await QuerySubjectInfoById_V3({
  395. SubjectId: quesAnswers.SubjectId,
  396. });
  397. if (common.isNotEmpty(resp)) {
  398. if (resp[0].Status != 0) {
  399. common.showModal('该问卷已失效', () => {
  400. common.navigateBack(1);
  401. });
  402. return;
  403. }
  404. if (resp[0].State != 1) {
  405. common.showModal('该问卷未发布', () => {
  406. common.navigateBack(1);
  407. });
  408. return;
  409. }
  410. // 提交答案数据模版
  411. quesAnswers.PushDept = resp[0].DeptId;
  412. quesAnswers.PushDeptName = resp[0].PushDeptName;
  413. resp[0].QuestionList.forEach((item, index) => {
  414. item.AnswerList = [];
  415. item.MustQuest = item.MustQuest == 'false' ? false : true;
  416. item.RuleInfo = item.RuleInfo != '' ? JSON.parse(item.RuleInfo) : '';
  417. // 多选框
  418. if (item.QuestType == 'Select') {
  419. item.AnswerList = 0;
  420. }
  421. if (common.isNotEmpty(item.MatrixQuestionList)) {
  422. item.MatrixQuestionList.forEach((childItem) => {
  423. childItem.AnswerList = [];
  424. childItem.RuleInfo = childItem.RuleInfo != '' ? JSON.parse(childItem.RuleInfo) : '';
  425. // 答案列表模版
  426. let answerItem = {
  427. Answer: [],
  428. Blank: index,
  429. QuestId: childItem.QuestId,
  430. QuestType: item.QuestType,
  431. MustQuest: item.MustQuest,
  432. };
  433. quesAnswers.AnswerList.push(answerItem);
  434. if (common.isNotEmpty(childItem.QuestionItemList)) {
  435. childItem.QuestionItemList.forEach((sunItem) => {
  436. sunItem.Check = false;
  437. });
  438. }
  439. });
  440. } else {
  441. // 答案列表模版
  442. let answerItem = {
  443. Answer: [],
  444. Blank: index,
  445. QuestId: item.QuestId,
  446. QuestType: item.QuestType,
  447. MustQuest: item.MustQuest,
  448. };
  449. quesAnswers.AnswerList.push(answerItem);
  450. }
  451. });
  452. resp[0].QuestionList = bySort(resp[0].QuestionList);
  453. quesList.value = resp[0];
  454. console.log(quesList.value);
  455. }
  456. };
  457. /** 查询样本和答案 */
  458. const querySample_V3 = async () => {
  459. const resp = await QuerySample_V3({
  460. SubjectId: quesAnswers.SubjectId,
  461. IsGetAnswer: true,
  462. ThirdPartyId: currentUser.MemberId,
  463. State: 1
  464. });
  465. if (common.isNotEmpty(resp)) {
  466. quesList.value.QuestionList.forEach((item) => {
  467. resp[0].AnswerList.forEach((childItem) => {
  468. if(item.QuestId == childItem.QuestId) {
  469. if(item.QuestType == "Input") {
  470. item.AnswerList = childItem.Answer
  471. }
  472. if(item.QuestType == "UploadImage") {
  473. item.AnswerList = childItem.Answer.split(",")
  474. }
  475. if(common.isNotEmpty(item.QuestionItemList)) {
  476. if(item.QuestType == "Select"){
  477. item.QuestionItemList.forEach((sunItem,sunIndex) => {
  478. if(sunItem.ItemId == childItem.Answer) {
  479. item.AnswerList = sunIndex
  480. }
  481. })
  482. }else {
  483. item.AnswerList = childItem.Answer.split(",")
  484. }
  485. }
  486. }
  487. if(common.isNotEmpty(item.MatrixQuestionList)) {
  488. item.MatrixQuestionList.forEach((sunItem) => {
  489. if(sunItem.QuestId == childItem.QuestId) {
  490. if(sunItem.QuestType == "MatrixInput") {
  491. sunItem.AnswerList = childItem.Answer
  492. }
  493. if(sunItem.QuestType == "MatrixCheckbox" || sunItem.QuestType == "MatrixRadio" || sunItem.QuestType == "MatrixScale") {
  494. sunItem.AnswerList = childItem.Answer.split(",")
  495. }
  496. }
  497. })
  498. }
  499. })
  500. })
  501. complete.value = true;
  502. }
  503. }
  504. /** 计算答题时间 */
  505. const getSec = () => {
  506. time = setTimeout(() => {
  507. let answerUseTime = quesAnswers.AnswerUseTime;
  508. answerUseTime++;
  509. quesAnswers.AnswerUseTime = answerUseTime;
  510. getSec();
  511. }, 1000);
  512. };
  513. /** 根据子标题排序 */
  514. const bySort = (list: any[]) => {
  515. let find = 0;
  516. let sort = 0;
  517. let item = {} as any;
  518. for (var t = 0; t < list.length; t++) {
  519. item = list[t];
  520. //子标题
  521. if (item.QuestType == 'SubTitle') {
  522. //将子标题底下的题目从1开始排
  523. sort = 0;
  524. //判断是出现的第几个子标题
  525. //num是子标题的排序
  526. item.Num = toChinesNum(find + 1);
  527. find++;
  528. } else {
  529. //sort是子标题底下的排序
  530. item.Sort = sort + 1;
  531. sort++;
  532. }
  533. item.SortNum = t;
  534. if (common.isNotEmpty(item.QuestionItemList)) {
  535. item.QuestionItemList.forEach((childItem, childIndex) => {
  536. childItem.SortNum = childIndex;
  537. if (common.isNotEmpty(childItem.QuestionItem)) {
  538. childItem.QuestionItem.forEach((sunItem, sunIndex) => {
  539. sunItem.SortNum = sunIndex;
  540. });
  541. }
  542. });
  543. }
  544. }
  545. return list;
  546. };
  547. /** 汉字顺序 */
  548. const toChinesNum = (num) => {
  549. var changeNum = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'],
  550. newNum = '',
  551. arr = num.toString().split('');
  552. arr[0] = parseInt(arr[0]) - 1;
  553. if (arr[0] == -1 && arr.length == 1) {
  554. return '零';
  555. }
  556. if (arr.length > 1) {
  557. arr[1] = parseInt(arr[1]) - 1;
  558. if (!arr[0]) {
  559. newNum = !arr[0] && arr[1] == -1 ? changeNum[9] : changeNum[9] + changeNum[arr[1]];
  560. } else {
  561. newNum = changeNum[arr[0]] + changeNum[9] + (changeNum[arr[1]] ? changeNum[arr[1]] : '');
  562. }
  563. } else {
  564. newNum = changeNum[arr[0]];
  565. }
  566. return newNum;
  567. };
  568. /** 单选/多选/量表 */
  569. const choiceOption = (e) => {
  570. let index = e.currentTarget.dataset.index;
  571. let childIndex = e.currentTarget.dataset.childindex;
  572. let answerIndex = 0;
  573. let questionList = quesList.value.QuestionList;
  574. let answerList = quesAnswers.AnswerList;
  575. answerList.forEach((itm, ind) => {
  576. if (itm.QuestId == questionList[index].QuestId) {
  577. answerIndex = ind;
  578. }
  579. });
  580. // 单选/量表
  581. if (questionList[index].QuestType == 'Radio' || questionList[index].QuestType == 'Scale') {
  582. if (
  583. questionList[index].AnswerList[0] != questionList[index].QuestionItemList[childIndex].ItemId
  584. ) {
  585. questionList[index].AnswerList = [];
  586. questionList[index].AnswerList.push(questionList[index].QuestionItemList[childIndex].ItemId);
  587. }
  588. answerList[answerIndex].Answer = questionList[index].QuestionItemList[childIndex].ItemId;
  589. }
  590. // 多选
  591. else if (questionList[index].QuestType == 'Checkbox') {
  592. let flag = false;
  593. questionList[index].AnswerList.forEach((item) => {
  594. if (item == questionList[index].QuestionItemList[childIndex].ItemId) {
  595. flag = true;
  596. }
  597. });
  598. if (flag) {
  599. questionList[index].AnswerList = questionList[index].AnswerList.filter((item) => {
  600. return item != questionList[index].QuestionItemList[childIndex].ItemId;
  601. });
  602. answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((fiItem) => {
  603. return fiItem != questionList[index].QuestionItemList[childIndex].ItemId;
  604. });
  605. } else {
  606. if (questionList[index].RuleInfo.MaxLength < questionList[index].AnswerList.length + 1) {
  607. common.showModal('最多选择' + questionList[index].RuleInfo.MaxLength + '项');
  608. return;
  609. }
  610. questionList[index].AnswerList.push(questionList[index].QuestionItemList[childIndex].ItemId);
  611. answerList[answerIndex].Answer.push(questionList[index].QuestionItemList[childIndex].ItemId);
  612. }
  613. }
  614. quesList.value.QuestionList = questionList;
  615. quesAnswers.AnswerList = answerList;
  616. };
  617. /** 选择题 */
  618. const bindPickerChange = (e) => {
  619. let index = e.currentTarget.dataset.index;
  620. let val = e.detail.value;
  621. let questionList = quesList.value.QuestionList;
  622. let answerList = quesAnswers.AnswerList;
  623. let answerIndex = 0;
  624. answerList.forEach((itm, ind) => {
  625. if (itm.QuestId == questionList[index].QuestId) {
  626. answerIndex = ind;
  627. }
  628. });
  629. questionList[index].AnswerList = val;
  630. answerList[answerIndex].Answer = questionList[index].QuestionItemList[val].ItemId;
  631. quesList.value.QuestionList = questionList;
  632. quesAnswers.AnswerList = answerList;
  633. };
  634. /** 矩阵单选 */
  635. const choiceMatrixOption = (e) => {
  636. let index = e.currentTarget.dataset.index;
  637. let childIndex = e.currentTarget.dataset.childindex;
  638. let sunIndex = e.currentTarget.dataset.sunindex;
  639. let questionList = quesList.value.QuestionList;
  640. let answerList = quesAnswers.AnswerList;
  641. let answerIndex = 0;
  642. answerList.forEach((itm, ind) => {
  643. if (itm.QuestId == questionList[index].MatrixQuestionList[childIndex].QuestId) {
  644. answerIndex = ind;
  645. }
  646. });
  647. // 矩阵单选/矩阵量表
  648. if (
  649. questionList[index].QuestType == 'MatrixRadio' ||
  650. questionList[index].QuestType == 'MatrixScale'
  651. ) {
  652. if (
  653. questionList[index].MatrixQuestionList[childIndex].AnswerList[0] !=
  654. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  655. ) {
  656. questionList[index].MatrixQuestionList[childIndex].AnswerList = [];
  657. questionList[index].MatrixQuestionList[childIndex].AnswerList.push(
  658. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  659. );
  660. }
  661. answerList[answerIndex].Answer =
  662. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId;
  663. }
  664. // 矩阵多选
  665. else if (questionList[index].QuestType == 'MatrixCheckbox') {
  666. let flag = false;
  667. questionList[index].MatrixQuestionList[childIndex].AnswerList.forEach((item) => {
  668. if (
  669. item == questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  670. ) {
  671. flag = true;
  672. }
  673. });
  674. if (flag) {
  675. questionList[index].MatrixQuestionList[childIndex].AnswerList = questionList[
  676. index
  677. ].MatrixQuestionList[childIndex].AnswerList.filter((item) => {
  678. return (
  679. item !=
  680. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  681. );
  682. });
  683. answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((fiItem) => {
  684. return (
  685. fiItem !=
  686. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  687. );
  688. });
  689. } else {
  690. questionList[index].MatrixQuestionList[childIndex].AnswerList.push(
  691. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  692. );
  693. answerList[answerIndex].Answer.push(
  694. questionList[index].MatrixQuestionList[childIndex].QuestionItemList[sunIndex].ItemId
  695. );
  696. }
  697. }
  698. quesList.value.QuestionList = questionList;
  699. quesAnswers.AnswerList = answerList;
  700. };
  701. /** 选择文件 */
  702. const choiceFile = (e) => {
  703. let index = e.currentTarget.dataset.index;
  704. let questionList = quesList.value.QuestionList;
  705. let answerList = quesAnswers.AnswerList;
  706. let answerIndex = 0;
  707. answerList.forEach((itm, ind) => {
  708. if (itm.QuestId == questionList[index].QuestId) {
  709. answerIndex = ind;
  710. }
  711. });
  712. if (answerList[answerIndex].Answer.length >= questionList[index].RuleInfo.FileCount) {
  713. common.showModal('最多上传' + questionList[index].RuleInfo.FileCount + '张图片');
  714. return;
  715. }
  716. uni.chooseMedia({
  717. count: questionList[index].RuleInfo.FileCount,
  718. mediaType: ['image'],
  719. sourceType: ['album', 'camera'],
  720. sizeType: ['compressed'],
  721. async success(res) {
  722. uni.showLoading({
  723. title: '上传中。。。',
  724. });
  725. for (var i = 0; i < res.tempFiles.length; i++) {
  726. let m = 1024 * 1024;
  727. if (res.tempFiles[i].size < m) {
  728. let imgUrl = (await uploadFile(
  729. res.tempFiles[i].tempFilePath,
  730. questionList[index].RuleInfo.FileCount,
  731. answerList[answerIndex].Answer
  732. )) as string;
  733. if (common.isNotEmpty(imgUrl)) {
  734. imgUrl =
  735. imgUrl.indexOf('http') > -1 ? imgUrl : useDomain() + imgUrl.replace(/\\/g, '/');
  736. answerList[answerIndex].Answer.push(imgUrl);
  737. questionList[index].AnswerList = answerList[answerIndex].Answer;
  738. quesList.value.QuestionList = questionList;
  739. quesAnswers.AnswerList = answerList;
  740. if (res.tempFiles.length - 1 == i) {
  741. uni.hideLoading();
  742. }
  743. }
  744. } else {
  745. uni.hideLoading();
  746. common.showModal('文件不得大于' + questionList[index].RuleInfo.FileSize + 'M');
  747. return;
  748. }
  749. }
  750. },
  751. });
  752. };
  753. /** 上传文件 */
  754. const uploadFile = (imgItem, fileCount, imgList) => {
  755. return new Promise((resolve, reject) => {
  756. if (imgList.length >= fileCount) {
  757. uni.hideLoading();
  758. common.showModal('最多上传' + fileCount + '张图片');
  759. return;
  760. }
  761. // 将图片上传至服务器
  762. uni.uploadFile({
  763. url: UploadZxFile,
  764. filePath: imgItem,
  765. name: 'newsFile',
  766. formData: {
  767. user: 'test',
  768. },
  769. header: {
  770. token: uni.getStorageSync('token'),
  771. },
  772. data: {},
  773. success(res) {
  774. const data = JSON.parse(res.data);
  775. if (data.RespCode == '10000') {
  776. resolve(data.url);
  777. } else {
  778. common.showModal(data.msg);
  779. }
  780. },
  781. });
  782. });
  783. };
  784. /** 删除图片 */
  785. const closeImg = (e) => {
  786. let index = e.currentTarget.dataset.index;
  787. let imgItem = e.currentTarget.dataset.imgitem;
  788. let questionList = quesList.value.QuestionList;
  789. let answerList = quesAnswers.AnswerList;
  790. let answerIndex = 0;
  791. answerList.forEach((itm, ind) => {
  792. if (itm.QuestId == questionList[index].QuestId) {
  793. answerIndex = ind;
  794. }
  795. });
  796. answerList[answerIndex].Answer = answerList[answerIndex].Answer.filter((item) => {
  797. return item != imgItem;
  798. });
  799. questionList[index].AnswerList = answerList[answerIndex].Answer;
  800. quesList.value.QuestionList = questionList;
  801. quesAnswers.AnswerList = answerList;
  802. };
  803. /** 获取input值 */
  804. const setVal = (e) => {
  805. let index = e.currentTarget.dataset.index;
  806. let childIndex = e.currentTarget.dataset.childindex;
  807. let questionList = quesList.value.QuestionList;
  808. let answerList = quesAnswers.AnswerList;
  809. let answerIndex = 0;
  810. // 矩阵填空题
  811. if (questionList[index].QuestType == 'MatrixInput') {
  812. if (
  813. questionList[index].MatrixQuestionList[childIndex].AnswerList.length ==
  814. questionList[index].MatrixQuestionList[childIndex].RuleInfo.MaxLength
  815. ) {
  816. common.showToast(
  817. '最多输入' + questionList[index].MatrixQuestionList[childIndex].RuleInfo.MaxLength + '个字'
  818. );
  819. return;
  820. }
  821. answerList.forEach((itm, ind) => {
  822. if (itm.QuestId == questionList[index].MatrixQuestionList[childIndex].QuestId) {
  823. answerIndex = ind;
  824. }
  825. });
  826. questionList[index].MatrixQuestionList[childIndex].AnswerList = e.detail.value;
  827. }
  828. // 填空题
  829. else {
  830. if (questionList[index].RuleInfo.DataType != '无') {
  831. let dataTypeOptions = questionList[index].RuleInfo.DataTypeOptions;
  832. for (var i = 0; i < dataTypeOptions.length; i++) {
  833. if (questionList[index].RuleInfo.DataType == dataTypeOptions[i].Value) {
  834. const regRule = dataTypeOptions[i].Rule;
  835. let reg = null;
  836. if (regRule.startsWith('/') && regRule.endsWith('/')) {
  837. reg = new RegExp(regRule.slice(1, -1));
  838. } else {
  839. reg = new RegExp(regRule);
  840. }
  841. if (!reg.test(e.detail.value)) {
  842. common.showModal('请输入' + dataTypeOptions[i].Text);
  843. questionList[index].AnswerList = '';
  844. answerList[answerIndex].Answer = '';
  845. this.setData({
  846. 'quesList.QuestionList': questionList,
  847. 'quesAnswers.AnswerList': answerList,
  848. });
  849. return;
  850. }
  851. }
  852. }
  853. }
  854. if (questionList[index].AnswerList.length == questionList[index].RuleInfo.MaxLength) {
  855. common.showToast('最多输入' + questionList[index].RuleInfo.MaxLength + '个字');
  856. return;
  857. }
  858. answerList.forEach((itm, ind) => {
  859. if (itm.QuestId == questionList[index].QuestId) {
  860. answerIndex = ind;
  861. }
  862. });
  863. questionList[index].AnswerList = e.detail.value;
  864. }
  865. answerList[answerIndex].Answer = e.detail.value;
  866. quesList.value.QuestionList = questionList;
  867. quesAnswers.AnswerList = answerList;
  868. };
  869. /** 提交 */
  870. const submit = async () => {
  871. await common.sleep(1000);
  872. if (complete.value) return;
  873. uni.showLoading();
  874. const answers = { ...quesAnswers } as any;
  875. for (var i = 0; i < answers.AnswerList.length; i++) {
  876. let item = answers.AnswerList[i];
  877. if (item.MustQuest && common.isEmpty(item.Answer)) {
  878. common.showToast('存在未填写的问卷');
  879. point.value = 'p' + item.Blank;
  880. return;
  881. }
  882. }
  883. answers.AnswerList.forEach((item) => {
  884. if (typeof item.Answer == 'object') {
  885. item.Answer = item.Answer.join();
  886. }
  887. });
  888. answers.AnswerList = JSON.stringify(quesAnswers.AnswerList);
  889. // quesAnswers.IP = (await getIP()).cip;
  890. // quesAnswers.Location = (await getIP()).cname;
  891. quesAnswers.UserAgent = app.globalData.smallPro_systemInfo;
  892. quesAnswers.Mobile = currentUser.value.mobile;
  893. quesAnswers.UserName = currentUser.value.memberName;
  894. quesAnswers.MemberId = currentUser.value.MemberId;
  895. quesAnswers.Sex = currentUser.value.sex;
  896. quesAnswers.Age = currentUser.value.age;
  897. quesAnswers.ThirdPartyId = currentUser.value.MemberId || uni.getStorageSync('openid');
  898. quesAnswers.BedNo = '';
  899. quesAnswers.HospitalNo = objType.value == '4' ? currentUser.value.cardNo : '';
  900. quesAnswers.CardNo = objType.value == '3' ? currentUser.value.cardNo : '';
  901. quesAnswers.TaskId = taskId.value;
  902. let res = await CommitAnswer_V3(quesAnswers);
  903. clearTimeout(time);
  904. if (common.isNotEmpty(res)) {
  905. common.showModal('提交成功!', () => {
  906. common.navigateBack(1);
  907. });
  908. }
  909. };
  910. /** 获取IP */
  911. const getIP = () => {
  912. return new Promise((resolve, reject) => {
  913. uni.request({
  914. url: 'https://pv.sohu.com/cityjson?ie=utf-8',
  915. success: (res: any) => {
  916. const result = res.data.substring(res.data.indexOf('{'), res.data.lastIndexOf('}') + 1);
  917. const obj = JSON.parse(result);
  918. resolve(obj);
  919. },
  920. });
  921. }) as Promise<any>;
  922. };
  923. const goBack = () => {
  924. uni.navigateBack({
  925. delta: 1,
  926. });
  927. };
  928. const yjfk = () => {};
  929. const goSelMember = () => {};
  930. const confirmMember = () => {};
  931. useOnLoad((options) => {
  932. main(options);
  933. });
  934. </script>
  935. <style lang="scss" scoped>
  936. .align_items_left {
  937. align-items: flex-start;
  938. }
  939. .active_option {
  940. background: #18ba89 !important;
  941. color: white !important;
  942. }
  943. .mask_form {
  944. width: 100%;
  945. height: 100%;
  946. position: absolute;
  947. top: 0;
  948. left: 0;
  949. z-index: 100;
  950. }
  951. .container {
  952. overflow: hidden;
  953. }
  954. .scroll_view {
  955. height: 100%;
  956. }
  957. .top_bg_box {
  958. position: relative;
  959. image {
  960. width: 100%;
  961. height: 456rpx;
  962. position: absolute;
  963. top: 0;
  964. left: 0;
  965. z-index: 1;
  966. }
  967. .ques_introduce {
  968. padding: 46rpx 52rpx 0 52rpx;
  969. box-sizing: border-box;
  970. position: absolute;
  971. top: 0;
  972. left: 0;
  973. z-index: 2;
  974. text:nth-child(1) {
  975. font-size: 36rpx;
  976. font-weight: bold;
  977. color: white;
  978. margin-bottom: 20rpx;
  979. }
  980. text:nth-child(2) {
  981. line-height: 45rpx;
  982. font-size: 28rpx;
  983. color: white;
  984. }
  985. }
  986. }
  987. .main_box {
  988. padding: 470rpx 30rpx 190rpx 30rpx;
  989. box-sizing: border-box;
  990. position: relative;
  991. z-index: 2;
  992. }
  993. .ques_item_box {
  994. padding: 30rpx;
  995. box-sizing: border-box;
  996. background: white;
  997. border-radius: 20rpx;
  998. margin-bottom: 32rpx;
  999. > .ques_title_box > text {
  1000. line-height: 50rpx;
  1001. font-size: 36rpx;
  1002. font-weight: bold;
  1003. color: #1c1c1c;
  1004. }
  1005. .mustQuest_tag {
  1006. color: #dc2828;
  1007. }
  1008. }
  1009. .ques_options {
  1010. margin-top: 34rpx;
  1011. }
  1012. .choice_item {
  1013. width: 100%;
  1014. line-height: 80rpx;
  1015. font-size: 30rpx;
  1016. color: #686868;
  1017. text-align: center;
  1018. margin-bottom: 16rpx;
  1019. border-radius: 10rpx;
  1020. background: #f8f8fa;
  1021. &:last-child {
  1022. margin-bottom: 0;
  1023. }
  1024. }
  1025. .input_label {
  1026. line-height: 40rpx;
  1027. font-size: 32rpx;
  1028. color: #474747;
  1029. }
  1030. .textarea_box {
  1031. width: 100%;
  1032. padding: 20rpx;
  1033. box-sizing: border-box;
  1034. border-radius: 10rpx;
  1035. background: #f8f8fa;
  1036. margin-top: 22rpx;
  1037. textarea {
  1038. width: 100%;
  1039. }
  1040. }
  1041. .matrix_textarea_box {
  1042. width: 70%;
  1043. }
  1044. .picker_box {
  1045. width: 100%;
  1046. }
  1047. .picker {
  1048. width: 100%;
  1049. height: 80rpx;
  1050. padding: 22rpx;
  1051. box-sizing: border-box;
  1052. background: #f9f9f9;
  1053. border-radius: 20rpx;
  1054. justify-content: space-between;
  1055. text {
  1056. white-space: nowrap;
  1057. font-size: 28rpx;
  1058. color: #686868;
  1059. }
  1060. image {
  1061. width: 12rpx;
  1062. height: 24rpx;
  1063. }
  1064. }
  1065. .matrix_options {
  1066. width: 100%;
  1067. margin-bottom: 34rpx;
  1068. justify-content: space-between;
  1069. text {
  1070. font-size: 30rpx;
  1071. color: #1c1c1c;
  1072. text-align: center;
  1073. padding: 20rpx;
  1074. box-sizing: border-box;
  1075. word-wrap: break-word;
  1076. word-break: break-all;
  1077. }
  1078. }
  1079. .matrix_border {
  1080. border: 1px solid #f0f0f0;
  1081. }
  1082. .matrix_options_title {
  1083. background: #f5f5f5;
  1084. }
  1085. .matrix_icon_box {
  1086. width: 100%;
  1087. align-items: flex-start;
  1088. text {
  1089. font-size: 30rpx;
  1090. color: #1c1c1c;
  1091. margin-bottom: 36rpx;
  1092. padding: 0 20rpx;
  1093. box-sizing: border-box;
  1094. }
  1095. image {
  1096. width: 40rpx;
  1097. height: 40rpx;
  1098. }
  1099. }
  1100. .sub_title {
  1101. background: none;
  1102. }
  1103. .img_list {
  1104. width: 100%;
  1105. margin-bottom: 24rpx;
  1106. justify-content: flex-start;
  1107. flex-wrap: wrap;
  1108. .item_img {
  1109. width: 100%;
  1110. height: 100%;
  1111. }
  1112. }
  1113. .add_img {
  1114. width: 32%;
  1115. height: 200rpx;
  1116. margin-right: 2%;
  1117. margin-bottom: 3%;
  1118. position: relative;
  1119. &:nth-child(3n) {
  1120. margin-right: 0;
  1121. }
  1122. }
  1123. .add_img_tips {
  1124. width: 100%;
  1125. text {
  1126. font-size: 30rpx;
  1127. color: #474747;
  1128. }
  1129. }
  1130. .cha_img {
  1131. width: 50rpx;
  1132. height: 50rpx;
  1133. position: absolute;
  1134. top: -15rpx;
  1135. right: -5rpx;
  1136. }
  1137. .options_item_box {
  1138. width: 100%;
  1139. padding: 0 10rpx;
  1140. box-sizing: border-box;
  1141. margin-bottom: 20rpx;
  1142. justify-content: space-between;
  1143. text {
  1144. font-size: 28rpx;
  1145. color: #686868;
  1146. word-wrap: break-word;
  1147. word-break: break-all;
  1148. }
  1149. image {
  1150. width: 40rpx;
  1151. height: 40rpx;
  1152. margin: 20rpx 0;
  1153. }
  1154. }
  1155. .matrix_input_box {
  1156. width: 100%;
  1157. text {
  1158. width: 30%;
  1159. white-space: nowrap;
  1160. }
  1161. input {
  1162. width: 70%;
  1163. }
  1164. }
  1165. .footer_box {
  1166. width: 100%;
  1167. padding: 30rpx 30rpx 60rpx 30rpx;
  1168. box-sizing: border-box;
  1169. background: white;
  1170. position: fixed;
  1171. bottom: 0;
  1172. left: 0;
  1173. z-index: 10;
  1174. text {
  1175. width: 100%;
  1176. line-height: 88rpx;
  1177. font-size: 36rpx;
  1178. color: white;
  1179. text-align: center;
  1180. border-radius: 88rpx;
  1181. background: #18ba89;
  1182. display: block;
  1183. }
  1184. }
  1185. .modal_wrap {
  1186. width: 100%;
  1187. height: 100%;
  1188. background-color: rgba(0, 0, 0, 0.6);
  1189. position: fixed;
  1190. left: 0;
  1191. top: 0;
  1192. z-index: 99;
  1193. display: flex;
  1194. align-items: center;
  1195. justify-content: center;
  1196. }
  1197. .modal_box {
  1198. width: 600rpx;
  1199. max-height: 600rpx;
  1200. background-color: #fff;
  1201. border-radius: 5px;
  1202. padding: 40rpx 40rpx 60rpx;
  1203. }
  1204. .modal_tit {
  1205. text-align: center;
  1206. font-size: 30rpx;
  1207. }
  1208. .modal_box_b1 {
  1209. background-color: #f2f2f2;
  1210. border-radius: 5px;
  1211. line-height: 80rpx;
  1212. margin-top: 40rpx;
  1213. /* padding-left: 40rpx; */
  1214. text-align: center;
  1215. }
  1216. .modal_user_item {
  1217. background: #f2f2f2;
  1218. padding: 30rpx;
  1219. margin-top: 40rpx;
  1220. position: relative;
  1221. }
  1222. .modal_user_right_img {
  1223. width: 12rpx;
  1224. height: 21rpx;
  1225. position: absolute;
  1226. right: 30rpx;
  1227. top: 0;
  1228. bottom: 0;
  1229. margin: auto 0;
  1230. }
  1231. .modal_t1 {
  1232. font-weight: bold;
  1233. display: inline-block;
  1234. margin-right: 20rpx;
  1235. font-size: 32rpx;
  1236. }
  1237. .modal_t3 {
  1238. margin-top: 20rpx;
  1239. }
  1240. .modal_btn {
  1241. width: 46%;
  1242. line-height: 75rpx;
  1243. text-align: center;
  1244. border-radius: 50rpx;
  1245. margin-top: 40rpx;
  1246. }
  1247. .modal_btn1 {
  1248. background: #aaaaaa;
  1249. color: #fff;
  1250. }
  1251. .modal_btn2 {
  1252. background: #61c88f;
  1253. color: #fff;
  1254. }
  1255. .yjfl {
  1256. position: fixed;
  1257. bottom: 340rpx;
  1258. right: 0;
  1259. z-index: 100;
  1260. width: 160rpx;
  1261. text-align: center;
  1262. .title {
  1263. color: #fff;
  1264. position: absolute;
  1265. bottom: 10rpx;
  1266. right: 4rpx;
  1267. width: 100%;
  1268. text-align: center;
  1269. font-size: 24rpx;
  1270. }
  1271. }
  1272. </style>