You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							1 lines
						
					
					
						
							20 KiB
						
					
					
				
			
		
		
	
	
							1 lines
						
					
					
						
							20 KiB
						
					
					
				{"remainingRequest":"F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\src\\views\\archives\\archiveFileInfo\\index.vue?vue&type=style&index=0&id=263edeaa&lang=scss&scoped=true&","dependencies":[{"path":"F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\src\\views\\archives\\archiveFileInfo\\index.vue","mtime":1633763899948},{"path":"F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\node_modules\\css-loader\\dist\\cjs.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\node_modules\\sass-loader\\dist\\cjs.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"F:\\workspace\\gcy\\RK-archives\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAydA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/views/archives/archiveFileInfo","sourcesContent":["<template>\n  <div class=\"execution\">\n\n    <avue-crud ref=\"crud\"\n               :page=\"page\"\n               :data=\"tableData\"\n               :table-loading=\"tableLoading\"\n               :option=\"getOption\"\n               @row-save=\"handleSave\"\n               @on-load=\"getPage\"\n               @row-update=\"handleUpdate\"\n               v-model=\"form\"\n               @search-change=\"searchChange\"\n               @refresh-change=\"refreshChange\"\n               @row-del=\"handleDel\"\n    >\n              <template slot=\"menu\" slot-scope=\"scope\">\n                <el-dropdown ><span class=\"el-dropdown-link\"><el-button type=\"text\" size=\"small\">操作列表<i class=\"el-icon-arrow-down el-icon--right\"></i></el-button>\n             </span>\n                  <el-dropdown-menu slot=\"dropdown\">\n                    <el-dropdown-item  v-if='scope.row.status == 1 || scope.row.status == 3'><span @click=\"updateFileInfo(scope.row)\"><i class=\"el-icon-edit\"></i> 编辑</span>\n                    </el-dropdown-item>\n                    <el-dropdown-item  v-if='scope.row.status == 1 || scope.row.status == 3'><span @click=\"copy(scope.row)\"><i class=\"el-icon-document-copy\"></i> 复制</span>\n                    </el-dropdown-item>\n                    <el-dropdown-item  v-if='scope.row.status == 1 || scope.row.status == 3'><span @click=\"handleDel(scope.row)\"><i class=\"el-icon-delete\"></i> 删除</span>\n                    </el-dropdown-item>\n                    <el-dropdown-item  v-if='scope.row.status == 1 || scope.row.status == 3'><span @click=\"electronicFileUpload(scope.row)\"><i class=\"el-icon-upload\"></i> 批量上传</span>\n                    </el-dropdown-item>\n                    <el-dropdown-item ><span @click=\"showFileList(scope.row)\"><i class=\"el-icon-tickets\"></i>上传列表</span>\n                    </el-dropdown-item>\n                    <el-dropdown-item  ><span @click=\"view(scope.row)\"><i class=\"el-icon-view\"></i> 查看</span>\n                    </el-dropdown-item>\n                  </el-dropdown-menu>\n                </el-dropdown>\n              </template>\n\n             <template slot=\"menuLeft\">\n              <el-button type=\"primary\" size=\"small\" icon=\"el-icon-plus\" @click=\"addCatalog()\" v-if=\"$props.status==1||$props.status==3\">\n                添加卷内文件\n              </el-button>\n            </template>\n    </avue-crud>\n<!--批量上传文件-->\n    <el-dialog title=\"批量上传\" :visible.sync=\"dsBox\" :modal=false width=\"100%\" fullscreen @close=\"dsBox=false\" class=\"batchUpload\" :before-close=\"handleClose\" style=\"text-align: center\">\n      <template>\n        <uploader\n          ref=\"uploader\"\n          :autoStart=\"false\"\n          :fileStatusText=\"fileStatusText\"\n          :options=\"options\"\n          @file-added=\"onFileAdded\"\n          @file-success=\"onFileSuccess\"\n          @file-progress=\"onFileProgress\"\n          @file-error=\"onFileError\"\n          @class=\"uploader-example\">\n          <uploader-unsupport></uploader-unsupport>\n          <uploader-btn class=\"filechose\">选择文件</uploader-btn>\n          <uploader-btn :directory=\"true\" class=\"dirchose\">选择文件夹</uploader-btn>\n          <el-button type=\"primary\" size=\"small\" icon=\"el-icon-document-add\" class=\"chosefile\" @click=\"filechose\">选择文件</el-button>\n          <el-button type=\"primary\" size=\"small\" icon=\"el-icon-folder-add\"  class=\"chosedir\" @click=\"dirchose\">选择文件夹</el-button>\n          <el-button type=\"success\" size=\"small\" icon=\"el-icon-upload\" class=\"uploadAll\" @click=\"uploadAll\">一键上传</el-button>\n          <uploader-list>\n            <div class=\"file-panel\" slot-scope=\"props\">\n              <ul class=\"file-list\">\n                <li v-for=\"file in props.fileList\" :key=\"file.id\">\n                  <uploader-file :class=\"'file_' + file.id\" ref=\"files\" :file=\"file\" :list=\"true\"></uploader-file>\n                </li>\n                <div class=\"no-file\" v-if=\"!props.fileList.length\"><i class=\"nucfont inuc-empty-file\"></i> 暂无待上传文件</div>\n              </ul>\n            </div>\n          </uploader-list>\n        </uploader>\n      </template>\n    </el-dialog>\n<!--    文件列表-->\n    <el-drawer\n      :title=\"uploadTitle\"\n      :visible.sync=\"drawer\"\n      :direction=\"direction\"\n      :with-header=\"false\"\n      :modal=false\n      size=\"60%\"\n     >\n      <avue-crud ref=\"upCrud\"\n                 :page=\"fileUploadPage\"\n                 :data=\"fileUpTableData\"\n                 :table-loading=\"fileUpTableLoading\"\n                 :option=\"uploadOption\"\n                 @on-load=\"getUpPage\"\n                 v-model=\"fileUpForm\"\n                 @refresh-change=\"fileUpRefreshChange\">\n        <template slot=\"menu\" slot-scope=\"scope\">\n\n              <el-button type=\"text\" @click=\"downloadUtils(scope.row.path)\" class=\"el-icon-download\"> 下载</el-button>\n\n        </template>\n      </avue-crud>\n    </el-drawer>\n  </div>\n</template>\n\n<script>\nimport {wsFileInfo} from \"@/const/crud/archives/wsArchiveRecordinfo\";\nimport {swFileInfo} from \"@/const/crud/archives/swArchiveRecordinfo\";\nimport {addInfo, listInfo,delInfo,updateInfo} from \"@/api/archives/fileInfo\";\nimport {jjFileInfo} from \"@/const/crud/archives/jjArchiveRecordinfo\";\nimport {sxFileInfo} from \"@/const/crud/archives/sxArchiveRecordinfo\";\nimport {htFileInfo} from \"@/const/crud/archives/htArchiveRecordinfo\";\nimport {jyFileInfo} from \"@/const/crud/archives/jyArchiveRecordinfo\";\nimport {zxFileInfo} from \"@/const/crud/archives/zxArchiveRecordinfo\";\nimport {yjFileInfo} from \"@/const/crud/archives/yjArchiveRecordinfo\";\nimport {commonFileInfo, commonTableOption} from \"@/const/crud/archives/commonArchiveRecordinfo\";\nimport store from \"@/store\";\nimport {fileUploadTableOption} from \"@/const/crud/archives/fileUploadList\";\nimport {listFileUploadList} from \"@/api/archives/fileUploadList\";\nimport {downLoadUtil} from \"@/api/archives/archiveRecord\";\n\n\n\nexport default {\n  name: \"archiveFileInfo\",\n  props: [\"arId\", \"archiveCategory\",\"status\",\"archiveCategoryName\",\"archiveScope\",\"storageTime\"],\n  data() {\n    return {\n      uploadTitle:'',\n      fileUpTableLoading:false,\n      fileUpForm:{},\n      uploadOption:fileUploadTableOption,\n      drawer:false,\n      direction:'rtl',\n      fileList:[],\n      form: {},\n      fileUpTableData:[],\n      dsBox:false,\n      tableData: [],\n      tableLoading: false,\n      page: {\n        total: 0, // 总页数\n        currentPage: 1, // 当前页数\n        pageSize: 10, // 每页显示多少条\n      },\n      fileUploadPage:{\n        total: 0, // 总页数\n        currentPage: 1, // 当前页数\n        pageSize: 10, // 每页显示多少条\n      },\n      paramsSearch:{},\n      fileUpParamsSearch:{},\n      fileStatusText:{\n        success: '上传成功',\n        error: '上传失败',\n        uploading: '上传中',\n        paused: '停止',\n        waiting: '等待中',\n        cmd5: '加密中'\n      },\n      options: {\n        target: \"/dev-api/archives/archiveelectronicfile/batchBindElectronicFile\",\n        testChunks: false,\n        chunkSize: 1024*1024*200,  //1MB\n        simultaneousUploads: 1, //并发上传数\n        headers: {\n          Authorization: 'Bearer ' +store.getters.token\n        },\n        query:{},\n      },\n    }\n  },\n  mounted() {\n    // this.getPage(this.page)\n  },\n  methods: {\n    downloadUtils(url){\n      let  obj={\n        fileName:url,\n        delete:false\n      }\n      downLoadUtil(obj).then(res=>{\n        let blob = res\n        if (blob.size<=0){\n          this.$notify.error(\"下载文件失败,或由于文件已不存在\");\n          return;\n        }\n        let downloadElement = document.createElement('a');\n        let href = window.URL.createObjectURL(blob); // 创建下载的链接\n        downloadElement.href = href;\n        let fileName= url.substring(url.lastIndexOf(\"/\")+1)\n        downloadElement.download = fileName; // 下载后文件名\n        document.body.appendChild(downloadElement);\n        downloadElement.click(); // 点击下载\n        document.body.removeChild(downloadElement); // 下载完成移除元素\n        window.URL.revokeObjectURL(href); // 释放掉blob对象\n      }).catch(err=>{\n        this.$notify.error(err)\n      })\n    },\n    showFileList(row){\n      this.uploadTitle=row.title\n      this.fileUpParamsSearch.fileId=row.id\n      this.fileUploadPage.currentPage=1\n      this.getUpPage(this.fileUploadPage)\n       this.drawer=true\n    },\n    handleClose(){\n      this.$confirm('是否确认关闭批量挂接窗口', '提示', {\n        confirmButtonText: '确定',\n        cancelButtonText: '取消',\n        type: 'warning'\n      }).then(() => {\n        // 在 uploader 组件上会有 uploader 属性 指向的就是 Uploader 实例\n        const uploaderInstance = this.$refs.uploader.uploader\n        // 这里可以调用实例方法\n        uploaderInstance.cancel()\n        this.dsBox = false\n        this.getPage(this.page)\n      })\n    },\n    filechose(){\n      document.getElementsByClassName(\"filechose\")[0].click();\n    },\n    dirchose(){\n      document.getElementsByClassName(\"dirchose\")[0].click();\n    },\n    //添加文件到列表 还未上传\n    onFileAdded(file) {},\n    //上传成功\n    onFileSuccess(rootFile, file, response, chunk) {\n      let res = JSON.parse(response);\n      if(res.code==200){\n        this.$notify({\n          title:'成功',\n          type: 'success',\n          message: '上传成功'\n        });\n      }else {\n        this.$notify({\n          title:'失败',\n          type: 'error',\n          message: '上传失败'\n        });\n        this.statusSet(file.id, 'failed');\n      }\n    },\n    /**\n     * 新增的自定义的状态: 'md5'、'transcoding'、'failed'\n     * @param id\n     * @param status\n     */\n    statusSet(id, status) {\n      let statusMap = {\n        md5: {\n          text: '校验MD5',\n          bgc: '#fff'\n        },\n        merging: {\n          text: '合并中',\n          bgc: '#e2eeff'\n        },\n        transcoding: {\n          text: '转码中',\n          bgc: '#e2eeff'\n        },\n        failed: {\n          text: '上传失败',\n          bgc: '#e2eeff'\n        }\n      }\n      this.$nextTick(() => {\n        var para = document.createElement(\"p\");\n        para.classList.add(\"myStatus_\"+id);\n        var node = document.createTextNode(statusMap[status].text);\n        para.appendChild(node);\n        var parent = document.getElementsByClassName(\"file_\"+id)[0];\n        var element1 = document.getElementsByClassName(\"file_\"+id)[0]\n        var element = undefined;\n        if(element1){\n          element = element1.getElementsByClassName(\"uploader-file-status\")[0];\n          var child = element.firstElementChild\n          element.removeChild(child);\n          para.style.cssText = 'position: absolute; top: 0; left: 0 ;right:0;bottom:0;zIndex:1;backgroundColor:'+statusMap[status].bgc;\n          parent.setAttribute('status', 'error');\n          element.appendChild(para);\n        }\n      })\n    },\n    statusRemove(id) {\n      this.$nextTick(() => {\n        var statusDom = document.getElementById(\"myStatus_\"+id)\n        statusDom.remove();\n      })\n    },\n    //文件进度的回调\n    onFileProgress(rootFile, file, chunk) {},\n    //出错\n    onFileError(rootFile, file, response, chunk) {\n      let res = JSON.parse(response);\n      this.$notify({\n        title:'失败',\n        type: 'error',\n        message: res.msg\n      });\n    },\n    uploadAll(){\n      // 在 uploader 组件上会有 uploader 属性 指向的就是 Uploader 实例\n      const uploaderInstance = this.$refs.uploader.uploader\n      // 这里可以调用实例方法\n      uploaderInstance.resume()\n    },\n    electronicFileUpload(row){\n      this.options.query.arSort=row.arSort\n      this.options.query.fileId=row.id\n      this.options.query.archiveCategory=this.$props.archiveCategoryName;\n        this.options.query.archiveScope=this.$props.archiveScope;\n        this.options.query.storageTime=this.$props.storageTime;\n        this.options.query.id=this.$props.arId;\n      this.dsBox = true\n\n    },\n    view(row){\n      this.$refs.crud.rowView(row)\n    },\n    updateFileInfo(row, index) {\n      this.$refs.crud.rowEdit(row, index);\n    },\n    searchChange(params, done) {\n      this.paramsSearch = params\n      this.page.currentPage = 1\n      this.getPage(this.page, params)\n      done()\n    },\n    getPage(page, params) {\n      this.paramsSearch.arId=this.$props.arId\n      this.tableLoading = true\n      listInfo(Object.assign({\n        pageNum: page.currentPage,\n        pageSize: page.pageSize,\n      }, params, this.paramsSearch)).then(response => {\n        this.tableData = response.rows\n        this.page.total = response.total.toString()\n        this.page.currentPage = page.currentPage\n        this.page.pageSize = page.pageSize\n        this.tableLoading = false\n      }).catch(() => {\n        this.tableLoading = false\n      })\n    },\n    getUpPage(page, params) {\n      this.fileUpTableLoading = true\n      listFileUploadList(Object.assign({\n        pageNum: page.currentPage,\n        pageSize: page.pageSize,\n      }, params, this.fileUpParamsSearch)).then(response => {\n        this.fileUpTableData = response.rows\n        this.fileUploadPage.total = response.total.toString()\n        this.fileUploadPage.currentPage = page.currentPage\n        this.fileUploadPage.pageSize = page.pageSize\n        this.fileUpTableLoading = false\n      }).catch(() => {\n        this.fileUpTableLoading = false\n      })\n    },\n    addCatalog() {\n      this.$refs.crud.rowAdd();\n    },\n    refreshChange(page) {\n      this.getPage(this.page)\n    },\n    fileUpRefreshChange(){\n      this.getUpPage(this.fileUploadPage)\n    },\n    /**\n     * @title 数据添加\n     * @param row 为当前的数据\n     * @param done 为表单关闭函数\n     *\n     **/\n    handleSave: function (row, done, loading) {\n      row.arId = this.$props.arId\n      if(this.$props.archiveCategory == 'SX'||\n        this.$props.archiveCategory == 'ZXXM'||\n        this.$props.archiveCategory == 'JJ'||\n        this.$props.archiveCategory == 'ZX'){\n        row.numLength=4;\n      }else{\n        row.numLength=3;\n      }\n      addInfo(row).then(response => {\n        this.$notify({\n          title: '成功',\n          showClose: true,\n          message: '添加成功',\n          type: 'success'\n        })\n        done()\n        this.getPage(this.page)\n      }).catch(() => {\n        loading()\n      })\n    },\n    handleDel: function (row) {\n\n          let ids = [];\n          ids.push(row.id)\n\n        this.$confirm('是否确认删除此数据', '提示', {\n          confirmButtonText: '确定',\n          cancelButtonText: '取消',\n          type: 'warning'\n        }).then(function () {\n          return delInfo(ids);\n        }).then(data => {\n          this.$notify({\n            title: '成功',\n            showClose: true,\n            message: '删除成功',\n            type: 'success'\n          });\n          this.getPage(this.page);\n        }).catch(function (err) {\n        })\n      },\n    handleUpdate: function (row, index, done, loading) {\n      updateInfo(row).then(response => {\n        this.$notify({\n          title: '成功',\n          showClose: true,\n          message: '修改成功',\n          type: 'success'\n        })\n        done()\n        this.getPage(this.page)\n      }).catch(() => {\n        loading()\n      })\n    },\n    },\n\n\n\n  computed: {\n    getOption() {\n      if (this.$props.archiveCategory == 'WS'||this.$props.archiveCategory == 'ZXXM') {\n        return wsFileInfo\n      } else if (this.$props.archiveCategory == 'SW') {\n\n        return swFileInfo;\n      }else if (this.$props.archiveCategory == 'JJ') {\n\n        return jjFileInfo;\n      }else if (this.$props.archiveCategory == 'SX') {\n\n        return sxFileInfo;\n      }else if (this.$props.archiveCategory == 'HT') {\n\n        return htFileInfo;\n      }else if (this.$props.archiveCategory == 'JYDA') {\n\n        return jyFileInfo;\n      }else if (this.$props.archiveCategory == 'ZX') {\n\n        return zxFileInfo;\n      }else if (this.$props.archiveCategory == 'DAYJJL') {\n\n        return yjFileInfo;\n      }else{\n        return commonFileInfo;\n      }\n    }\n  },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.uploader-example {\n  width: 880px;\n  padding: 15px;\n  margin: 40px auto 0;\n  font-size: 12px;\n  box-shadow: 0 0 10px rgba(0, 0, 0, .4);\n}\n.uploader-example .uploader-btn {\n  margin-right: 4px;\n}\n.uploader-example .uploader-list {\n  max-height: 440px;\n  overflow: auto;\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.file-panel{\n  margin-top: 30px;\n}\n.uploadAll{\n  margin-left: 74%;\n}\n.filechose{\n  display: none;\n}\n.dirchose{\n  display: none;\n}\n\n</style>\n"]}]} |