{"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\\FilterFiledSetting.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\dataTemplate\\FilterFiledSetting.vue","mtime":1675071992131},{"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.function.name\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\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//\nvar EipDataTemplateDialog = function EipDataTemplateDialog() {\n  return import(\"@/components/dialog/EipDataTemplateDialog.vue\");\n};\n\nexport default {\n  components: {\n    EipDataTemplateDialog: EipDataTemplateDialog\n  },\n  name: \"filterFiled-setting\",\n  props: [\"data\"],\n  data: function data() {\n    return {\n      reportName: \"\",\n      conditionField: [],\n      dataTemplate: {},\n      displaySettingFields: [],\n      filteringField: [],\n      permissionMap: {},\n      permissionList: [],\n      rightList: [{\n        key: \"\",\n        value: \"请选择\"\n      }, {\n        key: \"none\",\n        value: \"无\"\n      }, {\n        key: \"everyone\",\n        value: \"所有人\"\n      }],\n      tabHeight: \"\".concat(document.documentElement.clientHeight) - 245,\n      currentAuthRow: null,\n      settingVisible: false,\n      formRow: [],\n      selectedRow: [],\n      formFieldList: [],\n      urlParams: []\n    };\n  },\n  mounted: function mounted() {\n    this.dataTemplate = this.data.bpmDataTemplate;\n\n    if (this.data.displaySettingFields) {\n      this.displaySettingFields = JSON.parse(this.data.displaySettingFields);\n      this.displaySettingFields = this.displaySettingFields.filter(function (item) {\n        if (item.type === 'date' || item.type === 'clob') {\n          return false;\n        } else {\n          return true;\n        }\n      });\n    }\n\n    this.templates = this.data.templates;\n    this.permissionMap = this.data.permissionList;\n    this.initData();\n  },\n  methods: {\n    dialogOk: function dialogOk() {\n      var _this2 = this;\n\n      for (var i = 0; i < this.selectedRow.formatterData.length; i++) {\n        if (!this.selectedRow.formatterData[i].value || !this.selectedRow.formatterData[i].text) {\n          this.$message.warning(\"第\" + (i + 1) + \"行值、标签为空！\");\n          return false;\n        }\n      }\n\n      var conditionField = this.conditionField;\n      this.selectedRow.parameter = [];\n      conditionField.forEach(function (item) {\n        _this2.selectedRow.parameter.push({\n          property: item.key,\n          value: item.parameter,\n          group: \"main\",\n          operation: item.qt,\n          relation: \"AND\"\n        });\n      });\n\n      if (this.selectedRow.urlType == \"url\" && this.urlParams) {\n        this.selectedRow.urlParams = _toConsumableArray(this.urlParams);\n        this.urlParams = [];\n      } //this.formRow.formatterData = this.selectedRow.formatterData;\n\n\n      this.$set(this.formRow, \"formatterData\", this.selectedRow.formatterData);\n      this.formRow.parameter = this.selectedRow.parameter;\n\n      if (this.selectedRow.urlParams) {\n        this.formRow.urlParams = this.selectedRow.urlParams;\n      }\n\n      this.settingVisible = false;\n    },\n    onDataTemplateConfirm: function onDataTemplateConfirm(selectedNode) {\n      var _this3 = this;\n\n      if (selectedNode && selectedNode.length > 0) {\n        this.$nextTick(function () {\n          _this3.conditionField = [];\n          var conditionField = JSON.parse(selectedNode[0].conditionField);\n          conditionField.forEach(function (item) {\n            var obj = {\n              key: item.colPrefix + item.name,\n              parameter: \"\",\n              qt: item.qt,\n              value: item.cm\n            };\n\n            _this3.conditionField.push(obj);\n          });\n          _this3.reportName = selectedNode[0].name;\n          _this3.selectedRow.reportNameConfigure = {\n            alias: selectedNode[0].alias,\n            reportName: selectedNode[0].name,\n            conditionField: _this3.conditionField\n          };\n        });\n      } else {\n        this.reportName = \"\";\n        this.conditionField = [];\n        this.selectedRow.reportNameConfigure = {};\n      }\n    },\n    //保存显示列数据\n    saveFilteringField: function saveFilteringField() {\n      this.dataTemplate.filteringField = this.filteringField ? JSON.stringify(this.filteringField) : null;\n    },\n    //初始化处理\n    initData: function initData() {\n      if (this.dataTemplate.filteringField) {\n        this.filteringField = JSON.parse(this.dataTemplate.filteringField);\n      }\n\n      if (this.dataTemplate.formField) {\n        this.formFieldList = [];\n        var formFieldList = JSON.parse(this.dataTemplate.formField);\n        var fieldMap = {};\n\n        var _this = this;\n\n        formFieldList.forEach(function (ffield) {\n          if (!fieldMap[ffield.name]) {\n            _this.formFieldList.push(ffield);\n\n            fieldMap[ffield.name] = true;\n          }\n        });\n      }\n    },\n    showDataTemplateDialog: function showDataTemplateDialog() {\n      this.$refs.dataTemplateDialog.showDialog();\n    },\n    columnFilter: function columnFilter(type) {\n      return type != \"sub\" && type != \"tabs\";\n    },\n    //双击字段列表中的字段时将该字段加入到显示字段\n    fillToDisplay: function fillToDisplay(row, event, column) {\n      var isIn = this.isInDisplayFields(row.name);\n\n      if (!isIn) {\n        this.filteringField.push(row);\n      }\n    },\n    //将字段列表中的已选字段加入到显示字段列表\n    allFillToDisplay: function allFillToDisplay() {\n      var _this4 = this;\n\n      var selectrows = this.$refs.displaySettingTable.store.states.selection;\n\n      if (!selectrows || selectrows.length < 1) {\n        this.$message({\n          message: \"请在左侧列表中选择要显示的字段\",\n          type: \"warning\"\n        });\n      }\n\n      selectrows.forEach(function (obj) {\n        if (!_this4.isInDisplayFields(obj.name)) {\n          _this4.filteringField.push(obj);\n        }\n      });\n    },\n    //打开设置权限\n    setFieldRightDialog: function setFieldRightDialog(row) {\n      var conf = {\n        right: JSON.parse(row.right),\n        permissionList: this.permissionList\n      };\n      this.currentAuthRow = row;\n      this.$refs.eipAuthDialog.showDialog(conf);\n    },\n    //设置权限\n    authDialogOnConfirm: function authDialogOnConfirm(data) {\n      if (this.currentAuthRow) {\n        this.currentAuthRow.right = JSON.stringify(data);\n      }\n    },\n    //显示字段排序\n    sort: function sort(index, type) {\n      if (\"up\" == type) {\n        if (index === 0) {\n          this.$message({\n            message: \"已经是列表中第一位\",\n            type: \"warning\"\n          });\n        } else {\n          var temp = this.filteringField[index - 1];\n          this.$set(this.filteringField, index - 1, this.filteringField[index]);\n          this.$set(this.filteringField, index, temp);\n        }\n      } else {\n        if (index === this.filteringField.length - 1) {\n          this.$message({\n            message: \"已经是列表中最后一位\",\n            type: \"warning\"\n          });\n        } else {\n          var i = this.filteringField[index + 1];\n          this.$set(this.filteringField, index + 1, this.filteringField[index]);\n          this.$set(this.filteringField, index, i);\n        }\n      }\n    },\n    //删除显示字段\n    remove: function remove(index) {\n      this.filteringField.splice(index, 1);\n    },\n    //判断字段是否已在显示字段列表中\n    isInDisplayFields: function isInDisplayFields(name) {\n      var isIn = false;\n\n      if (this.filteringField && this.filteringField.length > 0) {\n        this.filteringField.forEach(function (obj) {\n          if (obj.name == name) {\n            isIn = true;\n            return;\n          }\n        });\n      }\n\n      return isIn;\n    },\n    setting: function setting(row) {\n      this.settingVisible = true;\n      this.formRow = row;\n      this.selectedRow = JSON.parse(JSON.stringify(this.formRow));\n\n      if (this.selectedRow.reportNameConfigure) {\n        this.reportName = this.selectedRow.reportNameConfigure.reportName;\n        this.conditionField = this.selectedRow.reportNameConfigure.conditionField == undefined ? [] : this.selectedRow.reportNameConfigure.conditionField;\n      }\n\n      if (!this.selectedRow.formatterData) {\n        this.selectedRow.formatterData = [];\n      }\n\n      if (this.selectedRow.urlType == \"url\" && this.selectedRow.urlParams && this.selectedRow.urlParams.length > 0) {\n        this.urlParams = _toConsumableArray(this.selectedRow.urlParams);\n      }\n    },\n    addSetting: function addSetting() {\n      this.selectedRow.formatterData.push({\n        key: \"\",\n        value: \"\"\n      });\n    },\n    removeSetting: function removeSetting(index) {\n      this.selectedRow.formatterData.splice(index, 1);\n    },\n    cancelSetting: function cancelSetting() {\n      this.handleDialogClose();\n    },\n    urlParamsAdd: function urlParamsAdd() {\n      this.urlParams.push({\n        name: \"\",\n        field: \"\"\n      });\n    },\n    urlParamsRemove: function urlParamsRemove(item) {\n      this.urlParams.remove(item);\n    },\n    handleDialogClose: function handleDialogClose() {\n      this.settingVisible = false;\n    }\n  }\n};",null]}