satisfactionQuestions.vue 34 KB

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