UNPKG

sd-minio-upfile

Version:
1,840 lines (1,696 loc) 146 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define("gxx-general-approve", [], factory); else if(typeof exports === 'object') exports["gxx-general-approve"] = factory(); else root["gxx-general-approve"] = factory(); })(typeof self !== 'undefined' ? self : this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/dist/"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 5); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function(useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if(item[2]) { return "@media " + item[2] + "{" + content + "}"; } else { return content; } }).join(""); }; // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") modules = [[null, modules, ""]]; var alreadyImportedModules = {}; for(var i = 0; i < this.length; i++) { var id = this[i][0]; if(typeof id === "number") alreadyImportedModules[id] = true; } for(i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { if(mediaQuery && !item[2]) { item[2] = mediaQuery; } else if(mediaQuery) { item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; } /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra Modified by Evan You @yyx990803 */ var hasDocument = typeof document !== 'undefined' if (typeof DEBUG !== 'undefined' && DEBUG) { if (!hasDocument) { throw new Error( 'vue-style-loader cannot be used in a non-browser environment. ' + "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." ) } } var listToStyles = __webpack_require__(9) /* type StyleObject = { id: number; parts: Array<StyleObjectPart> } type StyleObjectPart = { css: string; media: string; sourceMap: ?string } */ var stylesInDom = {/* [id: number]: { id: number, refs: number, parts: Array<(obj?: StyleObjectPart) => void> } */} var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) var singletonElement = null var singletonCounter = 0 var isProduction = false var noop = function () {} // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) module.exports = function (parentId, list, _isProduction) { isProduction = _isProduction var styles = listToStyles(parentId, list) addStylesToDom(styles) return function update (newList) { var mayRemove = [] for (var i = 0; i < styles.length; i++) { var item = styles[i] var domStyle = stylesInDom[item.id] domStyle.refs-- mayRemove.push(domStyle) } if (newList) { styles = listToStyles(parentId, newList) addStylesToDom(styles) } else { styles = [] } for (var i = 0; i < mayRemove.length; i++) { var domStyle = mayRemove[i] if (domStyle.refs === 0) { for (var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j]() } delete stylesInDom[domStyle.id] } } } } function addStylesToDom (styles /* Array<StyleObject> */) { for (var i = 0; i < styles.length; i++) { var item = styles[i] var domStyle = stylesInDom[item.id] if (domStyle) { domStyle.refs++ for (var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]) } for (; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j])) } if (domStyle.parts.length > item.parts.length) { domStyle.parts.length = item.parts.length } } else { var parts = [] for (var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j])) } stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } } } } function createStyleElement () { var styleElement = document.createElement('style') styleElement.type = 'text/css' head.appendChild(styleElement) return styleElement } function addStyle (obj /* StyleObjectPart */) { var update, remove var styleElement = document.querySelector('style[data-vue-ssr-id~="' + obj.id + '"]') if (styleElement) { if (isProduction) { // has SSR styles and in production mode. // simply do nothing. return noop } else { // has SSR styles but in dev mode. // for some reason Chrome can't handle source map in server-rendered // style tags - source maps in <style> only works if the style tag is // created and inserted dynamically. So we remove the server rendered // styles and inject new ones. styleElement.parentNode.removeChild(styleElement) } } if (isOldIE) { // use singleton mode for IE9. var styleIndex = singletonCounter++ styleElement = singletonElement || (singletonElement = createStyleElement()) update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) } else { // use multi-style-tag mode in all other cases styleElement = createStyleElement() update = applyToTag.bind(null, styleElement) remove = function () { styleElement.parentNode.removeChild(styleElement) } } update(obj) return function updateStyle (newObj /* StyleObjectPart */) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { return } update(obj = newObj) } else { remove() } } } var replaceText = (function () { var textStore = [] return function (index, replacement) { textStore[index] = replacement return textStore.filter(Boolean).join('\n') } })() function applyToSingletonTag (styleElement, index, remove, obj) { var css = remove ? '' : obj.css if (styleElement.styleSheet) { styleElement.styleSheet.cssText = replaceText(index, css) } else { var cssNode = document.createTextNode(css) var childNodes = styleElement.childNodes if (childNodes[index]) styleElement.removeChild(childNodes[index]) if (childNodes.length) { styleElement.insertBefore(cssNode, childNodes[index]) } else { styleElement.appendChild(cssNode) } } } function applyToTag (styleElement, obj) { var css = obj.css var media = obj.media var sourceMap = obj.sourceMap if (media) { styleElement.setAttribute('media', media) } if (sourceMap) { // https://developer.chrome.com/devtools/docs/javascript-debugging // this makes source maps inside style tags work properly in Chrome css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' // http://stackoverflow.com/a/26603875 css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' } if (styleElement.styleSheet) { styleElement.styleSheet.cssText = css } else { while (styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild) } styleElement.appendChild(document.createTextNode(css)) } } /***/ }), /* 2 */ /***/ (function(module, exports) { /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file. // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. module.exports = function normalizeComponent ( rawScriptExports, compiledTemplate, functionalTemplate, injectStyles, scopeId, moduleIdentifier /* server only */ ) { var esModule var scriptExports = rawScriptExports = rawScriptExports || {} // ES6 modules interop var type = typeof rawScriptExports.default if (type === 'object' || type === 'function') { esModule = rawScriptExports scriptExports = rawScriptExports.default } // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (compiledTemplate) { options.render = compiledTemplate.render options.staticRenderFns = compiledTemplate.staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 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 = injectStyles } if (hook) { var functional = options.functional var existing = functional ? options.render : options.beforeCreate if (!functional) { // inject component registration as beforeCreate hook options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } else { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functioal component in vue file options.render = function renderWithStyleInjection (h, context) { hook.call(context) return existing(h, context) } } } return { esModule: esModule, exports: scriptExports, options: options } } /***/ }), /* 3 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mixins_audit_methods__ = __webpack_require__(10); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__flow_general_history_components_flow_general_history_vue__ = __webpack_require__(13); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ components: { sGeneralHistory: __WEBPACK_IMPORTED_MODULE_1__flow_general_history_components_flow_general_history_vue__["a" /* default */] }, mixins: [__WEBPACK_IMPORTED_MODULE_0__mixins_audit_methods__["a" /* default */]], data: function data() { return { tabValue: 'sp', showSp: true, timer: new Date().getTime() }; }, watch: { delegationState: function delegationState(val) { if (val == "PENDING") { this.delegationName = "【委派】"; } else { this.delegationName = ""; } }, isLastUserTask: function isLastUserTask(val) { if (val) { this.formValidate.approvalContent = "同意"; } else { this.formValidate.approvalContent = "同意上报"; } } } }); /***/ }), /* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sd_modify_approve_user__ = __webpack_require__(16); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_sd_modify_approve_user___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_sd_modify_approve_user__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mixins_track_methods__ = __webpack_require__(17); // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ __webpack_exports__["a"] = ({ components: { modifyApproveUser: __WEBPACK_IMPORTED_MODULE_0_sd_modify_approve_user__["modifyApproveUser"] }, mixins: [__WEBPACK_IMPORTED_MODULE_1__mixins_track_methods__["a" /* default */]], props: {}, data: function data() { return {}; }, filters: { dateFormat: function dateFormat(dateStr) { var date = new Date(dateStr); var year = date.getFullYear(); /* 在日期格式中,月份是从0开始的,因此要加0使用三元表达式在小于10的前面加0,以达到格式统一 如 09:11:05 */ var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds(); // 拼接 return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; } }, mounted: function mounted() { this.getApprovalTrack(); }, methods: { callbackSuccess: function callbackSuccess(data) { var _this = this; if (this.modifyUserCallback) { this.getApprovalTrack(); return this.modifyUserCallback(data); } else { // 重新获取审批历史 return new Promise(function (resolve, reject) { var that = _this; _this.getApprovalTrack(); setTimeout(function () { that.$Modal.success({ title: '温馨提示', content: '修改审批人成功' }); resolve({ success: true }); }, 1000); }); } }, testErr: function testErr() { var _this2 = this; return new Promise(function (resolve, reject) { var that = _this2; setTimeout(function () { that.$Modal.error({ title: '温馨提示', content: '修改审批人失败,请稍后重试' }); resolve({ success: false }); }, 1000); }); } } }); /***/ }), /* 5 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_flow_general_audit_vue__ = __webpack_require__(6); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GeneralApprove", function() { return __WEBPACK_IMPORTED_MODULE_0__components_flow_general_audit_vue__["a"]; }); var Plugin = { install: function install(Vue) { Vue.component('general-approve', __WEBPACK_IMPORTED_MODULE_0__components_flow_general_audit_vue__["a" /* default */]); } }; /* harmony default export */ __webpack_exports__["default"] = (Plugin); /***/ }), /* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_node_modules_iview_loader_index_js_ref_5_flow_general_audit_vue__ = __webpack_require__(3); /* unused harmony namespace reexport */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c1754b7_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_node_modules_iview_loader_index_js_ref_5_flow_general_audit_vue__ = __webpack_require__(20); function injectStyle (ssrContext) { __webpack_require__(7) } var normalizeComponent = __webpack_require__(2) /* script */ /* template */ /* template functional */ var __vue_template_functional__ = false /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = "data-v-3c1754b7" /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_node_modules_iview_loader_index_js_ref_5_flow_general_audit_vue__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_3c1754b7_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_node_modules_iview_loader_index_js_ref_5_flow_general_audit_vue__["a" /* default */], __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) /* harmony default export */ __webpack_exports__["a"] = (Component.exports); /***/ }), /* 7 */ /***/ (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__(8); if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add the styles to the DOM var update = __webpack_require__(1)("5e1dfc74", content, true); /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(0)(false); // imports // module exports.push([module.i, ".uni-ctnt[data-v-3c1754b7]{padding:5px 0 20px}.uni-sel[data-v-3c1754b7]{display:flex}.uni-sel>.sel[data-v-3c1754b7]{width:80%}.uni-sel>.check[data-v-3c1754b7]{width:20%;margin-left:20px}.uni-list[data-v-3c1754b7]{max-height:100px;overflow:auto;width:500px}[data-v-3c1754b7] .bsp-flow-modal .ivu-modal-header{padding:0}[data-v-3c1754b7] .bsp-flow-modal .ivu-icon-ios-close{font-size:32px}[data-v-3c1754b7] .bsp-flow-modal .ivu-tag-text{font-size:16px}[data-v-3c1754b7] .bsp-flow-modal .ivu-tag-dot{padding:0 8px}[data-v-3c1754b7] .bsp-flow-modal .ivu-tag-dot-inner{margin-right:2px}[data-v-3c1754b7] .bsp-flow-modal .ivu-tag .ivu-icon-ios-close{font-size:18px;top:1px;margin-left:4px!important}[data-v-3c1754b7] .ivu-form .ivu-form-item-label,[data-v-3c1754b7] textarea.ivu-input{font-size:16px}[data-v-3c1754b7] .bsp-flow-modal .bsp-sel-user .ivu-icon-md-add{font-size:18px}[data-v-3c1754b7] .bsp-flow-modal .bsp-sel-user>.ivu-icon+span,[data-v-3c1754b7] .bsp-flow-modal .bsp-sel-user>span+.ivu-icon{margin-left:0;font-size:16px}[data-v-3c1754b7] .ivu-select-input{font-size:16px}[data-v-3c1754b7] .ivu-select-item{font-size:16px!important}[data-v-3c1754b7] .ivu-checkbox-wrapper{font-size:16px}[data-v-3c1754b7] .ivu-form-item{margin-bottom:0;padding-bottom:10px}[data-v-3c1754b7] .ivu-modal-body{max-height:450px;overflow-y:auto;overflow-x:hidden}[data-v-3c1754b7] .ivu-modal-footer{height:50px;line-height:50px;padding:0 12px}.bsp-flow-modal .bsp-flow-modal-title[data-v-3c1754b7]{height:40px;background:#2b5fda;width:100%;text-indent:1em;color:#fff;line-height:40px;font-size:15px}.bsp-flow-people-ctnt>div[data-v-3c1754b7]{display:inline-block}.bsp-flow-modal [data-v-3c1754b7]::-webkit-scrollbar{width:5px;height:1px}.bsp-flow-modal [data-v-3c1754b7]::-webkit-scrollbar-thumb{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.2);background:#c9c9c9}.bsp-flow-modal [data-v-3c1754b7]::-webkit-scrollbar-track{box-shadow:inset 0 0 5px rgba(0,0,0,.2);border-radius:4px;background:#ededed}.cancle-button[data-v-3c1754b7],.submit-button[data-v-3c1754b7]{min-width:60px;font-size:14px;border-radius:0}.cancle-button[data-v-3c1754b7]{border:1px solid #2b5fd9;color:#2b5fd9;background-color:#fff}.submit-button[data-v-3c1754b7]{border:1px solid #2b5fd9;color:#fff;background-color:#2b5fd9}.tip-container[data-v-3c1754b7]{margin-top:10px;background-color:#f2f6fc;padding:16px}.tip-container .tip-title[data-v-3c1754b7]{font-size:16px;font-weight:700;padding-right:10px}.tip-container .tip-warning[data-v-3c1754b7]{color:#e60012;font-weight:16px}.tip-container p[data-v-3c1754b7]{font-size:16px;margin:20px}.bsp-approve[data-v-3c1754b7]{background:#fafbff;border-radius:0 0 0 0;border:1px solid #cee0f0;padding:16px 16px 2px 0;margin-top:16px}.footer-approve[data-v-3c1754b7]{text-align:center;margin:0 16px 16px}.bsp-general-wrap[data-v-3c1754b7]{width:99%;font-family:\"Noto Sans TC, Microsoft YaHei, Segoe UI, Tahoma, Arial, Verdana, sans-serif\"}.bsp-general-wrap[data-v-3c1754b7] .ivu-tabs-tab{font-size:18px!important}.bsp-general-wrap[data-v-3c1754b7] .ivu-tabs-tab-active{font-weight:700!important}", ""]); // exports /***/ }), /* 9 */ /***/ (function(module, exports) { /** * Translates the list format produced by css-loader into something * easier to manipulate. */ module.exports = function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: media, sourceMap: sourceMap } if (!newStyles[id]) { styles.push(newStyles[id] = { id: id, parts: [part] }) } else { newStyles[id].parts.push(part) } } return styles } /***/ }), /* 10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__data__ = __webpack_require__(11); /* harmony default export */ __webpack_exports__["a"] = ({ mixins: [__WEBPACK_IMPORTED_MODULE_0__data__["a" /* default */]], mounted: function mounted() { this.getCurrentApprovalTrack(); }, methods: { getFormField: function getFormField() { var _this = this; if (this.formId) { this.$store.dispatch('postRequest', { url: '/bsp-com/com/form/getFormFieldByFormId', params: { formId: this.formId } }).then(function (resp) { if (resp.success) { if (resp.data && resp.data.length > 0) { resp.data.forEach(function (item) { if (item.isMain == '1') { _this.formArr = item.children; var obj = {}; var keyName = ''; _this.formArr.forEach(function (ele) { if (ele.isProcessVar && ele.isProcessVar == '1') { keyName = ele.fieldName; obj[keyName] = _this.formDataVarObj[ele.fieldName]; } }); _this.ProcessVarObj = obj; } }); _this.getAduitApprovalUser(); } else { _this.getAduitApprovalUser(); } } }); } }, getForm: function getForm() { var _this2 = this; var params = { operType: this.operType, formId: this.formId, businessId: this.businessId }; this.$store.dispatch('postRequest', { url: '/bsp-com/com/form/handle/getFormData', params: params }).then(function (resp) { if (resp.success) { // console.log(resp,resp.success,'resp.data') _this2.formDataVarObj = resp.formData; _this2.getFormField(); } else { _this2.warnSwal('文书模版加载出错。原因:' + resp.msg); } }); }, initData: function initData() { if (this.businessId === '') { this.warnSwal('未设置业务编号[businessId]。'); return; } if (this.module === '') { this.warnSwal('未设置模块名称[module]。'); } }, // 获取当前审批节点 getCurrentApprovalTrack: function getCurrentApprovalTrack() { var _this3 = this; if (!this.actInstId) { this.warnSwal('流程实例ID不能为空'); return; } this.$store.dispatch('postRequest', { url: 'bsp-bpm/bpm/approveProcess/currentApprovalTrack', params: { actInstId: this.actInstId } }).then(function (resp) { if (resp.success) { _this3.hasApproveAuth = true; _this3.showSp = true; _this3.$nextTick(function () { if (this.bindEvent && this.$slots.func) { this.reference = this.$slots.func[0].elm; if (this.reference) { this.reference.addEventListener('click', this.openAudit); } } }); _this3.currentNodeName = resp.currentNodeName; _this3.isLastUserTask = resp.isLastUserTask; _this3.formValidate.taskId = resp.taskId; _this3.showTc = resp.firstNodeShowTc; _this3.initBtn(resp.buttons); _this3.formId ? _this3.getForm() : _this3.getAduitApprovalUser(); if (resp.isLastUserTask || resp.delegationState == 'PENDING') { _this3.showApproveUser = false; } _this3.delegationState = resp.delegationState; _this3.currentNodeId = resp.currentNodeId ? resp.currentNodeId : ''; _this3.getButtonByInstIdAndNodeId(_this3.actInstId, resp.currentNodeId); _this3.rollbackNodeList = resp.rollbackNodeList; if (_this3.rollbackNodeList && _this3.rollbackNodeList.length > 0) { _this3.formValidate.backNodeId = _this3.rollbackNodeList[0]['id']; } // 组装当前任务节点信息 _this3.currTask.currentNodeName = resp.currentNodeName; _this3.currTask.taskId = resp.taskId; _this3.currTask.isLastUserTask = resp.isLastUserTask; _this3.currTask.firstNodeShowTc = resp.firstNodeShowTc; _this3.currTask.delegationState = resp.delegationState; _this3.currTask.currentNodeId = resp.currentNodeId; _this3.currTask.isFirstNode = resp.isFirstNode; _this3.currTask.buttons = resp.buttons; _this3.currTask.rollbackNodeList = resp.rollbackNodeList; _this3.currTask.curentTaskApproveUser = resp.curentTaskApproveUser; // 判断当前节点是否为法制审核节点 // this.justFzshCurNode() } else { _this3.hasApproveAuth = false; _this3.showSp = false; _this3.tabValue = 'flow'; } _this3.$emit('init', _this3.hasApproveAuth); }); }, // 判断当前节点是否为法制审核节点 justFzshCurNode: function justFzshCurNode() { var _this4 = this; this.postRequest({ url: 'bsp-bpm/bpm/nodeSetting/isFzsh', params: { actInstId: this.actInstId, nodeId: this.currentNodeId } }).then(function (resp) { if (resp.success) { // 是否需要法制审核 _this4.curNodeSffzsh = resp.sffzsh; } }); }, // 判断所选择的节点是否需要法制审核 justFzshNextNode: function justFzshNextNode() { var _this5 = this; if (this.selectNode) { this.postRequest({ url: 'bsp-bpm/bpm/nodeSetting/isFzsh', params: { actInstId: this.actInstId, nodeId: this.selectNode } }).then(function (resp) { if (resp.success) { // 是否需要法制审核 _this5.selectNodeSffzsh = resp.sffzsh; if (_this5.selectNodeSffzsh) { // 审核结果修改 _this5.optionsBtnArr.forEach(function (item) { if (item.code == 1) item.name = '流转法制'; }); } else { _this5.optionsBtnArr.forEach(function (item) { if (item.code == 1) item.name = _this5.curAgreeButtonName; }); } } }); } }, initBtn: function initBtn(data) { var _this6 = this; this.customBtnArr = []; this.optionsBtnArr = []; if (data && data.length < 1) return; // 默认先初始化按钮 // this.formValidate.isApprove = data[0].code // this.formValidate.isApproveStr = data[0].name // this.formValidate.approvalContent = data[0].defaultOption data.map(function (item) { if (item.type == '1') { _this6.customBtnArr.push(item); } else { _this6.optionsBtnArr.push(item); } }); this.isApproveChange(data[0].code); this.optionsBtnArr.forEach(function (item) { if (item.code == 1) _this6.curAgreeButtonName = item.name; }); }, onSelectNode: function onSelectNode(nodeId) { var _this7 = this; this.nextNodeList.forEach(function (item) { if (item.nodeId == nodeId) { _this7.orgArr = item.orgUser; } }); // 清空单位值,清空复选框 /* this.orgUserList = [] this.selectOrgArr = [] */ // 默认选中第一项 if (this.orgArr && this.orgArr.length > 0) { this.orgSelectEvent({ label: this.orgArr[0].orgName, value: this.orgArr[0].orgId }); this.selectOrgArr = []; this.selectOrgArr.push(this.orgArr[0].orgId); } // 判断所选择的节点是否需要法制审核 // this.justFzshNextNode() }, checkAllGroupChange: function checkAllGroupChange(data) { var count = 0; this.orgUserList.forEach(function (item) { item.user.forEach(function (item) { count++; }); }); if (data.length === count) { this.indeterminate = false; this.checkAll = true; } else if (data.length > 0) { this.indeterminate = true; this.checkAll = false; } else { this.indeterminate = false; this.checkAll = false; } }, handleCheckAll: function handleCheckAll() { var _this8 = this; if (this.indeterminate) { this.checkAll = false; } else { this.checkAll = !this.checkAll; } this.indeterminate = false; if (this.checkAll) { this.orgUserList.forEach(function (item) { item.user.forEach(function (item) { _this8.checkedUser.push(item.userIdCard + '_' + item.orgCode); }); }); } else { this.checkedUser = []; } }, getAduitApprovalUser: function getAduitApprovalUser() { var _this9 = this; var formProcessVar = ''; this.formId ? formProcessVar = JSON.stringify(this.ProcessVarObj) : ''; this.$store.dispatch('postRequest', { url: 'bsp-bpm/bpm/approveProcess/getApproveUser', params: { actInstId: this.actInstId, userId: this.assigneeUserId, extraOrgId: this.extraOrgId, extraRegId: this.extraRegId, extraCityId: this.extraCityId, formProcessVar: formProcessVar } }).then(function (resp) { if (resp.success) { var _data = resp.data; var nodeData = _data && _data.length > 0 ? _data[0] : {}; // 如果下一节点是排它网关 if (nodeData && nodeData.nodeType && nodeData.nodeType == 'exclusiveGateway') { _this9.nextNodeList = nodeData.orgUserList; // 默认选中第一个节点 // this.selectNode = this.nextNodeList[0].nodeId // this.orgArr = this.nextNodeList[0].orgUser // 判断所选择的节点是否需要法制审核 // this.justFzshNextNode() return; } // 当下一节点不是排它网关时 _this9.selectNode = nodeData.nodeId; // 判断下一节点是否需要法制审核 // this.justFzshNextNode() // 获取机构用户列表 var orgUserList = nodeData.orgUserList; _this9.orgArr = orgUserList; // 默认选中第一项 if (orgUserList && orgUserList.length > 0) { var selectOrg = _this9.getSelectOrg(orgUserList, _this9.extraOrgId, _this9.extraRegId); console.log(selectOrg, 'selectOrg'); _this9.orgSelectEvent({ label: selectOrg.orgName, value: selectOrg.orgId }, true); _this9.selectOrgArr.push(selectOrg.orgId); } } }); }, getSelectOrg: function getSelectOrg(orgUserList, extraOrgId, extraRegId) { var extraOrgIdArr = extraOrgId ? extraOrgId.split(',') : []; var extraRegionIdArr = extraRegId ? extraRegId.split(',') : []; // 先根据机构id匹配 for (var i in extraOrgIdArr) { var matchOrgIdVal = extraOrgIdArr[i]; for (var j in orgUserList) { var item = orgUserList[j]; if (matchOrgIdVal === item['orgId']) { return item; } } } // 根据机构id没有匹配到时再根据区域id匹配 for (var _i in extraRegionIdArr) { var matchRegionId = extraRegionIdArr[_i]; for (var _j in orgUserList) { var _item = orgUserList[_j]; if (matchRegionId === _item['regId']) { return _item; } } } // 都没匹配到就默认第一个 return orgUserList[0]; }, orgSelectEvent: function orgSelectEvent(option, selectTag) { var _this10 = this; // 默认全选 this.indeterminate = false; this.checkAll = true; var index = this.orgArr.findIndex(function (item) { return item.orgId == option.value; }); this.orgUserList = []; this.checkedUser = []; this.orgUserList.push(this.orgArr[index]); if (this.selectUsers && selectTag) { var selectUsersArr = this.selectUsers.split(','); this.orgArr[index].user.map(function (item) { return selectUsersArr.forEach(function (ele) { if (item.userIdCard == ele) { _this10.checkedUser.push(item.userIdCard + '_' + item.orgCode); } }); }); // 如果默认人员不存在 设置全选 if (this.checkedUser && this.candidateUsers && this.candidateUsers.length == 0) { this.orgArr[index].user.map(function (item) { return _this10.checkedUser.push(item.userIdCard + '_' + item.orgCode); }); } if (this.checkedUser.length == this.orgArr[index].user.length) { this.indeterminate = false; this.checkAll = true; } else { this.indeterminate = true; this.checkAll = false; } } else { this.orgArr[index].user.map(function (item) { return _this10.checkedUser.push(item.userIdCard + '_' + item.orgCode); }); } // // 判断当前项是选中还是取消选中 // let selectIndex = this.selectOrgArr.findIndex( // (item) => option.value == item // ); // // // 获取当前选中的机构对应用户 // let index = this.orgArr.findIndex((item) => { // return item.orgId == option.value; // }); // // if (selectIndex > -1) { // // 取消选中 // this.orgArr[index].user.map((item) => { // let userIndex = this.checkedUser.findIndex( // (userIdCard) => userIdCard == item.userIdCard // ); // if (userIndex > -1) this.checkedUser.splice(userIndex, 1); // }); // // // 获取当前选中的机构对应用户 // let orgUserIndex = this.orgUserList.findIndex((item) => { // return item.orgId == option.value; // }); // // this.orgUserList.splice(orgUserIndex, 1); // } else { // // 选中 // this.orgUserList.push(this.orgArr[index]); // this.orgArr[index].user.map((item) => // this.checkedUser.push(item.userIdCard) // ); // } }, handleSubmit: function handleSubmit(name) { var _this11 = this; if (this.formValidate.isApprove == 4) { this.ruleValidate.delegateUserName[0].required = true; } else if (this.formValidate.isApprove == 5) { this.ruleValidate.approveCheckedUser[0].required = false; this.ruleValidate.delegateUserName[0].required = false; } else if (this.formValidate.isApprove == 1 && !this.isLastUserTask) { if (this.checkedUser.length < 1) { this.$Notice.error({ title: '错误提示', desc: '请选择审批人' }); return; } this.ruleValidate.delegateUserName[0].required = false; } else { this.ruleValidate.delegateUserName[0].required = false; } this.$refs[name].validate(function (valid) { if (valid) { if (!_this11.customizeValidate()) return; _this11.custom_loading = true; if (_this11.beforeAudit) { _this11.beforeAudit({ 'formData': _this11.formValidate, 'currTask': _this11.currTask }).then(function (data) { if (data) { _this11.approval(); } else { _this11.custom_loading = false; } }).catch(function (err) { _this11.custom_loading = false; _this11.$Notice.error({ title: '错误提示', desc: err }); }); } else { _this11.approval(); } } else { _this11.$Notice.error({ title: '错误提示', desc: '表单验证不通过' }); } }); }, approval: function approval() { var _this12 = this; this.custom_loading = true; this.assembleData(); this.$store.dispatch('postRequest', { url: 'bsp-bpm/bpm/approveProcess/approvalProcess', params: { processCmd: JSON.stringify(this.bootData) } }).then(function (resp) { _this12.custom_loading = false; if (resp.success) { _this12.disabledSubmit = true; if (_this12.auditComplete) { _this12.auditComplete(resp); } else { // 隐藏审批按钮 _this12.hasApproveAuth = false; _this12.$Modal.success({ title: '温馨提示', content: '审批成功' }); } _this12.$emit('audit-close'); } else { if (_this12.error) { _this12.error(resp); } else { _this12.$Modal.error({ title: '温馨提示', content: '审批失败,请重试' }); } } }); }, // 组装请求参数 assembleData: function assembleData() { this.bootData = { actInstId: this.actInstId, assigneeUserId: this.assigneeUserId, assigneeUserName: this.assigneeUserName, assigneeOrgId: this.assigneeOrgId, assigneeOrgName: this.assigneeOrgName, businessId: this.businessId, fApp: this.module, fXxpt: this.platform, isTerminateTask: this.isTerminateTask, variables: this.variables, msgUrl: this.msgUrl, msgTit: this.msgTit }; this.formValidate.candidateUsers = this.convertCandidateUsers(); Object.assign(this.bootData, this.formValidate, { csldbh: this.convertCsldbh() }, { delegateUser: this.convertDelegate() }); this.bootData.variables.nextNodeId = this.selectNode; }, convertDelegate: function convertDelegate() { return { idCard: this.delegateUser.idCard, orgCode: this.delegateUser.orgCode }; }, convertCsldbh: function convertCsldbh() { return this.csldList.map(function (item) { return { idCard: item.idCard, orgCode: item.orgCode }; }); }, convertCandidateUsers: function convertCandidateUsers() { return this.checkedUser.map(function (item) { var array = item.split('_'); return { idCard: array[0], orgCode: array[1] }; }); }, // 自定义验证 customizeValidate: function customizeValidate() { var validate = true; // 退查或不同意时不做验证 if (!this.showApproveUser) { return validate; } if (!this.selectNode) { this.$Modal.warning({ title: '错误提示', content: '审核节点不能为空' }); validate = false; } else if (this.selectOrgArr.length <= 0) { this.$Modal.warning({ title: '错误提示', desc: '审核部门不能为空' }); validate = false; } else if (this.checkedUser.length <= 0) { this.$Notice.error({ title: '错误提示', desc: '审核人不能为空' }); validate = false; } return validate; }, dateFormat: function dateFormat(date) { // var date = new Date(time) var year = date.getFullYear(); /* 在日期格式中,月份是从0开始的,因此要加0使用三元表达式在小于10的前面加0,以达到格式统一 如 09:11:05 */ var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds(); // 拼接 return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; }, // 重置表单 handleReset: function handleReset(name) { this.$refs[name].resetFields(); // 重新生成时间 this.formValidate.approvalDate = this.dateFormat(new Date()); // 清空机构选择 this.selectOrgArr = []; // 清空人员选择 this.checkedUser = []; // 清空人员机构选择 this.orgUserList = []; this.defaultEvent(); this.showApproveUser = true; this.formValidate.isDelegateTask = false; }, // 审批意见改变事件时 isApproveChange: function isApproveChange(value) { this.formValidate.isApprove = value; this.$emit('changeApproveVal', value); var curBtnArr = this.optionsBtnArr.filter(function (item) { return item.code == value; }); this.formValidate.isApproveStr = curBtnArr[0].name; this.formValidate.approvalContent = curBtnArr[0].defaultOption; switch (value) { case '1': this.formValidate.isBack = false; this.formValidate.isDelegateTask = false; this.formValidate.isTerminateTask = false; if (this.delegationState == 'PENDING' || this.isLastUserTask) { this.showApproveUser = false; } else { this.showApproveUser = true; } this.defaultEvent(); break; case '2': this.formValidate.isBack = false; this.formValidate.isDelegateTask = false; this.formValidate.isTerminateTask = false; this.showApproveUser = false; this.defaultEvent(); break; case '3': this.formValidate.isBack = true; this.formValidate.isDelegateTask = false; this.formValidate.isTerminateTask = false; this.showApproveUser = false; this.defaultEvent(); break; case '4': this.formValidate.isBack = false; this.formValidate.isDelegateTask = true; this.formValidate.isTerminateTask = false; this.showApproveUser = false; this.delegateEvent(); break; case '5': // 同意并结束流程 this.formValidate.isBack = false; this.formValidate.isDelegateTask = false; this.formValidate.isTerminateTask = true; if (this.delegationState == 'PENDING' || this.isLastUserTask) { this.showApproveUser = false; } else { this.showApproveUser = false; } this.defaultEvent(); break; case '6': // 不同意并结束流程 this.formValidate.isBack = false; this.formValidate.isDelegateTask = false; this.formValidate.isTerminateTask = true; this.showApproveUser = false; this.defaultEvent(); break; } }, getButtonByInstIdAndNodeId: function getButtonByInstIdAndNodeId(actInstId, nodeId) { var _this13 = this; this.$store.dispatch('postRequest', { url: 'bsp-bpm/bpm/nodeButton/getNodeButtonByParams', params: { actInstId: actInstId, nodeId: nodeId } }).then(function (resp) { if (resp.success) { if (resp.data) { resp.data.map(function (item) { _this13.curNodeBtnMarkArr.push(item.mark); }); } } }); }, // 委派事件 delegateEvent: function delegateEvent() { this.formLabel.approvalContent = '指派意见'; this.formLabel.approvalDate = '指派时间'; }, defaultEvent: function defaultEvent() { this.formLabel.approvalContent = '审批意见'; this.formLabel.approvalDate = '审批时间'; }, openUserSelect: function openUserSelect() { this.showSelectModal = true; this.component = 'userSelect'; }, selectCallBack: function selectCallBack(data) { this.formValidate.delegateUserId = data[0].idCard; this.formValidate.delegateUserName = data[0].name; }, cancelCallBack: function cancelCallBack() { this.showSelectModal = false; this.component = null; }, selectDelegate: function selectDelegate(data) { this.delegateUser = data[0]; }, clearDelegate: function clearDelegate() { this.delegateUser = {}; }, // 删除抄送人 csld_close: function csld_close(idx) { this.csldList.splice(idx, 1); }, // 选择抄送人回调 policeConfirm: function policeConfirm(policeList) { var _this14 = this; this.csldList = polic