研发图纸文件管理系统-前端项目
he wei
2023-09-19 9ac0220fedaebcedf9e51d059ed3ffa246b8a8ae
U 下载文件名乱码修改
2个文件已修改
33 ■■■■ 已修改文件
src/pages/resourceManage/product/details/details.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/product/list.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/product/details/details.vue
@@ -50,7 +50,12 @@
                  :data-source="dataSource"
                  :pagination="false"
                  :expandRowByClick="true"
                  :row-key="(record, index) => record.p_subCode ? record.p_subCode + '_' + record.subCode + '_' + index : record.subCode + '_' + index"
                  :row-key="
                    (record, index) =>
                      record.p_subCode
                        ? record.p_subCode + '_' + record.subCode + '_' + index
                        : record.subCode + '_' + index
                  "
                  :rowClassName="rowClassFn"
                >
                  <template slot="dataIndex" slot-scope="text, record, index">
@@ -175,13 +180,21 @@
            >
            <a-button
              type="primary"
              v-if="!currentVersion.enabled && canLockBom && maxVersionid == currentVersion.id"
              v-if="
                !currentVersion.enabled &&
                canLockBom &&
                maxVersionid == currentVersion.id
              "
              @click="changeStatus"
              >激活版本</a-button
            >
            <a-button
              type="primary"
              v-if="currentVersion.enabled && canLockBom && maxVersionid == currentVersion.id"
              v-if="
                currentVersion.enabled &&
                canLockBom &&
                maxVersionid == currentVersion.id
              "
              @click="changeStatus"
              >锁定版本</a-button
            >
@@ -828,9 +841,7 @@
    },
    downloadLog(record) {
      const { parentCode, subModel, dwgUrl, fileUrl: softwareUrl } = record;
      const url = softwareUrl
        ? softwareUrl
        : dwgUrl;
      const url = softwareUrl ? softwareUrl : dwgUrl;
      let reg = /(.*\\+)*(.*)$/;
      let fileName = url.match(reg)[2];
@@ -906,7 +917,9 @@
        if (200 == status && data) {
          let url = window.URL.createObjectURL(data);
          const matchRes = /filename=(.*)/.exec(headers["content-disposition"]);
          const fileName = matchRes ? matchRes[1].trim() : "未知文件名.zip";
          const fileName = matchRes
            ? decodeURI(matchRes[1].trim())
            : "未知文件名.zip";
          let link = document.createElement("a");
          link.style.display = "none";
          link.href = url;
src/pages/resourceManage/product/list.vue
@@ -732,7 +732,7 @@
            title: "问题描述",
            dataIndex: "irregularDesc",
            align: "center",
          }
          },
        ],
        dataSource: [],
      },
@@ -877,7 +877,9 @@
        if (200 == status && data) {
          let url = window.URL.createObjectURL(data);
          const matchRes = /filename=(.*)/.exec(headers["content-disposition"]);
          const fileName = matchRes ? matchRes[1].trim() : "未知文件名.zip";
          const fileName = matchRes
            ? decodeURI(matchRes[1].trim())
            : "未知文件名.zip";
          let link = document.createElement("a");
          link.style.display = "none";
          link.href = url;