work/js/chunk-0a5827d8.6c964e84.js
2024-01-09 17:50:02 +08:00

1 line
9.7 KiB
PHP

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0a5827d8"],{2435:function(t,e,i){"use strict";i("e9e0")},"386b":function(t,e,i){var a=i("5ca1"),s=i("79e5"),n=i("be13"),o=/"/g,r=function(t,e,i,a){var s=String(n(t)),r="<"+e;return""!==i&&(r+=" "+i+'="'+String(a).replace(o,"&quot;")+'"'),r+">"+s+"</"+e+">"};t.exports=function(t,e){var i={};i[t]=e(r),a(a.P+a.F*s((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",i)}},b54a:function(t,e,i){"use strict";i("386b")("link",(function(t){return function(e){return t(this,"a","href",e)}}))},d3a1:function(t,e,i){"use strict";i("b54a"),i("7f7f");var a=function(){var t=this,e=t._self._c;return e("div",[e("a-modal",{staticClass:"invite-project-member",attrs:{width:500,title:t.actionInfo.modalTitle,footer:null},on:{cancel:t.cancel},model:{value:t.actionInfo.modalStatus,callback:function(e){t.$set(t.actionInfo,"modalStatus",e)},expression:"actionInfo.modalStatus"}},[e("div",{staticClass:"header"},[e("span",[t._v("账号邀请")]),e("a",{on:{click:t.createInviteLink}},[t._v("通过链接邀请")])]),e("div",{staticClass:"search-content m-b"},[e("a-input",{attrs:{placeholder:"输入昵称或邮箱查找"},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}},[e("a-icon",{attrs:{slot:"prefix",type:"search"},slot:"prefix"})],1)],1),e("vue-scroll",[e("div",{staticClass:"member-list"},[e("a-list",{staticClass:"project-list",attrs:{itemLayout:"horizontal",loading:t.searching,dataSource:t.list,locale:{emptyText:t.keyword&&t.keyword.length>1?"没有搜索到相关成员":""}},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{},[e("span",{attrs:{slot:"actions"},slot:"actions"},[i.joined?[e("a-icon",{attrs:{type:"user"}}),e("span",[t._v(" 已加入")])]:e("a-button",{attrs:{size:"small",type:"dashed",icon:"user-add"},on:{click:function(e){return t.invite(i)}}},[t._v("邀请")])],2),e("a-list-item-meta",{attrs:{description:i.email}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(i.name))]),e("a-avatar",{attrs:{slot:"avatar",icon:"user",src:i.avatar},slot:"avatar"})],1)],1)}}])})],1)])],1),e("a-modal",{staticClass:"invite-link",attrs:{width:600,title:t.linkInfo.modalTitle,footer:null},model:{value:t.linkInfo.modalStatus,callback:function(e){t.$set(t.linkInfo,"modalStatus",e)},expression:"linkInfo.modalStatus"}},[e("div",{staticClass:"header"},[e("p",[t._v("链接有效日期:"+t._s(t.linkInfo.overTime))]),e("a-input-search",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.linkInfo.link,expression:"linkInfo.link",arg:"copy"}],attrs:{size:"large",enterButton:"复制链接"},model:{value:t.linkInfo.link,callback:function(e){t.$set(t.linkInfo,"link",e)},expression:"linkInfo.link"}})],1)])],1)},s=[],n=(i("28a5"),i("386d"),i("c5f6"),i("2ef0")),o=i.n(n),r=i("c1df"),l=i.n(r),c=i("9f5d"),d=i("2f14"),u=i("82f8"),m={name:"inviteProjectMember",props:{value:{type:Boolean,default:function(){return!1}},projectCode:{type:[String,Number],default:function(){return""}}},data:function(){return{form:this.$form.createForm(this),actionInfo:{modalStatus:this.value,confirmLoading:!1,modalTitle:"邀请新成员"},linkInfo:{modalStatus:!1,confirmLoading:!1,modalTitle:"邀请成员",link:"",overTime:""},keyword:"",searching:!1,list:[]}},watch:{value:function(t){this.actionInfo.modalStatus=t},keyword:function(){this.search()}},created:function(){this.getMembers()},methods:{getMembers:function(){var t=this;Object(c["b"])({projectCode:t.projectCode}).then((function(e){t.list=e.data}))},invite:function(t){Object(c["c"])(t.memberCode,this.projectCode).then((function(e){var i=Object(d["a"])(e);i&&(t.joined=!0)}))},createInviteLink:function(){var t=this;this.linkInfo.link?this.linkInfo.modalStatus=!0:Object(u["b"])({inviteType:"project",sourceCode:this.projectCode}).then((function(e){var i=Object(d["a"])(e);i&&(t.linkInfo.modalStatus=!0,t.linkInfo.link=window.location.href.split("#")[0]+"#/invite_from_link/"+e.data.code,t.linkInfo.overTime=l()(e.data.code.over_time).format("YYYY年M月D日 HH:mm"))}))},search:o.a.debounce((function(){var t=this;if(this.keyword||(this.list=[]),this.keyword.length<=1)return this.getMembers(),!1;this.searching=!0,Object(c["f"])(this.keyword,this.projectCode).then((function(e){t.searching=!1,t.list=e.data}))}),500),cancel:function(){this.actionInfo.modalStatus=!1,this.$emit("input",this.actionInfo.modalStatus)}}},f=m,h=(i("2435"),i("2877")),v=Object(h["a"])(f,a,s,!1,null,null,null);e["a"]=v.exports},d8bc:function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"a",(function(){return n}));var a=i("22b6");function s(t){return a["a"].post("project/task_member",t)}function n(t){return a["a"].post("project/task_member/inviteMemberBatch",t)}},e9e0:function(t,e,i){},f66c:function(t,e,i){"use strict";i("7f7f");var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"member-menu"},[e("a-spin",{attrs:{spinning:t.listLoading||t.doListLoading}},[e("div",{staticClass:"search-content"},[e("a-input",{attrs:{size:"large",placeholder:"搜索"},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}},[e("a-icon",{attrs:{slot:"prefix",type:"search"},slot:"prefix"})],1)],1),e("div",{staticClass:"member-list"},[e("vue-scroll",[e("div",{directives:[{name:"show",rawName:"v-show",value:!t.keyword,expression:"!keyword"}],staticClass:"list-group"},[e("span",{staticClass:"title muted"},[t._v("执行者")]),t.doList.length||t.doListLoading?t._e():e("div",{staticClass:"member-list-item ant-list-item",on:{click:function(e){return t.assignTask(null)}}},[e("div",{staticClass:"ant-list-item-meta"},[e("div",{staticClass:"ant-list-item-meta-avatar"},[e("a-avatar",{attrs:{icon:"user"}})],1),e("div",{staticClass:"ant-list-item-meta-content"},[e("h4",{staticClass:"ant-list-item-meta-title"},[e("span",[t._v("未设置")])])])]),e("ul",{staticClass:"ant-list-item-action"},[e("li",[e("span",[e("a-icon",{attrs:{type:"check"}})],1)])])]),e("a-list",{directives:[{name:"show",rawName:"v-show",value:t.doList.length,expression:"doList.length"}],staticClass:"list-content",attrs:{itemLayout:"horizontal",dataSource:t.doList},scopedSlots:t._u([{key:"renderItem",fn:function(i){return e("a-list-item",{staticClass:"member-list-item"},[e("span",{attrs:{slot:"actions"},slot:"actions"},[e("a-icon",{directives:[{name:"show",rawName:"v-show",value:t.showCheck(i),expression:"showCheck(item)"}],attrs:{type:"check"}})],1),e("a-list-item-meta",[e("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(i.name))]),e("a-avatar",{attrs:{slot:"avatar",icon:"user",src:i.avatar},slot:"avatar"})],1)],1)}}])})],1),e("div",{staticClass:"list-group"},[e("span",{staticClass:"title muted"},[t._v("其他成员")]),t.doList.length?e("div",{staticClass:"member-list-item ant-list-item",on:{click:function(e){return t.assignTask(null)}}},[e("div",{staticClass:"ant-list-item-meta"},[e("div",{staticClass:"ant-list-item-meta-avatar"},[e("a-avatar",{attrs:{icon:"user"}})],1),e("div",{staticClass:"ant-list-item-meta-content"},[e("h4",{staticClass:"ant-list-item-meta-title"},[e("span",[t._v("待认领")])])])])]):t._e(),e("a-list",{staticClass:"list-content",attrs:{itemLayout:"horizontal",dataSource:t.list,locale:{emptyText:t.keyword&&t.keyword.length>1?"该成员不在任务成员列表中,你可以邀请他进来":""}},scopedSlots:t._u([{key:"renderItem",fn:function(i){return t.showMember(i)?e("a-list-item",{staticClass:"member-list-item",nativeOn:{click:function(e){return t.assignTask(i.code,i)}}},[e("a-list-item-meta",[e("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(i.name))]),e("a-avatar",{attrs:{slot:"avatar",icon:"user",src:i.avatar},slot:"avatar"})],1)],1):t._e()}}],null,!0)})],1)])],1),e("div",{staticClass:"footer"},[e("a-button",{attrs:{type:"primary",size:"large",block:""},on:{click:t.inviteProjectMember}},[t._v("邀请新成员")])],1)])],1)},s=[],n=(i("ac6a"),i("386d"),i("c5f6"),i("2ef0")),o=i.n(n),r=i("9f5d"),l=i("d8bc"),c=i("b199"),d={name:"taskMemberMenu",props:{projectCode:{type:[String,Number],default:function(){return""}},taskCode:{type:[String,Number],default:function(){return""}},isCommit:{type:[Boolean],default:function(){return!0}}},data:function(){return{keyword:"",searching:!1,doListLoading:!1,listLoading:!1,showInviteMember:!1,doList:[],list:[],listTemp:[]}},created:function(){this.init()},watch:{keyword:function(){this.search()}},methods:{init:function(){var t=this;this.projectCode&&(this.listLoading=!0,Object(r["d"])({projectCode:this.projectCode,pageSize:300}).then((function(e){t.list=e.data.list,t.listTemp=e.data.list,t.listLoading=!1}))),this.taskCode&&(this.doListLoading=!0,Object(l["b"])({taskCode:this.taskCode,pageSize:300}).then((function(e){t.doList=e.data.list.filter((function(t){return t.is_executor})),t.doListLoading=!1})))},showMember:function(t){var e=!0;return this.doList.forEach((function(i){t.code==i.code&&(e=!1)})),e},showCheck:function(t){if(t.is_executor)return!0},assignTask:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.isCommit?Object(c["b"])({taskCode:this.taskCode,executorCode:t}).then((function(){e.$emit("close",i)})):this.$emit("close",i)},inviteProjectMember:function(){this.$emit("inviteProjectMember")},search:o.a.debounce((function(){var t=this;if(this.keyword=this.keyword.trim(),this.keyword||(this.list=JSON.parse(JSON.stringify(this.listTemp))),this.keyword.length<=1)return!1;this.searching=!0,this.list=this.list.filter((function(e){return-1!=e.name.indexOf(t.keyword)}))}),500)}},u=d,m=i("2877"),f=Object(m["a"])(u,a,s,!1,null,null,null);e["a"]=f.exports},f93e:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var a={PAGE_SIZE:20,PAGE_NUM:1,TASK_STATUS:[{id:0,name:"未开始",color:"rgba(0, 0, 0, 0.65)"},{id:1,name:"已完成",color:"#1890ff"},{id:2,name:"进行中",color:"#52c41a"},{id:3,name:"挂起",color:"#f5222d"},{id:4,name:"验收中",color:"#faad14"}]}}}]);