{"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\\i18n\\I18nMessageManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\system\\i18n\\I18nMessageManager.vue","mtime":1675071993288},{"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/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 sys from '@/api/portal.js';\n\nvar eipI18nDialog = function eipI18nDialog() {\n return import('@/components/dialog/EipI18nDialog.vue');\n};\n\nexport default {\n name: 'i18n-i18nMessage',\n components: {\n eipI18nDialog: eipI18nDialog\n },\n data: function data() {\n return {\n i18nMessage: {},\n i18nMessageTitle: '',\n loadDataUrl: '',\n dialogVisible: false,\n data: [],\n pageResult: {\n page: 1,\n pageSize: 50,\n total: 0\n },\n isSubmit: true,\n types: [],\n newTypes: [],\n oldKey: ''\n };\n },\n mounted: function mounted() {\n var _this = this;\n\n // 因为resize事件在整个项目中只能监听一次,所以这里通过全局广播发送这个事件\n this.$root.$emit('resize'); //查询所有语种类型\n\n sys.geti18nMessageTypeAll().then(function (data) {\n if (data && data.length > 0) {\n _this.types = data;\n\n _this.types.forEach(function (element) {\n delete element.id;\n });\n }\n });\n },\n computed: {\n i18nMessageTypeDeleteUrl: function i18nMessageTypeDeleteUrl() {\n return window.context.portal + '/i18n/custom/i18nMessage/v1/delByKey';\n }\n },\n methods: {\n rowClick: function rowClick(row, column, event) {\n this.$refs.i18nMessageTable.$refs.htTable.toggleRowSelection(row);\n },\n dialogOnConfirm: function dialogOnConfirm(data) {\n this.$message({\n type: 'success',\n message: JSON.stringify(data),\n showClose: true\n });\n },\n isKey: function isKey() {\n var _this2 = this;\n\n if (this.oldKey || !this.i18nMessage.key_) return;\n sys.getByMessKey(this.i18nMessage.key_).then(function (rep) {\n if (rep && rep.key_ == _this2.i18nMessage.key_) {\n _this2.$message.error('资源Key【' + rep.key_ + '】已存在');\n\n _this2.i18nMessage.key_ = '';\n }\n });\n },\n beforeSaveData: function beforeSaveData() {\n var _this3 = this;\n\n this.isSubmit = true;\n this.i18nMessage.vals = '';\n this.i18nMessage.types = '';\n var noData = true;\n this.types.forEach(function (item) {\n _this3.i18nMessage.types = _this3.i18nMessage.types + item.type + ',';\n\n if (item.val && item.val != '') {\n noData = false;\n _this3.i18nMessage.vals = _this3.i18nMessage.vals + ',';\n } else {\n _this3.i18nMessage.vals = _this3.i18nMessage.vals + item.val + ',';\n }\n });\n\n if (noData) {\n this.$message.error('资源中资源值至少有一个!');\n this.isSubmit = false;\n return;\n }\n\n this.i18nMessage.key = this.i18nMessage.key_;\n this.i18nMessage.mesTypeInfo = this.types;\n },\n savei18nMessageUrl: function savei18nMessageUrl() {\n return window.context.portal + '/i18n/custom/i18nMessage/v1/save' + '?oldKey=' + this.oldKey;\n },\n afterSaveData: function afterSaveData() {\n this.dialogVisible = false;\n this.$refs.i18nMessageTable.load(true);\n this.oldKey = '';\n },\n afterLoadData: function afterLoadData(data) {\n var _this4 = this;\n\n this.i18nMessage = data;\n this.types = data.mesTypeInfo; // 编辑数据源\n\n if (this.dialogVisible) {\n setTimeout(function () {\n return _this4.$validator.validateAll('editi18nMessageForm');\n });\n }\n },\n dialogCancle: function dialogCancle(dialogVisible) {\n this.loadDataUrl = '';\n this[dialogVisible] = false;\n },\n handleClose: function handleClose() {\n this.loadDataUrl = '';\n this.dialogVisible = false;\n },\n showDialog: function showDialog(command, row) {\n var _this5 = this;\n\n switch (command) {\n case 'add':\n this.oldKey = '';\n\n if (this.types.length > 0) {\n this.types.forEach(function (element) {\n delete element.val;\n });\n }\n\n this.dialogVisible = true;\n this.i18nMessage = {};\n this.i18nMessageTitle = '添加国际化资源支持的语言类型';\n break;\n\n case 'edit':\n this.oldKey = row.key_;\n this.loadDataUrl = '/i18n/custom/i18nMessage/v1/getI18nMessageJson?key=' + row.key_;\n this.dialogVisible = true;\n this.i18nMessageTitle = '编辑国际化资源支持的语言类型';\n break;\n\n case 'del':\n this.$confirm('是否确认删除?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n sys.i18nMessageDelByKey(row.key_).then(function (data) {\n if (data.state) {\n _this5.$message.success(data.message);\n\n _this5.$refs.i18nMessageTable.load(true);\n } else {\n _this5.$message.error(data.message || '删除失败');\n }\n }, function (error) {\n _this5.$message.error(error || '删除失败');\n });\n });\n break;\n\n case 'resources':\n this.$refs['eipI18nDialog'].showDialog();\n break;\n\n case 'init':\n this.$confirm('是否确认初始化?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n sys.i18nMessageInit().then(function (data) {\n if (data.state) {\n _this5.$message.success('初始化成功');\n\n _this5.$refs.i18nMessageTable.load(true);\n } else {\n _this5.$message.error(data.message || '初始化失败');\n }\n });\n });\n break;\n\n case 'clearAll':\n this.$confirm('是否确认清除国际化缓存数据?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning'\n }).then(function () {\n sys.i18nMessageClearCache().then(function (data) {\n _this5.$message.success('清除缓存成功');\n\n _this5.$refs.i18nMessageTable.load(true);\n });\n });\n break;\n }\n },\n handleNodeClick: function handleNodeClick(node) {},\n loadData: function loadData(param, cb) {\n var _this6 = this;\n\n sys.getI18nMessagePageJson(param).then(function (response) {\n _this6.data = response.rows;\n _this6.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n }).finally(function () {\n return cb();\n });\n }\n }\n};",null]}