12 |
- (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))})})}},"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 l})),a.d(t,"h",(function(){return o})),a.d(t,"g",(function(){return u})),a.d(t,"f",(function(){return c})),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}),l=e=>Object(s["a"])({method:"POST",url:"approveinfo/get_info",data:e}),o=e=>Object(s["a"])({method:"POST",url:"approveinfo/urging",data:e}),u=e=>Object(s["a"])({method:"POST",url:"approveinfo/cancel",data:e}),c=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 l}));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 l=(e,t="YYYY-MM-DD")=>n()(e).format(t)},"1f74":function(e,t,a){"use strict";a("483f")},"271a":function(e,t,a){"use strict";var s=a("cb2d"),n=a("e330"),i=a("577e"),r=a("d6d6"),l=URLSearchParams,o=l.prototype,u=n(o.getAll),c=n(o.has),d=new l("a=1");!d.has("a",2)&&d.has("a",void 0)||s(o,"has",(function(e){var t=arguments.length,a=t<2?void 0:arguments[1];if(t&&void 0===a)return c(this,e);var s=u(this,e);r(t,1);var n=i(a),l=0;while(l<s.length)if(s[l++]===n)return!0;return!1}),{enumerable:!0,unsafe:!0})},"34dd":function(e,t,a){"use strict";a("4990")},"483f":function(e,t,a){},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),l=a("1d0a"),o={name:"ChooseTime",computed:{dateShow(){return this.dateVal?Object(l["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}}},u=o,c=(a("5393"),a("2877")),d=Object(c["a"])(u,s,n,!1,null,"3293ec84",null);t["a"]=d.exports},4990:function(e,t,a){},"4e70":function(e,t,a){},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}}},l=r,o=(a("f3ae"),a("2877")),u=Object(o["a"])(l,s,n,!1,null,"6fd68a08",null);t["a"]=u.exports},5393:function(e,t,a){"use strict";a("4e70")},5494:function(e,t,a){"use strict";var s=a("83ab"),n=a("e330"),i=a("edd0"),r=URLSearchParams.prototype,l=n(r.forEach);s&&!("size"in r)&&i(r,"size",{get:function(){var e=0;return l(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",l="day",o="week",u="month",c="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])+"]"}},b=function(e,t,a){var s=String(e);return!s||s.length>=t?e:""+Array(t+1-s.length).join(a)+e},w={s:b,z:function(e){var t=-e.utcOffset(),a=Math.abs(t),s=Math.floor(a/60),n=a%60;return(t<=0?"+":"-")+b(s,2,"0")+":"+b(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,u),i=a-n<0,r=t.clone().add(s+(i?-1:1),u);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:u,y:d,w:o,d:l,D:f,h:r,m:i,s:n,ms:s,Q:c}[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 l=t.name;y[l]=t,n=l}return!s&&n&&(g=n),n||!s&&g},k=function(e,t){if(_(e))return e.clone();var a="object"==typeof t?t:{};return a.date=e,a.args=arguments,new O(a)},S=w;S.l=x,S.i=_,S.w=function(e,t){return k(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 b=v.prototype;return b.parse=function(e){this.$d=function(e){var t=e.date,a=e.utc;if(null===t)return new Date(NaN);if(S.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()},b.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()},b.$utils=function(){return S},b.isValid=function(){return!(this.$d.toString()===h)},b.isSame=function(e,t){var a=k(e);return this.startOf(t)<=a&&a<=this.endOf(t)},b.isAfter=function(e,t){return k(e)<this.startOf(t)},b.isBefore=function(e,t){return this.endOf(t)<k(e)},b.$g=function(e,t,a){return S.u(e)?this[t]:this.set(a,e)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(e,t){var a=this,s=!!S.u(t)||t,c=S.p(e),h=function(e,t){var n=S.w(a.$u?Date.UTC(a.$y,t,e):new Date(a.$y,t,e),a);return s?n:n.endOf(l)},p=function(e,t){return S.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,b=this.$D,w="set"+(this.$u?"UTC":"");switch(c){case d:return s?h(1,0):h(31,11);case u:return s?h(1,v):h(0,v+1);case o:var g=this.$locale().weekStart||0,y=(m<g?m+7:m)-g;return h(s?b-y:b+(6-y),v);case l:case f:return p(w+"Hours",0);case r:return p(w+"Minutes",1);case i:return p(w+"Seconds",2);case n:return p(w+"Milliseconds",3);default:return this.clone()}},b.endOf=function(e){return this.startOf(e,!1)},b.$set=function(e,t){var a,o=S.p(e),c="set"+(this.$u?"UTC":""),h=(a={},a[l]=c+"Date",a[f]=c+"Date",a[u]=c+"Month",a[d]=c+"FullYear",a[r]=c+"Hours",a[i]=c+"Minutes",a[n]=c+"Seconds",a[s]=c+"Milliseconds",a)[o],p=o===l?this.$D+(t-this.$W):t;if(o===u||o===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},b.set=function(e,t){return this.clone().$set(e,t)},b.get=function(e){return this[S.p(e)]()},b.add=function(s,c){var f,h=this;s=Number(s);var p=S.p(c),m=function(e){var t=k(h);return S.w(t.date(t.date()+Math.round(e*s)),h)};if(p===u)return this.set(u,this.$M+s);if(p===d)return this.set(d,this.$y+s);if(p===l)return m(1);if(p===o)return m(7);var v=(f={},f[i]=t,f[r]=a,f[n]=e,f)[p]||1,b=this.$d.getTime()+s*v;return S.w(b,this)},b.subtract=function(e,t){return this.add(-1*e,t)},b.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=S.z(this),i=this.$H,r=this.$m,l=this.$M,o=a.weekdays,u=a.months,c=a.meridiem,d=function(e,a,n,i){return e&&(e[a]||e(t,s))||n[a].slice(0,i)},f=function(e){return S.s(i%12||12,e,"0")},p=c||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 S.s(t.$y,4,"0");case"M":return l+1;case"MM":return S.s(l+1,2,"0");case"MMM":return d(a.monthsShort,l,u,3);case"MMMM":return d(u,l);case"D":return t.$D;case"DD":return S.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(a.weekdaysMin,t.$W,o,2);case"ddd":return d(a.weekdaysShort,t.$W,o,3);case"dddd":return o[t.$W];case"H":return String(i);case"HH":return S.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 S.s(r,2,"0");case"s":return String(t.$s);case"ss":return S.s(t.$s,2,"0");case"SSS":return S.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(s,f,h){var p,m=this,v=S.p(f),b=k(s),w=(b.utcOffset()-this.utcOffset())*t,g=this-b,y=function(){return S.m(m,b)};switch(v){case d:p=y()/12;break;case u:p=y();break;case c:p=y()/3;break;case o:p=(g-w)/6048e5;break;case l:p=(g-w)/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:S.a(p)},b.daysInMonth=function(){return this.endOf(u).$D},b.$locale=function(){return y[this.$L]},b.locale=function(e,t){if(!e)return this.$L;var a=this.clone(),s=x(e,t,!0);return s&&(a.$L=s),a},b.clone=function(){return S.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},v}(),C=O.prototype;return k.prototype=C,[["$ms",s],["$s",n],["$m",i],["$H",r],["$W",l],["$M",u],["$y",d],["$D",f]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,O,k),e.$i=!0),k},k.locale=x,k.isDayjs=_,k.unix=function(e){return k(1e3*e)},k.en=y[g],k.Ls=y,k.p={},k}))},"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"}}},l=r,o=(a("34dd"),a("2877")),u=Object(o["a"])(l,s,n,!1,null,"63f8111c",null);t["a"]=u.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,l=(a("fa3a"),a("2877")),o=Object(l["a"])(r,s,n,!1,null,"853cdbd0",null);t["a"]=o.exports},"88a7":function(e,t,a){"use strict";var s=a("cb2d"),n=a("e330"),i=a("577e"),r=a("d6d6"),l=URLSearchParams,o=l.prototype,u=n(o.append),c=n(o["delete"]),d=n(o.forEach),f=n([].push),h=new l("a=1&a=2&b=3");h["delete"]("a",1),h["delete"]("b",void 0),h+""!=="a=2"&&s(o,"delete",(function(e){var t=arguments.length,a=t<2?void 0:arguments[1];if(t&&void 0===a)return c(this,e);var s=[];d(this,(function(e,t){f(s,{key:t,value:e})})),r(t,1);var n,l=i(e),o=i(a),h=0,p=0,m=!1,v=s.length;while(h<v)n=s[h++],m||n.key===l?(m=!0,c(this,n.key)):p++;while(p<v)n=s[p++],n.key===l&&n.value===o||u(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(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")),l=a("ca00"),o=a("60fe"),u={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?[...o["k"],...o["h"],...o["g"],...o["j"]].map(e=>"."+e).join(","):o["j"].map(e=>"."+e).join(",")},headerTitle(){return this.isFs?"附件":"图片"},maxSizeComp(){let e=1048576;return this.isFs?o["a"]*e:o["c"]*e}},data(){return{excelSuffix:o["g"],wordSuffix:o["k"],pdfSuffix:o["h"],pictureSuffix:o["j"],toastInstance:null,filelist:[]}},mounted(){this.handleUpdateValues()},methods:{handleGetFileImgPath(e){let t="";if(e.type)t=e.type;else if(e.url){const{suffix:a}=Object(l["f"])(e.url);t=a}return o["j"].includes(t)?a("d960"):o["k"].includes(t)?a("a12e"):o["h"].includes(t)?a("fd06"):o["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{fullurl:s}=await Object(r["a"])(e.file);console.log("%c upload file url >>>","background: blue; color: #fff",s);const{suffix:n}=Object(l["f"])(s);e.name=e.file.name,e.type=n,e.url=s,e.size=Object(l["e"])(e.file.size),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?`文件超过${o["a"]}MB`:`图片超过${o["c"]}MB`;this.$toast(e)},handleReviewFiles(e){if(!e.type&&e.url){const{suffix:t}=Object(l["f"])(e.url);e.type=t}if(console.log(e),o["j"].includes(e.type))Object(i["a"])([e.url]);else if(e.type){let t="";o["h"].includes(e.type)?t="ReviewPdf":o["k"].includes(e.type)?t="ReviewDoc":o["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)}}}},c=u,d=(a("beec"),a("2877")),f=Object(d["a"])(c,s,n,!1,null,"567e2906",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"})},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")}}},l=r,o=(a("1f74"),a("2877")),u=Object(o["a"])(l,s,n,!1,null,"214ba8a8",null);t["a"]=u.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 l})),a.d(t,"d",(function(){return o})),a.d(t,"e",(function(){return u}));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"}),l=e=>Object(s["a"])({data:e,method:"POST",url:"approve/audit"}),o=()=>Object(s["a"])({method:"POST",url:"approve/get_count"}),u=e=>Object(s["a"])({data:e,method:"POST",url:"approve/feedback"})},b527:function(e,t,a){},b549:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var s=a("4360");const n=s["a"].getters["enum/getDegreeText"],i=s["a"].getters["enum/getapplyTypeText"],r=s["a"].getters["enum/getOfferTypeList"],l=s["a"].getters["enum/getLeaveTypeTypeList"];function o(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:l(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)}},b9ec:function(e,t,a){},beec:function(e,t,a){"use strict";a("b527")},ca00:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"d",(function(){return i})),a.d(t,"g",(function(){return r})),a.d(t,"f",(function(){return l})),a.d(t,"e",(function(){return o})),a.d(t,"a",(function(){return c})),a.d(t,"c",(function(){return d}));a("88a7"),a("271a"),a("5494");var s=a("60fe");function n(){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 i=e=>e>9?""+e:"0"+e,r=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);console.log(a);let s="unknow",n="unknow",i="",r="",l="";if(Array.isArray(a)&&a.length){const[,e,t,o,u,c]=a;s=o,n=c,i=t,r=u,l=e}return{filename:r,name:s,suffix:n,path:i,domainName:l,url:e}},o=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),c=u(s["i"]),d=e=>{const{name:t,suffix:a}=l(e);"pdf"===a?f(e,t):h(e,t)};function f(e,t){const a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=()=>{const e=window.URL.createObjectURL(a.response);h(e,t)},a.send()}function h(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)}},cfb8: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}},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("cfb8")},fa3a:function(e,t,a){"use strict";a("b9ec")}}]);
- //# sourceMappingURL=approve~index.d3078bca.js.map
|