{"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\\TemplateFilterDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\dataTemplate\\TemplateFilterDialog.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 \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\nimport \"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 form from '@/api/form.js';\nimport { codemirror } from 'vue-codemirror';\nimport 'codemirror/theme/ambiance.css';\nimport req from '@/request.js';\n\nrequire('codemirror/mode/javascript/javascript');\n\nvar eipOrgDialog = function eipOrgDialog() {\n return import('@/components/dialog/EipOrgDialog.vue');\n};\n\nexport default {\n name: 'template-filter-dialog',\n components: {\n codemirror: codemirror,\n eipOrgDialog: eipOrgDialog\n },\n props: {\n colPrefix: String,\n metafields: Array,\n filterFields: Array,\n conditionFields: String\n },\n data: function data() {\n return {\n comVarList: [],\n filter: {\n filterType: 1,\n name: ''\n },\n isEditabled: true,\n editFilter: {},\n orgSelectedArray: [],\n sqlOption: [],\n filterTypeList: [{\n key: 1,\n value: '条件脚本'\n }, {\n key: 3,\n value: '追加SQL'\n }, {\n key: 4,\n value: '数据权限'\n }],\n dialogVisible: false,\n varList: [],\n selectVar: '',\n curCode: '',\n cmOptions: {\n value: '',\n mode: 'text/javascript',\n lineNumbers: true,\n line: true,\n lineWiseCopyCut: true,\n showCursorWhenSelecting: true\n },\n conditionObj: {},\n conditionName: '',\n pathList: [],\n data: {},\n branchList: [],\n tabList: [],\n Tree: [],\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 svgHtml: '',\n varTree: [],\n filedsObj: {},\n scriptStr: '',\n localDsType: ''\n };\n },\n computed: {\n codemirror: function codemirror() {\n return this.$refs.mycode.codemirror;\n }\n },\n mounted: function mounted() {\n this.getDataSource();\n\n if (this.$store.state.login.currentUser.userAttrs.tenantId != -1) {\n this.filterTypeList.splice(1, 1);\n }\n },\n methods: {\n initData: function initData() {\n var _this = this;\n\n this.varList = [];\n this.filter = {\n filterType: 1,\n name: '',\n key: ''\n };\n this.sqlOption = {\n label: 'SQL字段',\n options: []\n };\n var varOption = {\n label: '常用变量',\n options: []\n };\n var confOption = {\n label: '条件字段',\n options: []\n }; //获取变量\n\n form.getDataTemplateVarList().then(function (response) {\n _this.comVarList = response;\n\n if (response && response.length > 0) {\n response.forEach(function (obj) {\n if (obj.alias == 'curUserAccount') {\n obj.alias = \"'[curUserAccount]'\";\n } else if (obj.alias == 'curUserId') {\n obj.alias = \"'[curUserId]'\";\n }\n\n varOption.options.push({\n key: obj.alias,\n value: obj.title\n });\n });\n }\n }); //获取字段\n\n if (this.metafields && this.metafields.length > 0) {\n this.metafields = this.metafields.filter(function (item) {\n return !item.flowField;\n });\n this.metafields.forEach(function (field) {\n if (field.type && field.type != 'null') {\n if (field.type == 'clob' && _this.localDsType == 'oracle') {\n _this.sqlOption.options.push({\n key: 'TO_CHAR(' + _this.colPrefix + field.name + ')',\n value: field.desc\n });\n } else {\n _this.sqlOption.options.push({\n key: _this.colPrefix + field.name,\n value: field.desc\n });\n }\n }\n });\n } //条件字段\n\n\n if (this.conditionFields) {\n var conditions = JSON.parse(this.conditionFields);\n\n if (conditions.length > 0) {\n conditions.forEach(function (obj) {\n confOption.options.push({\n key: _this.colPrefix + obj.na,\n value: obj.cm\n });\n });\n }\n }\n\n this.varList.push(this.sqlOption);\n this.varList.push(varOption);\n this.varList.push(confOption);\n\n if (this.editFilter && this.editFilter.key) {\n this.isEditabled = false;\n var tempFilter = {};\n tempFilter.name = this.editFilter.name;\n tempFilter.key = this.editFilter.key;\n tempFilter.filter = this.editFilter.condition;\n\n if (this.editFilter.type == 4 && tempFilter.filter) {\n var filterJson = JSON.parse(tempFilter.filter);\n\n for (var i = 0; i < filterJson.length; i++) {\n var obj = filterJson[i];\n\n if ('customOrgs' != obj.type) {\n tempFilter[obj.type] = '1';\n } else {\n this.orgSelectedArray = obj.orgs;\n }\n\n if (obj.field) {\n tempFilter[obj.type + 'Field'] = obj.field;\n }\n }\n\n this.filter = tempFilter;\n } else if (this.editFilter.type == 1) {\n this.filter = tempFilter;\n var conditionJson = JSON.parse(this.filter.filter);\n this.conditionObj = conditionJson;\n this.buildConditionTree(conditionJson);\n this.buildVarTree(this.metafields);\n } else if (this.editFilter.type == 2 || this.editFilter.type == 3) {\n this.$set(this.filter, 'key', this.editFilter.key);\n this.$set(this.filter, 'name', this.editFilter.name);\n this.$set(this.filter, 'filter', this.editFilter.condition);\n }\n\n this.$set(this.filter, 'filterType', this.editFilter.type); // this.filter.filterType = this.editFilter.type;\n } else {\n this.isEditabled = true;\n\n if (this.filter.filterType == 2 || this.filter.filterType == 3) {\n this.codemirror.setValue(' ');\n } else if (this.filter.filterType == 1) {\n this.conditionObj = {\n junction: 'and',\n condition: []\n };\n this.buildConditionTree(this.conditionObj);\n this.buildVarTree(this.metafields);\n }\n }\n },\n showDialog: function showDialog(conf) {\n if (conf.editFilter) {\n this.editFilter = conf.editFilter;\n }\n\n this.dialogVisible = true;\n this.initData();\n },\n changeFilterType: function changeFilterType() {\n if ((this.filter.filterType == 2 || this.filter.filterType == 3) && this.filter.filterType != this.editFilter.type) {\n this.filter.filter = ' ';\n this.codemirror.setValue(' ');\n }\n },\n clickVar: function clickVar() {\n this.codemirror.replaceSelection(' ' + this.selectVar + ' ');\n },\n saveFormValid: function saveFormValid() {\n if (!this.filter.name) {\n this.$message.error('名称不能为空!');\n return false;\n }\n\n if (!this.filter.key) {\n this.$message.error('Key不能为空!');\n return false;\n } //key不能重复\n\n\n if (this.isEditabled) {\n for (var i = 0; i < this.filterFields.length; i++) {\n if (this.filterFields[i].key == this.filter.key) {\n this.$message.error('Key已被使用,请重新填写!');\n this.filter.key = '';\n return false;\n }\n }\n } // 处理过滤条件\n\n\n if (this.filter.filterType == 1) {\n if (!this.tabList || this.tabList.length < 1) {\n this.$message.error('请添加过滤条件!');\n return false;\n }\n\n this.filter.filter = JSON.stringify(this.conditionObj);\n } else if (this.filter.filterType == 4) {\n this.filter.filter = this.getPermissionData();\n } else {\n this.filter.filter = this.codemirror.getValue();\n }\n\n return true;\n },\n isNotZeroEmpty: function isNotZeroEmpty(val) {\n if (!val || val === '0') {\n return false;\n }\n\n return true;\n },\n getPermissionData: function getPermissionData() {\n var resultData = [];\n\n if (!this.isNotZeroEmpty(this.filter.loginUser) && !this.isNotZeroEmpty(this.filter.loginUserOrgs) && !this.isNotZeroEmpty(this.filter.loginUserSubOrgs) && !this.isNotZeroEmpty(this.filter.customOrgsField)) {\n this.$message.error('请选择权限类型!');\n throw new Error('请选择权限类型.');\n }\n\n if (this.filter.loginUser && this.filter.loginUser !== '0') {\n if (!this.filter.loginUserField) {\n this.$message.error('请选择当前登陆用户对应字段!');\n throw new Error('请选择当前登陆用户对应字段.');\n }\n\n resultData.push({\n type: 'loginUser',\n name: '当前登录用户数据',\n field: this.filter.loginUserField\n });\n }\n\n if (this.filter.loginUserOrgs && this.filter.loginUserOrgs !== '0') {\n if (!this.filter.loginUserOrgsField) {\n this.$message.error('请选择当前登陆用户所属组织对应字段!');\n throw new Error('请选择当前登陆用户所属组织对应字段.');\n }\n\n resultData.push({\n type: 'loginUserOrgs',\n name: '当前登陆用户所属组织',\n field: this.filter.loginUserOrgsField\n });\n }\n\n if (this.filter.loginUserSubOrgs && this.filter.loginUserSubOrgs !== '0') {\n if (!this.filter.loginUserSubOrgsField) {\n this.$message.error('请选择当前登陆用户所属组织及下属组织对应字段!');\n throw new Error('请选择当前登陆用户所属组织及下属组织对应字段.');\n }\n\n resultData.push({\n type: 'loginUserSubOrgs',\n name: '当前登陆用户所属组织及下属组织',\n field: this.filter.loginUserSubOrgsField\n });\n }\n\n if (this.orgSelectedArray) {\n if (this.filter.customOrgsField) {\n //this.$message.error(\"请选择自定义选择组织对应字段!\");\n //throw new Error(\"请选择自定义选择组织对应字段.\");\n var customOrgs = {\n type: 'customOrgs',\n name: '自定义选择组织',\n orgs: [],\n field: this.filter.customOrgsField\n };\n\n for (var int = 0; int < this.orgSelectedArray.length; int++) {\n var selectOrg = this.orgSelectedArray[int];\n var orgObj = {};\n orgObj.id = selectOrg.id;\n orgObj.name = selectOrg.name;\n customOrgs.orgs.push(orgObj);\n }\n\n resultData.push(customOrgs);\n }\n }\n\n return JSON.stringify(resultData);\n },\n orgSelector: function orgSelector() {\n this.$refs.eipOrgDialog.showDialog({});\n },\n handleTagClose: function handleTagClose(tag) {\n if (this.orgSelectedArray && this.orgSelectedArray.length > 0) {\n for (var i = 0; i < this.orgSelectedArray.length; i++) {\n if (this.orgSelectedArray[i].id == tag.id) {\n this.orgSelectedArray.splice(i, 1);\n return;\n }\n }\n }\n },\n dialogOnConfirm: function dialogOnConfirm(data) {\n if (data && data.length > 0) {\n this.orgSelectedArray = data;\n } else {\n this.orgSelectedArray = [];\n }\n },\n onConfirm: function onConfirm(selection) {\n if (this.saveFormValid()) {\n this.dialogVisible = false;\n this.$emit('onConfirm', selection, this.filter);\n }\n },\n handleClose: function handleClose() {\n this.dialogVisible = false;\n },\n //根据条件数组构建条件分支界面\n 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 },\n //构建svg图形页面\n createSvgHtml: function createSvgHtml(pathArr) {\n this.svgHtml = '';\n var html = '';\n\n for (var i = 0; i < pathArr.length; i++) {\n html += '';\n }\n\n html += '';\n this.svgHtml = html;\n },\n changecondition: function changecondition(index) {\n var _this2 = 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 _this2.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 },\n //添加一个联合\n 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 },\n 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 },\n //添加一个联合条件条件\n 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 },\n 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 },\n //获取条件总数\n 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 },\n buildVarTree: function buildVarTree(treeData) {\n var _this3 = this;\n\n var treeArr = [];\n this.varTree = [];\n this.filedsObj = {};\n\n if (treeData.length > 0) {\n treeData.forEach(function (field) {\n if (field.type && field.type != 'null') {\n var obj = {\n pathStr: _this3.colPrefix + field.name,\n desc: field.desc,\n dataType: field.type\n };\n treeArr.push(obj);\n _this3.filedsObj[obj.pathStr] = obj;\n }\n });\n this.varTree = treeArr;\n }\n },\n setFieldOtherInfo: function setFieldOtherInfo(ele, tab, type) {\n var selectFiled = this.filedsObj[tab.property];\n\n if (type == 1) {\n tab.dataType = selectFiled.dataType;\n tab.format = selectFiled.format;\n tab.chooseDesc = selectFiled.desc;\n tab.value = '';\n } else {\n tab.changeDesc = selectFiled.desc;\n }\n },\n getDataSource: function getDataSource() {\n var _this4 = this;\n\n req.get('${portal}/sys/sysDataSource/v1/getDataSources').then(function (resp) {\n if (resp.data && resp.data.length > 0) {\n resp.data.forEach(function (item) {\n if (item.alias == 'LOCAL') {\n _this4.localDsType = item.dbType;\n }\n });\n }\n });\n }\n }\n};",null]}