approve~index.ea572641.js 28 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["approve~index"],{"0e5c":function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));a("d9e2");const{uploadFile:s}=a("91b6");function n(e,t){return new Promise((a,n)=>{const i=new FormData;if(i.append("file",e),t)for(const e in t)i.append(e,t[e]);s(i).then(e=>{1===e.code&&a(e.data)}).catch(e=>{n(new Error(e.message))})})}},"0ff3":function(e,t,a){},"120e":function(e,t,a){"use strict";a.d(t,"e",(function(){return n})),a.d(t,"d",(function(){return i})),a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"h",(function(){return l})),a.d(t,"g",(function(){return c})),a.d(t,"f",(function(){return u})),a.d(t,"a",(function(){return d}));var s=a("b775");const n=e=>Object(s["a"])({method:"POST",url:"approveinfo/create",data:e}),i=e=>Object(s["a"])({method:"POST",url:"approveinfo/get_list",data:e}),r=e=>Object(s["a"])({method:"POST",url:"approveinfo/get_detail",data:e}),o=e=>Object(s["a"])({method:"POST",url:"approveinfo/get_info",data:e}),l=e=>Object(s["a"])({method:"POST",url:"approveinfo/urging",data:e}),c=e=>Object(s["a"])({method:"POST",url:"approveinfo/cancel",data:e}),u=e=>Object(s["a"])({method:"POST",url:"approveinfo/comment",data:e}),d=e=>Object(s["a"])({method:"POST",url:"approveinfo/download",data:e})},"1d0a":function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return o}));var s=a("5a0c"),n=a.n(s),i=a("ca00");function r(e,t){let a=new Date(e),s=a.getFullYear(),n=Object(i["d"])(a.getMonth()+1),r=Object(i["d"])(a.getDate());return t?`${s}${t}${n}${t}${r}`:`${s}年${n}月${r}日`}const o=(e,t="YYYY-MM-DD")=>n()(e).format(t)},"1f74":function(e,t,a){"use strict";a("a105")},"271a":function(e,t,a){"use strict";var s=a("cb2d"),n=a("e330"),i=a("577e"),r=a("d6d6"),o=URLSearchParams,l=o.prototype,c=n(l.getAll),u=n(l.has),d=new o("a=1");!d.has("a",2)&&d.has("a",void 0)||s(l,"has",(function(e){var t=arguments.length,a=t<2?void 0:arguments[1];if(t&&void 0===a)return u(this,e);var s=c(this,e);r(t,1);var n=i(a),o=0;while(o<s.length)if(s[o++]===n)return!0;return!1}),{enumerable:!0,unsafe:!0})},"2adcb":function(e,t,a){},"34dd":function(e,t,a){"use strict";a("b6d8")},4920:function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"choose-time-container"},[a("van-popup",{attrs:{position:"bottom"},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[a("div",{staticClass:"switch-data-box flex flex-row flex-row-aic"},[a("div",{staticClass:"left"},[a("span",{class:{active:0===e.swt},on:{click:function(){return e.swt=0}}},[e._v(e._s(e.dateShow))]),a("span",{class:{active:2===e.swt},on:{click:function(){return e.swt=2}}},[e._v("时间")])]),a("div",{staticClass:"right",on:{click:e.handleConfirmBtn}},[a("div",{staticClass:"btn"},[e._v("确认")])])]),a("van-calendar",{directives:[{name:"show",rawName:"v-show",value:0===e.swt,expression:"swt === 0"}],ref:"calendarRef",style:{height:"340px"},attrs:{poppable:!1,"show-confirm":!1,"show-title":!1,"show-subtitle":!1,"row-height":"50",color:"#3290c4","min-date":e.minDate,"max-date":e.maxDate,"default-date":e.dateVal},on:{confirm:e.handleConfirmDateVal}}),a("van-datetime-picker",{directives:[{name:"show",rawName:"v-show",value:2===e.swt,expression:"swt === 2"}],style:{height:"340px"},attrs:{value:e.timeVal,type:"time",title:"选择时间","min-hour":0,"max-hour":23,"show-toolbar":!1,"visible-item-count":"8"},on:{change:e.handleDateTimePickerChange}})],1)],1)},n=[],i=a("5a0c"),r=a.n(i),o=a("1d0a"),l={name:"ChooseTime",computed:{dateShow(){return this.dateVal?Object(o["b"])(this.dateVal):"日期"}},props:{value:{type:[String,Date]},ctype:{type:String,default:""},minDate:{type:Date,default:()=>{let e=new Date;return e.setHours(0,0,0),e}},maxDate:{type:Date,default:()=>{let e=new Date;return e.setMonth(e.getMonth()+7),e.setHours(23,59,59),e}}},data(){return{show:!1,swt:0,timeVal:"00:00",dateVal:new Date,callback:null}},methods:{openChooseTime(e){this.show=!0,e&&(this.callback=e)},reset(){this.swt=0,this.timeVal="00:00",this.dateVal=new Date},getTime(){let e=new Date(this.dateVal);const[t,a]=this.timeVal.split(":");return e.setHours(t),e.setMinutes(a),e},handleDateTimePickerChange(e){const[t,a]=e.getValues();this.timeVal=`${t}:${a}`},handleConfirmDateVal(e){this.dateVal=e},handleConfirmBtn(){this.show=!1;let e=new Date(this.dateVal);const[t,a]=this.timeVal.split(":");e.setHours(t),e.setMinutes(a),this.$listeners.input&&this.$emit("input",e),this.$listeners.confirm&&this.$emit("confirm",e),this.callback&&this.callback(e)}},watch:{value:{handler(e){if(e){let t=r()(e).format("YYYY-MM-DD"),a=r()(e).format("HH:mm");this.dateVal=new Date(t),this.timeVal=a}},immediate:!0}}},c=l,u=(a("5393"),a("0c7c")),d=Object(u["a"])(c,s,n,!1,null,"3293ec84",null);t["a"]=d.exports},5112:function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("layout",{attrs:{title:e.$attrs.title,required:e.$attrs.required}},[a("div",{staticClass:"custom-select-container flex flex-row flex-row-aic"},[a("div",{staticClass:"left",on:{click:function(){return e.show=!e.show}}},[e.selectVal?a("div",{staticClass:"value"},[e._v(e._s(e.selectVal))]):a("div",{staticClass:"default"},[e._v("请选择")])]),a("div",{staticClass:"right"},[e.selectVal?a("van-icon",{attrs:{size:20,color:"#A2A3A4",name:"clear"},on:{click:e.handleRemoveVal}}):e._e(),a("van-icon",{attrs:{color:"#A2A3A4",size:20,name:"arrow"},on:{click:function(){return e.show=!e.show}}})],1)]),a("van-popup",{attrs:{position:"bottom"},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[a("van-picker",{attrs:{title:"","show-toolbar":"",columns:e.columns,"value-key":e.pickerValueKey,"default-index":e.defaultIndex},on:{confirm:e.onConfirm,cancel:e.onCancel}})],1)],1)},n=[],i=a("87a7"),r={name:"CSelect",components:{Layout:i["a"]},props:{value:{type:[String,Number],default:""},list:{type:Array,default:()=>[]},pickerValueKey:{type:[String,Number],default:""},pickerValueId:{type:[String,Number],default:""}},computed:{defaultIndex(){let e=this.value;if(!e)return 0;let t=this.list.findIndex(t=>t[this.pickerValueId]==e);return t>=0?t:0}},data(){return{show:!1,selectVal:"",columns:[]}},methods:{handleRemoveVal(){this.selectVal="",this.$emit("input","")},onConfirm(e){this.selectVal=e[this.pickerValueKey],this.show=!1,console.log("???",e[this.pickerValueKey],e),this.$emit("input",e[this.pickerValueId])},onCancel(){this.show=!1,this.$listeners["cancel"]&&this.$emit("cancel")}},watch:{list:{handler(e){Array.isArray(e)&&e.length&&(this.columns=e)},immediate:!0},value:{handler(e){if(e){let t=this.list;if(Array.isArray(t)&&t.length){let t=this.list.findIndex(t=>t[this.pickerValueId]==e);t>=0&&(this.selectVal=this.list[t][this.pickerValueKey])}}},immediate:!0}}},o=r,l=(a("f3ae"),a("0c7c")),c=Object(l["a"])(o,s,n,!1,null,"6fd68a08",null);t["a"]=c.exports},5393:function(e,t,a){"use strict";a("d142")},5494:function(e,t,a){"use strict";var s=a("83ab"),n=a("e330"),i=a("edd0"),r=URLSearchParams.prototype,o=n(r.forEach);s&&!("size"in r)&&i(r,"size",{get:function(){var e=0;return o(this,(function(){e++})),e},configurable:!0,enumerable:!0})},"5a0c":function(e,t,a){!function(t,a){e.exports=a()}(0,(function(){"use strict";var e=1e3,t=6e4,a=36e5,s="millisecond",n="second",i="minute",r="hour",o="day",l="week",c="month",u="quarter",d="year",f="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}},w=function(e,t,a){var s=String(e);return!s||s.length>=t?e:""+Array(t+1-s.length).join(a)+e},b={s:w,z:function(e){var t=-e.utcOffset(),a=Math.abs(t),s=Math.floor(a/60),n=a%60;return(t<=0?"+":"-")+w(s,2,"0")+":"+w(n,2,"0")},m:function e(t,a){if(t.date()<a.date())return-e(a,t);var s=12*(a.year()-t.year())+(a.month()-t.month()),n=t.clone().add(s,c),i=a-n<0,r=t.clone().add(s+(i?-1:1),c);return+(-(s+(a-n)/(i?n-r:r-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:l,d:o,D:f,h:r,m:i,s:n,ms:s,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},g="en",y={};y[g]=v;var $="$isDayjsObject",_=function(e){return e instanceof O||!(!e||!e[$])},x=function e(t,a,s){var n;if(!t)return g;if("string"==typeof t){var i=t.toLowerCase();y[i]&&(n=i),a&&(y[i]=a,n=i);var r=t.split("-");if(!n&&r.length>1)return e(r[0])}else{var o=t.name;y[o]=t,n=o}return!s&&n&&(g=n),n||!s&&g},S=function(e,t){if(_(e))return e.clone();var a="object"==typeof t?t:{};return a.date=e,a.args=arguments,new O(a)},k=b;k.l=x,k.i=_,k.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function v(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[$]=!0}var w=v.prototype;return w.parse=function(e){this.$d=function(e){var t=e.date,a=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var s=t.match(p);if(s){var n=s[2]-1||0,i=(s[7]||"0").substring(0,3);return a?new Date(Date.UTC(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)):new Date(s[1],n,s[3]||1,s[4]||0,s[5]||0,s[6]||0,i)}}return new Date(t)}(e),this.init()},w.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},w.$utils=function(){return k},w.isValid=function(){return!(this.$d.toString()===h)},w.isSame=function(e,t){var a=S(e);return this.startOf(t)<=a&&a<=this.endOf(t)},w.isAfter=function(e,t){return S(e)<this.startOf(t)},w.isBefore=function(e,t){return this.endOf(t)<S(e)},w.$g=function(e,t,a){return k.u(e)?this[t]:this.set(a,e)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(e,t){var a=this,s=!!k.u(t)||t,u=k.p(e),h=function(e,t){var n=k.w(a.$u?Date.UTC(a.$y,t,e):new Date(a.$y,t,e),a);return s?n:n.endOf(o)},p=function(e,t){return k.w(a.toDate()[e].apply(a.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(t)),a)},m=this.$W,v=this.$M,w=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case d:return s?h(1,0):h(31,11);case c:return s?h(1,v):h(0,v+1);case l:var g=this.$locale().weekStart||0,y=(m<g?m+7:m)-g;return h(s?w-y:w+(6-y),v);case o:case f:return p(b+"Hours",0);case r:return p(b+"Minutes",1);case i:return p(b+"Seconds",2);case n:return p(b+"Milliseconds",3);default:return this.clone()}},w.endOf=function(e){return this.startOf(e,!1)},w.$set=function(e,t){var a,l=k.p(e),u="set"+(this.$u?"UTC":""),h=(a={},a[o]=u+"Date",a[f]=u+"Date",a[c]=u+"Month",a[d]=u+"FullYear",a[r]=u+"Hours",a[i]=u+"Minutes",a[n]=u+"Seconds",a[s]=u+"Milliseconds",a)[l],p=l===o?this.$D+(t-this.$W):t;if(l===c||l===d){var m=this.clone().set(f,1);m.$d[h](p),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},w.set=function(e,t){return this.clone().$set(e,t)},w.get=function(e){return this[k.p(e)]()},w.add=function(s,u){var f,h=this;s=Number(s);var p=k.p(u),m=function(e){var t=S(h);return k.w(t.date(t.date()+Math.round(e*s)),h)};if(p===c)return this.set(c,this.$M+s);if(p===d)return this.set(d,this.$y+s);if(p===o)return m(1);if(p===l)return m(7);var v=(f={},f[i]=t,f[r]=a,f[n]=e,f)[p]||1,w=this.$d.getTime()+s*v;return k.w(w,this)},w.subtract=function(e,t){return this.add(-1*e,t)},w.format=function(e){var t=this,a=this.$locale();if(!this.isValid())return a.invalidDate||h;var s=e||"YYYY-MM-DDTHH:mm:ssZ",n=k.z(this),i=this.$H,r=this.$m,o=this.$M,l=a.weekdays,c=a.months,u=a.meridiem,d=function(e,a,n,i){return e&&(e[a]||e(t,s))||n[a].slice(0,i)},f=function(e){return k.s(i%12||12,e,"0")},p=u||function(e,t,a){var s=e<12?"AM":"PM";return a?s.toLowerCase():s};return s.replace(m,(function(e,s){return s||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return k.s(t.$y,4,"0");case"M":return o+1;case"MM":return k.s(o+1,2,"0");case"MMM":return d(a.monthsShort,o,c,3);case"MMMM":return d(c,o);case"D":return t.$D;case"DD":return k.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(a.weekdaysMin,t.$W,l,2);case"ddd":return d(a.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(i);case"HH":return k.s(i,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return p(i,r,!0);case"A":return p(i,r,!1);case"m":return String(r);case"mm":return k.s(r,2,"0");case"s":return String(t.$s);case"ss":return k.s(t.$s,2,"0");case"SSS":return k.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")}))},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(s,f,h){var p,m=this,v=k.p(f),w=S(s),b=(w.utcOffset()-this.utcOffset())*t,g=this-w,y=function(){return k.m(m,w)};switch(v){case d:p=y()/12;break;case c:p=y();break;case u:p=y()/3;break;case l:p=(g-b)/6048e5;break;case o:p=(g-b)/864e5;break;case r:p=g/a;break;case i:p=g/t;break;case n:p=g/e;break;default:p=g}return h?p:k.a(p)},w.daysInMonth=function(){return this.endOf(c).$D},w.$locale=function(){return y[this.$L]},w.locale=function(e,t){if(!e)return this.$L;var a=this.clone(),s=x(e,t,!0);return s&&(a.$L=s),a},w.clone=function(){return k.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},v}(),C=O.prototype;return S.prototype=C,[["$ms",s],["$s",n],["$m",i],["$H",r],["$W",o],["$M",c],["$y",d],["$D",f]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,O,S),e.$i=!0),S},S.locale=x,S.isDayjs=_,S.unix=function(e){return S(1e3*e)},S.en=y[g],S.Ls=y,S.p={},S}))},"7fe3":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("layout",{attrs:{title:e.$attrs.title,required:e.$attrs.required}},[a("div",{staticClass:"custom-input-container flex flex-row flex-row-aic"},[a("van-field",{staticClass:"input-padding",attrs:{value:e.value,type:e.inputType,placeholder:e.$attrs.placeholder||"请输入",clearable:"",maxlength:e.$attrs.maxlength||void 0,"show-word-limit":"undefined"===typeof e.$attrs.showWordLimit||e.$attrs.showWordLimit,rows:"3",autosize:"",readonly:e.$attrs.readonly||!1,disabled:e.$attrs.disabled},on:{input:function(t){return e.$emit("input",t)},clear:function(){return e.$emit("input","")}}})],1)])},n=[],i=a("87a7"),r={name:"CInput",components:{Layout:i["a"]},props:{value:{type:String,default:""},inputType:{type:String,default:"text"}}},o=r,l=(a("34dd"),a("0c7c")),c=Object(l["a"])(o,s,n,!1,null,"63f8111c",null);t["a"]=c.exports},"87a7":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"layout-container"},[a("div",{staticClass:"layout__title"},[a("span",{staticClass:"title"},[e._v(e._s(e.title))]),e.required?a("span",{staticClass:"require"},[e._v("*")]):e._e()]),e._t("default")],2)},n=[],i={props:{title:{type:String,default:"默认文案"},required:{type:Boolean,default:!1}}},r=i,o=(a("fa3a"),a("0c7c")),l=Object(o["a"])(r,s,n,!1,null,"853cdbd0",null);t["a"]=l.exports},"88a7":function(e,t,a){"use strict";var s=a("cb2d"),n=a("e330"),i=a("577e"),r=a("d6d6"),o=URLSearchParams,l=o.prototype,c=n(l.append),u=n(l["delete"]),d=n(l.forEach),f=n([].push),h=new o("a=1&a=2&b=3");h["delete"]("a",1),h["delete"]("b",void 0),h+""!=="a=2"&&s(l,"delete",(function(e){var t=arguments.length,a=t<2?void 0:arguments[1];if(t&&void 0===a)return u(this,e);var s=[];d(this,(function(e,t){f(s,{key:t,value:e})})),r(t,1);var n,o=i(e),l=i(a),h=0,p=0,m=!1,v=s.length;while(h<v)n=s[h++],m||n.key===o?(m=!0,u(this,n.key)):p++;while(p<v)n=s[p++],n.key===o&&n.value===l||c(this,n.key,n.value)}),{enumerable:!0,unsafe:!0})},"88c3":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"custom-files-container"},[a("div",{class:["custom-files__header","flex","flex-row","flex-row-aic","flex-row-jcsp",e.filelist.length?"pb6":""]},[a("span",{staticClass:"title"},[e._v(e._s(e.headerTitle))]),a("van-icon",{attrs:{color:"#a2a3a4",size:20,name:"add-o"},on:{click:e.handleLaunchUploadBox}})],1),e.isFs?a("div",{staticClass:"source-listbox"},[a("ul",{staticClass:"files-container"},e._l(e.filelist,(function(t,s){return a("li",{key:s,staticClass:"files-row flex flex-row flex-row-aic"},[a("div",{staticClass:"icon"},[a("img",{attrs:{src:e.handleGetFileImgPath(t),alt:""}})]),a("div",{staticClass:"files-row__info"},[a("div",{staticClass:"files-name ellipsis"},[e._v(e._s(t.name))]),a("div",{staticClass:"files-other-info flex flex-row flex-row-aic"},[a("div",{staticClass:"files-other-info__div flex flex-row"},[a("div",{directives:[{name:"show",rawName:"v-show",value:t.size,expression:"file.size"}],staticClass:"size"},[e._v(e._s(e.getByteShowSize(t.size)))]),a("div",{staticClass:"review",on:{click:function(a){return e.handleReviewFiles(t)}}},[e._v("预览")])]),a("van-icon",{attrs:{size:20,color:"#A2A3A4",name:"clear"},on:{click:function(a){return e.handleRemoveFile(t,s)}}})],1)])])})),0)]):e._e(),a("van-uploader",{directives:[{name:"show",rawName:"v-show",value:e.filelist.length&&!e.isFs,expression:"filelist.length && !isFs"}],ref:"uploadFileRef",attrs:{"preview-size":"48px","max-count":e.$attrs.maxCount,"max-size":e.maxSizeComp,"show-upload":!1,accept:e.acceptHandle,multiple:!1,"preview-image":!e.isFs,"before-read":e.beforeRead,"after-read":e.afterRead},on:{oversize:e.onOversize},model:{value:e.filelist,callback:function(t){e.filelist=t},expression:"filelist"}})],1)},n=[],i=(a("4662"),a("28a2")),r=(a("14d9"),a("0e5c")),o=a("ca00"),l=a("60fe"),c={name:"CFiles",props:{value:{type:Array},ctype:{validator:e=>["files","images"].includes(e),default:"files"}},computed:{isFs(){return"files"===this.ctype},acceptHandle(){return this.isFs?[...l["k"],...l["h"],...l["g"],...l["j"]].map(e=>"."+e).join(","):l["j"].map(e=>"."+e).join(",")},headerTitle(){return this.isFs?"附件":"图片"},maxSizeComp(){let e=1048576;return this.isFs?l["a"]*e:l["c"]*e}},data(){return{excelSuffix:l["g"],wordSuffix:l["k"],pdfSuffix:l["h"],pictureSuffix:l["j"],toastInstance:null,filelist:[]}},mounted(){this.handleUpdateValues()},methods:{getByteShowSize:o["e"],handleGetFileImgPath(e){let t="";if(e.type)t=e.type;else if(e.url){const{suffix:a}=Object(o["f"])(e.url);t=a}return l["j"].includes(t)?a("d960"):l["k"].includes(t)?a("a12e"):l["h"].includes(t)?a("fd06"):l["g"].includes(t)?a("4e32"):""},handleUpdateValues(){const e=this.value;Array.isArray(e)&&e.length&&(this.filelist=[...e])},handleLaunchUploadBox(){this.$refs.uploadFileRef.chooseFile()},beforeRead(e){return Array.isArray(e)&&e.length&&(e=e[0]),this.toastInstance=this.$toast.loading({duration:0,message:"上传中"}),e.size<=0?(this.$toast("上传文件,文件尚未编辑!"),!1):(console.log("%c beforeRead >>>","background: blue; color: #fff",e),!0)},async afterRead(e,t){try{let a=1;Array.isArray(e)&&e.length&&(a=e.length,e=e[0]),this.filelist.splice(t.index,a),console.log("afterRead",e,t);const s=await Object(r["a"])(e.file),{fullurl:n,name:i,size:l}=s,{suffix:c}=Object(o["f"])(n);e.name=i,e.type=c,e.url=n,e.size=l,e.status="done",this.filelist.push(e),this.$forceUpdate(),this.toastInstance.clear()}catch(a){e.status="failed",e.message=a.message,this.filelist.splice(t.index,1),this.toastInstance.clear(),this.$toast(a.message)}},onOversize(){let e=this.isFs?`文件超过${l["a"]}MB`:`图片超过${l["c"]}MB`;this.$toast(e)},handleReviewFiles(e){if(!e.type&&e.url){const{suffix:t}=Object(o["f"])(e.url);e.type=t}if(console.log(e),l["j"].includes(e.type))Object(i["a"])([e.url]);else if(e.type){let t="";l["h"].includes(e.type)?t="ReviewPdf":l["k"].includes(e.type)?t="ReviewDoc":l["g"].includes(e.type)&&(t="ReviewExcel"),this.$router.push({name:t,params:{src:e.url}})}},handleRemoveFile(e,t){this.filelist.splice(t,1)}},watch:{filelist:{handler(e){let t=e.some(e=>e.content);t&&this.$listeners["input"]&&this.$emit("input",e)}}}},u=c,d=(a("eab2"),a("0c7c")),f=Object(d["a"])(u,s,n,!1,null,"1a7daddf",null);t["a"]=f.exports},"91b6":function(e,t,a){"use strict";a.r(t),a.d(t,"getUploadOssParams",(function(){return n})),a.d(t,"uploadFile",(function(){return i}));var s=a("b775");const n=e=>Object(s["a"])({params:e,url:"upload/getSignedUrl"}),i=e=>Object(s["a"])({data:e,method:"POST",url:"upload/upload"})},a105:function(e,t,a){},aa58:function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"approve-item-container",on:{click:e.handleGoDetail}},[a("div",{staticClass:"approve-item__header flex flex-row"},[a("div",{staticClass:"title ellipsis flex-0shrink"},[e._v(e._s(e.title))]),a("div",{staticClass:"time"},[e._v(e._s(e.time))])]),a("div",{staticClass:"approve-item__main"},[a("render-dom",{attrs:{vnode:e.rowsRender}})],1),a("div",{staticClass:"approve-item__status-bar"},[e.showLRBox?a("div",{staticClass:"wait flex flex-row flex-row-acc"},[a("div",{staticClass:"personal"},[e._v(e._s(e.waitPersonalComp))]),a("div",{class:["status",e.statusOtherClass]},[e._v(e._s(e.waitStatusComp))])]):e.showLbox?a("div",{staticClass:"approved"},[a("div",{class:["status",e.statusOtherClass]},[e._v(e._s(e.approvedStatusComp))])]):e._e()])])},n=[];let i=null;var r={name:"ApproveItem",computed:{showLRBox(){let e=this.flag,t=Number(this.flagState);return"approve"===e&&[1,2].includes(t)||"info"===e&&[2].includes(t)},statusOtherClass(){let e=Number(this.flagState),t="";switch(e){case 3:t="status--pass";break;case 4:t="status--refuse";break;case 5:t="status--refuse";break}return t},showLbox(){let e=this.flag,t=Number(this.flagState);return console.log("showLbox",e,t),"approve"===e&&[3,4].includes(t)||"info"===e&&[3,4,5].includes(t)},rowsRender(){return i("ul",{class:["flex","flex-col"]},this.rows.map(e=>i("li",{class:["row","flex","flex-row"]},[i("div",{class:["row__title","flex-0shrink"]},e.label+":"),i("div",{class:["row__content","ellipsis-2rows"]},e.val)])))},waitPersonalComp(){let e=this.flag,t=this.flagState,a="",s=this.person;return s?("approve"===e||"info"===e&&2===t?a=s+"处理中":"info"===e&&4===t&&(a=s+"已处理"),a):""},waitStatusComp(){let e=Number(this.flagState);return 4===e?"已驳回":"处理中"},approvedStatusComp(){let e=Number(this.flagState),t="";switch(e){case 3:t="已通过";break;case 4:t="已驳回";break;case 5:t="已撤销";break}return t}},props:{approveType:{type:String,required:!0},title:{type:String},time:{type:String},rows:{type:Array,default:()=>[]},flag:{validator:e=>["info","approve"].includes(e)},flagState:{validator:e=>[1,2,3,4,5].includes(e)},person:{type:String}},created(){i=this.$createElement},methods:{handleGoDetail(){this.$listeners.click&&this.$emit("click")}}},o=r,l=(a("1f74"),a("0c7c")),c=Object(l["a"])(o,s,n,!1,null,"214ba8a8",null);t["a"]=c.exports},b429:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return r})),a.d(t,"f",(function(){return o})),a.d(t,"d",(function(){return l})),a.d(t,"e",(function(){return c}));var s=a("b775");const n=e=>Object(s["a"])({data:e,method:"POST",url:"approve/get_list"}),i=e=>Object(s["a"])({data:e,method:"POST",url:"approve/get_detail"}),r=e=>Object(s["a"])({data:e,method:"POST",url:"approve/get_info"}),o=e=>Object(s["a"])({data:e,method:"POST",url:"approve/audit"}),l=()=>Object(s["a"])({method:"POST",url:"approve/get_count"}),c=e=>Object(s["a"])({data:e,method:"POST",url:"approve/feedback"})},b549:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var s=a("4360");const n=s["a"].getters["enum/getDegreeText"],i=s["a"].getters["enum/getapplyTypeText"],r=s["a"].getters["enum/getOfferTypeList"],o=s["a"].getters["enum/getLeaveTypeTypeList"];function l(e,t){"number"!==typeof t&&(t=Number(t));let a=[];switch(t){case 1:a=[{label:"申请事由",val:e.reason},{label:"申购类型",val:i(e.type)},1==e.type&&Array.isArray(e.apply_goods)?{label:"申购商品",val:e.apply_goods.length>3?e.apply_goods.map(e=>e.goods_name).slice(0,4).join(",")+"等商品":e.apply_goods.map(e=>e.goods_name).join(",")}:void 0];break;case 2:a=[{label:"申请标题",val:e.reason},{label:"呈批类型",val:r(e.type)},{label:"缓急程度",val:n(e.desc)}];break;case 3:a=[Array.isArray(e.stock_goods)?{label:"物品名称",val:e.stock_goods.length>3?e.stock_goods.map(e=>e.goods_name).slice(0,3).join(",")+"等商品":e.stock_goods.map(e=>e.goods_name).join(",")}:void 0];break;case 4:a=[Array.isArray(e.use_goods)?{label:"物品名称",val:e.use_goods.length>3?e.use_goods.map(e=>e.goods_name).slice(0,3).join(",")+"等商品":e.use_goods.map(e=>e.goods_name).join(",")}:void 0,{label:"物品用途",val:e.reason}];break;case 5:a=[{label:"发起事由",val:e.reason},{label:"同行人员",val:Array.isArray(e.peer_user)&&e.peer_user.length?e.peer_user.map(e=>e.name).join("、"):"暂无同行人员"},{label:"出差时间",val:`${e.start_time} — ${e.end_time}`}];break;case 6:a=[{label:"请假类型",val:o(e.type)},{label:"开始时间",val:""+e.start_time},{label:"结束时间",val:""+e.end_time}];break;case 7:a=[{label:"用车地点",val:e.reason},{label:"出发时间",val:e.start_time},{label:"返回时间",val:e.end_time}];break;case 8:a=[{label:"维修地点",val:e.reason},{label:"具体内容",val:e.desc}];break;case 9:a=[{label:"合同编号",val:e.reason},{label:"拟稿日期",val:e.apply_date},{label:"缓急程度",val:n(e.desc)}];break;case 10:a=[{label:"来文单位",val:e.reason},{label:"文件名称",val:e.desc}];break;case 11:a=[{label:"文件名称",val:e.reason},{label:"拟发文时间",val:e.start_time},{label:"缓急程度",val:n(e.desc)}];break}return a.filter(e=>e)}},b6d8:function(e,t,a){},ca00:function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"d",(function(){return r})),a.d(t,"g",(function(){return o})),a.d(t,"f",(function(){return l})),a.d(t,"e",(function(){return c})),a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return f}));a("88a7"),a("271a"),a("5494");var s=a("60fe"),n=a("3842");function i(){let e=navigator.userAgent,t=e.indexOf("Android")>-1||e.indexOf("Adr")>-1,a=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return t?"android":a?"iOS":"unknow"}const r=e=>e>9?""+e:"0"+e,o=e=>Object.prototype.toString.call(e,e).split(" ")[1].slice(0,-1),l=e=>{let t=/^(http[s]?:\/\/.*\.com)(.*?)(([\u4e00-\u9fa5\-\w\d\s.]*?)\.(\w*))$/i,a=e.match(t),s="unknow",n="unknow",i="",r="",o="";if(Array.isArray(a)&&a.length){const[,e,t,l,c,u]=a;s=l,n=u,i=t,r=c,o=e}return{filename:r,name:s,suffix:n,path:i,domainName:o,url:e}},c=e=>{if(!e)return"";var t=1024;return e<t?e+"B":e<Math.pow(t,2)?(e/t).toFixed(2)+"KB":e<Math.pow(t,3)?(e/Math.pow(t,2)).toFixed(2)+"MB":e<Math.pow(t,4)?(e/Math.pow(t,3)).toFixed(2)+"G":(e/Math.pow(t,4)).toFixed(2)+"T"},u=e=>t=>e.test(t),d=u(s["i"]),f=e=>{const{name:t,suffix:a}=l(e);"pdf"===a?(console.log("%c platform : >>>","background: blue; color: #fff",n["d"]),"android"===n["d"]?h(e):"ios"===n["d"]?window.location.href=e:p(e,t)):m(e,t)};function h(e){window.open(e)}function p(e,t){const a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=()=>{const e=window.URL.createObjectURL(a.response);m(e,t),window.URL.revokeObjectURL(a.response)},a.send()}function m(e,t){var a=document.createElement("a");a.download=t,a.style.display="none",a.href=e,document.body.appendChild(a),a.click(),document.body.removeChild(a)}},d142:function(e,t,a){},d6d6:function(e,t,a){"use strict";var s=TypeError;e.exports=function(e,t){if(e<t)throw new s("Not enough arguments");return e}},eab2:function(e,t,a){"use strict";a("0ff3")},edd0:function(e,t,a){"use strict";var s=a("13d2"),n=a("9bf2");e.exports=function(e,t,a){return a.get&&s(a.get,t,{getter:!0}),a.set&&s(a.set,t,{setter:!0}),n.f(e,t,a)}},f3ae:function(e,t,a){"use strict";a("2adcb")},fa3a:function(e,t,a){"use strict";a("fd05")},fd05:function(e,t,a){}}]);
  2. //# sourceMappingURL=approve~index.ea572641.js.map