研发图纸文件管理系统-前端项目
longyvfengyun
2023-12-21 e383e5e6b40e8939a17227438b51924c4a09b0cc
附件内容和sop内容修改
4个文件已修改
68 ■■■■ 已修改文件
src/pages/resourceManage/materialsCenter/list.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/sopFile/list.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/sopFile/sopList.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/workplaceList.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/resourceManage/materialsCenter/list.vue
@@ -522,6 +522,7 @@
          data = res.data2.list.map((v) => {
            const model = v.subModel;
            const reg = /(.*)(-|_)A/;
            const rootModel = reg.test(model) ? model.match(reg)[1] : "";
                        const isCanUse = this.getAttachIsCanUse(v);
            return {
@@ -712,7 +713,6 @@
      this.resize();
    },
    panelShow(obj) {
            console.log(obj);
      const { id, dwgUrl, attachLocks, subModel } = obj;
      this.currentObj = obj;
      let reg = new RegExp("^" + subModel, "i");
@@ -737,8 +737,26 @@
      });
    },
        getAttachIsCanUse(obj) {
            const {dwgUrl, attachLocks} = obj;
            const {dwgUrl, attachLocks, attachFileList} = obj;
            let isHasNewFile = true;   // 标识是否存有文件,没有锁定和未锁定日志
            if(attachFileList) {
                for(let i=0; i<attachFileList.length; i++) {
                    const itemI = attachFileList[i];
                    for(let j=0; j<attachLocks.length; j++) {
                        const itemJ = attachLocks[j];
                        if(itemI === itemJ.attachName) {
                            isHasNewFile = false;
                            break;
                        }
                    }
                }
            }else {
                isHasNewFile = false;
            }
            let result = false;
            if(isHasNewFile) {
                result = true;
            }else {
            if(attachLocks.length !== 0) {    // 存在未锁定/锁定条目
                let isHasUnlock = false;
                for(let i=0; i<attachLocks.length; i++) {
@@ -764,6 +782,7 @@
                    result = false;
                }
            }else result = !!dwgUrl;
            }
            return result;
        },
    fileListCancel() {
src/pages/resourceManage/sopFile/list.vue
@@ -109,7 +109,7 @@
      :visible="uploadShow"
      :footer="null"
      :width="800"
      title="上传软件"
      title="上传SOP"
      :destroyOnClose="true"
      :maskClosable="false"
      @cancel="uploadCancel"
@@ -117,15 +117,15 @@
      <div class="">
        <template v-if="!onlyXls">
          <a-row type="flex" class="row">
            <a-col flex="6em" class="label">sop包</a-col>
            <a-col flex="6em" class="label">SOP文件</a-col>
            <a-col :flex="1">
              <a-upload
                class="upload"
                :before-upload="beforeUpload"
                @change="uploadChange"
                accept=".zip,.rar"
                accept=".zip,.rar,.pdf"
              >
                <a-button type="primary">选压缩包</a-button>
                <a-button type="primary">选文件</a-button>
              </a-upload>
            </a-col>
          </a-row>
@@ -572,7 +572,7 @@
    },
    uploadSop() {
      if (!this.file) {
        this.$message.error("请选择要上传的压缩包");
        this.$message.error("请选择要上传的文件");
        return false;
      }
      if (!this.file1) {
@@ -878,13 +878,13 @@
    },
    downloadFile(record) {
            const fileInfo = getFileTypeAndName(record.fileUrl);
        let url = this.webUrl + record.fileUrl;
            if(fileInfo.type === 'pdf') {  // 预览
                window.open("http://localhost:8092/cad/"+record.fileUrl);
                window.open(url);
            }else {     // 下载
                let loading = this.$layer.loading();
                let link = document.createElement("a");
                link.style.display = "none";
                let url = this.webUrl + record.fileUrl;
                let fileName = record.fileUrl.split("/").pop();
                link.href = url;
                link.download = fileName;
src/pages/resourceManage/sopFile/sopList.vue
@@ -70,7 +70,7 @@
            :visible="uploadShow"
            :footer="null"
            :width="800"
            title="上传软件"
            title="上传SOP"
            :destroyOnClose="true"
            :maskClosable="false"
            @cancel="uploadCancel"
@@ -78,7 +78,7 @@
            <div class="">
                <template v-if="!onlyXls">
                    <a-row type="flex" class="row">
                        <a-col flex="6em" class="label">sop包</a-col>
                        <a-col flex="6em" class="label">sop文件</a-col>
                        <a-col :flex="1">
                            <a-upload
                                class="upload"
@@ -86,7 +86,7 @@
                                @change="uploadChange"
                                accept=".zip,.rar"
                            >
                                <a-button type="primary">选压缩包</a-button>
                                <a-button type="primary">选文件</a-button>
                            </a-upload>
                        </a-col>
                    </a-row>
@@ -302,6 +302,14 @@
            update: -1,
            conditions: {},
            columns: [
                {
                    title: "文件名称",
                    dataIndex: "fileName",
                    align: "center",
                    width: 140,
                    searchAble: false,
                    customCell: this.customCell,
                },
                {
                    title: "发布时间",
                    dataIndex: "releaseDate",
@@ -768,13 +776,13 @@
        },
        downloadFile(record) {
            const fileInfo = getFileTypeAndName(record.fileUrl);
            let url = this.webUrl + record.fileUrl;
            if(fileInfo.type === 'pdf') {  // 预览
                window.open("http://localhost:8092/cad/"+record.fileUrl);
                window.open(url);
            }else {     // 下载
                let loading = this.$layer.loading();
                let link = document.createElement("a");
                link.style.display = "none";
                let url = this.webUrl + record.fileUrl;
                let fileName = record.fileUrl.split("/").pop();
                link.href = url;
                link.download = fileName;
src/pages/workplace/workplaceList.vue
@@ -29,7 +29,7 @@
        dataIndex: "parentName",
        align: "center",
        noSearch: true,
        width: 120,
        width: 180,
      },
      {
        title: "产品型号",
@@ -50,49 +50,56 @@
        dataIndex: "versionTime",
        align: "center",
        noSearch: true,
        width: 120,
          width: 180
      },
      {
        title: "创建人",
        dataIndex: "senderName",
        align: "center",
        noSearch: true,
          width: 120
      },
      {
        title: "创建时间",
        dataIndex: "createTime",
        align: "center",
        noSearch: true,
          width: 180
      },
      {
        title: "反馈接收人",
        dataIndex: "receiverNames",
        align: "center",
        noSearch: true,
          width: 180
      },
      {
        title: "确认人",
        dataIndex: "confirmUserName",
        align: "center",
        noSearch: true,
          width: 180
      },
      {
        title: "回复内容",
        dataIndex: "replyContent",
        align: "center",
        noSearch: true,
          width: 150
      },
      {
        title: "回复时间",
        dataIndex: "replyTime",
        align: "center",
        noSearch: true,
          width: 180
      },
      {
        title: "变更单流水号",
        dataIndex: "ecrNumber",
        align: "center",
        noSearch: true,
          width: 180
      },
      {
        title: "操作",
@@ -330,7 +337,7 @@
            @refresh="onRefresh"
            @reset="onReset"
            :format-conditions="true"
            :scroll="{ x: 400, y }"
            :scroll="{ x: 100, y }"
            :pagination="{
              current: pageCurr,
              pageSize: pageSize,