Progressive.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232
  1. <template>
  2. <div :class="theme" class="wrap">
  3. <div class="banner">
  4. <van-image :src="banner" width="375" class="banner">
  5. <template v-slot:loading>
  6. <van-loading type="spinner" size="20" />
  7. </template>
  8. </van-image>
  9. <h2 class="title">{{ form.title }}</h2>
  10. </div>
  11. <studentInfo v-if="form.loginFlag" class="studentInfo" />
  12. <div class="questions">
  13. <van-tag class="form-mark" :color="themeColor" mark type="primary">{{
  14. questionList[currentIndex - 1]["type"] | formTypeFormat
  15. }}</van-tag>
  16. <van-cell-group :border="false">
  17. <van-cell
  18. :class="noLine(questionList[currentIndex - 1]['type'])"
  19. title-class="questionName"
  20. :title="questionList[currentIndex - 1]['content']"
  21. />
  22. <van-cell :border="false">
  23. <template #title>
  24. <van-radio-group
  25. v-model="check"
  26. v-if="questionList[currentIndex - 1]['type'] == 'radio'"
  27. >
  28. <van-cell-group :border="false">
  29. <van-cell
  30. :border="false"
  31. v-for="item in questionList[currentIndex - 1][
  32. 'questionnaireQuestionItemList'
  33. ]"
  34. :clickable="true"
  35. :key="item.answerValue"
  36. :title="item.answerValue"
  37. class="teacher-item"
  38. @click="toggle(item.answerValue)"
  39. >
  40. <template #right-icon>
  41. <van-radio :name="item.answerValue">
  42. <template #icon="props">
  43. <!-- <img
  44. class="img-icon"
  45. :src="props.checked ? activeButtonIcon : inactiveIcon"
  46. /> -->
  47. <i
  48. class="iconfont"
  49. :class="
  50. props.checked ? 'icon-gouxuan' : 'icon-weigouxuan'
  51. "
  52. :style="{ color: themeColor }"
  53. ></i>
  54. </template>
  55. </van-radio>
  56. </template>
  57. </van-cell>
  58. </van-cell-group>
  59. </van-radio-group>
  60. <van-checkbox-group
  61. v-model="checkBox"
  62. v-if="questionList[currentIndex - 1]['type'] == 'checkbox'"
  63. >
  64. <van-cell-group :border="false">
  65. <van-cell
  66. :border="false"
  67. v-for="(item, index) in questionList[currentIndex - 1][
  68. 'questionnaireQuestionItemList'
  69. ]"
  70. :clickable="true"
  71. :key="item.answerValue"
  72. :title="item.answerValue"
  73. class="teacher-item"
  74. @click="toggle(index)"
  75. >
  76. <template #right-icon>
  77. <van-checkbox
  78. shape="square"
  79. :name="item.answerValue"
  80. ref="checkboxes"
  81. >
  82. <template #icon="props">
  83. <!-- <img
  84. class="img-icon"
  85. :src="props.checked ? activeButtonIcon : inactiveIcon"
  86. /> -->
  87. <i
  88. class="iconfont"
  89. :class="
  90. props.checked ? 'icon-gouxuan' : 'icon-weigouxuan'
  91. "
  92. :style="{ color: themeColor }"
  93. ></i>
  94. </template>
  95. </van-checkbox>
  96. </template>
  97. </van-cell>
  98. </van-cell-group>
  99. </van-checkbox-group>
  100. <div v-if="questionList[currentIndex - 1]['type'] == 'textarea'">
  101. <van-field
  102. v-model="textarea"
  103. rows="4"
  104. autosize
  105. maxlength="255"
  106. type="textarea"
  107. class="textareaClass"
  108. placeholder="请写下您的使用感受或建议~"
  109. />
  110. </div>
  111. <div v-if="questionList[currentIndex - 1]['type'] == 'image'">
  112. <van-field
  113. :name="questionList[currentIndex - 1]['id'] + ''"
  114. class="uploader"
  115. >
  116. <template
  117. slot="input"
  118. :id="questionList[currentIndex - 1]['id']"
  119. >
  120. <div>
  121. <van-uploader
  122. v-model="imageList"
  123. :max-count="1"
  124. accept="image/*"
  125. :before-delete="
  126. (file) => {
  127. beforeDelete(file, 'imgUrl', 'imageList');
  128. }
  129. "
  130. :before-read="beforeRead"
  131. :after-read="
  132. (file) => {
  133. afterRead(file, 'imgUrl', 'imageList');
  134. }
  135. "
  136. >
  137. <div class="uploaderBox">
  138. <img src="../images/imageIcon.png" alt="" />
  139. </div>
  140. </van-uploader>
  141. <p class="uploaderTitle">请上传5M内的图片文件</p>
  142. </div>
  143. <!-- </van-button> -->
  144. </template>
  145. </van-field>
  146. </div>
  147. </template>
  148. </van-cell>
  149. </van-cell-group>
  150. <van-goods-action>
  151. <van-goods-action-button
  152. class="btn-submit"
  153. v-if="currentIndex != 1"
  154. color="#F5F5F5"
  155. @click="onPrev"
  156. :style="{ color: themeColor }"
  157. type="default"
  158. text="上一题"
  159. />
  160. <van-goods-action-button
  161. class="btn-submit"
  162. :color="themeColor"
  163. :disabled="!check"
  164. type="primary"
  165. v-if="questionList[currentIndex - 1]['type'] == 'radio'"
  166. @click="onSubmit"
  167. :text="
  168. currentIndex == questionList.length
  169. ? planStatus
  170. ? '确定'
  171. : '提交'
  172. : '下一题'
  173. "
  174. />
  175. <van-goods-action-button
  176. class="btn-submit"
  177. :color="themeColor"
  178. :disabled="checkBox.length <= 0"
  179. type="primary"
  180. v-if="questionList[currentIndex - 1]['type'] == 'checkbox'"
  181. @click="onSubmit"
  182. :text="
  183. currentIndex == questionList.length
  184. ? planStatus
  185. ? '确定'
  186. : '提交'
  187. : '下一题'
  188. "
  189. />
  190. <van-goods-action-button
  191. class="btn-submit"
  192. :color="themeColor"
  193. :disabled="!textarea"
  194. type="primary"
  195. v-if="questionList[currentIndex - 1]['type'] == 'textarea'"
  196. @click="onSubmit"
  197. :text="
  198. currentIndex == questionList.length
  199. ? planStatus
  200. ? '确定'
  201. : '提交'
  202. : '下一题'
  203. "
  204. />
  205. <van-goods-action-button
  206. class="btn-submit"
  207. :color="themeColor"
  208. :disabled="!imgUrl"
  209. type="primary"
  210. v-if="questionList[currentIndex - 1]['type'] == 'image'"
  211. @click="onSubmit"
  212. :text="
  213. currentIndex == questionList.length
  214. ? planStatus
  215. ? '确定'
  216. : '提交'
  217. : '下一题'
  218. "
  219. />
  220. </van-goods-action>
  221. </div>
  222. <van-popup
  223. v-model="showPopup"
  224. round
  225. closeable
  226. @close="popupClose"
  227. :close-on-click-overlay="false"
  228. >
  229. <div class="popup-success">
  230. <img :src="icon_success" alt="" />
  231. <p class="tips">提交成功,感谢您的参与!</p>
  232. <van-button
  233. type="primary"
  234. :color="themeColor"
  235. block
  236. round
  237. @click="popupClose"
  238. >确认</van-button
  239. >
  240. </div>
  241. </van-popup>
  242. <!-- v-if="loginFlag" -->
  243. </div>
  244. </template>
  245. <script>
  246. import studentInfo from "../models/studentInfo.vue";
  247. // import layout from "@/layout";
  248. // import { postMessage } from "@/helpers/native-message";
  249. // import { getDetail } from "@/views/questionnaire/api";
  250. // import { questionnaireUserResult, commitFlag } from "@/views/activeList/api";
  251. // import { browser } from "@/common/common";
  252. export default {
  253. props: ["form"],
  254. components: { studentInfo },
  255. data() {
  256. const query = this.$route.query;
  257. return {
  258. showPopup: false,
  259. topicId: query.topicId || 28,
  260. banner1: require("../images/banner1.png"),
  261. banner2: require("../images/banner2.png"),
  262. banner3: require("../images/banner3.png"),
  263. banner4: require("../images/banner4.png"),
  264. icon_success1: require("../images/icon_success1.png"),
  265. icon_success2: require("../images/icon_success2.png"),
  266. icon_success3: require("../images/icon_success3.png"),
  267. icon_success4: require("../images/icon_success4.png"),
  268. // inactiveIcon: require("./images/icon_default.png"),
  269. // activeButtonIcon: require("./images/icon_active.png"),
  270. currentIndex: 1,
  271. check: null,
  272. checkBox: [],
  273. textarea: null,
  274. checkList: [],
  275. templateType: 1,
  276. questionList: [{ type: "", content: "" }],
  277. imageList: [],
  278. imgUrl: "",
  279. };
  280. },
  281. async mounted() {
  282. this.templateType = this.form.templateType;
  283. this.questionList = this.form.questionnaireQuestionList;
  284. },
  285. computed: {
  286. planStatus() {
  287. if (this.questionList.length == this.currentIndex + 1) {
  288. return true;
  289. } else {
  290. return false;
  291. }
  292. },
  293. theme() {
  294. switch (this.templateType) {
  295. case 1: {
  296. return "blue";
  297. break;
  298. }
  299. case 2: {
  300. return "org";
  301. break;
  302. }
  303. case 3: {
  304. return "green";
  305. break;
  306. }
  307. default: {
  308. return "pink";
  309. }
  310. }
  311. },
  312. themeColor() {
  313. switch (this.templateType) {
  314. case 1: {
  315. return "#5986FD";
  316. break;
  317. }
  318. case 2: {
  319. return "#FF9E42";
  320. break;
  321. }
  322. case 3: {
  323. return "#33B23C";
  324. break;
  325. }
  326. default: {
  327. return "#FF7888";
  328. }
  329. }
  330. },
  331. banner() {
  332. switch (this.templateType) {
  333. case 1: {
  334. return this.banner1;
  335. break;
  336. }
  337. case 2: {
  338. return this.banner2;
  339. break;
  340. }
  341. case 3: {
  342. return this.banner3;
  343. break;
  344. }
  345. default: {
  346. return this.banner4;
  347. }
  348. }
  349. },
  350. icon_success() {
  351. switch (this.templateType) {
  352. case 1: {
  353. return this.icon_success1;
  354. break;
  355. }
  356. case 2: {
  357. return this.icon_success2;
  358. break;
  359. }
  360. case 3: {
  361. return this.icon_success3;
  362. break;
  363. }
  364. default: {
  365. return this.icon_success4;
  366. }
  367. }
  368. },
  369. },
  370. methods: {
  371. onPrev() {
  372. // 上一步
  373. // 已经是第一步了
  374. if (this.currentIndex <= 1) {
  375. return;
  376. }
  377. this.check = [];
  378. --this.currentIndex;
  379. let pervQuestion = this.questionList[this.currentIndex - 1];
  380. if (pervQuestion.type == "radio") {
  381. this.check =
  382. this.checkList[this.currentIndex - 1].questionnaireQuestionItemIdList;
  383. } else if (pervQuestion.type == "checkbox") {
  384. this.checkBox =
  385. this.checkList[
  386. this.currentIndex - 1
  387. ].questionnaireQuestionItemIdList.split(",");
  388. } else if (pervQuestion.type == "textarea") {
  389. this.textarea = this.checkList[this.currentIndex - 1].additionalValue;
  390. } else if (pervQuestion.type == "image") {
  391. this.imgUrl = this.checkList[this.currentIndex - 1].additionalValue;
  392. this.imageList = [
  393. {
  394. url: this.checkList[this.currentIndex - 1].additionalValue,
  395. },
  396. ];
  397. }
  398. },
  399. toggle(index) {
  400. let selectList = this.questionList[this.currentIndex - 1];
  401. if (selectList.type == "radio") {
  402. this.check = index;
  403. } else if (selectList.type == "checkbox") {
  404. this.$refs.checkboxes[index].toggle();
  405. }
  406. },
  407. async onSubmit() {
  408. let selectList = this.questionList[this.currentIndex - 1];
  409. if (selectList.type == "radio" && !this.check) {
  410. this.$toast("请回答当前问题");
  411. return;
  412. } else if (selectList.type == "checkbox" && this.checkBox.length <= 0) {
  413. this.$toast("请回答当前问题");
  414. return;
  415. } else if (selectList.type == "textarea" && !this.textarea) {
  416. this.$toast("请回答当前问题");
  417. return;
  418. }
  419. // 判断是否终止
  420. let answerList = selectList.questionnaireQuestionItemList || []; //当前题的选项
  421. let currentIsOver = 0; // 是否终止答题
  422. this.checkBox;
  423. answerList.forEach((item) => {
  424. console.log(item, this.check);
  425. if (selectList.type == "radio" && this.check == item.answerValue) {
  426. currentIsOver = item.isOver;
  427. } else if (
  428. selectList.type == "checkbox" &&
  429. this.checkBox.includes(item.answerValue + "") &&
  430. !currentIsOver
  431. ) {
  432. currentIsOver = item.isOver;
  433. }
  434. });
  435. // 判断是否在题目列表里面
  436. if (this.currentIndex <= this.questionList.length) {
  437. if (selectList.type == "radio") {
  438. this.checkList[this.currentIndex - 1] = {
  439. questionnaireQuestionId: selectList.id,
  440. questionnaireQuestionItemIdList: this.check,
  441. };
  442. this.check = null;
  443. } else if (selectList.type == "checkbox") {
  444. this.checkList[this.currentIndex - 1] = {
  445. questionnaireQuestionId: selectList.id,
  446. questionnaireQuestionItemIdList: this.checkBox.join(","),
  447. };
  448. this.checkBox = [];
  449. } else if (selectList.type == "textarea") {
  450. this.checkList[this.currentIndex - 1] = {
  451. questionnaireQuestionId: selectList.id,
  452. additionalValue: this.textarea,
  453. };
  454. this.textarea = null;
  455. } else if (selectList.type == "image") {
  456. this.checkList[this.currentIndex - 1] = {
  457. questionnaireQuestionId: selectList.id,
  458. additionalValue: this.imgUrl,
  459. };
  460. this.imgUrl = "";
  461. this.imageList = [];
  462. }
  463. if (this.currentIndex == this.questionList.length || currentIsOver) {
  464. // try {
  465. // await questionnaireUserResult({
  466. // topicId: this.topicId,
  467. // activeType: "CLOUD_TEACHER_FEEDBACK",
  468. // questionnaireUserResultList: this.checkList,
  469. // });
  470. // this.showPopup = true;
  471. // } catch {
  472. // //
  473. // }
  474. this.$emit("close");
  475. return;
  476. }
  477. this.currentIndex++;
  478. }
  479. // 回写信息
  480. if (this.checkList.length >= this.currentIndex) {
  481. let selectValue = this.checkList[this.currentIndex - 1];
  482. let tempList = this.questionList[this.currentIndex - 1];
  483. if (tempList.type == "radio") {
  484. this.check = selectValue.questionnaireQuestionItemIdList;
  485. } else if (tempList.type == "checkbox") {
  486. this.checkBox =
  487. selectValue.questionnaireQuestionItemIdList.split(",");
  488. } else if (tempList.type == "textarea") {
  489. this.textarea = selectValue.additionalValue;
  490. }
  491. }
  492. },
  493. popupClose() {
  494. this.showPopup = false;
  495. if (browser().isApp) {
  496. postMessage({ api: "back", content: {} }, () => {});
  497. } else {
  498. const { state } = this.$store;
  499. state.user.status = "init";
  500. }
  501. },
  502. beforeRead(file, name) {
  503. const isLt2M = file.size / 1024 / 1024 < 5;
  504. if (!isLt2M) {
  505. this.$toast("文件大小不能超过 5MB");
  506. return false;
  507. }
  508. if (name && name == "fileUrl") {
  509. let arr = ["psd", "ai", "eps", "svg", "sketch"];
  510. let typeArr = file.name.split(".");
  511. let type = typeArr[typeArr.length - 1];
  512. if (arr.indexOf(type) == -1) {
  513. this.$toast("请上传正确的文件");
  514. return false;
  515. }
  516. }
  517. return true;
  518. },
  519. beforeDelete(file, name, list) {
  520. this.form[name] = ""; // 上传图片地址为空
  521. this[list] = [];
  522. return true;
  523. },
  524. async afterRead(file, name, origin) {
  525. // this.setLoading(true);
  526. let formData = new FormData();
  527. formData.append("file", file.file);
  528. this[name] = name;
  529. // try {
  530. // await uploadFile(formData).then((res) => {
  531. // let result = res.data;
  532. // if (result.code == 200) {
  533. // this[name] = result.data.url;
  534. // } else {
  535. // this[origin] = [];
  536. // this[name] = "";
  537. // return false;
  538. // }
  539. // });
  540. // // this.setLoading(false);
  541. // } catch (err) {
  542. // // this.setLoading(false);
  543. // return false;
  544. // }
  545. },
  546. noLine(type) {
  547. if (type == "radio" || type == "checkbox") {
  548. return "Line";
  549. } else {
  550. return "noLine";
  551. }
  552. },
  553. },
  554. filters: {
  555. formTypeFormat(type) {
  556. const template = {
  557. radio: "单选",
  558. checkbox: "多选",
  559. textarea: "问答",
  560. image: "图片",
  561. };
  562. return template[type];
  563. },
  564. },
  565. };
  566. </script>
  567. <style lang="less" scoped>
  568. .wrap {
  569. padding-bottom: 40px;
  570. }
  571. /deep/.van-tag {
  572. padding: 2px 9px 2px 5px;
  573. }
  574. .iconfont {
  575. width: 20px;
  576. height: 20px;
  577. font-size: 20px;
  578. display: inline-block;
  579. }
  580. .icon-tuoyuanxing {
  581. color: #c0c0c0 !important;
  582. }
  583. .blue {
  584. background: #e4efff;
  585. .banner {
  586. display: block;
  587. position: relative;
  588. line-height: 0;
  589. width: 100%;
  590. min-height: 170px;
  591. // background: #5986fd;
  592. /deep/.van-image__img,
  593. /deep/.van-image__loading {
  594. background: #e4efff;
  595. }
  596. /deep/.van-image__img {
  597. width: 375px;
  598. }
  599. .title {
  600. width: 182px;
  601. height: 80px;
  602. font-size: 26px;
  603. font-family: PingFangSC-Semibold, PingFang SC;
  604. font-weight: 600;
  605. color: #4c84ea;
  606. line-height: 40px;
  607. text-shadow: 0px 2px 4px #e0eaff;
  608. display: flex;
  609. flex-direction: row;
  610. align-items: center;
  611. position: absolute;
  612. z-index: 10;
  613. left: 20px;
  614. top: 37px;
  615. }
  616. }
  617. .btn-submit {
  618. // width: 90%;
  619. height: 45px;
  620. line-height: 45px;
  621. }
  622. .studentInfo {
  623. margin-top: 12px;
  624. }
  625. .questions {
  626. position: relative;
  627. margin: 12px 12px 24px;
  628. border-radius: 10px;
  629. background: #fff;
  630. overflow: hidden;
  631. .form-mark {
  632. position: absolute;
  633. left: 0;
  634. top: 6px;
  635. z-index: 10;
  636. }
  637. }
  638. .img-icon {
  639. width: 22px;
  640. height: 22px;
  641. }
  642. .questionName {
  643. // padding-top: .05rem;
  644. padding: 15px 0 12px;
  645. font-size: 16px;
  646. color: #444;
  647. font-weight: 500;
  648. line-height: 1.5;
  649. span {
  650. display: block;
  651. width: 100%;
  652. text-align: justify;
  653. }
  654. }
  655. /deep/.van-cell {
  656. padding: 10px 28px;
  657. }
  658. /deep/.van-checkbox {
  659. align-items: flex-start;
  660. }
  661. /deep/.van-goods-action {
  662. position: inherit;
  663. padding: 0 15px;
  664. margin: 20px auto 28px;
  665. .van-goods-action-button--last,
  666. .van-goods-action-button--first {
  667. border-radius: 6px;
  668. margin-right: 0;
  669. margin-left: 0;
  670. font-size: 18px;
  671. font-weight: 500;
  672. }
  673. .van-goods-action-button--last {
  674. margin-left: 6px;
  675. }
  676. .van-goods-action-button--first {
  677. margin-right: 6px;
  678. }
  679. .van-goods-action-button--last.van-goods-action-button--first {
  680. margin-right: 0;
  681. margin-left: 0;
  682. }
  683. }
  684. .teacher-item {
  685. padding: 15px 5px;
  686. margin-top: 5px;
  687. border-radius: 5px;
  688. .van-cell__title {
  689. font-size: 16px;
  690. color: #444;
  691. span {
  692. width: 95%;
  693. display: block;
  694. text-align: justify;
  695. }
  696. }
  697. &.selected {
  698. background-color: #f3f4f8;
  699. }
  700. }
  701. .textareaClass {
  702. background-color: #f5f5f5;
  703. padding: 14px 12px;
  704. }
  705. /deep/.van-popup {
  706. width: 80%;
  707. }
  708. .popup-success {
  709. padding: 30px 20px 20px;
  710. text-align: center;
  711. img {
  712. width: 68%;
  713. }
  714. .tips {
  715. padding: 10px 0 25px;
  716. font-size: 15px;
  717. color: #808080;
  718. }
  719. }
  720. }
  721. .org {
  722. background: #ffe7cd;
  723. .banner {
  724. display: block;
  725. position: relative;
  726. line-height: 0;
  727. width: 100%;
  728. min-height: 170px;
  729. // background: #5986fd;
  730. /deep/.van-image__img,
  731. /deep/.van-image__loading {
  732. background: #ffe7cd;
  733. }
  734. /deep/.van-image__img {
  735. width: 375px;
  736. }
  737. .title {
  738. width: 182px;
  739. height: 80px;
  740. font-size: 26px;
  741. font-family: PingFangSC-Semibold, PingFang SC;
  742. font-weight: 600;
  743. color: #fff;
  744. line-height: 40px;
  745. text-shadow: 0px 2px 4px #d37a1c;
  746. display: flex;
  747. flex-direction: row;
  748. align-items: center;
  749. position: absolute;
  750. z-index: 10;
  751. left: 20px;
  752. top: 37px;
  753. }
  754. }
  755. .btn-submit {
  756. // width: 90%;
  757. height: 45px;
  758. line-height: 45px;
  759. }
  760. .studentInfo {
  761. margin-top: 12px;
  762. }
  763. .questions {
  764. position: relative;
  765. margin: 12px 12px 24px;
  766. border-radius: 10px;
  767. background: #fff;
  768. overflow: hidden;
  769. .form-mark {
  770. position: absolute;
  771. left: 0;
  772. top: 6px;
  773. z-index: 10;
  774. }
  775. }
  776. .img-icon {
  777. width: 22px;
  778. height: 22px;
  779. }
  780. .questionName {
  781. // padding-top: .05rem;
  782. padding: 15px 0 12px;
  783. font-size: 16px;
  784. color: #444;
  785. font-weight: 500;
  786. line-height: 1.5;
  787. span {
  788. display: block;
  789. width: 100%;
  790. text-align: justify;
  791. }
  792. }
  793. /deep/.van-cell {
  794. padding: 10px 28px;
  795. }
  796. /deep/.van-checkbox {
  797. align-items: flex-start;
  798. }
  799. /deep/.van-goods-action {
  800. position: inherit;
  801. padding: 0 15px;
  802. margin: 20px auto 28px;
  803. .van-goods-action-button--last,
  804. .van-goods-action-button--first {
  805. border-radius: 6px;
  806. margin-right: 0;
  807. margin-left: 0;
  808. font-size: 18px;
  809. font-weight: 500;
  810. }
  811. .van-goods-action-button--last {
  812. margin-left: 6px;
  813. }
  814. .van-goods-action-button--first {
  815. margin-right: 6px;
  816. }
  817. .van-goods-action-button--last.van-goods-action-button--first {
  818. margin-right: 0;
  819. margin-left: 0;
  820. }
  821. }
  822. .teacher-item {
  823. padding: 015px 5px;
  824. margin-top: 5px;
  825. border-radius: 5px;
  826. .van-cell__title {
  827. font-size: 16px;
  828. color: #444;
  829. span {
  830. width: 95%;
  831. display: block;
  832. text-align: justify;
  833. }
  834. }
  835. &.selected {
  836. background-color: #f3f4f8;
  837. }
  838. }
  839. .textareaClass {
  840. background-color: #f5f5f5;
  841. padding: 14px 12px;
  842. }
  843. /deep/.van-popup {
  844. width: 80%;
  845. }
  846. .popup-success {
  847. padding: 30px 20px 20px;
  848. text-align: center;
  849. img {
  850. width: 68%;
  851. }
  852. .tips {
  853. padding: 10px 0 25px;
  854. font-size: 15px;
  855. color: #808080;
  856. }
  857. }
  858. }
  859. .green {
  860. background: #e8f8e9;
  861. .banner {
  862. display: block;
  863. position: relative;
  864. line-height: 0;
  865. width: 100%;
  866. min-height: 170px;
  867. // background: #5986fd;
  868. /deep/.van-image__img,
  869. /deep/.van-image__loading {
  870. background: #e8f8e9;
  871. }
  872. /deep/.van-image__img {
  873. width: 375px;
  874. }
  875. .title {
  876. color: #38843c;
  877. text-shadow: 0px 2px 4px #d2ffd4;
  878. width: 182px;
  879. height: 80px;
  880. font-size: 26px;
  881. font-family: PingFangSC-Semibold, PingFang SC;
  882. font-weight: 600;
  883. line-height: 40px;
  884. display: flex;
  885. flex-direction: row;
  886. align-items: center;
  887. position: absolute;
  888. z-index: 10;
  889. left: 20px;
  890. top: 37px;
  891. }
  892. }
  893. .btn-submit {
  894. // width: 90%;
  895. height: 45px;
  896. line-height: 45px;
  897. }
  898. .studentInfo {
  899. margin-top: 12px;
  900. }
  901. .questions {
  902. position: relative;
  903. margin: 12px 12px 24px;
  904. border-radius: 10px;
  905. background: #fff;
  906. overflow: hidden;
  907. .form-mark {
  908. position: absolute;
  909. left: 0;
  910. top: 6px;
  911. z-index: 10;
  912. }
  913. }
  914. .img-icon {
  915. width: 22px;
  916. height: 22px;
  917. }
  918. .questions {
  919. position: relative;
  920. margin: 12px 12px 24px;
  921. border-radius: 10px;
  922. background: #fff;
  923. overflow: hidden;
  924. .form-mark {
  925. position: absolute;
  926. left: 0;
  927. top: 6px;
  928. z-index: 10;
  929. }
  930. }
  931. .img-icon {
  932. width: 22px;
  933. height: 22px;
  934. }
  935. .questionName {
  936. // padding-top: .05rem;
  937. padding: 15px 0 12px;
  938. font-size: 16px;
  939. color: #444;
  940. font-weight: 500;
  941. line-height: 1.5;
  942. span {
  943. display: block;
  944. width: 100%;
  945. text-align: justify;
  946. }
  947. }
  948. /deep/.van-cell {
  949. padding: 10px 28px;
  950. }
  951. /deep/.van-checkbox {
  952. align-items: flex-start;
  953. }
  954. /deep/.van-goods-action {
  955. position: inherit;
  956. padding: 0 15px;
  957. margin: 20px auto 28px;
  958. .van-goods-action-button--last,
  959. .van-goods-action-button--first {
  960. border-radius: 6px;
  961. margin-right: 0;
  962. margin-left: 0;
  963. font-size: 18px;
  964. font-weight: 500;
  965. }
  966. .van-goods-action-button--last {
  967. margin-left: 6px;
  968. }
  969. .van-goods-action-button--first {
  970. margin-right: 6px;
  971. }
  972. .van-goods-action-button--last.van-goods-action-button--first {
  973. margin-right: 0;
  974. margin-left: 0;
  975. }
  976. }
  977. .teacher-item {
  978. padding: 015px 5px;
  979. margin-top: 5px;
  980. border-radius: 5px;
  981. .van-cell__title {
  982. font-size: 16px;
  983. color: #444;
  984. span {
  985. width: 95%;
  986. display: block;
  987. text-align: justify;
  988. }
  989. }
  990. &.selected {
  991. background-color: #f3f4f8;
  992. }
  993. }
  994. .textareaClass {
  995. background-color: #f5f5f5;
  996. padding: 14px 12px;
  997. }
  998. /deep/.van-popup {
  999. width: 80%;
  1000. }
  1001. .popup-success {
  1002. padding: 30px 20px 20px;
  1003. text-align: center;
  1004. img {
  1005. width: 68%;
  1006. }
  1007. .tips {
  1008. padding: 10px 0 25px;
  1009. font-size: 15px;
  1010. color: #808080;
  1011. }
  1012. }
  1013. }
  1014. .pink {
  1015. background: #f9dfdf;
  1016. .banner {
  1017. display: block;
  1018. position: relative;
  1019. line-height: 0;
  1020. width: 100%;
  1021. min-height: 170px;
  1022. // background: #5986fd;
  1023. /deep/.van-image__img,
  1024. /deep/.van-image__loading {
  1025. background: #f9dfdf;
  1026. }
  1027. /deep/.van-image__img {
  1028. width: 375px;
  1029. }
  1030. .title {
  1031. width: 182px;
  1032. height: 80px;
  1033. font-size: 26px;
  1034. font-family: PingFangSC-Semibold, PingFang SC;
  1035. font-weight: 600;
  1036. color: #c73862;
  1037. line-height: 40px;
  1038. text-shadow: 0px 2px 4px #ffeaea;
  1039. display: flex;
  1040. flex-direction: row;
  1041. align-items: center;
  1042. position: absolute;
  1043. z-index: 10;
  1044. left: 20px;
  1045. top: 37px;
  1046. }
  1047. }
  1048. .btn-submit {
  1049. // width: 90%;
  1050. height: 45px;
  1051. line-height: 45px;
  1052. }
  1053. .studentInfo {
  1054. margin-top: 12px;
  1055. }
  1056. .questions {
  1057. position: relative;
  1058. margin: 12px 12px 24px;
  1059. border-radius: 10px;
  1060. background: #fff;
  1061. overflow: hidden;
  1062. .form-mark {
  1063. position: absolute;
  1064. left: 0;
  1065. top: 6px;
  1066. z-index: 10;
  1067. }
  1068. }
  1069. .img-icon {
  1070. width: 22px;
  1071. height: 22px;
  1072. }
  1073. .questionName {
  1074. // padding-top: .05rem;
  1075. padding: 15px 0 12px;
  1076. font-size: 16px;
  1077. color: #444;
  1078. font-weight: 500;
  1079. line-height: 1.5;
  1080. span {
  1081. display: block;
  1082. width: 100%;
  1083. text-align: justify;
  1084. }
  1085. }
  1086. /deep/.van-cell {
  1087. padding: 10px 28px;
  1088. }
  1089. /deep/.van-checkbox {
  1090. align-items: flex-start;
  1091. }
  1092. /deep/.van-goods-action {
  1093. position: inherit;
  1094. padding: 0 15px;
  1095. margin: 20px auto 28px;
  1096. .van-goods-action-button--last,
  1097. .van-goods-action-button--first {
  1098. border-radius: 6px;
  1099. margin-right: 0;
  1100. margin-left: 0;
  1101. font-size: 18px;
  1102. font-weight: 500;
  1103. }
  1104. .van-goods-action-button--last {
  1105. margin-left: 6px;
  1106. }
  1107. .van-goods-action-button--first {
  1108. margin-right: 6px;
  1109. }
  1110. .van-goods-action-button--last.van-goods-action-button--first {
  1111. margin-right: 0;
  1112. margin-left: 0;
  1113. }
  1114. }
  1115. .teacher-item {
  1116. padding: 015px 5px;
  1117. margin-top: 5px;
  1118. border-radius: 5px;
  1119. .van-cell__title {
  1120. font-size: 16px;
  1121. color: #444;
  1122. span {
  1123. width: 95%;
  1124. display: block;
  1125. text-align: justify;
  1126. }
  1127. }
  1128. &.selected {
  1129. background-color: #f3f4f8;
  1130. }
  1131. }
  1132. .textareaClass {
  1133. background-color: #f5f5f5;
  1134. padding: 14px 12px;
  1135. }
  1136. /deep/.van-popup {
  1137. width: 80%;
  1138. }
  1139. .popup-success {
  1140. padding: 30px 20px 20px;
  1141. text-align: center;
  1142. img {
  1143. width: 68%;
  1144. }
  1145. .tips {
  1146. padding: 10px 0 25px;
  1147. font-size: 15px;
  1148. color: #808080;
  1149. }
  1150. }
  1151. }
  1152. .questions {
  1153. .van-cell--borderless {
  1154. // padding-bottom: 0;
  1155. &::after {
  1156. border-bottom: 1px solid #f0f0f0;
  1157. }
  1158. }
  1159. }
  1160. .questionName {
  1161. padding-bottom: 0 !important;
  1162. }
  1163. .questionName.require {
  1164. span {
  1165. position: relative;
  1166. &::before {
  1167. content: "*";
  1168. color: #ee0a24;
  1169. position: absolute;
  1170. left: -8px;
  1171. top: 2px;
  1172. }
  1173. }
  1174. }
  1175. .van-cell--required {
  1176. &::before {
  1177. content: "";
  1178. }
  1179. }
  1180. .textarea {
  1181. /deep/.van-field__value {
  1182. background-color: #f5f5f5;
  1183. padding: 14px 12px;
  1184. }
  1185. }
  1186. .uploaderBox {
  1187. img {
  1188. margin-top: 10px;
  1189. margin-bottom: 15px;
  1190. width: 76px;
  1191. }
  1192. }
  1193. .uploaderTitle {
  1194. font-size: 14px;
  1195. font-family: PingFangSC-Regular, PingFang SC;
  1196. font-weight: 400;
  1197. color: #999999;
  1198. line-height: 24px;
  1199. }
  1200. .noLine {
  1201. &::after {
  1202. border: none;
  1203. }
  1204. }
  1205. /deep/.van-cell {
  1206. padding: 10px 28px 24px;
  1207. }
  1208. .Line,
  1209. .noLine {
  1210. padding: 10px 28px 16px;
  1211. }
  1212. /deep/.van-checkbox__icon,
  1213. /deep/.van-radio__icon {
  1214. padding: 1px;
  1215. }
  1216. </style>