zhangzengfei
2022-07-20 4a800a8fc83c6bd1f86a8e847b079a51a7532c09
src/pages/cameraAccess/components/DataStackInfo.vue
@@ -261,6 +261,7 @@
        label="时长"
        show-overflow-tooltip
        align="center"
        v-if="form.type != 2"
      ></el-table-column>
      <el-table-column
        prop="uploadTime"
@@ -471,6 +472,7 @@
  moveFile,
  copyFile,
} from "@/api/localVedio";
import { getCameraSceneRule } from "@/api/scene";
import InfoCard from "./infoCard";
import eChartsBar from "@/components/subComponents/eChartsBar";
@@ -557,6 +559,7 @@
  },
  data() {
    return {
      hasRule: false,
      videoUrl: "",
      imgUrl: "",
      previewDialog: false,
@@ -597,6 +600,17 @@
    this.taskUid = 0;
  },
  methods: {
    async getRule() {
      const res = await getCameraSceneRule({
        cameraId: this.DataStackPool.selectedDir.id,
      });
      if (res && res.success && res.data.rules && res.data.rules.length > 0) {
        this.hasRule = true;
        console.log(this.hasRule);
      } else {
        this.hasRule = false;
      }
    },
    checkResolution(val) {
      this.form.resolution_width = Number(val.split("*")[0]);
      this.form.resolution_height = Number(val.split("*")[1]);
@@ -625,6 +639,12 @@
        sort: 0,
        status: 0,
        type: 1,
        resolutions: [
          {
            height: 0,
            width: 0,
          },
        ],
      };
    },
    // 添加设备
@@ -753,6 +773,10 @@
              });
              this.DataStackPool.fetchFiles();
              this.DataStackPool.selectedDir = {};
              // 删除后恢复未选中状态
              this.addDir();
              this.isAdd = false;
              this.isDisabled = true;
            } else {
              this.$notify({
                type: "error",
@@ -780,12 +804,11 @@
      this.multipleSelection = [];
    },
    handleUpload() {
      console.log(this.DataStackPool.selectedDir.id);
      console.log(
        this.$refs[
          `uploader_${this.DataStackPool.selectedDir.id}`
        ][0].$refs.button.$refs.btn.click()
      );
      console.log(this.DataStackPool.selectedDir);
      console.log(this.DataStackPool.dirs);
      this.$refs[
        `uploader_${this.DataStackPool.selectedDir.id}`
      ][0].$refs.button.$refs.btn.click();
    },
    handleRefrashFileList(val) {
      this.page = val;
@@ -822,6 +845,13 @@
        this.$notify({
          type: "error",
          message: "未选中文件",
        });
        return;
      }
      if (!this.hasRule && status === 1) {
        this.$notify({
          type: "error",
          message: "您还未配置算法场景,请先配置",
        });
        return;
      }
@@ -1067,4 +1097,4 @@
    height: 230px;
  }
}
</style>
</style>