{"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\\form\\dataTemplate\\RemindSetting.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\dataTemplate\\RemindSetting.vue","mtime":1675071992178},{"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 _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.split\";\n\nvar _methods;\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { Base64 } from 'js-base64';\nimport htEditor from '@/components/common/HtEditor.vue';\n\nvar eipUserSelector = function eipUserSelector() {\n  return import('@/components/selector/EipUserSelector.vue');\n};\n\nvar eipOrgSelector = function eipOrgSelector() {\n  return import('@/components/selector/EipOrgSelector.vue');\n};\n\nvar eipJobSelector = function eipJobSelector() {\n  return import('@/components/selector/EipJobSelector.vue');\n};\n\nvar eipPostSelector = function eipPostSelector() {\n  return import('@/components/selector/EipPostSelector.vue');\n};\n\nvar eipRoleSelector = function eipRoleSelector() {\n  return import('@/components/selector/EipRoleSelector.vue');\n};\n\nimport utils from '@/hotent-ui-util.js';\nimport flow from \"@/api/flow.js\";\nexport default {\n  name: 'RemindSetting',\n  components: {\n    htEditor: htEditor,\n    eipUserSelector: eipUserSelector,\n    eipOrgSelector: eipOrgSelector,\n    eipJobSelector: eipJobSelector,\n    eipPostSelector: eipPostSelector,\n    eipRoleSelector: eipRoleSelector\n  },\n  props: ['data'],\n  data: function data() {\n    return {\n      myConfig: {\n        initialFrameHeight: 240,\n        UEDITOR_HOME_URL: window.location.origin + '/' + window.location.pathname.split('/')[1] + '/static/ueditor/',\n        toolbars: [[// 'source', //源代码\n        'undo', //撤销\n        'bold', //加粗\n        'indent', //首行缩进\n        'italic', //斜体\n        'underline', //下划线\n        'strikethrough', //删除线\n        'subscript', //下标\n        'fontborder', //字符边框\n        'superscript', //上标\n        'formatmatch', //格式刷\n        'forecolor', //字体颜色\n        'justifyleft', //居左对齐\n        'justifycenter', //居中对齐\n        'justifyright', //居右对齐\n        'justifyjustify', //两端对齐\n        'fontfamily', //字体\n        'fontsize', //字号\n        'insertorderedlist', //有序列表\n        'insertunorderedlist', //无序列表\n        'lineheight', //行间距\n        'inserttable' //插入表格\n        ]],\n        // 初始容器宽度\n        initialFrameWidth: \"100%\",\n        zIndex: 9999,\n        enableAutoSave: false,\n        readonly: false\n      },\n      tabHeight: \"\".concat(document.documentElement.clientHeight) - 280,\n      dialogContentData: {\n        content: '',\n        subject: ''\n      },\n      dialogRuleData: '',\n      index: '',\n      dialogMethodVisible: false,\n      dialogContentVisible: false,\n      dataTemplate: {},\n      userPluginList: [{\n        key: 'user',\n        value: '用户'\n      }],\n      remindSettingList: [],\n      diyScript: '',\n      conditionObj: {},\n      tabList: [],\n      branchList: [],\n      svgHtml: '',\n      svgHeight: '400px',\n      defaultCondition: {\n        property: '',\n        operator: '1',\n        dataType: '',\n        value: '',\n        compType: '1'\n      },\n      Mleft: 50,\n      //初始左边距50\n      Mtop: 20,\n      //初始上边距40\n      XIncase: 100,\n      //x轴递增数值70\n      YIncase: 50,\n      //y轴递增数据50\n      varTree: [],\n      filedsObj: {},\n      displaySettingFields: [],\n      scripts: [] // 常用脚本列表\n\n    };\n  },\n  updated: function updated() {\n    this.remindSettingList.forEach(function (v, i) {\n      v.mainHeight = document.getElementById('mainHeight' + i).offsetHeight;\n    });\n  },\n  mounted: function mounted() {\n    var _this2 = this;\n\n    this.getAllScript();\n    this.dataTemplate = this.data.bpmDataTemplate;\n    this.remindSettingList = !this.dataTemplate.remindSettingList ? [] : JSON.parse(this.dataTemplate.remindSettingList);\n\n    if (this.data.displaySettingFields) {\n      this.displaySettingFields = JSON.parse(this.data.displaySettingFields).filter(function (item) {\n        return item.isFlowField != true;\n      });\n      this.displaySettingFields.forEach(function (item) {\n        _this2.filedsObj[item.name] = item;\n      });\n    }\n  },\n  methods: (_methods = {\n    //切换对象 清除之前已选择的对象\n    changeTypeObj: function changeTypeObj(name, row) {\n      row.objId = '';\n      row.objName = '';\n    },\n    getAllScript: function getAllScript() {\n      // 查询所有的常用脚本\n      var _this = this;\n\n      flow.getAllScript().then(function (resp) {\n        for (var index = 0; index < resp.length; index++) {\n          var script = resp[index].script;\n          script = script.replace(\"return \", \"\");\n          script = script.replace(\";\", \"\");\n          resp[index].script = script;\n        }\n\n        _this.scripts = resp;\n      });\n    },\n    previewCondition: function previewCondition(isConfirm) {\n      var _this3 = this;\n\n      var me_ = this;\n      utils.validateForm(this, 'form1').then(function (r) {\n        if (!_this3.conditionObj) return;\n\n        var data = _this3.getConditionStr(_this3.conditionObj);\n\n        data.conditionObj = JSON.stringify(_this3.conditionObj);\n\n        if (!isConfirm) {\n          _this3.dialogRuleData = data.conditionString;\n        } else {\n          _this3.remindSettingList[_this3.index].rule = JSON.stringify({\n            scriptStr: Base64.encode('import com.hotent.base.util.StringUtil;import com.hotent.base.util.time.DateUtil;' + data.conditionString),\n            conditionObj: data.conditionObj\n          });\n          _this3.dialogMethodVisible = false;\n        }\n      }).catch(function (items) {\n        _this3.$message.error(\"\\u8FD8\\u6709\\u5185\\u5BB9\\u672A\\u586B\\u5199\\uFF0C\\u65E0\\u6CD5\\u751F\\u6210\\u8868\\u8868\\u8FBE\\u5F0F\\u3002\");\n      });\n    },\n    getConditionStr: function getConditionStr(obj) {\n      if (!obj || !obj.condition) return;\n      var returnData = {};\n      var data = obj.condition;\n      var res = '';\n      var desString = '';\n\n      for (var i = 0; i < data.length; i++) {\n        //第一节点的表达式\n        var curcondStr1 = '';\n        var curcondDes1 = ''; //如果第一节点有分支则计算\n\n        if (data[i].condition && data[i].condition.length > 0) {\n          curcondStr1 += '(';\n          curcondDes1 += '(';\n\n          for (var j = 0; j < data[i].condition.length; j++) {\n            //第二节点的表达式\n            var curcondStr2 = '';\n            var curcondDes2 = ''; //如果第三级节点有分支，则计算分支\n\n            if (data[i].condition[j].condition && data[i].condition[j].condition.length > 0) {\n              curcondStr2 += '(';\n              curcondDes2 += '(';\n              var curcondStr3 = '';\n              var curcondDes3 = '';\n\n              for (var z = 0; z < data[i].condition[j].condition.length; z++) {\n                curcondStr3 = this.getConditionStrByObj(data[i].condition[j].condition[z]);\n                curcondDes3 = this.getConditionStrByObj(data[i].condition[j].condition[z], 'des');\n\n                if (curcondStr3 != '') {\n                  //循环拼接第三节点的条件\n                  if (z == 0) {\n                    //第一个不拼接运算符\n                    curcondStr2 += curcondStr3;\n                    curcondDes2 += curcondDes3;\n                  } else {\n                    curcondStr2 += this.getjunction(data[i].condition[j].junction) + curcondStr3;\n                    curcondDes2 += this.getjunction(data[i].condition[j].junction) + curcondDes3;\n                  }\n                }\n              }\n\n              curcondStr2 += ')';\n              curcondDes2 += ')';\n            } else if (data[i].condition[j].property) {\n              //第二节点没有分只\n              curcondStr2 = this.getConditionStrByObj(data[i].condition[j]);\n              curcondDes2 = this.getConditionStrByObj(data[i].condition[j], 'des');\n            }\n\n            if (curcondStr2 != '') {\n              //循环拼接第二节点的条件\n              if (j == 0) {\n                //第一个不拼接运算符\n                curcondStr1 += curcondStr2;\n                curcondDes1 += curcondDes2;\n              } else {\n                curcondStr1 += this.getjunction(data[i].junction) + curcondStr2;\n                curcondDes1 += this.getjunction(data[i].junction) + curcondDes2;\n              }\n            }\n          }\n\n          curcondStr1 += ')';\n          curcondDes1 += ')';\n        } else if (data[i].property) {\n          //第一节点没有分只\n          curcondStr1 = this.getConditionStrByObj(data[i]);\n          curcondDes1 = this.getConditionStrByObj(data[i], 'des');\n        }\n\n        if (curcondStr1 != '') {\n          //循环拼接第一节点的条件\n          if (i == 0) {\n            //第一个不拼接运算符\n            res += curcondStr1;\n            desString += curcondDes1;\n          } else {\n            res += this.getjunction(obj.junction) + curcondStr1;\n            desString += this.getjunction(obj.junction) + curcondDes1;\n          }\n        }\n      }\n\n      returnData.conditionString = res;\n      returnData.conditionDes = desString;\n      return returnData;\n    },\n    getjunction: function getjunction(str) {\n      var res = '';\n\n      switch (str) {\n        case 'and':\n          res = ' && ';\n          break;\n\n        case 'or':\n          res = ' || ';\n          break;\n      }\n\n      return res;\n    },\n    getConditionStrByObj: function getConditionStrByObj(obj, type) {\n      var res = '';\n\n      switch (obj.dataType) {\n        case 'varchar':\n          res = this.buildStringCondition(obj, type);\n          break;\n\n        case 'date':\n          res = this.buildDateCondition(obj, type);\n          break;\n\n        case 'number':\n          res = this.buildIntCondition(obj, type);\n          break;\n      }\n\n      return res;\n    },\n    buildDateCondition: function buildDateCondition(obj, type) {\n      var value = obj.value;\n      var valueDes = '';\n      var property = obj.property;\n      var res = '';\n\n      if (obj.compType == 1) {\n        value = '\"' + obj.value + '\"';\n        valueDes = value;\n      } else {\n        valueDes = obj.changeDesc;\n      }\n\n      if (type == 'des') {\n        property = obj.chooseDesc;\n        value = valueDes;\n\n        switch (obj.operator) {\n          case '1':\n            res = property + '==' + value;\n            break;\n\n          case '2':\n            res = property + '!=' + value;\n            break;\n\n          case '3':\n            res = property + '>' + value;\n            break;\n\n          case '4':\n            res = property + '<' + value;\n            break;\n        }\n      } else {\n        switch (obj.operator) {\n          case '1':\n            res = 'scriptImpl.isDateEquals(' + property + ',' + value + ')';\n            break;\n\n          case '2':\n            res = '!scriptImpl.isDateEquals(' + property + ',' + value + ')';\n            break;\n\n          case '3':\n            res = 'scriptImpl.isDateLarge(' + property + ',' + value + ')';\n            break;\n\n          case '4':\n            res = 'scriptImpl.isDateLittle(' + property + ',' + value + ')';\n            break;\n\n          case '7':\n            res = 'scriptImpl.isDateLargeEquals(' + property + ',' + value + ')';\n            break;\n\n          case '8':\n            res = 'scriptImpl.isDateLittleEquals(' + property + ',' + value + ')';\n            break;\n\n          case '9':\n            res = 'scriptImpl.isDateBelongTo(' + property + ',' + value + ')';\n            break;\n        }\n      }\n\n      return res;\n    },\n    buildStringCondition: function buildStringCondition(obj, type) {\n      var value = obj.value;\n      var valueDes = '';\n      var property = obj.property;\n      var res = '';\n\n      if (obj.compType == 1 && obj.type == 1) {\n        value = '\"' + obj.value + '\"';\n        valueDes = value;\n      } else if (obj.type == 2) {\n        value = obj.value;\n        valueDes = value;\n      } else {\n        valueDes = obj.changeDesc;\n      }\n\n      if (type == 'des') {\n        property = obj.chooseDesc;\n        value = valueDes;\n\n        switch (obj.operator) {\n          case '1':\n            res = property + '==' + value;\n            break;\n\n          case '2':\n            res = property + '!=' + value;\n            break;\n\n          case '3':\n            res = property + '>' + value;\n            break;\n\n          case '4':\n            res = property + '<' + value;\n            break;\n\n          case '5':\n            res = property + 'contains' + value;\n            break;\n\n          case '6':\n            res = property + '! contains' + value;\n            break;\n        }\n      } else {\n        switch (obj.operator) {\n          case '1':\n            res = 'StringUtil.equals(' + property + ',' + value + ')';\n            break;\n\n          case '2':\n            res = '!StringUtil.equals(' + property + ',' + value + ')';\n            break;\n\n          case '3':\n            res = 'StringUtil.LargeThen(' + property + ',' + value + ')';\n            break;\n\n          case '4':\n            res = 'StringUtil.littleThen(' + property + ',' + value + ')';\n            break;\n\n          case '5':\n            res = 'StringUtil.contains(' + property + ',' + value + ')';\n            break;\n\n          case '6':\n            res = '!StringUtil.contains(' + property + ',' + value + ')';\n            break;\n\n          case '9':\n            res = 'StringUtil.isStringBelongTo(' + property + ',' + value + ')';\n            break;\n        }\n      }\n\n      return res;\n    },\n    buildIntCondition: function buildIntCondition(obj, type) {\n      var value = obj.value;\n      var valueDes = '';\n      var property = obj.property;\n\n      if (obj.compType == 1) {\n        value = obj.value;\n        valueDes = value;\n      } else {\n        valueDes = obj.changeDesc;\n      }\n\n      if (type == 'des') {\n        property = obj.chooseDesc;\n        value = valueDes;\n      }\n\n      var res = '';\n\n      switch (obj.operator) {\n        case '1':\n          res = property + '==' + value;\n          break;\n\n        case '2':\n          res = property + '!=' + value;\n          break;\n\n        case '3':\n          res = property + '>' + value;\n          break;\n\n        case '4':\n          res = property + '<' + value;\n          break;\n\n        case '7':\n          res = property + '>=' + value;\n          break;\n\n        case '8':\n          res = property + '<=' + value;\n          break;\n\n        case '9':\n          // res = \"scriptImpl.isNumberBelongTo(\" + property + \",\\\"\" + value + \"\\\")\";\n          var valueArr = value.split(',');\n          res = \"(\".concat(property, \">=\").concat(valueArr[0], \" && \").concat(property, \"<=\").concat(valueArr[1], \")\");\n          break;\n      }\n\n      return res;\n    }\n  }, _defineProperty(_methods, \"buildDateCondition\", function buildDateCondition(obj, type) {\n    var value = obj.value;\n    var valueDes = '';\n    var property = obj.property;\n    var res = '';\n\n    if (obj.compType == 1) {\n      value = '\"' + obj.value + '\"';\n      valueDes = value;\n    } else {\n      valueDes = obj.changeDesc;\n    }\n\n    if (type == 'des') {\n      property = obj.chooseDesc;\n      value = valueDes;\n\n      switch (obj.operator) {\n        case '1':\n          res = property + '==' + value;\n          break;\n\n        case '2':\n          res = property + '!=' + value;\n          break;\n\n        case '3':\n          res = property + '>' + value;\n          break;\n\n        case '4':\n          res = property + '<' + value;\n          break;\n      }\n    } else {\n      switch (obj.operator) {\n        case '1':\n          res = 'DateUtil.isDateEquals(' + property + ',' + value + ')';\n          break;\n\n        case '2':\n          res = '!DateUtil.isDateEquals(' + property + ',' + value + ')';\n          break;\n\n        case '3':\n          res = 'DateUtil.isDateLarge(' + property + ',' + value + ')';\n          break;\n\n        case '4':\n          res = 'DateUtil.isDateLittle(' + property + ',' + value + ')';\n          break;\n\n        case '7':\n          res = 'DateUtil.isDateLargeEquals(' + property + ',' + value + ')';\n          break;\n\n        case '8':\n          res = 'DateUtil.isDateLittleEquals(' + property + ',' + value + ')';\n          break;\n\n        case '9':\n          res = 'DateUtil.isDateBelongTo(' + property + ',' + value + ')';\n          break;\n      }\n    }\n\n    return res;\n  }), _defineProperty(_methods, \"setRule\", function setRule(rule, index) {\n    if (rule) {\n      this.conditionObj = JSON.parse(JSON.parse(rule).conditionObj);\n    } else {\n      this.conditionObj = {\n        junction: 'and',\n        condition: []\n      };\n    }\n\n    this.dialogMethodVisible = true;\n    this.buildConditionTree(this.conditionObj);\n    /*if (rule != undefined) {\r\n    \tthis.dialogRuleData = Base64.decode(rule)\r\n    }*/\n\n    this.index = index;\n  }), _defineProperty(_methods, \"setContent\", function setContent(row, index) {\n    this.dialogContentVisible = true;\n    var dialogContentData = {\n      content: row.content,\n      subject: row.subject\n    };\n    this.dialogContentData = dialogContentData;\n    this.index = index;\n  }), _defineProperty(_methods, \"contentOk\", function contentOk() {\n    var _this4 = this;\n\n    utils.validateForm(this, 'contentForm').then(function (result) {\n      _this4.remindSettingList[_this4.index].content = _this4.dialogContentData.content;\n      _this4.remindSettingList[_this4.index].subject = _this4.dialogContentData.subject;\n      _this4.dialogContentVisible = false;\n      setTimeout(function () {\n        _this4.remindSettingList[_this4.index].mainHeight = document.getElementById('mainHeight' + _this4.index).offsetHeight;\n      }, 200);\n    }).catch(function (items) {\n      _this4.$message.error(\"\\u8FD8\\u6709\\u5185\\u5BB9\\u672A\\u586B\\u5199\\u3002\");\n    });\n  }), _defineProperty(_methods, \"changecondition\", function changecondition(index) {\n    var _this5 = this;\n\n    var oldVal = this.branchList[index].oldjunction;\n    var newVal = this.branchList[index].newjunction;\n\n    if (newVal == '3' || newVal == '4' || newVal == '5') {\n      this.branchList[index].newjunction = this.branchList[index].oldjunction;\n      var indexStr = this.branchList[index].indexStr;\n\n      if (newVal == '3') {\n        this.addCondition(indexStr);\n      } else if (newVal == '4') {\n        this.addUnionCondition(indexStr);\n      } else {\n        this.$confirm('确定要删除此联合条件及其下属的所有子条件吗？', '提示', {\n          cancelButtonText: '取消',\n          confirmButtonText: '确定',\n          type: 'warning',\n          closeOnClickModal: false\n        }).then(function () {\n          _this5.removeCondition(indexStr);\n        });\n      }\n    } else {\n      this.branchList[index].oldjunction = this.branchList[index].newjunction;\n      var indexStr = this.branchList[index].indexStr;\n      var indexArr = indexStr.split(',');\n\n      if (indexStr == 'root') {\n        this.conditionObj.junction = newVal;\n      } else if (indexArr.length == 1) {\n        this.conditionObj.condition[indexStr].junction = newVal;\n      } else if (indexArr.length == 2) {\n        this.conditionObj.condition[indexArr[0]].condition[indexArr[1]].junction = newVal;\n      }\n    }\n  }), _defineProperty(_methods, \"setFieldOtherInfo\", function setFieldOtherInfo(ele, tab, type) {\n    var selectFiled = this.filedsObj[tab.property];\n\n    if (type == 1) {\n      tab.dataType = selectFiled.type;\n      tab.format = selectFiled.format;\n      tab.chooseDesc = selectFiled.desc;\n      tab.value = '';\n    } else {\n      tab.changeDesc = selectFiled.desc;\n    }\n  }), _defineProperty(_methods, \"addRemindSetting\", function addRemindSetting() {\n    var rule = JSON.stringify({\n      scriptStr: Base64.encode('true'),\n      conditionObj: JSON.stringify({\n        junction: 'and',\n        condition: []\n      })\n    });\n    this.remindSettingList.push({\n      content: '',\n      count: '1',\n      objId: '',\n      rule: rule,\n      mainHeight: '133'\n    });\n  }), _defineProperty(_methods, \"saveRemindSettingList\", function saveRemindSettingList() {\n    var _this6 = this;\n\n    return new Promise(function (resolve, reject) {\n      utils.validateForm(_this6, 'form').then(function (result) {\n        _this6.dataTemplate.remindSettingList = _this6.remindSettingList ? JSON.stringify(_this6.remindSettingList) : null;\n        resolve(true);\n      }).catch(function (errors) {\n        errors.forEach(function (item) {\n          setTimeout(function () {\n            _this6.$notify.error({\n              title: '错误',\n              message: item.field + item.msg\n            });\n          }, 500);\n        });\n        resolve(false);\n      });\n    });\n  }), _defineProperty(_methods, \"buildData\", function buildData(conditionData, pathArr, tableArr, branchArr) {\n    var curYIndex = 0;\n    var data = conditionData.condition; //算三级节点总共分支个数\n\n    var yIncaseNum = this.getyIncaseNum(conditionData.condition) > 1 ? this.getyIncaseNum(conditionData.condition) : 1; //第一个节点 this.Mtop 最后一个节点Mtop+this.YIncase*（yIncaseNum-1）\n\n    var startY1 = (this.Mtop * 2 + this.YIncase * (yIncaseNum - 1)) / 2;\n    branchArr.push({\n      newjunction: conditionData.junction,\n      oldjunction: conditionData.junction,\n      style: 'left:' + (this.Mleft - 35) + 'px; top:' + (startY1 - 15) + 'px',\n      indexStr: 'root',\n      condition: 'noDel'\n    });\n\n    for (var i = 0; i < data.length; i++) {\n      if (data[i].condition) {\n        var curchildNum = this.getyIncaseNum(data[i].condition); //如果该节点，没有分支条件，则保留节点\n\n        var isEmpty0 = false;\n\n        if (curchildNum < 1) {\n          curchildNum = 1;\n          isEmpty0 = true;\n        } //计算一级节点和该节点的连线\n\n\n        var startY2 = (this.Mtop * 2 + this.YIncase * (2 * curYIndex + curchildNum - 1)) / 2;\n        var path = 'M' + this.Mleft + ',' + startY1 + 'C' + this.Mleft + ',' + startY2 + ',' + this.Mleft + ',' + startY2 + ',' + (this.Mleft + this.XIncase) + ',' + startY2;\n        pathArr.push(path);\n        branchArr.push({\n          newjunction: data[i].junction,\n          oldjunction: data[i].junction,\n          style: 'left:' + (this.Mleft + this.XIncase - 35) + 'px; top:' + (startY2 - 15) + 'px',\n          indexStr: '' + i\n        });\n        if (isEmpty0) curYIndex++;\n\n        for (var j = 0; j < data[i].condition.length; j++) {\n          //如果第三级节点有分支，则计算分支\n          if (data[i].condition[j].condition) {\n            //计算改节点分支个数\n            var curchildNum2 = this.getyIncaseNum(data[i].condition[j].condition); //如果该节点，没有分支条件，则保留节点,默认其占一行\n\n            var isEmpty = false;\n\n            if (curchildNum2 < 1) {\n              curchildNum2 = 1;\n              isEmpty = true;\n            } // 改分支第一个节点纵坐标= this.Mtop+this.YIncase*curYIndex  上一个节点纵坐标加上递增值\n            // 改分支最后节点纵坐标=改分支第一个节点纵坐标 +计算改节点分支个数*y递增值 this.Mtop+this.YIncase*curYIndex+this.YIncase*(curchildNum2-1)\n            // 计算改节点的纵坐标。（改分支第一个节点纵坐标+该分支的最后一个纵坐标）/2\n            // 该节点起始点纵坐标=  this.Mtop+this.YIncase*curYIndex+ this.Mtop+this.YIncase*curYIndex+this.YIncase*(curchildNum2-1)\n\n\n            var startY3 = (this.Mtop * 2 + this.YIncase * (2 * curYIndex + curchildNum2 - 1)) / 2; //改分支指引线的终点的纵坐标等于startY2\n\n            var _path = 'M' + (this.Mleft + this.XIncase) + ',' + startY2 + 'C' + (this.Mleft + this.XIncase) + ',' + startY3 + ',' + (this.Mleft + this.XIncase) + ',' + startY3 + ',' + (this.Mleft + this.XIncase * 2) + ',' + startY3;\n\n            pathArr.push(_path);\n            branchArr.push({\n              newjunction: data[i].condition[j].junction,\n              oldjunction: data[i].condition[j].junction,\n              style: 'left:' + (this.Mleft + this.XIncase * 2 - 35) + 'px; top:' + (startY3 - 15) + 'px',\n              indexStr: i + ',' + j,\n              condition: 'noAdd'\n            });\n\n            if (isEmpty) {\n              curYIndex++;\n            }\n\n            for (var z = 0; z < data[i].condition[j].condition.length; z++) {\n              var obj = data[i].condition[j].condition[z];\n              obj.style = 'left:' + (this.Mleft + this.XIncase * 3) + 'px; top:' + (this.Mtop + this.YIncase * curYIndex - 19) + 'px';\n              obj.indexStr = i + ',' + j + ',' + z;\n              tableArr.push(obj); //改分支下所有节点的起始纵坐标为startY3，终点纵坐标根据该节点位置决定\n\n              var _path2 = 'M' + (this.Mleft + this.XIncase * 2) + ',' + startY3 + 'C' + (this.Mleft + this.XIncase * 2) + ',' + (this.Mtop + this.YIncase * curYIndex) + ',' + (this.Mleft + this.XIncase * 2) + ',' + (this.Mtop + this.YIncase * curYIndex) + ',' + (this.Mleft + this.XIncase * 3) + ',' + (this.Mtop + this.YIncase * curYIndex);\n\n              pathArr.push(_path2);\n              curYIndex++;\n            }\n          } else {\n            //第二级节点没有分支\n            var _obj = data[i].condition[j];\n            _obj.style = 'left:' + (this.Mleft + this.XIncase * 2) + 'px; top:' + (this.Mtop + this.YIncase * curYIndex - 19) + 'px';\n            _obj.indexStr = i + ',' + j;\n            tableArr.push(_obj); //计算改分支的路径。因为是第二节点。startY2\n\n            var _path3 = 'M' + (this.Mleft + this.XIncase) + ',' + startY2 + 'C' + (this.Mleft + this.XIncase) + ',' + (this.Mtop + this.YIncase * curYIndex) + ',' + (this.Mleft + this.XIncase) + ',' + (this.Mtop + this.YIncase * curYIndex) + ',' + (this.Mleft + this.XIncase * 2) + ',' + (this.Mtop + this.YIncase * curYIndex);\n\n            pathArr.push(_path3);\n            curYIndex++;\n          }\n        }\n      } else {\n        var _obj2 = data[i];\n        _obj2.style = 'left:' + (this.Mleft + this.XIncase) + 'px; top:' + (this.Mtop + this.YIncase * curYIndex - 19) + 'px';\n        _obj2.indexStr = '' + i;\n        tableArr.push(_obj2);\n\n        var _path4 = 'M' + this.Mleft + ',' + startY1 + 'C' + this.Mleft + ',' + (this.Mtop + this.YIncase * curYIndex) + ',' + this.Mleft + ',' + (this.Mtop + this.YIncase * curYIndex) + ',' + (this.Mleft + this.XIncase) + ',' + (this.Mtop + this.YIncase * curYIndex);\n\n        pathArr.push(_path4);\n        curYIndex++;\n      }\n    }\n  }), _defineProperty(_methods, \"getyIncaseNum\", function getyIncaseNum(data) {\n    var sum = 0;\n\n    for (var i = 0; i < data.length; i++) {\n      if (data[i].condition && data[i].condition.length > 0) {\n        for (var j = 0; j < data[i].condition.length; j++) {\n          if (data[i].condition[j].condition && data[i].condition[j].condition.length > 0) {\n            for (var z = 0; z < data[i].condition[j].condition.length; z++) {\n              sum++;\n            }\n          } else {\n            sum++;\n          }\n        }\n      } else {\n        sum++;\n      }\n    }\n\n    return sum;\n  }), _defineProperty(_methods, \"buildConditionTree\", function buildConditionTree(data) {\n    var pathArr = [];\n    var tableArr = [];\n    var branchArr = [];\n    this.buildData(data, pathArr, tableArr, branchArr);\n    this.pathList = pathArr;\n    this.branchList = branchArr;\n    this.tabList = tableArr; //取路径最后一条数据，因为该条数据的高度距离顶部最大\n\n    var lastPath = pathArr[pathArr.length - 1];\n    var lastIndexArr = [];\n    if (lastPath) lastIndexArr = lastPath.split(','); //取最后一个坐标点。终点纵坐标为整个svg中最大的纵坐标\n\n    var lastYIndex = lastIndexArr[lastIndexArr.length - 1]; //设置svg的高度为最大纵坐标+100，从而实现svg页面高度自适应\n\n    if (lastYIndex) {\n      this.svgHeight = parseInt(lastYIndex) + 50 + 'px';\n    }\n\n    this.createSvgHtml(pathArr);\n  }), _defineProperty(_methods, \"createSvgHtml\", function createSvgHtml(pathArr) {\n    this.svgHtml = '';\n    var html = '<svg height=\"' + this.svgHeight + '\" version=\"1.1\" width=\"692\" xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: hidden; position: relative;\">';\n\n    for (var i = 0; i < pathArr.length; i++) {\n      html += '<path fill=\"none\" stroke=\"#787878\"' + 'd=\"' + this.pathList[i] + '\" style=\"-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\"></path>';\n    }\n\n    html += '</svg>';\n    this.svgHtml = html;\n  }), _defineProperty(_methods, \"addCondition\", function addCondition(indexStr) {\n    var data = this.conditionObj.condition;\n\n    if (indexStr == 'root') {\n      data.push(JSON.parse(JSON.stringify(this.defaultCondition)));\n    } else {\n      var indexArr = [];\n      if (indexStr) indexArr = indexStr.split(',');\n\n      for (var i = 0; i < data.length; i++) {\n        if (indexArr.length > 0 && i == indexArr[0]) {\n          if (indexArr.length > 1) {\n            for (var j = 0; j < data[i].condition.length; j++) {\n              if (j == indexArr[1]) {\n                data[i].condition[j].condition.push(JSON.parse(JSON.stringify(this.defaultCondition)));\n                break;\n              }\n            }\n          } else {\n            data[i].condition.push(JSON.parse(JSON.stringify(this.defaultCondition)));\n          }\n\n          break;\n        }\n      }\n    }\n\n    this.conditionObj.condition = data;\n    this.buildConditionTree(this.conditionObj);\n  }), _defineProperty(_methods, \"removeCondition\", function removeCondition(indexStr) {\n    var indexArr = [];\n    if (indexStr) indexArr = indexStr.split(',');\n\n    if (indexArr.length > 0) {\n      var data = this.conditionObj.condition;\n\n      for (var i = 0; i < data.length; i++) {\n        if (i == indexArr[0]) {\n          if (indexArr.length > 1) {\n            for (var j = 0; j < data[i].condition.length; j++) {\n              if (j == indexArr[1]) {\n                if (indexArr.length > 2) {\n                  for (var z = 0; z < data[i].condition[j].condition.length; z++) {\n                    if (z == indexArr[2]) {\n                      data[i].condition[j].condition.splice(z, 1);\n                      break;\n                    }\n                  }\n                } else {\n                  data[i].condition.splice(j, 1);\n                }\n\n                break;\n              }\n            }\n          } else {\n            data.splice(i, 1);\n          }\n\n          break;\n        }\n      }\n\n      this.conditionObj.condition = data;\n      this.buildConditionTree(this.conditionObj);\n    }\n  }), _defineProperty(_methods, \"addUnionCondition\", function addUnionCondition(indexStr) {\n    var data = this.conditionObj.condition;\n\n    if (indexStr == 'root') {\n      data.push({\n        junction: 'or',\n        condition: []\n      });\n    } else {\n      var indexArr = [];\n      if (indexStr) indexArr = indexStr.split(',');\n\n      for (var i = 0; i < data.length; i++) {\n        if (indexArr.length > 0 && i == indexArr[0]) {\n          if (indexArr.length > 1) {\n            for (var j = 0; j < data[i].condition.length; j++) {\n              if (j == indexArr[1]) {\n                data[i].condition[j].condition.push({\n                  junction: 'or',\n                  condition: []\n                });\n                break;\n              }\n            }\n          } else {\n            data[i].condition.push({\n              junction: 'or',\n              condition: []\n            });\n          }\n\n          break;\n        }\n      }\n    }\n\n    this.conditionObj.condition = data;\n    this.buildConditionTree(this.conditionObj);\n  }), _methods)\n};",null]}