text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6410bb6d"],{"0e499":function(e,t,a){"use strict";var n=a("9e88"),r=a.n(n);r.a},"7e93":function(e,t,a){},"7ef7":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"j-app-block"},[a("div",{staticClass:"block_title"},[a("div",{staticStyle:{background:"#fff",padding:"10px 10px 10px"}},[e._v("\n      "+e._s(e.title)+"\n    ")])]),e._t("default")],2)},r=[],i={name:"AppBlock",props:{title:String}},o=i,s=(a("b6cb"),a("2877")),l=Object(s["a"])(o,n,r,!1,null,null,null);t["default"]=l.exports},"9d06":function(e,t,a){"use strict";var n=a("a364"),r=a.n(n);r.a},"9e88":function(e,t,a){},a364:function(e,t,a){},b6cb:function(e,t,a){"use strict";var n=a("7e93"),r=a.n(n);r.a},c22a:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"j-app-section"},[e.loading?a("van-loading",{staticStyle:{"padding-top":"100px","text-align":"center"},attrs:{type:"spinner",color:"#1989fa"}}):e._e(),e._t("default")],2)},r=[],i={name:"AppSection",props:{loading:{type:Boolean,default:!1,required:!1}}},o=i,s=(a("0e499"),a("2877")),l=Object(s["a"])(o,n,r,!1,null,null,null);t["default"]=l.exports},ce1b:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("app-section",{attrs:{loading:e.pageLoading}},[a("van-nav-bar",{attrs:{title:e.navTitle,"left-arrow":""},on:{"click-left":e.backRoute}}),a("van-pull-refresh",{on:{refresh:e.onRefresh},model:{value:e.pullLoading,callback:function(t){e.pullLoading=t},expression:"pullLoading"}},[a("desform-view",{attrs:{mode:"add",dataId:e.dataId,height:e.pageHeight,desformCode:e.formConfig.desformCode},on:{success:e.handleSuccess,dialogChange:e.handleDialogChange}})],1)],1)},r=[],i=(a("8e6e"),a("456d"),a("f559"),a("ac4d"),a("8a81"),a("ac6a"),a("bd86")),o=a("c22a"),s=a("aa8f"),l=a("b047"),c=a.n(l),d=a("ec26");function u(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function f(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?u(a,!0).forEach((function(t){Object(i["a"])(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):u(a).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var h={name:"SelectUsers",components:{AppSection:o["default"],DesformView:d["default"]},data:function(){return this.searchByKeyword=c()(this.searchByKeyword,1e3),{pageLoading:!1,navTitle:"",pullLoading:!1,dataId:null,formConfig:{},url:"/sys/user/appUserList",saveUrl:"/process/extActDesignFlowData/add",userList:[],selectedList:[],keyword:"",destination:"",flowCodePre:"desform_"}},computed:{pageHeight:function(){return null}},methods:{initForm:function(e){this.navTitle="表单【"+e.desformName+"】发起申请",this.formConfig=f({},e)},backRoute:function(){this.$emit("back")},handleSuccess:function(e){var t=this,a={desformId:this.formConfig.id,desformCode:this.formConfig.desformCode,desformDataId:e.dataId,desformName:this.formConfig.desformName,processName:this.formConfig.procName,titleExp:this.formConfig.titleExp,flowCode:this.flowCodePre+this.formConfig.desformCode};Object(s["d"])(this.saveUrl,a).then((function(e){e.success?t.$emit("success"):t.$toast(e.message)}))},handleDialogChange:function(){},searchByKeyword:function(){this.onRefresh()},onRefresh:function(){var e=this;this.pullLoading=!0,this.pageNo=1;var t={pageNo:this.pageNo,pageSize:this.pageSize,keyword:this.keyword};this.userList=[],Object(s["a"])(this.url,t).then((function(t){if(e.pullLoading=!1,t.success){e.pageNo++;var a=t.result.records,n=!0,r=!1,i=void 0;try{for(var o,s=a[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=o.value;e.userList.push(l)}}catch(c){r=!0,i=c}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}}))},onLoad:function(){var e=this;this.listLoading=!0;var t={pageNo:this.pageNo,pageSize:this.pageSize,keyword:this.keyword};Object(s["a"])(this.url,t).then((function(t){if(e.listLoading=!1,t.success){e.pageNo++;var a=t.result.records,n=!0,r=!1,i=void 0;try{for(var o,s=a[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=o.value;e.userList.push(l)}}catch(c){r=!0,i=c}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}(!a||a.length<e.pageSize)&&(e.listFinished=!0)}else e.error=!0})).catch((function(t){e.error=!0}))},toggleChecked:function(e){this.$refs.userCheckBox[e].toggle()},clearAll:function(e){this.destination=e,this.selectedList=[]},backUserfulData:function(){var e=[],t=!0,a=!1,n=void 0;try{for(var r,i=this.selectedList[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value,s={username:o.username,realname:o.realname};o.avatar?o.avatar.startsWith("http")?s.avatar=o.avatar:s.avatar="".concat(window._CONFIG["domainURL"],"/sys/common/view/").concat(o.avatar):s.avatar="",e.push(s)}}catch(l){a=!0,n=l}finally{try{t||null==i.return||i.return()}finally{if(a)throw n}}return e}}},g=h,p=a("2877"),m=Object(p["a"])(g,n,r,!1,null,"88098b9e",null);t["default"]=m.exports},e88b:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("van-nav-bar",{attrs:{title:e.navTitle,"left-arrow":""},on:{"click-left":e.backRoute}}),a("van-pull-refresh",{staticStyle:{height:"calc(100% - 50px)"},on:{refresh:e.onRefresh},model:{value:e.pullLoading,callback:function(t){e.pullLoading=t},expression:"pullLoading"}},[a("van-grid",{staticStyle:{height:"100%"},attrs:{"column-num":3}},e._l(e.gridList,(function(t,n){return a("van-grid-item",{key:n,attrs:{icon:t.icon,text:t.desformName},on:{click:function(a){return e.openDesForm(t)}}})})),1)],1),a("div",{staticStyle:{width:"100%"},attrs:{id:"applyForm"}}),a("van-popup",{attrs:{"get-container":"#applyForm"},model:{value:e.applyFormFlag,callback:function(t){e.applyFormFlag=t},expression:"applyFormFlag"}},[a("des-form-page",{ref:"desFormPage",on:{success:e.goDraftPage,back:function(){return e.applyFormFlag=!1}}})],1)],1)},r=[],i=(a("ac4d"),a("8a81"),a("ac6a"),a("7ef7")),o=a("c22a"),s=a("ce1b"),l=a("aa8f"),c={name:"tab-grid9",components:{AppSection:o["default"],AppBlock:i["default"],DesFormPage:s["default"]},data:function(){return{navTitle:"提交审批",pullLoading:!1,gridUrl:"/process/extActDesignFlowData/getDesFormFlows",gridList:[],applyFormFlag:!1,flowCodePre:"desform_"}},watch:{$route:function(){this.onRefresh()}},created:function(){this.onRefresh()},methods:{backRoute:function(){this.$router.go(-1)},openDesForm:function(e){var t=this;this.applyFormFlag=!0,this.$nextTick((function(){t.$refs.desFormPage.initForm(e)}))},onRefresh:function(){var e=this;this.pullLoading=!0,this.gridList=[],Object(l["a"])(this.gridUrl).then((function(t){if(e.pullLoading=!1,t.success){var a=!0,n=!1,r=void 0;try{for(var i,o=t.result[Symbol.iterator]();!(a=(i=o.next()).done);a=!0){var s=i.value;s.icon="records"}}catch(l){n=!0,r=l}finally{try{a||null==o.return||o.return()}finally{if(n)throw r}}e.gridList=t.result}}))},goDraftPage:function(){this.$router.push({name:"draft"})}}},d=c,u=(a("9d06"),a("2877")),f=Object(u["a"])(d,n,r,!1,null,"02ab9172",null);t["default"]=f.exports},ec26:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-spin",{attrs:{spinning:e.pageLoading||e.loading}},[e.show?a("iframe",e._b({attrs:{height:e.height}},"iframe",e.iframeProps,!1)):e._e()])},r=[],i=a("7618"),o=a("2b0e"),s=a("0fea"),l=a("ca00"),c=a("9fb0"),d={name:"DesformView",props:{mode:{type:String,required:!0},desformCode:{type:String,default:""},dataId:{type:String,default:null},alert:{type:Boolean,default:!0},height:{type:String,default:null}},data:function(){return{show:!0,pageLoading:!0,loading:!1,messageId:Object(l["f"])("16"),iframeHeight:300,url:{add:"/desform/data/add",edit:"/desform/data/edit",online:"/online/cgform/api/crazyForm"}}},computed:{iframeProps:function(){var e=window._CONFIG["domianURL"],t=null==this.dataId?"add":this.dataId,a="".concat(e,"/desform/").concat(this.mode,"/").concat(this.desformCode);return"edit"!==this.mode&&"detail"!==this.mode||(a+="/".concat(t)),a+="?messageId=".concat(this.messageId,"&token=").concat(o["a"].ls.get(c["a"])),a+="&innerRequest=false",a+="&disableScroll=true",{src:a,style:{width:"100%",height:this.height||this.iframeHeight+"px",overflow:"hidden",transition:this.height?null:"height 0.3s"},frameborder:"0"}}},created:function(){var e=this,t=this;window.addEventListener("message",(function(e){var a=e.data,n=a.messageId,r=a.type,i=a.data;if("".concat(t.messageId)===n)switch(r){case"save":t.saveAllData(i);break;case"height-change":t.iframeHeight=i+10,t.pageLoading=!1;break;case"dialog-change":t.$emit("dialogChange",i);break}}),!1),setTimeout((function(){e.pageLoading&&(e.pageLoading=!1)}),3e3)},methods:{reload:function(){var e=this;this.show=!1,this.$nextTick((function(){e.show=!0}))},saveAllData:function(e){var t=this,a=this,n=a.url.add,r="POST",o={desformCode:a.desformCode,desformDataJson:JSON.stringify(e.json)};null!=a.dataId&&(n=a.url.edit,r="PUT",o["id"]=a.dataId),a.loading=!0,function(){if(e.onlineForm){o["onlineFormCode"]=e.onlineForm,null!=a.dataId&&(e.json.id=e.onlineDataId);var t="".concat(a.url.online,"/").concat(e.onlineForm),n=Object(l["a"])(e.json);for(var c in n)if(n.hasOwnProperty(c)){var d=n[c];"object"===Object(i["a"])(d)&&(n[c]=JSON.stringify(d))}return Object(s["g"])(t,n,r)}return Promise.resolve(null)}().then((function(e){if(null==e);else{if(!e.success)return!0===a.alert&&a.$error({title:"保存失败",content:e.message}),Promise.reject();null==a.dataId&&(o["onlineFormDataId"]=e.result)}return Object(s["g"])(n,o,r)})).then((function(t){if(t.success){var a=e.formConfig.customRequestURL;if(a instanceof Array&&a[0]&&a[0].url)return Object(s["g"])(a[0].url,o,r)}return t})).then((function(e){e.success?(t.$emit("success",{res:e,dataId:e.result,target:a}),!0===a.alert&&a.$message.success("保存成功")):(a.$emit("error",{res:e,target:a}),!0===a.alert&&a.$error({title:"保存失败",content:e.message}))})).finally((function(){a.loading=!1}))}}},u=d,f=a("2877"),h=Object(f["a"])(u,n,r,!1,null,"12ba1bff",null);t["default"]=h.exports},f559:function(e,t,a){"use strict";var n=a("5ca1"),r=a("9def"),i=a("d2c8"),o="startsWith",s=""[o];n(n.P+n.F*a("5147")(o),"String",{startsWith:function(e){var t=i(this,e,o),a=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return s?s.call(t,n,a):t.slice(a,a+n.length)===n}})}}]);