/******/ (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 */ opinions; }
});

;// 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/opinions/src/main.vue?vue&type=template&id=4c8d9a63&
var render = function render() {
  var _vm = this,
    _c = _vm._self._c,
    _setup = _vm._self._setupProxy;
  return _c("div", {
    staticClass: "jdf-opinions"
  }, [_c("div", {
    staticClass: "opinion-container"
  }, _vm._l(_setup.opinionList, function (item, index) {
    return _c("div", {
      key: index,
      staticClass: "opinion-row"
    }, [_c("div", {
      class: "opinion-label ".concat(item.opinionFieldCode, " ").concat(item.opinionFieldDesc)
    }, [_vm._v("\n        " + _vm._s(item.opinionFieldName) + "\n      ")]), _c("div", {
      class: "opinion-con ".concat(item.opinionFieldCode, " ").concat(item.opinionFieldDesc)
    }, _vm._l(item.formOpinionList, function (opinionItem, opinionIndex) {
      return _c("div", {
        key: opinionIndex,
        staticClass: "opinion-item",
        class: {
          "leader-opinion": !opinionItem.orgCode
        }
      }, [_c("div", {
        staticClass: "opinion-content"
      }, [_vm._v("\n            " + _vm._s(opinionItem.opnContent) + "\n          ")]), _c("div", {
        staticClass: "opinion-sign"
      }, [_c("div", {
        domProps: {
          innerHTML: _vm._s(_setup.getSignText(opinionItem))
        }
      })])]);
    }), 0)]);
  }), 0)]);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/opinions/src/main.vue?vue&type=template&id=4c8d9a63&

;// CONCATENATED MODULE: external "@babel/runtime/helpers/defineProperty"
var defineProperty_namespaceObject = require("@babel/runtime/helpers/defineProperty");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/extends"
var extends_namespaceObject = require("@babel/runtime/helpers/extends");
var extends_default = /*#__PURE__*/__webpack_require__.n(extends_namespaceObject);
;// CONCATENATED MODULE: external "vue"
var external_vue_namespaceObject = require("vue");
;// CONCATENATED MODULE: external "lodash/isEmpty"
var isEmpty_namespaceObject = require("lodash/isEmpty");
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_namespaceObject);
;// CONCATENATED MODULE: external "lodash/map"
var map_namespaceObject = require("lodash/map");
var map_default = /*#__PURE__*/__webpack_require__.n(map_namespaceObject);
;// CONCATENATED MODULE: external "dayjs"
var external_dayjs_namespaceObject = require("dayjs");
var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/day-util.js
/*
 * @Author: lirl
 * @Date: 2020-04-21 10:08:54
 * @LastEditTime: 2022-04-21 09:40:22
 * @Description: 日期转换工具方法
 */


/**
 * 将毫秒值的时间格式化为format格式.
 * @param {Number} millisecond 毫秒
 * @param {String} format 要转换的格式
 */
var formatMillisecondToString = function formatMillisecondToString(millisecond) {
  var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'YYYY-MM-DD HH:mm:ss';
  return millisecond ? external_dayjs_default()(millisecond).format(format) : '';
};

/**
 * 获取当前时间的毫秒值
 */
var getCurrentMillisecond = function getCurrentMillisecond() {
  return dayjs().valueOf();
};

;// CONCATENATED MODULE: external "lodash/slice"
var slice_namespaceObject = require("lodash/slice");
var slice_default = /*#__PURE__*/__webpack_require__.n(slice_namespaceObject);
;// CONCATENATED MODULE: ./src/composables-api/opinion/useOpinionCommon.js

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }




/*
 * @Author: lirl
 * @Date: 2023-04-19 23:21:21
 * @Description: 意见组件公共api
 */
function useOpinionCommon(timeFormatter) {
  // 意见签名
  var defaultOpnFlowNodeSign = {
    nameIsDisplay: 1,
    nameIsHigh: 1,
    orgStartRank: 1,
    orgEndRank: 10,
    orgIsDisplay: 1,
    sortRule: '["name","org","time"]',
    timeIsDisplay: 1,
    timeType: 'YYYY-MM-DD HH:mm:ss',
    useSign: 1
  };

  /**
   * 构建单条意见对象
   * @param {Object} opinion 单条意见对象
   */
  var buildOpinionItem = function buildOpinionItem(opinion) {
    // 意见签名
    var opnFlowNodeSign = opinion.opnFlowNodeSign;
    // 如果该意见是外出授权处理人填写的意见，则用户名显示为A代B，否则显示原本的用户名
    var userName = opinion.outAuthUserName ? "".concat(opinion.userName, "\u4EE3").concat(opinion.outAuthUserName) : opinion.userName;
    return _objectSpread(_objectSpread({}, opinion), {}, {
      userName: userName,
      paths: JSON.parse(opinion.orgPath),
      formatterCreateTime: formatMillisecondToString(opinion.createTime, opnFlowNodeSign !== null && opnFlowNodeSign !== void 0 && opnFlowNodeSign.useSign ? opnFlowNodeSign.timeType : timeFormatter)
    });
  };

  /**
   * 获取签名配置
   * @param {Object} opinionItem 单条意见信息
   */
  var getSignText = function getSignText(opinionItem) {
    var _signConf;
    var signConf = opinionItem.opnFlowNodeSign;
    if (!((_signConf = signConf) !== null && _signConf !== void 0 && _signConf.useSign)) {
      signConf = defaultOpnFlowNodeSign;
    }
    var signTextConf = {
      name: function name(isHigh) {
        return "<span class=\"opinion-sign-text opinion-sign-user ".concat(isHigh ? 'name-high' : '', "\">\n              <span>").concat(opinionItem.userName, "</span>\n            </span>");
      },
      time: function time() {
        return "<span class=\"opinion-sign-text opinion-time-text\"><span>".concat(opinionItem.formatterCreateTime, "</span></span>");
      },
      org: function org(path) {
        return "<span class=\"opinion-sign-text opinion-sign-dept\">\n              <span class=\"left-brackets\">(</span><span class=\"center-path\">".concat(path, "</span><span class=\"right-brackets\">)</span>\n            </span>");
      }
    };
    var sortRule = JSON.parse(signConf.sortRule);
    return map_default()(sortRule, function (v) {
      var show = signConf["".concat(v, "IsDisplay")];
      if (!show) {
        return '';
      }
      if (v === 'org') {
        var path = slice_default()(opinionItem.paths, signConf.orgStartRank, signConf.orgEndRank).join('/');
        return path ? signTextConf.org(path) : '';
      }
      return signTextConf[v](signConf["".concat(v, "IsHigh")]);
    }).join('');
  };
  return {
    buildOpinionItem: buildOpinionItem,
    getSignText: getSignText
  };
}
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/opinions/src/main.vue?vue&type=script&setup=true&lang=js&


function mainvue_type_script_setup_true_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function mainvue_type_script_setup_true_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? mainvue_type_script_setup_true_lang_js_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : mainvue_type_script_setup_true_lang_js_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var __default__ = {
  name: 'JdfOpinions'
};




/* harmony default export */ var mainvue_type_script_setup_true_lang_js_ = (/*#__PURE__*/extends_default()(__default__, {
  props: {
    // 意见展示列表所绑定的数据
    options: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    // 日期格式
    timeFormatter: {
      type: String,
      default: 'YYYY-MM-DD HH:mm:ss'
    }
  },
  setup: function setup(__props) {
    var props = __props;
    var opinionList = (0,external_vue_namespaceObject.ref)([]);
    var _useOpinionCommon = useOpinionCommon(props.timeFormatter),
      buildOpinionItem = _useOpinionCommon.buildOpinionItem,
      getSignText = _useOpinionCommon.getSignText;

    /**
     * 构建意见列表
     */
    var getOpinionList = function getOpinionList(list) {
      opinionList.value = map_default()(list, function (v) {
        var _v$opinionFieldDesc;
        return mainvue_type_script_setup_true_lang_js_objectSpread(mainvue_type_script_setup_true_lang_js_objectSpread({}, v), {}, {
          opinionFieldDesc: (_v$opinionFieldDesc = v.opinionFieldDesc) !== null && _v$opinionFieldDesc !== void 0 ? _v$opinionFieldDesc : '',
          formOpinionList: map_default()(v.formOpinionList, buildOpinionItem)
        });
      });
    };

    // 监听意见列表，构建意见数据
    (0,external_vue_namespaceObject.watchEffect)(function () {
      if (!isEmpty_default()(props.options)) {
        getOpinionList(props.options);
      }
    });
    return {
      __sfc: true,
      props: props,
      opinionList: opinionList,
      buildOpinionItem: buildOpinionItem,
      getSignText: getSignText,
      getOpinionList: getOpinionList
    };
  }
}));
;// CONCATENATED MODULE: ./packages/opinions/src/main.vue?vue&type=script&setup=true&lang=js&
 /* harmony default export */ var src_mainvue_type_script_setup_true_lang_js_ = (mainvue_type_script_setup_true_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/opinions/src/main.vue





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

/* harmony default export */ var main = (component.exports);
;// CONCATENATED MODULE: ./packages/opinions/index.js

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