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

/***/ 0:
/***/ (function(module, exports) {

/* (ignored) */

/***/ }),

/***/ "2c28":
/***/ (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_Homepage_vue_vue_type_style_index_0_id_1b821b6f_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("83ad");
/* 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_Homepage_vue_vue_type_style_index_0_id_1b821b6f_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_Homepage_vue_vue_type_style_index_0_id_1b821b6f_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "4721":
/***/ (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":"628455f4-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-homepage/views/Homepage.vue?vue&type=template&id=1b821b6f&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"home-page"},[(_vm.layout.length)?_c('grid-layout',{ref:"gridlayout",staticStyle:{"touch-action":"none"},attrs:{"layout":_vm.layout,"col-num":_vm.defaultParams.colNum,"row-height":_vm.defaultParams.rowHeight,"is-draggable":_vm.defaultParams.isDraggable,"is-resizable":_vm.defaultParams.isResizable,"vertical-compact":false,"margin":_vm.defaultParams.margin,"use-css-transforms":true,"preventCollision":true},on:{"update:layout":function($event){_vm.layout=$event}}},_vm._l((_vm.layout),function(item,index){return _c('grid-item',{key:index,class:{
        'z-10': item.component === 'BayWindow' || item.component === 'NavigationBar',
      },attrs:{"x":item.x,"y":item.y,"w":item.w,"h":item.h,"i":item.i}},[_c('div',{staticClass:"grid-item h-full"},[_c(item.component,{tag:"component",attrs:{"data":item.data,"mode":"view"}})],1)])}),1):_vm._e()],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/portal-homepage/views/Homepage.vue?vue&type=template&id=1b821b6f&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/@babel/runtime/helpers/esm/objectSpread2.js + 3 modules
var objectSpread2 = __webpack_require__("5530");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
var es_function_name = __webpack_require__("b0c0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
var es_regexp_exec = __webpack_require__("ac1f");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
var es_string_replace = __webpack_require__("5319");

// EXTERNAL MODULE: ./node_modules/vue-grid-layout/dist/vue-grid-layout.common.js
var vue_grid_layout_common = __webpack_require__("7be8");
var vue_grid_layout_common_default = /*#__PURE__*/__webpack_require__.n(vue_grid_layout_common);

// EXTERNAL MODULE: ./node_modules/@wiz-api/workbench/lib/workbench.umd.js
var workbench_umd = __webpack_require__("c7fe");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("e260");

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

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
var es_promise = __webpack_require__("e6cf");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
var es_string_iterator = __webpack_require__("3ca3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

// CONCATENATED MODULE: ./src/modules/portal-homepage/js/exportComponents.js





/* harmony default export */ var exportComponents = ({
  NavigationBar: function NavigationBar() {
    return __webpack_require__.e(/* import() */ 40).then(__webpack_require__.bind(null, "0aea"));
  },
  NewsOne: function NewsOne() {
    return __webpack_require__.e(/* import() */ 22).then(__webpack_require__.bind(null, "113e"));
  },
  NewsTwo: function NewsTwo() {
    return __webpack_require__.e(/* import() */ 23).then(__webpack_require__.bind(null, "5c06"));
  },
  NewsThree: function NewsThree() {
    return __webpack_require__.e(/* import() */ 34).then(__webpack_require__.bind(null, "6978"));
  },
  NewsFour: function NewsFour() {
    return __webpack_require__.e(/* import() */ 21).then(__webpack_require__.bind(null, "4387"));
  },
  BayWindow: function BayWindow() {
    return __webpack_require__.e(/* import() */ 45).then(__webpack_require__.bind(null, "e7a4"));
  },
  URLHref: function URLHref() {
    return __webpack_require__.e(/* import() */ 26).then(__webpack_require__.bind(null, "7cba"));
  },
  URLIframe: function URLIframe() {
    return __webpack_require__.e(/* import() */ 33).then(__webpack_require__.bind(null, "a647"));
  },
  HorizontalImageWall: function HorizontalImageWall() {
    return __webpack_require__.e(/* import() */ 37).then(__webpack_require__.bind(null, "75bc"));
  },
  VerticalImageWall: function VerticalImageWall() {
    return __webpack_require__.e(/* import() */ 39).then(__webpack_require__.bind(null, "d8c7"));
  },
  Carousel: function Carousel() {
    return __webpack_require__.e(/* import() */ 36).then(__webpack_require__.bind(null, "dd82"));
  },
  ImageNews: function ImageNews() {
    return __webpack_require__.e(/* import() */ 31).then(__webpack_require__.bind(null, "03e5"));
  },
  ImageNewsTwo: function ImageNewsTwo() {
    return __webpack_require__.e(/* import() */ 32).then(__webpack_require__.bind(null, "f80d"));
  },
  NewsVideo: function NewsVideo() {
    return __webpack_require__.e(/* import() */ 27).then(__webpack_require__.bind(null, "cf95"));
  },
  BannerLong: function BannerLong() {
    return __webpack_require__.e(/* import() */ 44).then(__webpack_require__.bind(null, "a304"));
  },
  NewsVideoTwo: function NewsVideoTwo() {
    return __webpack_require__.e(/* import() */ 28).then(__webpack_require__.bind(null, "daa9"));
  },
  NewsHtml: function NewsHtml() {
    return Promise.all(/* import() */[__webpack_require__.e(35), __webpack_require__.e(38)]).then(__webpack_require__.bind(null, "6958"));
  },
  Breadcrumb: function Breadcrumb() {
    return Promise.all(/* import() */[__webpack_require__.e(4), __webpack_require__.e(30)]).then(__webpack_require__.bind(null, "bd9b"));
  }
});
// 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-homepage/views/Homepage.vue?vue&type=script&lang=js










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




var columnApi = new workbench_umd["ColumApi"]();
var columnPageApi = new workbench_umd["ColumnPageApi"]();
/* harmony default export */ var Homepagevue_type_script_lang_js = ({
  name: 'homepage',
  components: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, exportComponents), {}, {
    GridLayout: vue_grid_layout_common_default.a.GridLayout,
    GridItem: vue_grid_layout_common_default.a.GridItem
  }),
  data: function data() {
    return {
      defaultParams: {
        rowHeight: 1,
        colNum: window.innerWidth,
        isDraggable: false,
        isResizable: false,
        margin: [0, 0]
      },
      // layout配置
      layout: [],
      layoutConifg: {}
    };
  },
  computed: {
    columnId: function columnId() {
      return this.$route.query.columnId;
    },
    routerBase: function routerBase() {
      if (window.__POWERED_BY_QIANKUN__) {
        return "/".concat(_.get(Wiz, 'globalSettings.globalConfig.routerBase'));
      }
      return '';
    }
  },
  watch: {
    columnId: {
      immediate: true,
      handler: function handler(val) {
        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;
          return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
            while (1) switch (_context.prev = _context.next) {
              case 0:
                if (_this.columnId) {
                  _context.next = 9;
                  break;
                }
                _context.next = 3;
                return columnApi.tree(0);
              case 3:
                _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 && res.length) {
                  _this.$router.replace({
                    path: "".concat(_this.routerBase, "/portal/homepage"),
                    query: {
                      columnId: res[0].id
                    }
                  });
                }
                return _context.abrupt("return");
              case 9:
                if (val) {
                  _this.getLayoutConfig();
                  _this.getColumnDetail();
                }
              case 10:
              case "end":
                return _context.stop();
            }
          }, _callee);
        }))();
      }
    }
  },
  methods: {
    getLayoutConfig: function getLayoutConfig() {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee2() {
        var _yield$columnPageApi$, _yield$columnPageApi$2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _this2.layout = [];
              _this2.defaultLayout = [];
              _context2.next = 4;
              return columnPageApi.getColumnPage(1, 1, {
                columnId: _this2.columnId,
                isActive: true,
                type: 0
              });
            case 4:
              _yield$columnPageApi$ = _context2.sent;
              _yield$columnPageApi$2 = Object(slicedToArray["a" /* default */])(_yield$columnPageApi$, 2);
              err = _yield$columnPageApi$2[0];
              res = _yield$columnPageApi$2[1];
              if (!err && res.items.length && res.items[0].pageDesign) {
                _this2.defaultLayout = res.items[0];
                _this2.layout = _this2.getResizeLayout();
              }
            case 9:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    getResizeLayout: function getResizeLayout() {
      var _this3 = this;
      if (_.isEmpty(this.defaultLayout)) return [];
      return _.map(JSON.parse(this.defaultLayout.pageDesign), function (item) {
        if (_this3.defaultLayout.windowWidth > window.innerWidth) {
          item.x = _.ceil(item.x - (_this3.defaultLayout.windowWidth - window.innerWidth) / 2);
        } else {
          item.x = _.ceil((window.innerWidth - _this3.defaultLayout.windowWidth) / 2 + item.x);
        }
        return item;
      });
    },
    getColumnDetail: function getColumnDetail() {
      var _this4 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee3() {
        var _yield$columnApi$getC, _yield$columnApi$getC2, err, res, config;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              _context3.next = 2;
              return columnApi.getColumnDetail(_this4.columnId);
            case 2:
              _yield$columnApi$getC = _context3.sent;
              _yield$columnApi$getC2 = Object(slicedToArray["a" /* default */])(_yield$columnApi$getC, 2);
              err = _yield$columnApi$getC2[0];
              res = _yield$columnApi$getC2[1];
              if (!err) {
                config = Wiz.globalSettings.dynamicModules.modules['portal-homepage-nanhai'].config;
                document.title = "".concat(res.name, " - ").concat(config.title);
              }
            case 7:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      }))();
    }
  },
  created: function created() {
    return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee4() {
      return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee4$(_context4) {
        while (1) switch (_context4.prev = _context4.next) {
          case 0:
          case "end":
            return _context4.stop();
        }
      }, _callee4);
    }))();
  },
  mounted: function mounted() {
    var _this5 = this;
    window.onresize = function () {
      _this5.defaultParams.colNum = window.innerWidth;
      _this5.layout = _this5.getResizeLayout();
    };
  }
});
// CONCATENATED MODULE: ./src/modules/portal-homepage/views/Homepage.vue?vue&type=script&lang=js
 /* harmony default export */ var views_Homepagevue_type_script_lang_js = (Homepagevue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/modules/portal-homepage/views/Homepage.vue?vue&type=style&index=0&id=1b821b6f&prod&lang=scss&scoped=true
var Homepagevue_type_style_index_0_id_1b821b6f_prod_lang_scss_scoped_true = __webpack_require__("2c28");

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

// CONCATENATED MODULE: ./src/modules/portal-homepage/views/Homepage.vue






/* normalize component */

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

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

/***/ }),

/***/ "83ad":
/***/ (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__("9bee");
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("191a9d9e", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

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

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


// module
exports.push([module.i, ".home-page .vue-grid-item[data-v-1b821b6f]{-webkit-transition:none;transition:none}", ""]);

// exports


/***/ })

}]);
//# sourceMappingURL=portal-homepage-nanhai.umd.41.js.map