heyujie
2022-06-16 3e998850b5c4af147a60ed0b86b47379fc9eb1f2
bei bei ke
11个文件已修改
121 ■■■■ 已修改文件
public/fonts/alibaba/iconfont.svg 补丁 | 查看 | 原始文档 | blame | 历史
src/components/subComponents/FileUpload/btn.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/subComponents/FileUpload/file.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/FileUpload/btn.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/FileUpload/index.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/FileUpload/uploader.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/ai/index/App.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/cameraAccess/components/SeparateRules.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/desktop/index/App.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/vindicate/views/updateSettings.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/fonts/alibaba/iconfont.svg
src/components/subComponents/FileUpload/btn.vue
@@ -34,6 +34,7 @@
 
  mounted() {
    this.$nextTick(() => {
      debugger
      let props = {accept:''};
      if(this.sourceType == 1){
        props.accept = '.mp4';
src/components/subComponents/FileUpload/file.vue
@@ -106,6 +106,7 @@
      const isFolder = this.file.isFolder;
      let type = isFolder ? "folder" : "unknown";
      const categoryMap = this.file.uploader.opts.categoryMap;
      debugger
      const typeMap = categoryMap || {
        image: ["gif", "jpg", "jpeg", "png", "bmp", "webp"],
        video: ["mp4", "m3u8", "rmvb", "avi", "swf", "3gp", "mkv", "flv"],
src/pages/ai/FileUpload/btn.vue
@@ -33,14 +33,17 @@
  },
 
  mounted() {
    this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, this.attrs)
    this.$nextTick(() => {
      let props = {accept:''};
      if(this.sourceType == 1){
        props.accept = '.mp4';
      }else if(this.sourceType == 2){
        props.accept = '.jpg,.jpeg,.png';
      }else if(this.sourceType == 3){
        props.accept = '.tar,.tar.gz,.gz';
      }
      this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, props)
      this.uploader.uploader.assignBrowse(this.$refs.btn, this.directory, this.single, this.attrs)
    })
  }
}
src/pages/ai/FileUpload/index.vue
@@ -6,29 +6,19 @@
      :options="options"
      :file-status-text="statusText"
      class="uploader-single"
      :sourceType="sourceType"
      @file-added="onFileAdded"
      @complete="onComplete"
    >
      <!-- <uploader-drop v-if="isDrag == true">
        <div class="drag-txt">拖拽文件到这里</div>
        <span class="icon iconfont" @click.stop="showUpload = false"
          >&#xe70b;</span
        >
        <uploader-btn>选择文件</uploader-btn>
      </uploader-drop> -->
      <div class="up-bar" v-if="isDrag == true">
        <div class="name">{{ fileName || uploadPlaceholder }}</div>
        <uploader-btn slot="suffix">
        <uploader-btn slot="suffix" :attrs="attrs">
          <el-tooltip :content="tipWords" placement="top" v-if="tip">
            <div class="open-file-btn">
              <span class="icon iconfont">&#xe712;</span>
            </div>
          </el-tooltip>
        </uploader-btn>
        <!-- <div class="open-file-btn">
          <span class="icon iconfont">&#xe712;</span>
        </div> -->
      </div>
      <el-input
        :placeholder="uploadPlaceholder"
@@ -37,7 +27,7 @@
        :readonly="true"
        v-model="fileName"
      >
        <uploader-btn slot="suffix">
        <uploader-btn slot="suffix" :attrs="attrs">
          <el-tooltip :content="tipWords" placement="top" v-if="tip">
            <i
              class="el-icon-upload2"
@@ -125,7 +115,7 @@
  },
  data() {
    return {
      fileName: "",
      fileName: "",shouldStop:false,
      fileMd5: "",
      statusText: {
        success: "上传成功",
@@ -154,6 +144,17 @@
  },
  methods: {
    onFileAdded(file) {
      // if (this.sourceType == 3) {
      //   if (
      //     !file.name.endsWith(".tar") ||
      //     !file.name.endsWith(".gz") ||
      //     !file.name.endsWith(".tar.gz")
      //   ) {
      //     this.shouldStop = true
      //     this.$notify.warning("仅支持.tar/.gz/.tar.gz三种格式文件");
      //     return
      //   }
      // }
      if (this.single) {
        this.uploader.fileList = this.uploader.fileList.slice([-1]);
        this.$emit("file-added");
@@ -213,6 +214,9 @@
      this.statusText.paused = "暂停中";
    },
    onComplete() {
      if (this.shouldStop) {
        return
      }
      this.$emit("complete", {
        filename: this.fileName,
        identifier: this.fileMd5,
src/pages/ai/FileUpload/uploader.vue
@@ -41,6 +41,9 @@
        return {}
      }
    },
    sourceType: {
      type: Number,
    },
    options: {
      type: Object,
      default() {
@@ -83,6 +86,16 @@
      }
    },
    filesAdded(files, fileList) {
      if (this.sourceType == 3 && files[0]) {
        if (
          !files[0].name.endsWith(".tar") ||
          !files[0].name.endsWith(".gz") ||
          !files[0].name.endsWith(".tar.gz")
        ) {
          this.shouldStop = true
          return
        }
      }
      this.$emit(kebabCase(FILES_ADDED_EVENT), files, fileList)
      if (files.ignored || fileList.ignored) {
        // is ignored, filter it
@@ -94,6 +107,16 @@
      this.fileList = this.uploader.fileList
    },
    filesSubmitted(files, fileList) {
      if (this.sourceType == 3&& files[0]) {
        if (
          !files[0].name.endsWith(".tar") ||
          !files[0].name.endsWith(".gz") ||
          !files[0].name.endsWith(".tar.gz")
        ) {
          this.shouldStop = true
          return
        }
      }
      this.files = this.uploader.files
      this.fileList = this.uploader.fileList
      if (this.autoStart) {
@@ -101,7 +124,6 @@
      }
    },
    allEvent(...args) {
      console.log(args)
      const name = args[0]
      const EVENTSMAP = {
        [FILE_ADDED_EVENT]: true,
@@ -123,7 +145,6 @@
    }
  },
  created() {
    // console.log('uploader attrs',this.attrs);
    // this.bindUploader();
    this.options.initialPaused = !this.autoStart
    const uploader = new Uploader(this.options)
src/pages/ai/index/App.vue
@@ -348,7 +348,9 @@
                  class="upload-demo"
                  single
                  tip
                  :sourceType="3"
                  :isDrag="true"
                  :attrs="{accept:'.zip,.tar,.gz,.tar.gz'}"
                  tipWords="点击上传"
                  uploadPlaceholder="算法软件"
                  url="/data/api-v/sdk/upload"
src/pages/cameraAccess/components/SeparateRules.vue
@@ -34,7 +34,13 @@
              @change="changePoll"
            />
          </div>
          <div
            v-if="Camera.analytics"
            class="flex-box"
            v-show="cameraType === 'camera'"
          >
            <span class="label">处理状态: {{ camStatus }}</span>
          </div>
          <div
            v-if="Camera.analytics"
            class="flex-box"
@@ -256,7 +262,7 @@
import { savePolygon } from "@/api/polygon";
import { pasteRules } from "@/api/task";
import { getCameraInfo } from "@/api/camera";
import { saveCameraScene } from "@/api/scene";
import { changeRunType } from "@/api/pollConfig";
@@ -309,20 +315,8 @@
          prevEl: ".swiper-local-prev",
        },
      },
      // swiperOption: {
      //   slidesPerView: 5,
      //   spaceBetween: 8,
      //   pagination: {
      //     el: ".swiper-pagination",
      //     clickable: true
      //   },
      //   navigation: {
      //     nextEl: ".swiper-next-border",
      //     prevEl: ".swiper-pre-border"
      //   }
      // },
      tableRuleList: [],
      camStatus:'',
      cameraId: "",
      showSysInfo: false,
      showCanvas: true,
@@ -357,6 +351,29 @@
    },
  },
  methods: {
    getStatus() {
      getCameraInfo(this.Camera.cameraId).then((res) => {
        if (res.success) {
          switch (res.data.status) {
            case 0:
              this.camStatus = "未配规则";
              return
            case 1:
              this.camStatus = "等待轮询处理";
              return
            case 2:
              this.camStatus = "正在执行分析处理";
              return
            case -1:
              this.camStatus = "其他情况导致未处理";
              return
            case -2:
              this.camStatus = "故障导致未处理";
              return
          }
        }
      });
    },
    prevClick() {
      if (this.swiperIndex == 0) {
        if (this.stackFilesPage > 1) {
@@ -550,11 +567,11 @@
        val = -1;
      }
      if (this.Camera.cameraId && this.Camera.cameraId !== undefined) {
        debugger;
        changeRunType({
          camera_ids: [this.Camera.cameraId],
          run_type: val,
        }).then((rsp) => {
          this.getStatus()
          if (rsp && rsp.success) {
            this.$notify({
              type: "success",
src/pages/desktop/index/App.vue
@@ -48,7 +48,10 @@
      return false;
    },
    defaultBgUrl() {
      if (JSON.parse(sessionStorage.getItem("userInfo"))) {
      return JSON.parse(sessionStorage.getItem("userInfo")).backgroundpic;
      }
      return ""
    },
  },
  created() {
src/pages/vindicate/views/updateSettings.vue
@@ -118,6 +118,7 @@
                  v-show="!shengjiing && upStatus === ''"
                  :http-request="uploadPkg"
                  :limit="1"
                  accept=".zip,.tar,.gz,.tar.gz"
                >
                  <i class="el-icon-upload"></i>
                  <div
vue.config.js
@@ -118,7 +118,7 @@
      },
      "/data/api-v/app/findAllApp": {
        // target: '/',
        target: "http://localhost:8081/",
        target: "http://localhost:8080/",
        changeOrigin: true,
        pathRewrite: {
          "^/data/api-v/app/findAllApp": "apps.json",