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

/***/ "bd9b":
/***/ (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/components/portal/Breadcrumb.vue?vue&type=template&id=1766fa14&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"flex items-center text-hex-666 text-12px bread-crumb overflow-hidden"},[_c('span',[_vm._v("您所在的位置：")]),_c('span',{staticClass:"iconfont icon-bg-home text-18px cursor-pointer",on:{"click":function($event){return _vm.jump(null)}}}),_vm._l((_vm.breadcumbList),function(item){return _c('div',{key:item.id},[_c('span',{staticClass:"text-14px"},[_vm._v(">")]),_c('span',{staticClass:"cursor-pointer",on:{"click":function($event){return _vm.jump(item)}}},[_vm._v(_vm._s(item.name))])])})],2)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/portal/Breadcrumb.vue?vue&type=template&id=1766fa14&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.find.js
var es_array_find = __webpack_require__("7db0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
var es_array_push = __webpack_require__("14d9");

// 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.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");

// 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/components/portal/Breadcrumb.vue?vue&type=script&lang=js







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



var columnApi = new workbench_std_umd["ColumApi"]();
/* harmony default export */ var Breadcrumbvue_type_script_lang_js = ({
  props: {
    data: {
      type: Object,
      default: function _default() {
        return {};
      }
    },
    mode: {
      type: String,
      default: ''
    }
  },
  data: function data() {
    return {
      columnData: [],
      breadcumbList: []
    };
  },
  computed: {
    routerBase: function routerBase() {
      if (window.__POWERED_BY_QIANKUN__) {
        return "/".concat(_.get(Wiz, 'globalSettings.globalConfig.routerBase'));
      }
      return '';
    }
  },
  watch: {
    data: {
      deep: true,
      immediate: true,
      handler: function handler(val, oldVal) {
        if (!_.isEmpty(val) && val.dataSource !== (oldVal === null || oldVal === void 0 ? void 0 : oldVal.dataSource)) {
          this.breadcumbList = [];
          this.getBreadcumb(val.dataSource);
        }
      }
    }
  },
  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;
        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, {
                isExistPage: true
              });
            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) {
                _this.columnData = Object(Common["b" /* treeToOneArray */])(res, 'child');
              }
            case 7:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    getBreadcumb: function getBreadcumb(id) {
      var _this2 = this;
      if (this.columnData.length === 0) {
        setTimeout(function () {
          _this2.getBreadcumb(id);
        }, 500);
        return;
      }
      var column = _.find(this.columnData, {
        id: id
      });
      if (column) {
        this.breadcumbList.unshift({
          name: column.name,
          id: column.id,
          existPage: column.existPage
        });
        if (column.parentId) {
          this.getBreadcumb(column.parentId);
        }
      }
    },
    jump: function jump(column) {
      if (this.mode === 'update' || column && !column.existPage) return;
      var query = {};
      if (column !== null && column !== void 0 && column.id) {
        query.columnId = column.id;
      }
      this.$router.push({
        path: "".concat(this.routerBase, "/integration/portal/homepage"),
        query: query
      });
    }
  },
  created: function created() {
    this.getColumnData();
  }
});
// CONCATENATED MODULE: ./src/components/portal/Breadcrumb.vue?vue&type=script&lang=js
 /* harmony default export */ var portal_Breadcrumbvue_type_script_lang_js = (Breadcrumbvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/components/portal/Breadcrumb.vue





/* normalize component */

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

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

/***/ })

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