@zhijiancloud/bpm 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bpmField.umd.js +3 -3
- package/dist/bpmFormField.umd.js +3 -3
- package/dist/bpmMapLocation.umd.js +1 -0
- package/dist/bpmRating.umd.js +1 -1
- package/dist/bpmRating2.umd.js +1 -0
- package/dist/bpmSubForm.umd.js +1 -1
- package/dist/bpmSubFormField.umd.js +3 -3
- package/dist/index.umd.js +3 -3
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.bpm2=e():t.bpm2=e()}(self,(function(){return function(){var t={966:function(t,e,n){var r;"undefined"!=typeof self&&self,t.exports=(r=n(5554),function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="./",e(e.s=64)}([function(t,e,n){"use strict";var r=n(45),o=n.n(r),i=n(6),a=n(50),s=n(13),c=n(49),u=n(27);e.a={data:function(){return{unwatchFns:[]}},mounted:function(){var t=this;s.b&&s.b.load().then((function(){t.__contextReady&&t.__contextReady.call(t,t.convertProps())})),this.$amap=this.$amap||this.$parent.$amap,this.$amap?this.register():this.$on(c.a.AMAP_READY_EVENT,(function(e){t.$amap=e,t.register()}))},destroyed:function(){this.unregisterEvents(),this.$amapComponent&&(this.$amapComponent.setMap&&this.$amapComponent.setMap(null),this.$amapComponent.close&&this.$amapComponent.close(),this.$amapComponent.editor&&this.$amapComponent.editor.close(),this.unwatchFns.forEach((function(t){return t()})),this.unwatchFns=[])},methods:{getHandlerFun:function(t){return this.handlers&&this.handlers[t]?this.handlers[t]:this.$amapComponent["set"+o()(t)]||this.$amapComponent.setOptions},convertProps:function(){var t=this,e={};this.$amap&&(e.map=this.$amap);var n=this.$options.propsData,r=void 0===n?{}:n,o=this.propsRedirect;return Object.keys(r).reduce((function(n,i){var a=i,s=t.convertSignalProp(a,r[a]);return void 0===s||(o&&o[i]&&(a=o[a]),e[a]=s),n}),e)},convertSignalProp:function(t,e){var n="",r="";if(this.amapTagName)try{var a=o()(this.amapTagName).replace(/^El/,"");r=(u.default[a]||"").props[t].$type,n=i.a[r]}catch(t){}if(r&&n)return n(e);if(this.converters&&this.converters[t])return this.converters[t].call(this,e);var s=i.a[t];return s?s(e):e},registerEvents:function(){if(this.setEditorEvents&&this.setEditorEvents(),this.$options.propsData){if(this.$options.propsData.events)for(var t in this.events)a.a.addListener(this.$amapComponent,t,this.events[t]);if(this.$options.propsData.onceEvents)for(var e in this.onceEvents)a.a.addListenerOnce(this.$amapComponent,e,this.onceEvents[e])}},unregisterEvents:function(){a.a.clearListeners(this.$amapComponent)},setPropWatchers:function(){var t=this,e=this.propsRedirect,n=this.$options.propsData,r=void 0===n?{}:n;Object.keys(r).forEach((function(n){var r=n;e&&e[n]&&(r=e[n]);var o=t.getHandlerFun(r);if(o||"events"===n){var i=t.$watch(n,(function(e){return"events"===n?(t.unregisterEvents(),void t.registerEvents()):o&&o===t.$amapComponent.setOptions?o.call(t.$amapComponent,((i={})[r]=t.convertSignalProp(n,e),i)):void o.call(t.$amapComponent,t.convertSignalProp(n,e));var i}));t.unwatchFns.push(i)}}))},registerToManager:function(){var t=this.amapManager||this.$parent.amapManager;t&&void 0!==this.vid&&t.setComponent(this.vid,this.$amapComponent)},initProps:function(){var t=this;["editable","visible"].forEach((function(e){if(void 0!==t[e]){var n=t.getHandlerFun(e);n&&n.call(t.$amapComponent,t.convertSignalProp(e,t[e]))}}))},printReactiveProp:function(){var t=this;Object.keys(this._props).forEach((function(e){t.$amapComponent["set"+o()(e)]&&console.log(e)}))},register:function(){var t=this,e=this.__initComponent&&this.__initComponent(this.convertProps());e&&e.then?e.then((function(e){return t.registerRest(e)})):this.registerRest(e)},registerRest:function(t){!this.$amapComponent&&t&&(this.$amapComponent=t),this.registerEvents(),this.initProps(),this.setPropWatchers(),this.registerToManager(),this.events&&this.events.init&&this.events.init(this.$amapComponent,this.$amap,this.amapManager||this.$parent.amapManager)},$$getInstance:function(){return this.$amapComponent}}}},function(t,e,n){"use strict";e.a=function(t,e,n,r,o,i,a,s){var c=typeof(t=t||{}).default;"object"!==c&&"function"!==c||(t=t.default);var u,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),i&&(l._scopeId=i),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=u):o&&(u=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(l.functional){l._injectStyles=u;var p=l.render;l.render=function(t,e){return u.call(e),p(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:l}}},function(t,e,n){var r=n(30)("wks"),o=n(14),i=n(3).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(15)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";function r(t){return new AMap.Pixel(t[0],t[1])}function o(t){return new AMap.LngLat(t[0],t[1])}function i(t){return new AMap.Bounds(o(t[0]),o(t[1]))}e.e=r,e.c=function(t){return Array.isArray(t)?t:[t.getX(),t.getY()]},e.d=o,e.b=function(t){if(t)return Array.isArray(t)?t.slice():[t.getLng(),t.getLat()]},n.d(e,"a",(function(){return a}));var a={position:o,offset:r,bounds:i,LngLat:o,Pixel:r,Size:function(t){return new AMap.Size(t[0],t[1])},Bounds:i}},function(t,e,n){var r=n(3),o=n(8),i=n(11),a=n(14)("src"),s=Function.toString,c=(""+s).split("toString");n(16).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,a)||o(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,e,n){var r=n(9),o=n(20);t.exports=n(5)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(10),o=n(31),i=n(33),a=Object.defineProperty;e.f=n(5)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports={}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return a}));var r=n(97),o=n(19),i=n.n(o),a=null,s=function(t){i.a.prototype.$isServer||a||(a||(a=new r.a(t)),a.load())}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(71);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(75),o=n(22);t.exports=function(t){return r(o(t))}},function(t,e){t.exports=r},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(70),o=n(34),i=n(7),a=n(8),s=n(12),c=n(72),u=n(25),l=n(79),p=n(2)("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,h,m,v,g){c(n,e,h);var y,_,b,C=function(t){if(!f&&t in $)return $[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",w="values"==m,M=!1,$=t.prototype,k=$[p]||$["@@iterator"]||m&&$[m],S=k||C(m),A=m?w?C("entries"):S:void 0,E="Array"==e&&$.entries||k;if(E&&(b=l(E.call(new t)))!==Object.prototype&&b.next&&(u(b,x,!0),r||"function"==typeof b[p]||a(b,p,d)),w&&k&&"values"!==k.name&&(M=!0,S=function(){return k.call(this)}),r&&!g||!f&&!M&&$[p]||a($,p,S),s[e]=S,s[x]=d,m)if(y={values:w?S:C("values"),keys:v?S:C("keys"),entries:A},g)for(_ in y)_ in $||i($,_,y[_]);else o(o.P+o.F*(f||M),e,y);return y}},function(t,e,n){var r=n(30)("keys"),o=n(14);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(9).f,o=n(11),i=n(2)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){"use strict";var r=n(50);e.a={methods:{setEditorEvents:function(){var t=this;if(this.$amapComponent.editor&&this.events){var e=["addnode","adjust","removenode","end","move"],n={};Object.keys(this.events).forEach((function(r){-1!==e.indexOf(r)&&(n[r]=t.events[r])})),Object.keys(n).forEach((function(e){r.a.addListener(t.$amapComponent.editor,e,n[e])}))}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=(n(65),n(45)),o=n.n(r),i=n(13),a=n(100),s=n(106),c=n(107),u=n(111),l=n(113),p=n(115),f=n(116),d=n(118),h=n(120),m=n(122),v=n(124),g=n(126),y=n(128),_=n(130),b=n(131);n.d(e,"AMapManager",(function(){return _.a})),n.d(e,"initAMapApiLoader",(function(){return i.a})),n.d(e,"createCustomComponent",(function(){return b.a})),n.d(e,"lazyAMapApiLoaderInstance",(function(){return i.b}));var C=[a.a,s.a,c.a,u.a,l.a,p.a,d.a,f.a,h.a,m.a,v.a,g.a,y.a],x={initAMapApiLoader:i.a,AMapManager:_.a,install:function(t){x.installed||(t.config.optionMergeStrategies.deferredReady=t.config.optionMergeStrategies.created,C.map((function(e){t.component(e.name,e),x[o()(e.name).replace(/^El/,"")]=e})))}};"undefined"!=typeof window&&window.Vue&&function t(e){t.installed||x.install(e)}(window.Vue),e.default=x},function(t,e,n){var r=n(29),o=n(2)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(3),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){t.exports=!n(5)&&!n(15)((function(){return 7!=Object.defineProperty(n(32)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(4),o=n(3).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(3),o=n(16),i=n(8),a=n(7),s=n(17),c=function(t,e,n){var u,l,p,f,d=t&c.F,h=t&c.G,m=t&c.S,v=t&c.P,g=t&c.B,y=h?r:m?r[e]||(r[e]={}):(r[e]||{}).prototype,_=h?o:o[e]||(o[e]={}),b=_.prototype||(_.prototype={});for(u in h&&(n=e),n)p=((l=!d&&y&&void 0!==y[u])?y:n)[u],f=g&&l?s(p,r):v&&"function"==typeof p?s(Function.call,p):p,y&&a(y,u,p,t&c.U),_[u]!=p&&i(_,u,f),v&&b[u]!=p&&(b[u]=p)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(10),o=n(73),i=n(38),a=n(24)("IE_PROTO"),s=function(){},c=function(){var t,e=n(32)("iframe"),r=i.length;for(e.style.display="none",n(78).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(74),o=n(38);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(21),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(7);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(17),o=n(86),i=n(87),a=n(10),s=n(37),c=n(88),u={},l={};e=t.exports=function(t,e,n,p,f){var d,h,m,v,g=f?function(){return t}:c(t),y=r(n,p,e?2:1),_=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(d=s(t.length);d>_;_++)if((v=e?y(a(h=t[_])[0],h[1]):y(t[_]))===u||v===l)return v}else for(m=g.call(t);!(h=m.next()).done;)if((v=o(m,y,h.value,e))===u||v===l)return v},e.BREAK=u,e.RETURN=l},function(t,e,n){var r=n(14)("meta"),o=n(4),i=n(11),a=n(9).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(15)((function(){return c(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},p=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&p.NEED&&c(t)&&!i(t,r)&&l(t),t}}},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var r=n(96);t.exports=function(){var t=r.apply(r,arguments);return t.charAt(0).toUpperCase()+t.slice(1)}},function(t,e){function n(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(r);return[n].concat(r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}))).concat([o]).join("\n")}return[n].join("\n")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){function r(t){for(var e=0;e<t.length;e++){var n=t[e],r=l[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(i(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o<n.parts.length;o++)a.push(i(n.parts[o]));l[n.id]={id:n.id,refs:1,parts:a}}}}function o(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function i(t){var e,n,r=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(r){if(h)return m;r.parentNode.removeChild(r)}if(v){var i=d++;r=f||(f=o()),e=a.bind(null,r,i,!1),n=a.bind(null,r,i,!0)}else r=o(),e=s.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function a(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=g(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function s(t,e){var n=e.css,r=e.media,o=e.sourceMap;if(r&&t.setAttribute("media",r),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var c="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!c)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 u=n(103),l={},p=c&&(document.head||document.getElementsByTagName("head")[0]),f=null,d=0,h=!1,m=function(){},v="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n){h=n;var o=u(t,e);return r(o),function(e){for(var n=[],i=0;i<o.length;i++){var a=o[i];(s=l[a.id]).refs--,n.push(s)}for(e?r(o=u(t,e)):o=[],i=0;i<n.length;i++){var s;if(0===(s=n[i]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete l[s.id]}}}};var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){"use strict";var r=n(104),o=n(49),i=n(6),a=n(0),s=n(13),c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.a={name:"el-amap",mixins:[a.a],props:["viewMode","skyColor","rotateEnable","pitch","buildingAnimation","pitchEnable","vid","events","center","zoom","draggEnable","level","zooms","lang","defaultCursor","crs","animateEnable","isHotspot","defaultLayer","rotateEnable","resizeEnable","showIndoorMap","indoorMap","expandZoomRange","dragEnable","zoomEnable","doubleClickZoom","keyboardEnable","jogEnable","scrollWheel","touchZoom","mapStyle","plugin","features","amapManager"],beforeCreate:function(){this._loadPromise=s.b.load()},destroyed:function(){this.$amap&&this.$amap.destroy()},computed:{plugins:function(){var t=[],e=/^AMap./,n=function(t){return e.test(t)?t:"AMap."+t},r=function(t){return t.replace(e,"")};return"string"==typeof this.plugin?t.push({pName:n(this.plugin),sName:r(this.plugin)}):this.plugin instanceof Array&&(t=this.plugin.map((function(t){var e={};return"string"==typeof t?e={pName:n(t),sName:r(t)}:(t.pName=n(t.pName),t.sName=r(t.pName),e=t),e}))),t}},data:function(){return{converters:{center:function(t){return Object(i.d)(t)}},handlers:{zoomEnable:function(t){this.setStatus({zoomEnable:t})},dragEnable:function(t){this.setStatus({dragEnable:t})},rotateEnable:function(t){this.setStatus({rotateEnable:t})}}}},mounted:function(){this.createMap()},addEvents:function(){var t=this;this.$amapComponent.on("moveend",(function(){var e=t.$amapComponent.getCenter();t.center=[e.getLng(),e.getLat()]}))},methods:{addPlugins:function(){var t=this.plugins.filter((function(t){return!AMap[t.sName]}));return t&&t.length?this.$amapComponent.plugin(t,this.addMapControls):this.addMapControls()},addMapControls:function(){var t=this;this.plugins&&this.plugins.length&&(this.$plugins=this.$plugins||{},this.plugins.forEach((function(e){var n=t.convertAMapPluginProps(e),r=t.$plugins[n.pName]=new AMap[n.sName](n);if(t.$amapComponent.addControl(r),e.events)for(var o in e.events){var i=e.events[o];"init"===o?i(r):AMap.event.addListener(r,o,i)}})))},convertAMapPluginProps:function(t){if("object"===(void 0===t?"undefined":c(t))&&t.pName){switch(t.pName){case"AMap.ToolBar":case"AMap.Scale":t.offset&&t.offset instanceof Array&&(t.offset=Object(i.e)(t.offset))}return t}return""},setStatus:function(t){this.$amap.setStatus(t)},createMap:function(){var t=this;this._loadPromise.then((function(){var e=t.$el.querySelector(".el-vue-amap"),n=t.vid||Object(r.a)();e.id=n,t.$amap=t.$amapComponent=new AMap.Map(n,t.convertProps()),t.amapManager&&t.amapManager.setMap(t.$amap),t.$emit(o.a.AMAP_READY_EVENT,t.$amap),t.$children.forEach((function(e){e.$emit(o.a.AMAP_READY_EVENT,t.$amap)})),t.plugins&&t.plugins.length&&t.addPlugins()}))},$$getCenter:function(){return this.$amap?Object(i.b)(this.$amap.getCenter()):Object(i.b)(this.center)}}}},function(t,e,n){"use strict";e.a={AMAP_READY_EVENT:"AMAP_READY_EVENT"}},function(t,e,n){"use strict";var r=void 0,o=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._listener=new Map}return t.prototype.addListener=function(t,e,n,r){if(!AMap.event)throw new Error("please wait for Map API load");var o=AMap.event.addListener(t,e,n,r);this._listener.get(t)||this._listener.set(t,{});var i=this._listener.get(t);i[e]||(i[e]=[]),i[e].push(o)},t.prototype.removeListener=function(t,e,n){if(!AMap.event)throw new Error("please wait for Map API load");if(this._listener.get(t)&&this._listener.get(t)[e]){var r=this._listener.get(t)[e];if(n){var o=r.indexOf(n);AMap.event.removeListener(r[o]),r.splice(o,1)}else r.forEach((function(t){AMap.event.removeListener(t)})),this._listener.get(t)[e]=[]}},t.prototype.addListenerOnce=function(t,e,n,r){return AMap.event.addListenerOnce(t,e,n,r)},t.prototype.trigger=function(t,e,n){return AMap.event.trigger(t,e,n)},t.prototype.clearListeners=function(t){var e=this,n=this._listener.get(t);n&&Object.keys(n).map((function(n){e.removeListener(t,n)}))},t}();r=r||new o,e.a=r},function(t,e,n){"use strict";var r=n(0),o=n(6),i=n(52),a=n(19),s=n.n(a),c="el-amap-marker";e.a={name:c,mixins:[r.a],props:["vid","position","offset","icon","content","topWhenClick","bubble","draggable","raiseOnDrag","cursor","visible","zIndex","angle","autoRotation","animation","shadow","title","clickable","shape","extData","label","events","onceEvents","template","vnode","contentRender"],data:function(){var t=this;return{$tagName:c,withSlots:!1,tmpVM:null,propsRedirect:{template:"content",vnode:"content",contentRender:"content"},converters:{shape:function(t){return new AMap.MarkerShape(t)},shadow:function(t){return new AMap.Icon(t)},template:function(e){var n=Object(i.a)(e,t);return this.$customContent=n,n.$el},vnode:function(e){var n="function"==typeof e?e(t):e,r=Object(i.c)(n);return this.$customContent=r,r.$el},contentRender:function(e){var n=Object(i.b)(e,t);return this.$customContent=n,n.$el},label:function(t){var e=t.content,n=void 0===e?"":e,r=t.offset,i=void 0===r?[0,0]:r;return{content:n,offset:Object(o.e)(i)}}},handlers:{zIndex:function(t){this.setzIndex(t)},visible:function(t){!1===t?this.hide():this.show()}}}},created:function(){this.tmpVM=new s.a({data:function(){return{node:""}},render:function(t){var e=this.node;return t("div",{ref:"node"},Array.isArray(e)?e:[e])}}).$mount()},methods:{__initComponent:function(t){this.$slots.default&&this.$slots.default.length&&(t.content=this.tmpVM.$refs.node),this.$amapComponent=new AMap.Marker(t)},$$getExtData:function(){return this.$amapComponent.getExtData()},$$getPosition:function(){return Object(o.b)(this.$amapComponent.getPosition())},$$getOffset:function(){return Object(o.c)(this.$amapComponent.getOffset())}},render:function(t){var e=this.$slots.default||[];return e.length&&(this.tmpVM.node=e),null},destroyed:function(){this.tmpVM.$destroy(),this.$customContent&&this.$customContent.$destroy&&this.$customContent.$destroy()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return c}));var r=n(19),o=n.n(r),i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function(t,e){var n={},r=o.a.compile(t);["methods","computed","data","filters"].forEach((function(t){n[t]=e.$parent.$parent.$options[t],"data"===t&&"function"==typeof n[t]&&(n[t]=n[t]())}));var a=new o.a(i({},n,r));return a.$mount(),a},s=function(t){var e=new o.a({render:function(e){return e("div",t)}});return e.$mount(),e},c=function(t,e){var n=new o.a({render:function(n){return t(n,e)}});return n.$mount(),n}},function(t,e,n){"use strict";var r=n(0),o=n(13);e.a={name:"el-amap-search-box",mixins:[r.a],props:["searchOption","onSearchResult","events","default"],data:function(){return{keyword:this.default||"",tips:[],selectedTip:-1,loaded:!1,adcode:null}},mounted:function(){var t=this;o.b.load().then((function(){t.loaded=!0,t._onSearchResult=t.onSearchResult,t.events&&t.events.init&&t.events.init({autoComplete:t._autoComplete,placeSearch:t._placeSearch})}))},computed:{_autoComplete:function(){if(this.loaded)return new AMap.Autocomplete(this.searchOption||{})},_placeSearch:function(){if(this.loaded)return new AMap.PlaceSearch(this.searchOption||{})}},methods:{autoComplete:function(){var t=this;this.keyword&&this._autoComplete&&this._autoComplete.search(this.keyword,(function(e,n){"complete"===e&&(t.tips=n.tips)}))},search:function(){var t=this;if(this.tips=[],this._placeSearch){var e;e=this.searchOption.citylimit&&this.searchOption.city?this.searchOption.city:this.adcode,this._placeSearch.setCity(e||this.searchOption.city),this._placeSearch.search(this.keyword,(function(e,n){if(n&&n.poiList&&n.poiList.count){var r=n.poiList.pois.map((function(t){return t.lat=t.location.lat,t.lng=t.location.lng,t}));t._onSearchResult(r)}else if(void 0===n.poiList)throw new Error(n)}))}},changeTip:function(t){this.adcode=t.adcode,this.keyword=t.name,this.search()},selectTip:function(t){"up"===t&&this.selectedTip>0?(this.selectedTip-=1,this.keyword=this.tips[this.selectedTip].name,this.adcode=this.tips[this.selectedTip].adcode):"down"===t&&this.selectedTip+1<this.tips.length&&(this.selectedTip+=1,this.keyword=this.tips[this.selectedTip].name,this.adcode=this.tips[this.selectedTip].adcode)}}}},function(t,e,n){"use strict";var r=n(0),o=n(6),i=n(26);e.a={name:"el-amap-circle",mixins:[r.a,i.a],props:["vid","zIndex","center","bubble","radius","strokeColor","strokeOpacity","strokeWeight","editable","fillColor","fillOpacity","strokeStyle","extData","strokeDasharray","events","visible","extData","onceEvents"],data:function(){return{converters:{center:function(t){return Object(o.d)(t)}},handlers:{zIndex:function(t){this.setzIndex(t)},visible:function(t){!1===t?this.hide():this.show()},editable:function(t){!0===t?this.editor.open():this.editor.close()}}}},methods:{__initComponent:function(t){this.$amapComponent=new AMap.Circle(t),this.$amapComponent.editor=new AMap.CircleEditor(this.$amap,this.$amapComponent)},$$getCenter:function(){return Object(o.b)(this.$amapComponent.getCenter())}}}},function(t,e,n){"use strict";var r=n(0);e.a={name:"el-amap-ground-image",mixins:[r.a],props:["vid","clickable","opacity","url","bounds","visible","events","onceEvents"],destroyed:function(){this.$amapComponent.setMap(null)},data:function(){return{converters:{},handlers:{visible:function(t){!1===t?this.setMap(null):this.setMap(this.$amap)}}}},methods:{__initComponent:function(t){this.$amapComponent=new AMap.ImageLayer(t)}}}},function(t,e,n){"use strict";var r=n(6),o=n(0),i=n(52),a=n(19),s=n.n(a);e.a={name:"el-amap-info-window",mixins:[o.a],props:["vid","isCustom","autoMove","closeWhenClickMap","content","size","offset","position","showShadow","visible","events","template","vnode","contentRender"],data:function(){var t=this;return{withSlots:!1,tmpVM:null,propsRedirect:{template:"content",vnode:"content",contentRender:"content"},converters:{template:function(e){var n=Object(i.a)(e,t);return this.$customContent=n,n.$el},vnode:function(e){var n="function"==typeof e?e(t):e,r=Object(i.c)(n);return this.$customContent=r,r.$el},contentRender:function(e){var n=Object(i.b)(e,t);return this.$customContent=n,n.$el}},handlers:{visible:function(e){var n=this.getPosition();n&&(!1===e?this.close():this.open(t.$amap,[n.lng,n.lat]))},template:function(t){this.setContent(t)}}}},created:function(){this.tmpVM=new s.a({data:function(){return{node:""}},render:function(t){var e=this.node;return t("div",{ref:"node"},Array.isArray(e)?e:[e])}}).$mount()},destroyed:function(){this.$amapComponent.close(),this.tmpVM.$destroy(),this.$customContent&&this.$customContent.$destroy&&this.$customContent.$destroy()},methods:{__initComponent:function(t){this.$slots.default&&this.$slots.default.length&&(t.content=this.tmpVM.$refs.node),delete t.map,this.$amapComponent=new AMap.InfoWindow(t),!1!==this.visible&&this.$amapComponent.open(this.$amap,Object(r.d)(this.position))}},render:function(t){var e=this.$slots.default||[];return e.length&&(this.tmpVM.node=e),null}}},function(t,e,n){"use strict";var r=n(0),o=n(26),i=n(6);e.a={name:"el-amap-polyline",mixins:[r.a,o.a],props:["vid","zIndex","visible","editable","bubble","geodesic","isOutline","outlineColor","path","strokeColor","strokeOpacity","strokeWeight","strokeStyle","strokeDasharray","events","extData","onceEvents","lineJoin"],data:function(){return{converters:{},handlers:{visible:function(t){!1===t?this.hide():this.show()},editable:function(t){!0===t?this.editor.open():this.editor.close()}}}},methods:{__initComponent:function(t){this.$amapComponent=new AMap.Polyline(t),this.$amapComponent.editor=new AMap.PolyEditor(this.$amap,this.$amapComponent)},$$getPath:function(){return this.$amapComponent.getPath().map(i.b)},$$getBounds:function(){return this.$amapComponent.getBounds()},$$getExtData:function(){return this.$amapComponent.getExtData()}}}},function(t,e,n){"use strict";var r=n(0),o=n(26),i=n(6);e.a={name:"el-amap-polygon",mixins:[r.a,o.a],props:["vid","zIndex","path","bubble","strokeColor","strokeOpacity","strokeWeight","fillColor","editable","fillOpacity","extData","strokeStyle","visible","strokeDasharray","events","onceEvents","draggable"],data:function(){return{converters:{},handlers:{visible:function(t){!1===t?this.hide():this.show()},zIndex:function(t){this.setOptions({zIndex:t})},editable:function(t){!0===t?this.editor.open():this.editor.close()}}}},methods:{__initComponent:function(){var t=this.convertProps();this.$amapComponent=new AMap.Polygon(t),this.$amapComponent.editor=new AMap.PolyEditor(this.$amap,this.$amapComponent)},$$getPath:function(){return this.$amapComponent.getPath().map(i.b)},$$getExtData:function(){return this.$amapComponent.getExtData()},$$contains:function(t){return Array.isArray(t)&&(t=new AMap.LngLat(t[0],t[1])),this.$amapComponent.getBounds().contains(t)}}}},function(t,e,n){"use strict";var r=n(0),o="el-amap-text";e.a={name:o,mixins:[r.a],props:{vid:{type:String,default:""},text:{type:String,default:""},textAlign:{type:String,default:""},verticalAlign:{type:String,default:""},position:{type:Array,default:function(){return[0,0]},$type:"LngLat"},offset:{type:Array,default:function(){return[0,0]},$type:"Pixel"},topWhenClick:{type:Boolean,default:function(){return!1}},bubble:{type:Boolean,default:function(){return!1}},draggable:{type:Boolean,default:function(){return!1}},raiseOnDrag:{type:Boolean,default:function(){return!1}},cursor:{type:String,default:function(){return""}},visible:{type:Boolean,default:function(){return!0}},zIndex:{type:Number,default:function(){return 100}},angle:{type:Number,default:function(){return 0}},autoRotation:{type:Boolean,default:function(){return!1}},animation:{type:String,default:function(){return"“AMAP_ANIMATION_NONE”"}},shadow:{type:Object,default:function(){return{}},$type:"Icon"},title:{type:String,default:function(){return""}},clickable:{type:Boolean,default:!0},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(t){this.setzIndex(t)},visible:function(t){!1===t?this.hide():this.show()}},amapTagName:o}},methods:{__initComponent:function(t){this.$amapComponent=new AMap.Text(t)}}}},function(t,e,n){"use strict";var r=n(0),o="el-amap-bezier-curve";e.a={name:o,mixins:[r.a],props:{vid:{type:String},path:{type:Array},strokeColor:{type:String},strokeOpacity:{type:Number},strokeWeight:{type:Number,default:function(){return 1}},strokeStyle:{type:String},strokeDasharray:{type:Array},zIndex:{type:Number},showDir:{type:Boolean},bubble:{type:Boolean},cursor:{type:String},outlineColor:{type:Boolean},isOutline:{type:Boolean},visible:{type:Boolean,default:!0},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(t){this.setzIndex(t)},visible:function(t){!1===t?this.hide():this.show()}},amapTagName:o}},methods:{__initComponent:function(t){this.$amapComponent=new AMap.BezierCurve(t)}}}},function(t,e,n){"use strict";var r=n(0),o="el-amap-circle-marker";e.a={name:o,mixins:[r.a],props:{vid:{type:String},zIndex:{type:Number},visible:{type:Boolean,default:!0},center:{type:Array,$type:"LngLat"},bubble:{type:Boolean},radius:{type:Number},strokeColor:{type:String},strokeOpacity:{type:Number},strokeWeight:{type:Number},fillColor:{type:String},fillOpacity:{type:Number},extData:{type:Object},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(t){this.setzIndex(t)},visible:function(t){!1===t?this.hide():this.show()}},amapTagName:o}},methods:{__initComponent:function(t){this.$amapComponent=new AMap.CircleMarker(t)}}}},function(t,e,n){"use strict";var r=n(0),o="el-amap-ellipse";e.a={name:o,mixins:[r.a],props:{vid:{type:String},zIndex:{type:Number},center:{type:Array,$type:"LngLat"},radius:{type:Array,default:function(){return[1e3,1e3]}},bubble:{type:Boolean},cursor:{type:String},strokeColor:{type:String},strokeOpacity:{type:Number},strokeWeight:{type:Number},fillColor:{type:String},fillOpacity:{type:Number},strokeStyle:{type:String},extData:{type:Object,default:function(){return{}}},visible:{type:Boolean,default:!0},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(t){this.setzIndex(t)},visible:function(t){!1===t?this.hide():this.show()}},amapTagName:o}},methods:{__initComponent:function(t){this.$amapComponent=new AMap.Ellipse(t)}}}},function(t,e,n){"use strict";var r=n(0),o="el-amap-rectangle";e.a={name:o,mixins:[r.a],props:{vid:{type:String},zIndex:{type:Number},center:{type:Array,$type:"LngLat"},bounds:{type:Array,$type:"Bounds"},bubble:{type:Boolean},cursor:{type:String},strokeColor:{type:String},strokeOpacity:{type:Number},strokeWeight:{type:Number},fillColor:{type:String},fillOpacity:{type:Number},strokeStyle:{type:String},extData:{type:Object,default:function(){return{}}},visible:{type:Boolean,default:!0},events:{type:Object,default:function(){return{}}}},data:function(){return{converters:{},handlers:{zIndex:function(t){this.setzIndex(t)},visible:function(t){!1===t?this.hide():this.show()}},amapTagName:o}},methods:{__initComponent:function(t){this.$amapComponent=new AMap.Rectangle(t)}}}},function(t,e,n){t.exports=n(27)},function(t,e,n){"use strict";var r=n(66);n.n(r)},function(t,e,n){n(67),n(68),n(81),n(84),t.exports=n(16).Map},function(t,e,n){"use strict";var r=n(28),o={};o[n(2)("toStringTag")]="z",o+""!="[object z]"&&n(7)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){"use strict";var r=n(69)(!0);n(23)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(21),o=n(22);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(35),o=n(20),i=n(25),a={};n(8)(a,n(2)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(9),o=n(10),i=n(36);t.exports=n(5)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(11),o=n(18),i=n(76)(!1),a=n(24)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},function(t,e,n){var r=n(29);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(18),o=n(37),i=n(77);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),l=i(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(21),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(3).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(11),o=n(80),i=n(24)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(22);t.exports=function(t){return Object(r(t))}},function(t,e,n){for(var r=n(82),o=n(36),i=n(7),a=n(3),s=n(8),c=n(12),u=n(2),l=u("iterator"),p=u("toStringTag"),f=c.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),m=0;m<h.length;m++){var v,g=h[m],y=d[g],_=a[g],b=_&&_.prototype;if(b&&(b[l]||s(b,l,f),b[p]||s(b,p,g),c[g]=f,y))for(v in r)b[v]||i(b,v,r[v],!0)}},function(t,e,n){"use strict";var r=n(83),o=n(39),i=n(12),a=n(18);t.exports=n(23)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(2)("unscopables"),o=Array.prototype;null==o[r]&&n(8)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){"use strict";var r=n(85),o=n(44);t.exports=n(90)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(9).f,o=n(35),i=n(40),a=n(17),s=n(41),c=n(42),u=n(23),l=n(39),p=n(89),f=n(5),d=n(43).fastKey,h=n(44),m=f?"_s":"size",v=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var l=t((function(t,r){s(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[m]=0,null!=r&&c(r,n,t[u],t)}));return i(l.prototype,{clear:function(){for(var t=h(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var n=h(this,e),r=v(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[m]--}return!!r},forEach:function(t){h(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!v(h(this,e),t)}}),f&&r(l.prototype,"size",{get:function(){return h(this,e)[m]}}),l},def:function(t,e,n){var r,o,i=v(t,e);return i?i.v=n:(t._l=i={i:o=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[m]++,"F"!==o&&(t._i[o]=i)),t},getEntry:v,setStrong:function(t,e,n){u(t,e,(function(t,n){this._t=h(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?l(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,l(1))}),n?"entries":"values",!n,!0),p(e)}}},function(t,e,n){var r=n(10);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(12),o=n(2)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(28),o=n(2)("iterator"),i=n(12);t.exports=n(16).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){"use strict";var r=n(3),o=n(9),i=n(5),a=n(2)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(3),o=n(34),i=n(7),a=n(40),s=n(43),c=n(42),u=n(41),l=n(4),p=n(15),f=n(91),d=n(25),h=n(92);t.exports=function(t,e,n,m,v,g){var y=r[t],_=y,b=v?"set":"add",C=_&&_.prototype,x={},w=function(t){var e=C[t];i(C,t,"delete"==t||"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof _&&(g||C.forEach&&!p((function(){(new _).entries().next()})))){var M=new _,$=M[b](g?{}:-0,1)!=M,k=p((function(){M.has(1)})),S=f((function(t){new _(t)})),A=!g&&p((function(){for(var t=new _,e=5;e--;)t[b](e,e);return!t.has(-0)}));S||(_=e((function(e,n){u(e,_,t);var r=h(new y,e,_);return null!=n&&c(n,v,r[b],r),r})),_.prototype=C,C.constructor=_),(k||A)&&(w("delete"),w("has"),v&&w("get")),(A||$)&&w(b),g&&C.clear&&delete C.clear}else _=m.getConstructor(e,t,v,b),a(_.prototype,n),s.NEED=!0;return d(_,t),x[t]=_,o(o.G+o.W+o.F*(_!=y),x),g||m.setStrong(_,t,v),_}},function(t,e,n){var r=n(2)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){var r=n(4),o=n(93).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){var r=n(4),o=n(10),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(17)(Function.call,n(94).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(95),o=n(20),i=n(18),a=n(33),s=n(11),c=n(31),u=Object.getOwnPropertyDescriptor;e.f=n(5)?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";t.exports=function(){var t=[].map.call(arguments,(function(t){return t.trim()})).filter((function(t){return t.length})).join("-");return t.length?1!==t.length&&/[_.\- ]+/.test(t)?t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(function(t,e){return e.toUpperCase()})):t[0]===t[0].toLowerCase()&&t.slice(1)!==t.slice(1).toLowerCase()?t:t.toLowerCase():""}},function(t,e,n){"use strict";var r=n(98),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i={key:null,v:"1.4.4",protocol:"https",hostAndPath:"webapi.amap.com/maps",plugin:[],callback:"amapInitComponent"},a=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._config=o({},i,e),this._document=document,this._window=window,this._scriptLoaded=!1,this._queueEvents=[r.a]}return t.prototype.load=function(){var t=this;if(this._window.AMap&&this._window.AMap.Map)return this.loadUIAMap();if(this._scriptLoadingPromise)return this._scriptLoadingPromise;var e=this._document.createElement("script");e.type="text/javascript",e.async=!0,e.defer=!0,e.src=this._getScriptSrc();var n=this._config.uiVersion?this.loadUIAMap():null;return this._scriptLoadingPromise=new Promise((function(r,o){t._window.amapInitComponent=function(){for(;t._queueEvents.length;)t._queueEvents.pop().apply();if(!n)return r();n.then((function(){window.initAMapUI(),setTimeout(r)}))},e.onerror=function(t){return o(t)}})),this._document.head.appendChild(e),this._scriptLoadingPromise},t.prototype.loadUIAMap=function(){var t=this;return!this._config.uiVersion||window.AMapUI?Promise.resolve():new Promise((function(e,n){var r=document.createElement("script"),o=t._config.uiVersion.split("."),i=o[0],a=o[1],s=o[2];if(void 0!==i&&void 0!==a){var c=t._config.protocol+"://webapi.amap.com/ui/"+i+"."+a+"/main-async.js";s&&(c+="?v="+i+"."+a+"."+s),r.src=c,r.type="text/javascript",r.async=!0,t._document.head.appendChild(r),r.onload=function(){setTimeout(e,0)},r.onerror=function(){return n()}}else console.error("amap ui version is not correct, please check! version: ",t._config.uiVersion)}))},t.prototype._getScriptSrc=function(){var t=/^AMap./,e=this._config,n=["v","key","plugin","callback"];if(e.plugin&&e.plugin.length>0){e.plugin.push("Autocomplete","PlaceSearch","PolyEditor","CircleEditor");var r=[];e.plugin.forEach((function(e){var n=t.test(e)?e:"AMap."+e,o=n.replace(t,"");r.push(n,o)})),e.plugin=r}var o=Object.keys(e).filter((function(t){return~n.indexOf(t)})).filter((function(t){return null!=e[t]})).filter((function(t){return!Array.isArray(e[t])||Array.isArray(e[t])&&e[t].length>0})).map((function(t){var n=e[t];return Array.isArray(n)?{key:t,value:n.join(",")}:{key:t,value:n}})).map((function(t){return t.key+"="+t.value})).join("&");return this._config.protocol+"://"+this._config.hostAndPath+"?"+o},t}();e.a=a},function(t,e,n){"use strict";e.a=function(){if(AMap.UA.ios&&"https:"!==document.location.protocol){var t=new r.a;navigator.geolocation.getCurrentPosition=function(){return t.getCurrentPosition.apply(t,arguments)},navigator.geolocation.watchPosition=function(){return t.watchPosition.apply(t,arguments)}}};var r=n(99)},function(t,e,n){"use strict";function r(){this._remoteSvrUrl="https://webapi.amap.com/html/geolocate.html",this._callbackList=[],this._seqBase=1,this._frameReady=0,this._watchIdMap={}}r.prototype={_getSeq:function(){return this._seqBase++},_onRrameReady:function(t){if(0===this._frameReady)return this._frameReadyList||(this._frameReadyList=[]),this._frameReadyList.push(t),void this._prepareIframe();t.call(this)},_prepareIframe:function(){if(!this._iframeWin){var t=document.createElement("iframe");t.src=this._remoteSvrUrl+(this._remoteSvrUrl.indexOf("?")>0?"&":"?"),t.width="0px",t.height="0px",t.style.position="absolute",t.style.display="none",t.allow="geolocation";var e=this,n=setTimeout((function(){e._frameReady=!1,e._callbackFrameReadyList()}),5e3);t.onload=function(){clearTimeout(n),e._frameReady=!0,e._callbackFrameReadyList(),t.onload=null},document.body.appendChild(t),this._iframeWin=t.contentWindow,window.addEventListener("message",(function(t){0===e._remoteSvrUrl.indexOf(t.origin)&&e._handleRemoteMsg(t.data)}),!1)}},_callbackFrameReadyList:function(){if(this._frameReadyList){var t=this._frameReadyList;this._frameReadyList=null;for(var e=0,n=t.length;e<n;e++)t[e].call(this,this._frameReady)}},_pickCallback:function(t,e){for(var n=this._callbackList,r=0,o=n.length;r<o;r++){var i=n[r];if(t===i.seq)return e||n.splice(r,1),i}},_handleRemoteMsg:function(t){var e=t.seq,n=this._pickCallback(e,!!t.notify);n?n.cbk.call(null,t.error,t.result):console.warn("Receive remote msg: ",t)},_postMessage:function(t,e,n,r){this._prepareIframe();var o={cmd:t,args:e,seq:r||this._getSeq()};this._callbackList.push({cbk:n,seq:o.seq}),this._onRrameReady((function(){if(!0===this._frameReady)try{this._iframeWin.postMessage(o,"*")}catch(t){this._pickCallback(o.seq),n(t)}else this._pickCallback(o.seq),n({message:"iFrame load failed!"})}))},getCurrentPosition:function(t,e,n){this._postMessage("getCurrentPosition",[n],(function(n,r){n?e&&e(n):t&&t(r)}))},watchPosition:function(t,e,n){var r="wk"+this._getSeq(),o=this._getSeq();this._watchIdMap[r]={stat:0,seq:o};var i=this;return this._postMessage("watchPosition",[n],(function(n,o){var a=null;o&&(a=o.id);var s=i._watchIdMap[r];if(s.id=a,s.stat=1,s.callbackList){var c=s.callbackList;s.callbackList=null;for(var u=0,l=c.length;u<l;u++)c[u].call(i,a)}n?e&&e(n):t&&t(o.pos)}),o),r},clearWatch:function(t,e){function n(n){o._postMessage("clearWatch",[n],(function(n,i){n||(o._pickCallback(r.seq),delete o._watchIdMap[t]),e&&e(n,i)}))}if(this._watchIdMap[t]){var r=this._watchIdMap[t],o=this;r.stat<1?(r.callbackList||(r.callbackList=[]),r.callbackList.push((function(t){n(t)}))):n(r.id)}else e("Id not exists: "+t)}},e.a=r},function(t,e,n){"use strict";var r=n(48),o=n(105),i=n(1),a=function(t){n(101)},s=Object(i.a)(r.a,o.a,o.b,!1,a,null,null);e.a=s.exports},function(t,e,n){var r=n(102);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),n(47)("d6014b94",r,!0)},function(t,e,n){(t.exports=n(46)(!1)).push([t.i,".el-vue-amap-container,.el-vue-amap-container .el-vue-amap{height:100%}",""])},function(t,e){t.exports=function(t,e){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=i[0],s={id:t+":"+o,css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}},function(t,e,n){"use strict";e.a=function(){for(var t=[],e="0123456789abcdef",n=0;n<36;n++)t[n]=e.substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"el-vue-amap-container"},[n("div",{staticClass:"el-vue-amap"}),t._v(" "),t._t("default")],2)},o=[]},function(t,e,n){"use strict";var r=n(51),o=n(1),i=Object(o.a)(r.a,void 0,void 0,!1,null,null,null);e.a=i.exports},function(t,e,n){"use strict";var r=n(53),o=n(110),i=n(1),a=function(t){n(108)},s=Object(i.a)(r.a,o.a,o.b,!1,a,null,null);e.a=s.exports},function(t,e,n){var r=n(109);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),n(47)("80e271aa",r,!0)},function(t,e,n){(t.exports=n(46)(!1)).push([t.i,".el-vue-search-box-container{position:relative;width:360px;height:45px;background:#fff;box-shadow:0 2px 2px rgba(0,0,0,.15);border-radius:2px 3px 3px 2px;z-index:10}.el-vue-search-box-container .search-box-wrapper{position:absolute;display:flex;align-items:center;left:0;top:0;width:100%;height:100%;box-sizing:border-box}.el-vue-search-box-container .search-box-wrapper input{flex:1;height:20px;line-height:20px;letter-spacing:.5px;font-size:14px;text-indent:10px;box-sizing:border-box;border:none;outline:none}.el-vue-search-box-container .search-box-wrapper .search-btn{width:45px;height:100%;display:flex;align-items:center;justify-content:center;background:transparent;cursor:pointer}.el-vue-search-box-container .search-tips{position:absolute;top:100%;border:1px solid #dbdbdb;background:#fff;overflow:auto}.el-vue-search-box-container .search-tips ul{padding:0;margin:0}.el-vue-search-box-container .search-tips ul li{height:40px;line-height:40px;box-shadow:0 1px 1px rgba(0,0,0,.1);padding:0 10px;cursor:pointer}.el-vue-search-box-container .search-tips ul li.autocomplete-selected{background:#eee}",""])},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"el-vue-search-box-container",on:{keydown:[function(e){if(!("button"in e)&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"]))return null;t.selectTip("up")},function(e){if(!("button"in e)&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"]))return null;t.selectTip("down")}]}},[n("div",{staticClass:"search-box-wrapper"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.keyword,expression:"keyword"}],attrs:{type:"text"},domProps:{value:t.keyword},on:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.search(e):null},input:[function(e){e.target.composing||(t.keyword=e.target.value)},t.autoComplete]}}),t._v(" "),n("span",{staticClass:"search-btn",on:{click:t.search}},[t._v("搜索")])]),t._v(" "),n("div",{staticClass:"search-tips"},[n("ul",t._l(t.tips,(function(e,r){return n("li",{key:r,class:{"autocomplete-selected":r===t.selectedTip},on:{click:function(n){t.changeTip(e)},mouseover:function(e){t.selectedTip=r}}},[t._v(t._s(e.name))])})))])])},o=[]},function(t,e,n){"use strict";var r=n(54),o=n(112),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=n(55),o=n(114),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=n(56),o=n(1),i=Object(o.a)(r.a,void 0,void 0,!1,null,null,null);e.a=i.exports},function(t,e,n){"use strict";var r=n(57),o=n(117),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=n(58),o=n(119),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=n(59),o=n(121),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=n(60),o=n(123),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=n(61),o=n(125),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=n(62),o=n(127),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=n(63),o=n(129),i=n(1),a=Object(i.a)(r.a,o.a,o.b,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));var r=function(){var t=this.$createElement;return(this._self._c||t)("div")},o=[]},function(t,e,n){"use strict";var r=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._componentMap=new Map,this._map=null}return t.prototype.setMap=function(t){this._map=t},t.prototype.getMap=function(){return this._map},t.prototype.setComponent=function(t,e){this._componentMap.set(t,e)},t.prototype.getComponent=function(t){return this._componentMap.get(t)},t.prototype.getChildInstance=function(t){return this.getComponent(t)},t.prototype.removeComponent=function(t){this._componentMap.delete(t)},t}();e.a=r},function(t,e,n){"use strict";var r=n(0),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.a=function(t){var e=t.init,n=t.data,i=void 0===n?function(){return{}}:n,a=t.converters,s=void 0===a?{}:a,c=t.handlers,u=void 0===c?{}:c,l=t.computed,p=t.methods,f=t.name,d=t.render,h=t.contextReady,m=t.template,v=t.mixins,g=void 0===v?[]:v,y=t.props,_=o({},t,{props:void 0===y?{}:y,data:function(){return o({},i(),{converters:s,handlers:u})},mixins:[r.a].concat(g),computed:l,methods:o({},p,{__initComponent:e,__contextReady:h})});return m||d||(_.render=function(){return null}),_.install=function(t){return t.use(f,_)},_}}]))},4486:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,c):[c]}return{exports:t,options:u}}n.d(e,{A:function(){return r}})},5554:function(t){t.exports=function(){return this.Vue}()}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{default:function(){return V}});var t=function(){var t=this,e=t.$createElement;return(t._self._c||e)(t.curComponent,t._g(t._b({tag:"component",staticClass:"bpm-map-location",attrs:{value:t.curVal,fieldConf:t.fieldConf,row:t.row,mode:t.mode,uiType:t.uiType},on:{change:t.handleChange}},"component",t.$attrs,!1),t.$listeners))};t._withStripped=!0;var e=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"bpm-map-location-editor"},[t.isDialog?n("div",[t._l(t.curVal,(function(e,r){return t.isMultiple&&1!=t.curVal.length?t._e():n("span",{key:r},[t._v("\n "+t._s(e.address)+"\n ")])})),t._v(" "),n("i",{staticClass:"fa fa-map-marker",on:{click:t.openMapDialog}}),t._v(" "),t.isMultiple&&t.curVal.length>1?n("span",{key:t.index},[t._v("\n "+t._s(t.curVal.length)+"\n ")]):t._e(),t._v(" "),n("el-dialog",{attrs:{title:t.fieldConf.name,visible:t.dialogMapVisible,"append-to-body":!0,width:t.dialogWidth,"before-close":t.handleDialogMapClose},on:{"update:visible":function(e){t.dialogMapVisible=e}}},[n("div",{staticClass:"bpm-map-content"},[t.isMultiple&&t.dialogMarkers.length>1?[t.isMultiple?[n("el-select",{staticStyle:{"margin-bottom":"10px",width:"100%"},attrs:{multiple:"","collapse-tags":"",placeholder:"请选择"},model:{value:t.selected,callback:function(e){t.selected=e},expression:"selected"}},t._l(t.selectOptions,(function(t){return n("el-option",{key:t.address,attrs:{label:t.address,value:t.address}})})),1)]:t._e()]:[t.showLocationTitle?n("div",{staticClass:"current-select-loaction",staticStyle:{"margin-bottom":"10px"}},[t._v("\n "+t._s(t.$z("当前地址","c.current_location"))+":\n "),t._l(t.dialogMarkers,(function(e,r){return n("span",{key:r},[t._v("\n "+t._s(e.address)+"\n ")])}))],2):t._e(),t._v(" "),t.showCoordinate?n("div",{staticClass:"current-select-loaction",staticStyle:{"margin-bottom":"10px"}},[t._v("\n "+t._s(t.$z("当前坐标","c.current_coordinate"))+":\n "),t._l(t.dialogMarkers,(function(e,r){return n("span",{key:r},[n("el-tag",[t._v(" "+t._s(e.lng+","+e.lat))])],1)}))],2):t._e()],t._v(" "),t.dialogMapVisible?n("map-component",{attrs:{fieldConf:t.fieldConf,readonly:t.readonly},model:{value:t.dialogMarkers,callback:function(e){t.dialogMarkers=e},expression:"dialogMarkers"}}):t._e(),t._v(" "),t.readonly?t._e():n("div",{staticClass:"dialog-footer",staticStyle:{"margin-top":"20px"},attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogMapVisible=!1}}},[t._v(t._s(t.$z("取消","c.cancel")))]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.confirmMarkerSelect}},[t._v(t._s(t.$z("确定","c.confirm")))])],1)],2)])],2):n("div",{staticClass:"bpm-map-content"},[t.isMultiple?[n("el-select",{staticStyle:{"margin-bottom":"10px",width:"100%"},attrs:{multiple:"","collapse-tags":"",placeholder:"请选择"},model:{value:t.selected,callback:function(e){t.selected=e},expression:"selected"}},t._l(t.selectOptions,(function(t){return n("el-option",{key:t.address,attrs:{label:t.address,value:t.address}})})),1)]:t._l(t.curVal,(function(e,r){return n("span",{key:r},[t._v("\n "+t._s(e.address)+"\n ")])})),t._v(" "),n("map-component",{attrs:{fieldConf:t.fieldConf,readonly:t.readonly},on:{change:t.handleChange},model:{value:t.curVal,callback:function(e){t.curVal=e},expression:"curVal"}})],2)])};e._withStripped=!0;var o=function(){var t=this,e=t.$createElement;return(t._self._c||e)(t.curComponent,t._g(t._b({tag:"component",staticClass:"bpm-map",style:{height:t.height},attrs:{value:t.curVal,fieldConf:t.fieldConf,row:t.row,mode:t.mode,readonly:t.readonly,position:t.position},on:{change:t.handleChange}},"component",t.$attrs,!1),t.$listeners))};o._withStripped=!0;var i=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",[t._v("\n 谷歌地图\n")])};i._withStripped=!0;var a=n(4486),s=(0,a.A)({},i,[],!1,null,null,null);s.options.__file="components/lib/bpmMapLocation/src/widget/map_operator/google.vue";var c=s.exports,u=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.showMap?n("el-amap",{ref:"map",staticClass:"amapClass",attrs:{vid:"amapContainer",center:t.center,zoom:t.zoom}}):t._e()],1)};u._withStripped=!0;var l={props:{value:{type:[String,Number]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},readonly:{type:Boolean,default:!1},position:{type:Object,default(){return{latitude:"",longitude:""}}}},data(){return{map:null,geocoder:null,markers:[],init_markers:[],showMap:!1}},computed:{map_key(){return _.get(this.fieldConf,"map_key")},securityJsCode(){return _.get(this.fieldConf,"security_js_code",!1)},isMultiple(){return _.get(this.fieldConf,"multiple")},center(){if(this.readonly){if(this.markers&&this.markers.length)return[this.markers[0].lng,this.markers[0].lat]}else if(this.init_markers&&this.init_markers.length)return[this.init_markers[0].lng,this.init_markers[0].lat];if(this.position.longitude&&this.position.latitude)return[this.position.longitude,this.position.latitude];let t=_.get(this.fieldConf,"style.center");return t&&t[0]&&t[1]?[parseFloat(t[0]),parseFloat(t[1])]:[121.272011,31.200441]},zoom(){return parseInt(_.get(this.fieldConf,"style.zoom"))},showScale(){return _.get(this.fieldConf,"style.show_scale")},showSmallMap(){return _.get(this.fieldConf,"style.show_small_map")}},watch:{value(t){this.markers=t,this.init_markers&&!this.init_markers.length&&(this.init_markers=_.cloneDeep(this.markers)),this._setMarks()}},methods:{_init(t){console.log("地图初始化开始。。"),t()},_setMarks(){console.log("地图标记位置。。")},_eventBind(){console.log("地图事件绑定。。")},callBackFn(t){setTimeout((()=>{t._setMarks(),this.readonly||t._eventBind()}),100)},initMap(){setTimeout((()=>{this._init(this.callBackFn)}),100)}},mounted(){this.markers=this.value,this.init_markers=_.cloneDeep(this.markers),this.initMap()}},p=(0,a.A)(l,void 0,void 0,!1,null,null,null);p.options.__file="components/lib/bpmMapLocation/src/widget/map_operator/map_mixin.vue";var f=p.exports,d=n(966),h=n.n(d),m=n(5554);n.n(m)().use(h());var v={data(){return{}},mixins:[f],methods:{_init(t){this.securityJsCode&&(window._AMapSecurityConfig={securityJsCode:this.securityJsCode}),h().initAMapApiLoader({key:this.map_key,plugin:["Autocomplete","PlaceSearch","Scale","OverView","ToolBar","MapType","PolyEditor","AMap.CircleEditor","AMap.Geocoder"],v:"1.4.4"}),this.showMap=!0,d.lazyAMapApiLoaderInstance.load().then((()=>{console.log("this.$refs",this.$refs),this.$nextTick((()=>{this.map=this.$refs.map.$$getInstance(),this.geocoder=new AMap.Geocoder({}),console.log("this.map",this.map),t(this)}))}))},_setMarks(){return!_.isUndefined(AMap)&&!!this.map&&(console.log("AMap",AMap),this.map.clearMap(),console.log("this.markers",this.markers),void _.each(this.markers,(t=>{var e=new AMap.Marker({map:this.map,visible:!0,position:[t.lng,t.lat]});console.log("marker",e),e.setMap(this.map)})))},_eventBind(){this.handleClick()},initMap2(){setTimeout((()=>{this.showMap=!0,d.lazyAMapApiLoaderInstance.load().then((()=>{console.log("this.$refs",this.$refs),this.$nextTick((()=>{this.map=this.$refs.map.$$getInstance(),console.log("this.map",this.map),this.handleClick();var t=new AMap.Marker({map:this.map,visible:!0,position:[this.x,this.y]});console.log("marker",t),t.setMap(this.map)}))}))}),1e3)},handleClick(){let t=this;console.log("this.map",this.map),this.map.on("click",(e=>{let n=e.lnglat.lng,r=e.lnglat.lat,o=new AMap.Marker({visible:!0,position:[n,r]});this.isMultiple||(t.markers=[],t.map.clearMap()),console.log("marker",o),console.log("that.map",t.map),o.setMap(t.map);let i=[n,r];console.log("lnglat",i),t.geocoder.getAddress(i,(function(e,o){if("complete"===e&&o.regeocode){t.address=o.regeocode.formattedAddress;let e={address:t.address,lng:n,lat:r,type:""};_.isArray(t.markers)||(t.markers=[]),t.markers.push(e),console.log("thisPosition",e),t.$emit("change",t.markers)}else t.$message.error("根据经纬度查询地址失败")}))}))}}},g=(0,a.A)(v,u,[],!1,null,null,null);g.options.__file="components/lib/bpmMapLocation/src/widget/map_operator/amap.vue";var y=g.exports,b=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",[t._v("\n 百度地图\n")])};b._withStripped=!0;var C=(0,a.A)({},b,[],!1,null,null,null);C.options.__file="components/lib/bpmMapLocation/src/widget/map_operator/baidu.vue";var x=C.exports,w=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",[t._v("\n 腾讯地图\n")])};w._withStripped=!0;var M=(0,a.A)({},w,[],!1,null,null,null);M.options.__file="components/lib/bpmMapLocation/src/widget/map_operator/tencent.vue";var $=M.exports,k={name:"BpmMapLocation",components:{googleMap:c,aMap:y,baiduMap:x,tencentMap:$},props:{value:{type:Array},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},readonly:{type:Boolean,default:!1}},data(){return{position:{latitude:"",longitude:""},curVal:[]}},computed:{height(){return _.get(this.fieldConf,"style.height")+"px"},curComponent(){return"google"==this.fieldConf.operator?c:"amap"==this.fieldConf.operator?y:"baidu"==this.fieldConf.operator?x:"tencent"==this.fieldConf.operator?$:c}},watch:{value(t){this.curVal=t}},mounted(){this.curVal=this.value,navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition(this.getLocationSucess,this.getLocationError):console.log("浏览器不支持Geolocation API")},methods:{getLocationSucess(t){this.position.latitude=t.coords.latitude,this.position.longitude=t.coords.longitude,console.log("当前位置经度:"+this.position.longitude),console.log("当前位置纬度:"+this.position.latitude)},getLocationError(t){switch(t.code){case t.PERMISSION_DENIED:console.log("用户拒绝了位置请求");break;case t.POSITION_UNAVAILABLE:console.log("无法获取当前位置");break;case t.TIMEOUT:console.log("获取位置超时");break;case t.UNKNOWN_ERROR:console.log("发生未知错误")}},handleChange(t){this.$emit("input",t),this.$emit("change",t)}}},S=(0,a.A)(k,o,[],!1,null,null,null);S.options.__file="components/lib/bpmMapLocation/src/widget/map.vue";var A={components:{mapComponent:S.exports},data(){return{curVal:[],dialogMarkers:[],selected:[],selectOptions:[],dialogMapVisible:!1}},props:["value","fieldConf","row","uiType","readonly"],watch:{value(t){this.curVal=t,this.selectOptions=_.cloneDeep(t),this.selected=[],_.each(this.selectOptions,(t=>{this.selected.push(t.address)}))}},computed:{isDialog(){return"dialog"==_.get(this.fieldConf,"style.ui_type")||"table"==this.uiType},dialogWidth(){return _.get(this.fieldConf,"style.dialog_width")+"%"},showLocationTitle(){return _.get(this.fieldConf,"style.show_location_title")},showCoordinate(){return _.get(this.fieldConf,"style.show_coordinate")},isMultiple(){return _.get(this.fieldConf,"multiple")}},methods:{handleChange(t){console.log("map_location change: ",t),this.$emit("change",t)},openMapDialog(){this.dialogMapVisible=!0,this.dialogMarkers=this.curVal},confirmMarkerSelect(){this.dialogMapVisible=!1,this.curVal=this.dialogMarkers,this.handleChange(this.curVal)}},mounted(){}},E=(0,a.A)(A,e,[],!1,null,null,null);E.options.__file="components/lib/bpmMapLocation/src/part/editor.vue";var O=E.exports,L=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticClass:"bpm-map-loaction-view"},[n("map-location-editor",{attrs:{value:t.value,fieldConf:t.fieldConf,row:t.row,uiType:t.uiType,readonly:!0}})],1)};L._withStripped=!0;var j={components:{MapLocationEditor:O},props:["value","fieldConf","row","uiType"]},T=(0,a.A)(j,L,[],!1,null,null,null);T.options.__file="components/lib/bpmMapLocation/src/part/reader.vue";var P=T.exports,R={name:"BpmMapLocation",components:{editorComponent:O,readerComponent:P},props:{value:{type:[String,Number]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?P:O}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(t){this.$emit("input",t),this.$emit("change",t)}}},I=(0,a.A)(R,t,[],!1,null,null,null);I.options.__file="components/lib/bpmMapLocation/src/main.vue";var N=I.exports;N.install=function(t){t.component(N.name,N)};var V=N}(),r}()}));
|
package/dist/bpmRating.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,(function(e){return function(){var t={4486:function(e,t,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,(function(e){return function(){var t={4486:function(e,t,n){"use strict";function o(e,t,n,o,r,i,l,s){var a,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),l?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(l)},u._ssrRegister=a):r&&(a=s?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),a)if(u.functional){u._injectStyles=a;var c=u.render;u.render=function(e,t){return a.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,a):[a]}return{exports:e,options:u}}n.d(t,{A:function(){return o}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";o.r(r),o.d(r,{default:function(){return y}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-rating",attrs:{value:e.curVal,fieldConf:e.fieldConf,row:e.row,mode:e.mode,uiType:e.uiType},on:{change:e.handleChange}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-rate",{attrs:{max:e.max,iconClasses:e.icon,voidIconClass:e.voidIcon,disabledVoidIcon:e.voidIcon,disabled:e.readonly,allowHalf:e.allowHalf,colors:e.colors,voidColor:e.voidColor,showText:e.showText,showScore:e.showScore,textColor:e.textColor,texts:e.texts},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}})],1)};t._withStripped=!0;var n=o(6773),i=o.n(n),l=o(5554),s=o.n(l),a=o(7642);s().use(a.Rate);var u={data(){return{curVal:null}},props:["value","fieldConf","row","readonly"],watch:{value(e){this.value||0===this.value||"0"===this.value?(this.curVal=Number(this.value),console.log("number change_curVal: ",this.curVal)):this.curVal=void 0}},computed:{texts(){let e=[],t=i().get(this.fieldConf,"range_enum");return i().each(t,(t=>{e.push(t[1])})),e},max(){return i().get(this.fieldConf,"range_enum").length||5},icon(){let e=this.getIconClass(i().get(this.fieldConf,"style.icon"));return[e,e,e]},voidIcon(){return this.getIconClass(i().get(this.fieldConf,"style.void_icon"),!0)},size(){return i().get(this.fieldConf,"style.size")},gutter(){return i().get(this.fieldConf,"style.gutter")},allowHalf(){return i().get(this.fieldConf,"style.allow_half")},colors(){let e=i().get(this.fieldConf,"style.color");return[e,e,e]},voidColor(){return i().get(this.fieldConf,"style.void_color")},showText(){return i().get(this.fieldConf,"style.show_text")},showScore(){return i().get(this.fieldConf,"style.show_score")},textColor(){return i().get(this.fieldConf,"style.text_color")}},methods:{getIconClass(e,t=!1){let n="";switch(e){case"star":case"like":case"smile":case"good-job":n=t?"el-icon-star-off":"el-icon-star-on"}return n},handleChange(e){console.log("number change: ",e),this.$emit("change",this.curVal)}},mounted(){this.value||0===this.value||"0"===this.value?this.curVal=Number(this.value):this.curVal=void 0}},c=o(4486),d=(0,c.A)(u,t,[],!1,null,null,null);d.options.__file="components/lib/bpmRating/src/part/editor.vue";var f=d.exports,p=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"bpm-rating-view"},[n("rate-editor",{attrs:{value:e.value,fieldConf:e.fieldConf,row:e.row,uiType:e.uiType,readonly:!0}})],1)};p._withStripped=!0;var h={components:{RateEditor:f},props:["value","fieldConf","row","uiType"]},v=(0,c.A)(h,p,[],!1,null,null,null);v.options.__file="components/lib/bpmRating/src/part/reader.vue";var m=v.exports,g={name:"BpmRating",components:{editorComponent:f,readerComponent:m},props:{value:{type:[String,Number]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?m:f}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},C=(0,c.A)(g,e,[],!1,null,null,null);C.options.__file="components/lib/bpmRating/src/main.vue";var _=C.exports;_.install=function(e){e.component(_.name,_)};var y=_}(),r}()}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,(function(e){return function(){var t={4486:function(e,t,o){"use strict";function n(e,t,o,n,r,i,l,s){var a,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=o,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),l?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(l)},u._ssrRegister=a):r&&(a=s?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),a)if(u.functional){u._injectStyles=a;var c=u.render;u.render=function(e,t){return a.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,a):[a]}return{exports:e,options:u}}o.d(t,{A:function(){return n}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{default:function(){return y}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-rating",attrs:{value:e.curVal,fieldConf:e.fieldConf,row:e.row,mode:e.mode,uiType:e.uiType},on:{change:e.handleChange}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("el-rate",{attrs:{max:e.max,iconClasses:e.icon,voidIconClass:e.voidIcon,disabledVoidIcon:e.voidIcon,disabled:e.readonly,allowHalf:e.allowHalf,colors:e.colors,voidColor:e.voidColor,showText:e.showText,showScore:e.showScore,textColor:e.textColor,texts:e.texts},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}})],1)};t._withStripped=!0;var o=n(6773),i=n.n(o),l=n(5554),s=n.n(l),a=n(7642);s().use(a.Rate);var u={data(){return{curVal:null}},props:["value","fieldConf","row","readonly"],watch:{value(e){this.value||0===this.value||"0"===this.value?(this.curVal=Number(this.value),console.log("number change_curVal: ",this.curVal)):this.curVal=void 0}},computed:{texts(){let e=[],t=i().get(this.fieldConf,"range_enum");return i().each(t,(t=>{e.push(t[1])})),e},max(){return i().get(this.fieldConf,"range_enum").length||5},icon(){let e=this.getIconClass(i().get(this.fieldConf,"style.icon"));return[e,e,e]},voidIcon(){return this.getIconClass(i().get(this.fieldConf,"style.void_icon"),!0)},size(){return i().get(this.fieldConf,"style.size")},gutter(){return i().get(this.fieldConf,"style.gutter")},allowHalf(){return i().get(this.fieldConf,"style.allow_half")},colors(){let e=i().get(this.fieldConf,"style.color");return[e,e,e]},voidColor(){return i().get(this.fieldConf,"style.void_color")},showText(){return i().get(this.fieldConf,"style.show_text")},showScore(){return i().get(this.fieldConf,"style.show_score")},textColor(){return i().get(this.fieldConf,"style.text_color")}},methods:{getIconClass(e,t=!1){let o="";switch(e){case"star":case"like":case"smile":case"good-job":o=t?"el-icon-star-off":"el-icon-star-on"}return o},handleChange(e){console.log("number change: ",e),this.$emit("change",this.curVal)}},mounted(){this.value||0===this.value||"0"===this.value?this.curVal=Number(this.value):this.curVal=void 0}},c=n(4486),d=(0,c.A)(u,t,[],!1,null,null,null);d.options.__file="components/lib/bpmRating2/src/part/editor.vue";var f=d.exports,p=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("span",{staticClass:"bpm-rating-view"},[o("rate-editor",{attrs:{value:e.value,fieldConf:e.fieldConf,row:e.row,uiType:e.uiType,readonly:!0}})],1)};p._withStripped=!0;var h={components:{RateEditor:f},props:["value","fieldConf","row","uiType"]},v=(0,c.A)(h,p,[],!1,null,null,null);v.options.__file="components/lib/bpmRating2/src/part/reader.vue";var m=v.exports,g={name:"BpmRa",components:{editorComponent:f,readerComponent:m},props:{value:{type:[String,Number]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?m:f}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},C=(0,c.A)(g,e,[],!1,null,null,null);C.options.__file="components/lib/bpmRating2/src/main.vue";var _=C.exports;_.install=function(e){e.component(_.name,_)};var y=_}(),r}()}));
|
package/dist/bpmSubForm.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs"),require("@antv/g6")):"function"==typeof define&&define.amd?define(["lodash","qs","@antv/g6"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs"),require("@antv/g6")):e.bpm2=t(e.lodash,e.qs,e["@antv/g6"])}(self,(function(e,t,a){return function(){"use strict";var i={7520:function(e,t,a){a.d(t,{Q:function(){return n}});let i=[{key:"lt",name:"早于"},{key:"gt",name:"晚于"},{key:"gte",name:"不早于"},{key:"lte",name:"不晚于"}],l=[{key:"in",name:"在列表中"}],o=[{key:"in",name:"在列表中"},{key:"all",name:"包含所有"}];const n={Text:{name:"单行文本",hasBpmField:!0,tableColWidth:240,actions:[{key:"contains",name:"包含"},{key:"eq",name:"等于"}],attrs:["type","value_type","id","name","linkage"]},TextArea:{name:"多行文本",hasBpmField:!0,tableColWidth:300,actions:[{key:"contains",name:"包含"},{key:"eq",name:"等于"}],attrs:["type","value_type","id","name","linkage"]},SerialNumber:{name:"流水号",hasBpmField:!0,actions:[{key:"contains",name:"包含"}],options:{type:"Text"},attrs:["type","id","name","linkage"]},Number:{name:"数字",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"},{key:"gt",name:"大于"},{key:"gte",name:"大于等于"},{key:"lt",name:"小于"},{key:"lte",name:"小于等于"},{key:"ne",name:"不等于"}],attrs:["type","id","name","value_type","is_int","view.precision","linkage"]},DateTime:{name:"日期时间选择器",tableColWidth:240,hasBpmField:!0,actions:i,attrs:["type","id","name","check.format","view.format","linkage"]},Date:{name:"日期选择器",tableColWidth:240,hasBpmField:!0,actions:i,attrs:["type","id","name","check.format","view.format","linkage"]},Time:{name:"时间选择器",hasBpmField:!0,tableColWidth:240,actions:i,attrs:["type","id","name","check.format","view.format","linkage"]},Timestamp:{name:"※时间戳",tableColWidth:240,actions:i,attrs:["type","id","name","check.format","view.format","linkage"]},Select:{name:"单选",hasBpmField:!0,tableColWidth:220,actions:l,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},Status:{name:"状态",hasBpmField:!0,tableColWidth:150,actions:l,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},MulSelect:{name:"多选",hasBpmField:!0,tableColWidth:220,actions:o,attrs:["type","id","name","value_type","result_type","style","range_enum","linkage"]},SelectFromForm:{name:"远程单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromForm"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectFromForm:{name:"远程多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},SelectFromMulForm:{name:"关联组件",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type"]},SelectProject:{name:"项目单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectProject"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectProject:{name:"项目多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectUser:{name:"用户单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectUser"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectUser:{name:"用户多项选择",hasBpmField:!0,tableColWidth:200,actions:o,options:{type:"MulSelectUser"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectURUser:{name:"用户单项选择(新)",hasBpmField:!0,tableColWidth:400,actions:l,options:{type:"MulSelectURUser"},attrs:["type","id","name","range_remote","value_type","filters","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectURUser:{name:"用户多项选择(新)",hasBpmField:!0,tableColWidth:400,actions:o,options:{type:"MulSelectURUser"},attrs:["type","id","name","range_remote","value_type","filters","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectRootCategory:{name:"根任务类型选择",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"}],attrs:["type","id","name","category_cls","value_type","linkage"]},SelectCheckItem:{name:"检查项单项选择",hasBpmField:!0,actions:l,tableColWidth:200,options:{type:"MulSelectCheckItem"},attrs:["type","id","name","category_cls","value_type","range_remote","root_category","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},MulSelectCheckItem:{name:"检查项多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","category_cls","value_type","range_remote","root_category","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},SelectSort:{name:"分类单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectSort"},attrs:["type","id","name","value_type","range_remote","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},MulSelectSort:{name:"分类多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","value_type","range_remote","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},SelectPartner:{name:"合作伙伴单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectPartner"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectPartner:{name:"合作伙伴多项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectPartner"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectOrg:{name:"单位单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectOrg"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectOrg:{name:"单位多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},Audit:{name:"审批",hasBpmField:!0,actions:[{key:"ar_eq",name:"审批结果等于"},{key:"ar_in",name:"审批结果在列表中"}],actionOptions:[{value:0,label:"未审批"},{value:1,label:"审批通过"},{value:2,label:"审批未通过"}],attrs:["type","id","name","linkage"],options:{result_type:"Array",value_type:"int",type:"MulSelect",style:"default",range_enum:[[0,"未审批"],[1,"通过"],[2,"未通过"]]}},MulAudit:{name:"多人审批",hasBpmField:!0,actions:[{key:"ar_eq",name:"审批结果等于"},{key:"ar_in",name:"审批结果在列表中"}],actionOptions:[{value:0,label:"未审批"},{value:1,label:"审批通过"},{value:2,label:"审批未通过"}],attrs:["type","id","name","linkage"],options:{result_type:"Array",value_type:"int",type:"MulSelect",style:"default",range_enum:[[0,"未审批"],[1,"通过"],[2,"未通过"]]}},MulArea:{name:"区域多项选择",hasBpmField:!0,tableColWidth:260,actions:o,attrs:["type","id","name","value_type","can","linkage"]},Area:{name:"区域单项选择",hasBpmField:!0,tableColWidth:260,actions:l,options:{type:"MulArea"},attrs:["type","id","name","value_type","can","linkage"]},SelectFormId:{name:"表单单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},MulSelectFormId:{name:"表单多项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},SelectFromField:{name:"远程单选(从字段)",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromField"},attrs:["type","id","name","range_remote","style","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectFromField:{name:"远程多选(从字段)",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromField"},attrs:["type","id","name","range_remote","style","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectEntranceForm:{name:"远程多项选择(从入口)",hasBpmField:!0},SelectHouseOwner:{name:"业主选择"},MulSelectIssue:{name:"问题选择"},MulFile:{name:"附件",hasBpmField:!0,tableColWidth:150},MulImage:{name:"图片",hasBpmField:!0,tableColWidth:150},Signature:{name:"签名",hasBpmField:!0},OnlineEditor:{name:"在线文档编辑器"},Spliter:{name:"分割线",hasBpmField:!1},Stepper:{name:"步进器",hasBpmField:!1},Quote:{name:"跨表单数据引用",hasBpmField:!1},Order:{name:"排序控件",hasBpmField:!1},SubForm:{name:"子表单",hasBpmField:!0},XSubForm:{name:"子表单(增强版)",hasBpmField:!0},OrderSubForm:{name:"排序子表单",hasBpmField:!0},AreaElevation:{name:"区域快速选择器",hasBpmField:!0,tableColWidth:200},RichText:{name:"富文本编辑框",hasBpmField:!0,tableColWidth:100},Appointment:{name:"时段预约",hasBpmField:!0,tableColWidth:120},Rating:{name:"评分",hasBpmField:!0,tableColWidth:250}}},9795:function(e,t,a){function i(){for(var e=[],t="0123456789abcdef",a=0;a<36;a++)e[a]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}a.d(t,{uR:function(){return i}}),a(6773),a(5360)},1773:function(e,t,a){var i=a(1601),l=a.n(i),o=a(6314);a.n(o)()(l()).push([e.id,"\n/deep/ .relate-sub-form-dialog .bpm-relate-subform-table .el-input__validateIcon {\n display: none;\n}\n",""])},6314:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var a="",i=void 0!==t[5];return t[4]&&(a+="@supports (".concat(t[4],") {")),t[2]&&(a+="@media ".concat(t[2]," {")),i&&(a+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),a+=e(t),i&&(a+="}"),t[2]&&(a+="}"),t[4]&&(a+="}"),a})).join("")},t.i=function(e,a,i,l,o){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(i)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(n[s]=!0)}for(var d=0;d<e.length;d++){var m=[].concat(e[d]);i&&n[m[0]]||(void 0!==o&&(void 0===m[5]||(m[1]="@layer".concat(m[5].length>0?" ".concat(m[5]):""," {").concat(m[1],"}")),m[5]=o),a&&(m[2]?(m[1]="@media ".concat(m[2]," {").concat(m[1],"}"),m[2]=a):m[2]=a),l&&(m[4]?(m[1]="@supports (".concat(m[4],") {").concat(m[1],"}"),m[4]=l):m[4]="".concat(l)),t.push(m))}},t}},1601:function(e){e.exports=function(e){return e[1]}},4486:function(e,t,a){function i(e,t,a,i,l,o,n,r){var s,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=a,d._compiled=!0),i&&(d.functional=!0),o&&(d._scopeId="data-v-"+o),n?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),l&&l.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},d._ssrRegister=s):l&&(s=r?function(){l.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:l),s)if(d.functional){d._injectStyles=s;var m=d.render;d.render=function(e,t){return s.call(t),m(e,t)}}else{var c=d.beforeCreate;d.beforeCreate=c?[].concat(c,s):[s]}return{exports:e,options:d}}a.d(t,{A:function(){return i}})},4419:function(e){e.exports=a},6773:function(t){t.exports=e},5360:function(e){e.exports=t}},l={};function o(e){var t=l[e];if(void 0!==t)return t.exports;var a=l[e]={id:e,exports:{}};return i[e](a,a.exports,o),a.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{default:function(){return L}});var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",["table"===e.uiType?a("el-button",{attrs:{type:"text"},on:{click:function(t){e.showSubForm=!0}}},[e._v(e._s(e.$z("查看子表单","b2.common.view_subform")))]):"table"===e.showStyle?a("SubFormStyleTable",e._b({ref:"sub_form_table",attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,readOnly:e.readOnly,dm:e.dm,"max-height":e.tableMaxHeight,"show-header":e.showHeader,resizable:e.resizable,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleTable",e.$attrs,!1)):"list"===e.showStyle?a("SubFormStyleList",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,dm:e.dm,"max-height":e.maxHeight,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleList",e.$attrs,!1)):a("SubFormStyleCard",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,dm:e.dm,"max-height":e.maxHeight,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleCard",e.$attrs,!1)),e._v(" "),"table"===e.uiType?a("el-dialog",{attrs:{title:e.subFormDialogTitle,visible:e.showSubForm,width:"50%"},on:{"update:visible":function(t){e.showSubForm=t},close:function(t){e.showSubForm=!1}}},[a("div",{staticStyle:{"max-height":"70vh",overflow:"auto"}},["table"===e.showStyle?a("SubFormStyleTable",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,readOnly:e.readOnly,dm:e.dm,"max-height":e.dialogTableMaxHeight,"show-header":!0,resizable:!0,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleTable",e.$attrs,!1)):"list"===e.showStyle?a("SubFormStyleList",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,dm:e.dm,"max-height":e.maxHeight,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleList",e.$attrs,!1)):a("SubFormStyleCard",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem,mode:e.mode,dm:e.dm},on:{change:e.handleChange}},"SubFormStyleCard",e.$attrs,!1))],1)]):e._e()],1)};r._withStripped=!0;var s=o(7520),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$z("单击可进行编辑","c.click_to_edit"),placement:"top",disabled:e.readOnly||!("edit"==e.mode&&e.showSubformData.length>e.countForClickToEdit&&!e.hadClickRow)||"view"==e.mode}},[a("el-table",{key:"rowIndex",staticClass:"bpm-subform-table",staticStyle:{width:"100%"},attrs:{data:e.showSubformData,"row-key":"rowIndex","max-height":e.maxHeight,"show-header":e.showHeader,resizable:e.resizable,border:"",stripe:""},on:{"row-click":e.rowClick,"header-dragend":e.handleHeaderDragend}},[e.showIndex?a("el-table-column",{attrs:{type:"index",label:e.indexLabel,width:100},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.$index+1)+"\n\n "),e._l(e.hiddenColumns,(function(i){return[a("bpm-sub-form-field",e._b({directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],key:i.key,attrs:{type:i.data.type,fieldConf:i.data,mode:e.dm?e.mode:e.getFieldMode(i.data.perm,t.row),dm:e.dm,uiType:"table",rowIndex:t.row.rowIndex,container:e.container},on:{input:e.handleInput,change:function(a){return e.handleChange(a,t.row)}},model:{value:t.row[i.id],callback:function(a){e.$set(t.row,i.id,a)},expression:"scope.row[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))]}))]}}],null,!1,1118663549)}):e._e(),e._v(" "),e._l(e.showColumns,(function(t){return a("el-table-column",{key:t.key,attrs:{prop:t.id,label:(t.data.check&&t.data.check.required?"* ":"")+t.label,"min-width":t.minWidth,sortable:t.sortable,"sort-method":t.sortMethod},scopedSlots:e._u([{key:"default",fn:function(i){return[a("bpm-sub-form-field",e._b({attrs:{type:t.data.type,fieldConf:t.data,mode:e.dm?e.mode:e.getFieldMode(t.data.perm,i.row),dm:e.dm,uiType:"table",rowIndex:i.row.rowIndex,container:e.container},on:{input:e.handleInput,change:function(t){return e.handleChange(t,i.row)}},model:{value:i.row[t.id],callback:function(a){e.$set(i.row,t.id,a)},expression:"scope.row[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))]}}],null,!0)},[a("template",{slot:"header"},[t.data.check&&t.data.check.required?a("span",{staticStyle:{color:"#D84141"}},[e._v("* ")]):e._e(),e._v(" "),a("span",[e._v(e._s(t.label))])])],2)})),e._v(" "),e.canRemove&&e.countLimit.canRemove&&"edit"==e.mode||e.relateSubForms&&e.relateSubForms.length?a("el-table-column",{attrs:{prop:"delete",label:e.$z("操作","c.operation"),"min-width":150},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table-row-opertaion-btn-grp"},[e.canRemove&&e.countLimit.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return a.stopPropagation(),e.handleRemoveItem(t.row.rowIndex,t.row)}}}):e._e(),e._v(" "),e._l(e.relateSubForms,(function(i){return a("el-button",{directives:[{name:"show",rawName:"v-show",value:i.enable,expression:"relate.enable"}],key:i.idx,attrs:{type:"text"},on:{click:function(a){return a.stopPropagation(),e.openRelateFormDialog(i,t.row)}}},[e._v("\n "+e._s(i.name)+"\n ")])}))],2)]}}],null,!1,4273942660)}):e._e()],2)],1),e._v(" "),e.canAdd&&e.countLimit.canAdd?a("el-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"default",icon:"el-icon-plus"},on:{click:function(t){return e.handleAddItem(null)}}},[e._v(e._s(e.$z("添加项","c.add_item")))]):e._e(),e._v(" "),a("relate-sub-form-dialog",{attrs:{mode:e.mode,container:e.container,srcFieldConf:e.fieldConf,row:e.dialogSubFormRelate.row,relateInfo:e.dialogSubFormRelate.relateInfo,visible:e.dialogSubFormRelate.visible},on:{close:e.handelRelateFormDialogClose}})],1)};d._withStripped=!0;var m=o(9795),c={props:{value:{type:Array,default(){return[]}},columns:{type:Array,default(){return[]}},subformPerm:{type:Object,default(){return{}}},fieldConf:{type:Object,default(){return{}}},mode:{type:String,default:"view"},maxHeight:{type:[Number,String],default:500},container:{type:Object,default(){return{}}},topContainer:{type:Object,default(){return{}}}},data(){return{subformData:[],originSubformData:[],originSubformDataMap:{},showSubformData:[],_oldVal:null,hasInit:!1,isEditingMap:{},formSchemaDef:{},formSourceData:[]}},inject:["formData","formSchema"],computed:{form(){return this.topContainer},userId(){return _.get(this.$bpm.userInfo,"user_id",0)},originItem(){let e={};const t={int:0,text:"",array:[],struct:[]};return this.columns.forEach((a=>{e[a.id]=t[a.data.value_type]||""})),e},canAdd(){return"edit"===this.mode&&(this.subformPerm.creatable||this.dm)},canRemove(){return"edit"===this.mode&&(this.subformPerm.deletable||this.dm)},min(){const e=_.get(this.fieldConf,"check.min_count",0),t=_.get(this.fieldConf,"check.xmin_count");return t?this.form.formData[t]||0:e},max(){const e=_.get(this.fieldConf,"check.max_count"),t=_.get(this.fieldConf,"check.xmax_count");return t?this.form.formData[t]||0:e},countForClickToEdit(){return _.get(this.fieldConf,"count_for_click_to_edit")},countLimit(){const e=this.min,t=this.max;let a=this.showSubformData.length;return{canAdd:!(t&&a>=t),canRemove:!(a<=e)}},showIndex(){return!!this.fieldConf.show_index},indexLabel(){return this.fieldConf.index_label||zj.z("序号","b2.common.subform_index")},groupField(){return _.get(this.fieldConf,"group_by.by","")},showField(){return _.get(this.fieldConf,"is_show_field")},readonly(){return!_.get(this.fieldConf,"perm.editable",!1)}},watch:{value:{handler(e){e&&_.isArray(e)?(this.subformData=e,0==this.originSubformData.length&&(this.originSubformData=_.cloneDeep(e),_.each(this.originSubformData,(e=>{let t=_.cloneDeep(e);delete t._meta,this.originSubformDataMap[e._meta.id]=t})))):this.subformData=[]},immediate:!0},subformData:{handler(e){console.log("val",e),this.showSubformData=this.setData(e),console.log("this.showSubformData",this.showSubformData)},deep:!0,immediate:!0},min(e,t){this.addItemByMin(e)},max(e,t){let a=this.showSubformData.length;if(e&&a>e){let t=a-e,i=0;for(let e=this.subformData.length;e>0;e--){let a=this.subformData[e-1];a.visible&&i<t&&(this.handleRemoveItem(a.rowIndex,a),i++)}}}},mounted(){this.form.$once("dataLoaded",(e=>{this.addItemByMin(this.min)})),this.formSchemaDef=this.formSchema()},methods:{getFieldMode(e,t){let a=this.mode;return!e||"edit"!==a||e.editable||e.writable?"table"==this.style_ui_type&&!this.isEditingMap[t._meta.id]&&this.showSubformData.length>this.countForClickToEdit&&(a="view"):a="view",a},throttleEmit:_.throttle((function(){"edit"===this.mode&&(console.log("subForm change emit"),this.$emit("change",this.subformData))}),1e3,{leading:!1}),handleChange(e,t,a){console.log("field change: ",e),console.log("field change row: ",t),console.log("field change this.formSchemaDef ",this.formSchemaDef);let i=!1;if(t&&t._meta&&t._meta.id){let e=this.originSubformDataMap[t._meta.id];if(console.log("field change_origin",e),e){for(let a in t)_.includes(["_meta","rowIndex","visible","isNew"],a)||e[a]==t[a]||(i=!0);i&&(t._meta.update_time=parseInt((new Date).getTime()/1e3),t._meta.updater=this.userId,t._meta.last_value=e)}if(this.formSchemaDef){let e=[];_.each(this.formSchemaDef.elements,(a=>{a.relate_setting&&_.each(a.relate_setting,(i=>{if(i.sub_form==this.fieldConf.id){console.log("element",a),console.log("relate",i),this.formSourceData=this.formData(),console.log("field change this.formSourceData ",this.formSourceData);let l={};_.each(i.sub_form_field_mapping,(e=>{_.includes(i.sub_form_fields,e.target)&&(l[e.src]=t[e.target])})),console.log("field change_confidition",l);let o=_.filter(this.formSourceData[a.id],(e=>{if(e&&e._meta&&!e._meta.is_deleted)return e})),n=_.find(o,l);if(console.log("field change_relate_row",n),n){let t={field:a.id,row:n._meta.id};e.push(t)}}}))})),t._meta.relate=e}if(this.fieldConf.relate_setting&&this.fieldConf.relate_setting.length){console.log("this.fieldConf",this.fieldConf),console.log("this.fieldConf.relate_setting",this.fieldConf.relate_setting);let e=this.formData();_.each(this.fieldConf.relate_setting,(a=>{_.each(e[a.sub_form],(e=>{e._meta&&e._meta.relate&&_.find(e._meta.relate,{field:this.fieldConf.id,row:t._meta.id})&&(console.log("_data",e),_.each(a.sub_form_field_mapping,(a=>{e[a.target]=t[a.src]})))}))}))}}this.throttleEmit()},handleInput(e){console.log("field input: ",e)},async addItemByMin(e){if(_.get(this.fieldConf,"linkage"))return;let t=this.showSubformData.length;if(e&&t<e){let a=e-t;for(let e=0;e<a;e++)await this.handleAddItem(null)}},async handleAddItem(e=null){let t=(0,m.uR)(),a=this.subformData.length,i=a>=1?this.subformData[a-1]:_.cloneDeep(this.originItem),l=_.get(this.fieldConf,"fill_in_last_fields",[]);console.log("lastItem",i),console.log("this.subformData",this.subformData),console.log("fillInLastFields",l),i=_.pick(i,l),console.log("lastItem",i),console.log("relateItem",e),e?i=_.cloneDeep(e):_.isEmpty(i)||delete i._meta,console.log("lastItem: ",i);let o={isNew:!0,_meta:{id:t,creator:this.userId,create_time:parseInt((new Date).getTime()/1e3),update_time:parseInt((new Date).getTime()/1e3),updater:this.userId,last_value:null,deleter:0,is_deleted:!1,relate:[]}};this.$set(this.isEditingMap,t,!0),o=_.merge(o,i),console.log("add_data",o),console.log("add_link_data.rowIndex",o.rowIndex),await this.linkageItem.fillDefault(o,[],this.mode),!this.subformData||_.isEmpty(this.subformData)?this.subformData=[o]:this.subformData.push(o),this.handleChange();let{relyHandleList:n,firstId:r}=this.linkageItem.getRelyHandleList("sure000");console.log("add_link_this.relyHandleListMap",this.relyHandleListMap),console.log("add_link_this.this.subformData",this.subformData),console.log("add_link_relyHandleList",n),_.set(this.relyHandleListMap,this.subformData.length-1,n),_.isEmpty(n)&&this.$bpm.$emit("initRelyComplete",this,o.rowIndex),r&&(console.log("add_link_firstId",r),console.log("add_link_data.rowIndex",o.rowIndex),setTimeout((async()=>{let e=await this.linkageItem.loadLinkage(n,this.subformData,this.container.formData,this.fieldConf.id,o.rowIndex);console.log("add_link_data.rowIndex",o.rowIndex),console.log("add_link_data.firstId",r),console.log("add_link_this.relyHandleListMap",this.relyHandleListMap),console.log("add_link_result",e),_.map(e,((e,t)=>{this.$set(this.subformData[o.rowIndex],`${t}`,e)})),this.handleChange(),this.$bpm.$emit("handeInitRely",{id:r,rowIndex:o.rowIndex})}),500))},setData(e){let t=this.showField,a=_.filter(e,((e,a)=>{e&&(e.rowIndex=a);let i=!e._meta.is_deleted&&(!t||t&&(2==e[t]||!e[t]));return e.visible=i,i}));if(this.groupField&&this.$q.platform.is.desktop&&this.readonly){let e=_.groupBy(a,this.groupField);_.map(e,((e,t)=>{_.each(e,((e,a)=>{0==a&&(e._groupField=t)}))}))}return console.log("tableData",a),this._oldVal=JSON.stringify(e),a},handleRemoveItem(e,t){if(console.log("deleteRowIndex",e),console.log("this.relateSubForms",this.relateSubForms),console.log("item",t),this.relateSubForms&&this.relateSubForms.length>0){let a=!1;_.each(this.relateSubForms,(e=>{console.log("relateSetting",e);let i=this.formData();console.log("this.subformData",i),console.log("formData[relateSetting['sub_form']]",i[e.sub_form]);let l=_.filter(i[e.sub_form],(a=>{if(console.log("filter_item",a),a&&a._meta&&a._meta.relate&&a._meta.relate&&a._meta.relate.length&&!a._meta.is_deleted){let e=_.find(a._meta.relate,{field:this.fieldConf.id,row:t._meta.id});if(console.log("relate_bind",e),e)return a}if(a&&a._meta&&a._meta&&!a._meta.is_deleted){let i=!1,l=!0;if(_.each(e.sub_form_field_mapping,(o=>{_.includes(e.sub_form_fields,o.target)&&(a[o.target]==t[o.src]?i=!0:(l=!1,i=!1))})),i&&l)return a}}));console.log("subformData",l),l.length>0&&e.strong_association&&(a=!0)})),a?this.$confirm(zj.z("该项有关联数据,确认一并删除?","b2.common.delete_subform_tip"),zj.z("提示","c.tip"),{confirmButtonText:zj.z("确定","c.confirm"),cancelButtonText:zj.z("取消","c.cancel"),type:"warning"}).then((()=>{this._delItem(this.subformData,e),this._delRelateSubItem(this.subformData[e]),this.$nextTick((()=>{this.$message({type:"success",message:zj.z("删除成功!","c.deleted_successfully")}),this.handleChange()}))})).catch((()=>!1)):(this._delItem(this.subformData,e),this.handleChange())}else this._delItem(this.subformData,e),this.handleChange()},_delItem(e,t){if(console.log("delItem",e),console.log("delItem_rowIndex",t),e[t]&&e[t].isNew)console.log("删除子表单项"),e.splice(t,1);else{if(1==e[t]._meta.is_deleted)return!1;console.log("标记删除子表单项"),e[t]._meta.is_deleted=!0,e[t]._meta.deleter=this.userId,e[t]._meta.update_time=parseInt((new Date).getTime()/1e3)}},_delRelateSubItem(e){_.each(this.relateSubForms,(t=>{console.log("relateSetting",t);let a=this.formData(),i=_.filter(a[t.sub_form],(a=>{if(console.log("filter_item",a),a&&a._meta&&a._meta&&!a._meta.is_deleted){let i=!1,l=!0;if(_.each(t.sub_form_field_mapping,(o=>{_.includes(t.sub_form_fields,o.target)&&(a[o.target]==e[o.src]?i=!0:(l=!1,i=!1))})),i&&l)return a}}));console.log("subformData",i),t.strong_association&&_.each(i,((e,t)=>{this._delItem(i,t)}))}))},handleEditItem(e,t){console.log("editRowIndex",e),this.subformData[e]&&this.$set(this.isEditingMap,this.subformData[e]._meta.id,!0)}}},u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"relate-sub-form-dialog"},[a("el-dialog",{attrs:{visible:e.dlgVisible,"before-close":e.handleClose,top:"3vh",width:"85%",title:e.relateSetting.title,fullscreen:!1,"append-to-body":""},on:{"update:visible":function(t){e.dlgVisible=t}}},[a("el-table",{key:e.refreshKey,staticClass:"bpm-relate-subform-table",staticStyle:{width:"100%",overflow:"auto"},attrs:{data:e.subformData,height:"80vh",border:"",stripe:""},on:{"row-click":e.rowClick}},[e.showIndex?a("el-table-column",{attrs:{type:"index",label:e.indexLabel,width:100},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.$index+1)+"\n\n "),e._l(e.hiddenColumns,(function(i){return[a("bpm-sub-form-field",e._b({directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],key:i.key,attrs:{type:i.data.type,fieldConf:i.data,"form-name":e.formDefId,"form-def-id":e.formDefId,orgInfo:e.orgParams,mode:e.getFieldMode(i.data.perm,t.row,i.id),uiType:"table",rowIndex:t.row.rowIndex,container:e.container},model:{value:t.row[i.id],callback:function(a){e.$set(t.row,i.id,a)},expression:"scope.row[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))]}))]}}],null,!1,4184301278)}):e._e(),e._v(" "),e._l(e.showColumns,(function(t){return a("el-table-column",{key:t.key,attrs:{prop:t.id,label:(t.data.check&&t.data.check.required?"* ":"")+t.label,"min-width":t.minWidth,sortable:t.sortable,"sort-by":t.sortBy},scopedSlots:e._u([{key:"default",fn:function(i){return[a("bpm-sub-form-field",e._b({attrs:{type:t.data.type,fieldConf:t.data,mode:e.getFieldMode(t.data.perm,i.row,t.id),"form-name":e.formDefId,"form-def-id":e.formDefId,orgInfo:e.orgParams,uiType:"table",rowIndex:i.row.rowIndex,container:e.container},model:{value:i.row[t.id],callback:function(a){e.$set(i.row,t.id,a)},expression:"scope.row[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))]}}],null,!0)},[a("template",{slot:"header"},[t.data.check&&t.data.check.required?a("span",{staticStyle:{color:"#D84141"}},[e._v("* ")]):e._e(),e._v(" "),a("span",[e._v(e._s(t.label))])])],2)})),e._v(" "),"edit"==e.mode?a("el-table-column",{attrs:{prop:"delete",label:e.$z("操作","c.operation"),fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table-row-opertaion-btn-grp"},[e.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return a.stopPropagation(),e.handleRemoveItemInner(t.row.rowIndex)}}}):e._e()],1)]}}],null,!1,1620617082)}):e._e()],2),e._v(" "),e.canAdd?a("el-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"default",icon:"el-icon-plus"},on:{click:e.handleAddItemInner}},[e._v(e._s(e.$z("添加项","c.add_item")))]):e._e(),e._v(" "),"edit"==e.mode&&e.subformData.length>e.countForClickToEdit&&!e.hadClickRow?a("span",{staticClass:"edit-tip",staticStyle:{"margin-left":"10px",color:"#666","font-size":"13px"}},[e._v(e._s(e.$z("提示","c.tip"))+": "+e._s(e.$z("单击可进行编辑","c.click_to_edit")))]):e._e()],1)],1)};u._withStripped=!0;var h={props:{srcFieldConf:{type:Object,default(){return{}}},row:{type:Object,default:function(){return{}}},relateInfo:{type:Object,default:function(){return{}}},mode:{type:String,default:"edit"},container:{type:Object,default(){return{}}},visible:{type:Boolean,default:!1}},inject:["formData","formSchema"],watch:{visible(e){e&&this.$nextTick((()=>{this.initRelateSubFormTable()})),this.dlgVisible=e},relateInfo(e){this.relateSetting=e},srcFormData:{handler(e){this.$nextTick((()=>{this.getSubFormData(e)}))},deep:!0}},data(){return{name:"title",relateSetting:{perm:{}},formSchemaDef:{},dlgVisible:!1,hadClickRow:!1,subformData:[],refreshKey:0,SubFormFieldConf:{perm:{}},isEditingMap:{},columns:[]}},computed:{countForClickToEdit(){return _.get(this.srcFieldConf,"count_for_click_to_edit")},srcFormData(){return this.formData()},dialogSelf(){return this},eleMap(){let e=this.SubFormFieldConf.elements,t=_.get(this.container,"formSchema.elements");return e=_.concat(e,t),_.keyBy(e,"id")},orgParams(){return this.$store.getters.getOrgParams},formDefId(){return this.formSchemaDef.id},canAdd(){return"edit"===this.mode&&this.SubFormFieldConf.perm.creatable&&this.relateSetting.perm.creatable},canRemove(){return"edit"===this.mode&&this.SubFormFieldConf.perm.deletable&&this.relateSetting.perm.deletable},showIndex(){return!!this.SubFormFieldConf.show_index},indexLabel(){return this.SubFormFieldConf.index_label||zj.z("序号","b2.common.subform_index")},showColumns(){return _.filter(this.columns,(e=>{if(e.visible)return e}))},hiddenColumns(){return _.filter(this.columns,(e=>{if(!e.visible)return e}))}},methods:{getFieldMode(e,t,a){let i=this.mode;return e&&"edit"===i&&!e.editable&&!e.writable&&this.relateSetting.perm.editable?i="view":(!this.isEditingMap[t._meta.id]&&this.subformData.length>this.countForClickToEdit&&(i="view"),t.isNew&&(i="edit")),_.includes(this.relateSetting.sub_form_fields,a)&&(i="view"),i},initRelateSubFormTable(){this.formSchemaDef=this.formSchema();let e=this.formData();this.SubFormFieldConf=_.find(this.formSchemaDef.elements,{id:this.relateSetting.sub_form}),this.columns=this.getColumns(this.SubFormFieldConf),this.getSubFormData(e),this.refreshKey++},getSubFormData(e){this.subformData=_.filter(e[this.relateSetting.sub_form],(e=>{if(e&&e._meta&&e._meta&&!e._meta.is_deleted){let t=!1,a=!0;if(_.each(this.relateSetting.sub_form_field_mapping,(i=>{_.includes(this.relateSetting.sub_form_fields,i.target)&&(e[i.target]==this.row[i.src]?t=!0:(a=!1,t=!1))})),t&&a)return e}}))},getColumns(e){if(!e)return!1;const t=e.elements||[],a=[];return t.forEach((e=>{const t=s.Q[e.type]||{},i=e.perm||{visible:!0,editable:!0,writable:!0};if(i.visible||i.editable||i.writable){e.visible=i.visible;let l=this.mode;"edit"!==l||i.editable||i.writable||(l="view"),a.push({key:e.id,id:e.id,label:e.name||e.id,minWidth:t.tableColWidth||100,sortable:!("edit"==l&&e&&e.range_remote&&e.range_remote.depends&&e.range_remote.depends.length),sortBy:e.id,fieldMode:l,visible:i.visible,data:e})}})),a},async handleAddItemInner(){let e=this.$parent.$parent.container.$refs["bpmFormField"+this.relateSetting.sub_form][0].$refs["inner-component"].$refs.sub_form_table;if(e){let t={_meta:{relate:[{field:this.srcFieldConf.id,row:this.row._meta.id}]}};_.each(this.relateSetting.sub_form_field_mapping,(e=>{t[e.target]=this.row[e.src]})),e.handleAddItem(t)}},async handleRemoveItemInner(e){let t=this.$parent.$parent.container.$refs["bpmFormField"+this.relateSetting.sub_form][0].$refs["inner-component"].$refs.sub_form_table;t&&t.handleRemoveItem(e)},rowClick(e,t,a){"edit"==this.mode&&this.subformData.length>this.countForClickToEdit&&(this.hadClickRow=!0),this.handleEditItem(e.rowIndex,e)},handleEditItem(e,t){let a=_.find(this.subformData,{rowIndex:e});a&&this.$set(this.isEditingMap,a._meta.id,!0)},handleClose(){this.dlgVisible=!1,this.$emit("close",!1)},confirm(){console.log("this.subformData",this.subformData),this.dlgVisible=!1,this.$emit("close",!0)}}},f=(o(1773),o(4486)),p=(0,f.A)(h,u,[],!1,null,null,null);p.options.__file="components/lib/bpmSubForm/src/part/relateSubFormDialog.vue";var g={name:"SubFormStyleTable",mixins:[c],components:{relateSubFormDialog:p.exports},props:{showHeader:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},linkageItem:{type:Object,default:function(){return{}}},mode:{type:String,default:"view"},readOnly:{type:Boolean,default:!1},dm:{type:Boolean,default(){return!1}}},data(){return{style_ui_type:"table",hadClickRow:!1,tag:"",cols_config:[],dialogSubFormRelate:{relateInfo:{},row:{},visible:!1}}},methods:{handleHeaderDragend(e,t,a,i){a.width=e,this.setColWidth(a.property,e)},setCutomerColsConfig(){let e={},t="";e=localStorage.getItem("SUBFORM_COLUMN_CUSTOMER_CONFIG")&&JSON.parse(localStorage.getItem("SUBFORM_COLUMN_CUSTOMER_CONFIG"))||{},t=e[this.userId+this.tag],t?t.field_colunms_config=this.cols_config:t={field_colunms_config:this.cols_config},e[this.userId+this.tag]=t,localStorage.setItem("SUBFORM_COLUMN_CUSTOMER_CONFIG",JSON.stringify(e))},setColWidth(e,t){_.each(this.cols_config,(a=>{a.id==e&&(a.width=t)})),this.setCutomerColsConfig()},getCustomerColsConfig(e){let t=[],a={},i=[],l={};return l=localStorage.getItem("SUBFORM_COLUMN_CUSTOMER_CONFIG")&&JSON.parse(localStorage.getItem("SUBFORM_COLUMN_CUSTOMER_CONFIG"))||{},a=l[this.userId+this.tag],a&&a.field_colunms_config&&(i=a.field_colunms_config),_.each(e,(e=>{console.log("item",e);let a=_.find(i,{id:e.id});a?(console.log("custom_config",a),t.push({label:e.label,id:e.id,width:a.width||200})):t.push({label:e.label,id:e.id,width:e.minWidth})})),console.log("cols_config",t),t=_.sortBy(t,"sort_index"),t},handelRelateFormDialogClose(){this.dialogSubFormRelate.visible=!1},openRelateFormDialog(e,t){this.dialogSubFormRelate.relateInfo=e,this.dialogSubFormRelate.visible=!0,this.dialogSubFormRelate.row=t},rowClick(e,t,a){console.log("row",e),console.log("fieldConf",this.fieldConf),"edit"==this.mode&&this.showSubformData.length>this.countForClickToEdit&&(this.hadClickRow=!0),this.handleEditItem(e.rowIndex,e)}},computed:{relateSubForms(){return this.fieldConf.relate_setting},showColumns(){return _.filter(this.columns,(e=>{let t=_.find(this.cols_config,{id:e.id});if(e.visible)return t&&(e.minWidth=t.width),e}))},hiddenColumns(){return _.filter(this.columns,(e=>{if(!e.visible)return e}))}},created(){this.tag="_"+zj.pageParam().form_name+"_"+this.fieldConf.id},mounted(){this.cols_config=this.getCustomerColsConfig(this.columns)}},b=(0,f.A)(g,d,[],!1,null,null,null);b.options.__file="components/lib/bpmSubForm/src/table.vue";var y=b.exports,S=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{style:{overflow:"auto"}},[e._l(e.showSubformData,(function(t,i){return a("el-card",{key:t.rowIndex,staticClass:"bpm-subform-card",class:e.mode,attrs:{shadow:"hover","body-style":{padding:"10px 20px",overflow:"auto",position:"relative",paddingRight:e.canRemove?"70px":"20px"}}},[a("el-form",{attrs:{"label-width":"180px",inline:!1}},[e.showIndex?a("el-form-item",{attrs:{label:e.indexLabel}},[e._v("\n "+e._s(i+1)+"\n ")]):e._e(),e._v(" "),e._l(e.columns,(function(i){return a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:i.visible&&i.data.visible,expression:"col.visible && col.data.visible"}],key:i.key,class:i.data.display&&(i.data.display.hide_name||"top"===i.data.display.label_position)?"no-label":"",attrs:{label:i.data.display&&(i.data.display.hide_name||"top"===i.data.display.label_position)?"":i.label,required:i.data.check&&i.data.check.required}},[i.data.display&&!i.data.display.hide_name&&"top"===i.data.display.label_position?a("div",{staticClass:"form-label-top"},[e._v(e._s(i.label))]):e._e(),e._v(" "),a("bpm-sub-form-field",e._b({ref:"bpmSubFormField",refInFor:!0,attrs:{type:i.data.type,fieldConf:i.data,mode:e.getFieldMode(i.data.perm,t),uiType:"form",rowIndex:t.rowIndex,container:e.container},on:{change:e.handleChange},model:{value:t[i.id],callback:function(a){e.$set(t,i.id,a)},expression:"item[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))],1)}))],2),e._v(" "),e.canRemove&&e.countLimit.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return e.handleRemoveItem(t.rowIndex)}}}):e._e()],1)})),e._v(" "),e.canAdd&&e.countLimit.canAdd?a("el-button",{attrs:{type:"default",icon:"el-icon-plus"},on:{click:function(t){return e.handleAddItem(null)}}},[e._v(e._s(e.$z("添加项","c.add_item")))]):e._e()],2)};S._withStripped=!0;var v={name:"SubFormStyleCard",mixins:[c],data(){return{style_ui_type:"card"}},props:{linkageItem:{type:Object,default:function(){return{}}}}},w=(0,f.A)(v,S,[],!1,null,null,null);w.options.__file="components/lib/bpmSubForm/src/card.vue";var C=w.exports,F=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bpm-subform-list",style:{overflow:"auto"}},e._l(e.showSubformData,(function(t,i){return a("div",{key:i,staticClass:"bpm-subform-list-item",class:e.mode},[a("el-form",{attrs:{"label-width":"180px",inline:!1}},e._l(e.columns,(function(i){return a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:i.visible&&i.data.visible,expression:"col.visible && col.data.visible"}],key:i.key,class:i.data.display&&(i.data.display.hide_name||"top"===i.data.display.label_position)?"no-label":"",attrs:{label:i.data.display&&(i.data.display.hide_name||"top"===i.data.display.label_position)?"":i.label,required:i.data.check&&i.data.check.required}},[i.data.display&&!i.data.display.hide_name&&"top"===i.data.display.label_position?a("div",{staticClass:"form-label-top"},[e._v(e._s(i.label))]):e._e(),e._v(" "),a("bpm-sub-form-field",e._b({ref:"bpmSubFormField",refInFor:!0,attrs:{type:i.data.type,fieldConf:i.data,mode:e.getFieldMode(i.data.perm,t),uiType:"form",rowIndex:t.rowIndex,container:e.container},on:{change:e.handleChange},model:{value:t[i.id],callback:function(a){e.$set(t,i.id,a)},expression:"item[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))],1)})),1),e._v(" "),e.canRemove&&e.countLimit.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return e.handleRemoveItem(t.rowIndex)}}}):e._e()],1)})),0)};F._withStripped=!0;var k={name:"SubFormStyleList",mixins:[c],data(){return{style_ui_type:"list"}},props:{linkageItem:{type:Object,default:function(){return{}}}}},I=(0,f.A)(k,F,[],!1,null,null,null);I.options.__file="components/lib/bpmSubForm/src/list.vue";var x=I.exports,D=o(4419);class M{constructor(e,t){this.penetrationZList=[],this.elementIdList=[],this.eleMap={},this.relyGraphData={nodes:[],edges:[]},this.elements=[],this.bpm=e,this.value=t}addStackArr(e,t,a){this.eleMap=t,this.elements=_.concat(this.elements,e),this.elementIdList=_.map(t,"id"),_.each(e,(e=>{a&&_.set(e,"parentId",a);let i=_.get(e,"linkage.depends",[]),l=_.get(e,"scope.depends",[]),o=_.get(e,"range_remote.depends",[]),n=_.concat(i,l);n=_.concat(n,o),a||(this.penetrationZList=_.concat(this.penetrationZList,n)),e.elements&&this.addStackArr(e.elements,t,e.id)})),this.createTopoGraph(e),this.penetrationZList=_.uniq(this.penetrationZList),this.penetrationZList=_.intersection(this.elementIdList,this.penetrationZList),this.relyGraphData.nodes.push({id:"sure000",name:"顶点"}),_.each(this.penetrationZList,(e=>{this.relyGraphData.edges.push({source:"sure000",target:e})}))}createTopoGraph(e){_.each(e,(e=>{let t=_.get(e,"mappings",[]),a=_.map(t,"local_field_id");_.each(a,(t=>{if(_.includes(this.elementIdList,t)){let a=_.get(this.eleMap,t);this.relyGraphData.nodes.push(a),this.relyGraphData.nodes.push(e),this.relyGraphData.edges.push({source:e.id,target:t})}}));let i=_.get(e,"linkage.depends",[]),l=_.get(e,"scope.depends",[]),o=_.get(e,"range_remote.depends",[]),n=_.concat(i,l);n=_.concat(n,o);let r=_.get(this.eleMap,e.id);if(_.each(n,(e=>{_.get(this.eleMap,e)||(_.pullAll(n,[e]),n=_.cloneDeep(n))})),n.length){let t=_.pullAll(this.penetrationZList,[e.id]);this.penetrationZList=_.cloneDeep(t)}_.each(n,(t=>{if(t&&e.id&&_.includes(this.elementIdList,t)){let a=_.get(this.eleMap,t);if(!a||!r)return;let i=r.id,l=_.get(this.eleMap,t);a&&!l&&(this.penetrationZList=_.replace(this.penetrationZList,t,i),this.penetrationZList=_.split(this.penetrationZList,",")),this.relyGraphData.nodes.push(e),this.relyGraphData.nodes.push(a),this.relyGraphData.edges.push({source:t,target:i})}e.elements&&this.createTopoGraph(e.elements)}))}))}getRelyHandleList(e,t){let a=[];const{breadthFirstSearch:i}=D.Algorithm;let l=null;return i(this.relyGraphData,e,{enter:({current:e,previous:t})=>{},leave:({current:i,previous:o})=>{l||i==e||t&&!_.includes(t,i)||(l=i),i!=e&&a.push(i)}}),{relyHandleList:a,firstId:l}}async loadLinkage(e,t,a,i,l){let o=[],n={};_.each(e,(e=>{let t=_.get(this.eleMap,e),i=_.get(t,"linkage.depends");if("Quote"==t.type&&(i=_.concat(i,_.get(t,"scope.depends"))),i=_.intersection(i,this.elementIdList),!_.isEmpty(i)){let t={calculate_type:"linkage",field_def_id:e},r=_.pick(a,i);n=_.merge(n,r),_.isNil(l)||_.set(t,"idx",l),o.push(t)}})),t&&_.set(n,i,t);let r=await this.bpm.loadResult({params:{cal_fields:o,fields:n}});return _.map(r.data,((e,t)=>{let a=_.get(this.eleMap,`${t}.type`);_.includes(["SelectFromForm","Quote"],a)&&(e=_.get(e,"data.form_id")),r.data[t]=e})),r.data}async fillDefault(e,t=[],a){let i=[];if(_.each(this.elements,(l=>{let o=_.includes(t,l.id);if(!_.get(l,"perm.writable"))return;if(o)return _.set(e,l.id,null),void this.setLocalCache(l.id,null,a);let n=_.get(e,l.id);if(!_.isNil(n))return;let r=_.get(l,"default.value.type");if("EVCConfig"==r){let t=_.get(l,"default.value.value",null);_.set(e,l.id,t),this.setLocalCache(l.id,t,a)}"EVCExpression"!=r&&"EVCFirstElem"!=r||i.push({calculate_type:"default",field_def_id:l.id})})),_.isEmpty(i))return;let l=await this.bpm.loadResult({params:{cal_fields:i}});_.map(l.data,((t,i)=>{let l=_.get(this.eleMap,`${i}.type`);_.includes(["SelectFromForm","Quote"],l)&&(t=_.get(t,"data.form_id")),_.includes(["MulSelectFromForm"],l)&&(t=_.map(t,"data.form_id")),_.set(e,i,t),this.setLocalCache(i,t,a)}))}setLocalCache(e,t,a){let i=_.get(this.eleMap,`${e}.value_type`);this.bpm.setLocalCache(a,`${e}.${i}`,t)}}var R={name:"BpmSubForm",components:{SubFormStyleTable:y,SubFormStyleCard:C,SubFormStyleList:x},props:{value:{type:Array,default(){return[]}},type:{type:String,default:"XSubForm"},fieldConf:{type:Object,default(){return{}}},mode:{type:String,default:"view"},uiType:{type:String,default:"default"},maxHeight:{type:[Number,String],default:500},showHeader:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},container:{type:Object,default:function(){return{}}},dm:{type:Boolean,default(){return!1}}},data(){return{subformData:[],tableMaxHeight:500,dialogTableMaxHeight:500,showSubForm:!1,linkageItem:null,initLinkageFlag:!1,relyHandleList:[],relyHandleListMap:{},relyingItemMap:{}}},computed:{fieldSelf(){return this},readOnly(){return console.log("this.fieldConf",this.fieldConf),!(this.fieldConf.perm.editable&&this.fieldConf.perm.modifiable)},columns(){const e=this.fieldConf.elements||[],t=[];return e.forEach((e=>{const a=s.Q[e.type]||{},i=e.perm||{visible:!0,editable:!0,writable:!0};if(this.dm||i.visible||i.editable||i.writable){e.visible=i.visible||this.dm;let l=this.mode;"edit"!==l||i.editable||i.writable||(l="view");let o=(t,a)=>{let i=(e,t)=>{let a=0;return e&&t?_.isString(e)?a=e.localeCompare(t):_.isArray(e)?e.length>0&&t.length>0?0==i[(e[0],t[0])]?(e.pop(),t.pop(),a=i(e,t)):a=i(e[0],t[0]):a=0==e.length&&t.length>0?-1:e.length>0&&0==t.length?1:0:a=e-t:a=!e&&t?-1:e&&!t?1:0,a};return null==t[e.id]?-1:null==a[e.id]?1:i(t[e.id],a[e.id])};t.push({key:e.id,id:e.id,label:e.name||e.id,minWidth:a.tableColWidth||100,sortable:!("edit"==this.mode&&e&&e.range_remote&&e.range_remote.depends&&e.range_remote.depends.length),sortBy:e.id,sortMethod:o,fieldMode:l,visible:i.visible,data:e})}})),t},subFormDialogTitle(){return this.fieldConf.name||this.fieldConf.id},showStyle(){return console.log("this.fieldConf.style",this.fieldConf.style),this.fieldConf.style||"table"},subformPerm(){return this.fieldConf.perm||{creatable:!1,deletable:!1,editable:!1,memorable:!1,modifiable:!1,visible:!0,writable:!1}},isSubForm(){return!0},elementIdList(){return _.map(this.fieldConf.elements,"id")},eleMap(){let e=this.fieldConf.elements,t=_.get(this.container,"formSchema.elements");return e=_.concat(e,t),_.keyBy(e,"id")}},watch:{value:{handler(e,t){e&&_.isArray(e)?(this.subformData=e,e!=t&&this.$nextTick((()=>{this.initLinkage()}))):this.subformData=[]},immediate:!0}},created(){window.addEventListener("resize",(()=>{const e=Math.floor(window.innerHeight-330);this.tableMaxHeight=e>550?e:550})),this.linkageItem=new M(this.$bpm),this.dialogTableMaxHeight=Math.floor(window.innerHeight/100*70-114)},mounted(){this.linkageItem.addStackArr(this.fieldConf.elements,this.eleMap),window.addEventListener("resize",(()=>{const e=Math.floor(window.innerHeight-330);this.tableMaxHeight=e>550?e:550})),setTimeout((()=>{const e=Math.floor(window.innerHeight-330);this.tableMaxHeight=e>550?e:550}),2e3),console.log("重新渲染")},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)},initLinkage(){if(this.initLinkageFlag||0==this.subformData.length)return!1;console.log("初始化联动");let{relyHandleList:e}=this.linkageItem.getRelyHandleList("sure000");_.set(this.relyHandleListMap,this.value.length-1,e),console.log("relyHandleList",e),console.log("this.relyHandleListMap",this.relyHandleListMap),this.initLinkageFlag=!0,setTimeout((()=>{console.log("initRelyComplete_subFormInitLinkage",this),this.$bpm.$emit("initRelyComplete",this)}),1e3)},handleNextRely(e){console.log("sub-form-handleNextRely");let t=_.get(this.relyHandleListMap,e);console.log("sub-form-handleNextRely_relyHandleList",t),t&&t.shift(),_.isEmpty(t)&&this.$bpm.$emit("initRelyComplete",this,e);let a=_.head(t,e);a&&this.$bpm.$emit("handeInitRely",{id:a,rowIndex:e})},async handleRelyById(e,t){console.log("sub-form-relyingItemMap",this.relyingItemMap),console.log("XSubForm handleRelyById"),console.log("sub-form-handleRelyById",e),console.log("sub-form-handleRelyById-rowIndex",t),console.log("sub-form-handleRelyById-this.elementIdList",this.elementIdList);let{relyHandleList:a,firstId:i}=this.linkageItem.getRelyHandleList(e);if(console.log("sub-form-handleRelyById-relyHandleList",a),console.log("sub-form-handleRelyById-firstId",i),_.set(this.relyHandleListMap,t,a),i){let e=await this.linkageItem.loadLinkage(a,this.value,this.container.formData,this.fieldConf.id,t);console.log("sub-form-handleRelyById-result",e),_.map(e,((e,a)=>{this.$set(this.value[t],`${a}`,e)})),this.$bpm.$emit("handeRelyById",{id:i,rowIndex:t})}},handleNextRelyById(e){console.log("sub-form-handleNextRelyById");let t=_.get(this.relyHandleListMap,e);if(console.log("sub-form-handleNextRelyById-relyHandleList",t),t){t.shift(),_.isEmpty(t)&&this.$bpm.$emit("initRelyComplete",this,e);let a=_.head(t);a&&this.$bpm.$emit("handeRelyById",{id:a,rowIndex:e})}},setData(){}}},$=(0,f.A)(R,r,[],!1,null,"e0a458ce",null);$.options.__file="components/lib/bpmSubForm/src/main.vue";var B=$.exports;B.install=function(e){e.component(B.name,B)};var L=B;return n}()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs"),require("@antv/g6")):"function"==typeof define&&define.amd?define(["lodash","qs","@antv/g6"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs"),require("@antv/g6")):e.bpm2=t(e.lodash,e.qs,e["@antv/g6"])}(self,(function(e,t,a){return function(){"use strict";var i={7520:function(e,t,a){a.d(t,{Q:function(){return n}});let i=[{key:"lt",name:"早于"},{key:"gt",name:"晚于"},{key:"gte",name:"不早于"},{key:"lte",name:"不晚于"}],l=[{key:"in",name:"在列表中"}],o=[{key:"in",name:"在列表中"},{key:"all",name:"包含所有"}];const n={Text:{name:"单行文本",hasBpmField:!0,tableColWidth:240,actions:[{key:"contains",name:"包含"},{key:"eq",name:"等于"}],attrs:["type","value_type","id","name","linkage"]},TextArea:{name:"多行文本",hasBpmField:!0,tableColWidth:300,actions:[{key:"contains",name:"包含"},{key:"eq",name:"等于"}],attrs:["type","value_type","id","name","linkage"]},SerialNumber:{name:"流水号",hasBpmField:!0,actions:[{key:"contains",name:"包含"}],options:{type:"Text"},attrs:["type","id","name","linkage"]},Number:{name:"数字",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"},{key:"gt",name:"大于"},{key:"gte",name:"大于等于"},{key:"lt",name:"小于"},{key:"lte",name:"小于等于"},{key:"ne",name:"不等于"}],attrs:["type","id","name","value_type","is_int","view.precision","linkage"]},DateTime:{name:"日期时间选择器",tableColWidth:240,hasBpmField:!0,actions:i,attrs:["type","id","name","check.format","view.format","linkage"]},Date:{name:"日期选择器",tableColWidth:240,hasBpmField:!0,actions:i,attrs:["type","id","name","check.format","view.format","linkage"]},Time:{name:"时间选择器",hasBpmField:!0,tableColWidth:240,actions:i,attrs:["type","id","name","check.format","view.format","linkage"]},Timestamp:{name:"※时间戳",tableColWidth:240,actions:i,attrs:["type","id","name","check.format","view.format","linkage"]},Select:{name:"单选",hasBpmField:!0,tableColWidth:220,actions:l,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},Status:{name:"状态",hasBpmField:!0,tableColWidth:150,actions:l,options:{type:"MulSelect"},attrs:["type","id","name","value_type","style","range_enum","linkage"]},MulSelect:{name:"多选",hasBpmField:!0,tableColWidth:220,actions:o,attrs:["type","id","name","value_type","result_type","style","range_enum","linkage"]},SelectFromForm:{name:"远程单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromForm"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectFromForm:{name:"远程多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},SelectFromMulForm:{name:"关联组件",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type"]},SelectProject:{name:"项目单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectProject"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectProject:{name:"项目多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectUser:{name:"用户单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectUser"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectUser:{name:"用户多项选择",hasBpmField:!0,tableColWidth:200,actions:o,options:{type:"MulSelectUser"},attrs:["type","id","name","range_remote","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectURUser:{name:"用户单项选择(新)",hasBpmField:!0,tableColWidth:400,actions:l,options:{type:"MulSelectURUser"},attrs:["type","id","name","range_remote","value_type","filters","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectURUser:{name:"用户多项选择(新)",hasBpmField:!0,tableColWidth:400,actions:o,options:{type:"MulSelectURUser"},attrs:["type","id","name","range_remote","value_type","filters","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectRootCategory:{name:"根任务类型选择",hasBpmField:!0,tableColWidth:200,actions:[{key:"eq",name:"等于"}],attrs:["type","id","name","category_cls","value_type","linkage"]},SelectCheckItem:{name:"检查项单项选择",hasBpmField:!0,actions:l,tableColWidth:200,options:{type:"MulSelectCheckItem"},attrs:["type","id","name","category_cls","value_type","range_remote","root_category","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},MulSelectCheckItem:{name:"检查项多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","category_cls","value_type","range_remote","root_category","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},SelectSort:{name:"分类单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectSort"},attrs:["type","id","name","value_type","range_remote","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},MulSelectSort:{name:"分类多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","value_type","range_remote","tree_select","can_select","can_select.filter_expression","range_remote.filter_expression","range_remote.depends","linkage"]},SelectPartner:{name:"合作伙伴单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectPartner"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectPartner:{name:"合作伙伴多项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectPartner"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},SelectOrg:{name:"单位单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectOrg"},attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},MulSelectOrg:{name:"单位多项选择",hasBpmField:!0,tableColWidth:200,actions:o,attrs:["type","id","name","value_type","range_remote","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.depends","linkage"]},Audit:{name:"审批",hasBpmField:!0,actions:[{key:"ar_eq",name:"审批结果等于"},{key:"ar_in",name:"审批结果在列表中"}],actionOptions:[{value:0,label:"未审批"},{value:1,label:"审批通过"},{value:2,label:"审批未通过"}],attrs:["type","id","name","linkage"],options:{result_type:"Array",value_type:"int",type:"MulSelect",style:"default",range_enum:[[0,"未审批"],[1,"通过"],[2,"未通过"]]}},MulAudit:{name:"多人审批",hasBpmField:!0,actions:[{key:"ar_eq",name:"审批结果等于"},{key:"ar_in",name:"审批结果在列表中"}],actionOptions:[{value:0,label:"未审批"},{value:1,label:"审批通过"},{value:2,label:"审批未通过"}],attrs:["type","id","name","linkage"],options:{result_type:"Array",value_type:"int",type:"MulSelect",style:"default",range_enum:[[0,"未审批"],[1,"通过"],[2,"未通过"]]}},MulArea:{name:"区域多项选择",hasBpmField:!0,tableColWidth:260,actions:o,attrs:["type","id","name","value_type","can","linkage"]},Area:{name:"区域单项选择",hasBpmField:!0,tableColWidth:260,actions:l,options:{type:"MulArea"},attrs:["type","id","name","value_type","can","linkage"]},SelectFormId:{name:"表单单项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},MulSelectFormId:{name:"表单多项选择",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFormId"},attrs:["type","id","name","value_type","form_select_type","linkage"]},SelectFromField:{name:"远程单选(从字段)",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromField"},attrs:["type","id","name","range_remote","style","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectFromField:{name:"远程多选(从字段)",hasBpmField:!0,tableColWidth:200,actions:l,options:{type:"MulSelectFromField"},attrs:["type","id","name","range_remote","style","value_type","range_remote.filter_expression","range_remote.store_field","range_remote.display_field","range_remote.form","range_remote.depends","linkage"]},MulSelectEntranceForm:{name:"远程多项选择(从入口)",hasBpmField:!0},SelectHouseOwner:{name:"业主选择"},MulSelectIssue:{name:"问题选择"},MulFile:{name:"附件",hasBpmField:!0,tableColWidth:150},MulImage:{name:"图片",hasBpmField:!0,tableColWidth:150},Signature:{name:"签名",hasBpmField:!0},OnlineEditor:{name:"在线文档编辑器"},Spliter:{name:"分割线",hasBpmField:!1},Stepper:{name:"步进器",hasBpmField:!1},Quote:{name:"跨表单数据引用",hasBpmField:!1},Order:{name:"排序控件",hasBpmField:!1},SubForm:{name:"子表单",hasBpmField:!0},XSubForm:{name:"子表单(增强版)",hasBpmField:!0},OrderSubForm:{name:"排序子表单",hasBpmField:!0},AreaElevation:{name:"区域快速选择器",hasBpmField:!0,tableColWidth:200},RichText:{name:"富文本编辑框",hasBpmField:!0,tableColWidth:100},Appointment:{name:"时段预约",hasBpmField:!0,tableColWidth:120},Rating:{name:"评分",hasBpmField:!0,tableColWidth:250},MapLocation:{name:"地图位置",hasBpmField:!0,tableColWidth:250}}},9795:function(e,t,a){function i(){for(var e=[],t="0123456789abcdef",a=0;a<36;a++)e[a]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}a.d(t,{uR:function(){return i}}),a(6773),a(5360)},1773:function(e,t,a){var i=a(1601),l=a.n(i),o=a(6314);a.n(o)()(l()).push([e.id,"\n/deep/ .relate-sub-form-dialog .bpm-relate-subform-table .el-input__validateIcon {\n display: none;\n}\n",""])},6314:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var a="",i=void 0!==t[5];return t[4]&&(a+="@supports (".concat(t[4],") {")),t[2]&&(a+="@media ".concat(t[2]," {")),i&&(a+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),a+=e(t),i&&(a+="}"),t[2]&&(a+="}"),t[4]&&(a+="}"),a})).join("")},t.i=function(e,a,i,l,o){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(i)for(var r=0;r<this.length;r++){var s=this[r][0];null!=s&&(n[s]=!0)}for(var d=0;d<e.length;d++){var m=[].concat(e[d]);i&&n[m[0]]||(void 0!==o&&(void 0===m[5]||(m[1]="@layer".concat(m[5].length>0?" ".concat(m[5]):""," {").concat(m[1],"}")),m[5]=o),a&&(m[2]?(m[1]="@media ".concat(m[2]," {").concat(m[1],"}"),m[2]=a):m[2]=a),l&&(m[4]?(m[1]="@supports (".concat(m[4],") {").concat(m[1],"}"),m[4]=l):m[4]="".concat(l)),t.push(m))}},t}},1601:function(e){e.exports=function(e){return e[1]}},4486:function(e,t,a){function i(e,t,a,i,l,o,n,r){var s,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=a,d._compiled=!0),i&&(d.functional=!0),o&&(d._scopeId="data-v-"+o),n?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),l&&l.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},d._ssrRegister=s):l&&(s=r?function(){l.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:l),s)if(d.functional){d._injectStyles=s;var m=d.render;d.render=function(e,t){return s.call(t),m(e,t)}}else{var c=d.beforeCreate;d.beforeCreate=c?[].concat(c,s):[s]}return{exports:e,options:d}}a.d(t,{A:function(){return i}})},4419:function(e){e.exports=a},6773:function(t){t.exports=e},5360:function(e){e.exports=t}},l={};function o(e){var t=l[e];if(void 0!==t)return t.exports;var a=l[e]={id:e,exports:{}};return i[e](a,a.exports,o),a.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};o.r(n),o.d(n,{default:function(){return L}});var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",["table"===e.uiType?a("el-button",{attrs:{type:"text"},on:{click:function(t){e.showSubForm=!0}}},[e._v(e._s(e.$z("查看子表单","b2.common.view_subform")))]):"table"===e.showStyle?a("SubFormStyleTable",e._b({ref:"sub_form_table",attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,readOnly:e.readOnly,dm:e.dm,"max-height":e.tableMaxHeight,"show-header":e.showHeader,resizable:e.resizable,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleTable",e.$attrs,!1)):"list"===e.showStyle?a("SubFormStyleList",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,dm:e.dm,"max-height":e.maxHeight,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleList",e.$attrs,!1)):a("SubFormStyleCard",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,dm:e.dm,"max-height":e.maxHeight,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleCard",e.$attrs,!1)),e._v(" "),"table"===e.uiType?a("el-dialog",{attrs:{title:e.subFormDialogTitle,visible:e.showSubForm,width:"50%"},on:{"update:visible":function(t){e.showSubForm=t},close:function(t){e.showSubForm=!1}}},[a("div",{staticStyle:{"max-height":"70vh",overflow:"auto"}},["table"===e.showStyle?a("SubFormStyleTable",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,readOnly:e.readOnly,dm:e.dm,"max-height":e.dialogTableMaxHeight,"show-header":!0,resizable:!0,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleTable",e.$attrs,!1)):"list"===e.showStyle?a("SubFormStyleList",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,mode:e.mode,dm:e.dm,"max-height":e.maxHeight,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem},on:{change:e.handleChange}},"SubFormStyleList",e.$attrs,!1)):a("SubFormStyleCard",e._b({attrs:{value:e.subformData,columns:e.columns,subformPerm:e.subformPerm,fieldConf:e.fieldConf,"top-container":e.container,container:e.fieldSelf,linkageItem:e.linkageItem,mode:e.mode,dm:e.dm},on:{change:e.handleChange}},"SubFormStyleCard",e.$attrs,!1))],1)]):e._e()],1)};r._withStripped=!0;var s=o(7520),d=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$z("单击可进行编辑","c.click_to_edit"),placement:"top",disabled:e.readOnly||!("edit"==e.mode&&e.showSubformData.length>e.countForClickToEdit&&!e.hadClickRow)||"view"==e.mode}},[a("el-table",{key:"rowIndex",staticClass:"bpm-subform-table",staticStyle:{width:"100%"},attrs:{data:e.showSubformData,"row-key":"rowIndex","max-height":e.maxHeight,"show-header":e.showHeader,resizable:e.resizable,border:"",stripe:""},on:{"row-click":e.rowClick,"header-dragend":e.handleHeaderDragend}},[e.showIndex?a("el-table-column",{attrs:{type:"index",label:e.indexLabel,width:100},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.$index+1)+"\n\n "),e._l(e.hiddenColumns,(function(i){return[a("bpm-sub-form-field",e._b({directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],key:i.key,attrs:{type:i.data.type,fieldConf:i.data,mode:e.dm?e.mode:e.getFieldMode(i.data.perm,t.row),dm:e.dm,uiType:"table",rowIndex:t.row.rowIndex,container:e.container},on:{input:e.handleInput,change:function(a){return e.handleChange(a,t.row)}},model:{value:t.row[i.id],callback:function(a){e.$set(t.row,i.id,a)},expression:"scope.row[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))]}))]}}],null,!1,1118663549)}):e._e(),e._v(" "),e._l(e.showColumns,(function(t){return a("el-table-column",{key:t.key,attrs:{prop:t.id,label:(t.data.check&&t.data.check.required?"* ":"")+t.label,"min-width":t.minWidth,sortable:t.sortable,"sort-method":t.sortMethod},scopedSlots:e._u([{key:"default",fn:function(i){return[a("bpm-sub-form-field",e._b({attrs:{type:t.data.type,fieldConf:t.data,mode:e.dm?e.mode:e.getFieldMode(t.data.perm,i.row),dm:e.dm,uiType:"table",rowIndex:i.row.rowIndex,container:e.container},on:{input:e.handleInput,change:function(t){return e.handleChange(t,i.row)}},model:{value:i.row[t.id],callback:function(a){e.$set(i.row,t.id,a)},expression:"scope.row[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))]}}],null,!0)},[a("template",{slot:"header"},[t.data.check&&t.data.check.required?a("span",{staticStyle:{color:"#D84141"}},[e._v("* ")]):e._e(),e._v(" "),a("span",[e._v(e._s(t.label))])])],2)})),e._v(" "),e.canRemove&&e.countLimit.canRemove&&"edit"==e.mode||e.relateSubForms&&e.relateSubForms.length?a("el-table-column",{attrs:{prop:"delete",label:e.$z("操作","c.operation"),"min-width":150},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table-row-opertaion-btn-grp"},[e.canRemove&&e.countLimit.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return a.stopPropagation(),e.handleRemoveItem(t.row.rowIndex,t.row)}}}):e._e(),e._v(" "),e._l(e.relateSubForms,(function(i){return a("el-button",{directives:[{name:"show",rawName:"v-show",value:i.enable,expression:"relate.enable"}],key:i.idx,attrs:{type:"text"},on:{click:function(a){return a.stopPropagation(),e.openRelateFormDialog(i,t.row)}}},[e._v("\n "+e._s(i.name)+"\n ")])}))],2)]}}],null,!1,4273942660)}):e._e()],2)],1),e._v(" "),e.canAdd&&e.countLimit.canAdd?a("el-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"default",icon:"el-icon-plus"},on:{click:function(t){return e.handleAddItem(null)}}},[e._v(e._s(e.$z("添加项","c.add_item")))]):e._e(),e._v(" "),a("relate-sub-form-dialog",{attrs:{mode:e.mode,container:e.container,srcFieldConf:e.fieldConf,row:e.dialogSubFormRelate.row,relateInfo:e.dialogSubFormRelate.relateInfo,visible:e.dialogSubFormRelate.visible},on:{close:e.handelRelateFormDialogClose}})],1)};d._withStripped=!0;var m=o(9795),c={props:{value:{type:Array,default(){return[]}},columns:{type:Array,default(){return[]}},subformPerm:{type:Object,default(){return{}}},fieldConf:{type:Object,default(){return{}}},mode:{type:String,default:"view"},maxHeight:{type:[Number,String],default:500},container:{type:Object,default(){return{}}},topContainer:{type:Object,default(){return{}}}},data(){return{subformData:[],originSubformData:[],originSubformDataMap:{},showSubformData:[],_oldVal:null,hasInit:!1,isEditingMap:{},formSchemaDef:{},formSourceData:[]}},inject:["formData","formSchema"],computed:{form(){return this.topContainer},userId(){return _.get(this.$bpm.userInfo,"user_id",0)},originItem(){let e={};const t={int:0,text:"",array:[],struct:[]};return this.columns.forEach((a=>{e[a.id]=t[a.data.value_type]||""})),e},canAdd(){return"edit"===this.mode&&(this.subformPerm.creatable||this.dm)},canRemove(){return"edit"===this.mode&&(this.subformPerm.deletable||this.dm)},min(){const e=_.get(this.fieldConf,"check.min_count",0),t=_.get(this.fieldConf,"check.xmin_count");return t?this.form.formData[t]||0:e},max(){const e=_.get(this.fieldConf,"check.max_count"),t=_.get(this.fieldConf,"check.xmax_count");return t?this.form.formData[t]||0:e},countForClickToEdit(){return _.get(this.fieldConf,"count_for_click_to_edit")},countLimit(){const e=this.min,t=this.max;let a=this.showSubformData.length;return{canAdd:!(t&&a>=t),canRemove:!(a<=e)}},showIndex(){return!!this.fieldConf.show_index},indexLabel(){return this.fieldConf.index_label||zj.z("序号","b2.common.subform_index")},groupField(){return _.get(this.fieldConf,"group_by.by","")},showField(){return _.get(this.fieldConf,"is_show_field")},readonly(){return!_.get(this.fieldConf,"perm.editable",!1)}},watch:{value:{handler(e){e&&_.isArray(e)?(this.subformData=e,0==this.originSubformData.length&&(this.originSubformData=_.cloneDeep(e),_.each(this.originSubformData,(e=>{let t=_.cloneDeep(e);delete t._meta,this.originSubformDataMap[e._meta.id]=t})))):this.subformData=[]},immediate:!0},subformData:{handler(e){console.log("val",e),this.showSubformData=this.setData(e),console.log("this.showSubformData",this.showSubformData)},deep:!0,immediate:!0},min(e,t){this.addItemByMin(e)},max(e,t){let a=this.showSubformData.length;if(e&&a>e){let t=a-e,i=0;for(let e=this.subformData.length;e>0;e--){let a=this.subformData[e-1];a.visible&&i<t&&(this.handleRemoveItem(a.rowIndex,a),i++)}}}},mounted(){this.form.$once("dataLoaded",(e=>{this.addItemByMin(this.min)})),this.formSchemaDef=this.formSchema()},methods:{getFieldMode(e,t){let a=this.mode;return!e||"edit"!==a||e.editable||e.writable?"table"==this.style_ui_type&&!this.isEditingMap[t._meta.id]&&this.showSubformData.length>this.countForClickToEdit&&(a="view"):a="view",a},throttleEmit:_.throttle((function(){"edit"===this.mode&&(console.log("subForm change emit"),this.$emit("change",this.subformData))}),1e3,{leading:!1}),handleChange(e,t,a){console.log("field change: ",e),console.log("field change row: ",t),console.log("field change this.formSchemaDef ",this.formSchemaDef);let i=!1;if(t&&t._meta&&t._meta.id){let e=this.originSubformDataMap[t._meta.id];if(console.log("field change_origin",e),e){for(let a in t)_.includes(["_meta","rowIndex","visible","isNew"],a)||e[a]==t[a]||(i=!0);i&&(t._meta.update_time=parseInt((new Date).getTime()/1e3),t._meta.updater=this.userId,t._meta.last_value=e)}if(this.formSchemaDef){let e=[];_.each(this.formSchemaDef.elements,(a=>{a.relate_setting&&_.each(a.relate_setting,(i=>{if(i.sub_form==this.fieldConf.id){console.log("element",a),console.log("relate",i),this.formSourceData=this.formData(),console.log("field change this.formSourceData ",this.formSourceData);let l={};_.each(i.sub_form_field_mapping,(e=>{_.includes(i.sub_form_fields,e.target)&&(l[e.src]=t[e.target])})),console.log("field change_confidition",l);let o=_.filter(this.formSourceData[a.id],(e=>{if(e&&e._meta&&!e._meta.is_deleted)return e})),n=_.find(o,l);if(console.log("field change_relate_row",n),n){let t={field:a.id,row:n._meta.id};e.push(t)}}}))})),t._meta.relate=e}if(this.fieldConf.relate_setting&&this.fieldConf.relate_setting.length){console.log("this.fieldConf",this.fieldConf),console.log("this.fieldConf.relate_setting",this.fieldConf.relate_setting);let e=this.formData();_.each(this.fieldConf.relate_setting,(a=>{_.each(e[a.sub_form],(e=>{e._meta&&e._meta.relate&&_.find(e._meta.relate,{field:this.fieldConf.id,row:t._meta.id})&&(console.log("_data",e),_.each(a.sub_form_field_mapping,(a=>{e[a.target]=t[a.src]})))}))}))}}this.throttleEmit()},handleInput(e){console.log("field input: ",e)},async addItemByMin(e){if(_.get(this.fieldConf,"linkage"))return;let t=this.showSubformData.length;if(e&&t<e){let a=e-t;for(let e=0;e<a;e++)await this.handleAddItem(null)}},async handleAddItem(e=null){let t=(0,m.uR)(),a=this.subformData.length,i=a>=1?this.subformData[a-1]:_.cloneDeep(this.originItem),l=_.get(this.fieldConf,"fill_in_last_fields",[]);console.log("lastItem",i),console.log("this.subformData",this.subformData),console.log("fillInLastFields",l),i=_.pick(i,l),console.log("lastItem",i),console.log("relateItem",e),e?i=_.cloneDeep(e):_.isEmpty(i)||delete i._meta,console.log("lastItem: ",i);let o={isNew:!0,_meta:{id:t,creator:this.userId,create_time:parseInt((new Date).getTime()/1e3),update_time:parseInt((new Date).getTime()/1e3),updater:this.userId,last_value:null,deleter:0,is_deleted:!1,relate:[]}};this.$set(this.isEditingMap,t,!0),o=_.merge(o,i),console.log("add_data",o),console.log("add_link_data.rowIndex",o.rowIndex),await this.linkageItem.fillDefault(o,[],this.mode),!this.subformData||_.isEmpty(this.subformData)?this.subformData=[o]:this.subformData.push(o),this.handleChange();let{relyHandleList:n,firstId:r}=this.linkageItem.getRelyHandleList("sure000");console.log("add_link_this.relyHandleListMap",this.relyHandleListMap),console.log("add_link_this.this.subformData",this.subformData),console.log("add_link_relyHandleList",n),_.set(this.relyHandleListMap,this.subformData.length-1,n),_.isEmpty(n)&&this.$bpm.$emit("initRelyComplete",this,o.rowIndex),r&&(console.log("add_link_firstId",r),console.log("add_link_data.rowIndex",o.rowIndex),setTimeout((async()=>{let e=await this.linkageItem.loadLinkage(n,this.subformData,this.container.formData,this.fieldConf.id,o.rowIndex);console.log("add_link_data.rowIndex",o.rowIndex),console.log("add_link_data.firstId",r),console.log("add_link_this.relyHandleListMap",this.relyHandleListMap),console.log("add_link_result",e),_.map(e,((e,t)=>{this.$set(this.subformData[o.rowIndex],`${t}`,e)})),this.handleChange(),this.$bpm.$emit("handeInitRely",{id:r,rowIndex:o.rowIndex})}),500))},setData(e){let t=this.showField,a=_.filter(e,((e,a)=>{e&&(e.rowIndex=a);let i=!e._meta.is_deleted&&(!t||t&&(2==e[t]||!e[t]));return e.visible=i,i}));if(this.groupField&&this.$q.platform.is.desktop&&this.readonly){let e=_.groupBy(a,this.groupField);_.map(e,((e,t)=>{_.each(e,((e,a)=>{0==a&&(e._groupField=t)}))}))}return console.log("tableData",a),this._oldVal=JSON.stringify(e),a},handleRemoveItem(e,t){if(console.log("deleteRowIndex",e),console.log("this.relateSubForms",this.relateSubForms),console.log("item",t),this.relateSubForms&&this.relateSubForms.length>0){let a=!1;_.each(this.relateSubForms,(e=>{console.log("relateSetting",e);let i=this.formData();console.log("this.subformData",i),console.log("formData[relateSetting['sub_form']]",i[e.sub_form]);let l=_.filter(i[e.sub_form],(a=>{if(console.log("filter_item",a),a&&a._meta&&a._meta.relate&&a._meta.relate&&a._meta.relate.length&&!a._meta.is_deleted){let e=_.find(a._meta.relate,{field:this.fieldConf.id,row:t._meta.id});if(console.log("relate_bind",e),e)return a}if(a&&a._meta&&a._meta&&!a._meta.is_deleted){let i=!1,l=!0;if(_.each(e.sub_form_field_mapping,(o=>{_.includes(e.sub_form_fields,o.target)&&(a[o.target]==t[o.src]?i=!0:(l=!1,i=!1))})),i&&l)return a}}));console.log("subformData",l),l.length>0&&e.strong_association&&(a=!0)})),a?this.$confirm(zj.z("该项有关联数据,确认一并删除?","b2.common.delete_subform_tip"),zj.z("提示","c.tip"),{confirmButtonText:zj.z("确定","c.confirm"),cancelButtonText:zj.z("取消","c.cancel"),type:"warning"}).then((()=>{this._delItem(this.subformData,e),this._delRelateSubItem(this.subformData[e]),this.$nextTick((()=>{this.$message({type:"success",message:zj.z("删除成功!","c.deleted_successfully")}),this.handleChange()}))})).catch((()=>!1)):(this._delItem(this.subformData,e),this.handleChange())}else this._delItem(this.subformData,e),this.handleChange()},_delItem(e,t){if(console.log("delItem",e),console.log("delItem_rowIndex",t),e[t]&&e[t].isNew)console.log("删除子表单项"),e.splice(t,1);else{if(1==e[t]._meta.is_deleted)return!1;console.log("标记删除子表单项"),e[t]._meta.is_deleted=!0,e[t]._meta.deleter=this.userId,e[t]._meta.update_time=parseInt((new Date).getTime()/1e3)}},_delRelateSubItem(e){_.each(this.relateSubForms,(t=>{console.log("relateSetting",t);let a=this.formData(),i=_.filter(a[t.sub_form],(a=>{if(console.log("filter_item",a),a&&a._meta&&a._meta&&!a._meta.is_deleted){let i=!1,l=!0;if(_.each(t.sub_form_field_mapping,(o=>{_.includes(t.sub_form_fields,o.target)&&(a[o.target]==e[o.src]?i=!0:(l=!1,i=!1))})),i&&l)return a}}));console.log("subformData",i),t.strong_association&&_.each(i,((e,t)=>{this._delItem(i,t)}))}))},handleEditItem(e,t){console.log("editRowIndex",e),this.subformData[e]&&this.$set(this.isEditingMap,this.subformData[e]._meta.id,!0)}}},h=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"relate-sub-form-dialog"},[a("el-dialog",{attrs:{visible:e.dlgVisible,"before-close":e.handleClose,top:"3vh",width:"85%",title:e.relateSetting.title,fullscreen:!1,"append-to-body":""},on:{"update:visible":function(t){e.dlgVisible=t}}},[a("el-table",{key:e.refreshKey,staticClass:"bpm-relate-subform-table",staticStyle:{width:"100%",overflow:"auto"},attrs:{data:e.subformData,height:"80vh",border:"",stripe:""},on:{"row-click":e.rowClick}},[e.showIndex?a("el-table-column",{attrs:{type:"index",label:e.indexLabel,width:100},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.$index+1)+"\n\n "),e._l(e.hiddenColumns,(function(i){return[a("bpm-sub-form-field",e._b({directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],key:i.key,attrs:{type:i.data.type,fieldConf:i.data,"form-name":e.formDefId,"form-def-id":e.formDefId,orgInfo:e.orgParams,mode:e.getFieldMode(i.data.perm,t.row,i.id),uiType:"table",rowIndex:t.row.rowIndex,container:e.container},model:{value:t.row[i.id],callback:function(a){e.$set(t.row,i.id,a)},expression:"scope.row[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))]}))]}}],null,!1,4184301278)}):e._e(),e._v(" "),e._l(e.showColumns,(function(t){return a("el-table-column",{key:t.key,attrs:{prop:t.id,label:(t.data.check&&t.data.check.required?"* ":"")+t.label,"min-width":t.minWidth,sortable:t.sortable,"sort-by":t.sortBy},scopedSlots:e._u([{key:"default",fn:function(i){return[a("bpm-sub-form-field",e._b({attrs:{type:t.data.type,fieldConf:t.data,mode:e.getFieldMode(t.data.perm,i.row,t.id),"form-name":e.formDefId,"form-def-id":e.formDefId,orgInfo:e.orgParams,uiType:"table",rowIndex:i.row.rowIndex,container:e.container},model:{value:i.row[t.id],callback:function(a){e.$set(i.row,t.id,a)},expression:"scope.row[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))]}}],null,!0)},[a("template",{slot:"header"},[t.data.check&&t.data.check.required?a("span",{staticStyle:{color:"#D84141"}},[e._v("* ")]):e._e(),e._v(" "),a("span",[e._v(e._s(t.label))])])],2)})),e._v(" "),"edit"==e.mode?a("el-table-column",{attrs:{prop:"delete",label:e.$z("操作","c.operation"),fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"table-row-opertaion-btn-grp"},[e.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return a.stopPropagation(),e.handleRemoveItemInner(t.row.rowIndex)}}}):e._e()],1)]}}],null,!1,1620617082)}):e._e()],2),e._v(" "),e.canAdd?a("el-button",{staticStyle:{"margin-top":"10px"},attrs:{type:"default",icon:"el-icon-plus"},on:{click:e.handleAddItemInner}},[e._v(e._s(e.$z("添加项","c.add_item")))]):e._e(),e._v(" "),"edit"==e.mode&&e.subformData.length>e.countForClickToEdit&&!e.hadClickRow?a("span",{staticClass:"edit-tip",staticStyle:{"margin-left":"10px",color:"#666","font-size":"13px"}},[e._v(e._s(e.$z("提示","c.tip"))+": "+e._s(e.$z("单击可进行编辑","c.click_to_edit")))]):e._e()],1)],1)};h._withStripped=!0;var u={props:{srcFieldConf:{type:Object,default(){return{}}},row:{type:Object,default:function(){return{}}},relateInfo:{type:Object,default:function(){return{}}},mode:{type:String,default:"edit"},container:{type:Object,default(){return{}}},visible:{type:Boolean,default:!1}},inject:["formData","formSchema"],watch:{visible(e){e&&this.$nextTick((()=>{this.initRelateSubFormTable()})),this.dlgVisible=e},relateInfo(e){this.relateSetting=e},srcFormData:{handler(e){this.$nextTick((()=>{this.getSubFormData(e)}))},deep:!0}},data(){return{name:"title",relateSetting:{perm:{}},formSchemaDef:{},dlgVisible:!1,hadClickRow:!1,subformData:[],refreshKey:0,SubFormFieldConf:{perm:{}},isEditingMap:{},columns:[]}},computed:{countForClickToEdit(){return _.get(this.srcFieldConf,"count_for_click_to_edit")},srcFormData(){return this.formData()},dialogSelf(){return this},eleMap(){let e=this.SubFormFieldConf.elements,t=_.get(this.container,"formSchema.elements");return e=_.concat(e,t),_.keyBy(e,"id")},orgParams(){return this.$store.getters.getOrgParams},formDefId(){return this.formSchemaDef.id},canAdd(){return"edit"===this.mode&&this.SubFormFieldConf.perm.creatable&&this.relateSetting.perm.creatable},canRemove(){return"edit"===this.mode&&this.SubFormFieldConf.perm.deletable&&this.relateSetting.perm.deletable},showIndex(){return!!this.SubFormFieldConf.show_index},indexLabel(){return this.SubFormFieldConf.index_label||zj.z("序号","b2.common.subform_index")},showColumns(){return _.filter(this.columns,(e=>{if(e.visible)return e}))},hiddenColumns(){return _.filter(this.columns,(e=>{if(!e.visible)return e}))}},methods:{getFieldMode(e,t,a){let i=this.mode;return e&&"edit"===i&&!e.editable&&!e.writable&&this.relateSetting.perm.editable?i="view":(!this.isEditingMap[t._meta.id]&&this.subformData.length>this.countForClickToEdit&&(i="view"),t.isNew&&(i="edit")),_.includes(this.relateSetting.sub_form_fields,a)&&(i="view"),i},initRelateSubFormTable(){this.formSchemaDef=this.formSchema();let e=this.formData();this.SubFormFieldConf=_.find(this.formSchemaDef.elements,{id:this.relateSetting.sub_form}),this.columns=this.getColumns(this.SubFormFieldConf),this.getSubFormData(e),this.refreshKey++},getSubFormData(e){this.subformData=_.filter(e[this.relateSetting.sub_form],(e=>{if(e&&e._meta&&e._meta&&!e._meta.is_deleted){let t=!1,a=!0;if(_.each(this.relateSetting.sub_form_field_mapping,(i=>{_.includes(this.relateSetting.sub_form_fields,i.target)&&(e[i.target]==this.row[i.src]?t=!0:(a=!1,t=!1))})),t&&a)return e}}))},getColumns(e){if(!e)return!1;const t=e.elements||[],a=[];return t.forEach((e=>{const t=s.Q[e.type]||{},i=e.perm||{visible:!0,editable:!0,writable:!0};if(i.visible||i.editable||i.writable){e.visible=i.visible;let l=this.mode;"edit"!==l||i.editable||i.writable||(l="view"),a.push({key:e.id,id:e.id,label:e.name||e.id,minWidth:t.tableColWidth||100,sortable:!("edit"==l&&e&&e.range_remote&&e.range_remote.depends&&e.range_remote.depends.length),sortBy:e.id,fieldMode:l,visible:i.visible,data:e})}})),a},async handleAddItemInner(){let e=this.$parent.$parent.container.$refs["bpmFormField"+this.relateSetting.sub_form][0].$refs["inner-component"].$refs.sub_form_table;if(e){let t={_meta:{relate:[{field:this.srcFieldConf.id,row:this.row._meta.id}]}};_.each(this.relateSetting.sub_form_field_mapping,(e=>{t[e.target]=this.row[e.src]})),e.handleAddItem(t)}},async handleRemoveItemInner(e){let t=this.$parent.$parent.container.$refs["bpmFormField"+this.relateSetting.sub_form][0].$refs["inner-component"].$refs.sub_form_table;t&&t.handleRemoveItem(e)},rowClick(e,t,a){"edit"==this.mode&&this.subformData.length>this.countForClickToEdit&&(this.hadClickRow=!0),this.handleEditItem(e.rowIndex,e)},handleEditItem(e,t){let a=_.find(this.subformData,{rowIndex:e});a&&this.$set(this.isEditingMap,a._meta.id,!0)},handleClose(){this.dlgVisible=!1,this.$emit("close",!1)},confirm(){console.log("this.subformData",this.subformData),this.dlgVisible=!1,this.$emit("close",!0)}}},f=(o(1773),o(4486)),p=(0,f.A)(u,h,[],!1,null,null,null);p.options.__file="components/lib/bpmSubForm/src/part/relateSubFormDialog.vue";var g={name:"SubFormStyleTable",mixins:[c],components:{relateSubFormDialog:p.exports},props:{showHeader:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},linkageItem:{type:Object,default:function(){return{}}},mode:{type:String,default:"view"},readOnly:{type:Boolean,default:!1},dm:{type:Boolean,default(){return!1}}},data(){return{style_ui_type:"table",hadClickRow:!1,tag:"",cols_config:[],dialogSubFormRelate:{relateInfo:{},row:{},visible:!1}}},methods:{handleHeaderDragend(e,t,a,i){a.width=e,this.setColWidth(a.property,e)},setCutomerColsConfig(){let e={},t="";e=localStorage.getItem("SUBFORM_COLUMN_CUSTOMER_CONFIG")&&JSON.parse(localStorage.getItem("SUBFORM_COLUMN_CUSTOMER_CONFIG"))||{},t=e[this.userId+this.tag],t?t.field_colunms_config=this.cols_config:t={field_colunms_config:this.cols_config},e[this.userId+this.tag]=t,localStorage.setItem("SUBFORM_COLUMN_CUSTOMER_CONFIG",JSON.stringify(e))},setColWidth(e,t){_.each(this.cols_config,(a=>{a.id==e&&(a.width=t)})),this.setCutomerColsConfig()},getCustomerColsConfig(e){let t=[],a={},i=[],l={};return l=localStorage.getItem("SUBFORM_COLUMN_CUSTOMER_CONFIG")&&JSON.parse(localStorage.getItem("SUBFORM_COLUMN_CUSTOMER_CONFIG"))||{},a=l[this.userId+this.tag],a&&a.field_colunms_config&&(i=a.field_colunms_config),_.each(e,(e=>{console.log("item",e);let a=_.find(i,{id:e.id});a?(console.log("custom_config",a),t.push({label:e.label,id:e.id,width:a.width||200})):t.push({label:e.label,id:e.id,width:e.minWidth})})),console.log("cols_config",t),t=_.sortBy(t,"sort_index"),t},handelRelateFormDialogClose(){this.dialogSubFormRelate.visible=!1},openRelateFormDialog(e,t){this.dialogSubFormRelate.relateInfo=e,this.dialogSubFormRelate.visible=!0,this.dialogSubFormRelate.row=t},rowClick(e,t,a){console.log("row",e),console.log("fieldConf",this.fieldConf),"edit"==this.mode&&this.showSubformData.length>this.countForClickToEdit&&(this.hadClickRow=!0),this.handleEditItem(e.rowIndex,e)}},computed:{relateSubForms(){return this.fieldConf.relate_setting},showColumns(){return _.filter(this.columns,(e=>{let t=_.find(this.cols_config,{id:e.id});if(e.visible)return t&&(e.minWidth=t.width),e}))},hiddenColumns(){return _.filter(this.columns,(e=>{if(!e.visible)return e}))}},created(){this.tag="_"+zj.pageParam().form_name+"_"+this.fieldConf.id},mounted(){this.cols_config=this.getCustomerColsConfig(this.columns)}},b=(0,f.A)(g,d,[],!1,null,null,null);b.options.__file="components/lib/bpmSubForm/src/table.vue";var y=b.exports,S=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{style:{overflow:"auto"}},[e._l(e.showSubformData,(function(t,i){return a("el-card",{key:t.rowIndex,staticClass:"bpm-subform-card",class:e.mode,attrs:{shadow:"hover","body-style":{padding:"10px 20px",overflow:"auto",position:"relative",paddingRight:e.canRemove?"70px":"20px"}}},[a("el-form",{attrs:{"label-width":"180px",inline:!1}},[e.showIndex?a("el-form-item",{attrs:{label:e.indexLabel}},[e._v("\n "+e._s(i+1)+"\n ")]):e._e(),e._v(" "),e._l(e.columns,(function(i){return a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:i.visible&&i.data.visible,expression:"col.visible && col.data.visible"}],key:i.key,class:i.data.display&&(i.data.display.hide_name||"top"===i.data.display.label_position)?"no-label":"",attrs:{label:i.data.display&&(i.data.display.hide_name||"top"===i.data.display.label_position)?"":i.label,required:i.data.check&&i.data.check.required}},[i.data.display&&!i.data.display.hide_name&&"top"===i.data.display.label_position?a("div",{staticClass:"form-label-top"},[e._v(e._s(i.label))]):e._e(),e._v(" "),a("bpm-sub-form-field",e._b({ref:"bpmSubFormField",refInFor:!0,attrs:{type:i.data.type,fieldConf:i.data,mode:e.getFieldMode(i.data.perm,t),uiType:"form",rowIndex:t.rowIndex,container:e.container},on:{change:e.handleChange},model:{value:t[i.id],callback:function(a){e.$set(t,i.id,a)},expression:"item[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))],1)}))],2),e._v(" "),e.canRemove&&e.countLimit.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return e.handleRemoveItem(t.rowIndex)}}}):e._e()],1)})),e._v(" "),e.canAdd&&e.countLimit.canAdd?a("el-button",{attrs:{type:"default",icon:"el-icon-plus"},on:{click:function(t){return e.handleAddItem(null)}}},[e._v(e._s(e.$z("添加项","c.add_item")))]):e._e()],2)};S._withStripped=!0;var v={name:"SubFormStyleCard",mixins:[c],data(){return{style_ui_type:"card"}},props:{linkageItem:{type:Object,default:function(){return{}}}}},w=(0,f.A)(v,S,[],!1,null,null,null);w.options.__file="components/lib/bpmSubForm/src/card.vue";var C=w.exports,F=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"bpm-subform-list",style:{overflow:"auto"}},e._l(e.showSubformData,(function(t,i){return a("div",{key:i,staticClass:"bpm-subform-list-item",class:e.mode},[a("el-form",{attrs:{"label-width":"180px",inline:!1}},e._l(e.columns,(function(i){return a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:i.visible&&i.data.visible,expression:"col.visible && col.data.visible"}],key:i.key,class:i.data.display&&(i.data.display.hide_name||"top"===i.data.display.label_position)?"no-label":"",attrs:{label:i.data.display&&(i.data.display.hide_name||"top"===i.data.display.label_position)?"":i.label,required:i.data.check&&i.data.check.required}},[i.data.display&&!i.data.display.hide_name&&"top"===i.data.display.label_position?a("div",{staticClass:"form-label-top"},[e._v(e._s(i.label))]):e._e(),e._v(" "),a("bpm-sub-form-field",e._b({ref:"bpmSubFormField",refInFor:!0,attrs:{type:i.data.type,fieldConf:i.data,mode:e.getFieldMode(i.data.perm,t),uiType:"form",rowIndex:t.rowIndex,container:e.container},on:{change:e.handleChange},model:{value:t[i.id],callback:function(a){e.$set(t,i.id,a)},expression:"item[col.id]"}},"bpm-sub-form-field",e.$attrs,!1))],1)})),1),e._v(" "),e.canRemove&&e.countLimit.canRemove?a("el-button",{staticClass:"btn-delete",attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(a){return e.handleRemoveItem(t.rowIndex)}}}):e._e()],1)})),0)};F._withStripped=!0;var k={name:"SubFormStyleList",mixins:[c],data(){return{style_ui_type:"list"}},props:{linkageItem:{type:Object,default:function(){return{}}}}},I=(0,f.A)(k,F,[],!1,null,null,null);I.options.__file="components/lib/bpmSubForm/src/list.vue";var x=I.exports,D=o(4419);class M{constructor(e,t){this.penetrationZList=[],this.elementIdList=[],this.eleMap={},this.relyGraphData={nodes:[],edges:[]},this.elements=[],this.bpm=e,this.value=t}addStackArr(e,t,a){this.eleMap=t,this.elements=_.concat(this.elements,e),this.elementIdList=_.map(t,"id"),_.each(e,(e=>{a&&_.set(e,"parentId",a);let i=_.get(e,"linkage.depends",[]),l=_.get(e,"scope.depends",[]),o=_.get(e,"range_remote.depends",[]),n=_.concat(i,l);n=_.concat(n,o),a||(this.penetrationZList=_.concat(this.penetrationZList,n)),e.elements&&this.addStackArr(e.elements,t,e.id)})),this.createTopoGraph(e),this.penetrationZList=_.uniq(this.penetrationZList),this.penetrationZList=_.intersection(this.elementIdList,this.penetrationZList),this.relyGraphData.nodes.push({id:"sure000",name:"顶点"}),_.each(this.penetrationZList,(e=>{this.relyGraphData.edges.push({source:"sure000",target:e})}))}createTopoGraph(e){_.each(e,(e=>{let t=_.get(e,"mappings",[]),a=_.map(t,"local_field_id");_.each(a,(t=>{if(_.includes(this.elementIdList,t)){let a=_.get(this.eleMap,t);this.relyGraphData.nodes.push(a),this.relyGraphData.nodes.push(e),this.relyGraphData.edges.push({source:e.id,target:t})}}));let i=_.get(e,"linkage.depends",[]),l=_.get(e,"scope.depends",[]),o=_.get(e,"range_remote.depends",[]),n=_.concat(i,l);n=_.concat(n,o);let r=_.get(this.eleMap,e.id);if(_.each(n,(e=>{_.get(this.eleMap,e)||(_.pullAll(n,[e]),n=_.cloneDeep(n))})),n.length){let t=_.pullAll(this.penetrationZList,[e.id]);this.penetrationZList=_.cloneDeep(t)}_.each(n,(t=>{if(t&&e.id&&_.includes(this.elementIdList,t)){let a=_.get(this.eleMap,t);if(!a||!r)return;let i=r.id,l=_.get(this.eleMap,t);a&&!l&&(this.penetrationZList=_.replace(this.penetrationZList,t,i),this.penetrationZList=_.split(this.penetrationZList,",")),this.relyGraphData.nodes.push(e),this.relyGraphData.nodes.push(a),this.relyGraphData.edges.push({source:t,target:i})}e.elements&&this.createTopoGraph(e.elements)}))}))}getRelyHandleList(e,t){let a=[];const{breadthFirstSearch:i}=D.Algorithm;let l=null;return i(this.relyGraphData,e,{enter:({current:e,previous:t})=>{},leave:({current:i,previous:o})=>{l||i==e||t&&!_.includes(t,i)||(l=i),i!=e&&a.push(i)}}),{relyHandleList:a,firstId:l}}async loadLinkage(e,t,a,i,l){let o=[],n={};_.each(e,(e=>{let t=_.get(this.eleMap,e),i=_.get(t,"linkage.depends");if("Quote"==t.type&&(i=_.concat(i,_.get(t,"scope.depends"))),i=_.intersection(i,this.elementIdList),!_.isEmpty(i)){let t={calculate_type:"linkage",field_def_id:e},r=_.pick(a,i);n=_.merge(n,r),_.isNil(l)||_.set(t,"idx",l),o.push(t)}})),t&&_.set(n,i,t);let r=await this.bpm.loadResult({params:{cal_fields:o,fields:n}});return _.map(r.data,((e,t)=>{let a=_.get(this.eleMap,`${t}.type`);_.includes(["SelectFromForm","Quote"],a)&&(e=_.get(e,"data.form_id")),r.data[t]=e})),r.data}async fillDefault(e,t=[],a){let i=[];if(_.each(this.elements,(l=>{let o=_.includes(t,l.id);if(!_.get(l,"perm.writable"))return;if(o)return _.set(e,l.id,null),void this.setLocalCache(l.id,null,a);let n=_.get(e,l.id);if(!_.isNil(n))return;let r=_.get(l,"default.value.type");if("EVCConfig"==r){let t=_.get(l,"default.value.value",null);_.set(e,l.id,t),this.setLocalCache(l.id,t,a)}"EVCExpression"!=r&&"EVCFirstElem"!=r||i.push({calculate_type:"default",field_def_id:l.id})})),_.isEmpty(i))return;let l=await this.bpm.loadResult({params:{cal_fields:i}});_.map(l.data,((t,i)=>{let l=_.get(this.eleMap,`${i}.type`);_.includes(["SelectFromForm","Quote"],l)&&(t=_.get(t,"data.form_id")),_.includes(["MulSelectFromForm"],l)&&(t=_.map(t,"data.form_id")),_.set(e,i,t),this.setLocalCache(i,t,a)}))}setLocalCache(e,t,a){let i=_.get(this.eleMap,`${e}.value_type`);this.bpm.setLocalCache(a,`${e}.${i}`,t)}}var R={name:"BpmSubForm",components:{SubFormStyleTable:y,SubFormStyleCard:C,SubFormStyleList:x},props:{value:{type:Array,default(){return[]}},type:{type:String,default:"XSubForm"},fieldConf:{type:Object,default(){return{}}},mode:{type:String,default:"view"},uiType:{type:String,default:"default"},maxHeight:{type:[Number,String],default:500},showHeader:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},container:{type:Object,default:function(){return{}}},dm:{type:Boolean,default(){return!1}}},data(){return{subformData:[],tableMaxHeight:500,dialogTableMaxHeight:500,showSubForm:!1,linkageItem:null,initLinkageFlag:!1,relyHandleList:[],relyHandleListMap:{},relyingItemMap:{}}},computed:{fieldSelf(){return this},readOnly(){return console.log("this.fieldConf",this.fieldConf),!(this.fieldConf.perm.editable&&this.fieldConf.perm.modifiable)},columns(){const e=this.fieldConf.elements||[],t=[];return e.forEach((e=>{const a=s.Q[e.type]||{},i=e.perm||{visible:!0,editable:!0,writable:!0};if(this.dm||i.visible||i.editable||i.writable){e.visible=i.visible||this.dm;let l=this.mode;"edit"!==l||i.editable||i.writable||(l="view");let o=(t,a)=>{let i=(e,t)=>{let a=0;return e&&t?_.isString(e)?a=e.localeCompare(t):_.isArray(e)?e.length>0&&t.length>0?0==i[(e[0],t[0])]?(e.pop(),t.pop(),a=i(e,t)):a=i(e[0],t[0]):a=0==e.length&&t.length>0?-1:e.length>0&&0==t.length?1:0:a=e-t:a=!e&&t?-1:e&&!t?1:0,a};return null==t[e.id]?-1:null==a[e.id]?1:i(t[e.id],a[e.id])};t.push({key:e.id,id:e.id,label:e.name||e.id,minWidth:a.tableColWidth||100,sortable:!("edit"==this.mode&&e&&e.range_remote&&e.range_remote.depends&&e.range_remote.depends.length),sortBy:e.id,sortMethod:o,fieldMode:l,visible:i.visible,data:e})}})),t},subFormDialogTitle(){return this.fieldConf.name||this.fieldConf.id},showStyle(){return console.log("this.fieldConf.style",this.fieldConf.style),this.fieldConf.style||"table"},subformPerm(){return this.fieldConf.perm||{creatable:!1,deletable:!1,editable:!1,memorable:!1,modifiable:!1,visible:!0,writable:!1}},isSubForm(){return!0},elementIdList(){return _.map(this.fieldConf.elements,"id")},eleMap(){let e=this.fieldConf.elements,t=_.get(this.container,"formSchema.elements");return e=_.concat(e,t),_.keyBy(e,"id")}},watch:{value:{handler(e,t){e&&_.isArray(e)?(this.subformData=e,e!=t&&this.$nextTick((()=>{this.initLinkage()}))):this.subformData=[]},immediate:!0}},created(){window.addEventListener("resize",(()=>{const e=Math.floor(window.innerHeight-330);this.tableMaxHeight=e>550?e:550})),this.linkageItem=new M(this.$bpm),this.dialogTableMaxHeight=Math.floor(window.innerHeight/100*70-114)},mounted(){this.linkageItem.addStackArr(this.fieldConf.elements,this.eleMap),window.addEventListener("resize",(()=>{const e=Math.floor(window.innerHeight-330);this.tableMaxHeight=e>550?e:550})),setTimeout((()=>{const e=Math.floor(window.innerHeight-330);this.tableMaxHeight=e>550?e:550}),2e3),console.log("重新渲染")},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)},initLinkage(){if(this.initLinkageFlag||0==this.subformData.length)return!1;console.log("初始化联动");let{relyHandleList:e}=this.linkageItem.getRelyHandleList("sure000");_.set(this.relyHandleListMap,this.value.length-1,e),console.log("relyHandleList",e),console.log("this.relyHandleListMap",this.relyHandleListMap),this.initLinkageFlag=!0,setTimeout((()=>{console.log("initRelyComplete_subFormInitLinkage",this),this.$bpm.$emit("initRelyComplete",this)}),1e3)},handleNextRely(e){console.log("sub-form-handleNextRely");let t=_.get(this.relyHandleListMap,e);console.log("sub-form-handleNextRely_relyHandleList",t),t&&t.shift(),_.isEmpty(t)&&this.$bpm.$emit("initRelyComplete",this,e);let a=_.head(t,e);a&&this.$bpm.$emit("handeInitRely",{id:a,rowIndex:e})},async handleRelyById(e,t){console.log("sub-form-relyingItemMap",this.relyingItemMap),console.log("XSubForm handleRelyById"),console.log("sub-form-handleRelyById",e),console.log("sub-form-handleRelyById-rowIndex",t),console.log("sub-form-handleRelyById-this.elementIdList",this.elementIdList);let{relyHandleList:a,firstId:i}=this.linkageItem.getRelyHandleList(e);if(console.log("sub-form-handleRelyById-relyHandleList",a),console.log("sub-form-handleRelyById-firstId",i),_.set(this.relyHandleListMap,t,a),i){let e=await this.linkageItem.loadLinkage(a,this.value,this.container.formData,this.fieldConf.id,t);console.log("sub-form-handleRelyById-result",e),_.map(e,((e,a)=>{this.$set(this.value[t],`${a}`,e)})),this.$bpm.$emit("handeRelyById",{id:i,rowIndex:t})}},handleNextRelyById(e){console.log("sub-form-handleNextRelyById");let t=_.get(this.relyHandleListMap,e);if(console.log("sub-form-handleNextRelyById-relyHandleList",t),t){t.shift(),_.isEmpty(t)&&this.$bpm.$emit("initRelyComplete",this,e);let a=_.head(t);a&&this.$bpm.$emit("handeRelyById",{id:a,rowIndex:e})}},setData(){}}},$=(0,f.A)(R,r,[],!1,null,"e0a458ce",null);$.options.__file="components/lib/bpmSubForm/src/main.vue";var B=$.exports;B.install=function(e){e.component(B.name,B)};var L=B;return n}()}));
|