{"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\\FlowVarList.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\FlowVarList.vue","mtime":1675071991850},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { Message } from \"element-ui\";\nimport req from \"@/request.js\";\nexport default {\n name: \"FlowVarList\",\n props: {\n defId: {\n type: String,\n required: true\n }\n },\n data: function data() {\n return {\n varList: [],\n //列表数据\n title: \"添加流程变量\",\n dialogVisibleSetting: false,\n //是否显示添加编辑流程变量侧边栏\n data: {\n bpmVariableDef: {\n nodeId: \"\",\n isRequired: \"false\",\n dataType: \"string\"\n },\n nodeDefList: []\n },\n //添加编辑流程变量时的数据\n isAdd: false\n };\n },\n methods: {\n //保存流程变量\n save: function save() {\n var this_ = this;\n this_.$validator.validateAll(\"settingSave\").then(function (result) {\n if (result) {\n var isAdd = true; //是否新增流程变量\n\n if (this_.title == \"添加流程变量\") {\n isAdd = true;\n } else {\n isAdd = false;\n }\n\n var param = {\n variableDef: this_.data.bpmVariableDef,\n isAdd: isAdd,\n defId: this_.defId\n };\n req.post(\"${bpmModel}/flow/var/v1/save\", param).then(function (data) {\n data = data.data;\n\n if (data.state) {\n Message.success((isAdd ? \"添加\" : \"编辑\") + \"变量成功\");\n this_.dialogVisibleSetting = false;\n this_.$refs.htTable.load(); //重新加载列表数据\n }\n });\n } else {\n var arr = this_.$validator.errors.items.filter(function (item) {\n return item.scope == \"settingSave\";\n });\n var errorLength = arr.length;\n this_.$message({\n showClose: true,\n message: \"\\u6709\".concat(errorLength, \"\\u4E2A\\u5B57\\u6BB5\\u672A\\u901A\\u8FC7\\u6821\\u9A8C\\uFF0C\\u8BF7\\u6B63\\u786E\\u586B\\u5199\\u8868\\u5355\\u5185\\u5BB9\\u3002\"),\n type: \"warning\"\n });\n }\n });\n },\n //删除流程变量\n remove: function remove(key) {\n var this_ = this;\n var url = \"${bpmModel}/flow/var/v1/remove?defId=\" + this_.defId + \"&varKey=\" + key;\n this_.$confirm(\"是否确认删除?\", \"提示\", {\n cancelButtonText: \"取消\",\n confirmButtonText: \"确定\",\n type: \"warning\",\n closeOnClickModal: false\n }).then(function () {\n req.remove(url).then(function (rep) {\n rep = rep.data;\n\n if (rep.state) {\n if (rep.message) {\n Message.success(rep.message);\n this_.$refs.htTable.load(); //重新加载列表数据\n }\n } else {\n Message.error(rep.message);\n }\n });\n });\n },\n //添加或编辑流程变量\n operating: function operating(key) {\n this.title = key == \"\" ? \"添加流程变量\" : \"编辑流程变量\";\n this.isAdd = key === \"\" ? true : false;\n this.dialogVisibleSetting = true; //显示添加编辑流程变量侧边栏\n\n this.data = {\n bpmVariableDef: {\n nodeId: \"\",\n isRequired: \"false\",\n dataType: \"string\"\n },\n nodeDefList: []\n }; //清空值\n\n var this_ = this;\n req.get(\"${bpmModel}/flow/var/v1/defVarEdit?defId=\" + this_.defId + \"&varKey=\" + key).then(function (res) {\n res = res.data;\n\n if (res.bpmVariableDef && !res.bpmVariableDef.required) {\n res.bpmVariableDef.required = \"false\";\n } else if (res.bpmVariableDef && res.bpmVariableDef.required === true) {\n res.bpmVariableDef.required = \"true\";\n }\n\n if (this_.title == \"添加流程变量\") {\n this_.data.nodeDefList = res.nodeDefList;\n } else {\n this_.data = res;\n }\n\n this_.data.nodeDefList.push({\n nodeId: \"\",\n name: \"全局变量\"\n });\n });\n },\n //关闭侧边栏\n close: function close() {\n this.dialogVisibleSetting = false;\n },\n //页面加载显示数据\n loadData: function loadData(param, cb) {\n var this_ = this;\n var listUrl = \"${bpmModel}/flow/var/v1/listJson?defId=\" + this_.defId + \"&nodeId=\";\n req.get(listUrl).then(function (data) {\n this_.varList = data.data;\n }).finally(function () {\n return cb();\n });\n }\n },\n mounted: function mounted() {\n this.$validator = this.$root.$validator;\n }\n};",null]}