{"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\\FieldDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\form\\customView\\FieldDialog.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/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.function.name\";\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//\nimport form from \"@/api/form.js\";\nimport utils from \"@/hotent-ui-util.js\";\nexport default {\n  props: {\n    type: String,\n    item: Object\n  },\n  data: function data() {\n    return {\n      dialogVisible: false,\n      field: {\n        resultFromType: \"script\"\n      },\n      controlTypes: [{\n        id: \"onetext\",\n        name: \"单行文本框\"\n      }, {\n        id: \"select\",\n        name: \"下拉框\"\n      }, {\n        id: \"customdialog\",\n        name: \"自定义对话框\"\n      }, {\n        id: \"date\",\n        name: \"日期选择器\"\n      }],\n      customDialogs: [],\n      customDialog: {},\n      selectContent: [],\n      customDialogContent: {},\n      operator: [{\n        id: \">\",\n        name: \"大于\"\n      }, {\n        id: \"<\",\n        name: \"小于\"\n      }, {\n        id: \"==\",\n        name: \"等于\"\n      }, {\n        id: \">=\",\n        name: \"大于等于\"\n      }, {\n        id: \"<=\",\n        name: \"小于等于\"\n      }, {\n        id: \"!=\",\n        name: \"不等于\"\n      }, {\n        id: \"indexOf\",\n        name: \"包含\"\n      }, {\n        id: \"notIndexOf\",\n        name: \"不包含\"\n      }],\n      title: \"\"\n    };\n  },\n  watch: {\n    \"field.controlType\": function fieldControlType(newVal, oldVal) {\n      for (var i = 0; i < this.controlTypes.length; i++) {\n        if (this.controlTypes[i].id === newVal) {\n          this.field.controlTypeDesc = this.controlTypes[i].name;\n        }\n      }\n    }\n  },\n  mounted: function mounted() {\n    var _this = this;\n\n    form.getCustomDialog().then(function (response) {\n      for (var i = 0; i < response.length; i++) {\n        response[i].resultfield = JSON.parse(response[i].resultfield);\n      }\n\n      _this.customDialogs = response;\n    });\n  },\n  methods: {\n    close: function close() {\n      this.dialogVisible = false;\n      this.selectContent = [];\n      this.customDialogContent = [];\n    },\n    beforeClose: function beforeClose() {\n      this.dialogVisible = false;\n      this.selectContent = [];\n      this.customDialogContent = [];\n    },\n    handleOpen: function handleOpen() {\n      var _this2 = this;\n\n      this.dialogVisible = true;\n      this.$nextTick(function () {\n        _this2.field = _objectSpread({}, _this2.item);\n\n        if (_this2.field.controlContent && _this2.field.controlContent.constructor == String) {\n          _this2.field.controlContent = JSON.parse(_this2.field.controlContent);\n        }\n\n        if (_this2.type === \"K\") {\n          _this2.title = \"控件设置\";\n\n          if (_this2.field.controlType === \"select\") {\n            _this2.selectContent = _this2.field.controlContent;\n          } else if (_this2.field.controlType === \"customdialog\") {\n            _this2.customDialogContent = _this2.field.controlContent;\n\n            if (_this2.customDialogContent.alias) {\n              _this2.change(_this2.customDialogContent.alias);\n            }\n          }\n        } else if (_this2.type === \"B\") {\n          _this2.title = \"报警设置\";\n\n          if (_this2.field.alarmSetting) {\n            _this2.field.dialogAlarmSetting = _this2.field.alarmSetting;\n\n            if (!Array.isArray(_this2.field.dialogAlarmSetting)) {\n              _this2.field.dialogAlarmSetting = JSON.parse(_this2.field.dialogAlarmSetting);\n            }\n          } else {\n            _this2.field.dialogAlarmSetting = [];\n          }\n\n          if (!_this2.field.formater) {\n            _this2.$set(_this2.field, \"formater\", \"\");\n          }\n        } else if (_this2.type === \"X\") {\n          _this2.title = \"虚拟列设置\";\n          _this2.field.isVirtual = 1;\n          _this2.field.virtualFrom = _this2.field.fieldName;\n          _this2.field.isSearch = 0;\n          _this2.field.fieldDesc = \"\";\n          _this2.field.fieldName = \"\";\n          _this2.field.resultFromType = \"script\";\n          _this2.field.controlTypeDesc = \"无\";\n          _this2.field.controlType = \"\";\n          _this2.field.dialogAlarmSetting = null; //清空报表设置\n\n          _this2.field.formater = \"\";\n        }\n      });\n    },\n    change: function change(type) {\n      for (var i = 0; i < this.customDialogs.length; i++) {\n        if (this.customDialogs[i].alias === type) {\n          this.customDialog = this.customDialogs[i];\n        }\n      }\n    },\n    save: function save() {\n      var _this3 = this;\n\n      utils.validateForm(this, \"confForm\").then(function (r) {\n        if (_this3.type === \"K\") {\n          if (_this3.field.controlType === \"select\") {\n            _this3.field.controlContent = _this3.selectContent;\n          } else if (_this3.field.controlType === \"customdialog\") {\n            _this3.field.controlContent = _this3.customDialogContent;\n          }\n\n          _this3.$emit(\"select\", _this3.field);\n        } else if (_this3.type === \"B\") {\n          _this3.field.alarmSetting = _this3.field.dialogAlarmSetting;\n\n          _this3.$emit(\"select\", _this3.field);\n        } else {\n          _this3.$emit(\"after-save\", _this3.field);\n        }\n\n        _this3.close();\n      }).catch(function (items) {\n        _this3.$message.error(\"\\u8FD8\\u6709\\u5185\\u5BB9\\u672A\\u586B\\u5199\\uFF0C\\u65E0\\u6CD5\\u4FDD\\u5B58\\u3002\");\n      });\n    },\n    addSetting: function addSetting() {\n      var json = {};\n      json.condition = [{\n        op: \"==\"\n      }];\n\n      if (!this.field.dialogAlarmSetting) {\n        this.$set(this.field, 'dialogAlarmSetting', []);\n      }\n\n      this.field.dialogAlarmSetting.push(json);\n    },\n    arrayMove: function arrayMove(group, item, direct) {\n      this[group] = utils.arrayMove(this[group], item, direct);\n    },\n    removeAlarmSettingOne: function removeAlarmSettingOne(row, index) {\n      row.condition.splice(index, 1);\n    }\n  },\n  created: function created() {\n    this.$validator = this.$root.$validator;\n  }\n};",null]}