((typeof self !== 'undefined' ? self : this)["webpackJsonpportal_management_std"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpportal_management_std"] || []).push([[61],{

/***/ "3e77":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"29850416-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/modules/portal-management/components/config/NewsHtmlConfig.vue?vue&type=template&id=9fdcfea6&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-form',{attrs:{"model":_vm.form,"label-width":"95px","disabled":_vm.mode === 'view'}},[_c('el-form-item',{attrs:{"label":"数据来源"}},[_c('el-select',{attrs:{"placeholder":"请选择","filterable":""},on:{"change":_vm.selectChange},model:{value:(_vm.form.dataSource),callback:function ($$v) {_vm.$set(_vm.form, "dataSource", $$v)},expression:"form.dataSource"}},_vm._l((_vm.columnData),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.name,"value":item.id}})}),1)],1),_c('layoutConfig',{attrs:{"config":_vm.config,"layoutWidth":_vm.layoutWidth,"layout":_vm.layout},on:{"layoutChange":_vm.layoutChange}})],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/portal-management/components/config/NewsHtmlConfig.vue?vue&type=template&id=9fdcfea6&scoped=true

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__("c7eb");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules
var slicedToArray = __webpack_require__("3835");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("1da1");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
var es_array_filter = __webpack_require__("4de4");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/@wiz-api/workbench-std/lib/workbench-std.umd.js
var workbench_std_umd = __webpack_require__("78a9");

// EXTERNAL MODULE: ./src/assets/js/Common.js
var Common = __webpack_require__("2b76");

// EXTERNAL MODULE: ./src/modules/portal-management/js/config.js
var config = __webpack_require__("e2d8");

// EXTERNAL MODULE: ./src/modules/portal-management/components/config/LayoutConfig.vue + 4 modules
var LayoutConfig = __webpack_require__("6b6c");

// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib??ref--12-1!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/modules/portal-management/components/config/NewsHtmlConfig.vue?vue&type=script&lang=js





//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//





var columnApi = new workbench_std_umd["ColumApi"]();
/* harmony default export */ var NewsHtmlConfigvue_type_script_lang_js = ({
  props: ['configData', 'layoutData', 'mode', 'layoutWidth', 'layout'],
  components: {
    layoutConfig: LayoutConfig["a" /* default */]
  },
  data: function data() {
    return {
      form: {
        dataSource: '' // 数据来源
      },
      columnName: '',
      config: {
        component: config["h" /* listType */][0].value,
        w: 10,
        h: 10
      },
      columnData: [],
      listType: config["h" /* listType */],
      defaultExpandedKeys: [],
      columnFlattenData: []
    };
  },
  watch: {
    configData: {
      deep: true,
      immediate: true,
      handler: function handler(val) {
        this.form = this.$options.data().form;
        if (!_.isEmpty(val)) {
          _.assign(this.form, val);
        } else {
          this.selectChange();
        }
      }
    },
    layoutData: {
      deep: true,
      immediate: true,
      handler: function handler(val) {
        if (!_.isEmpty(val)) {
          this.config = _.pick(this.layoutData, ['w', 'h', 'type', 'x', 'y', 'i']);
        }
      }
    }
  },
  methods: {
    getColumnData: function getColumnData() {
      var _this = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee() {
        var _yield$columnApi$tree, _yield$columnApi$tree2, err, res, data;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return columnApi.tree(0);
            case 2:
              _yield$columnApi$tree = _context.sent;
              _yield$columnApi$tree2 = Object(slicedToArray["a" /* default */])(_yield$columnApi$tree, 2);
              err = _yield$columnApi$tree2[0];
              res = _yield$columnApi$tree2[1];
              if (!err) {
                data = Object(Common["b" /* treeToOneArray */])(res, 'child');
                _this.columnData = _.filter(data, function (item) {
                  return item.type === _this.config.type;
                });
              }
            case 7:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    selectChange: function selectChange() {
      this.$emit('configChange', this.form);
    },
    layoutChange: function layoutChange(val) {
      this.config = _.cloneDeep(val);
      this.$emit('layoutChange', val);
    }
  },
  created: function created() {
    this.getColumnData();
  }
});
// CONCATENATED MODULE: ./src/modules/portal-management/components/config/NewsHtmlConfig.vue?vue&type=script&lang=js
 /* harmony default export */ var config_NewsHtmlConfigvue_type_script_lang_js = (NewsHtmlConfigvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/modules/portal-management/components/config/NewsHtmlConfig.vue?vue&type=style&index=0&id=9fdcfea6&prod&lang=scss
var NewsHtmlConfigvue_type_style_index_0_id_9fdcfea6_prod_lang_scss = __webpack_require__("c3c3");

// EXTERNAL MODULE: ./src/modules/portal-management/components/config/NewsHtmlConfig.vue?vue&type=style&index=1&id=9fdcfea6&prod&lang=scss&scoped=true
var NewsHtmlConfigvue_type_style_index_1_id_9fdcfea6_prod_lang_scss_scoped_true = __webpack_require__("844f");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/modules/portal-management/components/config/NewsHtmlConfig.vue







/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  config_NewsHtmlConfigvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "9fdcfea6",
  null
  
)

/* harmony default export */ var NewsHtmlConfig = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "6b6c":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"29850416-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/modules/portal-management/components/config/LayoutConfig.vue?vue&type=template&id=3d3f816b
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',{key:_vm.updateKey},[_c('el-col',{attrs:{"span":24}},[_c('el-form-item',{attrs:{"label":"宽度"}},[_c('el-input-number',{staticClass:"w-full",attrs:{"controls":false,"min":10,"max":_vm.layoutWidth - _vm.layoutConfig.x},on:{"change":function (curVal, oldVal) { return _vm.numChange('w', curVal, oldVal); }},model:{value:(_vm.layoutConfig.w),callback:function ($$v) {_vm.$set(_vm.layoutConfig, "w", $$v)},expression:"layoutConfig.w"}})],1),_c('el-form-item',{attrs:{"label":"高度"}},[_c('el-input-number',{staticClass:"w-full",attrs:{"controls":false,"min":10},on:{"change":function (curVal, oldVal) { return _vm.numChange('h', curVal, oldVal); }},model:{value:(_vm.layoutConfig.h),callback:function ($$v) {_vm.$set(_vm.layoutConfig, "h", $$v)},expression:"layoutConfig.h"}})],1),_c('el-form-item',{attrs:{"label":"x"}},[_c('el-input-number',{staticClass:"w-full",attrs:{"controls":false,"min":0,"max":_vm.layoutWidth - _vm.layoutConfig.w},on:{"change":function (curVal, oldVal) { return _vm.numChange('x', curVal, oldVal); }},model:{value:(_vm.layoutConfig.x),callback:function ($$v) {_vm.$set(_vm.layoutConfig, "x", $$v)},expression:"layoutConfig.x"}})],1),_c('el-form-item',{attrs:{"label":"y"}},[_c('el-input-number',{staticClass:"w-full",attrs:{"controls":false,"min":0},on:{"change":function (curVal, oldVal) { return _vm.numChange('y', curVal, oldVal); }},model:{value:(_vm.layoutConfig.y),callback:function ($$v) {_vm.$set(_vm.layoutConfig, "y", $$v)},expression:"layoutConfig.y"}})],1)],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/portal-management/components/config/LayoutConfig.vue?vue&type=template&id=3d3f816b

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find-index.js
var es_array_find_index = __webpack_require__("c740");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
var es_number_constructor = __webpack_require__("a9e3");

// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib??ref--12-1!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/modules/portal-management/components/config/LayoutConfig.vue?vue&type=script&lang=js


//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var LayoutConfigvue_type_script_lang_js = ({
  props: {
    config: {
      type: Object,
      default: function _default() {
        return {
          w: 10,
          h: 10,
          x: 0,
          y: 0
        };
      }
    },
    layoutWidth: {
      type: Number,
      default: window.innerWidth
    },
    layout: {
      type: Array,
      default: function _default() {
        return [];
      }
    }
  },
  data: function data() {
    return {
      layoutConfig: {},
      updateKey: _.random(5000)
    };
  },
  watch: {
    config: {
      deep: true,
      handler: function handler(val) {
        this.layoutConfig = _.cloneDeep(val);
      }
    }
  },
  computed: {
    windowWidth: function windowWidth() {
      return window.innerWidth;
    }
  },
  methods: {
    // 判断拖拽元素是否与布局元素碰撞
    isInRange: function isInRange() {
      var domRange = {
        x: this.layoutConfig.x,
        x1: this.layoutConfig.x + this.layoutConfig.w,
        y: this.layoutConfig.y,
        y1: this.layoutConfig.y + this.layoutConfig.h,
        i: this.layoutConfig.i
      };
      var inRange = _.findIndex(this.layout, function (item) {
        if (item.i === domRange.i) return false;
        var xInRange = domRange.x >= item.x && domRange.x <= item.x + item.w || domRange.x1 >= item.x && domRange.x1 <= item.x + item.w || item.x >= domRange.x && item.x <= domRange.x1 || item.x + item.w >= domRange.x && item.x + item.w <= domRange.x1;
        var yInRange = domRange.y >= item.y && domRange.y <= item.y + item.h || domRange.y1 >= item.y && domRange.y1 <= item.y + item.h || item.y >= domRange.y && item.y <= domRange.y1 || item.y + item.h >= domRange.y && item.y + item.h <= domRange.y1;
        return xInRange && yInRange;
      });
      return inRange > -1;
    },
    numChange: function numChange(key, curVal, oldVal) {
      if (!_.isNumber(curVal)) {
        this.$set(this.layoutConfig, key, oldVal);
        this.updateKey = _.random(5000);
        return;
      }
      var inRange = this.isInRange();
      if (inRange) {
        this.$set(this.layoutConfig, key, oldVal);
        this.updateKey = _.random(5000);
      } else {
        this.$emit('layoutChange', this.layoutConfig);
      }
    }
  },
  mounted: function mounted() {
    this.layoutConfig = _.cloneDeep(this.config);
  }
});
// CONCATENATED MODULE: ./src/modules/portal-management/components/config/LayoutConfig.vue?vue&type=script&lang=js
 /* harmony default export */ var config_LayoutConfigvue_type_script_lang_js = (LayoutConfigvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/modules/portal-management/components/config/LayoutConfig.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  config_LayoutConfigvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var LayoutConfig = __webpack_exports__["a"] = (component.exports);

/***/ }),

/***/ "6c50":
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__("2350")(false);
// imports


// module
exports.push([module.i, ".data-source-select-tree .el-select-dropdown__wrap{max-height:100%}", ""]);

// exports


/***/ }),

/***/ "844f":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewsHtmlConfig_vue_vue_type_style_index_1_id_9fdcfea6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f7bd");
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewsHtmlConfig_vue_vue_type_style_index_1_id_9fdcfea6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewsHtmlConfig_vue_vue_type_style_index_1_id_9fdcfea6_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "8a56":
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__("2350")(false);
// imports


// module
exports.push([module.i, ".data-source-tree[data-v-9fdcfea6]::-webkit-scrollbar{width:6px}.data-source-tree[data-v-9fdcfea6]  .el-tree-node__content{height:36px}", ""]);

// exports


/***/ }),

/***/ "c3c3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewsHtmlConfig_vue_vue_type_style_index_0_id_9fdcfea6_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ff4c");
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewsHtmlConfig_vue_vue_type_style_index_0_id_9fdcfea6_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_NewsHtmlConfig_vue_vue_type_style_index_0_id_9fdcfea6_prod_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "f7bd":
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__("8a56");
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__("499e").default
var update = add("c0e1d91a", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

/***/ "ff4c":
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__("6c50");
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__("499e").default
var update = add("4a91f9b2", content, true, {"sourceMap":false,"shadowMode":false});

/***/ })

}]);
//# sourceMappingURL=portal-management-std.umd.61.js.map