{"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\\components\\flow\\FlowFormRightSubSetting.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\FlowFormRightSubSetting.vue","mtime":1675071991803},{"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//\nvar eipScriptDialog = function eipScriptDialog() {\n return import(\"@/components/dialog/EipScriptDialog.vue\");\n};\n\nimport { Message } from \"element-ui\";\nimport req from \"@/request.js\";\nexport default {\n name: \"FlowFormRightSubSetting\",\n components: {\n eipScriptDialog: eipScriptDialog\n },\n props: {\n defId: String,\n nodeId: String,\n defkey: String,\n parentDefKey: String\n },\n data: function data() {\n return {\n treeData: [],\n //树数据\n defaultProps: {\n children: \"children\",\n label: \"desc\"\n },\n sql: \"\",\n cmStyle: {\n value: \"\",\n mode: \"groovy\",\n readOnly: false,\n smartIndent: true,\n tabSize: 2,\n theme: \"base16-light\",\n lineNumbers: true,\n line: true\n },\n dialogVisibleSetting: false,\n editingRight: {\n tableName: \"\",\n script: \"\",\n nodeId: \"\",\n parentDefKey: this.parentDefKey\n },\n //子表配置\n data: {}\n };\n },\n methods: {\n //显示常用脚本\n showScriptDialog: function showScriptDialog() {\n if (this.editingRight.script == '') {\n this.$message.warning(\"请先选择需要编辑的子表\");\n return;\n }\n\n this.$refs.whenSaveDialog.showDialog();\n },\n //设置子表数据授权对话框保存事件\n saveDataDialog: function saveDataDialog() {\n var this_ = this;\n\n if (this_.editingRight.tableName == '') {\n this_.$message.warning(\"请先选择需要编辑的子表\");\n return;\n }\n\n if (this_.editingRight.script == '') {\n this_.$message.warning(\"请编写SQL语句\");\n return;\n }\n\n req.post(window.context.bpmModel + \"/flow/node/v1/saveSub?defId=\" + this_.defId + \"&nodeId=\" + this_.nodeId + \"&parentDefKey=\" + this_.parentDefKey, this_.data).then(function (res) {\n if (res.data.state) {\n this_.$confirm(res.data.message + \",是否继续操作?\", \"提示\", {\n cancelButtonText: \"取消\",\n confirmButtonText: \"确定\",\n type: \"warning\"\n }).then(function () {}).catch(function () {\n this_.dialogVisibleSetting = false;\n });\n }\n });\n },\n //显示设置子表数据授权对话框\n showDialog: function showDialog() {\n var this_ = this;\n this_.editingRight = {\n tableName: \"\",\n script: \"\",\n nodeId: \"\",\n parentDefKey: this.parentDefKey\n };\n this_.data = {};\n this_.dialogVisibleSetting = true; //获取子表表单字段变量\n\n req.post(window.context.bpmModel + \"/flow/node/v1/varTree\", {\n defId: this_.defId,\n nodeId: this_.nodeId,\n includeBpmConstants: false,\n removeMain: true\n }).then(function (respose) {\n this_.treeData = respose.data; //获取已编辑的子表权限设置\n\n req.get(window.context.bpmModel + \"/flow/node/v1/initSub?defId=\" + this_.defId + \"&nodeId=\" + this_.nodeId + \"&parentDefKey=\" + this_.parentDefKey).then(function (data) {\n if (JSON.stringify(data.data) != \"{}\") {\n this_.data = data.data;\n }\n });\n });\n },\n //树鼠标左击事件(treeNode:当前节点对象,node:可以拿到父节点对象)\n handleNodeClick: function handleNodeClick(treeNode, node, nodeCompent) {\n //先处理tableName的赋值\n var preTableName = this.editingRight.tableName;\n\n if (treeNode.nodeType == \"sub\") {\n this.editingChange(treeNode.name);\n }\n\n if (treeNode.nodeType == \"field\") {\n this.editingChange(node.parent.data.name);\n }\n\n if (preTableName != this.editingRight.tableName) {\n return;\n }\n\n var prefix;\n\n if (treeNode.nodeType == \"bfield\") {\n prefix = \"b\";\n } else {\n prefix = \"a\";\n }\n\n if (treeNode.fieldName != undefined) {\n var str = prefix + \".\" + treeNode.fieldName;\n this.editingRight.script = this.editingRight.script + str;\n }\n },\n editingChange: function editingChange(tableName) {\n if (this.data[tableName] == undefined) {\n var json = {};\n json.nodeId = this.nodeId;\n json.parentDefKey = this.parentDefKey;\n json.tableName = tableName;\n json.script = \"return sql;\";\n this.data[tableName] = json;\n }\n\n this.editingRight = this.data[tableName];\n },\n //清除权限\n clean: function clean() {\n var this_ = this;\n this.$confirm(\"确定清除所有子表授权?\", \"提示\", {\n cancelButtonText: \"取消\",\n confirmButtonText: \"确定\",\n type: \"warning\",\n closeOnClickModal: false\n }).then(function () {\n req.post(window.context.bpmModel + \"/flow/node/v1/saveSub?defId=\" + this_.defId + \"&nodeId=\" + this_.nodeId + \"&parentDefKey=\" + this_.parentDefKey, {}).then(function (data) {\n data = data.data;\n\n if (data.state) {\n this_.$message.success({\n duration: 1000,\n message: \"清除成功\",\n onClose: function onClose() {\n this_.dialogVisibleSetting = false;\n }\n });\n } else {\n this_.$message.error(data.message);\n }\n });\n });\n },\n //关闭侧边栏\n close: function close() {\n this.dialogVisibleSetting = false;\n }\n }\n};",null]}