1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<template>
<ConfigForms form-type="1" @addMethods="addMethods"></ConfigForms>
</template>
<script>
import ConfigForms from "./components/ConfigForms.vue"
export default {
name: "ScreeningAdd",
components: {
ConfigForms,
},
provide() {
const showIndex = true
return {
showIndex,
}
},
data() {
return {}
},
created() {
sessionStorage.removeItem("survey_time")
sessionStorage.removeItem("birthday")
sessionStorage.removeItem("addSex")
this.$store.commit("table/setAge", "")
},
methods: {
// 处理部分逻辑
addMethods(v) {
console.log(v)
if (v.activeName == "index0") {
let data = {
birthday: v.form.birthday,
sex: v.form.sex,
survey_time: v.form.survey_time,
}
sessionStorage.setItem("index1Data", JSON.stringify(data))
}
},
},
// beforeRouteEnter(to, from, next) {
// next()
// },
}
</script>
<style lang="scss" scoped></style>