{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\system\\Enclosure\\FileList.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\system\\Enclosure\\FileList.vue","mtime":1675071993085},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"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//\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//\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//\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//\n//\nimport { Message } from \"element-ui\";\nimport req from \"@/request.js\";\n\nvar EipUrlTreeDialog = function EipUrlTreeDialog() {\n return import(\"@/components/dialog/EipUrlTreeDialog.vue\");\n};\n\nvar FileTree = function FileTree() {\n return import(\"@/views/system/Enclosure/FileTree.vue\");\n};\n\nvar IframeSrc = function IframeSrc() {\n return import(\"@/views/system/Enclosure/IframeSrc.vue\");\n};\n\nvar Pdf = function Pdf() {\n return import(\"@/views/system/Enclosure/Pdf.vue\");\n};\n\nvar VideoPlayer = function VideoPlayer() {\n return import(\"@/views/system/Enclosure/HtVideoPlayer.vue\");\n};\n\nexport default {\n components: {\n EipUrlTreeDialog: EipUrlTreeDialog,\n FileTree: FileTree,\n IframeSrc: IframeSrc,\n Pdf: Pdf,\n VideoPlayer: VideoPlayer\n },\n computed: {\n //保存树数据的URL (树新增修改时)\n saveSysTypeUrl: function saveSysTypeUrl() {\n return window.context.portal + \"/file/catalog/v1/save\";\n }\n },\n data: function data() {\n return {\n src: \"\",\n iframeSrc: \"\",\n fileRow: \"\",\n fileTree: \"\",\n title: \"添加分类\",\n treeSidebarData: {},\n //树的新增修改数据\n treeData: [],\n //树数据\n defaultProps: {\n children: \"children\",\n label: \"name\"\n },\n data: [],\n //列表数据\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n urlTree: '${portal}/file/catalog/v1/getTree',\n //加载树的URL地址\n dialogVisible: false,\n //侧边栏是否显示\n parentSysType: {\n name: \"\"\n },\n // 树数据新增时显示父节点\n ids: [] //设置分类时的附件ID集合\n\n };\n },\n methods: {\n //鼠标选中行改变复选框\n rowClick: function rowClick(row, column, event) {\n this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n },\n //查看附件\n searchFile: function searchFile(row) {\n var _this = this;\n\n this.$store.dispatch(\"menu/onlinePreview\", row.id).then(function (data) {\n if (data.result == \"error\") {\n Message.warning(\"附件不存在\");\n } else if (data.result == \"fileNotSupported\") {\n Message.warning(\"当前附件格式不支持预览\");\n } else {\n _this.fileRow = row;\n\n if (data.result == \"html\") {\n _this.iframeSrc = window.context.portal + data.pdfUrl;\n\n _this.$refs.iframeSrcSearch.handleOpen();\n } else if (data.result == \"txt\") {\n _this.iframeSrc = window.context.portal + data.TxtUrl;\n\n _this.$refs.iframeSrcSearch.handleOpen();\n } else if (data.result == \"picture\") {\n _this.iframeSrc = window.context.portal + data.currentUrl;\n\n _this.$refs.iframeSrcSearch.handleOpen();\n } else if (data.result == \"compress\") {\n _this.fileTree = JSON.parse(data.fileTree).childList;\n\n _this.$refs.fileTreeSearch.handleOpen();\n } else if (data.result == \"media\") {\n _this.$refs.videoPlayer.show();\n } else {\n _this.src = window.context.portal + data.pdfUrl;\n\n _this.$refs.pdfSearch.handleOpen();\n }\n }\n });\n },\n //下载附件\n download: function download(row) {\n req.download(\"${portal}/file/v1/downloadFile?fileId=\" + row.id);\n },\n //设置分类\n selectTypeDialog: function selectTypeDialog() {\n if (this.$refs.htTable.$refs.htTable && this.$refs.htTable.$refs.htTable.selection.length == 0) {\n Message.warning(\"请选择要分类的附件数据\");\n return;\n }\n\n var val = this.$refs.htTable.$refs.htTable.selection;\n this.ids = [];\n\n for (var i = 0; i < val.length; i++) {\n this.ids.push(val[i].id);\n }\n\n this.$refs.eipUrlTreeDialog.showDialog();\n },\n //关闭侧边栏\n handleClose: function handleClose() {\n this.loadTreeData(); //刷新树\n\n this.treeSidebarData = {}; //清除保存过的数据\n\n this.dialogVisible = false;\n },\n //树新增修改保存后提示\n afterSaveData: function afterSaveData() {\n var _this2 = this;\n\n this.loadTreeData(); //刷新树\n //如果是编辑不弹出提示信息\n\n if (this.parentSysType.name == \"\") {\n this.dialogVisible = false;\n return;\n }\n\n var parentId = this.treeSidebarData.parentId;\n this.treeSidebarData = {}; //清除保存过的数据\n\n this.treeSidebarData.parentId = parentId;\n this.$confirm(\"是否继续?\", \"提示\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"success\"\n }).then(function () {}).catch(function () {\n _this2.dialogVisible = false;\n });\n },\n //树的按钮事件\n handleCommand: function handleCommand(command) {\n var node = command.node;\n var data = command.data;\n var action = command.action;\n\n switch (action) {\n case \"add\":\n this.showDialog(data, action);\n break;\n\n case \"edit\":\n this.showDialog(data, action);\n break;\n\n case \"delete\":\n this.delSysType(data);\n break;\n }\n },\n //点击按钮打开侧边栏\n showDialog: function showDialog(data, action) {\n this.dialogVisible = true;\n\n if (data) {\n if (action == \"add\") {\n this.title = \"添加分类\";\n this.treeSidebarData = {};\n this.parentSysType = data;\n this.treeSidebarData.parentId = data.id;\n } else if (action == \"edit\") {\n this.title = \"编辑分类\";\n this.parentSysType.name = \"\";\n this.treeSidebarData = data;\n }\n }\n },\n //删除树数据\n delSysType: function delSysType(data) {\n var _this3 = this;\n\n this.$confirm(\"是否确定删除?\", \"提示\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }).then(function () {\n req.remove(window.context.portal + \"/file/catalog/v1/remove?id=\" + data.id).then(function (res) {\n if (res.data.state) {\n _this3.$message({\n type: \"success\",\n message: res.data.message || \"删除成功\"\n });\n\n _this3.loadTreeData();\n } else {\n _this3.$message.error(res.data.message || \"删除成功\");\n }\n }, function (error) {\n reject(error);\n });\n });\n },\n //树鼠标左点击时间查询数据\n handleNodeClick: function handleNodeClick(node) {\n if (node.id == \"-1\") {\n var _param = {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n }\n };\n this.loadData(_param);\n return;\n }\n\n var param = {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n },\n querys: [{\n property: \"xbTypeId\",\n value: node.id,\n group: \"main\",\n operation: \"EQUAL\",\n relation: \"AND\"\n }]\n };\n this.loadData(param);\n },\n //页面加载显示数据\n loadData: function loadData(param, cb) {\n var _this4 = this;\n\n if (!param.sorter || param.sorter.length == 0) {\n param.sorter = [{\n property: \"createTime\",\n direction: \"DESC\"\n }]; //排序字段\n }\n\n req.post(window.context.portal + \"/file/v1/query\", param).then(function (response) {\n _this4.data = response.data.rows;\n _this4.pageResult = {\n page: response.data.page,\n pageSize: response.data.pageSize,\n total: response.data.total\n };\n }).finally(function () {\n return cb();\n });\n },\n //加载树\n loadTreeData: function loadTreeData() {\n var _this5 = this;\n\n req.get(this.urlTree).then(function (response) {\n _this5.treeData = response.data;\n });\n },\n //监听对话框确认事件\n handleSave: function handleSave(data) {\n var this_ = this;\n req.post(window.context.portal + \"/file/v1/setXbTypeId?xbTypeId=\" + data.id + \"&type=\" + data.name, this_.ids).then(function (response) {\n if (response.data && response.data.state) {\n Message.success({\n duration: 1500,\n message: response.data.message,\n onClose: function onClose() {\n var param = {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n }\n };\n this_.loadData(param);\n }\n });\n } else {\n Message.error(response.data.message || \"设置分类失败\");\n }\n });\n }\n },\n mounted: function mounted() {\n this.loadTreeData();\n }\n};",null]}