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

/***/ "4ba6":
/***/ (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":"4b1ede54-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/double-prevention-management-sm/views/RiskFourColorChart.vue?vue&type=template&id=39b2c32a&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 relative"},[_c('div',{staticClass:"h-full flex flex-col"},[_c('el-row',{staticClass:"h-[calc(100%-40px)]"},[_c('el-col',{staticClass:"h-full flex justify-center items-center",attrs:{"span":1}},[_c('el-button',{staticClass:"w-26px h-39px p-0",attrs:{"disabled":_vm.currentDataIndex === 0 || _vm._.isEmpty(_vm.currentDataInfo),"size":"mini","type":"primary","icon":"iconfont icon-line-left"},on:{"click":function($event){return _vm.togglePicture('last')}}})],1),_c('el-col',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.pictureLoading && _vm.isHtLoading),expression:"pictureLoading && isHtLoading"}],staticClass:"h-full flex justify-center items-center flex-col",attrs:{"span":22}},[_c('iframe',{ref:"htFrame",staticClass:"h-0px w-full flex-auto",attrs:{"src":"/static/ht/htView.html"},on:{"load":_vm.iframeOnload}}),_c('div',{staticClass:"text-center"},[_vm._v(_vm._s(_vm.currentDataInfo.name))])]),_c('el-col',{staticClass:"h-full flex justify-center items-center",attrs:{"span":1}},[_c('el-button',{staticClass:"w-26px h-39px p-0",attrs:{"disabled":_vm.currentDataIndex === _vm.totalCount - 1 || _vm._.isEmpty(_vm.currentDataInfo),"size":"mini","type":"primary","icon":"iconfont icon-line-right"},on:{"click":function($event){return _vm.togglePicture('next')}}})],1)],1),_c('div',{staticClass:"flex-auto h-0 flex justify-center items-center"},_vm._l((_vm.colorList),function(item,index){return _c('div',{key:index,staticClass:"flex mx-20px"},[_c('div',{staticClass:"mr-8px h-20px w-40px",class:item.color}),_c('span',[_vm._v(_vm._s(item.name))])])}),0)],1)])}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/modules/double-prevention-management-sm/views/RiskFourColorChart.vue?vue&type=template&id=39b2c32a&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/@wiz-api/area-management/lib/area-management.umd.js
var area_management_umd = __webpack_require__("aa07");

// 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/double-prevention-management-sm/views/RiskFourColorChart.vue?vue&type=script&lang=js



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


var areaChartApi = new area_management_umd["AreaChartApi"]();
/* harmony default export */ var RiskFourColorChartvue_type_script_lang_js = ({
  name: 'risk-four-color-chart',
  components: {},
  data: function data() {
    return {
      activeName: 'equipmentList',
      dataList: [],
      colorList: [{
        name: '重大风险',
        color: 'customebg-color-danger'
      }, {
        name: '较大风险',
        color: 'customebg-color-alarm'
      }, {
        name: '一般风险',
        color: 'customebg-color-risk'
      }, {
        name: '低风险',
        color: 'customebg-color-primary'
      }],
      currentDataInfo: {},
      // 当前加载ht数据信息
      isHtLoading: true,
      // ht加载状态，初始为加载中
      currentDataIndex: 0,
      // 当前展示ht数据索引
      totalCount: 0,
      pictureLoading: false
    };
  },
  methods: {
    // 获取当前数据
    getListData: function getListData() {
      var _this = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regeneratorRuntime["a" /* default */])().mark(function _callee() {
        var data, _yield$areaChartApi$g, _yield$areaChartApi$g2, err, res;
        return Object(regeneratorRuntime["a" /* default */])().wrap(function _callee$(_context) {
          while (1) switch (_context.prev = _context.next) {
            case 0:
              _this.pictureLoading = true;
              data = {
                maxResultCount: 999,
                // 每页多少条
                skipCount: 0 // 跳过多少条
              };
              _context.next = 4;
              return areaChartApi.getList(data);
            case 4:
              _yield$areaChartApi$g = _context.sent;
              _yield$areaChartApi$g2 = Object(slicedToArray["a" /* default */])(_yield$areaChartApi$g, 2);
              err = _yield$areaChartApi$g2[0];
              res = _yield$areaChartApi$g2[1];
              if (!err) {
                _this.dataList = res.items;
                _this.totalCount = res.totalCount;
                if (_this.dataList.length) {
                  _this.currentDataInfo = _this.dataList[_this.currentDataIndex];
                  _this.iframeOnload();
                }
              }
            case 9:
            case "end":
              return _context.stop();
          }
        }, _callee);
      }))();
    },
    // ht加载事件
    iframeOnload: function iframeOnload(currentDataInfo, key) {
      // 轮播渲染逻辑
      // if (_.isEmpty(currentDataInfo)) {
      //   return
      // }
      // const $window = this.$refs[key][0].contentWindow
      // $window.init(_.get(currentDataInfo, 'fileUrl'))

      // 无ht数据时，不执行ht渲染
      if (_.isEmpty(this.currentDataInfo)) {
        return;
      }
      this.isHtLoading = false;
      var $window = this.$refs.htFrame.contentWindow;
      if ($window && $window.init) {
        $window.init(_.get(this.currentDataInfo, 'fileUrl'));
      }
    },
    // 图片切换
    togglePicture: function togglePicture() {
      var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'last';
      this.currentDataIndex += type === 'last' ? -1 : 1;
      this.currentDataInfo = this.dataList[this.currentDataIndex];
      this.iframeOnload();
    }
  },
  mounted: function mounted() {
    this.getListData();
  }
});
// CONCATENATED MODULE: ./src/modules/double-prevention-management-sm/views/RiskFourColorChart.vue?vue&type=script&lang=js
 /* harmony default export */ var views_RiskFourColorChartvue_type_script_lang_js = (RiskFourColorChartvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/modules/double-prevention-management-sm/views/RiskFourColorChart.vue?vue&type=style&index=0&id=39b2c32a&prod&scoped=true&lang=scss
var RiskFourColorChartvue_type_style_index_0_id_39b2c32a_prod_scoped_true_lang_scss = __webpack_require__("e54c");

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

// CONCATENATED MODULE: ./src/modules/double-prevention-management-sm/views/RiskFourColorChart.vue






/* normalize component */

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

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

/***/ }),

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

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


// module
exports.push([module.i, "[data-v-39b2c32a] .el-card__body{height:100%}[data-v-39b2c32a] .el-carousel__indicators--horizontal{top:0}.customebg-color-danger[data-v-39b2c32a]{background-color:#ff3a30}.customebg-color-alarm[data-v-39b2c32a]{background-color:#ff9502}.customebg-color-risk[data-v-39b2c32a]{background-color:#f8b200}.customebg-color-primary[data-v-39b2c32a]{background-color:#0082f7}", ""]);

// exports


/***/ }),

/***/ "e54c":
/***/ (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_RiskFourColorChart_vue_vue_type_style_index_0_id_39b2c32a_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("f53f");
/* 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_RiskFourColorChart_vue_vue_type_style_index_0_id_39b2c32a_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_RiskFourColorChart_vue_vue_type_style_index_0_id_39b2c32a_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "f53f":
/***/ (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__("b3f3");
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("73dccba6", content, true, {"sourceMap":false,"shadowMode":false});

/***/ })

}]);
//# sourceMappingURL=double-prevention-management-sm.umd.42.js.map