1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ApprovalApply"],{1265:function(t,e,r){"use strict";r("6591")},"61c1":function(t,e,r){"use strict";r("cf5f")},6591:function(t,e,r){},"96e7":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:"approvalContainer",class:[t.btn_group&&t.btn_group.length>0?"approvalApply":null]},[r("m-header",{attrs:{name:t.name,appHide:!0}}),r("van-form",{ref:"headForm",attrs:{"validate-first":"","validate-trigger":"onSubmit","scroll-to-error":!1,"show-error":!1},on:{submit:t.onSubmitHead,failed:t.onFailed}},[r("van-field",{directives:[{name:"show",rawName:"v-show",value:t.deptList.length>1,expression:"deptList.length > 1"}],staticClass:"style",attrs:{clearable:"",name:"deptName",required:"",placeholder:"请选择申请部门",readonly:"",rules:[{required:!0,message:"请选择申请部门"}]},on:{click:function(e){t.showSelect=!0}},scopedSlots:t._u([{key:"label",fn:function(){return[t._v("申请部门\n "),t.socialId?[t.socialId!=t.ruleForm.deptId?r("span",{staticStyle:{color:"red"}},[t._v("\n (该部门非社保部门)\n ")]):t._e()]:r("span",{staticStyle:{color:"red"}},[t._v(" (未设置社保部门) ")])]},proxy:!0},{key:"right-icon",fn:function(){return[r("i",{staticClass:"van-icon van-icon-arrow van-cell__right-icon"})]},proxy:!0}]),model:{value:t.deptName,callback:function(e){t.deptName=e},expression:"deptName"}}),r("van-field",{staticClass:"style",attrs:{label:"优先级",clearable:"",name:"priority",required:"",rules:[{required:!0,message:"请选择工单优先级"}]},scopedSlots:t._u([{key:"input",fn:function(){return[r("van-radio-group",{attrs:{direction:"horizontal"},model:{value:t.ruleForm.priority,callback:function(e){t.$set(t.ruleForm,"priority",e)},expression:"ruleForm.priority"}},[r("van-radio",{attrs:{name:1}},[t._v("一般")]),r("van-radio",{attrs:{name:2}},[t._v("紧急")]),r("van-radio",{attrs:{name:3}},[t._v("非常紧急")])],1)]},proxy:!0}])}),t._l(t.processStructureValue.tpls,(function(e,n){return[void 0===t.currentNode.hideTpls||null===t.currentNode.hideTpls||-1===t.currentNode.hideTpls.indexOf(e.id)?r("form-modal",{key:n,ref:"generateForm-"+e.id,refInFor:!0,attrs:{formData:e.form_structure,disabled:void 0!==t.currentNode.readonlyTpls&&null!==t.currentNode.readonlyTpls&&-1!==t.currentNode.readonlyTpls.indexOf(e.id)||null}}):t._e()]}))],2),t.btn_group&&t.btn_group.length>0?r("van-goods-action",{staticStyle:{padding:"0 4%"}},t._l(t.btn_group,(function(e,n){return r("van-goods-action-button",{key:n,attrs:{type:e.className,disabled:t.submitDisabled,text:"提交",plain:""},on:{click:function(r){return t.onCheckSubmit(e)}}})})),1):t._e(),r("van-popup",{attrs:{position:"bottom"},model:{value:t.showSelect,callback:function(e){t.showSelect=e},expression:"showSelect"}},[r("van-picker",{attrs:{"show-toolbar":"",columns:t.deptList,"visible-item-count":"4"},on:{confirm:t.onConfirm,cancel:function(e){t.showSelect=!1}}})],1)],1)},o=[],a=r("71c2"),i=r("764a"),s=r("3889");function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}var u=["priority","deptName"];function l(t){return d(t)||h(t)||v(t)||f()}function f(){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 h(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function d(t){if(Array.isArray(t))return m(t)}function p(t,e){var r="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=v(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){s=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function v(t,e){if(t){if("string"===typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y(t,e){if(null==t)return{};var r,n,o=g(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function g(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}function b(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */b=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(T){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return I()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=_(i,r);if(s){if(s===f)continue;return s}}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 c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(T){return{type:"throw",arg:T}}}t.wrap=u;var f={};function h(){}function d(){}function p(){}var v={};s(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=h.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,a,i,s){var u=l(t[o],t,a);if("throw"!==u.type){var f=u.arg,h=f.value;return h&&"object"==c(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,i,s)}),(function(t){n("throw",t,i,s)})):e.resolve(h).then((function(t){f.value=t,i(f)}),(function(t){return n("throw",t,i,s)}))}s(u.arg)}var o;this._invoke=function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}}function _(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,_(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;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,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(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,a=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 a.next=a}}return{next:I}}function I(){return{value:void 0,done:!0}}return d.prototype=p,s(g,"constructor",p),s(p,"constructor",d),d.displayName=s(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(u(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),s(g,i,"Generator"),s(g,o,(function(){return this})),s(g,"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=E,L.prototype={constructor:L,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(k),!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 i.type="throw",i.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 a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},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),f},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),k(r),f}},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;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function w(t,e,r,n,o,a,i){try{var s=t[a](i),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,o)}function x(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){w(a,n,o,i,s,"next",t)}function s(t){w(a,n,o,i,s,"throw",t)}i(void 0)}))}}var _={name:"approvalApply",components:{MHeader:a["a"],FormModal:s["a"]},data:function(){var t=this.$route.query;return{active:0,processId:t.processId,name:t.name,submitDisabled:!1,showSelect:!1,deptName:null,socialId:null,ruleForm:{deptId:null,priority:1,process:"",classify:"",state:[],source:"",source_state:"",process_method:"",tpls:{form_structure:[],form_data:[]},tasks:[]},currentNode:{},processStructureValue:{},tempProcessStructureValue:{},selectTarget:null,btn_group:[],deptList:[]}},mounted:function(){var t=x(b().mark((function t(){return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.getProcessNodeList();case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{getProcessNodeList:function(){var t=x(b().mark((function t(){var e,r,n,o,a,s,c,u=this;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,r=sessionStorage.getItem("userId"),n={processId:this.processId},r&&(n.userId=r),t.next=6,Object(i["l"])(n);case 6:o=t.sent,this.processStructureValue=o.data||{},this.tempProcessStructureValue=JSON.parse(JSON.stringify(o.data||{})),this.processStructureValue.nodes.forEach((function(t,e){"start"==t.clazz&&(u.active=e,u.currentNode=t)})),this.deptList=o.data.depts||[],a=o.data.deptId,this.socialId=a,this.deptList.forEach((function(t,e){a?t.deptId==a&&(u.deptName=t.deptName,u.ruleForm.deptId=t.deptId):0==e&&(u.deptName=t.deptName,u.ruleForm.deptId=t.deptId),t.text=t.deptName})),s=(null===(e=o.data)||void 0===e?void 0:e.edges)||[],c=[],s.forEach((function(t){t.source===u.currentNode.id&&1==t.flowProperties?(1==t.flowProperties?t.className="info":0==t.flowProperties?t.className="danger":2==t.flowProperties&&(t.className="info"),c.push(t)):t.className="info"})),this.btn_group=c,!this.socialId&&this.deptList.length<=0&&this.$dialog.alert({message:"您当前暂未设置所属部门,请联系管理员",confirmButtonColor:"#01C1B5"}),t.next=23;break;case 21:t.prev=21,t.t0=t["catch"](0);case 23:case"end":return t.stop()}}),t,this,[[0,21]])})));function e(){return t.apply(this,arguments)}return e}(),onConfirm:function(t){this.deptName=t.deptName,this.ruleForm.deptId=t.deptId,this.showSelect=!1},onCheckSubmit:function(t){!this.socialId&&this.deptList.length<=0||!this.deptName?this.$dialog.alert({message:"您当前暂未设置所属部门,请联系管理员",confirmButtonColor:"#01C1B5"}):(this.selectTarget=t.target,this.$refs.headForm.submit())},onFailed:function(){},onSubmitHead:function(){var t=x(b().mark((function t(e){var r,n,o,a,s,c,l,f,h,d,v,m,g,w,x,_,S,k,L,E=this;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=e.priority,e.deptName,n=y(e,u),o=this.tempProcessStructureValue,this.submitDisabled=!0,a=this.ruleForm,a.priority=r,s={},a.process=parseInt(this.processId),a.classify=o.process.classify,s["id"]=this.selectTarget,a.source_state=o.nodes[this.active].label,c=p(o.nodes),t.prev=11,c.s();case 13:if((l=c.n()).done){t.next=22;break}if(f=l.value,f.id!==this.selectTarget){t.next=20;break}return void 0!==f.assignType&&(s["process_method"]=f.assignType),void 0!==f.assignValue&&(s["processor"]=Array.from(new Set(f.assignValue))),s["label"]=f.label,t.abrupt("break",22);case 20:t.next=13;break;case 22:t.next=27;break;case 24:t.prev=24,t.t0=t["catch"](11),c.e(t.t0);case 27:return t.prev=27,c.f(),t.finish(27);case 30:if(a.state=[s],a.tpls={form_structure:[],form_data:[]},a.tasks=void 0===o.process.task?[]:o.process.task,void 0!==o.nodes[this.active].task&&o.nodes[this.active].task.length>0){h=p(o.nodes[this.active].task);try{for(h.s();!(d=h.n()).done;)v=d.value,-1===a.tasks.indexOf(v)&&a.tasks.push(v)}catch(b){h.e(b)}finally{h.f()}}m=p(o.tpls);try{for(m.s();!(g=m.n()).done;)w=g.value,w.form_structure.id=w.id,a.tpls.form_structure.push(w.form_structure),void 0===this.currentNode.hideTpls||null===this.currentNode.hideTpls||-1===this.currentNode.hideTpls.indexOf(w.id)?(x=this.formatData(n),a.tpls.form_data.push(x)):(_=this.getHideTplData(w.form_structure),a.tpls.form_data.push(_))}catch(b){m.e(b)}finally{m.f()}return a.source=o.nodes[this.active].id,t.prev=37,k=this.processStructureValue.tpls[0],L=null===a||void 0===a||null===(S=a.tpls)||void 0===S?void 0:S.form_data[0],t.next=42,Object(i["b"])({tplInfoId:k.id,formData:L});case 42:return t.next=44,Object(i["d"])(a);case 44:this.submitDisabled=!1,this.$toast("申请成功"),setTimeout((function(){E.$router.push({path:"/myApproval",query:{classify:2}})}),500),t.next=52;break;case 49:t.prev=49,t.t1=t["catch"](37),this.submitDisabled=!1;case 52:case"end":return t.stop()}}),t,this,[[11,24,27,30],[37,49]])})));function e(e){return t.apply(this,arguments)}return e}(),formatData:function(t){var e={},r={};for(var n in t){var o=n.split(".");if(o.length>1){o.push(n);var a=o.shift();r[a]||(r[a]=[]),r[a].push(o)}else e[n]=t[n]}var i=function(n){var o=r[n]||[],a=[];o.forEach((function(e){a[e[1]]||(a[e[1]]={}),a[e[1]][e[0]]=t[e[2]]})),e[n]=a};for(var s in r)i(s);return e},getHideTplData:function(t){var e=t.list,r={};return e.forEach((function(t){if("subform"==t.type)if(t.columns.length>0){var e;r[t.model]=[];var n=[];null===(e=t.columns)||void 0===e||e.forEach((function(t){var e;(null===(e=t.list)||void 0===e?void 0:e.length)>0&&n.push.apply(n,l(t.list))}));var o={};n.forEach((function(t){o[t.model]=t.options.defaultValue})),r[t.model].push(o)}else r[t.model]="";else r[t.model]=t.options.defaultValue})),r}}},S=_,k=(r("1265"),r("2877")),L=Object(k["a"])(S,n,o,!1,null,"2db36572",null);e["default"]=L.exports},a432: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:"myApproval"},[r("van-sticky",[r("m-header",{attrs:{backUrl:t.backUrl,name:t.name,appHide:!0,isFixed:!1}}),r("van-dropdown-menu",{attrs:{"active-color":"#01C1B5","close-on-click-outside":!1}},[r("van-dropdown-item",{ref:"treeSelect",attrs:{title:t.value0}},[r("van-tree-select",{attrs:{items:t.items,"active-id":t.activeId,"main-active-index":t.activeIndex},on:{"update:activeId":function(e){t.activeId=e},"update:active-id":function(e){t.activeId=e},"update:mainActiveIndex":function(e){t.activeIndex=e},"update:main-active-index":function(e){t.activeIndex=e},"click-item":t.clickItem}})],1),r("van-dropdown-item",{attrs:{options:t.option1},on:{change:t.onSearch},model:{value:t.value1,callback:function(e){t.value1=e},expression:"value1"}}),r("van-dropdown-item",{attrs:{options:t.option2},on:{change:t.onSearch},model:{value:t.value2,callback:function(e){t.value2=e},expression:"value2"}}),r("van-dropdown-item",{ref:"item",attrs:{title:"创建时间"}},[r("van-cell",{attrs:{title:"开始时间","is-link":"",value:t.searchList.startTime},on:{click:function(e){return t.onChangeDate("showStart")}}}),r("van-cell",{attrs:{title:"结束时间","is-link":"",value:t.searchList.endTime},on:{click:function(e){return t.onChangeDate("showEnd")}}}),r("div",{staticClass:"btnWrap"},[r("div",{staticClass:"cancelBtn",on:{click:t.cancelBtn}},[t._v("重置")]),r("div",{staticClass:"okBtn",on:{click:t.okBtn}},[t._v("确定")])])],1)],1),r("search",{on:{onSearch:t.onSearchChange}}),r("van-popup",{style:{height:"40%"},attrs:{position:"bottom",round:""},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},[r("van-datetime-picker",{attrs:{"min-date":t.dataForm.minDate,"max-date":t.dataForm.maxDate,formatter:t.formatter,type:"date"},on:{cancel:function(e){t.dataForm.status=!1},confirm:t.chioseDate},model:{value:t.dataForm.currentDate,callback:function(e){t.$set(t.dataForm,"currentDate",e)},expression:"dataForm.currentDate"}})],1)],1),r("div",[t.dataShow?r("van-list",{key:"data",staticStyle:{"margin-top":"0.1rem"},attrs:{finished:t.finished,"immediate-check":!1,"finished-text":"- 没有更多内容 -"},on:{load:t.getList},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},t._l(t.dataList,(function(e,n){return r("van-cell-group",{key:n,staticClass:"app-item",on:{click:function(r){return t.onClick(e)}}},[r("van-cell",{staticClass:"appItem-title",staticStyle:{"padding-bottom":"0"},attrs:{border:!1,title:e.title,value:t.dayjs(e.create_time).format("YYYY-MM-DD HH:mm")}}),r("van-cell",{scopedSlots:t._u([{key:"title",fn:function(){return[r("p",[t._v("\n 优先级:\n "),2==e.priority?r("van-tag",{staticStyle:{background:"#fff9f6","vertical-align":"text-bottom"},attrs:{size:"small",plain:"",type:"warning"}},[t._v("紧急")]):t._e(),3==e.priority?r("van-tag",{staticStyle:{background:"#fff6f7","vertical-align":"text-bottom"},attrs:{size:"small",plain:"",type:"danger"}},[t._v("非常紧急")]):t._e(),1==e.priority?r("van-tag",{staticStyle:{background:"#edfff6","vertical-align":"text-bottom"},attrs:{size:"small",plain:"",type:"success"}},[t._v("一般")]):t._e()],1),r("div",{staticClass:"info van-hairline--top"},[r("span",[t._v("由\n "),r("span",{staticStyle:{color:"#01c1b5"}},[t._v(t._s(e.creator_name))]),t._v("\n 提交")]),e.is_end?[e.is_cancel?[r("van-tag",{attrs:{color:"#999999",size:"medium",plain:""}},[t._v("已关闭")])]:[e.is_denied?r("van-tag",{staticStyle:{background:"#fffbfb"},attrs:{color:"#FF4444",size:"medium",plain:""}},[t._v("审批拒绝\n ")]):r("van-tag",{staticStyle:{background:"#f1fcf9"},attrs:{color:"#00C988",size:"medium",plain:""}},[t._v("已完成")])]]:[e.principals?r("p",{staticClass:"orangeStatus",staticStyle:{display:"flex"}},[r("span",{staticStyle:{width:"100px","white-space":"nowrap",overflow:"hidden",display:"inline-block","text-overflow":"ellipsis","text-align":"right"}},[t._v(t._s(e.principals))]),t._v("处理中\n ")]):t._e()]],2)]},proxy:!0}],null,!0)})],1)})),1):r("m-empty",{key:"data"})],1)],1)},o=[],a=r("71c2"),i=r("c106"),s=r("764a"),c=r("d678"),u=r("5a0c"),l=r.n(u),f=r("485a");function h(t){return h="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},h(t)}function d(t){return y(t)||m(t)||v(t)||p()}function p(){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 v(t,e){if(t){if("string"===typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(t,e):void 0}}function m(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(t){if(Array.isArray(t))return g(t)}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function b(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */b=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(T){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return I()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=_(i,r);if(s){if(s===l)continue;return s}}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 c=u(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,i),a}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(T){return{type:"throw",arg:T}}}t.wrap=c;var l={};function f(){}function d(){}function p(){}var v={};s(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=f.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,a,i,s){var c=u(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==h(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,i,s)}),(function(t){n("throw",t,i,s)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,s)}))}s(c.arg)}var o;this._invoke=function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}}function _(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,_(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 S(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(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,a=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 a.next=a}}return{next:I}}function I(){return{value:void 0,done:!0}}return d.prototype=p,s(g,"constructor",p),s(p,"constructor",d),d.displayName=s(p,i,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(c(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},w(g),s(g,i,"Generator"),s(g,o,(function(){return this})),s(g,"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=E,L.prototype={constructor:L,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(k),!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 i.type="throw",i.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 a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,l):this.complete(i)},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),k(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;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function w(t,e,r,n,o,a,i){try{var s=t[a](i),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,o)}function x(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){w(a,n,o,i,s,"next",t)}function s(t){w(a,n,o,i,s,"throw",t)}i(void 0)}))}}var _={components:{MHeader:a["a"],MEmpty:c["a"],Search:i["a"]},data:function(){var t=this.$route.query;return{dayjs:l.a,backUrl:{status:!0,path:"/approval"},classify:t.classify,value1:0,value2:-1,option1:[{text:"优先级",value:0},{text:"一般",value:1},{text:"紧急",value:2},{text:"非常紧急",value:3}],option2:[{text:"是否结束",value:-1},{text:"是",value:1},{text:"否",value:0}],dataForm:{status:!1,minDate:new Date(2e3,0,1),maxDate:new Date(2025,10,1),currentDate:new Date},items:[],activeIndex:0,value0:"全部",activeId:0,searchList:{search:null,startTime:null,endTime:null,page:1,per_page:10,classify:t.classify,title:null},loading:!1,finished:!1,dataShow:!0,dataList:[],name:""}},mounted:function(){var t=x(b().mark((function t(){var e,r,n,o;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=this.classify,1==e?this.name="需我审批":2==e?this.name="我发起的":3==e&&(this.name="我相关的"),t.prev=2,t.next=5,Object(s["c"])();case 5:r=t.sent,n=r.data||[],o=[{text:"全部",children:[{text:"全部",id:0}]}],n.forEach((function(t,e){o[e+1]={text:t.name,children:[]},t.process_list&&t.process_list.length>0&&t.process_list.forEach((function(t){o[e+1].children.push({text:t.name,id:t.id})}))})),this.items=o,t.next=14;break;case 12:t.prev=12,t.t0=t["catch"](2);case 14:return Object(f["a"])(!0),t.next=17,this.getList();case 17:Object(f["a"])(!1);case 18:case"end":return t.stop()}}),t,this,[[2,12]])})));function e(){return t.apply(this,arguments)}return e}(),methods:{clickItem:function(t){this.value0=t.text,this.$refs.treeSelect.toggle(),this.onSearch()},onSearchChange:function(t){this.searchList.search=t,this.onSearch()},onSearch:function(){this.dataList=[],this.dataShow=!0,this.loading=!0,this.searchList.page=1,this.finished=!1,this.getList()},onClick:function(t){this.$router.push({path:"/ApprovalAction",query:{workOrderId:t.id,processId:t.process}})},getList:function(){var t=x(b().mark((function t(){var e,r,n,o,a,i;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e=Object.assign({},this.searchList),e.endTime=e.endTime?l()(e.endTime).format("YYYY-MM-DD")+" 23:59:59":null,e.priority=this.value1?this.value1:null,e.isEnd=-1!=this.value2?this.value2:null,e.processId=this.activeId?this.activeId:null,r=sessionStorage.getItem("userId"),e.userId=r,t.prev=7,t.next=10,Object(s["g"])(e);case 10:if(o=t.sent,a=o.data,this.loading=!1,!(this.dataList.length>0&&1==a.total_page)){t.next=15;break}return t.abrupt("return");case 15:i=a.data||[],(n=this.dataList).push.apply(n,d(i)),e.page>=Math.ceil(a.total_count/e.per_page)&&(this.finished=!0),this.searchList.page++,this.dataList.length<=0&&(this.dataShow=!1),t.next=25;break;case 22:t.prev=22,t.t0=t["catch"](7),this.finished=!0;case 25:case"end":return t.stop()}}),t,this,[[7,22]])})));function e(){return t.apply(this,arguments)}return e}(),cancelBtn:function(){this.searchList.startTime=null,this.searchList.endTime=null,this.onSearch(),this.$refs.item.toggle()},okBtn:function(){(this.searchList.startTime||this.searchList.endTime)&&this.onSearch(),this.$refs.item.toggle()},onChangeDate:function(t){var e=this.dataForm,r=this.searchList;"showEnd"==t?(r.startTime&&(e.minDate=new Date(l()(r.startTime))),setTimeout((function(){e.currentDate=r.endTime?new Date(l()(r.endTime)):new Date}),500)):"showStart"==t&&(e.minDate=new Date(2e3,0,1),setTimeout((function(){e.currentDate=r.startTime?new Date(l()(r.startTime)):new Date}),500)),e.status=!0,e.type=t},chioseDate:function(t){var e=this.dataForm;"showStart"==e.type?(this.searchList.startTime=l()(t).format("YYYY-MM-DD"),this.searchList.endTime&&l()(t).unix()>l()(this.searchList.endTime).unix()&&(this.searchList.endTime=null)):"showEnd"==e.type&&(this.searchList.endTime=l()(t).format("YYYY-MM-DD")),e.status=!1},formatter:function(t,e){return"year"===t?"".concat(e,"年"):"month"===t?"".concat(e,"月"):"day"==t?"".concat(e,"日"):e}},filters:{statusFilter:function(t){var e={1:"一般",2:"紧急",3:"非常紧急"};return e[t]}}},S=_,k=(r("61c1"),r("2877")),L=Object(k["a"])(S,n,o,!1,null,"3d829306",null);e["default"]=L.exports},cf5f:function(t,e,r){}}]);
|