<script setup>
/**
 * name：
 * user：sa0ChunLuyu
 * date：2024年9月11日 19:24:50
 */
import { ref } from "vue";
import { $api, $response } from "@/api";
import { onShow } from "@dcloudio/uni-app";
import { useStore } from "@/store";
const $store = useStore();


const $props = defineProps({
		index: {
			type: String,
			default: ''
		},
    i: {
			type: String,
			default: ''
		}
	});

let details = ref({});
const mountedAction = () => {
  AnalysisTypeGetList();
};

const AnalysisTypeGetList = async () => {
  const response = await $api("AnalysisTypeGetList");
  $response(response, () => {
    details.value = response.data.list[$props.index].list[$props.i];
		console.log(details.value);
  });
};

const config_ref = ref(null);
const configRef = (e) => {
  if (!config_ref.value) {
    config_ref.value = e;
    mountedAction();
  }
};

onShow(() => {
  if (!!config_ref.value) {
    mountedAction();
  }
});
</script>
<template>
  <view>
    <view v-if="!!$store.config">
      <view :ref="configRef"></view>
    </view>
  </view>
</template>
<style scoped></style>
