{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\control\\HtFile.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\control\\HtFile.vue","mtime":1667804638774},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport utils from \"@/utils.js\";\nimport req from \"@/request.js\";\nimport FileUpload from \"@/components/common/fileUploadFlow.vue\";\nimport Pdf from \"@/components/common/pdf.vue\";\nimport IframeSrc from \"@/components/common/iframeSrc.vue\";\nimport FileTree from \"@/components/common/fileTree.vue\";\nexport default {\n name: \"ht-file\",\n props: [\"validate\", \"value\", \"name\", \"permission\", \"multiple\", \"accept\", \"limit\", \"propConf\", \"tooltipplacement\", \"allowPreview\", \"allowDownload\"],\n data: function data() {\n return {\n src: \"\",\n iframeSrc: \"\",\n inputVal: \"\",\n val: \"\",\n uploadVal: [],\n fileId: \"\",\n fileTree: \"\",\n filesData: [],\n propConfList: [],\n extraProps: []\n };\n },\n watch: {\n inputVal: function inputVal(newVal, oldVal) {\n this.val = newVal;\n this.$emit(\"input\", this.val);\n }\n },\n computed: {\n inputWriteable: function inputWriteable() {\n return utils.getWriteable(this.permission);\n },\n inputValidate: function inputValidate() {\n var validateObj = this.$store.state.index.validate;\n return utils.addRequiredOrNot(this.permission, this.validate, validateObj, this);\n },\n inputName: function inputName() {\n var labeldesc = \"\";\n\n if (this.$slots && this.$slots.labeldesc && this.$slots.labeldesc[0].children && this.$slots.labeldesc[0].children[0].text) {\n labeldesc = this.$slots.labeldesc[0].children[0].text;\n return this.name ? this.name : utils.getName() + \"-\" + labeldesc;\n } else {\n return this.name ? this.name : utils.getName();\n }\n },\n canPreview: function canPreview() {\n if (this.permission == 'r' && !this.allowPreview) {\n return false;\n }\n\n return true;\n },\n canDownload: function canDownload() {\n if (this.permission == 'r' && !this.allowDownload) {\n return false;\n }\n\n return true;\n }\n },\n created: function created() {\n var _this = this;\n\n if (this.propConf) {\n var list = JSON.parse(this.propConf);\n list.forEach(function (element) {\n if (element.desc) {\n if (element.requried) {\n element.inputValidate = 'required:true';\n }\n\n _this.propConfList.push(element);\n\n _this.extraProps.push(element.name);\n }\n });\n }\n\n if (this.value) {\n this.inputVal = this.value;\n this.uploadVal = JSON.parse(this.value);\n\n if (this.uploadVal) {\n var _loop = function _loop(i) {\n var file = {\n id: _this.uploadVal[i].id,\n name: _this.uploadVal[i].name,\n size: _this.uploadVal[i].size,\n type: utils.substringType(_this.uploadVal[i].name, \".\"),\n bytes: utils.bigDecimal(_this.uploadVal[i].size),\n username: _this.uploadVal[i].username\n };\n\n _this.extraProps.forEach(function (prop) {\n file[prop] = _this.uploadVal[i][prop];\n });\n\n _this.filesData.push(file);\n };\n\n for (var i = 0; i < this.uploadVal.length; i++) {\n _loop(i);\n }\n }\n }\n\n this.$validator = this.$root.$validator;\n },\n mounted: function mounted() {},\n methods: {\n //附件下载\n downloadFile: function downloadFile(file) {\n this.$store.dispatch(\"menu/downloadFile\", file.id);\n },\n previewFile: function previewFile(files) {\n var _this2 = this;\n\n var id = files.id;\n this.$store.dispatch(\"menu/onlinePreview\", id).then(function (data) {\n _this2.fileId = id;\n\n if (data.result == \"html\") {\n _this2.iframeSrc = window.context.portal + data.pdfUrl;\n\n _this2.$refs.iframeSrcSearch.handleOpen();\n } else if (data.result == \"txt\") {\n _this2.iframeSrc = window.context.portal + data.TxtUrl;\n\n _this2.$refs.iframeSrcSearch.handleOpen();\n } else if (data.result == \"picture\") {\n _this2.iframeSrc = window.context.portal + data.currentUrl;\n\n _this2.$refs.iframeSrcSearch.handleOpen();\n } else if (data.result == \"compress\") {\n _this2.fileTree = JSON.parse(data.fileTree).childList;\n\n _this2.$refs.fileTreeSearch.handleOpen();\n } else {\n _this2.src = window.context.portal + data.pdfUrl;\n\n _this2.$refs.pdfSearch.handleOpen();\n }\n });\n },\n select: function select() {\n this.$message.success(\"打开选择器对话框\");\n }\n },\n components: {\n Pdf: Pdf,\n IframeSrc: IframeSrc,\n FileUpload: FileUpload,\n FileTree: FileTree\n }\n};",null]}