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

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

/* (ignored) */

/***/ }),

/***/ "0ad9":
/***/ (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__("1977");
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("9d734808", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

/***/ "108b":
/***/ (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_Client_vue_vue_type_style_index_0_id_79405a02_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0ad9");
/* 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_Client_vue_vue_type_style_index_0_id_79405a02_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_Client_vue_vue_type_style_index_0_id_79405a02_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

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

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


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

// exports


/***/ }),

/***/ "ea36":
/***/ (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/Client.vue?vue&type=template&id=79405a02&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-input',{staticClass:"!w-280px mr-10px",attrs:{"size":"mini","clearable":"","placeholder":"请输入关键字"},model:{value:(_vm.keyWord),callback:function ($$v) {_vm.keyWord=$$v},expression:"keyWord"}}),_c('el-button',{staticClass:"ml-0px mr-10px",attrs:{"size":"small","type":"primary"},on:{"click":function($event){return _vm.searchList()}}},[_vm._v("搜索")]),_c('el-button',{staticClass:"!ml-0px mr-10px",attrs:{"size":"small","type":"primary"},on:{"click":function($event){return _vm.addClient()}}},[_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":"clientId","sortable":""}}),_c('el-table-column',{attrs:{"label":"显示名称","prop":"clientName","sortable":""}}),_c('el-table-column',{attrs:{"label":"是否允许刷新令牌","width":"170px","prop":"allowOfflineAccess","sortable":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n        "+_vm._s(scope.row.allowOfflineAccess ? '是' : '否')+"\n      ")]}}])}),_c('el-table-column',{attrs:{"label":"启用","prop":"enabled","sortable":"","width":"80px"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n        "+_vm._s(scope.row.enabled ? '是' : '否')+"\n      ")]}}])}),_c('el-table-column',{attrs:{"width":"250px","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.editClient(scope.row)}}},[_vm._v("修改")]),_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.editPermission(scope.row)}}},[_vm._v("权限配置")]),_c('el-button',{attrs:{"size":"mini"},on:{"click":function($event){return _vm.deleteClient(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.showOperateClientDialog)?_c('operate-client-dialog',{attrs:{"operateClientProps":_vm.operateClientProps,"clientForm":_vm.clientForm},on:{"refreshList":_vm.findList}}):_vm._e(),(_vm.showPermissionDialog)?_c('operate-permission-dialog',{attrs:{"permissionProps":_vm.permissionProps}}):_vm._e()],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/host/resource-management/views/Client.vue?vue&type=template&id=79405a02&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.map.js
var es_array_map = __webpack_require__("d81d");

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











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


var clientApi = new auth_server_umd["ClientApi"]();
var OperateClientDialog = function OperateClientDialog() {
  return Promise.all(/* import() */[__webpack_require__.e(1), __webpack_require__.e(4)]).then(__webpack_require__.bind(null, "847b"));
};
var operatePermissionDialog = function operatePermissionDialog() {
  return Promise.all(/* import() */[__webpack_require__.e(3), __webpack_require__.e(6)]).then(__webpack_require__.bind(null, "731a"));
};
/* harmony default export */ var Clientvue_type_script_lang_js = ({
  name: 'client',
  components: {
    OperateClientDialog: OperateClientDialog,
    operatePermissionDialog: operatePermissionDialog
  },
  data: function data() {
    return {
      showPermissionDialog: false,
      operateClientProps: {
        visible: true,
        title: '新增客户端',
        editType: 'create'
      },
      permissionProps: {
        visible: true,
        providerKey: '',
        providerName: 'C',
        title: '操作用户权限'
      },
      clientForm: {
        enabled: true,
        clientName: '',
        clientUri: '',
        logoUri: '',
        description: '',
        allowedScopes: ['email', 'openid', 'profile', 'role', 'phone', 'address'],
        // 默认
        allowedGrantTypes: [],
        redirectUris: [],
        postLogoutRedirectUris: [],
        allowOfflineAccess: false,
        identityTokenLifetime: 300,
        // 默认值
        accessTokenLifetime: 3600,
        // 默认值
        authorizationCodeLifetime: 300,
        // 默认值
        absoluteRefreshTokenLifetime: 2592000,
        // 默认值
        slidingRefreshTokenLifetime: 1296000,
        // 默认值
        refreshTokenUsage: 1,
        // 默认值
        refreshTokenExpiration: 1,
        // 默认值
        enableLocalLogin: true,
        // 默认true
        clientId: '',
        clientSecrets: [],
        allowAccessTokensViaBrowser: false,
        requireClientSecret: true,
        requirePkce: true,
        userSsoLifetime: null,
        claims: []
      },
      showOperateClientDialog: false,
      keyWord: '',
      tableData: [],
      page: {
        pageNo: 1,
        pageSize: 15,
        pageTotal: 0
      },
      sort: {
        type: '',
        sortName: 'creationTime'
      }
    };
  },
  computed: {
    tableHeight: function tableHeight() {
      return 'calc(100% - 110px)';
    }
  },
  methods: {
    /**
     * @description: 删除client
     * @param {*}
     * @return {*}
     */
    deleteClient: function deleteClient(id) {
      var _this = this;
      this.$confirm('确认要删除么', '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning'
      }).then( /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee() {
        var _yield$clientApi$call, _yield$clientApi$call2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return clientApi.callDelete(id);
            case 2:
              _yield$clientApi$call = _context.sent;
              _yield$clientApi$call2 = Object(slicedToArray["a" /* default */])(_yield$clientApi$call, 2);
              err = _yield$clientApi$call2[0];
              res = _yield$clientApi$call2[1];
              if (!err) {
                _this.$message.success({
                  showClose: true,
                  message: '删除成功'
                });
                _this.searchList();
              }
            case 7:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))).catch(function () {
        _this.$message({
          showClose: true,
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    /**
     * @description: 修改用户权限
     * @param {*} row
     * @return {*}
     */
    editPermission: function editPermission(row) {
      this.showPermissionDialog = true;
      this.permissionProps = this.$options.data().permissionProps;
      this.$set(this.permissionProps, 'providerKey', row.clientId);
    },
    addClient: function addClient() {
      this.showOperateClientDialog = true;
      this.operateClientProps = this.$options.data().operateClientProps;
      this.clientForm = this.$options.data().clientForm;
    },
    editClient: function editClient(row) {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee2() {
        var _yield$clientApi$get, _yield$clientApi$get2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return clientApi.get(row.id);
            case 2:
              _yield$clientApi$get = _context2.sent;
              _yield$clientApi$get2 = Object(slicedToArray["a" /* default */])(_yield$clientApi$get, 2);
              err = _yield$clientApi$get2[0];
              res = _yield$clientApi$get2[1];
              if (!err) {
                _this2.clientForm = res;
                _this2.clientForm.redirectUris = _.map(res.redirectUris, function (item) {
                  return {
                    url: item
                  };
                });
                _this2.clientForm.postLogoutRedirectUris = _.map(res.postLogoutRedirectUris, function (item) {
                  return {
                    url: item
                  };
                });
              }
              _this2.showOperateClientDialog = true;
              _this2.operateClientProps = _this2.$options.data().operateClientProps;
              _this2.operateClientProps.editType = 'edit';
              _this2.operateClientProps.title = '编辑客户端';
            case 11:
            case "end":
              return _context2.stop();
          }
        }, _callee2);
      }))();
    },
    sortChangeTable: function sortChangeTable(sortColumn) {
      if (_.isNil(sortColumn.column)) {
        return;
      }
      this.sort.type = sortColumn.order === 'ascending' ? 0 : 1;
      this.sort.sortName = sortColumn.prop;
      this.findList();
    },
    searchList: function searchList() {
      this.page.pageNo = 1;
      this.findList();
    },
    findList: function findList() {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee3() {
        var _yield$clientApi$getL, _yield$clientApi$getL2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              _context3.next = 2;
              return clientApi.getList({
                filter: _this3.keyWord,
                skipCount: (_this3.page.pageNo - 1) * _this3.page.pageSize,
                maxResultCount: _this3.page.pageSize,
                sorting: "".concat(_this3.sort.sortName, " ").concat(_this3.sort.type === 0 ? 'asc' : 'desc')
              });
            case 2:
              _yield$clientApi$getL = _context3.sent;
              _yield$clientApi$getL2 = Object(slicedToArray["a" /* default */])(_yield$clientApi$getL, 2);
              err = _yield$clientApi$getL2[0];
              res = _yield$clientApi$getL2[1];
              if (!err) {
                _this3.tableData = res.items;
                _this3.page.pageTotal = res.totalCount;
              }
            case 7:
            case "end":
              return _context3.stop();
          }
        }, _callee3);
      }))();
    }
  },
  created: function created() {
    var _this4 = this;
    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:
            _this4.searchList();
          case 1:
          case "end":
            return _context4.stop();
        }
      }, _callee4);
    }))();
  },
  activated: function activated() {
    var _this5 = this;
    this.$nextTick(function () {
      _this5.$refs.eltable.doLayout();
    });
  }
});
// CONCATENATED MODULE: ./src/modules/host/resource-management/views/Client.vue?vue&type=script&lang=js
 /* harmony default export */ var views_Clientvue_type_script_lang_js = (Clientvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/modules/host/resource-management/views/Client.vue?vue&type=style&index=0&id=79405a02&prod&scoped=true&lang=scss
var Clientvue_type_style_index_0_id_79405a02_prod_scoped_true_lang_scss = __webpack_require__("108b");

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

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






/* normalize component */

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

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

/***/ })

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