mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-02 06:54:19 +00:00
1 line
75 KiB
JavaScript
Vendored
1 line
75 KiB
JavaScript
Vendored
"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[498],{92307:(t,e,a)=>{a.d(e,{Z:()=>o});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,'.component-resize-line[data-v-5a37a7e8]{cursor:col-resize}@media (max-width:768px){.component-resize-line[data-v-5a37a7e8]{display:none}}.component-resize-line.resizing[data-v-5a37a7e8]:after{bottom:0;content:"";cursor:col-resize;left:0;position:fixed;right:0;top:0;z-index:99999}.component-resize-line.bottom[data-v-5a37a7e8],.component-resize-line.bottom[data-v-5a37a7e8]:after{cursor:row-resize}',""]);const o=s},25316:(t,e,a)=>{a.d(e,{Z:()=>o});var n=a(1519),s=a.n(n)()((function(t){return t[1]}));s.push([t.id,".checkin-export-quick-select{align-items:center;display:flex}.checkin-export-quick-select>em{color:#2b85e4;cursor:pointer;font-style:normal;margin-left:8px}.checkin-export-quick-select>em:hover{text-decoration:underline}",""]);const o=s},81034:(t,e,a)=>{a.d(e,{Z:()=>u});const n={name:"ResizeLine",props:{value:{},min:{type:Number,default:100},max:{type:Number,default:600},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},reverse:{type:Boolean,default:!1},beforeResize:Function},data:function(){return{resizing:!1,mouseX:0,mouseY:0,offset:{},tmpSize:void 0}},mounted:function(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)},methods:{resizeDown:function(t){var e=this;if(this.beforeResize){var a=this.beforeResize();a&&a.then?a.then((function(a){e.handleDown(t)})):this.handleDown(t)}else this.handleDown(t)},handleDown:function(t){this.mouseX=t.pageX||t.clientX+document.documentElement.scrollLeft,this.mouseY=t.pageY||t.clientY+document.documentElement.scrollTop,this.offset={left:t.target.offsetLeft,top:t.target.offsetTop},this.resizing=!0,"number"==typeof this.value&&(this.tmpSize=this.value),this.$emit("on-change",{event:"down"})},handleMove:function(t){if(this.resizing){var e,a=(t.pageX||t.clientX+document.documentElement.scrollLeft)-this.mouseX,n=(t.pageY||t.clientY+document.documentElement.scrollTop)-this.mouseY;if("number"==typeof this.tmpSize)e="bottom"==this.placement?this.reverse?this.tmpSize-n:this.tmpSize+n:this.reverse?this.tmpSize-a:this.tmpSize+a,this.min>0&&(e=Math.max(this.min,e)),this.max>0&&(e=Math.min(this.max,e)),this.$emit("input",e);this.$emit("on-change",{event:"move",diff:{x:a,y:n},offset:this.offset})}},handleUp:function(){this.resizing&&(this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"}))}}};var s=a(93379),o=a.n(s),i=a(92307),r={insert:"head",singleton:!1};o()(i.Z,r);i.Z.locals;var l=a(51900);const c={name:"DrawerOverlayView",components:{ResizeLine:(0,l.Z)(n,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"component-resize-line",class:[t.resizing?"resizing":"",t.placement],on:{mousedown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.stopPropagation(),e.preventDefault(),t.resizeDown.apply(null,arguments))}}})}),[],!1,null,"5a37a7e8",null).exports},props:{placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0}},data:function(){return{dynamicSize:0}},computed:{bodyStyle:function(){var t=this.dynamicSize;return t="".concat(t,t<=100?"%":"px"),"right"==this.placement?{width:t,height:"100%"}:{width:"100%",height:t}}},watch:{size:{handler:function(t){this.dynamicSize=parseInt(t)},immediate:!0}},methods:{onClose:function(){this.$emit("on-close")},beforeResize:function(){var t=this;return new Promise((function(e){t.dynamicSize<=100&&t.updateSize(),e()}))},onChangeResize:function(t){"up"===t.event&&this.updateSize()},updateSize:function(){"bottom"===this.placement?this.dynamicSize=this.$refs.body.clientHeight:this.dynamicSize=this.$refs.body.clientWidth}}};const m={name:"DrawerOverlay",components:{DrawerOverlayView:(0,l.Z)(c,(function(){var t=this,e=t._self._c;return e("div",{ref:"body",staticClass:"overlay-body",style:t.bodyStyle},[e("div",{staticClass:"overlay-close"},[e("a",{attrs:{href:"javascript:void(0)"},on:{click:function(e){return e.stopPropagation(),t.onClose.apply(null,arguments)}}},[e("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[e("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"}})])])]),t._v(" "),t.resize?e("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:t.placement,min:t.minSize,max:0,reverse:!0,beforeResize:t.beforeResize},on:{"on-change":t.onChangeResize},model:{value:t.dynamicSize,callback:function(e){t.dynamicSize=e},expression:"dynamicSize"}}):t._e(),t._v(" "),e("div",{staticClass:"overlay-content"},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},props:{value:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},size:{type:[Number,String],default:"100%"},minSize:{type:Number,default:300},resize:{type:Boolean,default:!0},className:{type:String},beforeClose:Function},data:function(){return{show:this.value}},watch:{value:function(t){this.show=t},show:function(t){this.value!==t&&this.$emit("input",t)}},computed:{modalClass:function(){return this.className?"common-drawer-overlay ".concat(this.className," ").concat(this.placement):"common-drawer-overlay ".concat(this.placement)}},methods:{onClose:function(){this.$refs.modal.close()}}};const u=(0,l.Z)(m,(function(){var t=this,e=t._self._c;return e("Modal",{ref:"modal",attrs:{closable:t.escClosable,"mask-closable":t.maskClosable,"footer-hide":!0,"transition-names":[t.$A.isAndroid()?"":"drawer-slide-".concat(t.placement),""],beforeClose:t.beforeClose,fullscreen:"","class-name":t.modalClass},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("DrawerOverlayView",{attrs:{placement:t.placement,size:t.size,minSize:t.minSize,resize:t.resize},on:{"on-close":t.onClose}},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},54129:(t,e,a)=>{a.d(e,{Z:()=>o});var n=a(80641);const s={name:"UserInput",props:{value:{type:[String,Number,Array],default:""},uncancelable:{type:Array,default:function(){return[]}},disabledChoice:{type:Array,default:function(){return[]}},placeholder:{default:""},size:{default:"default"},transfer:{type:Boolean,default:!0},multipleMax:{type:Number},maxHiddenInput:{type:Boolean,default:!0},maxHiddenSelect:{type:Boolean,default:!1},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0},dialogId:{type:Number,default:0},showBot:{type:Boolean,default:!1}},data:function(){return{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=n.Store.subscribe("cacheUserActive",(function(e){var a=t.list.findIndex((function(t){return t.userid==e.userid}));a>-1&&(t.$set(t.list,a,Object.assign({},t.list[a],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,a=this.selects;return t&&e&&a.length>=t?"hidden-input":""}},watch:{value:{handler:function(){var t=this,e=this._tmpId=$A.randomString(6);setTimeout((function(){e===t._tmpId&&t.valueChange()}),10)},immediate:!0},selects:function(t){this.$emit("input",t),this.maxHiddenSelect&&t.length>=this.maxHiddenSelect&&this.$refs.select&&this.$refs.select.hideMenu()}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var a=this.searchHistory.find((function(e){return e.key==t}));a&&(this.list=a.data),a||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId,dialog_id:e.dialogId,bot:e.showBot?2:0},take:50}}).then((function(a){var n=a.data;e.list=n;var s=e.searchHistory.findIndex((function(e){return e.key==t})),o={key:t,data:n,time:$A.Time()};s>-1?e.searchHistory.splice(s,1,o):e.searchHistory.push(o)})).catch((function(t){var a=t.msg;e.list=[],$A.messageWarning(a)})).finally((function(t){a||e.loadIng--})):a||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var a=t.list.find((function(t){return t.userid==e.value}));a&&(t.$set(e,"label",a.nickname),t.$set(e,"avatar",a.userimg))}))}}),100)}}};const o=(0,a(51900).Z)(s,(function(){var t=this,e=t._self._c;return e("div",{class:["common-user",t.maxHiddenClass]},[e("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[t.multipleMax?e("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择"+t.multipleMax+"个")))]):t._e(),t._v(" "),t._t("option-prepend"),t._v(" "),t._l(t.list,(function(a,n){return e("Option",{key:n,attrs:{value:a.userid,"key-value":a.email,label:a.nickname,avatar:a.userimg,disabled:t.isDisabled(a.userid)}},[e("div",{staticClass:"user-input-option"},[e("div",{staticClass:"user-input-avatar"},[e("EAvatar",{staticClass:"avatar",attrs:{src:a.userimg}})],1),t._v(" "),a.bot?e("div",{staticClass:"taskfont user-input-bot"},[t._v("")]):t._e(),t._v(" "),e("div",{staticClass:"user-input-nickname"},[t._v(t._s(a.nickname))]),t._v(" "),e("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(a.userid))])])])}))],2),t._v(" "),t.loadIng>0?e("div",{staticClass:"common-user-loading"},[e("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},86422:(t,e,a)=>{a.d(e,{Z:()=>l});const n={name:"CheckinExport",components:{UserInput:a(54129).Z},props:{value:{type:Boolean,default:!1}},data:function(){return{show:this.value,loadIng:0,formData:{userid:[],date:[],time:[]}}},watch:{value:function(t){this.show=t},show:function(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts:function(t){var e=function(t){return $A.Date($A.formatDate("Y-m-d 23:59:29",Math.round(t/1e3)))};return"prev"===t?[$A.getData("上个月",!0),e($A.getData("上个月结束",!0))]:"this"===t?[$A.getData("本月",!0),e($A.getData("本月结束",!0))]:void 0},onExport:function(){var t=this;this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"system/checkin/export",data:this.formData}).then((function(e){var a=e.data;t.show=!1,t.$store.dispatch("downUrl",{url:a.url})})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.loadIng--})))}}};var s=a(93379),o=a.n(s),i=a(25316),r={insert:"head",singleton:!1};o()(i.Z,r);i.Z.locals;const l=(0,a(51900).Z)(n,(function(){var t=this,e=t._self._c;return e("Modal",{attrs:{title:t.$L("导出签到数据"),"mask-closable":!1},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("Form",{ref:"export",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("导出成员")}},[e("UserInput",{attrs:{"multiple-max":20,placeholder:t.$L("请选择成员")},model:{value:t.formData.userid,callback:function(e){t.$set(t.formData,"userid",e)},expression:"formData.userid"}}),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("每次最多选择导出20个成员")))])],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("签到日期")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("请选择签到日期")},model:{value:t.formData.date,callback:function(e){t.$set(t.formData,"date",e)},expression:"formData.date"}}),t._v(" "),e("div",{staticClass:"form-tip checkin-export-quick-select"},[t._v("\n "+t._s(t.$L("快捷选择"))+":\n "),e("em",{on:{click:function(e){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("上个月")))]),t._v(" "),e("em",{on:{click:function(e){t.formData.date=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("这个月")))])])],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("班次时间")}},[e("TimePicker",{staticStyle:{width:"100%"},attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("请选择班次时间")},model:{value:t.formData.time,callback:function(e){t.$set(t.formData,"time",e)},expression:"formData.time"}}),t._v(" "),e("div",{staticClass:"form-tip checkin-export-quick-select"},[t._v("\n "+t._s(t.$L("快捷选择"))+":\n "),e("em",{on:{click:function(e){t.formData.time=["8:30","18:00"]}}},[t._v("8:30-18:00")]),t._v(" "),e("em",{on:{click:function(e){t.formData.time=["9:00","18:00"]}}},[t._v("9:00-18:00")]),t._v(" "),e("em",{on:{click:function(e){t.formData.time=["9:30","18:00"]}}},[t._v("9:30-18:30")])])],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.show=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("导出")))])],1)],1)}),[],!1,null,null,null).exports},51572:(t,e,a)=>{a.d(e,{Z:()=>s});const n={name:"TeamManagement",components:{UserInput:a(54129).Z},props:{checkinMac:{type:Boolean,default:!1}},data:function(){var t=this;return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"userid",width:80,render:function(t,e){var a=e.row;return t("TableAction",{props:{column:e.column,align:"left"}},[t("div",a.userid)])}},{title:this.$L("邮箱"),key:"email",minWidth:100,render:function(e,a){var n=a.row,s=[e("AutoTip",n.email)],o=n.email_verity,i=n.identity,r=n.disable_at;return o&&s.push(e("Icon",{props:{type:"md-mail"}})),i.includes("admin")&&s.push(e("Tag",{props:{color:"warning"}},t.$L("管理员"))),i.includes("disable")&&s.push(e("Tooltip",{props:{content:t.$L("离职时间")+": "+r}},[e("Tag",{props:{color:"error"}},t.$L("离职"))])),e("div",{class:"team-email"},s)}},{title:this.$L("电话"),key:"tel",minWidth:80,render:function(e,a){var n=a.row;return e("QuickEdit",{props:{value:n.tel},on:{"on-update":function(e,a){t.operationUser({userid:n.userid,tel:e},!0).finally(a)}}},[e("AutoTip",n.tel||"-")])}},{title:this.$L("昵称"),key:"nickname",minWidth:80,render:function(e,a){var n=a.row;return e("QuickEdit",{props:{value:n.nickname_original},on:{"on-update":function(e,a){t.operationUser({userid:n.userid,nickname:e},!0).finally(a)}}},[e("AutoTip",n.nickname_original||"-")])}},{title:this.$L("职位/职称"),key:"profession",minWidth:80,render:function(e,a){var n=a.row;return e("QuickEdit",{props:{value:n.profession},on:{"on-update":function(e,a){t.operationUser({userid:n.userid,profession:e},!0).finally(a)}}},[e("AutoTip",n.profession||"-")])}},{title:this.$L("部门"),key:"department",minWidth:80,render:function(e,a){var n=a.row,s=[];if(n.department.some((function(e){var a=t.departmentList.find((function(t){return t.id==e}));a&&s.push(a.name)})),0===s.length)return e("div",t.$L("默认部门"));var o=[];return o.push(e("span",{domProps:{title:s[0]}},s[0])),s.length>1&&(s=s.splice(1),o.push(e("ETooltip",[e("div",{slot:"content",domProps:{innerHTML:s.join("<br/>")}}),e("div",{class:"department-tag-num"}," +".concat(s.length))]))),e("div",{class:"team-table-department-warp"},o)}},{title:this.$L("最后在线"),key:"line_at",width:168},{title:this.$L("操作"),align:"center",width:100,render:function(e,a){var n=a.row.identity,s=[];n.includes("admin")?s.push(e("EDropdownItem",{props:{command:"clearadmin"}},[e("div",t.$L("取消管理员"))])):s.push(e("EDropdownItem",{props:{command:"setadmin"}},[e("div",t.$L("设为管理员"))])),s.push(e("EDropdownItem",{props:{command:"email"}},[e("div",t.$L("修改邮箱"))])),s.push(e("EDropdownItem",{props:{command:"password"}},[e("div",t.$L("修改密码"))])),t.checkinMac&&s.push(e("EDropdownItem",{props:{command:"checkin_mac"}},[e("div",t.$L("修改MAC"))])),s.push(e("EDropdownItem",{props:{command:"department"}},[e("div",t.$L("修改部门"))])),n.includes("disable")?s.push(e("EDropdownItem",{props:{command:"cleardisable"},style:{color:"#f90"}},[e("div",t.$L("恢复帐号(已离职)"))])):s.push(e("EDropdownItem",{props:{command:"setdisable"},style:{color:"#f90"}},[e("div",t.$L("操作离职"))])),s.push(e("EDropdownItem",{props:{command:"delete"},style:{color:"red"}},[e("div",t.$L("删除"))]));var o=e("EDropdown",{props:{size:"small",trigger:"click"},on:{command:function(e){t.dropUser(e,a.row)}}},[e("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},t.$L("操作")),e("EDropdownMenu",{slot:"dropdown"},[s])]);return e("TableAction",{props:{column:a.column}},[o])}}],list:[],page:1,pageSize:20,total:0,noText:"",checkinMacEditShow:!1,checkinMacEditLoading:0,checkinMacEditData:{},departmentEditShow:!1,departmentEditLoading:0,departmentEditData:{},disableShow:!1,disableLoading:0,disableData:{},disableOptions:{shortcuts:[{text:this.$L("12:00"),value:function(){return $A.Date($A.formatDate("Y-m-d 12:00:00"))},onClick:function(t){t.handlePickSuccess()}},{text:this.$L("17:00"),value:function(){return $A.Date($A.formatDate("Y-m-d 17:00:00"))},onClick:function(t){t.handlePickSuccess()}},{text:this.$L("18:00"),value:function(){return $A.Date($A.formatDate("Y-m-d 18:00:00"))},onClick:function(t){t.handlePickSuccess()}},{text:this.$L("19:00"),value:function(){return $A.Date($A.formatDate("Y-m-d 19:00:00"))},onClick:function(t){t.handlePickSuccess()}},{text:this.$L("现在"),value:function(){return new Date},onClick:function(t){t.handlePickSuccess()}}]},departmentShow:!1,departmentLoading:0,departmentSelect:-1,departmentData:{id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new",dialog_useid:0},departmentList:[],dialogLoad:!1,dialogList:[]}},created:function(){this.checkinMac&&this.columns.splice(5,0,{title:this.$L("MAC地址"),key:"checkin_mac",minWidth:80,render:function(t,e){var a=e.row,n=$A.cloneJSON(a.checkin_macs||[]);if(0===n.length)return t("div","-");var s=[];return s.push(t("span",{domProps:{title:n[0]}},n[0])),n.length>1&&(n=n.splice(1),s.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:n.join("<br/>")}}),t("div",{class:"department-tag-num"}," +".concat(n.length))]))),t("div",{class:"team-table-department-warp"},s)}})},mounted:function(){this.getLists(),this.getDepartmentLists()},watch:{keyIs:function(t){t||(this.keys={},this.setPage(1))},departmentSelect:function(){this.setPage(1)}},computed:{departmentParentDisabled:function(){var t=this;return!!(this.departmentData.id>0&&this.departmentList.find((function(e){return e.parent_id==t.departmentData.id})))}},methods:{onSearch:function(){this.page=1,this.getLists()},getLists:function(){var t=this;this.loadIng++,this.keyIs=""!=$A.objImplode(this.keys);var e=$A.cloneJSON(this.keys);this.departmentSelect>-1&&(e=Object.assign(e,{department:this.departmentSelect})),this.$store.dispatch("call",{url:"users/lists",data:{keys:e,get_checkin_mac:this.checkinMac?1:0,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then((function(e){var a=e.data;t.page=a.current_page,t.total=a.total,t.list=a.data,t.noText="没有相关的成员"})).catch((function(){t.noText="数据加载失败"})).finally((function(e){t.loadIng--}))},setPage:function(t){this.page=t,this.getLists()},setPageSize:function(t){this.page=1,this.pageSize=t,this.getLists()},dropUser:function(t,e){var a=this;switch(t){case"email":$A.modalInput({title:"修改邮箱",placeholder:"请输入新的邮箱(".concat(e.email,")"),onOk:function(t){return t?a.operationUser({userid:e.userid,email:t}):"请输入新的邮箱地址"}});break;case"password":$A.modalInput({title:"修改密码",placeholder:"请输入新的密码",onOk:function(t){return t?a.operationUser({userid:e.userid,password:t}):"请输入新的密码"}});break;case"checkin_mac":this.checkinMacEditData={type:"checkin_macs",userid:e.userid,nickname:e.nickname,checkin_macs:(e.checkin_macs||[]).join(",")},this.checkinMacEditShow=!0;break;case"department":var n=[];e.department.some((function(t){var s=a.departmentList.find((function(e){return e.id==t}));s&&n.push(s.owner_userid===e.userid?"".concat(s.name," (").concat(a.$L("负责人"),")"):s.name)})),this.departmentEditData={type:"department",userid:e.userid,nickname:e.nickname,department:e.department.map((function(t){return parseInt(t)})),old:n.join("<br/>")},this.departmentEditShow=!0;break;case"setdisable":this.disableData={type:"setdisable",userid:e.userid,nickname:e.nickname},this.disableShow=!0;break;case"cleardisable":$A.modalConfirm({content:"你确定恢复已离职帐号【ID:".concat(e.userid,",").concat(e.nickname,"】吗?(注:此操作仅恢复帐号状态,无法恢复操作离职时移交的数据)"),loading:!0,onOk:function(){return a.operationUser({userid:e.userid,type:t})}});break;case"delete":$A.modalInput({title:"删除帐号【ID:".concat(e.userid,",").concat(e.nickname,"】"),placeholder:"请输入删除原因",okText:"确定删除",onOk:function(n){return n?a.operationUser({userid:e.userid,type:t,delete_reason:n}):"删除原因不能为空"}});break;default:this.operationUser({userid:e.userid,type:t},!0)}},operationUser:function(t,e){var a=this;return new Promise((function(n,s){"checkin_macs"==t.type?a.checkinMacEditLoading++:"department"==t.type?a.departmentEditLoading++:"setdisable"==t.type?a.disableLoading++:a.loadIng++,a.$store.dispatch("call",{url:"users/operation",data:t}).then((function(e){var s=e.msg;$A.messageSuccess(s),a.getLists(),n(),"checkin_macs"==t.type?a.checkinMacEditShow=!1:"department"==t.type?a.departmentEditShow=!1:"setdisable"==t.type&&(a.disableShow=!1)})).catch((function(t){var n=t.msg;!0===e&&$A.modalError(n),a.getLists(),s(n)})).finally((function(e){"checkin_macs"==t.type?a.checkinMacEditLoading--:"department"==t.type?a.departmentEditLoading--:"setdisable"==t.type?a.disableLoading--:a.loadIng--}))}))},getDepartmentLists:function(){var t=this;this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/list"}).then((function(e){var a=e.data;t.departmentList=[],t.generateDepartmentList(a,0,1)})).finally((function(e){t.departmentLoading--}))},generateDepartmentList:function(t,e,a){var n=this;t.some((function(s){s.parent_id==e&&(n.departmentList.push(Object.assign(s,{level:a+1})),n.generateDepartmentList(t,s.id,a+1))}))},onShowDepartment:function(t){this.departmentData=Object.assign({id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new"},t||{}),this.departmentShow=!0},onSaveDepartment:function(){var t=this;this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/add",data:Object.assign(this.departmentData,{owner_userid:this.departmentData.owner_userid[0]})}).then((function(e){var a=e.msg;$A.messageSuccess(a),t.getDepartmentLists(),t.getLists(),t.departmentShow=!1})).catch((function(t){var e=t.msg;$A.modalError(e)})).finally((function(e){t.departmentLoading--}))},onSelectDepartment:function(t){this.departmentSelect!==t?this.departmentSelect=t:this.departmentSelect=-1},onOpDepartment:function(t){var e=this;if($A.leftExists(t,"add_"))this.onShowDepartment({parent_id:parseInt(t.substr(4))});else if($A.leftExists(t,"edit_")){var a=this.departmentList.find((function(e){return e.id===parseInt(t.substr(5))}));a&&this.onShowDepartment(a)}else if($A.leftExists(t,"del_")){var n=this.departmentList.find((function(e){return e.id===parseInt(t.substr(4))}));n&&$A.modalConfirm({title:this.$L("删除部门"),content:"<div>".concat(this.$L("你确定要删除【".concat(n.name,"】部门吗?")),'</div><div style="color:#f00;font-weight:600">').concat(this.$L("注意:此操作不可恢复,部门下的成员将移至默认部门。"),"</div>"),language:!1,loading:!0,onOk:function(){return new Promise((function(t,a){e.$store.dispatch("call",{url:"users/department/del",data:{id:n.id}}).then((function(a){var s=a.msg;n.id===e.departmentSelect&&(e.departmentSelect=-1),t(s),e.getDepartmentLists()})).catch((function(t){var e=t.msg;a(e)}))}))}})}},dialogRemote:function(t){var e=this;""!==t?(this.dialogLoad=!0,this.$store.dispatch("call",{url:"dialog/group/searchuser",data:{key:t}}).then((function(t){var a=t.data;e.dialogList=a.list})).finally((function(t){e.dialogLoad=!1}))):this.dialogList=[]}}};const s=(0,a(51900).Z)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"team-management"},[e("div",{staticClass:"management-title"},[t._v("\n "+t._s(t.$L("团队管理"))+"\n "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),t._v(" "),e("div",{staticClass:"management-box"},[e("div",{staticClass:"management-department"},[e("ul",[e("li",{class:["level-1",0===t.departmentSelect?"active":""],on:{click:function(e){return t.onSelectDepartment(0)}}},[e("i",{staticClass:"taskfont department-icon"},[t._v("")]),t._v(" "),e("div",{staticClass:"department-title"},[t._v(t._s(t.$L("默认部门")))]),t._v(" "),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(t){t.stopPropagation()}}},[t._v("")]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"add_0"}},[e("div",[t._v(t._s(t.$L("添加子部门")))])])],1)],1)],1),t._v(" "),t._l(t.departmentList,(function(a){return e("li",{key:a.id,class:["level-".concat(a.level),t.departmentSelect===a.id?"active":""],on:{click:function(e){return t.onSelectDepartment(a.id)}}},[e("UserAvatar",{staticClass:"department-icon",attrs:{userid:a.owner_userid,size:20}},[e("p",[e("strong",[t._v(t._s(t.$L("部门负责人")))])])]),t._v(" "),e("div",{staticClass:"department-title"},[t._v(t._s(a.name))]),t._v(" "),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(t){t.stopPropagation()}}},[t._v("")]),t._v(" "),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a.level<=2?e("EDropdownItem",{attrs:{command:"add_".concat(a.id)}},[e("div",[t._v(t._s(t.$L("添加子部门")))])]):t._e(),t._v(" "),e("EDropdownItem",{attrs:{command:"edit_".concat(a.id)}},[e("div",[t._v(t._s(t.$L("编辑")))])]),t._v(" "),e("EDropdownItem",{attrs:{command:"del_".concat(a.id)}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("删除")))])])],1)],1)],1)}))],2),t._v(" "),e("div",{staticClass:"department-buttons"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(e){return t.onShowDepartment(null)}}},[t._v(t._s(t.$L("新建部门")))])],1)]),t._v(" "),e("div",{staticClass:"management-user"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("关键词"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("邮箱、昵称、职位"),clearable:""},model:{value:t.keys.key,callback:function(e){t.$set(t.keys,"key",e)},expression:"keys.key"}})],1)]),t._v(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("身份"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("全部")},model:{value:t.keys.identity,callback:function(e){t.$set(t.keys,"identity",e)},expression:"keys.identity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),e("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("管理员")))]),t._v(" "),e("Option",{attrs:{value:"noadmin"}},[t._v(t._s(t.$L("非管理员")))])],1)],1)]),t._v(" "),e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("在职状态"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("在职")},model:{value:t.keys.disable,callback:function(e){t.$set(t.keys,"disable",e)},expression:"keys.disable"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("在职")))]),t._v(" "),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("离职")))]),t._v(" "),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("全部")))])],1)],1)]),t._v(" "),t.checkinMac?e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("MAC地址"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("MAC地址"),clearable:""},model:{value:t.keys.checkin_mac,callback:function(e){t.$set(t.keys,"checkin_mac",e)},expression:"keys.checkin_mac"}})],1)]):e("li",[e("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("邮箱认证"))+"\n ")]),t._v(" "),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("全部")},model:{value:t.keys.email_verity,callback:function(e){t.$set(t.keys,"email_verity",e)},expression:"keys.email_verity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("已邮箱认证")))]),t._v(" "),e("Option",{attrs:{value:"no"}},[t._v(t._s(t.$L("未邮箱认证")))])],1)],1)]),t._v(" "),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"bottom","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])]),t._v(" "),e("Modal",{attrs:{title:t.$L(t.departmentData.id>0?"修改部门":"新建部门"),"mask-closable":!1},model:{value:t.departmentShow,callback:function(e){t.departmentShow=e},expression:"departmentShow"}},[e("Form",{ref:"addProject",attrs:{model:t.departmentData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("部门名称")}},[e("Input",{attrs:{type:"text",placeholder:t.$L("请输入部门名称")},model:{value:t.departmentData.name,callback:function(e){t.$set(t.departmentData,"name",e)},expression:"departmentData.name"}})],1),t._v(" "),e("FormItem",{attrs:{prop:"parent_id",label:t.$L("上级部门")}},[e("Select",{attrs:{disabled:t.departmentParentDisabled,placeholder:t.$L("请选择上级部门")},model:{value:t.departmentData.parent_id,callback:function(e){t.$set(t.departmentData,"parent_id",e)},expression:"departmentData.parent_id"}},[e("Option",{attrs:{value:0}},[t._v(t._s(t.$L("默认部门")))]),t._v(" "),t._l(t.departmentList,(function(a,n){return 0==a.parent_id&&a.id!=t.departmentData.id?e("Option",{key:n,attrs:{value:a.id,label:a.name}},[t._v(" "+t._s(a.name))]):t._e()}))],2),t._v(" "),t.departmentParentDisabled?e("div",{staticClass:"form-tip",staticStyle:{"margin-bottom":"-16px"}},[t._v(t._s(t.$L("含有子部门无法修改上级部门")))]):t._e()],1),t._v(" "),e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("部门负责人")}},[e("UserInput",{attrs:{"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("请选择部门负责人")},model:{value:t.departmentData.owner_userid,callback:function(e){t.$set(t.departmentData,"owner_userid",e)},expression:"departmentData.owner_userid"}})],1),t._v(" "),0==t.departmentData.id?[e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("群组设置")))]),t._v(" "),e("FormItem",{attrs:{prop:"dialog_group",label:t.$L("部门群聊")}},[e("RadioGroup",{model:{value:t.departmentData.dialog_group,callback:function(e){t.$set(t.departmentData,"dialog_group",e)},expression:"departmentData.dialog_group"}},[e("Radio",{attrs:{label:"new"}},[t._v(t._s(t.$L("创建部门群")))]),t._v(" "),e("Radio",{attrs:{label:"use"}},[t._v(t._s(t.$L("使用现有群")))])],1)],1),t._v(" "),"use"===t.departmentData.dialog_group?e("FormItem",{attrs:{prop:"dialog_useid",label:t.$L("选择群组")}},[e("Select",{attrs:{filterable:"","remote-method":t.dialogRemote,placeholder:t.$L("输入关键词搜索群"),loading:t.dialogLoad},model:{value:t.departmentData.dialog_useid,callback:function(e){t.$set(t.departmentData,"dialog_useid",e)},expression:"departmentData.dialog_useid"}},t._l(t.dialogList,(function(a,n){return e("Option",{key:n,attrs:{value:a.id,label:a.name}},[e("div",{staticClass:"team-department-add-dialog-group"},[e("div",{staticClass:"dialog-name"},[t._v(t._s(a.name))]),t._v(" "),e("UserAvatar",{attrs:{userid:a.owner_id,size:20}})],1)])})),1),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("仅支持选择个人群转为部门群")))])],1):t._e()]:t._e()],2),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.departmentShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.departmentLoading>0},on:{click:t.onSaveDepartment}},[t._v(t._s(t.$L(t.departmentData.id>0?"保存":"新建")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("修改签到MAC地址")},model:{value:t.checkinMacEditShow,callback:function(e){t.checkinMacEditShow=e},expression:"checkinMacEditShow"}},[e("Form",{attrs:{model:t.checkinMacEditData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L("正在进行帐号【ID:".concat(t.checkinMacEditData.userid,",").concat(t.checkinMacEditData.nickname,"】MAC地址修改。"))))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("MAC地址")}},[e("TagInput",{model:{value:t.checkinMacEditData.checkin_macs,callback:function(e){t.$set(t.checkinMacEditData,"checkin_macs",e)},expression:"checkinMacEditData.checkin_macs"}})],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.checkinMacEditShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.checkinMacEditLoading>0},on:{click:function(e){return t.operationUser(t.checkinMacEditData,!0)}}},[t._v(t._s(t.$L("确定修改")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("修改部门")},model:{value:t.departmentEditShow,callback:function(e){t.departmentEditShow=e},expression:"departmentEditShow"}},[e("Form",{attrs:{model:t.departmentEditData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L("正在进行帐号【ID:".concat(t.departmentEditData.userid,",").concat(t.departmentEditData.nickname,"】部门修改。"))))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("原部门")}},[e("div",{staticStyle:{"line-height":"24px",padding:"4px 0"},domProps:{innerHTML:t._s(t.departmentEditData.old||"-")}})]),t._v(" "),e("FormItem",{attrs:{label:t.$L("修改部门")}},[e("Select",{attrs:{multiple:"","multiple-max":10,placeholder:t.$L("留空为默认部门")},model:{value:t.departmentEditData.department,callback:function(e){t.$set(t.departmentEditData,"department",e)},expression:"departmentEditData.department"}},t._l(t.departmentList,(function(a,n){return e("Option",{key:n,attrs:{value:a.id}},[t._v(t._s(a.name))])})),1)],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.departmentEditShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.departmentEditLoading>0},on:{click:function(e){return t.operationUser(t.departmentEditData,!0)}}},[t._v(t._s(t.$L("确定修改")))])],1)],1),t._v(" "),e("Modal",{attrs:{title:t.$L("操作离职")},model:{value:t.disableShow,callback:function(e){t.disableShow=e},expression:"disableShow"}},[e("Form",{attrs:{model:t.disableData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L("正在进行帐号【ID:".concat(t.disableData.userid,",").concat(t.disableData.nickname,"】离职操作。"))))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("离职时间")}},[e("DatePicker",{ref:"disableTime",staticStyle:{width:"100%"},attrs:{editable:!1,placeholder:t.$L("选择离职时间"),options:t.disableOptions,format:"yyyy/MM/dd HH:mm",type:"datetime"},model:{value:t.disableData.disable_time,callback:function(e){t.$set(t.disableData,"disable_time",e)},expression:"disableData.disable_time"}})],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("交接人")}},[e("UserInput",{attrs:{"disabled-choice":[t.disableData.userid],"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("选择交接人")},model:{value:t.disableData.transfer_userid,callback:function(e){t.$set(t.disableData,"transfer_userid",e)},expression:"disableData.transfer_userid"}}),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("".concat(t.disableData.nickname," 负责的部门、项目、任务和文件将移交给交接人;同时退出所有群(如果是群主则转让给交接人)"))))])],1)],1),t._v(" "),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(e){t.disableShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":function(e){return t.operationUser(t.disableData,!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[t._v(t._s(t.$L("注意:离职操作不可逆!")))])]),t._v(" "),e("Button",{attrs:{type:"primary",loading:t.disableLoading>0}},[t._v(t._s(t.$L("确定离职")))])],1)],1)],1)],1)}),[],!1,null,null,null).exports},58498:(t,e,a)=>{a.r(e),a.d(e,{default:()=>I});function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function s(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?n(Object(a),!0).forEach((function(e){o(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function o(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const i={name:"SystemSetting",data:function(){return{loadIng:0,formDatum:{}}},mounted:function(){this.systemSetting()},methods:{submitForm:function(){var t=this;this.$refs.formDatum.validate((function(e){e&&t.systemSetting(!0)}))},resetForm:function(){this.formDatum=$A.cloneJSON(this.formDatum_bak)},formArchived:function(t){this.formDatum=s(s({},this.formDatum),{},{auto_archived:t})},systemSetting:function(t){var e=this;this.loadIng++,this.$store.dispatch("call",{url:"system/setting?type="+(t?"save":"all"),data:this.formDatum}).then((function(a){var n=a.data;t&&$A.messageSuccess("修改成功"),e.formDatum=n,e.formDatum_bak=$A.cloneJSON(e.formDatum)})).catch((function(e){var a=e.msg;t&&$A.modalError(a)})).finally((function(t){e.loadIng--}))}}};var r=a(51900);const l=(0,r.Z)(i,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-component-item"},[e("Form",{ref:"formDatum",attrs:{model:t.formDatum,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("允许注册"),prop:"reg"}},[e("RadioGroup",{model:{value:t.formDatum.reg,callback:function(e){t.$set(t.formDatum,"reg",e)},expression:"formDatum.reg"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("允许")))]),t._v(" "),e("Radio",{attrs:{label:"invite"}},[t._v(t._s(t.$L("邀请码")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("禁止")))])],1),t._v(" "),"open"==t.formDatum.reg?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("允许:开放注册功能。")))]):"invite"==t.formDatum.reg?[e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("邀请码:注册时需填写下方邀请码。")))]),t._v(" "),e("Input",{staticStyle:{width:"200px","margin-top":"6px"},model:{value:t.formDatum.reg_invite,callback:function(e){t.$set(t.formDatum,"reg_invite",e)},expression:"formDatum.reg_invite"}},[e("span",{attrs:{slot:"prepend"},slot:"prepend"},[t._v(t._s(t.$L("邀请码")))])])]:t._e()],2),t._v(" "),e("FormItem",{attrs:{label:t.$L("登录验证码"),prop:"loginCode"}},[e("RadioGroup",{model:{value:t.formDatum.login_code,callback:function(e){t.$set(t.formDatum,"login_code",e)},expression:"formDatum.login_code"}},[e("Radio",{attrs:{label:"auto"}},[t._v(t._s(t.$L("自动")))]),t._v(" "),e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"auto"==t.formDatum.login_code?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("自动:密码输入错误后必须添加验证码。")))]):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("密码策略"),prop:"passwordPolicy"}},[e("RadioGroup",{model:{value:t.formDatum.password_policy,callback:function(e){t.$set(t.formDatum,"password_policy",e)},expression:"formDatum.password_policy"}},[e("Radio",{attrs:{label:"simple"}},[t._v(t._s(t.$L("简单")))]),t._v(" "),e("Radio",{attrs:{label:"complex"}},[t._v(t._s(t.$L("复杂")))])],1),t._v(" "),"simple"==t.formDatum.password_policy?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("简单:大于或等于6个字符。")))]):"complex"==t.formDatum.password_policy?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("复杂:大于或等于6个字符,包含数字、字母大小写或者特殊字符。")))]):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("邀请项目"),prop:"projectInvite"}},[e("RadioGroup",{model:{value:t.formDatum.project_invite,callback:function(e){t.$set(t.formDatum,"project_invite",e)},expression:"formDatum.project_invite"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"open"==t.formDatum.project_invite?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("开启:项目管理员可生成链接邀请成员加入项目。")))]):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("聊天资料"),prop:"chatInformation"}},[e("RadioGroup",{model:{value:t.formDatum.chat_information,callback:function(e){t.$set(t.formDatum,"chat_information",e)},expression:"formDatum.chat_information"}},[e("Radio",{attrs:{label:"optional"}},[t._v(t._s(t.$L("可选")))]),t._v(" "),e("Radio",{attrs:{label:"required"}},[t._v(t._s(t.$L("必填")))])],1),t._v(" "),"required"==t.formDatum.chat_information?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("必填:发送聊天内容前必须设置昵称、电话。")))]):e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("如果必填,发送聊天前必须设置昵称、电话。")))])],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("自动归档任务"),prop:"autoArchived"}},[e("RadioGroup",{attrs:{value:t.formDatum.auto_archived},on:{"on-change":t.formArchived}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("任务完成后自动归档。")))]),t._v(" "),"open"==t.formDatum.auto_archived?e("ETooltip",{attrs:{placement:"right",disabled:t.windowSmall}},[e("div",{staticClass:"setting-auto-day"},[e("Input",{attrs:{type:"number"},model:{value:t.formDatum.archived_day,callback:function(e){t.$set(t.formDatum,"archived_day",e)},expression:"formDatum.archived_day"}},[e("span",{attrs:{slot:"append"},slot:"append"},[t._v(t._s(t.$L("天")))])])],1),t._v(" "),e("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.$L("任务完成 (*) 天后自动归档。",t.formDatum.archived_day)))])]):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("全员群组禁言"),prop:"allGroupMute"}},[e("RadioGroup",{model:{value:t.formDatum.all_group_mute,callback:function(e){t.$set(t.formDatum,"all_group_mute",e)},expression:"formDatum.all_group_mute"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开放")))]),t._v(" "),e("Radio",{attrs:{label:"user"}},[t._v(t._s(t.$L("成员禁言")))]),t._v(" "),e("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("全部禁言")))])],1),t._v(" "),"open"==t.formDatum.all_group_mute?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("开放:所有人都可以发言。")))]):"user"==t.formDatum.all_group_mute?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("成员禁言:仅管理员可以发言。")))]):"all"==t.formDatum.all_group_mute?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("全部禁言:所有人都禁止发言。")))]):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("自动进入全员群"),prop:"allGroupAutoin"}},[e("RadioGroup",{model:{value:t.formDatum.all_group_autoin,callback:function(e){t.$set(t.formDatum,"all_group_autoin",e)},expression:"formDatum.all_group_autoin"}},[e("Radio",{attrs:{label:"yes"}},[t._v(t._s(t.$L("自动")))]),t._v(" "),e("Radio",{attrs:{label:"no"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"yes"==t.formDatum.all_group_autoin?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("自动:注册成功后自动进入全员群。")))]):"no"==t.formDatum.all_group_autoin?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("关闭:其他成员通过@邀请进入。")))]):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("是否启动首页"),prop:"startHome"}},[e("RadioGroup",{model:{value:t.formDatum.start_home,callback:function(e){t.$set(t.formDatum,"start_home",e)},expression:"formDatum.start_home"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("仅支持网页版。")))]),t._v(" "),"open"==t.formDatum.start_home?e("Input",{staticStyle:{margin:"8px 0 -8px"},attrs:{type:"textarea",rows:2,autosize:{minRows:2,maxRows:8},placeholder:t.$L("首页底部:首页底部网站备案号等信息")},model:{value:t.formDatum.home_footer,callback:function(e){t.$set(t.formDatum,"home_footer",e)},expression:"formDatum.home_footer"}}):t._e()],1)],1),t._v(" "),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("提交")))]),t._v(" "),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("重置")))])],1)],1)}),[],!1,null,null,null).exports;var c=a(20629);function m(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function u(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const d={name:"SystemTaskPriority",data:function(){return{loadIng:0,formDatum:[],nullDatum:{name:"",priority:1,days:1,color:"#84C56A"}}},mounted:function(){this.systemSetting()},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?m(Object(a),!0).forEach((function(e){u(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):m(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},(0,c.rn)(["taskPriority"])),watch:{taskPriority:{handler:function(t){this.formDatum=$A.cloneJSON(t),0===this.formDatum.length&&this.addDatum()},immediate:!0}},methods:{submitForm:function(){var t=this;this.$refs.formDatum.validate((function(e){e&&t.systemSetting(!0)}))},resetForm:function(){this.formDatum=$A.cloneJSON(this.taskPriority)},addDatum:function(){this.formDatum.push($A.cloneJSON(this.nullDatum))},delDatum:function(t){this.formDatum.splice(t,1),0===this.formDatum.length&&this.addDatum()},systemSetting:function(t){var e=this;this.loadIng++,this.$store.dispatch("call",{url:"system/priority?type="+(t?"save":"get"),method:"post",data:{list:this.formDatum}}).then((function(a){var n=a.data;t&&$A.messageSuccess("修改成功"),e.$store.state.taskPriority=$A.cloneJSON(n)})).catch((function(e){var a=e.msg;t&&$A.modalError(a)})).finally((function(t){e.loadIng--}))}}};const p=(0,r.Z)(d,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-component-item"},[e("Form",{ref:"formDatum",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{staticClass:"setting-color"},[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("名称")))]),t._v(" "),e("Col",{attrs:{span:"4"}},[e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.$L("数值越小级别越高"),"max-width":"auto",placement:"top",transfer:""}},[e("div",[e("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}}),t._v(" "+t._s(t.$L("级别")))],1)])],1),t._v(" "),e("Col",{attrs:{span:"4"}},[e("ETooltip",{attrs:{disabled:t.windowSmall,content:t.$L("任务完成时间"),"max-width":"auto",placement:"top",transfer:""}},[e("div",[e("Icon",{staticClass:"information",attrs:{type:"ios-information-circle-outline"}}),t._v(" "+t._s(t.$L("天数")))],1)])],1),t._v(" "),e("Col",{attrs:{span:"4"}},[t._v(t._s(t.$L("颜色")))])],1),t._v(" "),t._l(t.formDatum,(function(a,n){return e("Row",{key:n,staticClass:"setting-color"},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("请输入名称"),clearable:""},on:{"on-clear":function(e){return t.delDatum(n)}},model:{value:a.name,callback:function(e){t.$set(a,"name",e)},expression:"item.name"}})],1),t._v(" "),e("Col",{attrs:{span:"4"}},[e("Input",{attrs:{type:"number"},model:{value:a.priority,callback:function(e){t.$set(a,"priority",e)},expression:"item.priority"}})],1),t._v(" "),e("Col",{attrs:{span:"4"}},[e("Input",{attrs:{type:"number"},model:{value:a.days,callback:function(e){t.$set(a,"days",e)},expression:"item.days"}})],1),t._v(" "),e("Col",{attrs:{span:"4"}},[e("ColorPicker",{attrs:{recommend:"",transfer:""},model:{value:a.color,callback:function(e){t.$set(a,"color",e)},expression:"item.color"}})],1)],1)})),t._v(" "),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addDatum}},[t._v(t._s(t.$L("添加优先级")))])],2),t._v(" "),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("提交")))]),t._v(" "),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("重置")))])],1)],1)}),[],!1,null,null,null).exports;function f(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function _(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const v={name:"SystemColumnTemplate",data:function(){return{loadIng:0,formDatum:[],nullDatum:{name:"",columns:""}}},mounted:function(){this.systemSetting()},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?f(Object(a),!0).forEach((function(e){_(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):f(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},(0,c.rn)(["columnTemplate"])),watch:{columnTemplate:{handler:function(t){this.formDatum=$A.cloneJSON(t),0===this.formDatum.length&&this.addDatum()},immediate:!0}},methods:{submitForm:function(){var t=this;this.$refs.formDatum.validate((function(e){e&&t.systemSetting(!0)}))},resetForm:function(){this.formDatum=$A.cloneJSON(this.columnTemplate)},addDatum:function(){this.formDatum.push($A.cloneJSON(this.nullDatum))},delDatum:function(t){this.formDatum.splice(t,1),0===this.formDatum.length&&this.addDatum()},systemSetting:function(t){var e=this;this.loadIng++,this.$store.dispatch("call",{url:"system/column/template?type="+(t?"save":"get"),method:"post",data:{list:this.formDatum}}).then((function(a){var n=a.data;t&&$A.messageSuccess("修改成功"),e.$store.state.columnTemplate=$A.cloneJSON(n).map((function(t){return $A.isArray(t.columns)&&(t.columns=t.columns.join(",")),t}))})).catch((function(e){var a=e.msg;t&&$A.modalError(a)})).finally((function(t){e.loadIng--}))}}};const h=(0,r.Z)(v,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-component-item"},[e("Form",{ref:"formDatum",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{staticClass:"setting-template"},[e("Col",{attrs:{span:"8"}},[t._v(t._s(t.$L("名称")))]),t._v(" "),e("Col",{attrs:{span:"16"}},[t._v(t._s(t.$L("项目模板")))])],1),t._v(" "),t._l(t.formDatum,(function(a,n){return e("Row",{key:n,staticClass:"setting-template"},[e("Col",{attrs:{span:"8"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("请输入名称"),clearable:""},on:{"on-clear":function(e){return t.delDatum(n)}},model:{value:a.name,callback:function(e){t.$set(a,"name",e)},expression:"item.name"}})],1),t._v(" "),e("Col",{attrs:{span:"16"}},[e("TagInput",{model:{value:a.columns,callback:function(e){t.$set(a,"columns",e)},expression:"item.columns"}})],1)],1)})),t._v(" "),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addDatum}},[t._v(t._s(t.$L("添加模板")))])],2),t._v(" "),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("提交")))]),t._v(" "),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("重置")))])],1)],1)}),[],!1,null,null,null).exports;const g={name:"SystemEmailSetting",data:function(){return{loadIng:0,formData:{smtp_server:"",port:"",account:"",password:"",reg_verify:"colse",notice:"open",task_start_minute:-1,task_remind_hours:-1,task_remind_hours2:-1,notice_msg:"open",msg_unread_user_minute:-1,msg_unread_group_minute:-1,ignore_addr:""},ruleData:{}}},mounted:function(){this.systemSetting()},methods:{submitForm:function(){var t=this;this.$refs.formData.validate((function(e){e&&t.systemSetting(!0)}))},resetForm:function(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting:function(t){var e=this;this.loadIng++,this.$store.dispatch("call",{url:"system/setting/email?type="+(t?"save":"all"),data:this.formData}).then((function(a){var n=a.data;t&&$A.messageSuccess("修改成功"),e.formData=n,e.formDatum_bak=$A.cloneJSON(e.formData)})).catch((function(e){var a=e.msg;t&&$A.modalError(a)})).finally((function(t){e.loadIng--}))},hoursChange:function(t,e){var a=this;10*t%5!=0&&(setTimeout((function(){a.$set(a.formData,e,Math.round(t))})),$A.messageError("任务提醒只能是0.5的倍数"))},checkEmailSend:function(){var t=this;$A.modalInput({title:"测试邮件",placeholder:"请输入收件人地址",onOk:function(e){return e?$A.isEmail(e)?new Promise((function(a,n){t.$store.dispatch("call",{url:"system/email/check",data:Object.assign(t.formData,{to:e})}).then((function(t){var e=t.msg;a(e)})).catch((function(t){var e=t.msg;n(e)}))})):"请输入正确的收件人地址":"请输入收件人地址"}})}}};const b=(0,r.Z)(g,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-component-item"},[e("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"block-setting-box"},[e("h3",[t._v(t._s(t.$L("邮箱服务器设置")))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("SMTP服务器"),prop:"smtp_server"}},[e("Input",{model:{value:t.formData.smtp_server,callback:function(e){t.$set(t.formData,"smtp_server",e)},expression:"formData.smtp_server"}})],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("端口"),prop:"port"}},[e("Input",{attrs:{maxlength:20},model:{value:t.formData.port,callback:function(e){t.$set(t.formData,"port",e)},expression:"formData.port"}})],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("帐号"),prop:"account"}},[e("Input",{attrs:{maxlength:128},model:{value:t.formData.account,callback:function(e){t.$set(t.formData,"account",e)},expression:"formData.account"}})],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("密码"),prop:"password"}},[e("Input",{attrs:{maxlength:128,type:"password"},model:{value:t.formData.password,callback:function(e){t.$set(t.formData,"password",e)},expression:"formData.password"}})],1),t._v(" "),e("FormItem",[e("Button",{on:{click:t.checkEmailSend}},[t._v(t._s(t.$L("邮件发送测试")))])],1)],1),t._v(" "),e("div",{staticClass:"block-setting-placeholder"}),t._v(" "),e("div",{staticClass:"block-setting-box"},[e("h3",[t._v(t._s(t.$L("邮件通知设置")))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("开启注册验证"),prop:"reg_verify"}},[e("RadioGroup",{model:{value:t.formData.reg_verify,callback:function(e){t.$set(t.formData,"reg_verify",e)},expression:"formData.reg_verify"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"open"==t.formData.reg_verify?e("div",{staticClass:"form-tip"},[t._v("\n "+t._s(t.$L("开启后:"))),e("br"),t._v("\n ① "+t._s(t.$L("帐号需验证通过才可登录"))),e("br"),t._v("\n ② "+t._s(t.$L("修改邮箱和删除帐号需要邮箱验证码"))+"\n ")]):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("任务提醒"),prop:"notice"}},[e("RadioGroup",{model:{value:t.formData.notice,callback:function(e){t.$set(t.formData,"notice",e)},expression:"formData.notice"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"open"==t.formData.notice?e("Form",{nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("任务开始"),prop:"task_start_minute"}},[e("div",{staticClass:"input-number-box"},[e("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.task_start_minute,callback:function(e){t.$set(t.formData,"task_start_minute",e)},expression:"formData.task_start_minute"}}),t._v(" "),e("label",[t._v(t._s(t.$L("分钟"))+"(m)")])],1)]),t._v(" "),e("FormItem",{attrs:{label:t.$L("距离到期"),prop:"task_remind_hours"}},[e("div",{staticClass:"input-number-box"},[e("InputNumber",{attrs:{min:0,step:.5},on:{"on-change":function(e){return t.hoursChange(e,"task_remind_hours")}},model:{value:t.formData.task_remind_hours,callback:function(e){t.$set(t.formData,"task_remind_hours",e)},expression:"formData.task_remind_hours"}}),t._v(" "),e("label",[t._v(t._s(t.$L("小时"))+"(h)")])],1)]),t._v(" "),e("FormItem",{attrs:{label:t.$L("到期超时"),prop:"task_remind_hours2"}},[e("div",{staticClass:"input-number-box"},[e("InputNumber",{attrs:{min:0,step:.5},on:{"on-change":function(e){return t.hoursChange(e,"task_remind_hours2")}},model:{value:t.formData.task_remind_hours2,callback:function(e){t.$set(t.formData,"task_remind_hours2",e)},expression:"formData.task_remind_hours2"}}),t._v(" "),e("label",[t._v(t._s(t.$L("小时"))+"(h)")])],1)]),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("填写-1则不通知,误差±10分钟")))])],1):t._e()],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("消息提醒"),prop:"notice_msg"}},[e("RadioGroup",{model:{value:t.formData.notice_msg,callback:function(e){t.$set(t.formData,"notice_msg",e)},expression:"formData.notice_msg"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"open"==t.formData.notice_msg?e("Form",{nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("未读个人消息"),prop:"msg_unread_user_minute"}},[e("div",{staticClass:"input-number-box"},[e("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.msg_unread_user_minute,callback:function(e){t.$set(t.formData,"msg_unread_user_minute",e)},expression:"formData.msg_unread_user_minute"}}),t._v(" "),e("label",[t._v(t._s(t.$L("分钟"))+"(m)")])],1)]),t._v(" "),e("FormItem",{attrs:{label:t.$L("未读群聊消息"),prop:"msg_unread_group_minute"}},[e("div",{staticClass:"input-number-box"},[e("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.msg_unread_group_minute,callback:function(e){t.$set(t.formData,"msg_unread_group_minute",e)},expression:"formData.msg_unread_group_minute"}}),t._v(" "),e("label",[t._v(t._s(t.$L("分钟"))+"(m)")])],1)]),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("填写-1则不通知,误差±10分钟")))])],1):t._e()],1)],1),t._v(" "),e("div",{staticClass:"block-setting-placeholder"}),t._v(" "),e("div",{staticClass:"block-setting-box"},[e("h3",[t._v(t._s(t.$L("忽略邮箱地址")))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("忽略邮箱"),prop:"ignore_addr"}},[e("Input",{attrs:{type:"textarea",autosize:{minRows:3,maxRows:50}},model:{value:t.formData.ignore_addr,callback:function(e){t.$set(t.formData,"ignore_addr",e)},expression:"formData.ignore_addr"}}),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("不会向忽略的邮箱地址发送邮件,可使用换行分割多个地址。")))])],1)],1)]),t._v(" "),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("提交")))]),t._v(" "),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("重置")))])],1)],1)}),[],!1,null,null,null).exports;const $={name:"SystemAppPush",data:function(){return{loadIng:0,formData:{push:"",ios_key:"",ios_secret:"",android_key:"",android_secret:""},ruleData:{}}},mounted:function(){this.systemSetting()},methods:{submitForm:function(){var t=this;this.$refs.formData.validate((function(e){e&&t.systemSetting(!0)}))},resetForm:function(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting:function(t){var e=this;this.loadIng++,this.$store.dispatch("call",{url:"system/setting/apppush?type="+(t?"save":"all"),data:this.formData}).then((function(a){var n=a.data;t&&$A.messageSuccess("修改成功"),e.formData=n,e.formDatum_bak=$A.cloneJSON(e.formData)})).catch((function(e){var a=e.msg;t&&$A.modalError(a)})).finally((function(t){e.loadIng--}))},hoursChange:function(t,e){var a=this;10*t%5!=0&&(setTimeout((function(){a.$set(a.formData,e,Math.round(t))})),$A.messageError("任务提醒只能是0.5的倍数"))}}};const D=(0,r.Z)($,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-component-item"},[e("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"block-setting-box"},[e("h3",[t._v(t._s(t.$L("友盟推送")))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("开启推送"),prop:"push"}},[e("RadioGroup",{model:{value:t.formData.push,callback:function(e){t.$set(t.formData,"push",e)},expression:"formData.push"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1)],1),t._v(" "),"open"===t.formData.push?[e("Divider",{attrs:{orientation:"left"}},[t._v("iOS "+t._s(t.$L("参数配置")))]),t._v(" "),e("FormItem",{attrs:{label:"Appkey",prop:"ios_appkey"}},[e("Input",{attrs:{maxlength:255},model:{value:t.formData.ios_key,callback:function(e){t.$set(t.formData,"ios_key",e)},expression:"formData.ios_key"}})],1),t._v(" "),e("FormItem",{attrs:{label:"App Master Secret",prop:"secret"}},[e("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.ios_secret,callback:function(e){t.$set(t.formData,"ios_secret",e)},expression:"formData.ios_secret"}})],1),t._v(" "),e("Divider",{attrs:{orientation:"left"}},[t._v("Android "+t._s(t.$L("参数配置")))]),t._v(" "),e("FormItem",{attrs:{label:"Appkey",prop:"android_appkey"}},[e("Input",{attrs:{maxlength:255},model:{value:t.formData.android_key,callback:function(e){t.$set(t.formData,"android_key",e)},expression:"formData.android_key"}})],1),t._v(" "),e("FormItem",{attrs:{label:"App Master Secret",prop:"secret"}},[e("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.android_secret,callback:function(e){t.$set(t.formData,"android_secret",e)},expression:"formData.android_secret"}})],1),t._v(" "),e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("推送内容")))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("消息提醒"),prop:"push_msg"}},[e("RadioGroup",{model:{value:t.formData.push_msg,callback:function(e){t.$set(t.formData,"push_msg",e)},expression:"formData.push_msg"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1)],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("任务提醒"),prop:"push_task"}},[e("RadioGroup",{model:{value:t.formData.push_task,callback:function(e){t.$set(t.formData,"push_task",e)},expression:"formData.push_task"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),"open"==t.formData.push_task?e("Form",{nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("任务开始"),prop:"task_start_minute"}},[e("div",{staticClass:"input-number-box"},[e("InputNumber",{attrs:{min:0,step:1},model:{value:t.formData.task_start_minute,callback:function(e){t.$set(t.formData,"task_start_minute",e)},expression:"formData.task_start_minute"}}),t._v(" "),e("label",[t._v(t._s(t.$L("分钟"))+"(m)")])],1)]),t._v(" "),e("FormItem",{attrs:{label:t.$L("距离到期"),prop:"task_remind_hours"}},[e("div",{staticClass:"input-number-box"},[e("InputNumber",{attrs:{min:0,step:.5},on:{"on-change":function(e){return t.hoursChange(e,"task_remind_hours")}},model:{value:t.formData.task_remind_hours,callback:function(e){t.$set(t.formData,"task_remind_hours",e)},expression:"formData.task_remind_hours"}}),t._v(" "),e("label",[t._v(t._s(t.$L("小时"))+"(h)")])],1)]),t._v(" "),e("FormItem",{attrs:{label:t.$L("到期超时"),prop:"task_remind_hours2"}},[e("div",{staticClass:"input-number-box"},[e("InputNumber",{attrs:{min:0,step:.5},on:{"on-change":function(e){return t.hoursChange(e,"task_remind_hours2")}},model:{value:t.formData.task_remind_hours2,callback:function(e){t.$set(t.formData,"task_remind_hours2",e)},expression:"formData.task_remind_hours2"}}),t._v(" "),e("label",[t._v(t._s(t.$L("小时"))+"(h)")])],1)]),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("填写-1则不通知,误差±10分钟")))])],1):t._e()],1)]:t._e()],2)]),t._v(" "),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("提交")))]),t._v(" "),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("重置")))])],1)],1)}),[],!1,null,null,null).exports;const y={name:"SystemMeeting",data:function(){return{loadIng:0,formData:{open:"",appid:"",app_certificate:""},ruleData:{}}},mounted:function(){this.systemSetting()},methods:{submitForm:function(){var t=this;this.$refs.formData.validate((function(e){e&&t.systemSetting(!0)}))},resetForm:function(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting:function(t){var e=this;this.loadIng++,this.$store.dispatch("call",{url:"system/setting/meeting?type="+(t?"save":"all"),data:this.formData}).then((function(a){var n=a.data;t&&$A.messageSuccess("修改成功"),e.formData=n,e.formDatum_bak=$A.cloneJSON(e.formData)})).catch((function(e){var a=e.msg;t&&$A.modalError(a)})).finally((function(t){e.loadIng--}))}}};const k=(0,r.Z)(y,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-component-item"},[e("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"block-setting-box"},[e("h3",[t._v(t._s(t.$L("AgoraIO")))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("会议功能"),prop:"open"}},[e("RadioGroup",{model:{value:t.formData.open,callback:function(e){t.$set(t.formData,"open",e)},expression:"formData.open"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1)],1),t._v(" "),"open"===t.formData.open?[e("FormItem",{attrs:{label:"App ID ",prop:"appid"}},[e("Input",{attrs:{maxlength:255},model:{value:t.formData.appid,callback:function(e){t.$set(t.formData,"appid",e)},expression:"formData.appid"}})],1),t._v(" "),e("FormItem",{attrs:{label:"App certificate",prop:"app_certificate"}},[e("Input",{attrs:{maxlength:255,type:"password"},model:{value:t.formData.app_certificate,callback:function(e){t.$set(t.formData,"app_certificate",e)},expression:"formData.app_certificate"}})],1)]:t._e()],2)]),t._v(" "),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("提交")))]),t._v(" "),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("重置")))])],1)],1)}),[],!1,null,null,null).exports;var L=a(81034),S=a(51572);const w={name:"SystemCheckin",components:{CheckinExport:a(86422).Z,TeamManagement:S.Z,DrawerOverlay:L.Z},data:function(){return{loadIng:0,formData:{open:"",edit:"",cmd:""},ruleData:{},dateOptions:{shortcuts:[{text:this.$L("上个月"),value:function(){return[$A.getData("上个月",!0),this.lastSecond($A.getData("上个月结束",!0))]}},{text:this.$L("这个月"),value:function(){return[$A.getData("本周",!0),this.lastSecond($A.getData("本月结束",!0))]}}]},allUserShow:!1,exportShow:!1}},mounted:function(){this.systemSetting()},methods:{submitForm:function(){var t=this;this.$refs.formData.validate((function(e){e&&t.systemSetting(!0)}))},resetForm:function(){this.formData=$A.cloneJSON(this.formDatum_bak)},systemSetting:function(t){var e=this;this.loadIng++,this.$store.dispatch("call",{url:"system/setting/checkin?type="+(t?"save":"all"),data:this.formData}).then((function(a){var n=a.data;t&&$A.messageSuccess("修改成功"),e.formData=n,e.formDatum_bak=$A.cloneJSON(e.formData)})).catch((function(e){var a=e.msg;t&&$A.modalError(a)})).finally((function(t){e.loadIng--}))},clickCmd:function(){var t=this;this.$nextTick((function(e){t.$refs.cmd.focus({cursor:"all"})}))}}};const x={components:{SystemCheckin:(0,r.Z)(w,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-component-item"},[e("Form",{ref:"formData",attrs:{model:t.formData,rules:t.ruleData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"block-setting-box"},[e("h3",[t._v(t._s(t.$L("自动签到")))]),t._v(" "),e("FormItem",{attrs:{label:t.$L("功能开启"),prop:"open"}},[e("RadioGroup",{model:{value:t.formData.open,callback:function(e){t.$set(t.formData,"open",e)},expression:"formData.open"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],1),t._v(" "),e("div",{staticClass:"export-data"},[e("p",{on:{click:function(e){t.allUserShow=!0}}},[t._v(t._s(t.$L("管理成员MAC地址")))]),t._v(" "),e("p",{on:{click:function(e){t.exportShow=!0}}},[t._v(t._s(t.$L("导出签到数据")))])])],1),t._v(" "),"open"===t.formData.open?[e("FormItem",{attrs:{label:t.$L("允许修改"),prop:"edit"}},[e("RadioGroup",{model:{value:t.formData.edit,callback:function(e){t.$set(t.formData,"edit",e)},expression:"formData.edit"}},[e("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("允许")))]),t._v(" "),e("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("禁止")))])],1),t._v(" "),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("允许成员自己修改MAC地址")))])],1),t._v(" "),e("FormItem",{attrs:{label:t.$L("安装说明"),prop:"explain"}},[e("p",[t._v("1. "+t._s(t.$L("签到延迟时长为±1分钟。")))]),t._v(" "),e("p",[t._v("2. "+t._s(t.$L("设备连接上指定路由器(WiFi)后自动签到。")))]),t._v(" "),e("p",[t._v("3. "+t._s(t.$L("仅支持Openwrt系统的路由器。")))]),t._v(" "),e("p",[t._v("4. "+t._s(t.$L("关闭签到功能再开启需要重新安装。")))]),t._v(" "),e("p",[t._v("5. "+t._s(t.$L("进入路由器终端执行以下命令即可完成安装:")))]),t._v(" "),e("Input",{ref:"cmd",staticStyle:{"margin-top":"6px"},attrs:{type:"textarea",readonly:"",value:t.formData.cmd},on:{"on-focus":t.clickCmd}})],1)]:t._e()],2)]),t._v(" "),e("div",{staticClass:"setting-footer"},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$L("提交")))]),t._v(" "),e("Button",{staticStyle:{"margin-left":"8px"},attrs:{loading:t.loadIng>0},on:{click:t.resetForm}},[t._v(t._s(t.$L("重置")))])],1),t._v(" "),e("CheckinExport",{model:{value:t.exportShow,callback:function(e){t.exportShow=e},expression:"exportShow"}}),t._v(" "),e("DrawerOverlay",{attrs:{placement:"right",size:1380},model:{value:t.allUserShow,callback:function(e){t.allUserShow=e},expression:"allUserShow"}},[t.allUserShow?e("TeamManagement",{attrs:{"checkin-mac":""}}):t._e()],1)],1)}),[],!1,null,null,null).exports,SystemMeeting:k,SystemAppPush:D,SystemColumnTemplate:h,SystemTaskPriority:p,SystemSetting:l,SystemEmailSetting:b},data:function(){return{tabAction:"setting",appPush:!1}},mounted:function(){["127.0.0.1:2222","192.168.100.88:2222","dootask.com","www.dootask.com","t.hitosea.com"].includes($A.getDomain($A.apiUrl("../")))&&(this.appPush=!0)}};const I=(0,r.Z)(x,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-item submit"},[e("Tabs",{model:{value:t.tabAction,callback:function(e){t.tabAction=e},expression:"tabAction"}},[e("TabPane",{attrs:{label:t.$L("系统设置"),name:"setting"}},[e("SystemSetting")],1),t._v(" "),e("TabPane",{attrs:{label:t.$L("任务优先级"),name:"taskPriority"}},[e("SystemTaskPriority")],1),t._v(" "),e("TabPane",{attrs:{label:t.$L("项目模板"),name:"columnTemplate"}},[e("SystemColumnTemplate")],1),t._v(" "),e("TabPane",{attrs:{label:t.$L("会议功能"),name:"meeting"}},[e("SystemMeeting")],1),t._v(" "),e("TabPane",{attrs:{label:t.$L("签到功能"),name:"checkin"}},[e("SystemCheckin")],1),t._v(" "),e("TabPane",{attrs:{label:t.$L("邮件设置"),name:"emailSetting"}},[e("SystemEmailSetting")],1),t._v(" "),t.appPush?e("TabPane",{attrs:{label:t.$L("APP推送"),name:"appPush"}},[e("SystemAppPush")],1):t._e()],1)],1)}),[],!1,null,null,null).exports}}]); |