<!-- 输入输出控制块 -->
<template>
  <div>
    <div v-if="isPhoto == 'photo'">关联图</div>
    <div v-if="isPhoto != 'photo'">
      <inoutSendOrRv
        :isPhoto="isPhoto"
        :checkData="checkData"
        :svInfo="svInfo"
      ></inoutSendOrRv>
    </div>
  </div>
</template>
<script setup>
import { onMounted, watch, ref, nextTick, defineEmits, inject } from "vue";
import inoutSendOrRv from "./inoutSendOrRv";
import {
  //send发送
  iednetworkInfo,
} from "@/api/iedNetwork";
const props = defineProps({
  checkData: {
    type: Object,
    default: () => {},
  },
  isPhoto: {
    type: String,
    default: "",
  },
});
const svInfo = ref(null);
const scdIdValue = inject("scdId");
const getNetworkInfo = async () => {
  const svResInfo = await iednetworkInfo({
    scd_id: scdIdValue,
    ied_name: props.checkData.ied_name,
  });
  svInfo.value = svResInfo.data;
};
watch(
  () => props.checkData,
  (newValue) => {
    getNetworkInfo();
  }
);
onMounted(() => {
  getNetworkInfo();
});
</script>
<style lang="scss">
@mixin img-size {
  width: 150px;
  height: 90px;
  margin-bottom: 10px;
}
@mixin left-and-right {
  display: flex;
  flex-direction: column;
}
</style>