<template>
  <el-dialog
    :visible.sync="visible"
    :fullscreen="true"
    :close-on-click-modal="false"
    custom-class="upload-dialog"
    :before-close="beforeClose"
    class="uploadImage"
  >
    <span slot="title">{{ title }}</span>
    <el-divider content-position="left">{{
      $t("trials:uploadImage:button:uploadTableTitle1")
    }}</el-divider>
    <!--已上传影像检查-->
    <el-table
      :data="list"
      style="width: 100%"
      height="300"
      v-adaptive="{ bottomOffset: 50, notAdaptive: isUpload }"
      :loading="loading"
    >
      <!--受试者-->
      <el-table-column
        prop="SubjectCode"
        :label="$t('trials:uploadImage:table:subjectCode')"
      />
      <!--任务名称-->
      <el-table-column
        prop="TaskBlindName"
        :label="$t('trials:uploadImage:table:taskBlindName')"
      />
      <!--原始检查数-->
      <el-table-column
        prop="OrginalStudyList"
        :label="$t('trials:uploadImage:table:orginalStudyListNum')"
      >
        <template slot-scope="scope">
          <el-button
            v-if="
              scope.row.OrginalStudyList &&
              scope.row.OrginalStudyList.length >= 1
            "
            type="text"
            @click="handleOpenDialog(scope.row, 'OrginalStudyList')"
          >
            <span>{{ scope.row.OrginalStudyList.length }}</span>
          </el-button>
          <span v-else>0</span>
        </template>
      </el-table-column>
      <!--后处理检查数-->
      <el-table-column
        prop="UploadStudyList"
        :label="$t('trials:uploadImage:table:uploadStudyListNum')"
      >
        <template slot-scope="scope">{{
          scope.row.UploadStudyList && Array.isArray(scope.row.UploadStudyList)
            ? scope.row.UploadStudyList.length
            : 0
        }}</template>
      </el-table-column>
      <el-table-column
        :label="$t('common:action:action')"
        fixed="right"
        width="140"
      >
        <template slot-scope="scope">
          <!--下载--->
          <!-- <el-button
            v-if="!isUpload && Criterion.ImageDownloadEnum > 0"
            circle
            icon="el-icon-download"
            :title="$t('trials:uploadImage:button:download')"
            @click.stop="downloadImage(scope.row)"
          /> -->
          <!--删除--->
          <el-button
            v-if="isUpload"
            circle
            icon="el-icon-delete"
            :title="$t('trials:uploadImage:button:delete')"
            @click.stop="remove(scope.row)"
          />
        </template>
      </el-table-column>
    </el-table>
    <upload-list
      v-if="Criterion.ImageUploadEnum > 0 && isUpload"
      :StudyInstanceUidList="StudyInstanceUidList"
      :SopInstanceUidList="SopInstanceUidList"
      :UploadStudyList="UploadStudyList"
      @getList="getList"
    />
    <study-view
      v-if="model_cfg.visible"
      :model_cfg="model_cfg"
      :modelList="modelList"
    />
  </el-dialog>
</template>
<script>
import uploadList from "./components/upload-list.vue";
import studyView from "./components/study-view.vue";
import { getSubjectImageUploadList, deleteTaskStudy } from "@/api/load.js";
import { downloadImage } from "@/utils/uploadZip.js";
import store from "@/store";
export default {
  name: "uploadImage",
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    SubjectId: {
      type: String,
      default: "",
    },
    Criterion: {
      type: Object,
      default: () => {
        return {};
      },
    },
    status: {
      type: String,
      default: "upload",
    },
  },
  components: {
    "upload-list": uploadList,
    "study-view": studyView,
  },
  data() {
    return {
      list: [],
      StudyInstanceUidList: [],
      SopInstanceUidList: [],
      UploadStudyList: [],

      // 检查数弹框
      model_cfg: {
        visible: false,
        showClose: true,
        width: "1000px",
        title: "",
        appendToBody: true,
      },
      modelList: [],
    };
  },
  computed: {
    title() {
      let str = this.$t("trials:uploadImage:title:uploadImages");
      if (this.status === "download") {
        str = this.$t("trials:uploadImage:title:uploadImagesDownLoad");
      }
      return str;
    },
    isUpload() {
      return this.status === "upload";
    },
  },
  created() {
    this.getList();
  },
  methods: {
    beforeClose() {
      this.$emit("update:visible", false);
    },
    notUp() {
      this.$confirm(this.$t("trials:uploadImage:confirmMessage:notUp"), {
        type: "warning",
        distinguishCancelAndClose: true,
        confirmButtonText: this.$t("common:button:confirm"),
        cancelButtonText: this.$t("common:button:cancel"),
      });
    },
    // 获取列表
    async getList() {
      try {
        let params = {
          SubjectId: this.SubjectId,
          TrialReadingCriterionId: this.Criterion.TrialReadingCriterionId,
        };
        this.loading = true;
        let res = await getSubjectImageUploadList(params);
        this.loading = false;
        if (res.IsSuccess) {
          this.StudyInstanceUidList = [];
          this.SopInstanceUidList = [];
          this.UploadStudyList = [];
          this.list = res.Result;
          res.Result.forEach((item) => {
            if (item.OrginalStudyList && Array.isArray(item.OrginalStudyList)) {
              item.OrginalStudyList.forEach((data) => {
                data.SubjectId = item.SubejctId;
                data.VisitTaskId = item.VisitTaskId;
                data.SourceSubjectVisitId = item.SourceSubjectVisitId;
                this.StudyInstanceUidList.push(data);
              });
            }
            if (item.UploadStudyList && Array.isArray(item.UploadStudyList)) {
              item.UploadStudyList.forEach((data) => {
                data.SopInstanceUidList &&
                  this.SopInstanceUidList.push(...data.SopInstanceUidList);
                this.UploadStudyList.push(data);
              });
            }
          });
        }
      } catch (err) {
        console.log(err);
        this.loading = false;
      }
    },
    // 删除
    async remove(item) {
      try {
        let confirm = await this.$confirm(
          this.$t("trials:uploadImage:confirm:delMessage"),
          {
            type: "warning",
            distinguishCancelAndClose: true,
            confirmButtonText: this.$t("common:button:confirm"),
            cancelButtonText: this.$t("common:button:cancel"),
          }
        );
        if (confirm !== "confirm") return;
        let params = {
          VisitTaskId: item.VisitTaskId,
        };
        let res = await deleteTaskStudy(params);
        if (res.IsSuccess) {
          this.getList();
          this.$message.success(
            this.$t("trials:uploadImage:message:delSuccess")
          );
        }
      } catch (err) {
        console.log(err);
      }
    },
    // 打开弹窗
    handleOpenDialog(item, list) {
      this.model_cfg.title = `${item.SubejctCode || ""}>${item.TaskBlindName}`;
      this.modelList = item[list];
      this.model_cfg.visible = true;
    },
    // 打包下载
    async downloadImage(item) {
      let zipName = "压缩包.zip";
      let InstanceInfoList = [
        {
          Id: "e634352c-6465-32ba-04b3-824ec8d346a8",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/e634352c-6465-32ba-04b3-824ec8d346a8",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 1,
        },
        {
          Id: "d4ad1dd2-747b-6de7-8ad4-3e81c58943dd",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/d4ad1dd2-747b-6de7-8ad4-3e81c58943dd",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 2,
        },
        {
          Id: "6a1d1d12-2b4a-0368-c7e1-d44f7180b280",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6a1d1d12-2b4a-0368-c7e1-d44f7180b280",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 3,
        },
        {
          Id: "7a8fb1b4-9ea8-1189-4ca6-b9a9b9547a39",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7a8fb1b4-9ea8-1189-4ca6-b9a9b9547a39",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 4,
        },
        {
          Id: "8d00be19-5ac5-c608-dbd0-41f84cfacd95",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8d00be19-5ac5-c608-dbd0-41f84cfacd95",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 5,
        },
        {
          Id: "729ded91-0eca-78f2-1c17-5182d4f27e3a",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/729ded91-0eca-78f2-1c17-5182d4f27e3a",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 6,
        },
        {
          Id: "9e2fd28c-72fe-bb66-e0ce-40115cd82260",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9e2fd28c-72fe-bb66-e0ce-40115cd82260",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 7,
        },
        {
          Id: "9b31613f-3c9e-28ad-fd9e-7001a69e09b5",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9b31613f-3c9e-28ad-fd9e-7001a69e09b5",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 8,
        },
        {
          Id: "4982b453-d068-7e56-2acd-a361d8584f35",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4982b453-d068-7e56-2acd-a361d8584f35",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 9,
        },
        {
          Id: "8279cf5a-2551-43ea-3fe4-673e88ba7e5a",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8279cf5a-2551-43ea-3fe4-673e88ba7e5a",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 10,
        },
        {
          Id: "6424e9c5-d31b-9388-3b64-a56705ab6fc8",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6424e9c5-d31b-9388-3b64-a56705ab6fc8",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 11,
        },
        {
          Id: "a73cf3f9-defa-0c22-dfdc-8c5bfb93c9a7",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a73cf3f9-defa-0c22-dfdc-8c5bfb93c9a7",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 12,
        },
        {
          Id: "dbfaafea-f721-0a93-37c6-69bcc0d957c3",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/dbfaafea-f721-0a93-37c6-69bcc0d957c3",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 13,
        },
        {
          Id: "52000ac1-6a5b-83e2-5468-4dfdf394e455",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/52000ac1-6a5b-83e2-5468-4dfdf394e455",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 14,
        },
        {
          Id: "de34a347-41f4-1018-a710-48d81fa9aadc",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/de34a347-41f4-1018-a710-48d81fa9aadc",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 15,
        },
        {
          Id: "251d6a13-26b7-935b-d765-0c5db1ed7dfc",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/251d6a13-26b7-935b-d765-0c5db1ed7dfc",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 16,
        },
        {
          Id: "b22e93c8-3f6a-484a-a32b-f7626689f8da",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/b22e93c8-3f6a-484a-a32b-f7626689f8da",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 17,
        },
        {
          Id: "6517400b-d4b5-db65-d026-8c06c40bf244",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6517400b-d4b5-db65-d026-8c06c40bf244",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 18,
        },
        {
          Id: "8e70df99-525a-4ecd-5cf1-6c32698eaa3f",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8e70df99-525a-4ecd-5cf1-6c32698eaa3f",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 19,
        },
        {
          Id: "7df907f2-b6a6-fd03-67ab-be86c497d412",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7df907f2-b6a6-fd03-67ab-be86c497d412",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 20,
        },
        {
          Id: "ba31ba5b-728e-8301-273d-459fd3c65a43",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/ba31ba5b-728e-8301-273d-459fd3c65a43",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 21,
        },
        {
          Id: "7528c70c-5ba1-59c1-413c-7bfc984c0066",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7528c70c-5ba1-59c1-413c-7bfc984c0066",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 22,
        },
        {
          Id: "15dd574d-fc82-c5b7-fefb-497346d4abbb",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/15dd574d-fc82-c5b7-fefb-497346d4abbb",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 23,
        },
        {
          Id: "6cd76aca-91fa-64ce-6077-af48c5e5b18b",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6cd76aca-91fa-64ce-6077-af48c5e5b18b",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 24,
        },
        {
          Id: "2f0f9f4e-12b8-a6a8-d3f9-f43e2055653d",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/2f0f9f4e-12b8-a6a8-d3f9-f43e2055653d",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 25,
        },
        {
          Id: "3c49f379-8548-67cd-1333-dde28219c6e9",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/3c49f379-8548-67cd-1333-dde28219c6e9",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 26,
        },
        {
          Id: "910f43c8-123a-0753-aaf7-11081eef4268",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/910f43c8-123a-0753-aaf7-11081eef4268",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 27,
        },
        {
          Id: "ffad6b36-74aa-1c7d-01eb-18524da91f6e",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/ffad6b36-74aa-1c7d-01eb-18524da91f6e",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 28,
        },
        {
          Id: "9e2bf22d-8734-62ae-881a-7404064a95ce",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9e2bf22d-8734-62ae-881a-7404064a95ce",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 29,
        },
        {
          Id: "eef8b291-ffdf-dbfb-244d-5e63dc5b8cc7",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/eef8b291-ffdf-dbfb-244d-5e63dc5b8cc7",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 30,
        },
        {
          Id: "12b0de3a-243c-78b9-b006-82f2cc633a0f",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/12b0de3a-243c-78b9-b006-82f2cc633a0f",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 31,
        },
        {
          Id: "4341ea87-7d54-2608-184e-01e5c976ce9f",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4341ea87-7d54-2608-184e-01e5c976ce9f",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 32,
        },
        {
          Id: "4db2bac2-18eb-0589-d520-f297b2840e1d",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4db2bac2-18eb-0589-d520-f297b2840e1d",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 33,
        },
        {
          Id: "9442c2a3-0972-67f7-afc3-6f1a47abefab",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9442c2a3-0972-67f7-afc3-6f1a47abefab",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 34,
        },
        {
          Id: "a7fb75b0-0b09-5340-70cf-a11afd84b1ec",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a7fb75b0-0b09-5340-70cf-a11afd84b1ec",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 35,
        },
        {
          Id: "753d7795-451a-bd32-69ea-fd58c1e89d63",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/753d7795-451a-bd32-69ea-fd58c1e89d63",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 36,
        },
        {
          Id: "33bf7274-de0a-e8f9-f97a-c58fb2ea3aaf",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/33bf7274-de0a-e8f9-f97a-c58fb2ea3aaf",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 37,
        },
        {
          Id: "adadae31-37a1-818d-3721-09a1d371c6a5",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/adadae31-37a1-818d-3721-09a1d371c6a5",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 38,
        },
        {
          Id: "f64e8b0d-d2ab-b112-5705-92c23cfc5df6",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/f64e8b0d-d2ab-b112-5705-92c23cfc5df6",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 39,
        },
        {
          Id: "781088b0-5afd-6eb3-5f87-9bfec210d490",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/781088b0-5afd-6eb3-5f87-9bfec210d490",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 40,
        },
        {
          Id: "56df4cef-8053-bff3-21f7-1b1841a3d6e6",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/56df4cef-8053-bff3-21f7-1b1841a3d6e6",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 41,
        },
        {
          Id: "a3e3dab9-7a61-f822-d113-42f46bc5e8ce",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a3e3dab9-7a61-f822-d113-42f46bc5e8ce",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 42,
        },
        {
          Id: "1cc195b9-e498-179d-b927-6d706266decb",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/1cc195b9-e498-179d-b927-6d706266decb",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 43,
        },
        {
          Id: "7dca834f-d959-898e-a0cb-5c8244c4c4a9",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7dca834f-d959-898e-a0cb-5c8244c4c4a9",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 44,
        },
        {
          Id: "13eeba83-2e93-800e-e934-a56061633c64",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/13eeba83-2e93-800e-e934-a56061633c64",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 45,
        },
        {
          Id: "971f0a62-92a3-6d04-53c5-51fa9155e28c",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/971f0a62-92a3-6d04-53c5-51fa9155e28c",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 46,
        },
        {
          Id: "2959d06c-5ac7-f3b9-63d4-1a56e3974fc7",
          Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/2959d06c-5ac7-f3b9-63d4-1a56e3974fc7",
          HtmlPath: "",
          NumberOfFrames: 0,
          InstanceNumber: 47,
        },
      ];
      let path = "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com";
      let files = new Array();
      for (let i = 0; i < InstanceInfoList.length; i++) {
        let item = InstanceInfoList[i];
        let obj = {
          name: "file" + i,
          url: path + item.Path,
        };
        files.push(obj);
      }
      store.dispatch("trials/setUnLock", true);
      let res = await downloadImage(zipName, files);
      store.dispatch("trials/setUnLock", false);
    },
  },
  beforeDestroy() {
    store.dispatch("trials/setUnLock", false);
  },
};
</script>
<style lang="scss" scoped>
::v-deep .el-dialog {
  .el-dialog__header {
    padding-top: 15px;
  }
}
.uploadImage {
  background-color: #fff;
}
</style>