1 line
24 KiB
PHP
1 line
24 KiB
PHP
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5dd25288"],{"37a7":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("calendar")},n=[],s=(a("386d"),a("2ef0")),r=a.n(s),o=a("1b80"),c=(a("7f7f"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"calendar-index",attrs:{id:"calendar-index"}},[e("div",{staticClass:"layout-item left"},[e("div",{staticClass:"left-content"},[e("div",{staticClass:"search-content"},[e("a-input",{ref:"keywordInput",attrs:{size:"large",placeholder:"搜索"},on:{pressEnter:t.search},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}},[e("a-icon",{staticClass:"muted",attrs:{slot:"prefix",type:"search"},slot:"prefix"}),t.keyword?e("a-icon",{staticClass:"muted",attrs:{slot:"suffix",type:"close-circle"},on:{click:t.emitEmpty},slot:"suffix"}):t._e()],1)],1),e("div",{staticClass:"content-item muted"},[t._v("成员")]),e("div",{staticClass:"members"},[e("a-checkbox-group",{model:{value:t.memberCodes,callback:function(e){t.memberCodes=e},expression:"memberCodes"}},[e("a-list",{staticClass:"publish-task-list",attrs:{itemLayout:"horizontal",dataSource:t.memberList},scopedSlots:t._u([{key:"renderItem",fn:function(a,i){return e("a-list-item",{},[e("a-list-item-meta",[e("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n "+t._s(a.name)+"\n ")]),e("div",{staticStyle:{display:"flex","align-items":"center"},attrs:{slot:"avatar"},slot:"avatar"},[e("a-checkbox",{staticClass:"m-r-sm",attrs:{value:a.memberCode}}),e("a-avatar",{attrs:{src:a.avatar,alt:""}},[t._v(t._s(a.name))])],1)])],1)}}])})],1)],1)])]),e("div",{staticClass:"layout-item right"},[e("div",{staticClass:"calendar-content"},[e("a-calendar",{on:{panelChange:t.onPanelChange},scopedSlots:t._u([{key:"dateCellRender",fn:function(a){return e("ul",{staticClass:"events"},[e("li",{staticClass:"add-item",on:{click:function(e){return e.stopPropagation(),t.rowClick(null,"add",a)}}},[t._v("添加日程")]),t._l(t.list[a.format("YYYY-MM-DD")],(function(i,n){return[n<=3?e("a-popover",{key:i.id,attrs:{className:"calendar-pop",visible:i.visible,title:"",trigger:"click",getPopupContainer:t.getPopup}},[e("a",{attrs:{slot:"content"},slot:"content"},[e("a-card",{staticClass:"calendar-pop-detail",staticStyle:{width:"350px"},attrs:{size:"small"}},[e("div",{attrs:{slot:"title"},slot:"title"},[i.created_by!==t.currentMemberCode?[1==i.myStatus?e("span",{staticClass:"m-l-xs muted text-success"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle",theme:"filled"}}),t._v("已接受")],1):t._e(),2==i.myStatus?e("span",{staticClass:"m-l-xs muted text-error"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle",theme:"filled"}}),t._v("已拒绝")],1):t._e(),i.waitConfirm?[e("a",{staticClass:"m-l-xs muted",on:{click:function(e){return t.confirmJoinEvents(i,1)}}},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle"}}),t._v("接受")],1),e("a",{staticClass:"m-l muted",on:{click:function(e){return t.confirmJoinEvents(i,2)}}},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"minus-circle"}}),t._v("拒绝")],1)]:t._e()]:[t._v("\n 我组织的\n ")]],2),e("div",{attrs:{slot:"extra"},slot:"extra"},[i.created_by==t.currentMemberCode?[e("a-tooltip",{attrs:{title:"编辑日程"}},[e("a",{staticClass:"text-default",on:{click:function(e){return t.rowClick(i,"edit")}}},[e("a-icon",{attrs:{type:"edit"}})],1)]),e("a-tooltip",{attrs:{title:"取消日程"}},[e("a",{staticClass:"text-default",on:{click:function(e){return t.rowClick(i,"del")}}},[e("a-icon",{attrs:{type:"delete"}})],1)])]:t._e(),e("a-tooltip",{attrs:{title:"关闭面板"}},[e("a",{staticClass:"text-default"},[e("a-icon",{attrs:{type:"close"},on:{click:function(t){i.visible=!1}}})],1)])],2),e("div",{staticClass:"calendar-content"},[e("div",[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"profile"}}),t._v(t._s(i.title))],1),e("div",{staticStyle:{display:"flex","line-height":"30px","align-items":"center"}},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"clock-circle"}}),e("div",[t._v(t._s(t.moment(i.begin_time).format("YYYY年MM月DD日 HH:mm")))]),e("div",[t._v(" - ")]),e("div",[t._v(t._s(t.moment(i.end_time).format("YYYY年MM月DD日 HH:mm")))])],1),i.position?e("div",{staticClass:"line-item"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"environment"}}),t._v(t._s(i.position))],1):t._e(),i.description?[e("div",{staticClass:"line-item"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"flag"}}),t._v(t._s(i.description))],1)]:t._e(),e("div",{staticClass:"line-item"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"team"}}),t._l(i.memberList,(function(a){return[e("a-tooltip",{key:a.id,attrs:{title:"".concat(a.memberInfo.name," ").concat(a.is_owner?" · 组织者":a.status?1==a.status?" · 已接受":" · 已拒绝":" · 未响应")}},[e("a-tag",[t._v("\n "+t._s(a.memberInfo.name)+"\n ")])],1)]}))],2)],2)])],1),e("li",[n<=2?e("div",{on:{click:function(e){return e.stopPropagation(),t.showCalendarPop(i)}}},[t._v(t._s(i.title))]):t._e(),3==n?e("a-popover",{key:i.id,staticClass:"calendar-pop",attrs:{visible:i.visibleMore,title:"",trigger:"click",getPopupContainer:t.getPopup}},[e("a",{attrs:{slot:"content"},slot:"content"},[e("a-card",{staticClass:"calendar-pop-detail",staticStyle:{width:"350px"},attrs:{size:"small"}},[e("div",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(a.format("YYYY-MM-DD")))]),e("div",{attrs:{slot:"extra"},slot:"extra"},[e("a-tooltip",{attrs:{title:"关闭面板"}},[e("a",{staticClass:"text-default"},[e("a-icon",{attrs:{type:"close"},on:{click:function(t){i.visibleMore=!1,i.visibleInner=!1}}})],1)])],1),e("ul",{staticClass:"events"},[t._l(t.list[a.format("YYYY-MM-DD")],(function(a,s){return[n<=3?e("a-popover",{key:a.id,staticClass:"calendar-pop",attrs:{placement:"left",visible:a.visibleInner,title:"",trigger:"click",getPopupContainer:t.getPopup}},[e("a",{attrs:{slot:"content"},slot:"content"},[e("a-card",{staticClass:"calendar-pop-detail",staticStyle:{width:"350px"},attrs:{size:"small"}},[e("div",{attrs:{slot:"title"},slot:"title"},[i.created_by!==t.currentMemberCode?[1==a.myStatus?e("span",{staticClass:"m-l-xs muted text-success"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle",theme:"filled"}}),t._v("已接受")],1):t._e(),2==a.myStatus?e("span",{staticClass:"m-l-xs muted text-error"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle",theme:"filled"}}),t._v("已拒绝")],1):t._e(),a.waitConfirm?[e("a",{staticClass:"m-l-xs muted",on:{click:function(e){return t.confirmJoinEvents(a,1)}}},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle"}}),t._v("接受")],1),e("a",{staticClass:"m-l muted",on:{click:function(e){return t.confirmJoinEvents(a,2)}}},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"minus-circle"}}),t._v("拒绝")],1)]:t._e()]:[t._v("\n 我组织的\n ")]],2),e("div",{attrs:{slot:"extra"},slot:"extra"},[a.created_by==t.currentMemberCode?[e("a-tooltip",{attrs:{title:"编辑日程"}},[e("a",{staticClass:"text-default",on:{click:function(e){return t.rowClick(a,"edit")}}},[e("a-icon",{attrs:{type:"edit"}})],1)]),e("a-tooltip",{attrs:{title:"取消日程"}},[e("a",{staticClass:"text-default",on:{click:function(e){return t.rowClick(a,"del")}}},[e("a-icon",{attrs:{type:"delete"}})],1)])]:t._e(),e("a-tooltip",{attrs:{title:"关闭面板"}},[e("a",{staticClass:"text-default"},[e("a-icon",{attrs:{type:"close"},on:{click:function(t){a.visibleInner=!1}}})],1)])],2),e("div",{staticClass:"calendar-content"},[e("div",[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"profile"}}),t._v(t._s(a.title))],1),e("div",{staticStyle:{display:"flex","line-height":"30px","align-items":"center"}},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"clock-circle"}}),e("div",[t._v(t._s(t.moment(a.begin_time).format("YYYY年MM月DD日 HH:mm")))]),e("div",[t._v(" - ")]),e("div",[t._v(t._s(t.moment(a.end_time).format("YYYY年MM月DD日 HH:mm")))])],1),a.position?e("div",{staticClass:"line-item"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"environment"}}),t._v(t._s(a.position))],1):t._e(),a.description?[e("div",{staticClass:"line-item"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"flag"}}),t._v(t._s(a.description))],1)]:t._e(),e("div",{staticClass:"line-item"},[e("a-icon",{staticClass:"m-r-xs",attrs:{type:"team"}}),t._l(a.memberList,(function(a){return[e("a-tooltip",{key:a.id,attrs:{title:"".concat(a.memberInfo.name," ").concat(a.is_owner?" · 组织者":a.status?1==a.status?" · 已接受":" · 已拒绝":" · 未响应")}},[e("a-tag",[t._v("\n "+t._s(a.memberInfo.name)+"\n ")])],1)]}))],2)],2)])],1),e("li",[e("div",{on:{click:function(e){return e.stopPropagation(),t.showCalendarPopInner(a)}}},[t._v(t._s(a.title))])])]):t._e()]}))],2)])],1),3===n?e("div",{on:{click:function(e){return e.stopPropagation(),t.showCalendarPopMore(i)}}},[t._v("还有"+t._s(t.list[a.format("YYYY-MM-DD")].length-3)+"项...")]):t._e()]):t._e()],1)]):t._e()]}))],2)}},{key:"headerRender",fn:function(a){var i=a.value,n=(a.type,a.onChange);a.onTypeChange;return[e("div",{staticClass:"calendar-header"},[e("a-button",{staticClass:"m-r",attrs:{type:"dashed"},on:{click:function(e){return t.changeMonth(0,n)}}},[t._v("今天")]),e("a-button",{staticClass:"m-r",attrs:{shape:"circle"},on:{click:function(e){return t.changeMonth(-1,n)}}},[e("a-icon",{attrs:{type:"left"}})],1),e("span",{staticClass:"m-r",staticStyle:{"font-size":"16px"}},[t._v(t._s(i.format("YYYY年MM月")))]),e("a-button",{attrs:{shape:"circle"},on:{click:function(e){return t.changeMonth(1,n)}}},[e("a-icon",{attrs:{type:"right"}})],1),e("a-button",{staticClass:"m-l",attrs:{type:"primary"},on:{click:function(e){return t.rowClick(null,"add")}}},[t._v("添加日程")])],1)]}}]),model:{value:t.calendarValue,callback:function(e){t.calendarValue=e},expression:"calendarValue"}})],1)]),t.eventsModal?e("events",{attrs:{visible:t.eventsModal,code:t.eventsCode,date:t.eventsDate,"project-code":t.code},on:{"update:visible":function(e){t.eventsModal=e},confirm:t.eventsConfirm}}):t._e()],1)}),l=[],d=(a("8e6e"),a("456d"),a("96cf"),a("1da1")),m=(a("ac6a"),a("7514"),a("ade3")),u=a("1157"),f=a.n(u),p=a("c1df"),h=a.n(p),v=a("b39f"),b=a("2f62"),C=a("c24f"),_=a("2f14"),g=function(){var t=this,e=t._self._c;return e("a-modal",{attrs:{wrapClassName:"events",dialogClass:"vertical-modal",destroyOnClose:"",maskClosable:!1,title:t.actionInfo.modalTitle,confirmLoading:t.submitting},on:{ok:t.handleSubmit},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("a-spin",{attrs:{spinning:t.loading}},[e("a-form-model",{ref:"ruleForm",staticClass:"m-b",attrs:{model:t.formData,rules:t.rules},on:{submit:function(e){return e.preventDefault(),t.handleSubmit.apply(null,arguments)}}},[e("a-row",{attrs:{gutter:16}},[e("a-col",{attrs:{span:24}},[e("a-form-model-item",{attrs:{label:"标题",prop:"title"}},[e("a-input",{model:{value:t.formData.title,callback:function(e){t.$set(t.formData,"title",e)},expression:"formData.title"}})],1)],1),e("a-col",{attrs:{span:24}},[e("a-row",{attrs:{gutter:16}},[e("a-col",{attrs:{span:12}},[e("a-form-model-item",{attrs:{label:"开始时间",prop:"begin_time"}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{showTime:"",format:"YYYY年MM月DD日 HH:mm",placeholder:"选择开始时间"},model:{value:t.formData.begin_time,callback:function(e){t.$set(t.formData,"begin_time",e)},expression:"formData.begin_time"}})],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-model-item",{attrs:{label:"结束时间",prop:"end_time"}},[e("a-date-picker",{staticStyle:{width:"100%"},attrs:{showTime:"",format:"YYYY年MM月DD日 HH:mm",placeholder:"选择结束时间"},model:{value:t.formData.end_time,callback:function(e){t.$set(t.formData,"end_time",e)},expression:"formData.end_time"}})],1)],1)],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-model-item",{attrs:{label:"所属项目",prop:"memberList"}},[e("a-select",{staticStyle:{width:"100%"},attrs:{allowClear:"",showSearch:"",disabled:!!t.formData.id,autoClearSearchValue:""},on:{change:t.projectChange},model:{value:t.formData.project_code,callback:function(e){t.$set(t.formData,"project_code",e)},expression:"formData.project_code"}},[t._l(t.projectList,(function(a){return[e("a-select-option",{key:a.code,attrs:{value:a.code}},[t._v("\n "+t._s(a.name)+"\n ")])]}))],2)],1)],1),e("a-col",{attrs:{span:12}},[e("a-form-model-item",{attrs:{label:"日程地点",prop:"position"}},[e("a-input",{model:{value:t.formData.position,callback:function(e){t.$set(t.formData,"position",e)},expression:"formData.position"}})],1)],1),e("a-col",{attrs:{span:24}},[e("a-form-model-item",{attrs:{label:"选择成员",prop:"memberList"}},[e("a-select",{staticStyle:{width:"100%"},attrs:{allowClear:"",showSearch:"",autoClearSearchValue:"",maxTagCount:4,optionLabelProp:"label",mode:"multiple"},model:{value:t.formData.member_list,callback:function(e){t.$set(t.formData,"member_list",e)},expression:"formData.member_list"}},[t._l(t.projectMemberList,(function(a){return[e("a-select-option",{key:a.code,attrs:{disabled:!t.canRemove(a.code),value:a.code,label:a.name}},[e("a-avatar",{staticClass:"m-r-sm",attrs:{size:24,icon:"user",src:a.avatar}}),t._v("\n "+t._s(a.name)+"\n ")],1)]}))],2)],1)],1),e("a-col",{attrs:{span:24}},[e("a-form-model-item",{attrs:{label:"备注",prop:"description"}},[e("a-textarea",{attrs:{rows:4,placeholder:"填写备注,不超过250字"},model:{value:t.formData.description,callback:function(e){t.$set(t.formData,"description",e)},expression:"formData.description"}})],1)],1)],1)],1)],1)],1)},y=[],k=a("24d2"),j=a("9f5d");function w(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function x(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?w(Object(a),!0).forEach((function(e){Object(m["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):w(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var D={name:"events",mixins:[o["a"]],props:{code:{default:0},projectCode:{default:0},date:{default:h()()},visible:{default:!1}},data:function(){return{moment:h.a,currentMemberCode:this.$store.state.userInfo.code,currentProjectCode:this.projectCode,loading:!0,showLoadingMore:!1,loadingMore:!1,show:this.visible,submitting:!1,projectList:[],projectMemberList:[],actionInfo:{modalStatus:!1,confirmLoading:!1,modalTitle:"新建日程",okText:"确定",cancelText:"放弃"},formData:{id:0,title:void 0,description:void 0,begin_time:this.date,end_time:this.date,all_day:!1,project_code:this.$route.params.code,position:void 0,member_list:[]},rules:{title:[{required:!0,message:"请选择必填项",trigger:"blur"}],project_code:[{required:!0,message:"请选择必填项",trigger:"blur"}],begin_time:[{required:!0,message:"请选择开始时间",trigger:"change"}],end_time:[{required:!0,message:"请选择结束时间",trigger:"change"}]}}},watch:{visible:function(t){this.show=t,t&&this.init()},show:{handler:function(t){this.$emit("update:visible",t)},deep:!0}},mounted:function(){this.init()},methods:{getProject:function(){var t=this;if(this.loading=!0,!this.currentProjectCode)return this.loading=!1,!1;Object(k["h"])(this.currentProjectCode).then((function(e){t.loading=!1,t.project=e.data,t.$store.dispatch("setTempData",{projectCode:t.project.code})}))},getProjectMemberList:function(){var t=this;Object(j["d"])({projectCode:this.currentProjectCode,pageSize:300}).then((function(e){t.projectMemberList=e.data.list}))},getProjectList:function(){var t=this;Object(k["l"])({archive:0,pageSize:300}).then((function(e){t.loading=!1,t.projectList=e.data.list,t.projectList.length&&!t.currentProjectCode&&(t.currentProjectCode=t.projectList[0].code,t.projectChange(t.currentProjectCode))}))},init:function(){var t=this;this.currentProjectCode&&(this.getProject(),this.getProjectMemberList()),this.getProjectList(),this.code?(t.actionInfo.modalTitle="编辑日程",Object(v["g"])({eventsCode:this.code}).then((function(e){var a=e.data;t.formData.id=a.id;var i=[];a.memberList.forEach((function(t){i.push(t.member_code)})),a.member_list=i,t.formData=x({},a)}))):(t.actionInfo.modalTitle="新建日程",t.formData={id:0,title:void 0,description:void 0,begin_time:this.date,end_time:this.date,all_day:!1,project_code:this.currentProjectCode,position:void 0,member_list:[t.currentMemberCode]})},projectChange:function(t,e){this.currentProjectCode=t,this.formData.project_code=t,this.formData.member_list=[this.currentMemberCode],this.getProjectMemberList()},handleSubmit:function(){var t=this;t.$refs.ruleForm.validate((function(e){if(!e)return console.log("error submit!!"),!1;t.handleOk()}))},handleOk:function(){var t=this,e=this;e.submitting=!0;var a=x({},e.formData);console.log(a),a.member_list=JSON.stringify(a.member_list),a.begin_time=h()(a.begin_time).format("YYYY-MM-DD HH:mm:ss"),a.end_time=h()(a.end_time).format("YYYY-MM-DD HH:mm:ss"),Object(v["c"])(a).then((function(i){e.submitting=!1,Object(_["a"])(i,!0)&&(e.$emit("confirm",a),t.show=!1)}))},rowClick:function(){var t=Object(d["a"])(regeneratorRuntime.mark((function t(e,a){var i,n,s=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:s.length>2&&void 0!==s[2]?s[2]:null,i=this,i.formData.id=0,"add"==a||"edit"==a||"new"==a?(i.formData={id:0,title:void 0,description:void 0,begin_time:null,end_time:null,all_day:!1,project_code:i.$route.params.code,position:void 0,member_list:[i.currentMemberCode]},i.actionInfo.modalTitle="新增日程","edit"==a&&(i.actionInfo.modalTitle="编辑日程",i.formData.id=e.id,n=[],e.memberList.forEach((function(t){n.push(t.member_code)})),e.member_list=n,i.formData=x({},e)),i.actionInfo.modalStatus=!0,i.$nextTick((function(){i.$refs.ruleForm.clearValidate()}))):"del"==a&&i.$confirm({title:"确定要删除?",content:"关联的相关信息将会同时被删除",okText:"确定",okType:"danger",cancelText:"放弃",onOk:function(){Object(v["b"])({eventsCode:e.code}).then((function(t){Object(_["a"])(t,!0)&&i.init(!0)}))}});case 4:case"end":return t.stop()}}),t,this)})));function e(e,a){return t.apply(this,arguments)}return e}(),canRemove:function(t){if(console.log(this.formData.memberList),this.formData.memberList){var e=this.formData.memberList.find((function(e){return e.member_code==t}));return!e||!e.is_owner}return t!==this.currentMemberCode}}},M=D,O=a("2877"),Y=Object(O["a"])(M,g,y,!1,null,null,null),P=Y.exports;function L(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function S(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?L(Object(a),!0).forEach((function(e){Object(m["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):L(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var I={name:"calendar",components:{events:P},mixins:[o["a"]],data:function(){return{moment:h.a,keyword:"",memberCodes:[],begin:"",calendarValue:h()(),showData:!1,list:[],memberList:[],memberListTemp:[],currentMemberCode:this.$store.state.userInfo.code,eventsModal:!1,eventsCode:"",eventsDate:h()(),code:""}},computed:S({},Object(b["c"])({userInfo:function(t){return t.userInfo}})),watch:{keyword:function(){this.search()},memberCodes:function(){this.getEventsListByCalendar(this.calendarValue)}},created:function(){this.memberCodes.push(this.userInfo.code),this.getEventsListByCalendar(this.calendarValue),this.getMemberList()},mounted:function(){this.$nextTick((function(){window.scrollTo(0,0)}))},methods:{search:r.a.debounce((function(){var t=this;if(this.keyword=this.keyword.trim(),this.keyword||(this.memberList=JSON.parse(JSON.stringify(this.memberListTemp))),this.keyword.length<=1)return!1;this.memberList=this.memberList.filter((function(e){return-1!=e.name.indexOf(t.keyword)}))}),500),eventsConfirm:function(){this.getEventsListByCalendar(this.calendarValue)},changeMonth:function(t,e){console.log(t),t?(this.calendarValue.add(t,"months"),e(this.calendarValue)):(this.calendarValue=h()(),e(this.calendarValue)),this.calendarValue=h()(this.calendarValue.format("YYYY-MM-DD"))},getListData:function(t){var e=t.format("YYYY-MM-DD"),a=this.list[e];return a||[]},onPanelChange:function(t,e){console.log(t,e),this.getEventsListByCalendar(t)},getEventsListByCalendar:function(t){var e=this,a={date:t.format("YYYY-MM-DD HH:mm:ss"),memberCodes:JSON.stringify(this.memberCodes)};console.log(a),Object(v["d"])(a).then((function(t){e.list=t.data.list,e.$nextTick((function(){f()(".ant-fullcalendar-date").hover((function(){f()(".add-item").hide(),f()(this).find(".add-item").show()}))}))}))},getMemberList:function(){var t=this;Object(C["b"])(this.requestData).then((function(e){t.memberList=e.data,t.memberListTemp=e.data}))},emitEmpty:function(){this.$refs.keywordInput.focus(),this.keyword="",this.requestData.keyword=""},confirmJoinEvents:function(t,e){var a=this;Object(v["a"])({eventsCode:t.code,status:e}).then((function(i){Object(_["a"])(i)&&(t.waitConfirm=0,t.myStatus=e,t.memberList.forEach((function(t){t.member_code==a.$store.state.userInfo.code&&(t.status=e)})))}))},showCalendarPop:function(t){r.a.forIn(this.list,(function(t){t.forEach((function(t){t.visible=!1,t.visibleMore=!1,t.visibleInner=!1}))})),t&&(t.visible=!0)},showCalendarPopInner:function(t){r.a.forIn(this.list,(function(t){t.forEach((function(t){t.visible=!1,t.visibleInner=!1}))})),t&&(t.visibleInner=!0)},showCalendarPopMore:function(t){r.a.forIn(this.list,(function(t){t.forEach((function(t){t.visibleMore=!1,t.visible=!1,t.visibleInner=!1}))})),t&&(t.visibleMore=!0)},rowClick:function(){var t=Object(d["a"])(regeneratorRuntime.mark((function t(e,a,i){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n=this,this.eventsDate=i||h()(),e?(e.visible=!1,e.visibleInner=!1,e.visibleMore=!1,this.code=e.project_code):this.code="",console.log(e),"add"==a||"edit"==a||"new"==a?(n.eventsCode="","edit"==a&&(n.eventsCode=e.code),n.eventsModal=!0):"del"==a&&n.$confirm({title:"确定要删除?",content:"关联的相关信息将会同时被删除",okText:"确定",okType:"danger",cancelText:"放弃",onOk:function(){Object(v["b"])({eventsCode:e.code}).then((function(t){Object(_["a"])(t,!0)&&n.init(!0)}))}});case 5:case"end":return t.stop()}}),t,this)})));function e(e,a,i){return t.apply(this,arguments)}return e}(),getPopup:function(){return document.getElementById("calendar-index")}}},T=I,E=(a("fd9f"),Object(O["a"])(T,c,l,!1,null,null,null)),$=E.exports,H={name:"CommonCalendar",components:{calendar:$},mixins:[o["a"]],data:function(){return{keyword:"",selectedKeys:["0"]}},watch:{keyword:function(){this.search()}},created:function(){},methods:{}},V=H,J=Object(O["a"])(V,i,n,!1,null,null,null);e["default"]=J.exports},"7fa3":function(t,e,a){},b39f:function(t,e,a){"use strict";a.d(e,"e",(function(){return n})),a.d(e,"f",(function(){return s})),a.d(e,"g",(function(){return r})),a.d(e,"a",(function(){return o})),a.d(e,"d",(function(){return c})),a.d(e,"c",(function(){return l})),a.d(e,"b",(function(){return d}));var i=a("22b6");function n(t){return i["a"].post("project/events",t)}function s(t){return i["a"].post("project/events/myList",t)}function r(t){return i["a"].post("project/events/read",t)}function o(t){return i["a"].post("project/events/confirmJoin",t)}function c(t){return i["a"].post("project/events/getEventsListByCalendar",t)}function l(t){var e="project/events/save";return t.code&&(e="project/events/edit"),i["a"].post(e,t)}function d(t){return i["a"].post("project/events/delete",t)}},fd9f:function(t,e,a){"use strict";a("7fa3")}}]); |