mental-health-web/src/views/activity/index.vue

61 lines
1.4 KiB
Vue
Raw Normal View History

2024-04-23 06:59:28 +00:00
<template>
2024-06-17 02:56:00 +00:00
<div class="tab-container">
<el-tabs v-model="activeName" style="padding-left: 20px; padding-right: 20px;">
<el-tab-pane label="活动进度" name="schedule">
<schedule :batchNo="batchNo" :sessionName="sessionName"></schedule>
</el-tab-pane>
<el-tab-pane label="活动统计" name="statistics">
<statistics :batchNo="batchNo"></statistics>
</el-tab-pane>
</el-tabs>
<div class="btn-back">
<el-button type="primary" @click="handleBack">返回</el-button>
</div>
</div>
2024-04-23 06:59:28 +00:00
</template>
2024-06-17 02:56:00 +00:00
<script setup lang="ts">
2024-04-23 06:59:28 +00:00
import { ref } from 'vue'
import { useRoute } from 'vue-router'
import statistics from '@/views/activity/component/statistics/index.vue'
import schedule from '@/views/activity/component/schedule/index.vue'
2024-06-17 02:56:00 +00:00
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
2024-04-23 06:59:28 +00:00
const route = useRoute()
2024-07-25 01:53:10 +00:00
const type = route.params.type
2024-04-23 06:59:28 +00:00
const batchNo = route.params.batchNo
2024-04-29 08:03:42 +00:00
const sessionName = route.params.sessionName
2024-04-23 06:59:28 +00:00
const activeName = ref('schedule')
2024-06-17 02:56:00 +00:00
const handleBack = () => {
2024-07-25 01:53:10 +00:00
if (type == '1') {
const obj = { path: "/scale/SysScalePublish" };
proxy?.$tab.closeOpenPage(obj);
}
if(type == '2') {
const obj = { path: "/evaluate/evaluateList" };
proxy?.$tab.closeOpenPage(obj);
}
2024-06-17 02:56:00 +00:00
}
2024-04-23 06:59:28 +00:00
</script>
2024-06-17 02:56:00 +00:00
<style lang="scss" scoped>
.tab-container {
position: relative;
.btn-back {
position: absolute;
top: 5px;
right: 20px;
}
}
</style>