|
@@ -19,10 +19,13 @@ 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 studio = StudioStore();
|
|
|
+const scientistsettle = ScientistsettleStore();
|
|
|
let route = useRoute();
|
|
|
-let info: Ref<{}> = ref({});
|
|
|
+interface dataItem {}
|
|
|
+let info: Ref<{ team: Array<dataItem> }> = ref({ team: [] });
|
|
|
onMounted(async () => {
|
|
|
await search();
|
|
|
});
|
|
@@ -30,7 +33,11 @@ const search = async () => {
|
|
|
if (route.query && route.query.id) {
|
|
|
let id = route.query.id;
|
|
|
const res: IQueryResult = await studio.fetch(id);
|
|
|
- info.value = res.data as {};
|
|
|
+ info.value = res.data as { team: Array<dataItem> };
|
|
|
+ if (route.query.scientist_id) {
|
|
|
+ const arr = await scientistsettle.fetch(route.query.scientist_id);
|
|
|
+ info.value.team = arr.data.team;
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
const toBack = () => {
|