/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	// The require scope
/******/ 	var __webpack_require__ = {};
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": function() { return /* binding */ opinion_edit; }
});

;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/opinion-edit/src/main.vue?vue&type=template&id=64204388&
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("div", {
    staticClass: "jdf-opinion-edit"
  }, [_c("el-row", [_c("el-col", {
    attrs: {
      span: 24
    }
  }, [_c("el-input", {
    attrs: {
      type: "textarea",
      placeholder: "请填写意见",
      "show-word-limit": _vm.showWordLimit,
      autosize: _vm.autosize,
      resize: _vm.resize,
      rows: _vm.rows,
      maxlength: _vm.maxLength,
      disabled: _vm.disabled
    },
    model: {
      value: _vm.content,
      callback: function callback($$v) {
        _vm.content = $$v;
      },
      expression: "content"
    }
  })], 1), !_vm.disabled ? _c("el-col", {
    attrs: {
      span: 24
    }
  }, [_c("div", {
    staticClass: "common-opinion-content"
  }, [_c("div", {
    staticClass: "opinion-area"
  }, [!_vm.isEmpty(_vm.commonOpinionList) ? _c("el-select", {
    attrs: {
      placeholder: "请选择常用意见",
      "popper-class": "common-opinion-select",
      size: "medium"
    },
    on: {
      change: _vm.onChange
    },
    model: {
      value: _vm.commonOpinion,
      callback: function callback($$v) {
        _vm.commonOpinion = $$v;
      },
      expression: "commonOpinion"
    }
  }, _vm._l(_vm.commonOpinionList, function (item) {
    return _c("el-option", {
      key: item.id,
      attrs: {
        label: item.opinion,
        value: item.opinion,
        title: item.opinion
      }
    });
  }), 1) : _vm._e()], 1), _c("div", {
    staticClass: "opinion-area"
  }, [_c("el-checkbox", {
    staticClass: "check-is-save",
    model: {
      value: _vm.isSave,
      callback: function callback($$v) {
        _vm.isSave = $$v;
      },
      expression: "isSave"
    }
  }, [_vm._v("将意见设置为常用意见")]), _vm.saveType === 2 && _vm.isSave ? _c("el-button", {
    staticClass: "save-btn",
    attrs: {
      size: "small",
      type: "primary",
      plain: ""
    },
    on: {
      click: _vm.saveOpinion
    }
  }, [_vm._v("\n            保存\n          ")]) : _vm._e()], 1)])]) : _vm._e()], 1)], 1);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/opinion-edit/src/main.vue?vue&type=template&id=64204388&

;// CONCATENATED MODULE: external "lodash/isEmpty"
var isEmpty_namespaceObject = require("lodash/isEmpty");
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/tools/isEmptyStr.js
/*
 * @Author: lirl
 * @Date: 2023-02-26 20:29:26
 * @Description: 判断是否为空字符串
 */
function isEmptyStr_isEmptyStr(str) {
  return str === '' || str === null || str === undefined;
}
;// CONCATENATED MODULE: external "@babel/runtime/helpers/asyncToGenerator"
var asyncToGenerator_namespaceObject = require("@babel/runtime/helpers/asyncToGenerator");
;// CONCATENATED MODULE: external "@babel/runtime/regenerator"
var regenerator_namespaceObject = require("@babel/runtime/regenerator");
;// CONCATENATED MODULE: external "globalthis/implementation"
var implementation_namespaceObject = require("globalthis/implementation");
;// CONCATENATED MODULE: external "element-ui"
var external_element_ui_namespaceObject = require("element-ui");
;// CONCATENATED MODULE: external "lodash/isString"
var isString_namespaceObject = require("lodash/isString");
;// CONCATENATED MODULE: ./src/utils/message.js


/*
 * @Author: lirl
 * @Date: 2020-06-03 15:09:21
 * @LastEditTime: 2023-03-02 14:10:57
 * @Description: 消息提示
 */
// 信息提示框




var TOKEN_CODES = (/* unused pure expression or super */ null && (['B004-000-10', 'B004-000-11', 'B004-000-09']));

/**
 * 消息提示框.
 * @param {String} text 消息提示文字
 * @param {String} type success/warning/info/error,默认为success
 */
var message = function message(text) {
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'success';
  var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2000;
  var showClose = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  var className = type === 'success' ? 'pj-common-message' : 'pj-ui-validate';
  return (0,external_element_ui_namespaceObject.Message)({
    message: text,
    type: type,
    offset: 300,
    dangerouslyUseHTMLString: false,
    duration: duration,
    showClose: showClose,
    customClass: className
  });
};

/**
 * 弹出提示框.
 * @param {String} content 提示内容
 * @param {String} type 提示类型 success / info / warning / error
 * @param {Boolean} center 是否居中显示
 */
var messageAlert = function messageAlert(content) {
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'success';
  var center = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  return MessageBox.alert(content, '提示', {
    confirmButtonText: '确定',
    type: type,
    dangerouslyUseHTMLString: false,
    center: center
  });
};

/**
 * 弹出确认框.
 * @param {String} content 提示内容
 * @param {Function} yes 点击确定按钮的回调
 * @param {Function} cancel 点击取消按钮的回调
 * @returns Promise 调用方式： mmessageConfirm("提示信息", () => {
 *  alert('确定');
 * }, () => {
 *  alert('取消');
 * })
 */
var messageConfirm = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(content, yes, cancel) {
    var title,
      _args = arguments;
    return _regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) switch (_context.prev = _context.next) {
        case 0:
          title = _args.length > 3 && _args[3] !== undefined ? _args[3] : '温馨提示';
          _context.prev = 1;
          _context.next = 4;
          return MessageBox.confirm(content, title, {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            cancelButtonClass: 'fr ml10',
            confirmButtonClass: 'fr',
            type: 'warning',
            lockScroll: false,
            dangerouslyUseHTMLString: false,
            iconClass: 'el-icon-question orange'
          });
        case 4:
          return _context.abrupt("return", yes === null || yes === void 0 ? void 0 : yes());
        case 7:
          _context.prev = 7;
          _context.t0 = _context["catch"](1);
          cancel === null || cancel === void 0 ? void 0 : cancel();
          return _context.abrupt("return", false);
        case 11:
        case "end":
          return _context.stop();
      }
    }, _callee, null, [[1, 7]]);
  }));
  return function messageConfirm(_x, _x2, _x3) {
    return _ref.apply(this, arguments);
  };
}()));
var showErrorMsg = function showErrorMsg(error, customClass) {
  var msg = isString(error) ? error : error === null || error === void 0 ? void 0 : error.message;
  msg && Message({
    message: msg,
    type: 'warning',
    offset: 300,
    dangerouslyUseHTMLString: false,
    duration: 3000,
    showClose: true,
    customClass: customClass
  });
};

/**
 * 弹出接口错误信息
 */
var alertErrorMsg = function alertErrorMsg(error) {
  if (!error) {
    return;
  }
  if (isString(error)) {
    messageAlert(error, 'warning');
    return;
  }
  var ssoPage = sessionStorage.getItem('ssoPage');
  if (TOKEN_CODES.includes(error.code) && ssoPage) {
    window.open(decodeURIComponent(ssoPage), '_self');
  } else {
    var msg = error === null || error === void 0 ? void 0 : error.message;
    msg && messageAlert(msg, 'warning');
  }
};
var showSubmitPrompt = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(msg, wordLimit, isRequired, yesCallback, cancelCallback) {
    var inputWordLimit, _yield$MessageBox$pro, value;
    return _regeneratorRuntime.wrap(function _callee2$(_context2) {
      while (1) switch (_context2.prev = _context2.next) {
        case 0:
          _context2.prev = 0;
          inputWordLimit = wordLimit !== null && wordLimit !== void 0 ? wordLimit : 200;
          _context2.next = 4;
          return MessageBox.prompt(msg, '流程提交', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            cancelButtonClass: 'fr ml10',
            confirmButtonClass: 'fr',
            inputValidator: function inputValidator(v) {
              if (isRequired && isEmptyStr(v)) {
                return '请填写意见';
              }
              if ((v === null || v === void 0 ? void 0 : v.length) > inputWordLimit) {
                return "\u8BF7\u6700\u591A\u8F93\u5165".concat(inputWordLimit, "\u5B57");
              }
              return true;
            },
            inputErrorMessage: '请填写意见',
            closeOnClickModal: false,
            inputType: 'textarea',
            inputPlaceholder: "\u8BF7\u586B\u5199\u610F\u89C1\uFF0C\u6700\u591A".concat(inputWordLimit, "\u5B57")
          });
        case 4:
          _yield$MessageBox$pro = _context2.sent;
          value = _yield$MessageBox$pro.value;
          yesCallback === null || yesCallback === void 0 ? void 0 : yesCallback(value);
          _context2.next = 12;
          break;
        case 9:
          _context2.prev = 9;
          _context2.t0 = _context2["catch"](0);
          cancelCallback === null || cancelCallback === void 0 ? void 0 : cancelCallback();
        case 12:
        case "end":
          return _context2.stop();
      }
    }, _callee2, null, [[0, 9]]);
  }));
  return function showSubmitPrompt(_x4, _x5, _x6, _x7, _x8) {
    return _ref2.apply(this, arguments);
  };
}()));
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/opinion-edit/src/main.vue?vue&type=script&lang=js&



/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'JdfOpinionEdit',
  model: {
    prop: 'value',
    event: 'change'
  },
  props: {
    value: {
      type: String,
      default: ''
    },
    // 是否保存为常用意见
    isSaveCommonOpinion: {
      type: Boolean,
      default: false
    },
    // 已选的常用意见
    selectedCommonOpinion: String,
    // 常用意见数据
    commonOpinionList: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    // 是否显示输入字数统计
    showWordLimit: {
      type: Boolean,
      default: true
    },
    // 是否显示常用意见选择框
    showCommonOpinion: {
      type: Boolean,
      default: false
    },
    // 自适应内容高度
    autosize: {
      type: [Boolean, Object],
      default: false
    },
    // 控制是否能被用户缩放
    resize: String,
    // 输入框行数
    rows: {
      type: Number,
      default: 3
    },
    // 常用意见保存类型 - 1: 勾选后提交时自动保存 2：勾选后显示保存按钮，点击保存按钮保存
    saveType: {
      type: Number,
      default: 1
    },
    // 意见字数限制
    maxLength: {
      type: Number,
      default: 200
    },
    // 是否禁用
    disabled: {
      type: Boolean,
      default: false
    }
  },
  data: function data() {
    return {
      isEmpty: (isEmpty_default())
    };
  },
  computed: {
    content: {
      get: function get() {
        return this.value;
      },
      set: function set(val) {
        this.$emit('change', val);
      }
    },
    // 是否保存常用意见
    isSave: {
      get: function get() {
        return this.isSaveCommonOpinion;
      },
      set: function set(val) {
        this.$emit('update:isSaveCommonOpinion', val);
      }
    },
    // 常用意见
    commonOpinion: {
      get: function get() {
        var _this$selectedCommonO;
        return (_this$selectedCommonO = this.selectedCommonOpinion) !== null && _this$selectedCommonO !== void 0 ? _this$selectedCommonO : '';
      },
      set: function set(val) {
        this.$emit('update:selectedCommonOpinion', val);
      }
    }
  },
  methods: {
    /**
     * 选择常用意见选择
     * 将常用意见text追加到意见框，以逗号分割
     * @param {String} text 常用意见的显示文字
     */
    onChange: function onChange(text) {
      var currContent = this.content.trim();
      if (currContent) {
        this.content = currContent.endsWith('。') ? "".concat(currContent).concat(text) : "".concat(currContent, "\uFF0C").concat(text);
      } else {
        this.content = text;
      }
    },
    // 保存常用意见
    saveOpinion: function saveOpinion() {
      var content = this.content;
      if (isEmptyStr_isEmptyStr(content)) {
        message('请先填写意见', 'warning');
        return;
      }
      this.$emit('save', content);
    }
  }
});
;// CONCATENATED MODULE: ./packages/opinion-edit/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent(
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */,
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options =
    typeof scriptExports === 'function' ? scriptExports.options : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) {
    // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
          injectStyles.call(
            this,
            (options.functional ? this.parent : this).$root.$options.shadowRoot
          )
        }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection(h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}

;// CONCATENATED MODULE: ./packages/opinion-edit/src/main.vue





/* normalize component */
;
var component = normalizeComponent(
  src_mainvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var main = (component.exports);
;// CONCATENATED MODULE: ./packages/opinion-edit/index.js
/*
 * @Author: lirl
 * @Date: 2022-04-21 09:32:15
 * @Description: file content
 */

main.install = function (Vue) {
  Vue.component(main.name, main);
};
/* harmony default export */ var opinion_edit = (main);
module.exports = __webpack_exports__;
/******/ })()
;