| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <template>
- <div :class="[`${prefixCls}-bottom`, '!dark:bg-dark-900']">
- <div class="datacenter-left">
- <div class="page-name">
- <p>通用接口</p>
- </div>
- <div class="ztree-container">
- <p v-for="(i, k) in menu" :key="k" @click="scrollToSection(k, i)" :class="[`${action == k ? 'action' : ''}`]">{{
- i.groupName }}({{ i.num }})</p>
- </div>
- </div>
- <div class="datacenter-right">
- <AssemblyData></AssemblyData>
- </div>
- </div>
- </template>
- <script lang="ts">
- import { defineComponent, ref, watch } from 'vue';
- import AssemblyData from './item/AssemblyData.vue';
- import { onMounted } from 'vue';
- import { getGroup } from '/@/api/interface/interface.ts';
- const prefixCls = 'account-center-bottom'
- export default defineComponent({
- components: {
- AssemblyData,
- },
- setup() {
- const action = ref(0)
- function scrollToSection(index, i) {
- action.value = index;
- eventBus.emit("groupIdInterface", i.groupId);
- }
- onMounted(() => getGroupList())
- var menu = ref([]);
- function getGroupList() {
- getGroup().then((res) => {
- if (res.length) {
- eventBus.emit("groupIdInterface", res[0].groupId);
- menu.value = res;
- }
- })
- }
- return {
- scrollToSection,
- action,
- menu,
- prefixCls: 'account-center',
- };
- },
- });
- </script>
- <style lang="less" scoped>
- .ztree-container p.action {
- background: #0671DD;
- color: #fff;
- }
- .account-center-bottom {
- background: #fff;
- height: calc(100vh - 80px);
- overflow: hidden;
- }
- .datacenter-right {
- float: left;
- width: calc(100vw - 320px);
- }
- .ztree-container {
- float: left;
- overflow: auto;
- width: 100%;
- height: auto;
- max-height: 976px;
- }
- .ztree-container p {
- padding-left: 30px;
- line-height: 40px;
- margin-left: 9px;
- width: 233px;
- height: 40px;
- text-align: left;
- height: 40px;
- background: #FFFFFF;
- cursor: pointer;
- }
- .ztree-container p:hover {
- background: #0671DD;
- color: #fff;
- }
- .datacenter-left .page-name {
- margin-bottom: 30px;
- border-bottom: solid 1px #DEDEDE;
- }
- .datacenter-left .page-name p {
- height: 42px;
- line-height: 42px;
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- text-align: center;
- margin-bottom: 0px;
- }
- .datacenter-left {
- float: left;
- width: 250px;
- height: auto;
- margin-right: 16px;
- border-top: none;
- background: #F8F8F8;
- overflow: auto;
- height: calc(100% - 20px);
- max-height: 1306px;
- }
- .account-center {
- &-bottom {
- padding: 10px;
- margin: 16px;
- // background-color: @component-background;
- border-radius: 3px;
- }
- }
- </style>
|