{"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\\form\\FormVersionManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\form\\FormVersionManager.vue","mtime":1675071992913},{"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/es7.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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//\nimport { mapState } from \"vuex\";\nimport req from \"@/request.js\";\nexport default {\n name: \"FormVersionManager\",\n props: {\n formKey: {\n type: String,\n required: true\n },\n visible: {\n type: Boolean\n }\n },\n components: {},\n data: function data() {\n return {\n data: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n }\n };\n },\n computed: _objectSpread({}, mapState({\n currentUser: function currentUser(state) {\n return state.login.currentUser;\n },\n formDeleteUrl: function formDeleteUrl() {\n return \"\".concat(window.context.form, \"/form/form/v1/removeVersions\");\n }\n })),\n mounted: function mounted() {\n this.$validator = this.$root.$validator;\n this.$root.$emit(\"resize\");\n },\n methods: {\n removeVersions: function removeVersions() {\n var _this = this;\n\n var selection = this.$refs.htTable.selection;\n\n if (selection && selection.length == 0) {\n this.$message.error(\"请至少选择一条数据\");\n return;\n }\n\n var ids = [];\n\n var _iterator = _createForOfIteratorHelper(selection),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var item = _step.value;\n\n if (item.isMain == \"Y\") {\n this.$message.error(\"主版本不可删除!\");\n return;\n }\n\n ids.push(item.id);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n var params = {},\n data = null;\n params[\"ids\"] = ids.join(\",\");\n req.request({\n params: params,\n data: data,\n url: this.formDeleteUrl,\n method: \"DELETE\"\n }).then(function (response) {\n if (response.data && response.data.state) {\n _this.$refs.htTable.load();\n\n _this.$message({\n message: response.data.message || \"操作成功\",\n showClose: true,\n type: \"success\"\n });\n }\n }).finally(function () {\n _this.fullscreenLoading = false;\n });\n },\n close: function close() {\n this.$emit(\"update:visible\", false);\n },\n loadData: function loadData(param, cb) {\n var _this2 = this;\n\n this.$http.post(\"${form}/form/form/v1/listVersions\", param).then(function (response) {\n _this2.data = response.data.rows;\n _this2.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 handleCommand: function handleCommand(params) {\n var _this3 = this;\n\n switch (params.command) {\n case \"preview\":\n if (this.currentUser && this.currentUser.account) {\n window.open(window.context.front + \"/previewForm/\" + params.row.id + \"?token=\" + this.currentUser.token, // Base64.encode(this.currentUser.account),\n \"_blank\");\n }\n\n break;\n\n case \"setMainVersion\":\n this.$http.post(\"${form}/form/form/v1/setDefaultVersion\", {}, {\n id: params.row.id,\n formKey: params.row.formKey\n }).then(function (response) {\n if (response.data.state) {\n _this3.$message({\n type: \"success\",\n message: response.data.message\n });\n\n _this3.$refs.htTable.load();\n } else {\n _this3.$message.$error(response.data.message);\n }\n });\n break;\n\n default:\n break;\n }\n },\n handleClose: function handleClose() {\n this.dialogVisible = false;\n }\n }\n};",null]}