index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. <template>
  2. <div class="flex h-full w-full flex-col">
  3. <toBackCom
  4. title="首页"
  5. :rou="{
  6. name: '4806d051-e037-4d9d-99a0-78aa2f2f362b',
  7. }"
  8. />
  9. <div class="bm-main-box" style="flex-direction: row">
  10. <div class="flex flex-1 flex-col gap-4 overflow-hidden px-4">
  11. <div
  12. class="flex h-15 items-center text-xl font-bold text-[#2E3238]"
  13. style="border-bottom: var(--czr-border)"
  14. >
  15. {{ sxOnethingInfo.onething }}
  16. </div>
  17. <div class="flex h-13 items-center justify-between">
  18. <template v-for="(item, index) in state.step.options">
  19. <template v-if="index > 0">
  20. <div class="h-0.5 w-6 bg-[#cbced3]" />
  21. </template>
  22. <div
  23. class="flex items-center text-base"
  24. :class="`${
  25. item.finish || item.wait
  26. ? 'font-bold text-[#2E3238]'
  27. : 'text-[#A7ADB9]'
  28. } ${item.finish || item.wait ? '__hover' : 'cursor-no-drop'}`"
  29. @click="
  30. item.finish || item.wait
  31. ? (state.step.index = index)
  32. : undefined
  33. "
  34. >
  35. <div
  36. class="mr-2.5 flex size-8 items-center justify-center rounded-full border-1 border-[#A7ADB9]"
  37. :class="
  38. item.finish || item.wait
  39. ? 'border-[var(--czr-main-color)] bg-[var(--czr-main-color)] text-[#ffffff]'
  40. : 'border-[#A7ADB9]'
  41. "
  42. >
  43. {{ index + 1 }}
  44. </div>
  45. {{ item.label }}
  46. </div>
  47. </template>
  48. </div>
  49. <template v-if="state.step.index === 0">
  50. <div class="flex flex-1 flex-col gap-4 overflow-hidden">
  51. <div class="__czr-title_2">
  52. {{ state.step.options[state.step.index].label }}
  53. </div>
  54. <div
  55. class="acceptcondition max-h-fit flex-1 overflow-y-auto rounded-sm bg-[#0062E9]/5 p-4 text-sm text-[#576275]"
  56. v-html="sxOnethingInfo.acceptcondition"
  57. />
  58. <div
  59. class="flex h-10.5 w-full items-center justify-center rounded-lg bg-[#EAF1FF] text-base text-[var(--czr-main-color)]"
  60. :class="
  61. state.step.options[state.step.index].time > 0
  62. ? 'cursor-no-drop'
  63. : '__hover'
  64. "
  65. @click="onStep(state.step.index)"
  66. v-if="!state.step.options[state.step.index].finish"
  67. >
  68. 我已阅读并遵守以上规定
  69. <template v-if="state.step.options[state.step.index].time > 0">
  70. ({{ state.step.options[state.step.index].time }}s)
  71. </template>
  72. </div>
  73. </div>
  74. </template>
  75. <template v-else-if="state.step.index === 1">
  76. <div class="flex flex-1 flex-col gap-4 overflow-hidden">
  77. <div class="__czr-title_2">
  78. {{ state.step.options[state.step.index].label }}
  79. </div>
  80. <div
  81. class="max-h-fit flex-1 overflow-y-auto rounded-sm bg-[#0062E9]/5 p-4 text-sm text-[#576275]"
  82. >
  83. <treeNode
  84. :data="state.step.options[state.step.index].questions"
  85. ref="ref_treeNode"
  86. @onChange="getAnswer"
  87. :view="state.step.options[state.step.index].finish"
  88. />
  89. </div>
  90. <div
  91. class="flex h-10.5 w-full items-center justify-center rounded-lg text-base"
  92. :class="
  93. state.step.options[state.step.index].complete
  94. ? '__hover bg-[var(--czr-main-color)] text-[#ffffff]'
  95. : 'cursor-no-drop bg-[#EAF1FF] text-[var(--czr-main-color)]'
  96. "
  97. @click="onStep(state.step.index)"
  98. v-if="!state.step.options[state.step.index].finish"
  99. >
  100. 确定
  101. </div>
  102. </div>
  103. </template>
  104. <template v-else-if="state.step.index === 2">
  105. <div class="flex flex-1 flex-col gap-4 overflow-hidden">
  106. <div class="max-h-fit flex-1 overflow-y-auto">
  107. <CzrForm
  108. ref="ref_form"
  109. label-width="6.1rem"
  110. layout="y"
  111. :form-view="state.step.options[state.step.index].finish"
  112. >
  113. <div class="__czr-title_2">基本信息表</div>
  114. <div
  115. class="mt-4 grid w-full grid-cols-2 gap-x-4 rounded-sm bg-[#0062E9]/5 p-4 text-sm text-[#576275]"
  116. >
  117. <CzrFormColumn
  118. required
  119. :span="24"
  120. label="姓名"
  121. v-model:param="
  122. state.step.options[state.step.index].form.name
  123. "
  124. :disabled="true"
  125. />
  126. <CzrFormColumn
  127. required
  128. :span="24"
  129. label="手机号码"
  130. v-model:param="state.step.options[state.step.index].form.a1"
  131. />
  132. <CzrFormColumn
  133. required
  134. :span="24"
  135. label="证件类型"
  136. v-model:param="
  137. state.step.options[state.step.index].form.certType
  138. "
  139. :disabled="true"
  140. />
  141. <CzrFormColumn
  142. required
  143. :span="24"
  144. label="证件号码"
  145. v-model:param="
  146. state.step.options[state.step.index].form.certNumber
  147. "
  148. :disabled="true"
  149. />
  150. <CzrFormColumn
  151. class="col-span-2"
  152. required
  153. :span="24"
  154. label="籍贯"
  155. v-model:param="state.step.options[state.step.index].form.a2"
  156. />
  157. <CzrFormColumn
  158. class="col-span-2"
  159. required
  160. :span="24"
  161. label="联系地址"
  162. v-model:param="state.step.options[state.step.index].form.a3"
  163. type="textarea"
  164. :rows="2"
  165. />
  166. </div>
  167. <div class="__czr-title_2 mt-4">
  168. 海南省灵活就业人员参保登记表
  169. </div>
  170. <div
  171. class="mt-4 grid w-full grid-cols-2 gap-x-4 rounded-sm bg-[#0062E9]/5 p-4 text-sm text-[#576275]"
  172. >
  173. <div class="col-span-2 mb-4 font-bold text-[#2E3238]">
  174. 基本信息
  175. </div>
  176. <CzrFormColumn
  177. required
  178. :span="24"
  179. label="证件类型"
  180. v-model:param="state.step.options[state.step.index].form.b1"
  181. link="select"
  182. :options="[
  183. { label: '居民身份证(户口簿)', value: 1 },
  184. { label: '中国人民解放军军官证', value: 2 },
  185. { label: '中国人民武装警察警官证', value: 3 },
  186. {
  187. label: '香港特区护照/港澳居民来往内地通行证',
  188. value: 4,
  189. },
  190. {
  191. label: '澳门特区护照/港澳居民来往内地通行证',
  192. value: 5,
  193. },
  194. { label: '台湾居民居住证', value: 6 },
  195. { label: '外国人永久居留证', value: 7 },
  196. ]"
  197. />
  198. <CzrFormColumn
  199. required
  200. :span="24"
  201. label="户口所属区"
  202. v-model:param="state.step.options[state.step.index].form.b2"
  203. />
  204. <CzrFormColumn
  205. required
  206. :span="24"
  207. label="户口性质"
  208. v-model:param="state.step.options[state.step.index].form.b3"
  209. link="select"
  210. :options="[
  211. { label: '本省城镇', value: 1 },
  212. { label: '外省城镇', value: 2 },
  213. { label: '本省农村', value: 3 },
  214. { label: '外省农村', value: 4 },
  215. { label: '香港特别行政区居民', value: 5 },
  216. { label: '澳门特别行政区居民', value: 6 },
  217. { label: '台湾地区居民', value: 7 },
  218. ]"
  219. />
  220. <CzrFormColumn
  221. class="col-span-2"
  222. required
  223. :span="24"
  224. label="户口所在地"
  225. v-model:param="state.step.options[state.step.index].form.b4"
  226. type="textarea"
  227. :rows="2"
  228. />
  229. <CzrFormColumn
  230. class="col-span-2"
  231. required
  232. :span="24"
  233. label="现居住地址"
  234. v-model:param="state.step.options[state.step.index].form.b5"
  235. type="textarea"
  236. :rows="2"
  237. />
  238. <CzrFormColumn
  239. required
  240. :span="24"
  241. label="学历"
  242. v-model:param="state.step.options[state.step.index].form.b6"
  243. link="select"
  244. :options="[
  245. { label: '博士研究生', value: 1 },
  246. { label: '硕士研究生', value: 2 },
  247. { label: '大学本科', value: 3 },
  248. { label: '大学专科', value: 4 },
  249. { label: '中等专科', value: 5 },
  250. { label: '职业高中', value: 6 },
  251. {
  252. label: '技工学校(技师班、中级工班、高级工班)',
  253. value: 7,
  254. },
  255. ]"
  256. />
  257. <CzrFormColumn
  258. required
  259. :span="24"
  260. label="国家/地区"
  261. v-model:param="state.step.options[state.step.index].form.b7"
  262. />
  263. <div class="col-span-2 mb-4 font-bold text-[#2E3238]">
  264. 参保信息
  265. </div>
  266. <CzrFormColumn
  267. required
  268. :span="24"
  269. label="统筹区"
  270. v-model:param="state.step.options[state.step.index].form.c1"
  271. link="select"
  272. :options="[
  273. { label: '琼海市社会保险服务中心', value: 1 },
  274. { label: '万宁市社会保险服务中心', value: 2 },
  275. { label: '东方市社会保险服务中心', value: 3 },
  276. { label: '洋浦经济开发区社会保险服务中心', value: 4 },
  277. { label: '三亚市社会保险服务中心', value: 5 },
  278. { label: '五指山市社会保险服务中心', value: 6 },
  279. { label: '海南省', value: 7 },
  280. ]"
  281. />
  282. <CzrFormColumn
  283. required
  284. :span="24"
  285. label="参保情况"
  286. v-model:param="state.step.options[state.step.index].form.c2"
  287. link="select"
  288. :options="[
  289. { label: '首次参保', value: 1 },
  290. { label: '已参过保', value: 2 },
  291. ]"
  292. />
  293. <CzrFormColumn
  294. required
  295. :span="24"
  296. label="参保险种"
  297. v-model:param="state.step.options[state.step.index].form.c3"
  298. link="select"
  299. :options="[
  300. { label: '基本养老保险', value: 1 },
  301. { label: '基本医疗保险', value: 2 },
  302. ]"
  303. />
  304. </div>
  305. <div class="__czr-title_2 mt-4">
  306. 基本养老保险、职业(企业)年金关系转移接续申请表
  307. </div>
  308. <div
  309. class="mt-4 grid w-full grid-cols-2 gap-x-4 rounded-sm bg-[#0062E9]/5 p-4 text-sm text-[#576275]"
  310. >
  311. <CzrFormColumn
  312. class="col-span-2"
  313. required
  314. :span="24"
  315. label="户籍所在地"
  316. v-model:param="state.step.options[state.step.index].form.d1"
  317. type="textarea"
  318. :rows="2"
  319. />
  320. <CzrFormColumn
  321. required
  322. :span="24"
  323. label="申请日期"
  324. v-model:param="state.step.options[state.step.index].form.d2"
  325. link="date"
  326. />
  327. </div>
  328. </CzrForm>
  329. </div>
  330. <div
  331. class="__hover flex h-10.5 w-full items-center justify-center rounded-lg bg-[var(--czr-main-color)] text-base text-[#ffffff]"
  332. @click="onStep(state.step.index)"
  333. v-if="!state.step.options[state.step.index].finish"
  334. >
  335. 确定
  336. </div>
  337. </div>
  338. </template>
  339. <template v-else-if="state.step.index === 3">
  340. <div class="__czr-title_2">
  341. {{ state.step.options[state.step.index].label }}
  342. </div>
  343. <div
  344. class="mt-4 flex w-full flex-col gap-4 rounded-sm bg-[#0062E9]/5 p-4 text-sm text-[#576275]"
  345. >
  346. <template
  347. v-for="(item, index) in state.step.options[state.step.index]
  348. .fileList"
  349. >
  350. <div class="flex items-center">
  351. <SvgIcon name="document" :active="true" />
  352. <div class="ml-1 text-sm text-[#303133]">
  353. {{ item.materialname }}
  354. </div>
  355. <div
  356. class="ml-2 rounded-xs border-1 border-[var(--czr-error-color)] bg-[var(--czr-error-color)]/10 px-1 py-0.5 text-[0.63rem] text-[var(--czr-error-color)]"
  357. >
  358. {{
  359. item.isneed === '1'
  360. ? `必要`
  361. : item.isneed === '2'
  362. ? `非必要`
  363. : item.isneed === '3'
  364. ? `容缺后补`
  365. : ``
  366. }}
  367. </div>
  368. <div class="ml-auto flex items-center">
  369. <template v-if="item.__isUpload">
  370. <div class="flex items-center gap-1 text-xs text-[#909399]">
  371. <template v-if="item.__url">
  372. <SvgIcon
  373. name="success"
  374. color="var(--czr-success-color)"
  375. size="14"
  376. />已上传
  377. <div class="mx-2 text-xs text-[var(--czr-main-color)]">
  378. |
  379. </div>
  380. <SvgIcon
  381. name="czr_del"
  382. :active="true"
  383. class="__hover"
  384. @click="
  385. ((item.__isUpload = false), (item.__url = ''))
  386. "
  387. />
  388. </template>
  389. <template v-else> {{ item.__process }}% </template>
  390. </div>
  391. </template>
  392. <template v-else>
  393. <a-button
  394. size="small"
  395. type="primary"
  396. @click="onUpload(item)"
  397. >上传</a-button
  398. >
  399. </template>
  400. </div>
  401. </div>
  402. </template>
  403. </div>
  404. <div
  405. class="flex h-10.5 w-full items-center justify-center rounded-lg text-base"
  406. :class="
  407. state.step.options[state.step.index].complete
  408. ? '__hover bg-[var(--czr-main-color)] text-[#ffffff]'
  409. : 'cursor-no-drop bg-[#EAF1FF] text-[var(--czr-main-color)]'
  410. "
  411. @click="onStep(state.step.index)"
  412. v-if="!state.step.options[state.step.index].finish"
  413. >
  414. 下一步
  415. </div>
  416. </template>
  417. <template v-else-if="state.step.index === 4">
  418. <div class="__czr-title_2">
  419. {{ state.step.options[state.step.index].label }}
  420. </div>
  421. <CzrForm
  422. ref="ref_form"
  423. :form-view="state.step.options[state.step.index].finish"
  424. >
  425. <CzrFormColumn
  426. class="__czr-table-form-column"
  427. :span="24"
  428. label="结果领取方式"
  429. v-model:param="state.step.options[state.step.index].form.method"
  430. link="radio"
  431. :options="[
  432. { label: '邮寄', value: 1 },
  433. { label: '线下领取', value: 2 },
  434. ]"
  435. />
  436. <div
  437. class="w-full rounded-sm bg-[#0062E9]/5 p-4 text-sm text-[#576275]"
  438. >
  439. <div class="mb-2 text-sm text-[#2E3238]">领取地址</div>
  440. <CzrFormColumn
  441. class="__czr-table-form-column"
  442. required
  443. :span="24"
  444. label-width="0px"
  445. v-model:param="
  446. state.step.options[state.step.index].form.address
  447. "
  448. type="textarea"
  449. :rows="4"
  450. />
  451. </div>
  452. </CzrForm>
  453. <div
  454. class="flex h-10.5 w-full items-center justify-center rounded-lg text-base"
  455. :class="
  456. state.step.options[state.step.index].form.address.trim()
  457. ? '__hover bg-[var(--czr-main-color)] text-[#ffffff]'
  458. : 'cursor-no-drop bg-[#EAF1FF] text-[var(--czr-main-color)]'
  459. "
  460. @click="onStep(state.step.index)"
  461. v-if="!state.step.options[state.step.index].finish"
  462. >
  463. 提交
  464. </div>
  465. </template>
  466. </div>
  467. <div
  468. class="m-1 flex-1 overflow-hidden rounded-lg border-1 border-[var(--czr-main-color)]/5 shadow"
  469. >
  470. <chat :online="false" :ID="state.ID" ref="ref_chat" />
  471. </div>
  472. </div>
  473. </div>
  474. </template>
  475. <script setup lang="ts">
  476. import {
  477. defineAsyncComponent,
  478. markRaw,
  479. nextTick,
  480. onMounted,
  481. provide,
  482. reactive,
  483. ref,
  484. } from 'vue'
  485. import { mockQuestion, sxOnethingInfo, sxImplBasicMaterial } from './mock'
  486. import treeNode from './tree-node.vue'
  487. import toBackCom from '@/views/manage/components/to-back.vue'
  488. import { useRoute, useRouter } from 'vue-router'
  489. import { appDetail } from '@/api/modules/app'
  490. import chat from '@/views/chat/index.vue'
  491. import { isValue } from '@/utils/czr-util'
  492. import { v4 } from 'uuid'
  493. import { fileUploadFile } from '@/api/modules/global/upload'
  494. const route = useRoute()
  495. const router = useRouter()
  496. const state: any = reactive({
  497. ID: route.params.id,
  498. detail: {},
  499. answers: [],
  500. step: {
  501. options: [
  502. { label: '用户须知', finish: false, wait: true, time: 0 },
  503. {
  504. label: '情形选择',
  505. finish: false,
  506. wait: false,
  507. complete: false,
  508. questions: mockQuestion.conditionInfo,
  509. answers: [],
  510. },
  511. {
  512. label: '表单填写',
  513. finish: false,
  514. wait: false,
  515. form: {
  516. name: '张三',
  517. certType: '身份证',
  518. certNumber: '438123*********678',
  519. },
  520. },
  521. {
  522. label: '材料上传',
  523. finish: false,
  524. wait: false,
  525. fileList: sxImplBasicMaterial().map((v) => ({ ...v, __url: '' })),
  526. },
  527. {
  528. label: '结果领取',
  529. finish: false,
  530. wait: false,
  531. form: {
  532. method: 1,
  533. address: '',
  534. },
  535. },
  536. ],
  537. index: 4,
  538. },
  539. })
  540. const ref_chat = ref()
  541. const ref_treeNode = ref()
  542. const ref_form = ref()
  543. const getAnswer = () => {
  544. state.step.options[state.step.index].answers = ref_treeNode.value.getAnswer()
  545. state.step.options[state.step.index].complete = state.step.options[
  546. state.step.index
  547. ].answers.every((a) => a.every((b) => isValue(b)))
  548. }
  549. const onStep = (index) => {
  550. const current = state.step.options[state.step.index]
  551. switch (state.step.index) {
  552. case 0:
  553. {
  554. if (!current.finish) {
  555. current.finish = true
  556. current.wait = false
  557. state.step.options[index + 1].wait = true
  558. ref_chat.value.mockAnswer({
  559. text: '欢迎进入事项网办阶段!请选择情形',
  560. })
  561. }
  562. state.step.index = index + 1
  563. }
  564. break
  565. case 1:
  566. {
  567. if (current.complete) {
  568. if (!current.finish) {
  569. current.finish = true
  570. current.wait = false
  571. state.step.options[index + 1].wait = true
  572. const id = v4()
  573. const ddd = () => {
  574. console.log(123123)
  575. }
  576. ref_chat.value.mockAnswer({
  577. text: '欢迎进入表单填写阶段!为了让您的体验更加顺畅,我已经贴心地为您预先填写了部分内容。接下来,请在左侧补充剩余的信息,感谢您的配合!',
  578. teleport: id,
  579. com: {
  580. is: defineAsyncComponent(
  581. () =>
  582. import(
  583. '@/views/business/doing-with-chat/chat/form-list.vue'
  584. ),
  585. ),
  586. binds: {
  587. data: ['asdasd', 'zxvzxvzxv'],
  588. ddd,
  589. },
  590. },
  591. })
  592. // state.components.push({
  593. // id,
  594. // is: defineAsyncComponent(
  595. // () =>
  596. // import(
  597. // '@/views/business/doing-with-chat/chat/form-list.vue'
  598. // ),
  599. // ),
  600. // props: {
  601. // data: ['asdasda', 'faszxcszczxc'],
  602. // },
  603. // })
  604. }
  605. state.step.index = index + 1
  606. }
  607. }
  608. break
  609. case 2:
  610. {
  611. // ref_form.value.submit().then(() => {
  612. if (!current.finish) {
  613. current.finish = true
  614. current.wait = false
  615. state.step.options[index + 1].wait = true
  616. ref_chat.value.mockAnswer({
  617. text: '表单已填写完成!接下来进入材料上传阶段!以下是需要您提供的材料,请在左侧上传',
  618. })
  619. }
  620. state.step.index = index + 1
  621. // })
  622. }
  623. break
  624. case 3:
  625. {
  626. if (!current.finish) {
  627. current.finish = true
  628. current.wait = false
  629. state.step.options[index + 1].wait = true
  630. ref_chat.value.mockAnswer({
  631. text: '请填写结果材料领取方式',
  632. })
  633. }
  634. state.step.index = index + 1
  635. }
  636. break
  637. case 4:
  638. {
  639. ref_form.value.submit().then(() => {
  640. if (!current.finish) {
  641. current.finish = true
  642. current.wait = false
  643. ref_chat.value.mockAnswer({
  644. text: '办理成功!该事项将在8个工作日内办结,请耐心等待',
  645. })
  646. }
  647. })
  648. }
  649. break
  650. }
  651. }
  652. const onUpload = (row) => {
  653. const oldInput = document.getElementById('fileInput')
  654. if (oldInput) {
  655. oldInput.remove()
  656. }
  657. const fileInput = document.createElement('input')
  658. fileInput.type = 'file'
  659. fileInput.id = 'fileInput'
  660. fileInput.style.display = 'none'
  661. document.body.appendChild(fileInput)
  662. fileInput.addEventListener('change', (e: any) => {
  663. const file = e.target.files[0]
  664. if (file) {
  665. const formData = new FormData()
  666. formData.append('file', file)
  667. row.__isUpload = true
  668. fileUploadFile(formData, (process) => {
  669. row.__process = process
  670. })
  671. .then(({ data }: any) => {
  672. row.__url = data.path
  673. if (
  674. state.step.options[state.step.index].fileList.every((v) => v.__url)
  675. ) {
  676. state.step.options[state.step.index].complete = true
  677. ref_chat.value.mockAnswer({
  678. text: '检测到您已上传必要材料,请再次核对,上传完成无误后点击下一步',
  679. })
  680. }
  681. })
  682. .catch(() => {})
  683. .finally(() => {})
  684. }
  685. })
  686. fileInput.click()
  687. }
  688. onMounted(() => {
  689. initDetail()
  690. console.log(sxImplBasicMaterial())
  691. })
  692. const initDetail = () => {
  693. if (state.ID) {
  694. appDetail(state.ID)
  695. .then(({ data }: any) => {
  696. state.detail = data
  697. document.title = state.detail.name
  698. nextTick(() => {
  699. ref_chat.value?.init()
  700. const timer = setInterval(() => {
  701. state.step.options[0].time -= 1
  702. if (state.step.options[0].time === 0) {
  703. clearInterval(timer)
  704. }
  705. }, 1000)
  706. })
  707. })
  708. .catch(() => {
  709. router.push({ name: '4806d051-e037-4d9d-99a0-78aa2f2f362b' })
  710. })
  711. } else {
  712. router.push({ name: '4806d051-e037-4d9d-99a0-78aa2f2f362b' })
  713. }
  714. }
  715. </script>
  716. <style lang="scss" scoped>
  717. .acceptcondition > * {
  718. line-height: 1.5rem;
  719. }
  720. </style>