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

/***/ "394f":
/***/ (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/appConfig/AppNavigationBarConfig.vue?vue&type=template&id=082d3199
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-checkbox',{on:{"change":_vm.setGlobalConfig},model:{value:(_vm.form.useGlobal),callback:function ($$v) {_vm.$set(_vm.form, "useGlobal", $$v)},expression:"form.useGlobal"}})],1),_c('el-form-item',{attrs:{"label":"栏目个数"}},[_c('el-select',{attrs:{"disabled":_vm.form.useGlobal},model:{value:(_vm.columnNum),callback:function ($$v) {_vm.columnNum=$$v},expression:"columnNum"}},_vm._l((9),function(item){return _c('el-option',{key:item,attrs:{"label":item,"value":item}})}),1)],1),_vm._l((_vm.form.columnIds),function(item,index){return _c('el-form-item',{key:("id" + index),attrs:{"label":("栏目" + (index + 1))}},[_c('el-select',{attrs:{"disabled":_vm.form.useGlobal},on:{"change":_vm.selectChange},model:{value:(_vm.form.columnIds[index]),callback:function ($$v) {_vm.$set(_vm.form.columnIds, index, $$v)},expression:"form.columnIds[index]"}},_vm._l((_vm.getColumnFilterData(_vm.form.columnIds[index])),function(column){return _c('el-option',{key:column.id,attrs:{"label":column.name,"value":column.id}})}),1)],1)}),_c('layoutConfig',{attrs:{"config":_vm.config,"layoutWidth":_vm.layoutWidth,"layout":_vm.layout},on:{"layoutChange":_vm.layoutChange}})],2)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/portal-management/components/appConfig/AppNavigationBarConfig.vue?vue&type=template&id=082d3199

// 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.concat.js
var es_array_concat = __webpack_require__("99af");

// 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.array.find.js
var es_array_find = __webpack_require__("7db0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
var es_array_includes = __webpack_require__("caad");

// 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.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
var es_string_includes = __webpack_require__("2532");

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

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

// 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/appConfig/AppNavigationBarConfig.vue?vue&type=script&lang=js










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



var columnApi = new workbench_std_umd["ColumApi"]();
var workbenchSettingApi = new workbench_std_umd["WorkbenchSettingApi"]();
/* harmony default export */ var AppNavigationBarConfigvue_type_script_lang_js = ({
  props: ['configData', 'mode', 'layoutData', 'layoutWidth', 'layout'],
  components: {
    layoutConfig: LayoutConfig["a" /* default */]
  },
  data: function data() {
    return {
      columnNum: 1,
      form: {
        columnIds: [],
        useGlobal: false
      },
      columnData: [],
      globalConfig: {
        columnIds: []
      },
      config: {
        w: 10,
        h: 10
      }
    };
  },
  computed: {
    columnFilterData: function columnFilterData() {
      var _this = this;
      return _.filter(this.columnData, function (item) {
        return !_this.form.columnIds.includes(item.id);
      });
    }
  },
  watch: {
    columnNum: {
      immediate: true,
      handler: function handler() {
        this.form.columnIds.length = this.columnNum;
        this.selectChange();
      }
    },
    configData: {
      deep: true,
      immediate: true,
      handler: function handler(val) {
        if (!_.isEmpty(val)) {
          this.form.columnIds = val.columnIds || [];
          this.form.useGlobal = val.useGlobal || false;
          this.columnNum = this.form.columnIds.length || 1;
        }
      }
    },
    layoutData: {
      deep: true,
      immediate: true,
      handler: function handler(val) {
        if (!_.isEmpty(val)) {
          this.config = _.pick(this.layoutData, ['w', 'h', 'component', 'type', 'x', 'y', 'i']);
        }
      }
    }
  },
  methods: {
    getColumnData: function getColumnData() {
      var _this2 = 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:
              _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) {
                _this2.columnData = res;
              }
            case 7:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    getSetting: function getSetting() {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee2() {
        var _yield$workbenchSetti, _yield$workbenchSetti2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return workbenchSettingApi.getWorkbenchSetting({
                code: 'navConfig'
              });
            case 2:
              _yield$workbenchSetti = _context2.sent;
              _yield$workbenchSetti2 = Object(slicedToArray["a" /* default */])(_yield$workbenchSetti, 2);
              err = _yield$workbenchSetti2[0];
              res = _yield$workbenchSetti2[1];
              if (!err && res.config) {
                _this3.globalConfig = JSON.parse(res.config);
              }
            case 7:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    selectChange: function selectChange() {
      this.$emit('configChange', this.form);
    },
    layoutChange: function layoutChange(val) {
      this.config = _.cloneDeep(val);
      this.$emit('layoutChange', val);
    },
    setGlobalConfig: function setGlobalConfig() {
      if (this.form.useGlobal) {
        this.form.columnIds = _.cloneDeep(this.globalConfig.columnIds);
        this.columnNum = this.form.columnIds.length || 1;
      }
      this.selectChange();
    },
    getColumnFilterData: function getColumnFilterData(columnId) {
      var column = _.find(this.columnData, {
        id: columnId
      });
      if (column) {
        return _.concat([column], this.columnFilterData);
      }
      return this.columnFilterData;
    }
  },
  created: function created() {
    this.getColumnData();
    this.getSetting();
  }
});
// CONCATENATED MODULE: ./src/modules/portal-management/components/appConfig/AppNavigationBarConfig.vue?vue&type=script&lang=js
 /* harmony default export */ var appConfig_AppNavigationBarConfigvue_type_script_lang_js = (AppNavigationBarConfigvue_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/appConfig/AppNavigationBarConfig.vue





/* normalize component */

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

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

/***/ }),

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

"use strict";

var $ = __webpack_require__("23e7");
var fails = __webpack_require__("d039");
var isArray = __webpack_require__("e8b5");
var isObject = __webpack_require__("861d");
var toObject = __webpack_require__("7b0b");
var lengthOfArrayLike = __webpack_require__("07fa");
var doesNotExceedSafeInteger = __webpack_require__("3511");
var createProperty = __webpack_require__("8418");
var arraySpeciesCreate = __webpack_require__("65f0");
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var wellKnownSymbol = __webpack_require__("b622");
var V8_VERSION = __webpack_require__("1212");

var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');

// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  var array = [];
  array[IS_CONCAT_SPREADABLE] = false;
  return array.concat()[0] !== array;
});

var isConcatSpreadable = function (O) {
  if (!isObject(O)) return false;
  var spreadable = O[IS_CONCAT_SPREADABLE];
  return spreadable !== undefined ? !!spreadable : isArray(O);
};

var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');

// `Array.prototype.concat` method
// https://tc39.es/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  concat: function concat(arg) {
    var O = toObject(this);
    var A = arraySpeciesCreate(O, 0);
    var n = 0;
    var i, k, length, len, E;
    for (i = -1, length = arguments.length; i < length; i++) {
      E = i === -1 ? O : arguments[i];
      if (isConcatSpreadable(E)) {
        len = lengthOfArrayLike(E);
        doesNotExceedSafeInteger(n + len);
        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
      } else {
        doesNotExceedSafeInteger(n + 1);
        createProperty(A, n++, E);
      }
    }
    A.length = n;
    return A;
  }
});


/***/ }),

/***/ "f4d5":
/***/ (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/appConfig/LayoutConfig.vue?vue&type=template&id=5bc72220
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":375},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),(!_vm.config.isAdaptive)?_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):_vm._e()],1)],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/portal-management/components/appConfig/LayoutConfig.vue?vue&type=template&id=5bc72220

// 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/appConfig/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,
          isAdaptive: false // 是否自适应
        };
      }
    },
    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);
      }
    }
  },
  methods: {
    numChange: function numChange(key, curVal, oldVal) {
      if (!_.isNumber(curVal)) {
        this.$set(this.layoutConfig, key, oldVal);
        this.updateKey = _.random(5000);
        return;
      }
      this.$emit('layoutChange', this.layoutConfig);
    }
  },
  mounted: function mounted() {
    this.layoutConfig = _.cloneDeep(this.config);
  }
});
// CONCATENATED MODULE: ./src/modules/portal-management/components/appConfig/LayoutConfig.vue?vue&type=script&lang=js
 /* harmony default export */ var appConfig_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/appConfig/LayoutConfig.vue





/* normalize component */

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

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

/***/ })

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