ZZJ
2022-07-27 f358f667a292973618199b51552d61179181cf1d
bug修复
14个文件已删除
1个文件已添加
4 文件已重命名
11个文件已修改
226 ■■■■ 已修改文件
public/images/ModelList/暂用.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/equipmentManagement/default.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/equipmentManagement/full.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/equipmentManagement/quit.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/equipmentManagement/select.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/11滞留.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/13滞留.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/15戴口罩.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/1仰卧检测.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/20睡岗.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/28玩手机.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/34跌倒.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/AI爆款.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/数据推送.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/比对库管理.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/系统维护.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/index/统计查询.png 补丁 | 查看 | 原始文档 | blame | 历史
public/images/layout/default.jpg 补丁 | 查看 | 原始文档 | blame | 历史
public/images/layout/默认头像-01.png 补丁 | 查看 | 原始文档 | blame | 历史
src/api/product.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/utils.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/TopNav.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/subComponents/imgDown.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/equipmentManage/equipmentList/components/Content.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operateManage/productManage/AddBanner.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operateManage/productManage/AddModel.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operateManage/productManage/BannerList.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operateManage/productManage/DelBox.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operateManage/productManage/ModelList.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operateManage/productManage/ProductList.vue 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/images/ModelList/ÔÝÓÃ.png
Binary files differ
public/images/equipmentManagement/default.png

public/images/equipmentManagement/full.png

public/images/equipmentManagement/quit.png

public/images/equipmentManagement/select.png

public/images/index/11ÖÍÁô.png
Binary files differ
public/images/index/13ÖÍÁô.png
Binary files differ
public/images/index/15´÷¿ÚÕÖ.png
Binary files differ
public/images/index/1ÑöÎÔ¼ì²â.png
Binary files differ
public/images/index/20˯¸Ú.png
Binary files differ
public/images/index/28ÍæÊÖ»ú.png
Binary files differ
public/images/index/34µøµ¹.png
Binary files differ
public/images/index/AI񪨌.png
Binary files differ
public/images/index/Êý¾ÝÍÆËÍ.png
Binary files differ
public/images/index/±È¶Ô¿â¹ÜÀí.png
Binary files differ
public/images/index/ϵͳά»¤.png
Binary files differ
public/images/index/ͳ¼Æ²éѯ.png
Binary files differ
public/images/layout/default.jpg
public/images/layout/ĬÈÏÍ·Ïñ-01.png
Binary files differ
src/api/product.ts
@@ -134,4 +134,13 @@
        method: "POST",
        data
    });
};
//保存安装包
export const saveProductPackage = (data) => {
    return request({
        url: "/admin/api-i/index/saveProductPackage",
        method: "POST",
        data
    });
};
src/api/utils.ts
@@ -44,6 +44,6 @@
// é€šè¿‡md5获取文件路径
export const getFilePath = (query:any) => request({
    url: `/data/api-f/file/path?identifier=${query.identifier}&filename=${query.filename}`,
    url: `/admin/api-f/file/path?identifier=${query.identifier}&filename=${query.filename}`,
    method: "get",
  })
src/components/TopNav.vue
@@ -6,7 +6,7 @@
    </div>
    <div class="user">
      <img src="/images/layout/默认头像-01.png" alt="" />
      <img src="/images/layout/default.jpg" style="border-radius: 50%" alt="" />
      <div class="dropdown">basic</div>
      <i class="el-icon-arrow-down"></i>
    </div>
@@ -51,3 +51,5 @@
  }
}
</style>
src/components/subComponents/imgDown.vue
@@ -1,56 +1,61 @@
<template>
  <div class="imgBox">
    <img :src="'/httpImage/' + url" class="cursor-pointer" v-if="isPreview" preview />
    <img :src="'/httpImage/' + url" v-if="!isPreview" />
    <el-button class="btn" @click="downloadIamge('/httpImage/' + url)">
    <img
      :src="'http://' + url"
      class="cursor-pointer"
      v-if="isPreview"
      preview
    />
    <img :src="'http://' + url" v-if="!isPreview" />
    <el-button class="btn" @click="downloadIamge('http://' + url)">
      <i class="iconfont iconxiazai"></i>
    </el-button>
  </div>
</template>
<script>
import axios from "axios"
import axios from "axios";
export default {
  props: {
    url: {
      default: "",
      type: String
      type: String,
    },
    isPreview: {
      default: true,
      type: Boolean
    }
      type: Boolean,
    },
  },
  methods: {
    downloadIamge(url) {
      axios({
        method: "get",
        url: url,
        responseType: "blob"
        responseType: "blob",
      })
        .then((res) => {
          if (res.status == 200) {
            var a = document.createElement("a")
            var strs = url.split("/")
            var href = new Blob([res.data], { type: "image/jpeg" })
            a.href = URL.createObjectURL(href)
            a.download = strs[strs.length - 1] + ".jpg"
            a.click()
            var a = document.createElement("a");
            var strs = url.split("/");
            var href = new Blob([res.data], { type: "image/jpeg" });
            a.href = URL.createObjectURL(href);
            a.download = strs[strs.length - 1] + ".jpg";
            a.click();
          }
        })
        .catch((err) => {
          if (err && err.status == 401) {
            return
            return;
          }
          this.$notify({
            type: "error",
            message: "下载失败," + err + "请重试!",
            duration: 2500,
            offset: 57
          })
        })
    }
  }
}
            offset: 57,
          });
        });
    },
  },
};
</script>
<style lang="scss" scoped>
.imgBox {
src/views/equipmentManage/equipmentList/components/Content.vue
@@ -6,14 +6,14 @@
      <!-- å…¨å±æŒ‰é’® -->
      <img
        class="zoomOut iconfont"
        src="/images/equipmentManagement/全屏.png"
        src="/images/equipmentManagement/full.png"
        @click="toggleZoom('Full')"
        v-if="!isFull"
      />
      <!-- å–消全屏的按钮 -->
      <img
        class="zoomOut iconfont"
        src="/images/equipmentManagement/退出全屏.png"
        src="/images/equipmentManagement/quit.png"
        @click="toggleZoom('')"
        v-else
      />
@@ -112,8 +112,8 @@
          let markerContent =
            "" +
            `<div class="nodeMarker" id="node${index}}">` +
            '<img class="normal" src="/images/equipmentManagement/设备默认.png">' +
            '<img class="selected" src="/images/equipmentManagement/设备选中.png">' +
            '<img class="normal" src="/images/equipmentManagement/default.png">' +
            '<img class="selected" src="/images/equipmentManagement/select.png">' +
            `<div class="box"> <div class="name">${item.devName}</div> <div class="property">IP地址: <span class="data">${item.devIp}</span> </div> <div class="property">设备位置: <span class="data">${item.province}</span></div><div class="property">安装时间: <span class="data">${item.installTime}</span></div></div>`;
          ("</div>");
src/views/operateManage/productManage/AddBanner.vue
@@ -84,7 +84,7 @@
        if (this.ruleForm.pic && this.ruleForm.pic.indexOf("/images") !== 0) {
          this.pic.push({
            url: "/httpImage/" + this.ruleForm.pic,
            url: this.ruleForm.pic,
          });
        } else {
          this.pic.push({
@@ -232,7 +232,7 @@
    .buttonArea {
      display: flex;
      align-items: flex-end;
      justify-content: end;
      justify-content: flex-end;
      height: 52px;
      line-height: 32px;
      font-size: 12px;
src/views/operateManage/productManage/AddModel.vue
@@ -156,7 +156,7 @@
        });
        if (this.ruleForm.pic && this.ruleForm.pic.indexOf("/images") !== 0) {
          this.pic.push({
            url: "/httpImage/" + this.ruleForm.pic,
            url: "http://" + this.ruleForm.pic,
          });
        } else {
          this.pic.push({
src/views/operateManage/productManage/BannerList.vue
@@ -176,7 +176,7 @@
  .buttonArea {
    display: flex;
    justify-content: end;
    justify-content: flex-end;
    margin: 20px 20px 0 0px;
    .addButton {
      width: 84px;
src/views/operateManage/productManage/DelBox.vue
@@ -54,7 +54,7 @@
  .buttonArea {
    display: flex;
    align-items: center;
    justify-content: end;
    justify-content: flex-end;
    line-height: 24px;
    font-size: 12px;
    text-align: center;
src/views/operateManage/productManage/ModelList.vue
@@ -89,40 +89,7 @@
    return {
      input: "",
      time: "",
      dataList: [
        {
          name: "AI爆款",
          img: "/images/ModelList/暂用.png",
          type: 0,
          des: "精心挑选的入门算法及应用,总有一款适合你",
          sort: 3,
          show: false,
        },
        {
          name: "AI爆款",
          img: "/images/ModelList/暂用.png",
          type: 1,
          des: "精心挑选的入门算法及应用,总有一款适合你",
          sort: 3,
          show: false,
        },
        {
          name: "AI爆款",
          img: "/images/ModelList/暂用.png",
          type: 2,
          des: "精心挑选的入门算法及应用,总有一款适合你",
          sort: 3,
          show: true,
        },
        {
          name: "AI爆款",
          img: "/images/ModelList/暂用.png",
          type: 3,
          des: "精心挑选的入门算法及应用,总有一款适合你",
          sort: 3,
          show: true,
        },
      ],
      dataList: [],
      showDelBox: false,
      delId: null,
    };
@@ -195,7 +162,7 @@
  .buttonArea {
    display: flex;
    justify-content: end;
    justify-content: flex-end;
    margin: 20px 20px 0 0;
    .addButton {
      width: 84px;
src/views/operateManage/productManage/ProductList.vue
@@ -17,6 +17,7 @@
          :data="dataList"
          tooltip-effect="dark"
          :fit="true"
          :key="num"
        >
          <el-table-column label="序号" width="68">
            <template slot-scope="scope">{{ scope.$index + 1 }}</template>
@@ -63,6 +64,51 @@
              </span>
            </template>
          </el-table-column>
          <el-table-column
            width="350"
            key="status"
            label="安装包管理"
            align="center"
          >
            <template slot-scope="scope">
              <div class="uploadBox">
                <file-uploader
                  single
                  uploadPlaceholder="上传文件"
                  url="/admin/api-f/file/upload"
                  @complete="onFileUpload($event, scope.row)"
                  @file-added="onFileAdded(scope.row)"
                  v-if="scope.row.status === 0"
                />
                <div class="name" v-if="scope.row.status === 1">
                  {{ scope.row.component_name }}
                </div>
                <div
                  class="cancel"
                  v-if="scope.row.status === 1"
                  @click="cancel(scope.row)"
                >
                  å–消
                </div>
                <div
                  class="save"
                  @click="submit(scope.row)"
                  v-if="scope.row.status === 1"
                >
                  ä¿å­˜
                </div>
                <div
                  class="save"
                  @click="editPcg(scope.row)"
                  v-if="scope.row.status === 2"
                >
                  ç¼–辑
                </div>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
@@ -77,16 +123,21 @@
<script>
import DelBox from "@/views/operateManage/productManage/DelBox";
import FileUploader from "@/components/subComponents/FileUpload/index";
import { getFilePath } from "@/api/utils";
import {
  getProductListByModel,
  setProductIsShow,
  setProductIndexShow,
  deleteProduct,
  saveProductPackage,
} from "@/api/product";
export default {
  components: {
    DelBox,
    FileUploader,
  },
  created() {
    this.getProductList();
@@ -98,6 +149,8 @@
      dataList: [],
      showDelBox: false,
      delId: null,
      stop: false,
      num: 0,
    };
  },
  methods: {
@@ -107,6 +160,9 @@
      });
      if (res && res.success) {
        this.dataList = res.data.productList;
        this.dataList.forEach((item) => {
          item.status = 2;
        });
      }
    },
    edit() {
@@ -146,6 +202,41 @@
        id: id,
        indexShow: val,
      });
    },
    onFileUpload(params, row) {
      row.component_name = params.filename;
      console.log(row.component_name);
      getFilePath(params).then((res) => {
        if (res.code == 200) {
          this.num++;
          row.component_path = res.data;
          row.status = 1;
        }
      });
    },
    onFileAdded() {},
    cancel(row) {
      this.num++;
      row.status = 0;
    },
    async submit(row) {
      console.log(row);
      const res = await saveProductPackage({
        component_path: row.component_path,
        productId: row.productId,
      });
      if (res && res.success) {
        this.$notify({
          type: "success",
          message: "保存成功",
        });
        row.status = 2;
        this.num++;
      }
    },
    editPcg(row) {
      this.num++;
      row.status = 0;
    },
  },
};
@@ -270,5 +361,23 @@
      cursor: pointer;
    }
  }
  .uploadBox {
    display: flex;
    justify-content: center;
    line-height: 32px;
    .cancel {
      color: #0064ff;
      margin: 0 10px;
      margin-left: 35px;
      cursor: pointer;
    }
    .save {
      color: #0064ff;
      cursor: pointer;
    }
  }
}
</style>