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

/***/ "0357":
/***/ (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__("eb4e");
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("32cede30", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

/***/ "3f22":
/***/ (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_uploadCom_vue_vue_type_style_index_0_id_9a9cf9ec_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("0357");
/* 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_uploadCom_vue_vue_type_style_index_0_id_9a9cf9ec_prod_lang_scss_scoped_true__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_uploadCom_vue_vue_type_style_index_0_id_9a9cf9ec_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "8be1":
/***/ (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/violation/BasicInfoCom.vue?vue&type=template&id=6bbb5144&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('el-row',[(_vm.$parent.$options.name !== 'ElDialog')?_c('div',{staticClass:"mb-10px"},[(_vm.operateType !== 'read' && _vm.operateType !== 'action')?_c('span',{staticClass:"border-l-3 border-color-primary pl-10px text-18px"},[_vm._v(_vm._s(_vm.$t('基本信息')))]):_c('el-page-header',{attrs:{"content":_vm.$t('基本信息')},on:{"back":function($event){return _vm.$emit('back')}}})],1):_vm._e(),_c('el-form',{ref:"formRef",attrs:{"model":_vm.formData,"label-width":"150px","disabled":_vm.isAllDisAbled,"rules":_vm.formRules}},[_c('el-row',[_c('el-col',{attrs:{"span":24}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('违章描述'))),"prop":"description"}},[_c('el-autocomplete',{staticStyle:{"width":"100%"},attrs:{"disabled":_vm.IsDisable('description'),"fetch-suggestions":_vm.querySearch,"placeholder":("" + (_vm.$t('请输入'))),"trigger-on-focus":false,"type":"textarea","maxlength":500,"show-word-limit":"","autosize":{ minRows: 2 }},on:{"select":_vm.handleSelect},scopedSlots:_vm._u([{key:"default",fn:function(ref){
var item = ref.item;
return [_c('div',[_vm._v(_vm._s(item.description))])]}}]),model:{value:(_vm.formData.description),callback:function ($$v) {_vm.$set(_vm.formData, "description", $$v)},expression:"formData.description"}})],1)],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('违章地点'))),"prop":"areaId"}},[_c('el-select',{staticStyle:{"width":"100%"},attrs:{"disabled":_vm.IsDisable('areaId'),"size":"small","clearable":"","filterable":""},model:{value:(_vm.formData.areaId),callback:function ($$v) {_vm.$set(_vm.formData, "areaId", $$v)},expression:"formData.areaId"}},_vm._l((_vm.riskList),function(item,index){return _c('el-option',{key:index,attrs:{"label":item.name,"value":item.id}})}),1)],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('违章时间'))),"prop":"violationTime"}},[_c('el-date-picker',{staticClass:"w-full",staticStyle:{"width":"100%"},attrs:{"disabled":_vm.IsDisable('violationTime'),"size":"small","format":"yyyy-MM-dd HH:mm:ss","type":"datetime","placeholder":"发生时间","clearable":""},model:{value:(_vm.formData.violationTime),callback:function ($$v) {_vm.$set(_vm.formData, "violationTime", $$v)},expression:"formData.violationTime"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('违章类型'))),"prop":"typeId"}},[_c('el-select',{staticStyle:{"width":"100%"},attrs:{"size":"small","placeholder":("" + (_vm.$t('违章类型'))),"disabled":_vm.IsDisable('typeId'),"clearable":"","filterable":""},model:{value:(_vm.formData.typeId),callback:function ($$v) {_vm.$set(_vm.formData, "typeId", $$v)},expression:"formData.typeId"}},_vm._l((_vm.typeList),function(item,index){return _c('el-option',{key:index,attrs:{"label":item.displayName,"value":item.id}})}),1)],1)],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('违章级别'))),"prop":"levelId"}},[_c('el-select',{staticStyle:{"width":"100%"},attrs:{"size":"small","placeholder":("" + (_vm.$t('违章类型'))),"disabled":_vm.IsDisable('levelId'),"clearable":"","filterable":""},model:{value:(_vm.formData.levelId),callback:function ($$v) {_vm.$set(_vm.formData, "levelId", $$v)},expression:"formData.levelId"}},_vm._l((_vm.levelList),function(item,index){return _c('el-option',{key:index,attrs:{"label":item.displayName,"value":item.id}})}),1)],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('违章单位'))),"prop":"orgId"}},[_c('el-select',{staticStyle:{"width":"100%"},attrs:{"size":"small","disabled":_vm.IsDisable('orgId'),"placeholder":"请选择","clearable":"","filterable":""},model:{value:(_vm.formData.orgId),callback:function ($$v) {_vm.$set(_vm.formData, "orgId", $$v)},expression:"formData.orgId"}},_vm._l((_vm.departmentList),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.displayName,"value":item.id}})}),1)],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('违章人员'))),"prop":"violators"}},[_c('div',{staticClass:"flex"},[_c('el-input',{staticStyle:{"flex":"1"},attrs:{"size":"small","disabled":_vm.IsDisable('violators'),"readonly":"","placeholder":"请选择"},model:{value:(_vm.formData.violators),callback:function ($$v) {_vm.$set(_vm.formData, "violators", $$v)},expression:"formData.violators"}},[_c('template',{slot:"append"},[_c('el-button',{attrs:{"disabled":_vm.IsDisable('violators')},on:{"click":function($event){_vm.showSelectDialog = true}}},[_vm._v("选择")])],1)],2)],1)])],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('上报人'))),"prop":"reportPersonName"}},[_c('el-input',{attrs:{"size":"small","disabled":""},model:{value:(_vm.formData.reportPersonName),callback:function ($$v) {_vm.$set(_vm.formData, "reportPersonName", $$v)},expression:"formData.reportPersonName"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('上报单位'))),"prop":"reportPersonOrgId"}},[_c('el-select',{staticStyle:{"width":"100%"},attrs:{"size":"small","disabled":_vm.ownDepartment.length < 2,"placeholder":"请选择","filterable":""},model:{value:(_vm.formData.reportPersonOrgId),callback:function ($$v) {_vm.$set(_vm.formData, "reportPersonOrgId", $$v)},expression:"formData.reportPersonOrgId"}},_vm._l((_vm.ownDepartment),function(item){return _c('el-option',{key:item.orgId,attrs:{"label":item.name,"value":item.orgId}})}),1)],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('上报时间'))),"prop":"reportTime"}},[_c('el-date-picker',{staticClass:"w-full",staticStyle:{"width":"100%"},attrs:{"size":"small","format":"yyyy-MM-dd HH:mm:ss","value-format":"yyyy-MM-dd HH:mm:ss","type":"datetime","disabled":""},model:{value:(_vm.formData.reportTime),callback:function ($$v) {_vm.$set(_vm.formData, "reportTime", $$v)},expression:"formData.reportTime"}})],1)],1),_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('是否关联积分'))),"prop":"associateIntegral","rules":[
            {
              required: true,
              message: "请选择",
              trigger: ['change', 'blur'],
            } ]}},[_c('el-switch',{attrs:{"disabled":_vm.IsDisable('description')},on:{"change":_vm.associateIntegralChange},model:{value:(_vm.formData.associateIntegral),callback:function ($$v) {_vm.$set(_vm.formData, "associateIntegral", $$v)},expression:"formData.associateIntegral"}})],1)],1),_c('el-col',{attrs:{"span":8}},[(_vm.formData.associateIntegral)?_c('el-form-item',{attrs:{"label":"分值","prop":"integral","rules":[
            {
              required: true,
              message: "请选择",
              trigger: ['change', 'blur'],
            } ]}},[_c('el-select',{staticClass:"w-full",attrs:{"size":"small","placeholder":"请选择"},model:{value:(_vm.formData.integral),callback:function ($$v) {_vm.$set(_vm.formData, "integral", $$v)},expression:"formData.integral"}},_vm._l((_vm.integralsList),function(item){return _c('el-option',{key:item.code,attrs:{"label":item.displayName,"value":Number(item.code)}})}),1)],1):_vm._e()],1)],1),_c('el-row',[_c('el-col',{attrs:{"span":8}},[_c('el-form-item',{attrs:{"label":("" + (_vm.$t('违章图片'))),"prop":"pictures"}},[_c('uploadCom',{ref:"uploadCom",attrs:{"fileTypeList":_vm.fileTypeList,"fileMaxSize":20,"fileNum":9,"disabled":_vm.IsDisable('pictures')},on:{"update:file":_vm.updateFile}})],1)],1)],1)],1),(_vm.showSelectDialog)?_c('PersonManySelect',{attrs:{"visible":_vm.showSelectDialog,"selectedPersonList":_vm.personList},on:{"update:visible":function($event){_vm.showSelectDialog=$event},"getSelectedList":_vm.getPersonList}}):_vm._e()],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/safety/WizSafetyPage/violation/BasicInfoCom.vue?vue&type=template&id=6bbb5144&scoped=true

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("5530");

// 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.symbol.js
var es_symbol = __webpack_require__("a4d3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js
var es_symbol_description = __webpack_require__("e01a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
var es_array_filter = __webpack_require__("4de4");

// 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.includes.js
var es_array_includes = __webpack_require__("caad");

// 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.function.name.js
var es_function_name = __webpack_require__("b0c0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
var es_iterator_constructor = __webpack_require__("e9f5");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
var es_iterator_filter = __webpack_require__("910d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.find.js
var es_iterator_find = __webpack_require__("f665");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
var es_iterator_for_each = __webpack_require__("7d54");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.map.js
var es_iterator_map = __webpack_require__("ab43");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.reduce.js
var es_iterator_reduce = __webpack_require__("9485");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.stringify.js
var es_json_stringify = __webpack_require__("e9c4");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// 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.includes.js
var es_string_includes = __webpack_require__("2532");

// 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/es.string.sub.js
var es_string_sub = __webpack_require__("4c53");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.json.parse.js
var esnext_json_parse = __webpack_require__("5087e");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
var web_dom_collections_for_each = __webpack_require__("159b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

// EXTERNAL MODULE: ./src/components/safety/WizSafetyPage/safetyFactor/uploadCom.vue + 4 modules
var uploadCom = __webpack_require__("9ec4");

// EXTERNAL MODULE: ./node_modules/@wiz-api/data-category-management/lib/data-category-management.umd.js
var data_category_management_umd = __webpack_require__("2adf");

// EXTERNAL MODULE: ./node_modules/@wiz-api/account/lib/account.umd.js
var account_umd = __webpack_require__("32d0");

// EXTERNAL MODULE: ./node_modules/@wiz-api/personnel-safety-management/lib/personnel-safety-management.umd.js
var personnel_safety_management_umd = __webpack_require__("f10f");

// EXTERNAL MODULE: ./node_modules/@wiz-api/area-management/lib/area-management.umd.js
var area_management_umd = __webpack_require__("aa07");

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

// EXTERNAL MODULE: ./src/components/safety/WizSafetyPage/violation/enums.js
var enums = __webpack_require__("41e2");

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




























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








var violationStandardApi = new personnel_safety_management_umd["ViolationStandardApi"]();
var eafProfileApi = new account_umd["EafProfileApi"]();
var organizationApi = new account_umd["OrganizationApi"]();
var dataCategoryApi = new data_category_management_umd["DataCategoryApi"]();
var areaApi = new area_management_umd["AreaApi"]();
var PersonManySelect = function PersonManySelect() {
  return __webpack_require__.e(/* import() */ 37).then(__webpack_require__.bind(null, "4e04"));
};
/* harmony default export */ var BasicInfoComvue_type_script_lang_js = ({
  name: 'violation-info-command',
  components: {
    uploadCom: uploadCom["a" /* default */],
    PersonManySelect: PersonManySelect
  },
  props: {
    propsKey: {
      type: String,
      default: ''
    },
    operateType: {
      default: '',
      type: String
    },
    operateData: {
      type: Object,
      default: function _default() {
        return {};
      }
    }
  },
  computed: {},
  data: function data() {
    return {
      integralsList: [{
        code: '0.5',
        displayName: '0.5分'
      }, {
        code: '1',
        displayName: '1分'
      }, {
        code: '3',
        displayName: '3分'
      }, {
        code: '6',
        displayName: '6分'
      }, {
        code: '9',
        displayName: '9分'
      }, {
        code: '12',
        displayName: '12分'
      }],
      fileTypeList: ['jpg', 'jpeg', 'png', 'bmp'],
      formData: {
        integral: '',
        associateIntegral: true,
        description: '',
        areaId: undefined,
        areaName: '',
        violationTime: '',
        typeId: '',
        levelId: '',
        orgId: '',
        orgName: '',
        violators: undefined,
        pictures: '',
        reportPersonId: '',
        reportPersonName: '',
        reportPersonOrgId: '',
        reportPersonOrgName: '',
        reportTime: '',
        isSubmit: false
      },
      formRules: {},
      accidentType: [],
      showSelectDialog: false,
      typeList: [],
      levelList: [],
      riskList: [],
      departmentList: [],
      ownDepartment: [],
      isAble: [],
      personList: [],
      restaurants: [],
      isAllDisAbled: false,
      isAllAble: true
    };
  },
  mounted: function mounted() {
    if (this.operateType === 'create') {
      var userInfo = Wiz.AuthHooks.GetUserInfo();
      var data = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.profile) || {};
      this.formData.reportPersonName = data.given_name;
      this.formData.reportPersonId = data.sub;
      this.formData.reportTime = new Date();
      this.formData.violationTime = new Date();
    }
  },
  created: function created() {
    this.initData();
    this.getRegulationType();
    this.getDepartmentList();
    this.getUserInfo();
    this.getRiskData();
    this.getStandardList();
  },
  methods: {
    associateIntegralChange: function associateIntegralChange(val) {
      if (val) {
        this.formData.integral = '';
      }
    },
    // 详情回显
    detailShow: function detailShow(data) {
      var _this = this;
      Object.keys(this.formData).forEach(function (key) {
        _this.formData[key] = data[key];
        if (key === 'violators' && data[key]) {
          _this.getPersonList(JSON.parse(data[key]));
        }
      });
      if (this.formData.integral === 0) {
        this.formData.integral = '';
      }
      this.ownDepartment = [{
        name: data.reportPersonOrgName,
        orgId: data.reportPersonOrgId
      }];
      this.$nextTick(function () {
        var _this$$refs$uploadCom;
        _this.formData.pictures && ((_this$$refs$uploadCom = _this.$refs.uploadCom) === null || _this$$refs$uploadCom === void 0 ? void 0 : _this$$refs$uploadCom.setFile(JSON.parse(_this.formData.pictures)));
      });
    },
    // 是否可编辑
    IsDisable: function IsDisable(prop) {
      if (this.isAllDisAbled) {
        return true;
      }
      if (this.isAllAble) {
        return false;
      }
      return !this.isAble.includes(prop);
    },
    // 违章描述筛选
    handleSelect: function handleSelect(item) {
      this.formData.description = item.description;
      this.formData.typeId = item.typeId;
      this.formData.levelId = item.levelId;
    },
    /**
     * @description 违章标准列表查询
     */
    getStandardList: function getStandardList() {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee() {
        var params, _yield$violationStand, _yield$violationStand2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context) {
          while (1) switch (_context.n) {
            case 0:
              params = {
                maxResultCount: 999,
                skipCount: 0,
                sorting: 'CreationTime DESC'
              };
              _context.n = 1;
              return violationStandardApi.getList({
                body: params
              });
            case 1:
              _yield$violationStand = _context.v;
              _yield$violationStand2 = Object(slicedToArray["a" /* default */])(_yield$violationStand, 2);
              err = _yield$violationStand2[0];
              res = _yield$violationStand2[1];
              if (!err) {
                _context.n = 2;
                break;
              }
              return _context.a(2);
            case 2:
              _this2.restaurants = res.items;
            case 3:
              return _context.a(2);
          }
        }, _callee);
      }))();
    },
    querySearch: function querySearch(queryString, cb) {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2() {
        var restaurants, results;
        return Object(regenerator["a" /* default */])().w(function (_context2) {
          while (1) switch (_context2.n) {
            case 0:
              restaurants = _this3.restaurants;
              results = queryString ? restaurants.filter(function (item) {
                return item.description.indexOf(queryString) >= 0;
              }) : restaurants;
              cb(results);
            case 1:
              return _context2.a(2);
          }
        }, _callee2);
      }))();
    },
    // 文件显示
    updateFile: function updateFile(val) {
      if (val.length) {
        this.formData.pictures = JSON.stringify(val);
      } else {
        this.formData.pictures = '';
      }
    },
    getPersonList: function getPersonList(personList) {
      var _this4 = this;
      this.personList = personList.map(function (item) {
        return {
          name: item.name,
          id: item.id,
          keyId: item.keyId
        };
      });
      this.formData.violators = this.personList.reduce(function (pre, cur, index) {
        pre += cur.name + (index === _this4.personList.length - 1 ? '' : ',');
        return pre;
      }, '');
    },
    initData: function initData() {
      var formRules = {};
      var self = this;
      enums["c" /* violatedBasicInfoProps */][this.propsKey].isMustReq.forEach(function (item) {
        formRules[item] = [{
          required: true,
          message: self.$t('请输入'),
          trigger: ['blur', 'change']
        }];
      });
      this.isAllAble = enums["c" /* violatedBasicInfoProps */][this.propsKey].isAllAble;
      this.isAllDisAbled = enums["c" /* violatedBasicInfoProps */][this.propsKey].isDisAbled;
      this.isAble = enums["c" /* violatedBasicInfoProps */][this.propsKey].isAble;
      this.formRules = formRules;
    },
    // 从数据字典
    getRegulationType: function getRegulationType() {
      var _this5 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee3() {
        var _yield$dataCategoryAp, _yield$dataCategoryAp2, err, res, ViolationType, ViolationLevel;
        return Object(regenerator["a" /* default */])().w(function (_context3) {
          while (1) switch (_context3.n) {
            case 0:
              _context3.n = 1;
              return dataCategoryApi.getListByCodes({
                codes: ['ViolationType', 'ViolationLevel'],
                includeDetails: true
              });
            case 1:
              _yield$dataCategoryAp = _context3.v;
              _yield$dataCategoryAp2 = Object(slicedToArray["a" /* default */])(_yield$dataCategoryAp, 2);
              err = _yield$dataCategoryAp2[0];
              res = _yield$dataCategoryAp2[1];
              if (!err) {
                _context3.n = 2;
                break;
              }
              return _context3.a(2);
            case 2:
              ViolationType = res.find(function (item) {
                return item.code === 'ViolationType';
              });
              _this5.typeList = (ViolationType === null || ViolationType === void 0 ? void 0 : ViolationType.dataItems) || [];
              ViolationLevel = res.find(function (item) {
                return item.code === 'ViolationLevel';
              });
              _this5.levelList = (ViolationLevel === null || ViolationLevel === void 0 ? void 0 : ViolationLevel.dataItems) || [];
            case 3:
              return _context3.a(2);
          }
        }, _callee3);
      }))();
    },
    // 获取风险区域列表列表数据
    getRiskData: function getRiskData() {
      var _this6 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee4() {
        var data, _yield$areaApi$getLis, _yield$areaApi$getLis2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context4) {
          while (1) switch (_context4.n) {
            case 0:
              data = {
                maxResultCount: 999,
                // 每页多少条
                skipCount: 0
              };
              _context4.n = 1;
              return areaApi.getList(data);
            case 1:
              _yield$areaApi$getLis = _context4.v;
              _yield$areaApi$getLis2 = Object(slicedToArray["a" /* default */])(_yield$areaApi$getLis, 2);
              err = _yield$areaApi$getLis2[0];
              res = _yield$areaApi$getLis2[1];
              if (!err) {
                _this6.riskList = res.items;
              }
            case 2:
              return _context4.a(2);
          }
        }, _callee4);
      }))();
    },
    /**
     * @description 部门列表查询
     */
    getDepartmentList: function getDepartmentList() {
      var _this7 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee5() {
        var _yield$organizationAp, _yield$organizationAp2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context5) {
          while (1) switch (_context5.n) {
            case 0:
              _context5.n = 1;
              return organizationApi.getList({
                sorting: '',
                // 排序
                skipCount: 0,
                maxResultCount: 999
              });
            case 1:
              _yield$organizationAp = _context5.v;
              _yield$organizationAp2 = Object(slicedToArray["a" /* default */])(_yield$organizationAp, 2);
              err = _yield$organizationAp2[0];
              res = _yield$organizationAp2[1];
              if (!err) {
                _this7.departmentList = res.items;
              }
            case 2:
              return _context5.a(2);
          }
        }, _callee5);
      }))();
    },
    // 获取当前用户信息
    getUserInfo: function getUserInfo() {
      var _this8 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee6() {
        var _yield$eafProfileApi$, _yield$eafProfileApi$2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context6) {
          while (1) switch (_context6.n) {
            case 0:
              if (!_this8.$route.query.id) {
                _context6.n = 1;
                break;
              }
              return _context6.a(2);
            case 1:
              _context6.n = 2;
              return eafProfileApi.getCurrentUserEafProfile();
            case 2:
              _yield$eafProfileApi$ = _context6.v;
              _yield$eafProfileApi$2 = Object(slicedToArray["a" /* default */])(_yield$eafProfileApi$, 2);
              err = _yield$eafProfileApi$2[0];
              res = _yield$eafProfileApi$2[1];
              if (!err) {
                _this8.ownDepartment = res.organizationUnits || [];
                if (_this8.ownDepartment.length === 1 && _this8.operateType === 'create') {
                  _this8.formData.reportPersonOrgId = res.organizationUnits[0].orgId;
                }
              }
            case 3:
              return _context6.a(2);
          }
        }, _callee6);
      }))();
    },
    changePersonSelect: function changePersonSelect() {},
    submitData: function submitData() {
      var _this9 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee7() {
        var params, areaObj, orgObj, reportPersonOrgObj, timeParams, nullParams;
        return Object(regenerator["a" /* default */])().w(function (_context7) {
          while (1) switch (_context7.n) {
            case 0:
              _context7.n = 1;
              return _this9.$refs.formRef.validate();
            case 1:
              params = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this9.formData), {}, {
                integral: _this9.formData.integral ? _this9.formData.integral : 0
              });
              params.violators = params.violators && JSON.stringify(_this9.personList);
              areaObj = _this9.riskList.find(function (item) {
                return item.id === params.areaId;
              });
              params.areaName = areaObj === null || areaObj === void 0 ? void 0 : areaObj.name;
              orgObj = _this9.departmentList.find(function (item) {
                return item.id === params.orgId;
              });
              params.orgName = orgObj === null || orgObj === void 0 ? void 0 : orgObj.displayName;
              reportPersonOrgObj = _this9.ownDepartment.find(function (item) {
                return item.orgId === params.reportPersonOrgId;
              });
              params.reportPersonOrgName = reportPersonOrgObj === null || reportPersonOrgObj === void 0 ? void 0 : reportPersonOrgObj.name;
              timeParams = ['violationTime', 'reportTime'];
              timeParams.forEach(function (key) {
                if (params[key]) {
                  params[key] = dayjs_min_default()(params[key]).format('YYYY-MM-DD HH:mm:ss');
                } else {
                  params[key] = null;
                }
              });
              nullParams = ['areaId'];
              nullParams.forEach(function (key) {
                if (params[key] === '') {
                  params[key] = null;
                }
              });
              _this9.$emit('finallySub', params);
            case 2:
              return _context7.a(2);
          }
        }, _callee7);
      }))();
    },
    openMenDia: function openMenDia() {
      this.showSelectDialog = true;
    }
  }
});
// CONCATENATED MODULE: ./src/components/safety/WizSafetyPage/violation/BasicInfoCom.vue?vue&type=script&lang=js
 /* harmony default export */ var violation_BasicInfoComvue_type_script_lang_js = (BasicInfoComvue_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/violation/BasicInfoCom.vue





/* normalize component */

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

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

/***/ }),

/***/ "9ec4":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";

// 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/safetyFactor/uploadCom.vue?vue&type=template&id=9a9cf9ec&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(!_vm.disabled)?_c('el-upload',{staticClass:"w-full",attrs:{"drag":"","multiple":"","action":"","accept":_vm.fileTypeShow.accept,"http-request":_vm.uploadFile,"before-upload":_vm.fileBeforeUpload,"limit":_vm.fileNum,"file-list":_vm.fileList,"show-file-list":false,"on-exceed":_vm.handleExceed}},[_c('i',{staticClass:"el-icon-upload"}),_c('div',{staticClass:"el-upload__text"},[_vm._v("将文件拖到此处，或"),_c('em',[_vm._v("点击上传")])]),_c('div',{staticClass:"text-left",attrs:{"slot":"tip"},slot:"tip"},[_vm._v("\n      "+_vm._s(("支持" + (_vm.fileTypeShow.des) + "格式附件" + (_vm.fileMaxSize ? '，附件大小不能超过' + _vm.fileMaxSize + 'M' : '')))+"\n    ")])]):_vm._e(),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.fileIdList.length),expression:"fileIdList.length"}],staticClass:"inline-block"},[_vm._t("content",_vm._l((_vm.fileIdList),function(item,index){return _c('div',{key:index,staticClass:"p-0px hover:bg-slate-100 flex items-center"},[_c('span',{staticClass:"cursor-pointer",on:{"click":function($event){return _vm.onPreview(item)}}},[_vm._v(_vm._s(item.fileName))]),_c('span',{staticClass:"ml-5px cursor-pointer",on:{"click":function($event){return _vm.viewFile(item)}}},[_c('i',{staticClass:"icon-bg-display iconfont"})]),(!_vm.disabled)?_c('span',{staticClass:"ml-5px cursor-pointer",on:{"click":function($event){return _vm.beforeRemove(item)}}},[_c('i',{staticClass:"icon-bg-delete iconfont hover:text-hex-$buttonPrimaryBg hover:shadow"})]):_vm._e()])}))],2),_c('el-image',{directives:[{name:"show",rawName:"v-show",value:(false),expression:"false"}],ref:"elImage",attrs:{"src":_vm.imgContent,"preview-src-list":[_vm.imgContent]}})],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/safety/WizSafetyPage/safetyFactor/uploadCom.vue?vue&type=template&id=9a9cf9ec&scoped=true

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("5530");

// 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/core-js/modules/es.array.filter.js
var es_array_filter = __webpack_require__("4de4");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
var es_array_includes = __webpack_require__("caad");

// 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.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.iterator.constructor.js
var es_iterator_constructor = __webpack_require__("e9f5");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
var es_iterator_filter = __webpack_require__("910d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.reduce.js
var es_iterator_reduce = __webpack_require__("9485");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.constructor.js
var es_number_constructor = __webpack_require__("a9e3");

// 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.object.values.js
var es_object_values = __webpack_require__("07ac");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
var es_string_includes = __webpack_require__("2532");

// 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/core-js/modules/web.url.js
var web_url = __webpack_require__("2b3d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.to-json.js
var web_url_to_json = __webpack_require__("bf19");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js
var web_url_search_params = __webpack_require__("9861");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.delete.js
var web_url_search_params_delete = __webpack_require__("88a7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.has.js
var web_url_search_params_has = __webpack_require__("271a");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js
var web_url_search_params_size = __webpack_require__("5494");

// EXTERNAL MODULE: ./node_modules/@wiz-api/file-management/lib/file-management.umd.js
var file_management_umd = __webpack_require__("3c33");

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

























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


var fileApi = new file_management_umd["FileApi"]();
/* harmony default export */ var uploadComvue_type_script_lang_js = ({
  name: 'upload-accident',
  data: function data() {
    return {
      fileList: [],
      // 上传附件的列表
      fileIdList: [],
      // 上传成功文件的文件id
      fileMap: {},
      // 上传成功文件名与文件id的映射
      imgContent: null
    };
  },
  watch: {
    fileIdList: {
      handler: function handler(newValue) {
        this.$emit('update:file', newValue);
      },
      deep: true
    }
  },
  props: {
    disabled: {
      type: Boolean,
      default: false
    },
    fileNum: {
      type: Number,
      default: 999
    },
    fileTypeList: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    // 文件上传类型限制
    fileMaxSize: {
      type: Number,
      default: 0
    },
    // 文件上传大小限制
    delText: {
      typeof: String,
      default: '此操作将永久删除该文件, 是否继续?'
    }
  },
  computed: {
    fileTypeShow: function fileTypeShow() {
      var _this = this;
      return this.fileTypeList.reduce(function (pre, cur, index) {
        return {
          accept: "".concat(pre.accept, ".").concat(cur).concat(_this.fileTypeList.length === index + 1 ? '' : ','),
          des: "".concat(pre.des).concat(cur).concat(_this.fileTypeList.length === index + 1 ? '' : ',')
        };
      }, {
        accept: '',
        des: ''
      });
    }
  },
  methods: {
    // 文件超出限制钩子
    handleExceed: function handleExceed() {
      this.$message.warning('文件个数超出限制');
    },
    // 复现
    setFile: function setFile(data) {
      this.fileIdList = data;
      this.fileList = data;
    },
    beforeRemove: function beforeRemove(file) {
      var _this2 = this;
      return this.$confirm(this.delText, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        callback: function callback(action) {
          if (action === 'confirm') {
            _this2.fileIdList = _this2.fileIdList.filter(function (i) {
              return i.id !== file.id;
            });
            _this2.fileList = _this2.fileIdList;
            _this2.$emit('delete', file.id);
          }
        }
      });
    },
    onPreview: function onPreview(file) {
      this.downLoadFile(file);
    },
    // 附件，下载
    downLoadFile: function downLoadFile(file) {
      var _this3 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee() {
        var _yield$fileApi$downlo, _yield$fileApi$downlo2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context) {
          while (1) switch (_context.n) {
            case 0:
              _context.n = 1;
              return fileApi.download(file.id, {
                returnType: 'Blob'
              });
            case 1:
              _yield$fileApi$downlo = _context.v;
              _yield$fileApi$downlo2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$downlo, 2);
              err = _yield$fileApi$downlo2[0];
              res = _yield$fileApi$downlo2[1];
              if (!err) {
                _this3.exportFile(res, file.fileName);
              }
            case 2:
              return _context.a(2);
          }
        }, _callee);
      }))();
    },
    // 下载文件
    exportFile: function exportFile(data, name) {
      var blob = new Blob([data], {
        type: 'application/pdf'
      });
      var blobUrl = window.URL.createObjectURL(blob);
      var templink = document.createElement('a');
      templink.style.display = 'none';
      templink.href = blobUrl;
      templink.setAttribute('download', "".concat(name));
      document.body.appendChild(templink);
      templink.click();
      document.body.removeChild(templink);
      window.URL.revokeObjectURL(blobUrl);
      this.$message({
        type: 'success',
        message: '下载成功!'
      });
    },
    // 查看文件
    viewFile: function viewFile(file) {
      var _this4 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2() {
        var _yield$fileApi$downlo3, _yield$fileApi$downlo4, err, res, strList, type, typeMap, imageList, _yield$fileApi$getFil, _yield$fileApi$getFil2, error, result, blob, blobUrl, templink;
        return Object(regenerator["a" /* default */])().w(function (_context2) {
          while (1) switch (_context2.n) {
            case 0:
              _context2.n = 1;
              return fileApi.download(file.id, {
                returnType: 'Blob'
              });
            case 1:
              _yield$fileApi$downlo3 = _context2.v;
              _yield$fileApi$downlo4 = Object(slicedToArray["a" /* default */])(_yield$fileApi$downlo3, 2);
              err = _yield$fileApi$downlo4[0];
              res = _yield$fileApi$downlo4[1];
              strList = file.fileName.split('.');
              type = strList[strList.length - 1].toLowerCase();
              typeMap = {
                pdf: 'application/pdf'
              };
              imageList = ['jpg', 'png', 'jpg', 'jpeg', 'gif', 'psd', 'bmp', 'tiff'];
              if (!(!typeMap[type] && !(imageList.indexOf(type) > -1))) {
                _context2.n = 2;
                break;
              }
              _this4.$message.warning('只支持pdf和图片预览');
              return _context2.a(2);
            case 2:
              if (!(imageList.indexOf(type) > -1)) {
                _context2.n = 4;
                break;
              }
              _context2.n = 3;
              return fileApi.getFileContent(file.id);
            case 3:
              _yield$fileApi$getFil = _context2.v;
              _yield$fileApi$getFil2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$getFil, 2);
              error = _yield$fileApi$getFil2[0];
              result = _yield$fileApi$getFil2[1];
              if (!error) {
                _this4.imgContent = "data:image/jpg;base64,".concat(result.content);
              }
              _this4.$refs.elImage.clickHandler();
              return _context2.a(2);
            case 4:
              if (!err) {
                // this.exportFile(res, file.name)
                blob = new Blob([res], {
                  type: 'application/pdf'
                });
                blobUrl = window.URL.createObjectURL(blob);
                templink = document.createElement('a');
                templink.style.display = 'none';
                templink.href = blobUrl;
                templink.setAttribute('target', '_blank');
                document.body.appendChild(templink);
                templink.click();
                document.body.removeChild(templink);
                window.URL.revokeObjectURL(blobUrl);
              }
            case 5:
              return _context2.a(2);
          }
        }, _callee2);
      }))();
    },
    /**
     * @description 文件上传前回调,返回false停止上传
     */
    fileBeforeUpload: function fileBeforeUpload(file) {
      var fileSize = Number(file.size / (1024 * 1024));
      if (this.fileMaxSize && fileSize > this.fileMaxSize) {
        this.$message.warning("\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7".concat(this.fileMaxSize, "M"));
        return false;
      }
      var fileTypeList = file.name.split('.');
      var fileType = fileTypeList[fileTypeList.length - 1];
      if (this.fileTypeList.length && !this.fileTypeList.includes(fileType)) {
        this.$message.warning('上传文件格式不符合');
        return false;
      }
      return true;
    },
    /**
     * @description 文件上传
     */
    uploadFile: function uploadFile(file) {
      var _this5 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee3() {
        var formData, _yield$fileApi$upload, _yield$fileApi$upload2, err, res;
        return Object(regenerator["a" /* default */])().w(function (_context3) {
          while (1) switch (_context3.n) {
            case 0:
              formData = new FormData();
              formData.append('file', file.file);
              _this5.saveLoading = true;
              _context3.n = 1;
              return fileApi.upload({
                files: [file.file]
              });
            case 1:
              _yield$fileApi$upload = _context3.v;
              _yield$fileApi$upload2 = Object(slicedToArray["a" /* default */])(_yield$fileApi$upload, 2);
              err = _yield$fileApi$upload2[0];
              res = _yield$fileApi$upload2[1];
              _this5.saveLoading = false;
              if (!err) {
                _this5.$message.success(_this5.$t('上传成功'));
                // this.fileList.push(res)
                _this5.fileIdList.push(Object.values(res)[0]);
                _this5.fileMap = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this5.fileMap), res);
              }
            case 2:
              return _context3.a(2);
          }
        }, _callee3);
      }))();
    }
  }
});
// CONCATENATED MODULE: ./src/components/safety/WizSafetyPage/safetyFactor/uploadCom.vue?vue&type=script&lang=js
 /* harmony default export */ var safetyFactor_uploadComvue_type_script_lang_js = (uploadComvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/components/safety/WizSafetyPage/safetyFactor/uploadCom.vue?vue&type=style&index=0&id=9a9cf9ec&prod&lang=scss&scoped=true
var uploadComvue_type_style_index_0_id_9a9cf9ec_prod_lang_scss_scoped_true = __webpack_require__("3f22");

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

// CONCATENATED MODULE: ./src/components/safety/WizSafetyPage/safetyFactor/uploadCom.vue






/* normalize component */

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

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

/***/ }),

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

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


// module
exports.push([module.i, "[data-v-9a9cf9ec] .el-card__body{height:100%}[data-v-9a9cf9ec] .el-tabs{height:calc(100% - 70px)}[data-v-9a9cf9ec] .el-tabs__content{height:calc(100% - 55px);overflow-y:auto}[data-v-9a9cf9ec] .el-tab-pane{height:100%}[data-v-9a9cf9ec] .el-form-item__label{text-align:right}[data-v-9a9cf9ec] .el-upload{width:100%}", ""]);

// exports


/***/ })

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