{"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\\customView\\FilterDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\customView\\FilterDialog.vue","mtime":1675071992085},{"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/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.string.sub\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 utils from \"@/hotent-ui-util.js\";\n\nvar eipOrgSelector = function eipOrgSelector() {\n return import(\"@/components/selector/EipOrgSelector.vue\");\n};\n\nexport default {\n components: {\n eipOrgSelector: eipOrgSelector\n },\n props: {\n metafields: {\n type: Array,\n default: function _default() {}\n },\n conditionfields: {\n type: Array,\n default: function _default() {}\n },\n filterData: Object,\n keys: Array\n },\n data: function data() {\n return {\n dialogVisible: false,\n data: {},\n isEditabled: true,\n isSelected: false,\n conditions: [],\n comVarList: [],\n colPrefix: \"\",\n selectVar: \"\",\n newMetafields: [],\n judgeConditions: [{\n key: \"1\",\n value: \"等于\"\n }, {\n key: \"3\",\n value: \"等于(忽略大小写)\"\n }, {\n key: \"2\",\n value: \"不等于\"\n }, {\n key: \"4\",\n value: \"like\"\n }, {\n key: \"5\",\n value: \"like左\"\n }, {\n key: \"6\",\n value: \"like右\"\n }, {\n key: \"7\",\n value: \"等于变量\"\n }, {\n key: \"8\",\n value: \"不等于变量\"\n }],\n scriptType: [{\n key: \"1\",\n value: \"条件脚本\"\n }, {\n key: \"2\",\n value: \"SQL\"\n }, {\n key: \"3\",\n value: \"追加SQL\"\n }, {\n key: \"4\",\n value: \"数据权限\"\n }],\n diySql: \"\",\n authConditions: [{\n type: \"loginUser\",\n name: \"当前登录用户数据\",\n field: \"\",\n enabled: false\n }, {\n type: \"loginUserOrgs\",\n name: \"当前登陆用户所属组织\",\n field: \"\",\n enabled: false\n }, {\n type: \"loginUserSubOrgs\",\n name: \"当前登陆用户所属组织及下属组织\",\n field: \"\",\n enabled: false\n }, {\n type: \"customOrgs\",\n name: \"自定义选择组织\",\n orgs: [{\n id: \"6777\",\n name: \"组织测试\"\n }, {\n id: \"6645\",\n name: \"测试测试长度是否有变化啊测试测试长度是否有变化啊\"\n }],\n field: \"\"\n }],\n orgSelect: {\n id: \"\",\n name: \"\"\n },\n isAdd: false,\n conditionOptions: [{\n key: 'and',\n value: 'and'\n }, {\n key: 'or',\n value: 'or'\n }]\n };\n },\n mounted: function mounted() {\n var _this = this;\n\n if (this.$store.state.login.currentUser.userAttrs.tenantId != -1) {\n this.scriptType.splice(1, 1);\n }\n\n form.getComVarList().then(function (data) {\n for (var i = 0; i < data.length; i++) {\n data[i].alias = \"[\" + data[i].alias + \"]\";\n }\n\n _this.comVarList = data;\n });\n },\n methods: {\n afterSaveData: function afterSaveData(cb) {\n var _this2 = this;\n\n utils.validateForm(this, \"filterForm\").then(function (r) {\n if (cb) {\n cb();\n }\n }).catch(function (items) {\n _this2.$message.warning(\"\\u8FD8\\u6709\\u5185\\u5BB9\\u5C1A\\u672A\\u586B\\u5199\");\n });\n },\n beforeClose: function beforeClose() {\n this.dialogVisible = false;\n },\n handleOpen: function handleOpen(isAdd) {\n var _this3 = this;\n\n this.dialogVisible = true;\n this.isAdd = isAdd;\n this.orgSelect = {\n id: \"\",\n name: \"\"\n };\n this.$nextTick(function () {\n _this3.newMetafields = _this3.metafields.filter(function (item) {\n return item.isVirtual !== 1;\n });\n\n if (_this3.filterData.type) {\n _this3.data = _objectSpread({}, _this3.filterData);\n } else {\n _this3.data = {\n condition: [],\n name: \"\",\n key: \"\",\n type: \"1\",\n right: [{\n type: \"everyone\",\n title: \"所有人\",\n checked: true\n }]\n };\n _this3.conditions = [];\n _this3.diySql = \"\";\n }\n\n if (_this3.data.type === \"1\") {\n _this3.conditions = _this3.data.condition;\n } else if (_this3.data.type === \"2\" || _this3.data.type === \"3\") {\n _this3.diySql = _this3.data.condition;\n } else if (_this3.data.type === \"4\") {\n var auth = JSON.parse(_this3.data.condition);\n\n for (var i = 0; i < _this3.authConditions.length - 1; i++) {\n for (var j = 0; j < auth.length; j++) {\n if (_this3.authConditions[i].type === auth[j].type) {\n _this3.authConditions[i].field = auth[j].field;\n _this3.authConditions[i].enabled = true;\n }\n }\n }\n\n for (var _j = 0; _j < auth.length; _j++) {\n if (_this3.authConditions[3].type === auth[_j].type) {\n _this3.authConditions[3].field = auth[_j].field;\n\n for (var k = 0; k < auth[_j].orgs.length; k++) {\n _this3.orgSelect.id += auth[_j].orgs[k].id + \",\";\n _this3.orgSelect.name += auth[_j].orgs[k].name + \",\";\n }\n }\n }\n }\n });\n },\n addRule: function addRule(type, condition, event) {\n var con = {};\n\n if (type === \"common\") {\n con = {\n optType: \"2\",\n flowvarKey: \"\",\n judgeCon1: \"1\",\n judgeVal1: \"\",\n conDesc: \"\",\n ruleType: \"1\"\n };\n } else if (type === \"combine\") {\n con = {\n branch: true,\n sub: []\n };\n }\n\n con.compType = event;\n condition.push(con);\n },\n removeRule: function removeRule(conditions, index) {\n conditions.splice(index, 1);\n },\n save: function save() {\n if (!this.data.name || !this.data.key) {\n this.$message.error(\"请填写名称与别名\");\n return;\n }\n\n for (var i = 0; i < this.keys.length; i++) {\n if (this.keys[i].key === this.data.key && this.isAdd) {\n this.$message.error(\"别名已存在\");\n return;\n }\n }\n\n if (this.data.key) {\n if (this.data.type === \"1\") {\n this.conditions = this.clearEmptyData(this.conditions);\n this.data.condition = this.conditions;\n } else if (this.data.type === \"2\" || this.data.type === \"3\") {\n this.data.condition = this.diySql;\n } else if (this.data.type === \"4\") {\n var orgSelectId = this.orgSelect.id.split(\",\");\n var orgSelectName = this.orgSelect.name.split(\",\");\n var auth = [];\n\n for (var _i = 0; _i < this.authConditions.length - 1; _i++) {\n if (this.authConditions[_i].enabled && this.authConditions[_i].field) {\n auth.push({\n type: this.authConditions[_i].type,\n name: this.authConditions[_i].name,\n field: this.authConditions[_i].field\n });\n }\n }\n\n if (orgSelectId.length > 0 && this.authConditions[3].field) {\n var orgs = [];\n\n for (var _i2 = 0; _i2 < orgSelectId.length; _i2++) {\n orgs.push({\n id: orgSelectId[_i2],\n name: orgSelectName[_i2]\n });\n }\n\n auth.push({\n type: this.authConditions[3].type,\n name: this.authConditions[3].name,\n field: this.authConditions[3].field,\n orgs: orgs\n });\n }\n\n this.data.condition = JSON.stringify(auth);\n }\n\n this.$emit(\"after-save\", this.data);\n this.dialogVisible = false;\n } else {\n this.$message(\"请输入key\");\n }\n },\n clearEmptyData: function clearEmptyData(conditions) {\n if (conditions.length > 0) {\n for (var i = 0; i < conditions.length; i++) {\n if (conditions[i].branch) {\n conditions[i].sub = this.clearEmptyData(conditions[i].sub);\n } else {\n if (!conditions[i].flowvarKey) {\n conditions.splice(i, 1);\n i = i - 1;\n } else {\n conditions[i].conDesc = conditions[i].flowvarKey + \" \" + this.getJudgeConditionName(conditions[i].judgeCon1) + \" \" + conditions[i].judgeVal1;\n }\n }\n }\n }\n\n return conditions;\n },\n getJudgeConditionName: function getJudgeConditionName(key) {\n for (var i = 0; i < this.judgeConditions.length; i++) {\n if (this.judgeConditions[i].key === key) {\n return this.judgeConditions[i].value;\n }\n\n return \"\";\n }\n },\n selectColumn: function selectColumn(data) {\n this.diySql += data;\n }\n }\n};",null]}