123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <div id="info">
- <el-row>
- <el-col :span="24" class="main animate__animated animate__backInRight">
- <el-col :span="24" class="one">
- <component :is="partsSearch" :is_back="true" @toBack="toBack()"></component>
- </el-col>
- <el-col :span="24" class="two">
- <component :is="studioInfo" :info="info"></component>
- </el-col>
- </el-col>
- </el-row>
- </div>
- </template>
- <script setup lang="ts">
- import partsSearch from '@common/src/components/frame/c-search.vue';
- import studioInfo from '@/components/common/studio/info.vue';
- import { useRoute } from 'vue-router';
- import type { Ref } from 'vue';
- import { ref, onMounted } from 'vue';
- import { StudioStore } from '@common/src/stores/studio/studios/studio'; // 列表
- import { ScientistsettleStore } from '@common/src/stores/studio/studios/scientistsettle';
- import type { IQueryResult } from '@/util/types.util';
- const scientistsettle = ScientistsettleStore();
- const studio = StudioStore();
- let route = useRoute();
- let info: Ref<{ team: any[] }> = ref({ team: [] });
- onMounted(async () => {
- await search();
- });
- const search = async () => {
- if (route.query.id) {
- let id = route.query.id;
- const res: IQueryResult = await studio.fetch(id);
- info.value = res.data as { team: any };
- await sarchTeam();
- }
- };
- const sarchTeam = async () => {
- let id = route.query.id;
- let list = [];
- let res = await scientistsettle.query({ studio_id: id });
- if (res.total > 0) {
- let data = res.data[0];
- list = data.team;
- }
- info.value.team = list;
- };
- const toBack = () => {
- window.history.go(-1);
- };
- </script>
- <style lang="scss" scoped></style>
|