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

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

/* (ignored) */

/***/ }),

/***/ "213e":
/***/ (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__("d472");
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("95e141ac", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

/***/ "43f9":
/***/ (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":"3f554254-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/host/resource-management/views/ApiScope.vue?vue&type=template&id=06c833de&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-card',{staticClass:"h-full"},[_c('div',{staticClass:"flex mb-20px"},[_c('el-button',{staticClass:"ml-0px mr-5px",attrs:{"size":"small","type":"primary"},on:{"click":function($event){return _vm.addApiScope()}}},[_vm._v("新增")])],1),_c('el-table',{ref:"eltable",attrs:{"stripe":"","height":_vm.tableHeight,"border":"","data":_vm.tableData},on:{"sort-change":_vm.sortChangeTable}},[_c('el-table-column',{attrs:{"label":"名称","prop":"name","sortable":""}}),_c('el-table-column',{attrs:{"label":"显示名称","prop":"displayName","sortable":""}}),_c('el-table-column',{attrs:{"label":"必须","prop":"required","sortable":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n        "+_vm._s(scope.row.required ? '是' : '否')+"\n      ")]}}])}),_c('el-table-column',{attrs:{"label":"在发现文档中显示","prop":"showInDiscoveryDocument","sortable":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n        "+_vm._s(scope.row.showInDiscoveryDocument ? '是' : '否')+"\n      ")]}}])}),_c('el-table-column',{attrs:{"label":"启用","prop":"enabled","sortable":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n        "+_vm._s(scope.row.enabled ? '是' : '否')+"\n      ")]}}])}),_c('el-table-column',{attrs:{"width":"140","show-overflow-tooltip":"","label":"操作"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.editApi(scope.row)}}},[_vm._v("修改")]),_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.deleteApiScope(scope.row.id)}}},[_vm._v("删除")])]}}])})],1),_c('el-pagination',{staticClass:"float-right mt-20px",attrs:{"background":"","current-page":_vm.page.pageNo,"page-size":_vm.page.pageSize,"total":_vm.page.pageTotal,"layout":"sizes, total, prev, pager, next, jumper","pager-count":5,"page-sizes":[15, 30, 45, 60, 75, 90]},on:{"size-change":function($event){return _vm.searchList()},"current-change":function($event){return _vm.findList()},"update:currentPage":function($event){return _vm.$set(_vm.page, "pageNo", $event)},"update:current-page":function($event){return _vm.$set(_vm.page, "pageNo", $event)},"update:pageSize":function($event){return _vm.$set(_vm.page, "pageSize", $event)},"update:page-size":function($event){return _vm.$set(_vm.page, "pageSize", $event)}}}),(_vm.showApiScopeDialog)?_c('operate-api-scope-dialog',{attrs:{"operateApiScopeProps":_vm.operateApiScopeProps,"apiScopeForm":_vm.apiScopeForm},on:{"refreshList":_vm.findList}}):_vm._e()],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/host/resource-management/views/ApiScope.vue?vue&type=template&id=06c833de&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.concat.js
var es_array_concat = __webpack_require__("99af");

// 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.array.sort.js
var es_array_sort = __webpack_require__("4e82");

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

// EXTERNAL MODULE: ./node_modules/@wiz-api/auth-server/lib/auth-server.umd.js
var auth_server_umd = __webpack_require__("93f7");

// 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/host/resource-management/views/ApiScope.vue?vue&type=script&lang=js










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


var apiScopeApi = new auth_server_umd["ApiScopeApi"]();
var operateApiScopeDialog = function operateApiScopeDialog() {
  return Promise.all(/* import() */[__webpack_require__.e(1), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, "9105"));
};
/* harmony default export */ var ApiScopevue_type_script_lang_js = ({
  name: 'client',
  components: {
    operateApiScopeDialog: operateApiScopeDialog
  },
  data: function data() {
    return {
      showApiScopeDialog: false,
      operateApiScopeProps: {
        title: '新增api范围',
        editType: 'create',
        visible: true
      },
      apiScopeForm: {
        name: '',
        displayName: '',
        description: '',
        userClaims: [],
        enabled: true,
        showInDiscoveryDocument: false,
        emphasize: false,
        required: false
      },
      tableData: [],
      page: {
        pageNo: 1,
        pageSize: 15,
        pageTotal: 0
      },
      sort: {
        type: '',
        sortName: 'creationTime'
      }
    };
  },
  computed: {
    tableHeight: function tableHeight() {
      return 'calc(100% - 110px)';
    }
  },
  methods: {
    sortChangeTable: function sortChangeTable(sortColumn) {
      if (_.isNil(sortColumn.column)) {
        return;
      }
      this.sort.type = sortColumn.order === 'ascending' ? 0 : 1;
      this.sort.sortName = sortColumn.prop;
      this.findList();
    },
    addApiScope: function addApiScope() {
      this.showApiScopeDialog = true;
      this.operateApiScopeProps = this.$options.data().operateApiScopeProps;
      this.apiScopeForm = this.$options.data().apiScopeForm;
    },
    searchList: function searchList() {
      this.page.pageNo = 1;
      this.findList();
    },
    editApi: function editApi(row) {
      var _this = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee() {
        var _yield$apiScopeApi$ge, _yield$apiScopeApi$ge2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return apiScopeApi.get(row.id);
            case 2:
              _yield$apiScopeApi$ge = _context.sent;
              _yield$apiScopeApi$ge2 = Object(slicedToArray["a" /* default */])(_yield$apiScopeApi$ge, 2);
              err = _yield$apiScopeApi$ge2[0];
              res = _yield$apiScopeApi$ge2[1];
              if (!err) {
                _this.apiScopeForm = res;
              }
              _this.showApiScopeDialog = true;
              _this.operateApiScopeProps = _this.$options.data().operateApiScopeProps;
              _this.operateApiScopeProps.editType = 'edit';
              _this.operateApiScopeProps.title = '编辑api范围';
            case 11:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    findList: function findList() {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee2() {
        var _yield$apiScopeApi$ge3, _yield$apiScopeApi$ge4, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return apiScopeApi.getList({
                skipCount: (_this2.page.pageNo - 1) * _this2.page.pageSize,
                maxResultCount: _this2.page.pageSize,
                sorting: "".concat(_this2.sort.sortName, " ").concat(_this2.sort.type === 0 ? 'asc' : 'desc')
              });
            case 2:
              _yield$apiScopeApi$ge3 = _context2.sent;
              _yield$apiScopeApi$ge4 = Object(slicedToArray["a" /* default */])(_yield$apiScopeApi$ge3, 2);
              err = _yield$apiScopeApi$ge4[0];
              res = _yield$apiScopeApi$ge4[1];
              if (!err) {
                _this2.tableData = res.items;
                _this2.page.pageTotal = res.totalCount;
              }
            case 7:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    /**
     * @description: 删除api范围
     * @param {*}
     * @return {*}
     */
    deleteApiScope: function deleteApiScope(id) {
      var _this3 = this;
      this.$confirm('确认要删除么', '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning'
      }).then( /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee3() {
        var _yield$apiScopeApi$ca, _yield$apiScopeApi$ca2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              _context3.next = 2;
              return apiScopeApi.callDelete(id);
            case 2:
              _yield$apiScopeApi$ca = _context3.sent;
              _yield$apiScopeApi$ca2 = Object(slicedToArray["a" /* default */])(_yield$apiScopeApi$ca, 2);
              err = _yield$apiScopeApi$ca2[0];
              res = _yield$apiScopeApi$ca2[1];
              if (!err) {
                _this3.$message.success({
                  showClose: true,
                  message: '删除成功'
                });
                _this3.searchList();
              }
            case 7:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      }))).catch(function () {
        _this3.$message({
          type: 'info',
          showClose: true,
          message: '已取消删除'
        });
      });
    }
  },
  created: function created() {
    this.searchList();
  },
  activated: function activated() {
    var _this4 = this;
    this.$nextTick(function () {
      _this4.$refs.eltable.doLayout();
    });
  }
});
// CONCATENATED MODULE: ./src/modules/host/resource-management/views/ApiScope.vue?vue&type=script&lang=js
 /* harmony default export */ var views_ApiScopevue_type_script_lang_js = (ApiScopevue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/modules/host/resource-management/views/ApiScope.vue?vue&type=style&index=0&id=06c833de&prod&scoped=true&lang=scss
var ApiScopevue_type_style_index_0_id_06c833de_prod_scoped_true_lang_scss = __webpack_require__("78e6");

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

// CONCATENATED MODULE: ./src/modules/host/resource-management/views/ApiScope.vue






/* normalize component */

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

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

/***/ }),

/***/ "78e6":
/***/ (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_ApiScope_vue_vue_type_style_index_0_id_06c833de_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("213e");
/* 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_ApiScope_vue_vue_type_style_index_0_id_06c833de_prod_scoped_true_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_ApiScope_vue_vue_type_style_index_0_id_06c833de_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

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

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


// module
exports.push([module.i, "[data-v-06c833de] .el-card__body{height:100%}", ""]);

// exports


/***/ })

}]);
//# sourceMappingURL=resource-management.umd.8.js.map