闫增涛
4 天以前 6227519a1bd9007aedae11b77b0b3b1851837c38
src/views/simulation/testSimulation/index.vue
@@ -46,11 +46,12 @@
            >
              <div class="model-body-box">
                <div class="model-img">
                  <iframe
                  <!-- <iframe
                    style="width: 100%; height: 100%"
                    src="./static/modelView/index.html?md5=62d4eadc420b7403fce2be993baa095d&name=飞行棋&domain=https://www.jlstp.cn&target=iframe"
                    frameborder="0"
                  ></iframe>
                  ></iframe> -->
                  <showModel :md5="item.md5" :index="index"></showModel>
                </div>
                <div class="model-info">
                  <h1 class="model-title" :title="item.name">
@@ -71,7 +72,7 @@
              </div>
            </el-col>
          </el-row>
          <div v-if="modelDataList.length == 0">
          <div v-if="noData">
            <el-empty :image-size="140" />
          </div>
        </div>
@@ -94,6 +95,7 @@
<script setup lang="ts">
import { ref, onMounted, watch, inject } from "vue";
import { useRouter, useRoute } from "vue-router";
import showModel from "../../../components/showModel.vue";
const router = useRouter();
const route = useRoute();
import { curStoreInfo } from "@/store/index";
@@ -122,33 +124,12 @@
const detailDialogVisible = ref(false);
const parentChannel = ref({});
const toolClass: any = inject("toolClass");
const noData = ref<boolean>(false)
onMounted(() => {
  listLoading.value = true
  getAircraftList();
  // getModelData();
});
watch(
  () => seleStore.channelInfo, // 监听 reactive 对象(默认深度监听)
  (newVal) => {
    if (newVal) {
      console.log(newVal, "channelInfo");
    }
  }
);
watch(
  () => seleStore.storeInfo, // 监听 reactive 对象(默认深度监听)
  (newVal) => {
    if (newVal) {
      console.log(newVal, "storeInfo");
    }
  }
);
watch(
  () => seleStore.channelList, // 监听 reactive 对象(默认深度监听)
  (newVal) => {
    console.log(newVal, "channelList");
  }
);
watch(
  () => parentChannel.value, // 监听 reactive 对象(默认深度监听)
  (newVal) => {
@@ -194,6 +175,7 @@
//获取预览模型列表
const getModelList = async () => {
  listLoading.value = true
  const currentNode = modelTypeList.value.find(
    (item) => item.key == modelTypeActive.value
  );
@@ -205,13 +187,22 @@
    },
    {
      ModelName: [],
      ModelFile: [],
      JointData: [],
      IsSimulation: [],
      ModelRemarks: [],
      ChildrenCount: [],
    }
  );
  console.log(treeData, "getModelList");
  for (let index = 0; index < treeData.datas.length; index++) {
    const item = treeData.datas[index];
    item.md5 = null;
    try {
      const fileData = item.fieldList.find((citem: any) => citem.FileList.length);
      item.md5 = fileData.FileList[0].File.Md5;
    } catch (error) {}
  }
  if(!treeData.datas.length) noData.value = true
  modelDataList.value = treeData.datas;
  listLoading.value = false;
};
@@ -228,28 +219,6 @@
const handleClick = (item) => {
  modelTypeActive.value = item.key;
};
const getModelData = () => {
  listLoading.value = true;
  let list = [
    {
      name: "巡视器整模型",
      icon: "",
      id: "1",
    },
    {
      name: "天线",
      icon: "",
      id: "2",
    },
    {
      name: "太阳翼",
      icon: "",
      id: "3",
    },
  ];
  modelDataList.value = list;
  listLoading.value = false;
};
//查看属性
const gotoDetail = () => {
@@ -262,7 +231,6 @@
const gotoReport = (item) => {
  router.push({
    name: "simulation-testReport",
  });
};
//打开仿真
@@ -275,8 +243,6 @@
  });
};
//获取频道信息
const getChannelInfo = () => {};
</script>
<style lang="less" scoped>
@@ -306,7 +272,7 @@
  margin-top: 20px;
  .model-body-box {
    border: 1px solid #f1f1f1;
    min-height:300px;
    .jc-sb {
      margin-top: 20px;
    }