{"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\\flow\\FlowNodeRemind.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\FlowNodeRemind.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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 req from \"@/request.js\";\r\nimport { mapState, mapActions } from \"vuex\";\r\nimport { Message } from \"element-ui\";\r\nconst eipScriptDialog = () => import(\"@/components/dialog/EipScriptDialog.vue\");\r\nconst MessageTypeSelector = () => import(\"@/components/flow/MessageTypeSelector.vue\");\r\nconst FlowVarSelector = () => import(\"@/components/flow/FlowVarSelector.vue\");\r\nexport default {\r\n name: \"FlowNodeRemind\",\r\n components: { MessageTypeSelector, eipScriptDialog, FlowVarSelector },\r\n props: {\r\n //任务节点信息\r\n node: {\r\n type: Object,\r\n required: true\r\n },\r\n //流程配置信息\r\n defConfigData: {\r\n type: Object,\r\n required: true\r\n },\r\n //催办配置的信息\r\n reminders: {\r\n type: Object,\r\n required: true\r\n },\r\n //流程所有节点\r\n nodeList: {\r\n type: Array,\r\n required: true\r\n }\r\n },\r\n data() {\r\n return {\r\n tabType: \"information\", //催办设置 information:催办基本信息,news:消息设置\r\n titleSetting: \"设置催办\", //某个节点催办的标题\r\n dialogVisibleSetting: false, //是否显示设置节点催办侧边栏\r\n reminder: {\r\n dateType: \"caltime\",\r\n relNodeEvent: \"create\",\r\n dueAction: \"no-action\",\r\n msgType: \"\",\r\n relNodeId: \"\",\r\n isAdd: true,\r\n isSendMsg: false,\r\n dueTime: 0,\r\n durationType: 1,\r\n relTimeType: 1,\r\n dateScriptType: 1\r\n }, //初始化催办基本信息、消息设置\r\n myConfig: {\r\n initialFrameHeight: 240,\r\n UEDITOR_HOME_URL: window.location.origin +'/'+ window.location.pathname.split('/')[1]+'/static/ueditor/',\r\n toolbars: [\r\n [\r\n // 'source', //源代码\r\n 'undo', //撤销\r\n 'bold', //加粗\r\n 'indent', //首行缩进\r\n 'italic', //斜体\r\n 'underline', //下划线\r\n 'strikethrough', //删除线\r\n 'subscript', //下标\r\n 'fontborder', //字符边框\r\n 'superscript', //上标\r\n 'formatmatch', //格式刷\r\n 'forecolor',//字体颜色\r\n 'justifyleft', //居左对齐\r\n 'justifycenter', //居中对齐\r\n 'justifyright', //居右对齐\r\n 'justifyjustify', //两端对齐\r\n 'fontfamily', //字体\r\n 'fontsize', //字号\r\n 'insertorderedlist', //有序列表\r\n 'insertunorderedlist', //无序列表\r\n 'lineheight',//行间距\r\n 'inserttable', //插入表格\r\n ]\r\n ],\r\n // 初始容器宽度\r\n initialFrameWidth: \"100%\",\r\n zIndex:9999,\r\n enableAutoSave: false,\r\n readonly : false\r\n },\r\n isSave: false, //判断是否可以保存\r\n remindersCopy: [], //复制一份最开始的催办配置的信息\r\n cmOptions: {\r\n value: \"\",\r\n mode: \"groovy\",\r\n readOnly: false,\r\n smartIndent:true,\r\n tabSize: 1,\r\n theme: 'base16-light',\r\n lineNumbers: true,\r\n line: true,\r\n autoRefresh: true\r\n },\r\n options: [{key:'1', value:'常规'},{key: '2', value:'脚本'}]\r\n };\r\n },\r\n methods: {\r\n //显示常用脚本\r\n showDialog(action) {\r\n this.$refs[action].showDialog();\r\n },\r\n //设置催办\r\n editTaskReminder() {\r\n this.remindersCopy = JSON.parse(JSON.stringify(this.reminders));\r\n this.isSave = false;\r\n this.dialogVisibleSetting = true;\r\n this.reminder = {\r\n dateType: \"caltime\",\r\n relNodeEvent: \"create\",\r\n dueAction: \"no-action\",\r\n msgType: \"\",\r\n relNodeId: \"\",\r\n isAdd: true,\r\n isSendMsg: false,\r\n dueTime: 0,\r\n durationType: '1',\r\n relTimeType: '1',\r\n dateScriptType: '1'\r\n }; //初始化催办基本信息、消息设置\r\n },\r\n //点击催办列表某一条数据时触发\r\n orgRowClick(row, column, event) {\r\n if (column.label != \"操作\") {\r\n //判断催办秘书是否选中 1:选中,2:未选中\r\n if (row.sendPerson == \"1\") {\r\n row.sendPerson = true;\r\n } else {\r\n row.sendPerson = false;\r\n }\r\n this.reminder = row;\r\n this.isSave = true;\r\n }\r\n },\r\n //保存催办\r\n saveRemind() {\r\n const this_ = this;\r\n //判断是否有新增的数据\r\n if (!this_.isSave) {\r\n Message.warning(\"请先新增催办信息再保存\");\r\n return;\r\n } else {\r\n //校验是否有必填字段没有填写\r\n for (let x = 0; x < this_.remindersCopy.reminderList.length; x++) {\r\n if (\r\n !this_.remindersCopy.reminderList[x].name ||\r\n !this_.remindersCopy.reminderList[x].relNodeId ||\r\n !this_.remindersCopy.reminderList[x].dueTime ||\r\n (this_.remindersCopy.reminderList[x].isSendMsg &&\r\n (!this_.remindersCopy.reminderList[x].msgSendTime ||\r\n !this_.remindersCopy.reminderList[x].msgCount ||\r\n !this_.remindersCopy.reminderList[x].msgInterval))\r\n ) {\r\n this_.$message({\r\n showClose: true,\r\n message:\r\n \"催办列表第\" + (x+1) + \"行有字段未通过校验,请正确填写表单内容。\",\r\n type: \"warning\",\r\n });\r\n return;\r\n }\r\n }\r\n let remindersCopyJson = JSON.stringify(this_.remindersCopy); //转json字符串\r\n req\r\n .post(\r\n \"${bpmModel}/flow/plugins/v1/remindersSave?defId=\" +\r\n this_.node.defId +\r\n \"&nodeId=\" +\r\n this_.node.nodeId,\r\n remindersCopyJson\r\n )\r\n .then(function(data) {\r\n data = data.data;\r\n if (data.state) {\r\n Message.success(\r\n this_.remindersCopy.reminderList.length +\r\n \"条催办,已经保存成功!\"\r\n );\r\n this_.$emit(\"update:reminders\", this_.remindersCopy); //子组件更新父组件的值\r\n this_.reminder = {\r\n dateType: \"caltime\",\r\n relNodeEvent: \"create\",\r\n dueAction: \"no-action\",\r\n msgType: \"\",\r\n relNodeId: \"\",\r\n isAdd: true,\r\n isSendMsg: false,\r\n dueTime: 0\r\n }; //初始化催办基本信息、消息设置\r\n this_.dialogVisibleSetting = false;\r\n } else {\r\n Message.error(\"催办保存出现异常:\" + data.message);\r\n }\r\n });\r\n }\r\n },\r\n //新增催办\r\n addRemind() {\r\n const this_ = this;\r\n this_.$validator.validateAll(\"settingSave\").then(result => {\r\n if (result) {\r\n if (this_.reminder.dueTime == 0) {\r\n this_.$message({\r\n showClose: true,\r\n message: `相对到期时间不能小于1分钟`,\r\n type: \"warning\",\r\n });\r\n return;\r\n }\r\n if(this_.reminder.isSendMsg && (!this_.reminder.msgSendTime ||this_.reminder.msgSendTime ==0)){\r\n this_.$message({\r\n showClose: true,\r\n message: `发送相对时间不能小于1分钟`,\r\n type: \"warning\",\r\n });\r\n return;\r\n }\r\n //判断条件\r\n if (\r\n this_.reminder.relNodeId == this_.node.nodeId &&\r\n this_.reminder.relNodeEvent == \"complete\"\r\n ) {\r\n Message.warning(\"无法设置本节点完成后执行催办操作\");\r\n return;\r\n }\r\n if (this_.reminder.isSendMsg && !this_.reminder.msgType) {\r\n Message.warning(\"请选择消息类型\");\r\n return;\r\n }\r\n\r\n if (this_.reminder.isSendMsg && !this_.reminder.htmlMsg && !this_.reminder.plainMsg) {\r\n Message.warning(\"请输入消息内容\");\r\n return;\r\n }\r\n\r\n //新增数据\r\n if (this_.reminder.isAdd) {\r\n this_.isSave = true;\r\n delete this_.reminder.isAdd;\r\n if (!this_.remindersCopy.reminderList)\r\n this_.remindersCopy.reminderList = [];\r\n this_.remindersCopy.reminderList.push(this.reminder); //新增催办基本信息、消息设置\r\n this_.reminder = {\r\n dateType: \"caltime\",\r\n relNodeEvent: \"create\",\r\n dueAction: \"no-action\",\r\n msgType: \"\",\r\n relNodeId: \"\",\r\n isAdd: true,\r\n isSendMsg: false,\r\n dueTime: 0\r\n }; //初始化催办基本信息、消息设置\r\n }\r\n } else {\r\n let arr = this_.$validator.errors.items.filter(\r\n item => item.scope == \"settingSave\"\r\n );\r\n let errorLength = arr.length;\r\n this_.$message({\r\n showClose: true,\r\n message: `有${errorLength}个字段未通过校验,请正确填写表单内容。`,\r\n type: \"warning\"\r\n });\r\n }\r\n });\r\n },\r\n //关闭设置节点催办列弹框\r\n close() {\r\n this.dialogVisibleSetting = false;\r\n },\r\n //删除催办\r\n deleteSetting(list, index) {\r\n list.splice(index, 1);\r\n this.isSave = true;\r\n this.reminder = {\r\n dateType: \"caltime\",\r\n relNodeEvent: \"create\",\r\n dueAction: \"no-action\",\r\n msgType: \"\",\r\n relNodeId: \"\",\r\n isAdd: true,\r\n isSendMsg: false,\r\n dueTime: 0\r\n }; //初始化催办基本信息、消息设置\r\n },\r\n varTreeOnConfirm(node, type) {\r\n console.info(node)\r\n let method = \"\";\r\n if (node.dataType==='number')\r\n method = \".asDouble()\";\r\n else\r\n method = '.asText()';\r\n this.reminder[type] = this.reminder[type] || \"\";\r\n this.$set(this.reminder, type, this.reminder[type] + node.path+\".data.\"+node.name+method);\r\n this.$forceUpdate();\r\n }\r\n },\r\n mounted() {\r\n this.$validator = this.$root.$validator;\r\n }\r\n};\r\n",null]}