Procházet zdrojové kódy

fix: 新增活动详情页

lirenjie před 7 měsíci
rodič
revize
e4978c32e1

+ 96 - 0
src/views/market-manage/activity-manage/activity-management/components/detail.vue

@@ -0,0 +1,96 @@
+<template>
+  <div class="page-detail">
+    <page-detail-layout :tabs="tabs" v-model:tab-active-key="tabActiveKey">
+      <template #tab1>
+        <bs-contents-wrapper>
+          <bs-descriptions :items="bsDescriptionItems" title="表头1">
+            <template #name1_label_slot>
+              <span style="color: red">label插槽</span>
+            </template>
+            <template #name1_value_slot> <span style="color: blue">value插槽</span></template>
+          </bs-descriptions>
+          <bs-descriptions :items="bsDescriptionItems" title="表头2">
+            <template #name1_label_slot>
+              <span style="color: red">label插槽</span>
+            </template>
+            <template #name1_value_slot> <span style="color: blue">value插槽</span></template>
+          </bs-descriptions>
+          <bs-descriptions :items="bsDescriptionItems" title="表头3">
+            <template #name1_label_slot>
+              <span style="color: red">label插槽</span>
+            </template>
+            <template #name1_value_slot> <span style="color: blue">value插槽</span></template>
+          </bs-descriptions>
+          <bs-descriptions title="表头4" >
+            内容4
+          </bs-descriptions>
+        </bs-contents-wrapper>
+      </template>
+      <template #tab2>tab2</template>
+      <template #tab3>tab3</template>
+    </page-detail-layout>
+  </div>
+</template>
+
+<script setup>
+  import { ref } from 'vue';
+  import PageDetailLayout from '/@/components/business/page-detail-layout/index.vue';
+  import { BsDescriptions, BsContentsWrapper } from '/@/components/BsUi/index.js';
+
+  import selectedIcon from '/@/assets/images/page-detail-layout/selectedIcon.png';
+  import unSelectedIcon from '/@/assets/images/page-detail-layout/unSelectedIcon.png';
+  const tabActiveKey = ref('tab1');
+
+  const tabs = ref([
+    {
+      title: '基本信息',
+      key: '0',
+      slotName: 'tab1',
+      selectedIcon: selectedIcon,
+      unSelectedIcon: unSelectedIcon,
+    },
+    {
+      title: 'tab2',
+      key: 'tab2',
+      slotName: 'tab2',
+      selectedIcon: selectedIcon,
+      unSelectedIcon: unSelectedIcon,
+    },
+    {
+      title: 'tab3',
+      key: 'tab3',
+      slotName: 'tab3',
+      selectedIcon: selectedIcon,
+      unSelectedIcon: unSelectedIcon,
+    },
+  ]);
+
+  const bsDescriptionItems = ref([
+    {
+      label: '姓名',
+      field: 'name',
+      value: '韩晓辉',
+      extraProps: {},
+    },
+    {
+      label: '姓名1',
+      field: 'name1',
+      value: '韩晓辉1',
+      labelSlot: 'name1_label_slot',
+      valueSlot: 'name1_value_slot',
+      extraProps: {},
+    },
+    {
+      label: '姓名1',
+      field: 'name1',
+      value: '韩晓辉1',
+      extraProps: {},
+    },
+  ]);
+</script>
+
+<style lang="scss" scoped>
+  .page-detail {
+    width: 100%;
+  }
+</style>

+ 5 - 1
src/views/market-manage/activity-manage/activity-management/index.vue

@@ -13,8 +13,10 @@
 </template>
 <script setup lang="jsx">
 import { ref, reactive } from "vue"
+import { useRouter } from "vue-router";
 import BsTable, { useBsTable } from '/@/components/BsUi/Table/index.js';
 import { DISPLAY_STATE } from '/@/components/BsUi/constant.js';
+const router =useRouter()
 const {
     tableOptions,
     setTablePropsValue: setValue,
@@ -88,7 +90,9 @@ const {
                                     disabled({ row }) {
                                         return false;
                                     },
-                                    onClick({ row }) { },
+                                    onClick({ row }) {
+                                        router.push('/market-manage/activity-manage/activity-management/detail')
+                                     },
                                     extraProps: {},
                                 },
                             ],

+ 1 - 1
src/views/market-manage/activity-manage/market-event-creation/index.vue

@@ -21,7 +21,7 @@ const {
     getTablePropsValue: getValue,
 } = useBsTable({
     tableOptions: {
-        url: '',
+        // url: '/supports/activity/create',
         gridOptions: {
             loading: false,
             columns: [