{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web-prod\\src\\views\\FileLibrary.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\src\\views\\FileLibrary.vue","mtime":1672924686864},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\babel.config.js","mtime":1667333346259},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web-prod\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es7.array.includes\";\nimport \"core-js/modules/es6.string.includes\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/xypm-web-prod/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/web.dom.iterable\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\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//\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 req from '@/request.js';\nexport default {\n name: 'FileLibrary',\n data: function data() {\n return {\n title: '',\n treeForm: {},\n dialogVisible2: false,\n //添加树型节点\n typeKey: '',\n filterText: '',\n //树型搜索内容\n isIeExplorer: false,\n //\n isExpand: false,\n loading: false,\n props: {\n label: 'name',\n code: 'code',\n id: 'id',\n children: 'children',\n pcode: 'pcode',\n isLeaf: 'leaf' // 指定节点是否为叶子节点,仅在指定了 lazy 属性的情况下生效\n\n },\n treeData: [{\n name: '文件库管理',\n code: 'root',\n id: '1',\n children: []\n }],\n defaultCheckedKeys: [],\n //默认选中节点\n defaultExpandedKeys: ['1'],\n //默认展开节点\n node: '',\n resolve: '',\n //表单验证\n treeRules: {\n pName: {\n required: true,\n message: '请输入',\n trigger: 'blur'\n },\n name: {\n required: true,\n message: '请输入',\n trigger: 'blur'\n },\n code: {\n required: true,\n message: '请输入',\n trigger: 'blur'\n }\n },\n // importData: {\n // title: '文件导入',\n // templateName: '文件模板.xls',\n // downloadUrl: './../static/excel/AnnualPlan.xlsx',\n // importUrl:\n // window.context.cqxy +\n // '/biz/projectApproval/decisionBasis/decisionAnnualPlan/v1/importExcelData',\n // projectId: '',\n // },\n projectObj: [],\n //获取的所有项目数组\n searchForm: {\n documentNumber: '',\n establishmentName: '',\n typeId: ''\n },\n //顶部搜索参数\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n form: {\n documentNumber: '',\n establishmentName: '',\n establishmentDate: '',\n describe: '',\n accessoryInfo: [],\n typeInfo: {}\n },\n dialogVisible: false,\n //表格\n dialogTitle: '添加',\n //表单验证\n rules: {\n // documentNumber: {\n // required: true,\n // message: '请输入',\n // trigger: 'blur'\n // },\n establishmentName: {\n required: true,\n message: '请输入',\n trigger: 'blur'\n } // establishmentDate: {\n // required: true,\n // message: '请输入',\n // trigger: 'blur'\n // }\n\n },\n typeId: '',\n isShowAside: true //左侧菜单默认显示\n\n };\n },\n computed: {\n deleteUrl: function deleteUrl() {\n return window.context.cqxy + '/biz/fileLibrary/v1/delete';\n }\n },\n mounted: function mounted() {\n this.getTreeData();\n },\n watch: {\n filterText: function filterText(val) {\n this.$refs.tree.filter(val);\n }\n },\n methods: {\n handleReset: function handleReset() {\n var _this = this;\n\n this.searchForm.documentNumber = '';\n this.searchForm.establishmentName = '';\n this.$refs['searchForm'].resetFields();\n this.pageResult = {\n page: 1,\n pageSize: 20,\n total: 0\n };\n this.$nextTick(function () {\n _this.$refs.AtTable.load();\n });\n },\n //导入后重新加载数据\n load: function load() {\n this.$refs.AtTable.load();\n },\n //获取附件信息\n accessoryInfo: function accessoryInfo(info) {\n var newInfo = [];\n info.forEach(function (item) {\n item.projectId = 'fileLibrary';\n item.group = 'fileLibrary';\n newInfo.push(item);\n });\n this.form.accessoryInfo = newInfo;\n },\n //查询\n handleSearch: function handleSearch() {\n var _this2 = this;\n\n this.pageResult = {\n page: 1,\n pageSize: 20,\n total: 0\n };\n this.$nextTick(function () {\n _this2.$refs.AtTable.load();\n });\n },\n afterSaveData: function afterSaveData() {\n var _this3 = this;\n\n setTimeout(function () {\n _this3.dialogVisible = false;\n\n _this3.$refs.AtTable.load();\n\n _this3.form.documentNumber = '';\n _this3.form.establishmentName = '';\n _this3.form.establishmentDate = '';\n _this3.form.describe = '';\n _this3.form.accessoryInfo = [];\n }, 500);\n },\n handleAdd: function handleAdd() {\n var obj = {\n documentNumber: '',\n establishmentName: '',\n establishmentDate: '',\n describe: '',\n accessoryInfo: []\n };\n this.form = _objectSpread(_objectSpread({}, this.form), obj); // this.form.documentNumber = ''\n // this.form.establishmentName = ''\n // this.form.establishmentDate = ''\n // this.form.describe = ''\n // this.form.accessoryInfo = []\n\n if (this.form.typeInfo && this.form.typeInfo.id) {\n this.dialogTitle = '添加';\n this.dialogVisible = true;\n } else {\n this.$message('请选择一条子节点');\n }\n },\n handleRowDBClick: function handleRowDBClick(data) {\n // if (this.getMethodauth('file_update')) {\n this.dialogTitle = '修改';\n this.dialogVisible = true;\n this.form = data; // }\n },\n handleSelect: function handleSelect(selection) {},\n //取消\n handleDialogCancel: function handleDialogCancel() {\n this.dialogVisible = false; // this.form.documentNumber = ''\n // this.form.establishmentName = ''\n // this.form.establishmentDate = ''\n // this.form.describe = ''\n // this.form.accessoryInfo = []\n },\n //关闭窗口\n handleDialogClose: function handleDialogClose(val) {\n this.dialogVisible = false;\n this.form.documentNumber = '';\n this.form.establishmentName = '';\n this.form.establishmentDate = '';\n this.form.describe = '';\n this.form.accessoryInfo = [];\n },\n //提交保存\n handleDialogSubmit: function handleDialogSubmit(formName) {\n var _this4 = this;\n\n this.$refs[formName].validate(function (valid) {\n if (valid && _this4.form.accessoryInfo.length !== 0) {\n _this4.loading = true;\n\n _this4.form.accessoryInfo.forEach(function (item) {\n if (item.id) {\n delete item.id;\n }\n });\n\n _this4.$http.post('${cqxy}/biz/fileLibrary/v1/save', _this4.form).then(function (res) {\n if (res.status == 200) {\n setTimeout(function () {\n _this4.$message.success(res.data.message);\n\n _this4.afterSaveData();\n }, 500);\n } else {\n _this4.$message.error(res.data.message);\n }\n\n _this4.loading = false;\n });\n } else if (_this4.form.accessoryInfo.length === 0) {\n _this4.$message.error('至少上传一个附件');\n } else {\n _this4.$message({\n message: '*号必填项,不能为空!',\n type: 'warning'\n });\n\n return false;\n }\n });\n },\n loadData: function loadData(param, cb) {\n var _this5 = this;\n\n var query = [];\n var search = {\n type_id_: this.searchForm.typeId,\n document_number_: this.searchForm.documentNumber,\n establishment_name_: this.searchForm.establishmentName\n };\n\n if (this.dialogVisible) {\n search.type_id_ = this.form.typeId;\n }\n\n for (var i in search) {\n if (search[i]) {\n query.push({\n group: 'advance',\n operation: 'LIKE',\n property: i,\n relation: 'AND',\n value: search[i]\n });\n }\n }\n\n if (param.querys && param.querys.length) {\n var _param$querys;\n\n (_param$querys = param.querys).push.apply(_param$querys, query);\n } else {\n param.querys = query;\n }\n\n this.$http.post('${cqxy}/biz/fileLibrary/v1/page', param).then(function (resp) {\n var response = resp.data.value;\n _this5.data = response.rows;\n _this5.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n }, function (error) {\n reject(error);\n }).finally(function () {\n if (cb) {\n cb();\n }\n });\n },\n handleClose: function handleClose() {\n this.dialogVisible2 = false;\n },\n //初始节点\n getTreeData: function getTreeData() {\n var _this6 = this;\n\n var pcode = 'root';\n var formData = new FormData();\n formData.append('pCode', pcode);\n this.$http.post('${cqxy}/biz/fileLibrary/type/v1/getByParentId', formData).then(function (res) {\n var resp = res.data.value;\n _this6.treeData[0].children = resp;\n });\n },\n //点击节点\n handleNodeClick: function handleNodeClick(data) {\n this.searchForm = {};\n this.form = {}; //根组件查询全部节点数据\n\n if (data.code && data.code == 'root') {\n this.$refs.AtTable.load();\n } else {\n if (data.children && data.children.length == 0) {\n this.searchForm.typeId = data.id;\n this.form.typeId = data.id;\n this.form.typeInfo = _objectSpread({}, data);\n this.$refs.AtTable.load();\n }\n }\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data[this.props.label].indexOf(value) !== -1;\n },\n loadNode: function loadNode(node, resolve) {},\n // 树状菜单的全部展开和收起\n handleExpandCollapse: function handleExpandCollapse() {\n var elTree = this.$refs.tree;\n\n for (var i = 0; i < elTree.store._getAllNodes().length; i++) {\n elTree.store._getAllNodes()[i].expanded = this.isExpand;\n }\n\n this.isExpand = !this.isExpand;\n },\n //树状刷新\n refresh: function refresh() {\n var _this7 = this;\n\n this.loading = true;\n this.$emit('refresh', function () {\n _this7.loading = false;\n _this7.filterText = '';\n\n _this7.getTreeData();\n });\n setTimeout(function () {\n _this7.loading = false;\n _this7.filterText = '';\n }, 2000);\n },\n closeBefore: function closeBefore() {\n var _this8 = this;\n\n setTimeout(function () {\n _this8.dialogVisible2 = false;\n\n _this8.getTreeData();\n }, 500);\n },\n //确定添加节点\n handleConfirm: function handleConfirm() {\n var _this9 = this;\n\n this.$http.post('${cqxy}/biz/fileLibrary/type/v1/batchSave', this.treeForm).then(function (res) {\n if (res.data.state) {\n _this9.$message.success(res.data.message);\n\n _this9.closeBefore();\n } else {\n _this9.$message.error(res.data.message);\n\n _this9.dialogVisible2 = false;\n }\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.dialogVisible2 = true;\n this.title = '添加';\n this.treeForm = {\n pName: data.name,\n pcode: data.code,\n code: '',\n name: '',\n hasChildren: 0,\n children: []\n };\n break;\n\n case 'edit':\n this.dialogVisible2 = true;\n this.title = '编辑';\n\n if (data.pcode == 'root') {\n this.treeForm = _objectSpread({\n pName: '文件库管理'\n }, data);\n } else {\n this.treeForm = _objectSpread({\n pName: data.name\n }, data);\n }\n\n break;\n\n case 'delete':\n this.del(data);\n break;\n\n default:\n break;\n }\n },\n del: function del(data) {\n var _this10 = this;\n\n this.$confirm('是否继续删除?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n var formData = new FormData();\n formData.append('ids', data.id);\n\n _this10.$http.post('${cqxy}/biz/fileLibrary/type/v1/delete', formData).then(function (res) {\n if (res.data.state) {\n _this10.$message.success(res.data.message);\n\n _this10.closeBefore();\n } else {\n _this10.$message.error(res.data.message);\n\n _this10.dialogVisible2 = false;\n }\n });\n }).catch(function () {\n _this10.$message({\n type: 'info',\n message: '已取消删除'\n });\n });\n },\n //隐藏目录\n handleHideMenu: function handleHideMenu() {\n this.isShowAside = !this.isShowAside;\n },\n //返回一个boolean类型,是否显示列表按钮\n getMethodauth: function getMethodauth(elAuth) {\n var allMethod = window.sessionStorage.allMethod;\n var methodAuth = window.sessionStorage.methodAuth;\n var allMethodArray = allMethod && allMethod.split(',');\n var methodAuthArray = methodAuth && methodAuth.split(','); // 无权限则隐藏按钮\n\n if (methodAuthArray && methodAuthArray.includes(elAuth) && allMethodArray && allMethodArray.includes(elAuth)) {\n return true;\n } else {\n return false;\n }\n }\n }\n};",null]}