dootask/public/js/build/index.f74aed09.js
2025-11-30 12:18:18 +08:00

2 lines
9.6 KiB
JavaScript
Vendored

import{n as i,m as d}from"./app.1c2a0fa1.js";var f=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("ETooltip",{attrs:{"open-delay":e.openDelay,disabled:e.$isEEUIApp||e.windowTouch||e.tooltipDisabled||e.isBot,placement:e.tooltipPlacement}},[e.user?t("div",{staticClass:"common-avatar-transfer",attrs:{slot:"content"},slot:"content"},[e._t("default"),t("p",[e._v(e._s(e.$L("\u6635\u79F0"))+": "+e._s(e.user.nickname)),e.user.delete_at?t("em",{staticClass:"deleted no-dark-content"},[e._v(e._s(e.$L("\u5DF2\u5220\u9664")))]):e.user.disable_at?t("em",{staticClass:"disabled no-dark-content"},[e._v(e._s(e.$L("\u5DF2\u79BB\u804C")))]):e._e()]),t("p",{staticClass:"department-name",attrs:{title:e.user.department_name||""}},[e._v(e._s(e.$L("\u90E8\u95E8"))+": "+e._s(e.user.department_name||"-"))]),t("p",[e._v(e._s(e.$L("\u804C\u4F4D/\u804C\u79F0"))+": "+e._s(e.user.profession||"-"))]),e.user.delete_at?t("p",[t("strong",[e._v(e._s(e.$L("\u5220\u9664\u65F6\u95F4"))+": "+e._s(e.$A.newDateString(e.user.delete_at,"YYYY-MM-DD HH:mm")))])]):e.user.disable_at?t("p",[t("strong",[e._v(e._s(e.$L("\u79BB\u804C\u65F6\u95F4"))+": "+e._s(e.$A.newDateString(e.user.disable_at,"YYYY-MM-DD HH:mm")))])]):e._e(),e._t("end")],2):e._e(),t("div",[t("UserAvatar",{ref:"avatar",attrs:{userid:e.userid,size:e.size,showIcon:e.showIcon,showName:e.showName,showStateDot:e.showStateDot,nameText:e.nameText,borderWidth:e.borderWidth,borderColor:e.borderColor,clickOpenDetail:e.clickOpenDetail,userResult:e.onUserResult}})],1)])},h=[];const p={name:"UserAvatarTip",mixins:[d],props:{tooltipDisabled:{type:Boolean,default:!1},tooltipPlacement:{type:String,default:"bottom"},openDelay:{type:Number,default:600}},data(){return{user:null}},mounted(){this.$listeners["update:online"]&&(this.$watch("userid",()=>{this.updateOnline()}),this.$watch("user.online",()=>{this.updateOnline()}),this.updateOnline())},computed:{isBot(){return!!(this.user&&this.user.bot)}},methods:{onUserResult(e){typeof this.userResult=="function"&&this.userResult(e),this.user=e},updateOnline(){if(!!this.user)if(this.user.online||this.$store.state.userId===this.userid)this.$emit("update:online",!0);else{const e=$A.daytz(),s=$A.dayjs(this.user.line_at),t=e.unix()-s.unix();let n="\u6700\u540E\u5728\u7EBF\u4E8E\u5F88\u4E45\u4EE5\u524D";if(t<60)n="\u6700\u540E\u5728\u7EBF\u4E8E\u521A\u521A";else if(t<3600)n=`\u6700\u540E\u5728\u7EBF\u4E8E ${Math.floor(t/60)} \u5206\u949F\u524D`;else if(t<3600*6)n=`\u6700\u540E\u5728\u7EBF\u4E8E ${Math.floor(t/3600)} \u5C0F\u65F6\u524D`;else{const m=e.format("YYYY-MM-DD"),a=s.format("YYYY-MM-DD"),r=s.format("HH:mm");m===a?n=`\u6700\u540E\u5728\u7EBF\u4E8E\u4ECA\u5929 ${r}`:e.clone().subtract(1,"day").format("YYYY-MM-DD")===a?n=`\u6700\u540E\u5728\u7EBF\u4E8E\u6628\u5929 ${r}`:t<3600*24*365&&(n=`\u6700\u540E\u5728\u7EBF\u4E8E ${a}`)}this.$emit("update:online",this.$L(n))}}}},l={};var _=i(p,f,h,!1,v,null,null,null);function v(e){for(let s in l)this[s]=l[s]}var O=function(){return _.exports}(),y=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"component-resize-line",class:[e.resizing?"resizing":"",e.placement],on:{mousedown:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"left",37,n.key,["Left","ArrowLeft"])||"button"in n&&n.button!==0?null:(n.stopPropagation(),n.preventDefault(),e.resizeDown.apply(null,arguments))}}})},z=[];const b={name:"ResizeLine",props:{value:{},min:{type:Number,default:100},max:{type:Number,default:600},placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},reverse:{type:Boolean,default:!1},beforeResize:Function},data(){return{resizing:!1,mouseX:0,mouseY:0,offset:{},tmpSize:void 0}},mounted(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)},methods:{resizeDown(e){if(!this.beforeResize){this.handleDown(e);return}const s=this.beforeResize();s&&s.then?s.then(t=>{this.handleDown(e)}):this.handleDown(e)},handleDown(e){this.mouseX=e.pageX||e.clientX+document.documentElement.scrollLeft,this.mouseY=e.pageY||e.clientY+document.documentElement.scrollTop,this.offset={left:e.target.offsetLeft,top:e.target.offsetTop},this.resizing=!0,typeof this.value=="number"&&(this.tmpSize=this.value),this.$emit("on-change",{event:"down"})},handleMove(e){if(!this.resizing)return;let s=(e.pageX||e.clientX+document.documentElement.scrollLeft)-this.mouseX,t=(e.pageY||e.clientY+document.documentElement.scrollTop)-this.mouseY;if(typeof this.tmpSize=="number"){let n;this.placement=="bottom"?n=this.reverse?this.tmpSize-t:this.tmpSize+t:n=this.reverse?this.tmpSize-s:this.tmpSize+s,this.min>0&&(n=Math.max(this.min,n)),this.max>0&&(n=Math.min(this.max,n)),this.$emit("input",n)}this.$emit("on-change",{event:"move",diff:{x:s,y:t},offset:this.offset})},handleUp(){!this.resizing||(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}},o={};var $=i(b,y,z,!1,w,null,null,null);function w(e){for(let s in o)this[s]=o[s]}var S=function(){return $.exports}(),g=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{ref:"body",staticClass:"overlay-body",style:e.bodyStyle},[t("div",{staticClass:"overlay-close",on:{click:function(n){return n.stopPropagation(),e.onClose.apply(null,arguments)}}},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26"}},[t("path",{attrs:{d:"M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z",fill:"currentColor"}})])]),e.resize?t("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:e.placement,min:e.minSize,max:0,reverse:!0,beforeResize:e.beforeResize},on:{"on-change":e.onChangeResize},model:{value:e.dynamicSize,callback:function(n){e.dynamicSize=n},expression:"dynamicSize"}}):e._e(),t("div",{staticClass:"overlay-content"},[t("div",{staticClass:"overlay-content-status"}),e.$slots.title||e.$slots.more?t("div",{staticClass:"overlay-content-header"},[t("div",{staticClass:"overlay-content-header-title"},[e._t("title")],2),t("div",{staticClass:"overlay-content-header-more"},[e._t("more")],2)]):e._e(),t("div",{staticClass:"overlay-content-body"},[e._t("default")],2),t("div",{staticClass:"overlay-content-navigation"})])],1)},C=[];const D={name:"DrawerOverlayView",components:{ResizeLine:S},props:{placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0}},data(){return{dynamicSize:0}},computed:{bodyStyle(){let e=this.dynamicSize;return e=e<=100?`${e}%`:`${e}px`,this.placement=="right"?{width:e,height:"100%"}:{width:"100%",height:e}}},watch:{size:{handler(e){this.dynamicSize=parseInt(e)},immediate:!0}},methods:{onClose(){this.$emit("on-close")},beforeResize(){return new Promise(e=>{this.dynamicSize<=100&&this.updateSize(),e()})},onChangeResize({event:e}){e==="up"&&this.updateSize()},updateSize(){this.placement==="bottom"?this.dynamicSize=this.$refs.body.clientHeight:this.dynamicSize=this.$refs.body.clientWidth}}},u={};var x=i(D,g,C,!1,Y,null,null,null);function Y(e){for(let s in u)this[s]=u[s]}var L=function(){return x.exports}(),M=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("Modal",{ref:"modal",attrs:{closable:e.escClosable,mask:e.finalMask,"mask-closable":e.maskClosable,"footer-hide":!0,fullscreen:!0,"class-name":e.finalClassName,"transition-names":e.finalTransitionNames,"before-close":e.beforeClose},model:{value:e.show,callback:function(n){e.show=n},expression:"show"}},[t("DrawerOverlayView",{attrs:{placement:e.finalPlacement,size:e.finalSize,minSize:e.finalMinSize,resize:e.finalResize},on:{"on-close":e.close},scopedSlots:e._u([e.$slots.title?{key:"title",fn:function(){return[e._t("title")]},proxy:!0}:null,e.$slots.more?{key:"more",fn:function(){return[e._t("more")]},proxy:!0}:null,{key:"default",fn:function(){return[e._t("default")]},proxy:!0}],null,!0)})],1)},k=[];const R={name:"DrawerOverlay",components:{DrawerOverlayView:L},props:{value:{type:Boolean,default:!1},mask:{default:null},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},fullscreen:{default:null},placement:{validator(e){return["right","bottom"].includes(e)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0},className:{type:String},beforeClose:Function},data(){return{show:this.value}},watch:{value(e){this.show=e},show(e){this.value!==e&&this.$emit("input",e)}},computed:{finalFullscreen(){return typeof this.fullscreen=="boolean"?this.fullscreen:this.windowWidth<768},finalMask(){return typeof this.mask=="boolean"?this.mask:!this.finalFullscreen},finalClassName(){const e=["common-drawer",`drawer-${this.finalPlacement}`];return this.finalFullscreen&&e.push("drawer-fullscreen"),this.className&&e.push(this.className),e.join(" ")},finalTransitionNames(){return[`drawer-animation-${this.finalPlacement}`,"drawer-animation-fade"]},finalPlacement(){return this.finalFullscreen?"bottom":this.placement},finalSize(){return this.finalFullscreen?"100%":this.size},finalMinSize(){return this.finalFullscreen?0:this.minSize},finalResize(){return this.finalFullscreen?!1:this.resize}},methods:{close(){this.$refs.modal.close()}}},c={};var N=i(R,M,k,!1,E,null,null,null);function E(e){for(let s in c)this[s]=c[s]}var T=function(){return N.exports}();export{T as D,S as R,O as U};