{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\dataTemplate\\ImportCheckJarManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\dataTemplate\\ImportCheckJarManager.vue","mtime":1675071992163},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport { mapState, mapActions } from \"vuex\";\r\nexport default {\r\n data() {\r\n return {\r\n dialogVisible: false,\r\n data: [],\r\n pageResult: {\r\n page: 1,\r\n pageSize: 50,\r\n total: 0\r\n },\r\n importCheckJar: {},\r\n outerVisible: false,\r\n files: [],\r\n curSelect: \"\"\r\n };\r\n },\r\n computed: mapState({\r\n header: state => {\r\n return { Authorization: `Bearer ${state.login.currentUser.token}` };\r\n },\r\n actionUrl: function() {\r\n return window.context.portal + \"/file/v1/upload\";\r\n }\r\n }),\r\n mounted() {\r\n this.$validator = this.$root.$validator;\r\n },\r\n methods: {\r\n beforeUpload(file) {\r\n if (this.files && this.files.length > 0) {\r\n if (this.files.length == 1) {\r\n return new Promise((resolve, reject) => {\r\n this.$confirm(\"已有Jar包, 是否确认覆盖?\", \"提示\", {\r\n confirmButtonText: \"确定\",\r\n cancelButtonText: \"取消\",\r\n type: \"warning\"\r\n })\r\n .then(() => {\r\n resolve();\r\n })\r\n .catch(() => {\r\n reject();\r\n });\r\n });\r\n } else {\r\n this.$message.waring(\"最多只能上传一个模板\");\r\n return false;\r\n }\r\n } else {\r\n return true;\r\n }\r\n },\r\n\r\n handleRemove(file, fileList) {\r\n if (fileList && fileList.length == 1) {\r\n return;\r\n }\r\n let this_ = this;\r\n setTimeout(function() {\r\n this_.importCheckJar.filePath = \"\";\r\n }, 50);\r\n },\r\n success(response, file, fileList) {\r\n this.files = [];\r\n for (let i = 0; i < fileList.length; i++) {\r\n if (fileList[i].response) {\r\n let value = fileList[i].response;\r\n let arrarFile = {};\r\n arrarFile.id = value.fileId;\r\n arrarFile.name = value.fileName;\r\n arrarFile.size = value.size;\r\n this.files.push(arrarFile);\r\n }\r\n }\r\n this.importCheckJar.filePath = JSON.stringify(this.files);\r\n },\r\n show() {\r\n this.outerVisible = true;\r\n this.curSelect = {};\r\n },\r\n showDialog(id, e) {\r\n if (id) {\r\n if (e && e.preventDefault) {\r\n e.preventDefault(); //非IE浏览器\r\n } else {\r\n window.event.returnValue = false;\r\n } //IE浏览器\r\n this.$http\r\n .get(\"${form}/form/formImportCheckJar/v1/getJson?id=\" + `${id}`)\r\n .then(\r\n resp => {\r\n this.importCheckJar = resp.data;\r\n if (this.importCheckJar.filePath) {\r\n this.files = JSON.parse(this.importCheckJar.filePath);\r\n }\r\n this.dialogVisible = true;\r\n },\r\n error => {}\r\n );\r\n } else {\r\n this.files = [];\r\n this.dialogVisible = true;\r\n }\r\n },\r\n beforeCloseDialog() {\r\n this.importCheckJar = {};\r\n this.dialogVisible = false;\r\n },\r\n loadData(param, cb) {\r\n this.curSelect = \"\";\r\n this.$http\r\n .post(\"${form}/form/formImportCheckJar/v1/listJson\", param)\r\n .then(\r\n resp => {\r\n let response = resp.data;\r\n this.data = response.rows;\r\n this.pageResult = {\r\n page: response.page,\r\n pageSize: response.pageSize,\r\n total: response.total\r\n };\r\n },\r\n error => {}\r\n )\r\n .finally(() => cb());\r\n },\r\n afterSaveData() {\r\n setTimeout(() => {\r\n this.beforeCloseDialog();\r\n this.$refs.htTable.load();\r\n }, 500);\r\n },\r\n saveData() {\r\n if (!this.importCheckJar.desc) {\r\n this.$message.warning(\"请填写描述\");\r\n return false;\r\n }\r\n\r\n if (!this.importCheckJar.classPath) {\r\n this.$message.warning(\"请填写校验类路径\");\r\n return false;\r\n }\r\n\r\n if (!this.importCheckJar.filePath) {\r\n this.$message.warning(\"请上传Jar包\");\r\n return false;\r\n }\r\n this.$http\r\n .post(\"${form}/form/formImportCheckJar/v1/save\", this.importCheckJar)\r\n .then(\r\n resp => {\r\n let data = resp.data;\r\n if (data.state) {\r\n this.$message.success(\"保存成功\");\r\n this.$refs.htTable.load();\r\n this.dialogVisible = false;\r\n }\r\n },\r\n error => {}\r\n );\r\n },\r\n afterSaveData() {\r\n setTimeout(() => {\r\n this.beforeCloseDialog();\r\n this.$refs.htTable.load();\r\n }, 500);\r\n },\r\n removeJar(id) {\r\n let this_ = this;\r\n this.$confirm(\"确定删除Jar包配置吗?\")\r\n .then(() => {\r\n this_.$http\r\n .remove(\"${form}/form/formImportCheckJar/v1/remove?ids=\" + id)\r\n .then(\r\n resp => {\r\n if (resp.data && resp.data.state) {\r\n this_.$message.success(\"删除成功\");\r\n this_.$refs.htTable.load();\r\n }\r\n },\r\n error => {}\r\n );\r\n })\r\n .catch(() => {});\r\n },\r\n rowClick(row, column, event) {\r\n this.curSelect = row;\r\n },\r\n confirm() {\r\n if (!this.curSelect) {\r\n this.$message.warning(\"请选择Jar包\");\r\n return;\r\n }\r\n this.$emit(\"on-confirm\", this.curSelect);\r\n this.outerVisible = false;\r\n }\r\n }\r\n};\r\n",null]}