Continuous.vue 29 KB

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