|
@@ -0,0 +1,54 @@
|
|
|
+<template>
|
|
|
+ <div class="plan-management">
|
|
|
+ <div class="title-box-common">
|
|
|
+ <h3>计划管理</h3>
|
|
|
+ </div>
|
|
|
+ <div class="padding-box-common">
|
|
|
+ <div style="background: white">
|
|
|
+ <a-tabs
|
|
|
+ style="padding: 0 20px"
|
|
|
+ default-active-key="1"
|
|
|
+ @change="changeTab"
|
|
|
+ v-model:activeKey="defaultKey"
|
|
|
+ >
|
|
|
+ <a-tab-pane key="PlanAdGroup" tab="广告组"> </a-tab-pane>
|
|
|
+ <a-tab-pane key="PlanAdPlan" tab="广告计划"> </a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <router-view></router-view>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import useApp from "@/hooks/useApp";
|
|
|
+import { defineComponent, reactive, toRefs } from "vue";
|
|
|
+import { onBeforeRouteUpdate } from "vue-router";
|
|
|
+
|
|
|
+const PutDataIndex = defineComponent({
|
|
|
+ setup(props, context) {
|
|
|
+ const { route, router } = useApp();
|
|
|
+ const state = reactive({
|
|
|
+ defaultKey: route.name,
|
|
|
+ });
|
|
|
+ const changeTab = (key: string) => {
|
|
|
+ router.replace({ name: key });
|
|
|
+ };
|
|
|
+ onBeforeRouteUpdate((to) => {
|
|
|
+ state.defaultKey = to.name;
|
|
|
+ });
|
|
|
+ return { ...toRefs(state), changeTab };
|
|
|
+ },
|
|
|
+});
|
|
|
+
|
|
|
+export default PutDataIndex;
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+@import "@/assets/common-style/frame.scss";
|
|
|
+.plan-management {
|
|
|
+ .main-box {
|
|
|
+ background: white;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|