|
@@ -56,11 +56,11 @@
|
|
|
v-html="sxOnethingInfo.acceptcondition"
|
|
|
/>
|
|
|
<div
|
|
|
- class="flex h-10.5 w-full items-center justify-center rounded-lg bg-[#EAF1FF] text-base text-[var(--czr-main-color)]"
|
|
|
+ class="flex h-10.5 w-full items-center justify-center rounded-lg bg-[#EAF1FF] text-base"
|
|
|
:class="
|
|
|
- state.step.options[state.step.index].time > 0
|
|
|
- ? 'cursor-no-drop'
|
|
|
- : '__hover'
|
|
|
+ state.step.options[state.step.index].complete
|
|
|
+ ? '__hover bg-[var(--czr-main-color)] text-[#ffffff]'
|
|
|
+ : 'cursor-no-drop bg-[#EAF1FF] text-[var(--czr-main-color)]'
|
|
|
"
|
|
|
@click="onStep(state.step.index)"
|
|
|
v-if="!state.step.options[state.step.index].finish"
|
|
@@ -353,7 +353,10 @@
|
|
|
{{ item.materialname }}
|
|
|
</div>
|
|
|
<div
|
|
|
- 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)]"
|
|
|
+ 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]"
|
|
|
+ :class="
|
|
|
+ item.isneed == 1 ? 'text-[var(--czr-error-color)]' : ''
|
|
|
+ "
|
|
|
>
|
|
|
{{
|
|
|
item.isneed === '1'
|
|
@@ -374,17 +377,25 @@
|
|
|
color="var(--czr-success-color)"
|
|
|
size="14"
|
|
|
/>已上传
|
|
|
- <div class="mx-2 text-xs text-[var(--czr-main-color)]">
|
|
|
- |
|
|
|
- </div>
|
|
|
- <SvgIcon
|
|
|
- name="czr_del"
|
|
|
- :active="true"
|
|
|
- class="__hover"
|
|
|
- @click="
|
|
|
- ((item.__isUpload = false), (item.__url = ''))
|
|
|
- "
|
|
|
- />
|
|
|
+ <template
|
|
|
+ v-if="!state.step.options[state.step.index].finish"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="mx-2 text-xs text-[var(--czr-main-color)]"
|
|
|
+ >
|
|
|
+ |
|
|
|
+ </div>
|
|
|
+ <SvgIcon
|
|
|
+ name="czr_del"
|
|
|
+ :active="true"
|
|
|
+ class="__hover"
|
|
|
+ @click="
|
|
|
+ ((item.__isUpload = false),
|
|
|
+ (item.__url = ''),
|
|
|
+ validFiles())
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</template>
|
|
|
<template v-else> {{ item.__process }}% </template>
|
|
|
</div>
|
|
@@ -491,7 +502,7 @@ import {
|
|
|
ref,
|
|
|
} from 'vue'
|
|
|
import { mockQuestion, sxOnethingInfo, sxImplBasicMaterial } from './mock'
|
|
|
-import treeNode from './tree-node.vue'
|
|
|
+import treeNode from './chat/tree-node.vue'
|
|
|
import toBackCom from '@/views/manage/components/to-back.vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import { appDetail } from '@/api/modules/app'
|
|
@@ -510,7 +521,13 @@ const state: any = reactive({
|
|
|
answers: [],
|
|
|
step: {
|
|
|
options: [
|
|
|
- { label: '用户须知', finish: false, wait: true, time: 0 },
|
|
|
+ {
|
|
|
+ label: '用户须知',
|
|
|
+ finish: false,
|
|
|
+ wait: true,
|
|
|
+ complete: false,
|
|
|
+ time: Number(sxOnethingInfo.countdown) || 3,
|
|
|
+ },
|
|
|
{
|
|
|
label: '情形选择',
|
|
|
finish: false,
|
|
@@ -545,7 +562,7 @@ const state: any = reactive({
|
|
|
},
|
|
|
},
|
|
|
],
|
|
|
- index: 4,
|
|
|
+ index: 0,
|
|
|
},
|
|
|
})
|
|
|
const ref_chat = ref()
|
|
@@ -562,15 +579,17 @@ const onStep = (index) => {
|
|
|
switch (state.step.index) {
|
|
|
case 0:
|
|
|
{
|
|
|
- if (!current.finish) {
|
|
|
- current.finish = true
|
|
|
- current.wait = false
|
|
|
- state.step.options[index + 1].wait = true
|
|
|
- ref_chat.value.mockAnswer({
|
|
|
- text: '欢迎进入事项网办阶段!请选择情形',
|
|
|
- })
|
|
|
+ if (current.complete) {
|
|
|
+ if (!current.finish) {
|
|
|
+ current.finish = true
|
|
|
+ current.wait = false
|
|
|
+ state.step.options[index + 1].wait = true
|
|
|
+ ref_chat.value.mockAnswer({
|
|
|
+ text: '欢迎进入事项网办阶段!请选择情形',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ state.step.index = index + 1
|
|
|
}
|
|
|
- state.step.index = index + 1
|
|
|
}
|
|
|
break
|
|
|
case 1:
|
|
@@ -598,30 +617,36 @@ const onStep = (index) => {
|
|
|
break
|
|
|
case 2:
|
|
|
{
|
|
|
- // ref_form.value.submit().then(() => {
|
|
|
- if (!current.finish) {
|
|
|
- current.finish = true
|
|
|
- current.wait = false
|
|
|
- state.step.options[index + 1].wait = true
|
|
|
- ref_chat.value.mockAnswer({
|
|
|
- text: '表单已填写完成!接下来进入材料上传阶段!以下是需要您提供的材料,请在左侧上传',
|
|
|
- })
|
|
|
- }
|
|
|
- state.step.index = index + 1
|
|
|
- // })
|
|
|
+ ref_form.value.submit().then(() => {
|
|
|
+ if (!current.finish) {
|
|
|
+ current.finish = true
|
|
|
+ current.wait = false
|
|
|
+ state.step.options[index + 1].wait = true
|
|
|
+ ref_chat.value.mockAnswer({
|
|
|
+ text: '表单已填写完成!接下来进入材料上传阶段!以下是需要您提供的材料,请在左侧上传',
|
|
|
+ slot: 'material',
|
|
|
+ slotProps: {
|
|
|
+ data: state.step.options[3].fileList,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+ state.step.index = index + 1
|
|
|
+ })
|
|
|
}
|
|
|
break
|
|
|
case 3:
|
|
|
{
|
|
|
- if (!current.finish) {
|
|
|
- current.finish = true
|
|
|
- current.wait = false
|
|
|
- state.step.options[index + 1].wait = true
|
|
|
- ref_chat.value.mockAnswer({
|
|
|
- text: '请填写结果材料领取方式',
|
|
|
- })
|
|
|
+ if (current.complete) {
|
|
|
+ if (!current.finish) {
|
|
|
+ current.finish = true
|
|
|
+ current.wait = false
|
|
|
+ state.step.options[index + 1].wait = true
|
|
|
+ ref_chat.value.mockAnswer({
|
|
|
+ text: '请填写结果材料领取方式',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ state.step.index = index + 1
|
|
|
}
|
|
|
- state.step.index = index + 1
|
|
|
}
|
|
|
break
|
|
|
case 4:
|
|
@@ -631,7 +656,7 @@ const onStep = (index) => {
|
|
|
current.finish = true
|
|
|
current.wait = false
|
|
|
ref_chat.value.mockAnswer({
|
|
|
- text: '办理成功!该事项将在8个工作日内办结,请耐心等待',
|
|
|
+ text: `办理成功!该事项将在${sxOnethingInfo.promiseday}个工作日内办结,请耐心等待`,
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -660,14 +685,7 @@ const onUpload = (row) => {
|
|
|
})
|
|
|
.then(({ data }: any) => {
|
|
|
row.__url = data.path
|
|
|
- if (
|
|
|
- state.step.options[state.step.index].fileList.every((v) => v.__url)
|
|
|
- ) {
|
|
|
- state.step.options[state.step.index].complete = true
|
|
|
- ref_chat.value.mockAnswer({
|
|
|
- text: '检测到您已上传必要材料,请再次核对,上传完成无误后点击下一步',
|
|
|
- })
|
|
|
- }
|
|
|
+ validFiles()
|
|
|
})
|
|
|
.catch(() => {})
|
|
|
.finally(() => {})
|
|
@@ -675,6 +693,16 @@ const onUpload = (row) => {
|
|
|
})
|
|
|
fileInput.click()
|
|
|
}
|
|
|
+const validFiles = () => {
|
|
|
+ if (state.step.options[state.step.index].fileList.every((v) => v.__url)) {
|
|
|
+ state.step.options[state.step.index].complete = true
|
|
|
+ ref_chat.value.mockAnswer({
|
|
|
+ text: '检测到您已上传必要材料,请再次核对,上传完成无误后点击下一步',
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ state.step.options[state.step.index].complete = false
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
onMounted(() => {
|
|
|
initDetail()
|
|
@@ -688,28 +716,11 @@ const initDetail = () => {
|
|
|
document.title = state.detail.name
|
|
|
nextTick(() => {
|
|
|
ref_chat.value?.init()
|
|
|
- ref_chat.value.mockAnswer({
|
|
|
- text: '欢迎进入表单填写阶段!为了让您的体验更加顺畅,我已经贴心地为您预先填写了部分内容。接下来,请在左侧补充剩余的信息,感谢您的配合!',
|
|
|
- slot: 'form',
|
|
|
- slotProps: {
|
|
|
- data: [
|
|
|
- '基本信息表',
|
|
|
- '海南省灵活就业人员参保登记表',
|
|
|
- '基本养老保险、职业(企业)年金关系转移接续申请表',
|
|
|
- ],
|
|
|
- },
|
|
|
- })
|
|
|
- ref_chat.value.mockAnswer({
|
|
|
- text: '表单已填写完成!接下来进入材料上传阶段!以下是需要您提供的材料,请在左侧上传',
|
|
|
- slot: 'material',
|
|
|
- slotProps: {
|
|
|
- data: state.step.options[3].fileList,
|
|
|
- },
|
|
|
- })
|
|
|
const timer = setInterval(() => {
|
|
|
state.step.options[0].time -= 1
|
|
|
if (state.step.options[0].time === 0) {
|
|
|
clearInterval(timer)
|
|
|
+ state.step.options[state.step.index].complete = true
|
|
|
}
|
|
|
}, 1000)
|
|
|
})
|