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

/***/ "a07b":
/***/ (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":"28eb61d9-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/safety/WizSafetyPage/PersonTrainingRecord.vue?vue&type=template&id=3dc9d40e
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-table',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],attrs:{"data":_vm.tableData,"height":"calc(100% - 50px)","border":"","stripe":""}},[_c('el-table-column',{attrs:{"width":"100","type":"index","label":"序号/场次"}}),_c('el-table-column',{attrs:{"prop":"userName","label":"培训人"}}),_c('el-table-column',{attrs:{"prop":"orgUnitName","label":"所属单位"}}),_c('el-table-column',{attrs:{"prop":"name","label":"课程名称"}}),_c('el-table-column',{attrs:{"prop":"trainingTypeName","label":"培训类型"}}),_c('el-table-column',{attrs:{"prop":"singleChoiceQuantity","label":"关联考试计划"}}),_c('el-table-column',{attrs:{"prop":"coursewareTimes","label":"课件包含学时(h)"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(_vm._f("showText")(scope.row.coursewareTimes,'second')))])]}}])}),_c('el-table-column',{attrs:{"prop":"coursewareCredits","label":"课件包含学分"}}),_c('el-table-column',{attrs:{"prop":"statusName","label":"培训状态"}}),_c('el-table-column',{attrs:{"prop":"studyTimeEnd","label":"通过时间"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('span',[_vm._v(_vm._s(_vm._f("showText")(scope.row.studyTimeEnd,'time')))])]}}])})],1),_c('el-pagination',{staticClass:"mt-20px text-right",attrs:{"background":"","current-page":_vm.page.pageNo,"page-sizes":[15, 30, 45, 60, 75, 90],"page-size":_vm.page.pageSize,"layout":"total, sizes, prev, pager, next, jumper","total":_vm.total},on:{"update:currentPage":function($event){return _vm.$set(_vm.page, "pageNo", $event)},"update:current-page":function($event){return _vm.$set(_vm.page, "pageNo", $event)},"size-change":_vm.searchList,"current-change":_vm.findList,"update:pageSize":function($event){return _vm.$set(_vm.page, "pageSize", $event)},"update:page-size":function($event){return _vm.$set(_vm.page, "pageSize", $event)}}})],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/safety/WizSafetyPage/PersonTrainingRecord.vue?vue&type=template&id=3dc9d40e

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/regenerator.js + 1 modules
var regenerator = __webpack_require__("c14f");

// 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/@wiz-api/training-management/lib/training-management.umd.js
var training_management_umd = __webpack_require__("cc0b");

// EXTERNAL MODULE: ./node_modules/dayjs/dayjs.min.js
var dayjs_min = __webpack_require__("5a0c");
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);

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



var _this2 = undefined;

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



var trainingRecordApi = new training_management_umd["TrainingRecordApi"]();
/* harmony default export */ var PersonTrainingRecordvue_type_script_lang_js = ({
  name: 'personTrainingRecord',
  props: {
    userId: {
      type: String,
      default: ''
    }
  },
  methods: {
    searchList: function searchList() {
      this.page.pageNo = 1;
      this.findList();
    },
    findList: function findList() {
      var _this = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee() {
        var _yield$trainingRecord, _yield$trainingRecord2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context) {
          while (1) switch (_context.n) {
            case 0:
              if (_this.userId) {
                _context.n = 1;
                break;
              }
              return _context.a(2);
            case 1:
              _this.loading = true;
              _context.n = 2;
              return trainingRecordApi.getList({
                userId: _this.userId,
                skipCount: (_this.page.pageNo - 1) * _this.page.pageSize,
                maxResultCount: _this.page.pageSize
              });
            case 2:
              _yield$trainingRecord = _context.v;
              _yield$trainingRecord2 = Object(slicedToArray["a" /* default */])(_yield$trainingRecord, 2);
              err = _yield$trainingRecord2[0];
              res = _yield$trainingRecord2[1];
              _this.loading = false;
              if (!err) {
                _this.tableData = res.items;
                _this.total = res.totalCount;
              }
            case 3:
              return _context.a(2);
          }
        }, _callee);
      }))();
    },
    formatSeconds: function formatSeconds(s) {
      var hours = Math.floor(s / 3600);
      hours = hours < 10 ? "0".concat(hours) : hours;
      var minutes = Math.floor(s % 3600 / 60);
      minutes = minutes < 10 ? "0".concat(minutes) : minutes;
      var seconds = s % 60;
      seconds = seconds < 10 ? "0".concat(seconds) : seconds;
      return "".concat(hours, ":").concat(minutes, ":").concat(seconds);
    }
  },
  data: function data() {
    return {
      tableData: [],
      page: {
        pageNo: 1,
        pageSize: 15
      },
      total: 0,
      loading: false
    };
  },
  filters: {
    showText: function showText(val, type) {
      var result = val;
      if (type === 'time' && val) {
        result = dayjs_min_default()(val).format('YYYY-MM-DD HH:mm:ss');
      }
      if (type === 'second' && val) {
        result = _this2.formatSeconds(val);
      }
      return result;
    }
  },
  created: function created() {
    var _this3 = this;
    return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2() {
      return Object(regenerator["a" /* default */])().w(function (_context2) {
        while (1) switch (_context2.n) {
          case 0:
            _this3.findList();
          case 1:
            return _context2.a(2);
        }
      }, _callee2);
    }))();
  }
});
// CONCATENATED MODULE: ./src/components/safety/WizSafetyPage/PersonTrainingRecord.vue?vue&type=script&lang=js
 /* harmony default export */ var WizSafetyPage_PersonTrainingRecordvue_type_script_lang_js = (PersonTrainingRecordvue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/components/safety/WizSafetyPage/PersonTrainingRecord.vue





/* normalize component */

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

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

/***/ })

}]);
//# sourceMappingURL=contractor-management-sm.umd.54.js.map