emotionalImageAssessment.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. <template>
  2. <div>
  3. <div class="desc_wrap" v-if="testFlag">
  4. <div style="
  5. width: 70%;
  6. height: 100%;
  7. background: rgb(248, 248, 248);
  8. opacity: 1;
  9. border-radius: 12px;
  10. margin: 0 auto;
  11. ">
  12. <div class="left_part">
  13. <div id="left_top">
  14. <div>
  15. <div id="setting">
  16. <img src="../../assets/9551.png" alt="" />
  17. </div>
  18. <div id="text">
  19. <span>操作提示:</span>
  20. </div>
  21. </div>
  22. </div>
  23. <div style="margin: 100px auto; width: 80%; text-align: justify;text-justify: distribute-all-lines;">
  24. <p v-show="testTypeCode == 1" v-html="subjectInfo.testDescription"></p>
  25. <p v-show="testTypeCode == 2">
  26. 在本实验中,你将看到一些情绪图片,请你对这些图片带给你的情绪感受进行自我评定,每一张图片需要评定:<br><br>
  27. 一、效价:是指情绪刺激的愉悦或不愉悦程度,1代表“最不愉快” ,9代表“最愉快”<br><br>
  28. 二、唤起度:是指情绪刺激时生理活动增强的状态,1代表“最弱” ,9代表“最强”<br><br>
  29. 三、优势度:是指个体感觉自己对图片的掌控和支配程度,1代表“最弱” ,9代表“最强”<br><br>
  30. 每张图片将呈现4秒,请你在1-9之间选择最符合情绪感受的数字。
  31. </p>
  32. <!-- <p>{{subjectInfo.description}}</p> -->
  33. </div>
  34. </div>
  35. <div class="right_part" :style="{background:'url(' + require('../../assets/page' + taskId + '.png') + ')',
  36. 'background-size': '100% 100%',}"
  37. >
  38. <div id="title">
  39. <span>{{ subjectInfo.name }}</span>
  40. </div>
  41. <div style="position: absolute; bottom: 30px; right: 40%">
  42. <el-button v-if="buttonShow" class="start" @click="startTest()">{{buttonName}}</el-button>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <div v-if="!testFlag" class="activeTask">
  48. <img @click="screen()" src="../../assets/small-big.png" alt="" style="
  49. height: 48px;
  50. width: 48px;
  51. position: fixed;
  52. top: 24px;
  53. right: 22px;
  54. cursor: pointer;
  55. " />
  56. <div style="width: 50%; margin-left: 10%; margin-top: 24px; z-index: 10">
  57. <el-progress class="main_progress" :text-inside="true" :format="format" :stroke-width="24"
  58. :percentage="((cumulation + 1) / testList.length) * 100"></el-progress>
  59. </div>
  60. <p v-if="timingShow" class="timingBox">{{ countDownStr }}</p>
  61. <div class="test-content">
  62. <div class="shape_glass">
  63. <img v-show="!imgShow" class="active-img addImg" :src="testList[cumulation].imgUrl" alt="" />
  64. </div>
  65. <div class="test-content-opt">
  66. <div v-if="!crossShow" class="block">
  67. <!-- <div class="slider">-->
  68. <!-- <el-tooltip placement="top">-->
  69. <!-- <div slot="content">效价:是指情绪刺激的愉悦或不愉悦程度,1代表“最不愉快” ,9代表“最愉快”</div>-->
  70. <!-- <i class="el-icon-info"></i>-->
  71. <!-- </el-tooltip>-->
  72. <!-- <span>效价</span>-->
  73. <!-- <el-rate v-model="testList[cumulation].xiaojia" :max="9" void-color="#999999" show-score text-color="#ff9900"-->
  74. <!-- score-template="评分{value}">-->
  75. <!-- </el-rate>-->
  76. <!-- </div>-->
  77. <!-- <div class="slider">-->
  78. <!-- <el-tooltip placement="top">-->
  79. <!-- <div slot="content">唤起度:是指情绪刺激时生理活动增强的状态,1代表“最弱” ,9代表“最强”</div>-->
  80. <!-- <i class="el-icon-info"></i>-->
  81. <!-- </el-tooltip>-->
  82. <!-- <span>唤起度</span>-->
  83. <!-- <el-rate v-model="testList[cumulation].huanqi" :max="9" void-color="#999999" show-score text-color="#ff9900"-->
  84. <!-- score-template="评分{value}">-->
  85. <!-- </el-rate>-->
  86. <!-- </div>-->
  87. <!-- <div class="slider">-->
  88. <!-- <el-tooltip placement="top">-->
  89. <!-- <div slot="content">优势度:是指个体具有影响环境的能力的感觉,1代表“最弱” ,9代表“最强”</div>-->
  90. <!-- <i class="el-icon-info"></i>-->
  91. <!-- </el-tooltip>-->
  92. <!-- <span>优势度</span>-->
  93. <!-- <el-rate v-model="testList[cumulation].youshi" :max="9" void-color="#999999" show-score text-color="#ff9900"-->
  94. <!-- score-template="评分{value}">-->
  95. <!-- </el-rate>-->
  96. <!-- </div>-->
  97. <div class="slider">
  98. <el-tooltip placement="top">
  99. <div slot="content">效价:是指情绪刺激的愉悦或不愉悦程度,1代表“最不愉快” ,9代表“最愉快”</div>
  100. <i class="el-icon-info"></i>
  101. </el-tooltip>
  102. <p class="slider-title">效价</p>
  103. <div class="slide-item">
  104. <p class="slide-item-left">最不愉快</p>
  105. <el-slider
  106. v-model="testList[cumulation].xiaojia"
  107. show-stops
  108. :min="0"
  109. :max="9"
  110. :marks="marks">
  111. </el-slider>
  112. <p class="slide-item-right">最愉快</p>
  113. </div>
  114. </div>
  115. <div class="slider">
  116. <el-tooltip placement="top">
  117. <div slot="content">唤起度:是指情绪刺激时生理活动增强的状态,1代表“最弱” ,9代表“最强”</div>
  118. <i class="el-icon-info"></i>
  119. </el-tooltip>
  120. <p class="slider-title">唤起度</p>
  121. <div class="slide-item">
  122. <p class="slide-item-left">最弱</p>
  123. <el-slider
  124. v-model="testList[cumulation].huanqi"
  125. show-stops
  126. :min="0"
  127. :max="9"
  128. :marks="marks">
  129. </el-slider>
  130. <p class="slide-item-right">最强</p>
  131. </div>
  132. </div>
  133. <div class="slider">
  134. <el-tooltip placement="top">
  135. <div slot="content">优势度:是指个体具有影响环境的能力的感觉,1代表“最弱” ,9代表“最强”</div>
  136. <i class="el-icon-info"></i>
  137. </el-tooltip>
  138. <p class="slider-title">优势度</p>
  139. <div class="slide-item">
  140. <p class="slide-item-left">最弱</p>
  141. <el-slider
  142. v-model="testList[cumulation].youshi"
  143. show-stops
  144. :min="0"
  145. :max="9"
  146. :marks="marks">
  147. </el-slider>
  148. <p class="slide-item-right">最强</p>
  149. </div>
  150. </div>
  151. </div>
  152. <div class="btn-content" v-if="!crossShow">
  153. <el-button class="butt" @click="prevHandle" :disabled="isLoading">
  154. 上一题
  155. </el-button>
  156. <!-- <el-button v-for="item in testList[cumulation].buttonList" :key="item.val" class="butt" :class="{-->
  157. <!-- active: item.val == testList[cumulation].emoType && showGuider,-->
  158. <!-- choose: item.val == testList[cumulation].userResponse,-->
  159. <!-- }" @click="userClick(item.val)">-->
  160. <!-- {{ item.name }}-->
  161. <!-- </el-button>-->
  162. <el-button class="butt" @click="nextHandle" :disabled="isLoading">
  163. 下一题
  164. </el-button>
  165. </div>
  166. </div>
  167. </div>
  168. <!-- <div class="guider" v-show="showGuider && testTypeCode == 0">-->
  169. <!-- <div class="txt">-->
  170. <!-- <p class="explain">-->
  171. <!-- 观察图片中人物的面部表情,下方闪烁的选项是正确的情绪类型。请学习这种对应关系,点击下方按钮,选择正确的情绪类型-->
  172. <!-- </p>-->
  173. <!-- </div>-->
  174. <!-- </div>-->
  175. </div>
  176. </div>
  177. </template>
  178. <script>
  179. import {oSessionStorage, preloader} from "@/utils/utils";
  180. import screenfull from "screenfull";
  181. import {fearLevel1,fearLevel2,fearLevel3,fearLevel4} from "@/assets/data/emotionalImageAssessment";
  182. export default {
  183. name: "emotionalImageAssessment",
  184. data() {
  185. return {
  186. subjectInfo: {},
  187. userId: '',
  188. taskId: '',
  189. showGuider: false, //显示灰色背景当作引导
  190. testFlag: true, //显示提示页面与测试页面控制开关
  191. timingShow: true, //倒计时5秒提示开始
  192. timingFlag: null, // 倒计时名称
  193. countDown: 5, //倒计时5秒
  194. countDownStr: "练习测试",
  195. crossShow: true, //显示评分栏
  196. imgShow: true, //图片显示
  197. expressionShow: false, //显示表情图片
  198. buttonShow: true, //显示选择按钮
  199. buttonName: "练习测试",
  200. timeImg: null,
  201. timerRest: null,
  202. cumulation: 0, //累加器
  203. testList: [], // 当前测试列表
  204. practiceList: [], // 练习测试列表
  205. normalList: [], // 正式测试列表
  206. studyList: [],
  207. testTypeCode: 1,
  208. phone: "",
  209. isLoading: false,
  210. marks: {
  211. 0: '',
  212. 1: '1',
  213. 2: '2',
  214. 3: '3',
  215. 4: '4',
  216. 5: '5',
  217. 6: '6',
  218. 7: '7',
  219. 8: '8',
  220. 9: '9',
  221. }, //评分标记
  222. };
  223. },
  224. // 页面初始化函数
  225. created() {
  226. this.subjectInfo = JSON.parse(oSessionStorage.getItem("subjectInfo"));
  227. this.userId = sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f");
  228. this.taskId = this.$route.query.taskId;
  229. this.phone = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9e87");
  230. },
  231. mounted() {
  232. },
  233. methods: {
  234. screen() {
  235. screenfull.toggle();
  236. },
  237. //显示图片方法
  238. showImg(){
  239. this.timingShow = false;
  240. this.imgShow = false;//显示图片
  241. this.crossShow = false;//显示操作按钮
  242. // this.timeImg = setTimeout(()=>{
  243. // this.imgShow = true;//隐藏图片
  244. // },4000)
  245. },
  246. startTiming() {
  247. if (
  248. sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") == "" ||
  249. sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") == null
  250. ) {
  251. this.$message.error("请先登录!");
  252. return;
  253. }
  254. //关闭提示内容窗口
  255. this.testFlag = false;
  256. this.timingShow = true;
  257. this.imgShow = true;
  258. this.crossShow = true;
  259. this.timingFlag = window.setInterval(() => {
  260. if (this.countDown == 0) {
  261. clearInterval(this.timingFlag);
  262. this.countDownStr = "开始";
  263. setTimeout(() => {
  264. //关闭倒计时提示页面
  265. // this.timingShow = false;
  266. // this.crossShow = false;
  267. this.showImg()
  268. this.countDown = 5;
  269. // if (this.testTypeCode == 0) {
  270. // this.showGuider = true;
  271. // }
  272. }, 1000);
  273. } else {
  274. this.countDownStr = this.countDown;
  275. this.countDown--;
  276. }
  277. }, 1000);
  278. },
  279. format(percentage) {
  280. return `${this.cumulation + 1}/${this.testList.length}`;
  281. },
  282. // 随机抽取人数
  283. randomList(arr,length) {
  284. // 从arr中随机获取长度为length不同的数组
  285. let randomArr = [];
  286. for (let k = 0; k < length; k++) {
  287. let id = Math.floor(Math.random() * arr.length);
  288. if (k < arr.length) {
  289. if (randomArr.indexOf(arr[id]) === -1) {
  290. randomArr.push(arr[id]);
  291. } else {
  292. k = k - 1;
  293. continue;
  294. }
  295. } else {
  296. randomArr.push(arr[id]);
  297. }
  298. }
  299. return randomArr;
  300. },
  301. //顺序打乱
  302. shuffle(arr) {
  303. for (let i = 1; i < arr.length; i++) {
  304. const random = Math.floor(Math.random() * (i + 1));
  305. [arr[i], arr[random]] = [arr[random], arr[i]];
  306. }
  307. return arr;
  308. },
  309. // userClick(param) {
  310. // this.testList[this.cumulation].userResponse = param; //用户选择的情绪类型
  311. // this.testList[this.cumulation].correct = param == this.testList[this.cumulation].emoType ? true : false;
  312. // if (this.testTypeCode != 2) {
  313. // this.nextHandle();
  314. // }
  315. // },
  316. // 上一题
  317. prevHandle() {
  318. clearTimeout(this.timeImg);
  319. if (this.cumulation > 0) {
  320. this.cumulation--;
  321. this.showImg()
  322. }
  323. },
  324. // 下一题
  325. nextHandle() {
  326. clearTimeout(this.timeImg);
  327. if (this.cumulation < this.testList.length - 1) {
  328. if(this.testList[this.cumulation].xiaojia == 0 ||
  329. this.testList[this.cumulation].huanqi == 0 ||
  330. this.testList[this.cumulation].youshi == 0)
  331. {
  332. this.$message.warning("请选择对应的评分!");
  333. } else {
  334. this.cumulation++;
  335. if (this.cumulation == 42 || this.cumulation == 133 || this.cumulation == 219) {
  336. this.imgShow = true;
  337. this.timingShow = true;
  338. this.crossShow = true;
  339. this.threeMinDown();
  340. }else {
  341. this.showImg()
  342. }
  343. }
  344. } else {
  345. if (this.testTypeCode == 1) {
  346. // let rate = this.getCorrectRate(this.testList);
  347. this.practiceResult(1);
  348. } else if (this.testTypeCode == 2) {
  349. this.submitData();
  350. } else {
  351. // this.showGuider = false;
  352. // this.testFlag = true;
  353. // this.cumulation = 0;
  354. // this.testTypeCode = 1;
  355. // this.buttonName = "练习阶段";
  356. // this.countDownStr = "练习阶段";
  357. }
  358. }
  359. },
  360. // 计算准确率
  361. getCorrectRate(arr) {
  362. let num = 0;
  363. for (let i = 0; i < arr.length; i++) {
  364. if (arr[i].correct) {
  365. num += 1;
  366. }
  367. }
  368. return num / arr.length;
  369. },
  370. // 练习测试结果处理
  371. practiceResult(rate) {
  372. if (rate >= 0.8) {
  373. this.$message.success("恭喜你,通过练习测试");
  374. this.testTypeCode = 2;
  375. this.buttonName = "正式测试";
  376. this.countDownStr = "正式测试";
  377. } else {
  378. this.testTypeCode = 1;
  379. this.$message.warning("未通过练习测试");
  380. this.countDownStr = "练习测试";
  381. this.buttonName = "练习测试";
  382. }
  383. this.countDown = 5;
  384. this.testFlag = true;
  385. this.cumulation = 0;
  386. screenfull.exit();
  387. },
  388. submitData() {
  389. if (this.isLoading) {
  390. return;
  391. }
  392. this.isLoading = true;//防重复点击
  393. // let results = [];
  394. // this.testList.forEach((el) => {
  395. // results.push({
  396. // name: el.name, // 图片名称
  397. // emoType: el.emoType, // 情绪类型
  398. // userResponse: el.userResponse, // 用户反映类型
  399. // correct: el.correct, // 是否正确
  400. // xiyin: el.xiyin, // 吸引力
  401. // yuyue: el.yuyue, // 愉悦度
  402. // huanxing: el.huanxing, // 唤醒度
  403. // youshi: el.youshi, // 优势度
  404. // });
  405. // });
  406. this.$http.post(
  407. `/cognize/EPRT`,
  408. {
  409. userId: this.userId,
  410. testPlanId: this.$route.query.testPlanId || "",
  411. results: this.testList,
  412. },
  413. (response) => {
  414. this.isLoading = false;
  415. if (response && response.code == "200") {
  416. //跳转新测试结果页面
  417. this.goTestResult(response.data);
  418. } else {
  419. this.$message.error("接口数据出错");
  420. }
  421. },
  422. (err) => {
  423. this.isLoading = false;
  424. }
  425. );
  426. screenfull.exit();
  427. this.$message({
  428. message: "测试结束!",
  429. type: "success",
  430. });
  431. },
  432. startTest() {
  433. screenfull.request();
  434. if (this.testTypeCode == 0) {
  435. // 生成学习列表
  436. // this.createStudyList().then(() => {
  437. // preloader(this.studyList, () => {
  438. // this.testList = this.studyList;
  439. // this.startTiming();
  440. // });
  441. // });
  442. } else if (this.testTypeCode == 1) {
  443. // 生成练习测试列表
  444. // this.createPriticeList().then(() => {
  445. // preloader(this.practiceList, () => {
  446. // this.testList = this.practiceList;
  447. // this.startTiming();
  448. // });
  449. // });
  450. this.testList = this.randomList(fearLevel1,5)
  451. preloader(this.testList, () => {
  452. this.startTiming();
  453. });
  454. } else {
  455. // 生成正式测试列表
  456. let allArr = [this.shuffle(fearLevel1),this.shuffle(fearLevel2),this.shuffle(fearLevel3),this.shuffle(fearLevel4)]
  457. let randomNum = this.shuffle([0,1,2,3]);
  458. // console.log(allArr,"总数组")
  459. // console.log(randomNum,"随机序号")
  460. let itemArr = [...allArr[randomNum[0]],...allArr[randomNum[1]],...allArr[randomNum[2]],...allArr[randomNum[3]]]
  461. this.testList = itemArr;
  462. // console.log(this.testList,"最终数组")
  463. preloader(this.testList, () => {
  464. this.startTiming();
  465. });
  466. }
  467. },
  468. // 倒计时三分钟
  469. threeMinDown() {
  470. this.countDownStr = "休息一下";
  471. let seconds = 30;
  472. this.timerRest = setInterval(()=> {
  473. if (seconds >= 0) {
  474. this.countDownStr = seconds
  475. --seconds;
  476. } else {
  477. this.countDownStr = "";
  478. // this.crossShow = false;
  479. // this.timingShow = false;
  480. this.showImg();
  481. clearInterval(this.timerRest);
  482. }
  483. }, 1000);
  484. },
  485. },
  486. destroyed() {
  487. clearInterval(this.timingFlag);
  488. clearInterval(this.timerRest);
  489. clearTimeout(this.timeImg)
  490. },
  491. }
  492. </script>
  493. <style scoped>
  494. .butt {
  495. width: 100px;
  496. text-align: center;
  497. border: 1px solid rgb(87, 172, 187);
  498. opacity: 1;
  499. border-radius: 10px;
  500. }
  501. .bgAdd {
  502. width: 150px;
  503. height: 400px;
  504. background: url("../../assets/congnitiveAblitity/whiteFlag-new.png") no-repeat center;
  505. position: absolute;
  506. top: 25%;
  507. left: 50%;
  508. margin-left: -75px;
  509. }
  510. .activeTask {
  511. width: 100%;
  512. height: 100%;
  513. background: url("../../assets/congnitiveAblitity/rememberAbilityTask.png") no-repeat center;
  514. background-size: cover;
  515. position: fixed;
  516. top: 0;
  517. left: 0;
  518. right: 0;
  519. bottom: 0;
  520. }
  521. .timingBox {
  522. position: absolute;
  523. top: 50%;
  524. left: 50%;
  525. transform: translate(-50%, -50%);
  526. color: black;
  527. font-size: 70px;
  528. text-align: center;
  529. line-height: 100px;
  530. margin: 0 auto;
  531. z-index: 10;
  532. }
  533. .test-content {
  534. width: 100%;
  535. padding-top: 15vh;
  536. display: flex;
  537. flex-direction: row;
  538. justify-content: space-around;
  539. align-items: center;
  540. }
  541. .test-content-opt {
  542. width: 45%;
  543. }
  544. /* .active-img {
  545. position: absolute;
  546. width: 450px;
  547. height: 450px;
  548. top: 50%;
  549. left: 50%;
  550. transform: translate(-50%, -50%);
  551. z-index: 10;
  552. } */
  553. .btn-content {
  554. width: 70%;
  555. /*text-align: center;*/
  556. /*position: absolute;*/
  557. /*left: 50%;*/
  558. /*transform: translate(-50%);*/
  559. margin-top: 26px;
  560. /*z-index: 1000;*/
  561. display: flex;
  562. flex-direction: row;
  563. justify-content: space-between;
  564. }
  565. .scaleName {
  566. margin-top: 70px;
  567. background-size: cover;
  568. }
  569. .scaleButton {
  570. margin-top: 20px;
  571. margin-bottom: 20px;
  572. background-size: cover;
  573. background: rgb(87, 172, 187);
  574. border: 2px solid rgb(255, 255, 255);
  575. box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
  576. opacity: 1;
  577. border-radius: 39px;
  578. color: #ffffff;
  579. }
  580. .steering {
  581. width: 50%;
  582. position: absolute;
  583. bottom: 20%;
  584. left: 50%;
  585. transform: translateX(-50%);
  586. display: flex;
  587. justify-content: space-between;
  588. }
  589. .steering .left {
  590. width: 60px;
  591. height: 60px;
  592. background: url(../../assets/left.png) no-repeat center;
  593. }
  594. .steering .right {
  595. width: 60px;
  596. height: 60px;
  597. background: url(../../assets/right.png) no-repeat center;
  598. margin-left: 15px;
  599. }
  600. .guider {
  601. position: absolute;
  602. top: 0;
  603. bottom: 0;
  604. left: 0;
  605. right: 0;
  606. z-index: 999;
  607. background: rgba(0, 0, 0, 0.75);
  608. }
  609. .addImg {
  610. width: 40%;
  611. height: auto;
  612. z-index: 1000;
  613. }
  614. .shape_glass {
  615. display: flex;
  616. justify-content: center;
  617. align-items: center;
  618. width: 50%;
  619. height: auto;
  620. /*min-height: 60%;*/
  621. /*margin: 2vh auto 0;*/
  622. }
  623. .shape_glass img {
  624. width: 100%;
  625. }
  626. .active {
  627. position: relative;
  628. }
  629. .active:after {
  630. background-color: #2ea598;
  631. }
  632. /* 设置动画后颜色 */
  633. .active:before {
  634. background-color: rgba(0, 168, 253, 0.2);
  635. }
  636. /* 设置动画 */
  637. .active:before,
  638. .active:after {
  639. content: "";
  640. width: 80px;
  641. height: 40px;
  642. position: absolute;
  643. left: 50%;
  644. top: 50%;
  645. margin-left: -40px;
  646. margin-top: -20px;
  647. border-radius: 10%;
  648. animation: warn 1.5s ease-out 0s infinite;
  649. }
  650. @keyframes warn {
  651. 0% {
  652. transform: scale(1.3);
  653. opacity: 0.6;
  654. }
  655. 50% {
  656. transform: scale(1.4);
  657. opacity: 0.3;
  658. }
  659. 100% {
  660. transform: scale(1.5);
  661. opacity: 0.1;
  662. }
  663. }
  664. .txt {
  665. width: 300px;
  666. margin: 0 auto;
  667. font-size: 16px;
  668. color: #ffffff;
  669. position: absolute;
  670. left: 50%;
  671. top: 70%;
  672. transform: translateX(-50%);
  673. z-index: 1000;
  674. }
  675. .explain {
  676. padding: 6px 8px;
  677. border: 2px solid #0abdc4;
  678. border-radius: 5px;
  679. }
  680. .block {
  681. width: 100%;
  682. /*margin: 7vw auto 0;*/
  683. }
  684. .block .slider {
  685. display: flex;
  686. align-items: center;
  687. margin-top: 30px;
  688. flex-direction: row;
  689. justify-content: flex-start;
  690. }
  691. .block .slider i {
  692. font-size: 18px;
  693. margin-right: 5px;
  694. }
  695. .slider .slide-item {
  696. width: 70%;
  697. margin-left: 20px;
  698. position: relative;
  699. }
  700. .slider .slider-title {
  701. width: 55px;
  702. }
  703. .slide-item .slide-item-left {
  704. position: absolute;
  705. left: -12px;
  706. top: -10px;
  707. font-size: 12px;
  708. color: #909399;
  709. }
  710. .slide-item .slide-item-right {
  711. position: absolute;
  712. right: -12px;
  713. top: -10px;
  714. font-size: 12px;
  715. color: #909399;
  716. }
  717. .choose {
  718. color: #19b381;
  719. border: 2px solid #19b381;
  720. }
  721. </style>