Approval.0c1dc388.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Approval"],{"31cc":function(t,e,r){"use strict";r("da1d")},"3db2":function(t,e,r){"use strict";r("e818")},"6e6e":function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mheader"},[r("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[r("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),r("div",{staticClass:"m-nav-bar__title"},[t._t("default",(function(){return[t._v(t._s(t.name?t.name:t.$route.meta.descrition))]}))],2),r("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},o=[],i={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}}},a=i,c=(r("70bb"),r("2877")),s=Object(c["a"])(a,n,o,!1,null,"10a70108",null);e["a"]=s.exports},"70bb":function(t,e,r){"use strict";r("c905")},"7e08":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"approval"},[r("van-sticky",[r("div",{staticClass:"user-container m-shadow"},[r("van-grid",{attrs:{"column-num":3,border:!1}},[r("van-grid-item",{attrs:{text:"需我审批",badge:t.upcoming},on:{click:function(e){return t.gotoMyApproval(1)}},scopedSlots:t._u([{key:"icon",fn:function(){return[r("i",{staticClass:"icon icon1"})]},proxy:!0}])}),r("van-grid-item",{attrs:{text:"我发起的"},on:{click:function(e){return t.gotoMyApproval(2)}},scopedSlots:t._u([{key:"icon",fn:function(){return[r("i",{staticClass:"icon icon3"})]},proxy:!0}])}),r("van-grid-item",{attrs:{text:"我相关的"},on:{click:function(e){return t.gotoMyApproval(3)}},scopedSlots:t._u([{key:"icon",fn:function(){return[r("i",{staticClass:"icon icon2"})]},proxy:!0}])})],1)],1)]),t.dataShow?r("apply-modal",{attrs:{applyList:t.applyList}}):r("m-empty")],1)},o=[],i=r("6e6e"),a=r("d678"),c=r("764a"),s=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"workflow"},[r("van-collapse",{attrs:{border:!1},model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},[t._l(t.applyList,(function(e,n){return[e.process_list2&&e.process_list2.length>0?r("van-collapse-item",{key:n,attrs:{name:n},scopedSlots:t._u([{key:"title",fn:function(){return[r("h2",{staticClass:"title"},[t._v(t._s(e.name))])]},proxy:!0}],null,!0)},[r("div",{staticClass:"grid"},t._l(e.process_list2,(function(e){return r("div",{key:e.id,staticClass:"grid-item",on:{click:function(r){return t.onHref(e)}}},[r("e-icon",{staticClass:"icon",attrs:{"icon-name":e.icon}}),r("p",[t._v(t._s(e.name))])],1)})),0)]):t._e()]}))],2)],1)},u=[],l={props:{applyList:{type:[Array,Object],default:function(){return[]}}},data:function(){return{activeNames:[0]}},methods:{onHref:function(t){this.$router.push({path:"/approvalApply",query:{processId:t.id,name:t.name}})}}},p=l,f=(r("3db2"),r("2877")),h=Object(f["a"])(p,s,u,!1,null,"0e8651b4",null),d=h.exports;function v(t){return v="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},v(t)}function y(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */y=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(j){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(j){return{type:"throw",arg:j}}}t.wrap=s;var l={};function p(){}function f(){}function h(){}var d={};c(d,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==e&&r.call(g,o)&&(d=g);var w=h.prototype=p.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==v(p)&&r.call(p,"__await")?e.resolve(p.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(p).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=h,c(w,"constructor",h),c(h,"constructor",f),f.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(_.prototype),c(_.prototype,i,(function(){return this})),t.AsyncIterator=_,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),c(w,a,"Generator"),c(w,o,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,E.prototype={constructor:E,reset:function(t){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(L),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}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 c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){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"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function m(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function g(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){m(i,n,o,a,c,"next",t)}function c(t){m(i,n,o,a,c,"throw",t)}a(void 0)}))}}var w={name:"approval",components:{MHeader:i["a"],ApplyModal:d,MEmpty:a["a"]},data:function(){return{applyStatus:!1,applyList:[],dataShow:!0,upcoming:null,backUrl:{status:!0,path:"/home"}}},mounted:function(){var t=g(y().mark((function t(){var e,r,n;return y().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return document.title="OA审批",t.prev=1,t.next=4,Object(c["o"])();case 4:e=t.sent,r=e.data,n=r>0?r:null,this.upcoming=n&&n>99?"99+":n,t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:this.onApplyList();case 13:case"end":return t.stop()}}),t,this,[[1,10]])})));function e(){return t.apply(this,arguments)}return e}(),methods:{onApplyList:function(){var t=g(y().mark((function t(){var e,r;return y().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(c["c"])();case 3:e=t.sent,r=e.data||[],r.forEach((function(t){t.process_list2=[],t.process_list&&t.process_list.length>0&&t.process_list.forEach((function(e){0==e.sub&&t.process_list2.push(e)}))})),this.applyList=e.data,this.dataShow=e.data.length>0,t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),this.dataShow=!1;case 13:this.applyStatus=!0;case 14:case"end":return t.stop()}}),t,this,[[0,10]])})));function e(){return t.apply(this,arguments)}return e}(),gotoMyApproval:function(t){this.$router.push({path:"/myApproval",query:{classify:t}})}}},b=w,_=(r("31cc"),Object(f["a"])(b,n,o,!1,null,"671e0c0d",null));e["default"]=_.exports},"852e":function(t,e,r){},bad8:function(t,e,r){"use strict";r("852e")},c905:function(t,e,r){},d678:function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mempty",class:t.full?"full":null},[r("div",{class:[t.icon?t.icon:"icon_nodata","icon"]}),r("div",{staticClass:"msg"},[t._v(t._s(t.msg?t.msg:"暂无内容"))])])},o=[],i={name:"mempty",props:{icon:String,msg:String,full:Boolean}},a=i,c=(r("bad8"),r("2877")),s=Object(c["a"])(a,n,o,!1,null,"31cc2a9d",null);e["a"]=s.exports},da1d:function(t,e,r){},e818:function(t,e,r){}}]);