{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\myLayout\\LayoutConfigPanel.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\myLayout\\LayoutConfigPanel.vue","mtime":1667327529622},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 Draggable from \"vuedraggable\";\nexport default {\n  components: {\n    Draggable: Draggable\n  },\n  props: {\n    data: Object,\n    layoutObj: {\n      type: Object,\n      default: function _default() {\n        return {\n          name: '',\n          memo: ''\n        };\n      }\n    }\n  },\n  data: function data() {\n    return {\n      validator: {\n        type: null,\n        required: null,\n        pattern: null,\n        range: null,\n        length: null\n      }\n    };\n  },\n  computed: {\n    show: function show() {\n      if (this.data && Object.keys(this.data).length > 0) {\n        return true;\n      }\n\n      return false;\n    }\n  },\n  methods: {\n    handleOptionsRemove: function handleOptionsRemove(index) {\n      if (this.data.type === \"grid\") {\n        this.data.columns.splice(index, 1);\n      } else {\n        this.data.options.options.splice(index, 1);\n      }\n    },\n    handleAddOption: function handleAddOption() {\n      if (this.data.options.showLabel) {\n        this.data.options.options.push({\n          value: this.$t(\"fm.config.widget.newOption\"),\n          label: this.$t(\"fm.config.widget.newOption\")\n        });\n      } else {\n        this.data.options.options.push({\n          value: this.$t(\"fm.config.widget.newOption\")\n        });\n      }\n    },\n    handleAddColumn: function handleAddColumn() {\n      this.data.columns.push({\n        span: \"\",\n        list: []\n      });\n    },\n    generateRule: function generateRule() {\n      var _this = this;\n\n      this.data.rules = [];\n      Object.keys(this.validator).forEach(function (key) {\n        if (_this.validator[key]) {\n          _this.data.rules.push(_this.validator[key]);\n        }\n      });\n    },\n    handleSelectMuliple: function handleSelectMuliple(value) {\n      if (value) {\n        if (this.data.options.defaultValue) {\n          this.data.options.defaultValue = [this.data.options.defaultValue];\n        } else {\n          this.data.options.defaultValue = [];\n        }\n      } else {\n        if (this.data.options.defaultValue.length > 0) {\n          this.data.options.defaultValue = this.data.options.defaultValue[0];\n        } else {\n          this.data.options.defaultValue = \"\";\n        }\n      }\n    },\n    validateRequired: function validateRequired(val) {\n      var _this2 = this;\n\n      if (val) {\n        this.validator.required = {\n          required: true,\n          message: \"\".concat(this.data.name).concat(this.$t(\"fm.config.widget.validatorRequired\"))\n        };\n      } else {\n        this.validator.required = null;\n      }\n\n      this.$nextTick(function () {\n        _this2.generateRule();\n      });\n    },\n    validateDataType: function validateDataType(val) {\n      if (!this.show) {\n        return false;\n      }\n\n      if (val) {\n        this.validator.type = {\n          type: val,\n          message: this.data.name + this.$t(\"fm.config.widget.validatorType\")\n        };\n      } else {\n        this.validator.type = null;\n      }\n\n      this.generateRule();\n    },\n    valiatePattern: function valiatePattern(val) {\n      if (!this.show) {\n        return false;\n      }\n\n      if (val) {\n        this.validator.pattern = {\n          pattern: val,\n          message: this.data.name + this.$t(\"fm.config.widget.validatorPattern\")\n        };\n      } else {\n        this.validator.pattern = null;\n      }\n\n      this.generateRule();\n    }\n  },\n  watch: {\n    \"layoutObj.name\": function layoutObjName(newVal, oldVal) {\n      this.$emit(\"update:layoutObj\", this.layoutObj);\n    },\n    \"layoutObj.memo\": function layoutObjMemo(newVal, oldVal) {\n      this.$emit(\"update:layoutObj\", this.layoutObj);\n    },\n    \"data.options.isRange\": function dataOptionsIsRange(val) {\n      if (typeof val !== \"undefined\") {\n        if (val) {\n          this.data.options.defaultValue = null;\n        } else {\n          if (Object.keys(this.data.options).indexOf(\"defaultValue\") >= 0) this.data.options.defaultValue = \"\";\n        }\n      }\n    },\n    \"data.options.required\": function dataOptionsRequired(val) {\n      this.validateRequired(val);\n    },\n    \"data.options.dataType\": function dataOptionsDataType(val) {\n      this.validateDataType(val);\n    },\n    \"data.options.pattern\": function dataOptionsPattern(val) {\n      this.valiatePattern(val);\n    },\n    \"data.name\": function dataName(val) {\n      if (this.data.options) {\n        this.validateRequired(this.data.options.required);\n        this.validateDataType(this.data.options.dataType);\n        this.valiatePattern(this.data.options.pattern);\n      }\n    }\n  }\n};",null]}