提交 98b3e238 编写于 作者: lxm1993's avatar lxm1993

fix: 修复外协审批日志插件

上级 159bb72e
...@@ -1065,7 +1065,7 @@ const K = x({ ...@@ -1065,7 +1065,7 @@ const K = x({
name: s.source.name name: s.source.name
} }
}, [!this.c.isNewData && this.lazyList.includes(s.source.name) && e("ViewShell", { }, [!this.c.isNewData && this.lazyList.includes(s.source.name) && e("ViewShell", {
props: { attrs: {
context: o.context, context: o.context,
params: o.params, params: o.params,
modal: { modal: {
......
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(j){u=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),l=new F(r||[]);return o(a,"_invoke",{value:S(e,n,l)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(j){return{type:"throw",arg:j}}}t.wrap=d;var p={};function m(){}function h(){}function v(){}var y={};u(y,l,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==n&&r.call(w,l)&&(y=w);var g=v.prototype=m.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(t,n){function i(o,a,l,c){var s=f(t[o],t,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==e(d)&&r.call(d,"__await")?n.resolve(d.__await).then((function(e){i("next",e,l,c)}),(function(e){i("throw",e,l,c)})):n.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return i("throw",e,l,c)}))}c(s.arg)}var a;o(this,"_invoke",{value:function(e,t){function r(){return new n((function(n,r){i(e,t,n,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=k(a,n);if(l){if(l===p)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var o=f(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function U(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(U,this),this.reset(!0)}function C(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=v,o(g,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:h,configurable:!0}),h.displayName=u(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(g),u(g,s,"Generator"),u(g,l,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=C,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}function a(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(s){return void n(s)}l.done?t(c):Promise.resolve(c).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function l(e){a(i,r,o,l,c,"next",e)}function c(e){a(i,r,o,l,c,"throw",e)}l(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===e(n)?n:String(n)}System.register(["@ibiz-template/controller","vue","@ibiz-template/vue-util","@ibiz-template/core","qx-util","@ibiz-template/runtime","@ibiz-template/model"],(function(e,t){"use strict";var o,a,s,p,h,y,b,w,g,x,E,S,k,U,O,F,C,L,j,P,T,N,I,D,_,M,R,V,z,A,G,W;return{setters:[function(e){o=e.GridFieldColumnController,a=e.GridRowController,s=e.WFStepTraceViewController,p=e.UploadEditorController},function(e){h=e.defineComponent,y=e.computed,b=e.h,w=e.getCurrentInstance,g=e.ref,x=e.watch,E=e.toRefs},function(e){S=e.useNamespace,k=e.useViewController,U=e.usePropsWatch,O=e.getUploadProps,F=e.getEditorEmits,C=e.getGridUploadProps,L=e.getGridEditorEmits,j=e.useClickOutside,P=e.useEventListener,T=e.useWFStepTraceViewController,N=e.useWFDynaEditView3Controller,I=e.useEditView3Controller},function(e){D=e.colorBlend,_=e.HttpError,M=e.isImage,R=e.uploadFile,V=e.RuntimeError},function(e){z=e.getCookie},function(e){A=e.ViewMode,G=e.PluginStaticResource},function(e){W=e.ViewType}],execute:function(){var q=h({name:"CodeListGridColumn",props:{controller:{type:o,required:!0},row:{type:a,required:!0}},setup:function(e){var t=S("grid-field-column"),n=y((function(){var n;if("FRONT"!==e.controller.model.source.cLConvertMode)return[];var r=e.row.data[e.controller.model.codeName];return null!==(n=e.controller.codeListItems)&&void 0!==n&&n.length&&r?r.split(",").map((function(n){var r=e.controller.codeListItems.find((function(e){return e.value===n}));if(r){var o=r.color||"#515a6e";return{text:r.text,colorStyle:t.cssVarBlock({color:o,"border-color":o,"bg-color":D(o,"#fff")})}}})).filter(Boolean):[]})),r=y((function(){var n="";switch(e.controller.model.align){case"LEFT":n="flex-start";break;case"RIGHT":n="flex-end";break;default:n="center"}return t.cssVarBlock({"justify-content":n})}));return{ns:t,alignStyle:r,selectedItems:n,onCellClick:function(t){e.controller.isLinkColumn&&e.controller.openLinkView(e.row,t)}}},render:function(){var e=this,t=this.controller,n=this.row.data[t.model.codeName];return b("div",{class:[this.ns.b(),t.isLinkColumn&&this.ns.m("link-column")],style:this.alignStyle,on:{click:this.onCellClick}},[this.selectedItems.length>0?this.selectedItems.map((function(t){return b("span",{class:e.ns.e("code-list-item"),style:t.colorStyle},[t.text])})):b("span",{class:this.ns.e("text")},[n])])}}),B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(r,e);var t,n=f(r);function r(){var e;c(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return v(m(e=n.call.apply(n,[this].concat(o))),"imgSrc",void 0),e}return u(r,[{key:"getUIData",value:(t=l(i().mark((function e(){var t,n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object.assign(this.context.clone(),this.params),e.next=3,this.entityService.wf.getWFProcessDiagram(t);case 3:n=e.sent,r=new Blob([n.data]),this.imgSrc=URL.createObjectURL(r);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(s),$=h({name:"PresetWFChartView",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(e){var t=S("preset-wf-chart-view"),n=w().proxy,r=k(n,(function(t,n){return new B(e.modelPath,t,n)}));return U(n,"deName",r.setDeName.bind(r)),{c:r,ns:t}},render:function(){return b("div",{class:this.ns.b()},[b("img",{attrs:{src:this.c.imgSrc}})])}}),J=h({name:"WFToolbar",props:{wfLinks:{type:Array,required:!0}},setup:function(e,t){var n=t.emit,r=S("wf-toolbar"),o=function(){var e=l(i().mark((function e(t,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n("wf-link-click",t,r);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return{ns:r,handleClick:o}},render:function(){var e=this,t=this.wfLinks||[];return b("div",{class:"".concat(this.ns.b())},[t.length>0&&t.map((function(t){var n="驳回"==t.sequenceFlowName||"取消"==t.sequenceFlowName;return b("div",{key:t.sequenceFlowId,class:[e.ns.e("item"),n?e.ns.em("item","reject"):""]},[b("i-button",{attrs:{title:t.sequenceFlowName},on:{click:function(n){return e.handleClick(t,n)}}},[t.sequenceFlowName||""])])}))])}}),Y="function"==typeof btoa,H="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder;var K,Q="function"==typeof TextEncoder?new TextEncoder:void 0,X=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");K={},X.forEach((function(e,t){return K[e]=t}));var Z=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);var ee=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},te=Y?function(e){return btoa(e)}:H?function(e){return Buffer.from(e,"binary").toString("base64")}:function(e){for(var t,n,r,o,i="",a=e.length%3,l=0;l<e.length;){if((n=e.charCodeAt(l++))>255||(r=e.charCodeAt(l++))>255||(o=e.charCodeAt(l++))>255)throw new TypeError("invalid character found");i+=X[(t=n<<16|r<<8|o)>>18&63]+X[t>>12&63]+X[t>>6&63]+X[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},ne=H?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(Z.apply(null,e.subarray(n,n+4096)));return te(t.join(""))},re=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Z(192|t>>>6)+Z(128|63&t):Z(224|t>>>12&15)+Z(128|t>>>6&63)+Z(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Z(240|t>>>18&7)+Z(128|t>>>12&63)+Z(128|t>>>6&63)+Z(128|63&t)},oe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ie=H?function(e){return Buffer.from(e,"utf8").toString("base64")}:Q?function(e){return ne(Q.encode(e))}:function(e){return te(e.replace(oe,re))},ae=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?ee(ie(e)):ie(e)};var le=h({name:"SyFileUpload",props:O(),emits:F(),setup:function(e,t){var n=t.emit,o=S("sy-file-upload"),i=e.controller,a=function(e,t,n){var o=g([]),i=g({Authorization:"Bearer ".concat(z("access_token"))}),a=g(""),l=g(""),c={count:0,cacheFiles:[]};x((function(){return e.value}),(function(e){o.value=e?JSON.parse(e):[]}),{immediate:!0}),x((function(){return e.data}),(function(e){if(e){var t=n.calcBaseUrl(e);a.value=t.uploadUrl,l.value=t.downloadUrl}}),{immediate:!0,deep:!0}),x(o,(function(e){null!=e&&e.length&&l.value&&e.forEach((function(e){e.url=e.url||l.value.replace("%fileId%",e.id)}))}),{immediate:!0}),x(l,(function(e){e&&o.value.length&&o.value.forEach((function(e){e.url=l.value.replace("%fileId%",e.id)}))}),{immediate:!0});var s=function(){var e=[].concat(r(o.value),r(c.cacheFiles)),n=e.length>0?JSON.stringify(e.map((function(e){return{name:e.name,id:e.id}}))):null;c.cacheFiles=[],t(n)},u=g(!1),d=g(""),f=g("");return{uploadUrl:a,downloadUrl:l,headers:i,files:o,onDownload:function(e){var t=e.url||l.value.replace("%fileId%",e.id);n.fileDownload({url:t,name:e.name})},onError:function(e,t){throw c.count-=1,new _({response:{data:t,status:e.status}})},onRemove:function(t){if(!e.disabled){var n=o.value.findIndex((function(e){return e.id===t.id}));-1!==n&&o.value.splice(n,1),s()}},onSuccess:function(e){e&&(c.cacheFiles.push({name:e.filename,id:e.fileid}),c.count-=1,0===c.count&&s())},beforeUpload:function(e){var t=e.name.trim().toLowerCase();if(["html","js","exe","sh"].some((function(e){return t.endsWith(".".concat(e))})))return ibiz.message.error("不可上传 html、js、 exe、sh类型的文件!"),!1;c.count+=1},showModal:u,modalTitle:d,iframeUrl:f,onModalCancel:function(){u.value=!1,d.value="",f.value=""},previewFile:function(e){u.value=!0,d.value=e.name;var t=window.Environment.previewFileUrl;if(t){var n=encodeURIComponent(ae("".concat(window.location.origin).concat(e.url,"?fullfilename=").concat(e.name)));f.value="".concat(t,"/onlinePreview?url=").concat(n)}}}}(e,(function(e){n("change",e)}),i);return{ns:o,c:i,uploadUrl:a.uploadUrl,headers:a.headers,files:a.files,onDownload:a.onDownload,onError:a.onError,onRemove:a.onRemove,onSuccess:a.onSuccess,beforeUpload:a.beforeUpload,showModal:a.showModal,modalTitle:a.modalTitle,iframeUrl:a.iframeUrl,onModalCancel:a.onModalCancel,previewFile:a.previewFile}},render:function(e){var t=this;return e("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[e("IUpload",{ref:"fileUpload",props:{action:this.uploadUrl,headers:this.headers,disabled:this.disabled,"default-file-list":this.files,multiple:this.c.model.multiple,type:this.c.model.isDrag?"drag":"select",accept:this.c.model.accept,"before-upload":this.beforeUpload,"on-success":this.onSuccess,"on-error":this.onError,"on-remove":this.onRemove,"on-preview":this.onDownload,"show-upload-list":!1}},[this.c.model.isDrag?e("div",{class:this.ns.bm("box","drag")},[e("i-icon",{attrs:{type:"md-cloud-upload"}}),e("div",{class:this.ns.be("box","title")},[e("span",["将文件拖到此处,或"]),e("span",["点击上传"])])]):e("i-button",{attrs:{icon:"ios-cloud-upload-outline"},class:this.ns.bm("box","select")},["上传文件"])]),e("div",{class:this.ns.b("file-list")},[this.files.map((function(n){return e("div",{class:t.ns.b("file-item"),key:n.id},[e("div",{class:t.ns.b("file-item-left")},[e("i-icon",{attrs:{type:"md-document"}})]),e("div",{class:t.ns.b("file-item-right")},[e("div",{class:t.ns.b("file-item-right-title"),on:{click:function(){return t.previewFile(n)}}},[n.name]),e("div",{class:t.ns.b("file-item-right-action")},[e("i-icon",{attrs:{type:"md-download"},on:{click:function(){return t.onDownload(n)}}}),e("i-icon",{attrs:{type:"md-eye"},on:{click:function(){return t.previewFile(n)}}}),t.disabled||t.readonly?null:e("i-icon",{attrs:{type:"md-close"},on:{click:function(){return t.onRemove(n)}}})])])])}))]),e("i-modal",{attrs:{value:this.showModal,title:this.modalTitle,"class-name":this.ns.b("modal"),width:"70%",transfer:!1,"footer-hide":!0},on:{"on-cancel":this.onModalCancel}},[e("iframe",{class:this.ns.b("iframe"),attrs:{src:this.iframeUrl}})])])}});function ce(e,t){if(e.url=t.replace("%fileId%",e.id),e.status||(e.status="finished"),!e.fileName){var n=e.name.lastIndexOf(".");e.fileName=e.name.substring(0,n),e.fileExt=e.name.substring(n),e.isImage=M(e.name)}return e}function se(e){var t=g(""),n=g(""),r=g([]);return x(e.data,(function(r){if(r){var o=e.controller.value.calcBaseUrl(r);t.value=o.uploadUrl,n.value=o.downloadUrl}}),{immediate:!0,deep:!0}),x(e.value,(function(e){r.value=e?JSON.parse(e):[],r.value.length&&n.value&&r.value.forEach((function(e){ce(e,n.value)}))}),{immediate:!0}),x(n,(function(e){e&&r.value.length&&r.value.forEach((function(t){ce(t,e)}))}),{immediate:!0}),{downloadUrl:n,uploadUrl:t,valueList:r}}function ue(e){var t=g("undo"),n=g([]),r=e.downloadUrl,o=e.value,i=e.uploadUrl;x(o,(function(e){e.length>0&&(n.value=[],e.forEach((function(e){n.value.push(ce(e,r.value))})))}),{immediate:!0,deep:!0});var a=function(e,t){var r=["html","js","exe","sh"],o=[];return t.forEach((function(e,t){var i=e.name.trim().toLowerCase();r.some((function(e){return i.endsWith(".".concat(e))}))?o.push(t):n.value.push({name:e.name,status:e.status,percentage:e.percentage,id:e.uid,url:""})})),o.length===t.length?(ibiz.message.error("不可上传 html、js、 exe、sh类型的文件!"),!1):(o.length&&(o.forEach((function(n){e.splice(n,1),t.splice(n,1)})),ibiz.message.error("不可上传 html、js、 exe、sh类型的文件!")),!0)},l=function(e){e.forEach((function(e){n.value.find((function(t){return t.id===e.uid&&(t.percentage=e.percentage,!0)}))}))},c=function(e,t){e.forEach((function(e){n.value.find((function(n){return n.id===e.uid&&(n.status=e.status,n.id=t.data.fileid,n.name=t.data.filename,ce(n,r.value),!0)}))}))},s=function(e,t){var r;e.forEach((function(e){n.value.find((function(t){return t.id===e.uid&&(t.status=e.status,!0)}))}));var o=new _(t);ibiz.notification.error({title:null===(r=o.status)||void 0===r?void 0:r.toString(),desc:o.message,duration:10})},u=function(e){n.value=n.value.filter((function(e){return"finished"===e.status})),t.value="done"},d=g(!1),f=g(""),p=g("");return{selectFile:function(){R({multiple:e.multiple,accept:e.accept,uploadUrl:i.value,beforeUpload:a,progress:l,success:c,error:s,finish:u})},fileList:n,uploadState:t,showModal:d,modalTitle:f,iframeUrl:p,onModalCancel:function(){d.value=!1,f.value="",p.value=""},previewFile:function(e){d.value=!0,f.value=e.name;var t=window.Environment.previewFileUrl;if(t){var n=encodeURIComponent(ae("".concat(window.location.origin).concat(e.url,"?fullfilename=").concat(e.name)));p.value="".concat(t,"/onlinePreview?url=").concat(n)}}}}var de=h({name:"SyGridFileUpload",props:C(),setup:function(e){var t=S("sy-grid-file-upload"),n=E(e),r=se({value:n.value,data:n.data,controller:n.controller}),o=ue({downloadUrl:r.downloadUrl,uploadUrl:r.uploadUrl,value:r.valueList});return{ns:t,fileList:o.fileList,showModal:o.showModal,modalTitle:o.modalTitle,iframeUrl:o.iframeUrl,downloadFile:function(t){e.controller.fileDownload(t)},previewFile:o.previewFile,onModalCancel:o.onModalCancel}},render:function(){var e=this;return b("grid-editor",{attrs:{disabled:this.disabled,readonly:this.readonly},class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[b("div",{class:this.ns.b("file-list")},[this.fileList.map((function(t){return b("div",{class:e.ns.b("file-item"),key:t.id},[b("div",{class:e.ns.b("file-item-title"),on:{click:function(){return e.previewFile(t)}}},[t.name]),b("div",{class:e.ns.b("file-item-action")},[b("i-icon",{attrs:{type:"md-download"},on:{click:function(){return e.downloadFile(t)}}}),b("i-icon",{attrs:{type:"md-eye"},on:{click:function(){return e.previewFile(t)}}})])])}))]),b("i-modal",{attrs:{value:this.showModal,title:this.modalTitle,"class-name":this.ns.b("modal"),width:"70%",transfer:!1,"footer-hide":!0},on:{"on-cancel":this.onModalCancel}},[b("iframe",{class:this.ns.b("iframe"),attrs:{src:this.iframeUrl}})])])}}),fe=h({name:"SyGridFileUploadContainer",props:C(),emits:L(),render:function(e){var t=this;return this.disabled||this.readonly?e("SyGridFileUpload",{props:n({},this.$props)}):e("SyEditGridFileUpload",{props:n({},this.$props),on:{change:function(e,n){t.$emit("change",e,n)},rowSave:function(){t.$emit("rowSave")}}})}}),pe=h({name:"SyEditGridFileUploadPopover",props:{uploadUrl:{type:String,required:!0},downloadUrl:{type:String,required:!0},value:{type:Array,required:!0},controller:{type:p,required:!0}},emits:{close:function(e){return!0}},setup:function(e,t){var n=t.emit,r=S("sy-edit-grid-file-upload-popover"),o=E(e),a=ue({downloadUrl:o.downloadUrl,value:o.value,uploadUrl:o.uploadUrl}),c=a.fileList,s=a.uploadState,u=a.selectFile,d=g(),f=g(!1),p=j(d,function(){var e=l(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n("close",{isModified:f.value,resultFiles:c.value});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());x(s,(function(e){"done"===e?(f.value=!0,p.proceed()):"loading"===e&&p.pause()}));return{ns:r,componentRef:d,fileList:c,deleteFile:function(e){var t=c.value.findIndex((function(t){return t.id===e.id}));c.value.splice(t,1),f.value=!0},selectFile:u,downloadFile:function(t){e.controller.fileDownload(t)}}},render:function(){var e=this;return b("div",{ref:"componentRef",style:"width:300px",class:this.ns.b()},[b("div",{class:this.ns.b("file-list")},[this.fileList.map((function(t){return b("div",{class:e.ns.b("file-item"),key:t.id},[b("div",{class:e.ns.b("file-item-title"),on:{click:function(){return e.downloadFile(t)}}},[t.name]),b("div",{class:e.ns.b("file-item-action")},[b("i-icon",{attrs:{type:"md-close"},on:{click:function(){return e.deleteFile(t)}}})])])}))]),b("div",{on:{click:function(){return e.selectFile()}},class:this.ns.e("button")},[b("i-icon",{attrs:{type:"md-add"}}),"添加文件"])])}}),me=h({name:"SyEditGridFileUpload",props:C(),emits:L(),setup:function(e,t){var n=t.emit,r=S("sy-edit-grid-file-upload"),o=E(e),a=o.value,c=o.data,s=o.controller,u=se({value:a,data:c,controller:s}),d=u.downloadUrl,f=u.uploadUrl,p=u.valueList,m=g(),h=function(){var e=l(i().mark((function e(){var t,r,o,a,l,c,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.value){e.next=2;break}throw new V("容器元素不存在");case 2:return t=m.value.$el,r=t.offsetHeight,o=ibiz.overlay.createPopover((function(e){return e(pe,{props:{value:p.value,uploadUrl:f.value,downloadUrl:d.value,controller:s.value},on:{close:function(e){o.dismiss(e)}}})}),void 0,{noArrow:!0,placement:"bottom-start",offsetOpts:{mainAxis:-r,crossAxis:0}}),e.next=7,o.present(t);case 7:return e.next=9,o.onWillDismiss();case 9:a=e.sent,l=a.isModified,c=a.resultFiles,l&&(u=c.length>0?JSON.stringify(c.map((function(e){return{name:e.name,id:e.id}}))):null,n("change",u),n("rowSave"));case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return P(m,"click",(function(t){e.disabled||h()})),{ns:r,valueList:p,componentRef:m}},render:function(){var e=this;return b("grid-editor",{attrs:{disabled:this.disabled,readonly:this.readonly},ref:"componentRef",class:this.ns.b()},[b("div",{class:this.ns.b("file-list")},[this.valueList.map((function(t){return b("div",{class:e.ns.b("file-item"),key:t.id},[b("div",{class:e.ns.b("file-item-title")},[t.name])])}))])])}}),he=u((function e(){c(this,e),v(this,"component",$)})),ve=function(){function e(){c(this,e),v(this,"component",q)}var t;return u(e,[{key:"createController",value:(t=l(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new o(t,n),e.next=3,r.init();case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),ye=u((function e(){c(this,e),v(this,"component","IndexView")})),be=h({name:"WFStepTraceGrid",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(e){var t=w().proxy,n=T(t,e.modelPath);U(t,"deName",n.setDeName.bind(n));var r=S("wf-step-trace-grid"),o=g([]);n.nerve.self.evt.on("mounted",(function(){var e;n.data&&(null===(e=n.data.usertasks)||void 0===e||e.forEach((function(e){e.identitylinks.length>0||(e.comments.length>0&&e.comments.forEach((function(t){o.value.push({nodeName:e.userTaskName,personName:t.authorName,time:t.time,content:t.type,comment:t.fullMessage})})),o.value.sort((function(e,t){return Date.parse(t.time)-Date.parse(e.time)})))})))}));var i=g([{title:"处理环节",key:"nodeName",width:180,resizable:!0},{title:"处理人",key:"personName",width:180,resizable:!0},{title:"处理时间",key:"time",width:180,resizable:!0},{title:"处理内容",key:"content",width:180,resizable:!0},{title:"处理意见",key:"comment"}]);return{c:n,ns:r,gridData:o,columns:i}},render:function(){return b("div",{class:this.ns.b()},[b("div",{class:this.ns.e("title")},["审批信息"]),b("i-table",{attrs:{"disabled-hover":!0,columns:this.columns,data:this.gridData},class:this.ns.e("grid")})])}}),we=h({props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object}},setup:function(e){var t=w().proxy,n=N(t,e.modelPath),r=S("view-".concat(W.DE_WF_DYNA_EDIT_VIEW3).toLowerCase()),o=g(["mainForm"]);return{c:n,ns:r,onTabClick:function(e){o.value.includes(e)||o.value.push(e)},lazyList:o}},render:function(e){var t=this,n=[];if(this.c.complete){var r=this.c.activeForm;r&&this.c.providers[r.name]&&n.push(e(this.c.providers[r.name].component,{props:{modelData:r,context:this.c.context,params:this.c.params},style:{height:"auto"},on:{neuronInit:this.c.nerve.onNeuronInit("form")}}))}if(this.c.complete&&this.c.model.drTab.pages[0]){var o=this.c.model.drTab.pages[0],i=this.c.drPages[o.source.name];n.push(e(be,{attrs:{context:i.context,params:i.params,deName:this.c.model.appEntity.source.codeName,modal:this.modal,modelPath:o.embedView.source.modelPath}}))}return e("view-base",{attrs:{controller:this.c},scopedSlots:{toolbar:function(){return t.c.complete?[t.c.wfLinks.length>0&&e("wf-toolbar",{attrs:{wfLinks:t.c.wfLinks},on:{"wf-link-click":function(e){t.c.onLinkClick(e)}}})]:null}}},[this.c.complete&&e("i-tabs",{class:[this.ns.be("","tab")],attrs:{name:this.c.model.drTab.source.name},on:{"on-click":this.onTabClick}},[e("i-tab-pane",{class:this.ns.be("","tab-item"),attrs:{tab:this.c.model.drTab.source.name,label:this.c.model.drTab.source.editItemCaption,name:"mainForm"}},[n]),this.c.model.drTab.pages.map((function(n){var r=t.c.drPages[n.source.name];return e("i-tab-pane",{class:t.ns.be("","tab-item"),attrs:{tab:t.c.model.drTab.source.name,disabled:t.c.isNewData,label:n.source.caption,name:n.source.name}},[!t.c.isNewData&&t.lazyList.includes(n.source.name)&&e("ViewShell",{props:{context:r.context,params:r.params,modal:{mode:A.EMBED},modelPath:n.embedView.source.modelPath,deName:t.c.model.appEntity.source.codeName},on:{neuronInit:t.c.nerve.onNeuronInit(n.source.name)},key:r.key})])}))])])}}),ge=u((function e(){c(this,e),v(this,"component",we)})),xe=h({name:"SyEditView3",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object}},setup:function(e){var t=w().proxy,n=I(t,e.modelPath),r=S("view-deeditview3"),o=g(["mainForm"]);return{c:n,ns:r,onTabClick:function(e){o.value.includes(e)||o.value.push(e)},lazyList:o}},render:function(e){var t=this;return e("view-base",{attrs:{controller:this.c}},[this.c.complete&&e("i-tabs",{class:[this.ns.be("","tab")],attrs:{name:this.c.model.drTab.source.name},on:{"on-click":this.onTabClick}},[e("i-tab-pane",{class:this.ns.be("","tab-item"),attrs:{tab:this.c.model.drTab.source.name,label:this.c.model.drTab.source.editItemCaption,name:"mainForm"}},[e("edit-form-control",{attrs:{modelData:this.c.model.form,context:this.c.context,params:this.c.params},style:{height:"auto"},on:{neuronInit:this.c.nerve.onNeuronInit(this.c.model.form.source.name)}}),e(be,{attrs:{context:this.c.drPages[this.c.model.drTab.pages[0].source.name].context,params:this.c.drPages[this.c.model.drTab.pages[0].source.name].params,deName:this.c.model.appEntity.source.codeName,modal:this.modal,modelPath:this.c.model.drTab.pages[0].embedView.source.modelPath}})]),this.c.model.drTab.pages.map((function(n){var r=t.c.drPages[n.source.name];if(r)return e("i-tab-pane",{class:t.ns.be("","tab-item"),attrs:{tab:t.c.model.drTab.source.name,disabled:t.c.isNewData,label:n.source.caption,name:n.source.name}},[!t.c.isNewData&&t.lazyList.includes(n.source.name)&&e("ViewShell",{attrs:{context:r.context,params:r.params,modal:{mode:A.EMBED},modelPath:n.embedView.source.modelPath,deName:t.c.model.appEntity.source.codeName},on:{neuronInit:t.c.nerve.onNeuronInit(n.source.name)},key:r.key})])}))])])}}),Ee=u((function e(){c(this,e),v(this,"component",xe)})),Se=function(){function e(){c(this,e),v(this,"formEditor","SyFileUpload"),v(this,"gridEditor","SyGridFileUploadContainer")}var t;return u(e,[{key:"createController",value:(t=l(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new p(t,n),e.next=3,r.init();case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),ke=new G(t.meta.url);e("default",{mateUrl:t.meta.url,install:function(e){ke.loadStyle(["/style.css"]),ibiz.config.enableDataInfoBar=!1,ibiz.config.gridEditShowMode="all",e.component("WfToolbar",J),ibiz.register.view.register("VIEW_CUSTOM_SyWebIndexView",new ye),ibiz.register.view.register("VIEW_CUSTOM_PresetWFChartView",new he),ibiz.register.gridColumn.register("GRID_COLRENDER_CodeListGridColumn",new ve),ibiz.register.view.register("VIEW_CUSTOM_SyWfDynaEditView3",new ge),ibiz.register.view.register("VIEW_CUSTOM_SyEditView3",new Ee),e.component("SyFileUpload",le),e.component("SyGridFileUpload",de),e.component("SyEditGridFileUpload",me),e.component("SyGridFileUploadContainer",fe),ibiz.register.editor.register("EDITOR_CUSTOMSTYLE_SyFileUpload",new Se)}})}}}))}(); !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(j){u=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),l=new F(r||[]);return o(a,"_invoke",{value:S(e,n,l)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(j){return{type:"throw",arg:j}}}t.wrap=d;var p={};function m(){}function h(){}function v(){}var y={};u(y,l,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(C([])));w&&w!==n&&r.call(w,l)&&(y=w);var g=v.prototype=m.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function E(t,n){function i(o,a,l,c){var s=f(t[o],t,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==e(d)&&r.call(d,"__await")?n.resolve(d.__await).then((function(e){i("next",e,l,c)}),(function(e){i("throw",e,l,c)})):n.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return i("throw",e,l,c)}))}c(s.arg)}var a;o(this,"_invoke",{value:function(e,t){function r(){return new n((function(n,r){i(e,t,n,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=k(a,n);if(l){if(l===p)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var o=f(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function U(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(U,this),this.reset(!0)}function C(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=v,o(g,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:h,configurable:!0}),h.displayName=u(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},t.awrap=function(e){return{__await:e}},x(E.prototype),u(E.prototype,c,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new E(d(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(g),u(g,s,"Generator"),u(g,l,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=C,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}function a(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(s){return void n(s)}l.done?t(c):Promise.resolve(c).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function l(e){a(i,r,o,l,c,"next",e)}function c(e){a(i,r,o,l,c,"throw",e)}l(void 0)}))}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return m(t)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"===e(n)?n:String(n)}System.register(["@ibiz-template/controller","vue","@ibiz-template/vue-util","@ibiz-template/core","qx-util","@ibiz-template/runtime","@ibiz-template/model"],(function(e,t){"use strict";var o,a,s,p,h,y,b,w,g,x,E,S,k,U,O,F,C,L,j,P,T,N,I,D,_,M,R,V,z,A,G,W;return{setters:[function(e){o=e.GridFieldColumnController,a=e.GridRowController,s=e.WFStepTraceViewController,p=e.UploadEditorController},function(e){h=e.defineComponent,y=e.computed,b=e.h,w=e.getCurrentInstance,g=e.ref,x=e.watch,E=e.toRefs},function(e){S=e.useNamespace,k=e.useViewController,U=e.usePropsWatch,O=e.getUploadProps,F=e.getEditorEmits,C=e.getGridUploadProps,L=e.getGridEditorEmits,j=e.useClickOutside,P=e.useEventListener,T=e.useWFStepTraceViewController,N=e.useWFDynaEditView3Controller,I=e.useEditView3Controller},function(e){D=e.colorBlend,_=e.HttpError,M=e.isImage,R=e.uploadFile,V=e.RuntimeError},function(e){z=e.getCookie},function(e){A=e.ViewMode,G=e.PluginStaticResource},function(e){W=e.ViewType}],execute:function(){var q=h({name:"CodeListGridColumn",props:{controller:{type:o,required:!0},row:{type:a,required:!0}},setup:function(e){var t=S("grid-field-column"),n=y((function(){var n;if("FRONT"!==e.controller.model.source.cLConvertMode)return[];var r=e.row.data[e.controller.model.codeName];return null!==(n=e.controller.codeListItems)&&void 0!==n&&n.length&&r?r.split(",").map((function(n){var r=e.controller.codeListItems.find((function(e){return e.value===n}));if(r){var o=r.color||"#515a6e";return{text:r.text,colorStyle:t.cssVarBlock({color:o,"border-color":o,"bg-color":D(o,"#fff")})}}})).filter(Boolean):[]})),r=y((function(){var n="";switch(e.controller.model.align){case"LEFT":n="flex-start";break;case"RIGHT":n="flex-end";break;default:n="center"}return t.cssVarBlock({"justify-content":n})}));return{ns:t,alignStyle:r,selectedItems:n,onCellClick:function(t){e.controller.isLinkColumn&&e.controller.openLinkView(e.row,t)}}},render:function(){var e=this,t=this.controller,n=this.row.data[t.model.codeName];return b("div",{class:[this.ns.b(),t.isLinkColumn&&this.ns.m("link-column")],style:this.alignStyle,on:{click:this.onCellClick}},[this.selectedItems.length>0?this.selectedItems.map((function(t){return b("span",{class:e.ns.e("code-list-item"),style:t.colorStyle},[t.text])})):b("span",{class:this.ns.e("text")},[n])])}}),B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(r,e);var t,n=f(r);function r(){var e;c(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return v(m(e=n.call.apply(n,[this].concat(o))),"imgSrc",void 0),e}return u(r,[{key:"getUIData",value:(t=l(i().mark((function e(){var t,n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object.assign(this.context.clone(),this.params),e.next=3,this.entityService.wf.getWFProcessDiagram(t);case 3:n=e.sent,r=new Blob([n.data]),this.imgSrc=URL.createObjectURL(r);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(s),$=h({name:"PresetWFChartView",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(e){var t=S("preset-wf-chart-view"),n=w().proxy,r=k(n,(function(t,n){return new B(e.modelPath,t,n)}));return U(n,"deName",r.setDeName.bind(r)),{c:r,ns:t}},render:function(){return b("div",{class:this.ns.b()},[b("img",{attrs:{src:this.c.imgSrc}})])}}),J=h({name:"WFToolbar",props:{wfLinks:{type:Array,required:!0}},setup:function(e,t){var n=t.emit,r=S("wf-toolbar"),o=function(){var e=l(i().mark((function e(t,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n("wf-link-click",t,r);case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return{ns:r,handleClick:o}},render:function(){var e=this,t=this.wfLinks||[];return b("div",{class:"".concat(this.ns.b())},[t.length>0&&t.map((function(t){var n="驳回"==t.sequenceFlowName||"取消"==t.sequenceFlowName;return b("div",{key:t.sequenceFlowId,class:[e.ns.e("item"),n?e.ns.em("item","reject"):""]},[b("i-button",{attrs:{title:t.sequenceFlowName},on:{click:function(n){return e.handleClick(t,n)}}},[t.sequenceFlowName||""])])}))])}}),Y="function"==typeof btoa,H="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder;var K,Q="function"==typeof TextEncoder?new TextEncoder:void 0,X=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");K={},X.forEach((function(e,t){return K[e]=t}));var Z=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);var ee=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},te=Y?function(e){return btoa(e)}:H?function(e){return Buffer.from(e,"binary").toString("base64")}:function(e){for(var t,n,r,o,i="",a=e.length%3,l=0;l<e.length;){if((n=e.charCodeAt(l++))>255||(r=e.charCodeAt(l++))>255||(o=e.charCodeAt(l++))>255)throw new TypeError("invalid character found");i+=X[(t=n<<16|r<<8|o)>>18&63]+X[t>>12&63]+X[t>>6&63]+X[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},ne=H?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(Z.apply(null,e.subarray(n,n+4096)));return te(t.join(""))},re=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Z(192|t>>>6)+Z(128|63&t):Z(224|t>>>12&15)+Z(128|t>>>6&63)+Z(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Z(240|t>>>18&7)+Z(128|t>>>12&63)+Z(128|t>>>6&63)+Z(128|63&t)},oe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ie=H?function(e){return Buffer.from(e,"utf8").toString("base64")}:Q?function(e){return ne(Q.encode(e))}:function(e){return te(e.replace(oe,re))},ae=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?ee(ie(e)):ie(e)};var le=h({name:"SyFileUpload",props:O(),emits:F(),setup:function(e,t){var n=t.emit,o=S("sy-file-upload"),i=e.controller,a=function(e,t,n){var o=g([]),i=g({Authorization:"Bearer ".concat(z("access_token"))}),a=g(""),l=g(""),c={count:0,cacheFiles:[]};x((function(){return e.value}),(function(e){o.value=e?JSON.parse(e):[]}),{immediate:!0}),x((function(){return e.data}),(function(e){if(e){var t=n.calcBaseUrl(e);a.value=t.uploadUrl,l.value=t.downloadUrl}}),{immediate:!0,deep:!0}),x(o,(function(e){null!=e&&e.length&&l.value&&e.forEach((function(e){e.url=e.url||l.value.replace("%fileId%",e.id)}))}),{immediate:!0}),x(l,(function(e){e&&o.value.length&&o.value.forEach((function(e){e.url=l.value.replace("%fileId%",e.id)}))}),{immediate:!0});var s=function(){var e=[].concat(r(o.value),r(c.cacheFiles)),n=e.length>0?JSON.stringify(e.map((function(e){return{name:e.name,id:e.id}}))):null;c.cacheFiles=[],t(n)},u=g(!1),d=g(""),f=g("");return{uploadUrl:a,downloadUrl:l,headers:i,files:o,onDownload:function(e){var t=e.url||l.value.replace("%fileId%",e.id);n.fileDownload({url:t,name:e.name})},onError:function(e,t){throw c.count-=1,new _({response:{data:t,status:e.status}})},onRemove:function(t){if(!e.disabled){var n=o.value.findIndex((function(e){return e.id===t.id}));-1!==n&&o.value.splice(n,1),s()}},onSuccess:function(e){e&&(c.cacheFiles.push({name:e.filename,id:e.fileid}),c.count-=1,0===c.count&&s())},beforeUpload:function(e){var t=e.name.trim().toLowerCase();if(["html","js","exe","sh"].some((function(e){return t.endsWith(".".concat(e))})))return ibiz.message.error("不可上传 html、js、 exe、sh类型的文件!"),!1;c.count+=1},showModal:u,modalTitle:d,iframeUrl:f,onModalCancel:function(){u.value=!1,d.value="",f.value=""},previewFile:function(e){u.value=!0,d.value=e.name;var t=window.Environment.previewFileUrl;if(t){var n=encodeURIComponent(ae("".concat(window.location.origin).concat(e.url,"?fullfilename=").concat(e.name)));f.value="".concat(t,"/onlinePreview?url=").concat(n)}}}}(e,(function(e){n("change",e)}),i);return{ns:o,c:i,uploadUrl:a.uploadUrl,headers:a.headers,files:a.files,onDownload:a.onDownload,onError:a.onError,onRemove:a.onRemove,onSuccess:a.onSuccess,beforeUpload:a.beforeUpload,showModal:a.showModal,modalTitle:a.modalTitle,iframeUrl:a.iframeUrl,onModalCancel:a.onModalCancel,previewFile:a.previewFile}},render:function(e){var t=this;return e("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[e("IUpload",{ref:"fileUpload",props:{action:this.uploadUrl,headers:this.headers,disabled:this.disabled,"default-file-list":this.files,multiple:this.c.model.multiple,type:this.c.model.isDrag?"drag":"select",accept:this.c.model.accept,"before-upload":this.beforeUpload,"on-success":this.onSuccess,"on-error":this.onError,"on-remove":this.onRemove,"on-preview":this.onDownload,"show-upload-list":!1}},[this.c.model.isDrag?e("div",{class:this.ns.bm("box","drag")},[e("i-icon",{attrs:{type:"md-cloud-upload"}}),e("div",{class:this.ns.be("box","title")},[e("span",["将文件拖到此处,或"]),e("span",["点击上传"])])]):e("i-button",{attrs:{icon:"ios-cloud-upload-outline"},class:this.ns.bm("box","select")},["上传文件"])]),e("div",{class:this.ns.b("file-list")},[this.files.map((function(n){return e("div",{class:t.ns.b("file-item"),key:n.id},[e("div",{class:t.ns.b("file-item-left")},[e("i-icon",{attrs:{type:"md-document"}})]),e("div",{class:t.ns.b("file-item-right")},[e("div",{class:t.ns.b("file-item-right-title"),on:{click:function(){return t.previewFile(n)}}},[n.name]),e("div",{class:t.ns.b("file-item-right-action")},[e("i-icon",{attrs:{type:"md-download"},on:{click:function(){return t.onDownload(n)}}}),e("i-icon",{attrs:{type:"md-eye"},on:{click:function(){return t.previewFile(n)}}}),t.disabled||t.readonly?null:e("i-icon",{attrs:{type:"md-close"},on:{click:function(){return t.onRemove(n)}}})])])])}))]),e("i-modal",{attrs:{value:this.showModal,title:this.modalTitle,"class-name":this.ns.b("modal"),width:"70%",transfer:!1,"footer-hide":!0},on:{"on-cancel":this.onModalCancel}},[e("iframe",{class:this.ns.b("iframe"),attrs:{src:this.iframeUrl}})])])}});function ce(e,t){if(e.url=t.replace("%fileId%",e.id),e.status||(e.status="finished"),!e.fileName){var n=e.name.lastIndexOf(".");e.fileName=e.name.substring(0,n),e.fileExt=e.name.substring(n),e.isImage=M(e.name)}return e}function se(e){var t=g(""),n=g(""),r=g([]);return x(e.data,(function(r){if(r){var o=e.controller.value.calcBaseUrl(r);t.value=o.uploadUrl,n.value=o.downloadUrl}}),{immediate:!0,deep:!0}),x(e.value,(function(e){r.value=e?JSON.parse(e):[],r.value.length&&n.value&&r.value.forEach((function(e){ce(e,n.value)}))}),{immediate:!0}),x(n,(function(e){e&&r.value.length&&r.value.forEach((function(t){ce(t,e)}))}),{immediate:!0}),{downloadUrl:n,uploadUrl:t,valueList:r}}function ue(e){var t=g("undo"),n=g([]),r=e.downloadUrl,o=e.value,i=e.uploadUrl;x(o,(function(e){e.length>0&&(n.value=[],e.forEach((function(e){n.value.push(ce(e,r.value))})))}),{immediate:!0,deep:!0});var a=function(e,t){var r=["html","js","exe","sh"],o=[];return t.forEach((function(e,t){var i=e.name.trim().toLowerCase();r.some((function(e){return i.endsWith(".".concat(e))}))?o.push(t):n.value.push({name:e.name,status:e.status,percentage:e.percentage,id:e.uid,url:""})})),o.length===t.length?(ibiz.message.error("不可上传 html、js、 exe、sh类型的文件!"),!1):(o.length&&(o.forEach((function(n){e.splice(n,1),t.splice(n,1)})),ibiz.message.error("不可上传 html、js、 exe、sh类型的文件!")),!0)},l=function(e){e.forEach((function(e){n.value.find((function(t){return t.id===e.uid&&(t.percentage=e.percentage,!0)}))}))},c=function(e,t){e.forEach((function(e){n.value.find((function(n){return n.id===e.uid&&(n.status=e.status,n.id=t.data.fileid,n.name=t.data.filename,ce(n,r.value),!0)}))}))},s=function(e,t){var r;e.forEach((function(e){n.value.find((function(t){return t.id===e.uid&&(t.status=e.status,!0)}))}));var o=new _(t);ibiz.notification.error({title:null===(r=o.status)||void 0===r?void 0:r.toString(),desc:o.message,duration:10})},u=function(e){n.value=n.value.filter((function(e){return"finished"===e.status})),t.value="done"},d=g(!1),f=g(""),p=g("");return{selectFile:function(){R({multiple:e.multiple,accept:e.accept,uploadUrl:i.value,beforeUpload:a,progress:l,success:c,error:s,finish:u})},fileList:n,uploadState:t,showModal:d,modalTitle:f,iframeUrl:p,onModalCancel:function(){d.value=!1,f.value="",p.value=""},previewFile:function(e){d.value=!0,f.value=e.name;var t=window.Environment.previewFileUrl;if(t){var n=encodeURIComponent(ae("".concat(window.location.origin).concat(e.url,"?fullfilename=").concat(e.name)));p.value="".concat(t,"/onlinePreview?url=").concat(n)}}}}var de=h({name:"SyGridFileUpload",props:C(),setup:function(e){var t=S("sy-grid-file-upload"),n=E(e),r=se({value:n.value,data:n.data,controller:n.controller}),o=ue({downloadUrl:r.downloadUrl,uploadUrl:r.uploadUrl,value:r.valueList});return{ns:t,fileList:o.fileList,showModal:o.showModal,modalTitle:o.modalTitle,iframeUrl:o.iframeUrl,downloadFile:function(t){e.controller.fileDownload(t)},previewFile:o.previewFile,onModalCancel:o.onModalCancel}},render:function(){var e=this;return b("grid-editor",{attrs:{disabled:this.disabled,readonly:this.readonly},class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[b("div",{class:this.ns.b("file-list")},[this.fileList.map((function(t){return b("div",{class:e.ns.b("file-item"),key:t.id},[b("div",{class:e.ns.b("file-item-title"),on:{click:function(){return e.previewFile(t)}}},[t.name]),b("div",{class:e.ns.b("file-item-action")},[b("i-icon",{attrs:{type:"md-download"},on:{click:function(){return e.downloadFile(t)}}}),b("i-icon",{attrs:{type:"md-eye"},on:{click:function(){return e.previewFile(t)}}})])])}))]),b("i-modal",{attrs:{value:this.showModal,title:this.modalTitle,"class-name":this.ns.b("modal"),width:"70%",transfer:!1,"footer-hide":!0},on:{"on-cancel":this.onModalCancel}},[b("iframe",{class:this.ns.b("iframe"),attrs:{src:this.iframeUrl}})])])}}),fe=h({name:"SyGridFileUploadContainer",props:C(),emits:L(),render:function(e){var t=this;return this.disabled||this.readonly?e("SyGridFileUpload",{props:n({},this.$props)}):e("SyEditGridFileUpload",{props:n({},this.$props),on:{change:function(e,n){t.$emit("change",e,n)},rowSave:function(){t.$emit("rowSave")}}})}}),pe=h({name:"SyEditGridFileUploadPopover",props:{uploadUrl:{type:String,required:!0},downloadUrl:{type:String,required:!0},value:{type:Array,required:!0},controller:{type:p,required:!0}},emits:{close:function(e){return!0}},setup:function(e,t){var n=t.emit,r=S("sy-edit-grid-file-upload-popover"),o=E(e),a=ue({downloadUrl:o.downloadUrl,value:o.value,uploadUrl:o.uploadUrl}),c=a.fileList,s=a.uploadState,u=a.selectFile,d=g(),f=g(!1),p=j(d,function(){var e=l(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n("close",{isModified:f.value,resultFiles:c.value});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());x(s,(function(e){"done"===e?(f.value=!0,p.proceed()):"loading"===e&&p.pause()}));return{ns:r,componentRef:d,fileList:c,deleteFile:function(e){var t=c.value.findIndex((function(t){return t.id===e.id}));c.value.splice(t,1),f.value=!0},selectFile:u,downloadFile:function(t){e.controller.fileDownload(t)}}},render:function(){var e=this;return b("div",{ref:"componentRef",style:"width:300px",class:this.ns.b()},[b("div",{class:this.ns.b("file-list")},[this.fileList.map((function(t){return b("div",{class:e.ns.b("file-item"),key:t.id},[b("div",{class:e.ns.b("file-item-title"),on:{click:function(){return e.downloadFile(t)}}},[t.name]),b("div",{class:e.ns.b("file-item-action")},[b("i-icon",{attrs:{type:"md-close"},on:{click:function(){return e.deleteFile(t)}}})])])}))]),b("div",{on:{click:function(){return e.selectFile()}},class:this.ns.e("button")},[b("i-icon",{attrs:{type:"md-add"}}),"添加文件"])])}}),me=h({name:"SyEditGridFileUpload",props:C(),emits:L(),setup:function(e,t){var n=t.emit,r=S("sy-edit-grid-file-upload"),o=E(e),a=o.value,c=o.data,s=o.controller,u=se({value:a,data:c,controller:s}),d=u.downloadUrl,f=u.uploadUrl,p=u.valueList,m=g(),h=function(){var e=l(i().mark((function e(){var t,r,o,a,l,c,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.value){e.next=2;break}throw new V("容器元素不存在");case 2:return t=m.value.$el,r=t.offsetHeight,o=ibiz.overlay.createPopover((function(e){return e(pe,{props:{value:p.value,uploadUrl:f.value,downloadUrl:d.value,controller:s.value},on:{close:function(e){o.dismiss(e)}}})}),void 0,{noArrow:!0,placement:"bottom-start",offsetOpts:{mainAxis:-r,crossAxis:0}}),e.next=7,o.present(t);case 7:return e.next=9,o.onWillDismiss();case 9:a=e.sent,l=a.isModified,c=a.resultFiles,l&&(u=c.length>0?JSON.stringify(c.map((function(e){return{name:e.name,id:e.id}}))):null,n("change",u),n("rowSave"));case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return P(m,"click",(function(t){e.disabled||h()})),{ns:r,valueList:p,componentRef:m}},render:function(){var e=this;return b("grid-editor",{attrs:{disabled:this.disabled,readonly:this.readonly},ref:"componentRef",class:this.ns.b()},[b("div",{class:this.ns.b("file-list")},[this.valueList.map((function(t){return b("div",{class:e.ns.b("file-item"),key:t.id},[b("div",{class:e.ns.b("file-item-title")},[t.name])])}))])])}}),he=u((function e(){c(this,e),v(this,"component",$)})),ve=function(){function e(){c(this,e),v(this,"component",q)}var t;return u(e,[{key:"createController",value:(t=l(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new o(t,n),e.next=3,r.init();case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),ye=u((function e(){c(this,e),v(this,"component","IndexView")})),be=h({name:"WFStepTraceGrid",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(e){var t=w().proxy,n=T(t,e.modelPath);U(t,"deName",n.setDeName.bind(n));var r=S("wf-step-trace-grid"),o=g([]);n.nerve.self.evt.on("mounted",(function(){var e;n.data&&(null===(e=n.data.usertasks)||void 0===e||e.forEach((function(e){e.identitylinks.length>0||(e.comments.length>0&&e.comments.forEach((function(t){o.value.push({nodeName:e.userTaskName,personName:t.authorName,time:t.time,content:t.type,comment:t.fullMessage})})),o.value.sort((function(e,t){return Date.parse(t.time)-Date.parse(e.time)})))})))}));var i=g([{title:"处理环节",key:"nodeName",width:180,resizable:!0},{title:"处理人",key:"personName",width:180,resizable:!0},{title:"处理时间",key:"time",width:180,resizable:!0},{title:"处理内容",key:"content",width:180,resizable:!0},{title:"处理意见",key:"comment"}]);return{c:n,ns:r,gridData:o,columns:i}},render:function(){return b("div",{class:this.ns.b()},[b("div",{class:this.ns.e("title")},["审批信息"]),b("i-table",{attrs:{"disabled-hover":!0,columns:this.columns,data:this.gridData},class:this.ns.e("grid")})])}}),we=h({props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object}},setup:function(e){var t=w().proxy,n=N(t,e.modelPath),r=S("view-".concat(W.DE_WF_DYNA_EDIT_VIEW3).toLowerCase()),o=g(["mainForm"]);return{c:n,ns:r,onTabClick:function(e){o.value.includes(e)||o.value.push(e)},lazyList:o}},render:function(e){var t=this,n=[];if(this.c.complete){var r=this.c.activeForm;r&&this.c.providers[r.name]&&n.push(e(this.c.providers[r.name].component,{props:{modelData:r,context:this.c.context,params:this.c.params},style:{height:"auto"},on:{neuronInit:this.c.nerve.onNeuronInit("form")}}))}if(this.c.complete&&this.c.model.drTab.pages[0]){var o=this.c.model.drTab.pages[0],i=this.c.drPages[o.source.name];n.push(e(be,{attrs:{context:i.context,params:i.params,deName:this.c.model.appEntity.source.codeName,modal:this.modal,modelPath:o.embedView.source.modelPath}}))}return e("view-base",{attrs:{controller:this.c},scopedSlots:{toolbar:function(){return t.c.complete?[t.c.wfLinks.length>0&&e("wf-toolbar",{attrs:{wfLinks:t.c.wfLinks},on:{"wf-link-click":function(e){t.c.onLinkClick(e)}}})]:null}}},[this.c.complete&&e("i-tabs",{class:[this.ns.be("","tab")],attrs:{name:this.c.model.drTab.source.name},on:{"on-click":this.onTabClick}},[e("i-tab-pane",{class:this.ns.be("","tab-item"),attrs:{tab:this.c.model.drTab.source.name,label:this.c.model.drTab.source.editItemCaption,name:"mainForm"}},[n]),this.c.model.drTab.pages.map((function(n){var r=t.c.drPages[n.source.name];return e("i-tab-pane",{class:t.ns.be("","tab-item"),attrs:{tab:t.c.model.drTab.source.name,disabled:t.c.isNewData,label:n.source.caption,name:n.source.name}},[!t.c.isNewData&&t.lazyList.includes(n.source.name)&&e("ViewShell",{attrs:{context:r.context,params:r.params,modal:{mode:A.EMBED},modelPath:n.embedView.source.modelPath,deName:t.c.model.appEntity.source.codeName},on:{neuronInit:t.c.nerve.onNeuronInit(n.source.name)},key:r.key})])}))])])}}),ge=u((function e(){c(this,e),v(this,"component",we)})),xe=h({name:"SyEditView3",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object}},setup:function(e){var t=w().proxy,n=I(t,e.modelPath),r=S("view-deeditview3"),o=g(["mainForm"]);return{c:n,ns:r,onTabClick:function(e){o.value.includes(e)||o.value.push(e)},lazyList:o}},render:function(e){var t=this;return e("view-base",{attrs:{controller:this.c}},[this.c.complete&&e("i-tabs",{class:[this.ns.be("","tab")],attrs:{name:this.c.model.drTab.source.name},on:{"on-click":this.onTabClick}},[e("i-tab-pane",{class:this.ns.be("","tab-item"),attrs:{tab:this.c.model.drTab.source.name,label:this.c.model.drTab.source.editItemCaption,name:"mainForm"}},[e("edit-form-control",{attrs:{modelData:this.c.model.form,context:this.c.context,params:this.c.params},style:{height:"auto"},on:{neuronInit:this.c.nerve.onNeuronInit(this.c.model.form.source.name)}}),e(be,{attrs:{context:this.c.drPages[this.c.model.drTab.pages[0].source.name].context,params:this.c.drPages[this.c.model.drTab.pages[0].source.name].params,deName:this.c.model.appEntity.source.codeName,modal:this.modal,modelPath:this.c.model.drTab.pages[0].embedView.source.modelPath}})]),this.c.model.drTab.pages.map((function(n){var r=t.c.drPages[n.source.name];if(r)return e("i-tab-pane",{class:t.ns.be("","tab-item"),attrs:{tab:t.c.model.drTab.source.name,disabled:t.c.isNewData,label:n.source.caption,name:n.source.name}},[!t.c.isNewData&&t.lazyList.includes(n.source.name)&&e("ViewShell",{attrs:{context:r.context,params:r.params,modal:{mode:A.EMBED},modelPath:n.embedView.source.modelPath,deName:t.c.model.appEntity.source.codeName},on:{neuronInit:t.c.nerve.onNeuronInit(n.source.name)},key:r.key})])}))])])}}),Ee=u((function e(){c(this,e),v(this,"component",xe)})),Se=function(){function e(){c(this,e),v(this,"formEditor","SyFileUpload"),v(this,"gridEditor","SyGridFileUploadContainer")}var t;return u(e,[{key:"createController",value:(t=l(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new p(t,n),e.next=3,r.init();case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),ke=new G(t.meta.url);e("default",{mateUrl:t.meta.url,install:function(e){ke.loadStyle(["/style.css"]),ibiz.config.enableDataInfoBar=!1,ibiz.config.gridEditShowMode="all",e.component("WfToolbar",J),ibiz.register.view.register("VIEW_CUSTOM_SyWebIndexView",new ye),ibiz.register.view.register("VIEW_CUSTOM_PresetWFChartView",new he),ibiz.register.gridColumn.register("GRID_COLRENDER_CodeListGridColumn",new ve),ibiz.register.view.register("VIEW_CUSTOM_SyWfDynaEditView3",new ge),ibiz.register.view.register("VIEW_CUSTOM_SyEditView3",new Ee),e.component("SyFileUpload",le),e.component("SyGridFileUpload",de),e.component("SyEditGridFileUpload",me),e.component("SyGridFileUploadContainer",fe),ibiz.register.editor.register("EDITOR_CUSTOMSTYLE_SyFileUpload",new Se)}})}}}))}();
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册