1 line
26 KiB
PHP
1 line
26 KiB
PHP
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-005cb6a0"],{"18c8":function(t,e,a){"use strict";a("6991")},"1b80":function(t,e,a){"use strict";e["a"]={data:function(){return{pagination:{page:1,pageSize:10,total:0,showTotal:function(t,e){return"共 ".concat(t," 条")}}}},computed:{requestData:function(){return{page:this.pagination.page,pageSize:this.pagination.pageSize}}},methods:{init:function(){},pageChange:function(t){this.pagination.page=t,this.requestData.page=t.current,this.init()}}}},"24d2":function(t,e,a){"use strict";a.d(e,"f",(function(){return i})),a.d(e,"l",(function(){return r})),a.d(e,"e",(function(){return o})),a.d(e,"g",(function(){return s})),a.d(e,"k",(function(){return c})),a.d(e,"i",(function(){return l})),a.d(e,"d",(function(){return d})),a.d(e,"j",(function(){return u})),a.d(e,"h",(function(){return m})),a.d(e,"c",(function(){return p})),a.d(e,"b",(function(){return f})),a.d(e,"a",(function(){return h}));var n=a("22b6");function i(t){return n["a"].post("project/project",t)}function r(t){return n["a"].post("project/project/selfList",t)}function o(t){var e="project/project/save";return t.projectCode&&(e="project/project/edit"),n["a"].post(e,t)}function s(t){return n["a"].post("project/project/quit",{projectCode:t})}function c(t){return n["a"].post("project/project/recycle",{projectCode:t})}function l(t){return n["a"].post("project/project/recovery",{projectCode:t})}function d(t){return n["a"].post("project/project/archive",{projectCode:t})}function u(t){return n["a"].post("project/project/recoveryArchive",{projectCode:t})}function m(t){return n["a"].post("project/project/read",{projectCode:t})}function p(t){return n["a"].post("project/project/analysis",t)}function f(t){return n["a"].post("project/project/_projectStats",t)}function h(t){return n["a"].post("project/project/_getProjectReport",t)}},"37a7":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("calendar")},i=[],r=(a("386d"),a("2ef0")),o=a.n(r),s=a("1b80"),c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"calendar-index",attrs:{id:"calendar-index"}},[a("div",{staticClass:"layout-item left"},[a("div",{staticClass:"left-content"},[a("div",{staticClass:"search-content"},[a("a-input",{ref:"keywordInput",attrs:{size:"large",placeholder:"搜索"},on:{pressEnter:t.search},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}},[a("a-icon",{staticClass:"muted",attrs:{slot:"prefix",type:"search"},slot:"prefix"}),t.keyword?a("a-icon",{staticClass:"muted",attrs:{slot:"suffix",type:"close-circle"},on:{click:t.emitEmpty},slot:"suffix"}):t._e()],1)],1),a("div",{staticClass:"content-item muted"},[t._v("成员")]),a("div",{staticClass:"members"},[a("a-checkbox-group",{model:{value:t.memberCodes,callback:function(e){t.memberCodes=e},expression:"memberCodes"}},[a("a-list",{staticClass:"publish-task-list",attrs:{itemLayout:"horizontal",dataSource:t.memberList},scopedSlots:t._u([{key:"renderItem",fn:function(e,n){return a("a-list-item",{},[a("a-list-item-meta",[a("div",{attrs:{slot:"title"},slot:"title"},[t._v("\n "+t._s(e.name)+"\n ")]),a("div",{staticStyle:{display:"flex","align-items":"center"},attrs:{slot:"avatar"},slot:"avatar"},[a("a-checkbox",{staticClass:"m-r-sm",attrs:{value:e.memberCode}}),a("a-avatar",{attrs:{src:e.avatar,alt:""}},[t._v(t._s(e.name))])],1)])],1)}}])})],1)],1)])]),a("div",{staticClass:"layout-item right"},[a("div",{staticClass:"calendar-content"},[a("a-calendar",{on:{panelChange:t.onPanelChange},scopedSlots:t._u([{key:"dateCellRender",fn:function(e){return a("ul",{staticClass:"events"},[a("li",{staticClass:"add-item",on:{click:function(a){return a.stopPropagation(),t.rowClick(null,"add",e)}}},[t._v("添加日程")]),t._l(t.list[e.format("YYYY-MM-DD")],(function(n,i){return[i<=3?a("a-popover",{key:n.id,attrs:{className:"calendar-pop",visible:n.visible,title:"",trigger:"click",getPopupContainer:t.getPopup}},[a("a",{attrs:{slot:"content"},slot:"content"},[a("a-card",{staticClass:"calendar-pop-detail",staticStyle:{width:"350px"},attrs:{size:"small"}},[a("div",{attrs:{slot:"title"},slot:"title"},[n.created_by!==t.currentMemberCode?[1==n.myStatus?a("span",{staticClass:"m-l-xs muted text-success"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle",theme:"filled"}}),t._v("已接受")],1):t._e(),2==n.myStatus?a("span",{staticClass:"m-l-xs muted text-error"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle",theme:"filled"}}),t._v("已拒绝")],1):t._e(),n.waitConfirm?[a("a",{staticClass:"m-l-xs muted",on:{click:function(e){return t.confirmJoinEvents(n,1)}}},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle"}}),t._v("接受")],1),a("a",{staticClass:"m-l muted",on:{click:function(e){return t.confirmJoinEvents(n,2)}}},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"minus-circle"}}),t._v("拒绝")],1)]:t._e()]:[t._v("\n 我组织的\n ")]],2),a("div",{attrs:{slot:"extra"},slot:"extra"},[n.created_by==t.currentMemberCode?[a("a-tooltip",{attrs:{title:"编辑日程"}},[a("a",{staticClass:"text-default",on:{click:function(e){return t.rowClick(n,"edit")}}},[a("a-icon",{attrs:{type:"edit"}})],1)]),a("a-tooltip",{attrs:{title:"取消日程"}},[a("a",{staticClass:"text-default",on:{click:function(e){return t.rowClick(n,"del")}}},[a("a-icon",{attrs:{type:"delete"}})],1)])]:t._e(),a("a-tooltip",{attrs:{title:"关闭面板"}},[a("a",{staticClass:"text-default"},[a("a-icon",{attrs:{type:"close"},on:{click:function(t){n.visible=!1}}})],1)])],2),a("div",{staticClass:"calendar-content"},[a("div",[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"profile"}}),t._v(t._s(n.title))],1),a("div",{staticStyle:{display:"flex","line-height":"30px","align-items":"center"}},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"clock-circle"}}),a("div",[t._v(t._s(t.moment(n.begin_time).format("YYYY年MM月DD日 HH:mm")))]),a("div",[t._v(" - ")]),a("div",[t._v(t._s(t.moment(n.end_time).format("YYYY年MM月DD日 HH:mm")))])],1),n.position?a("div",{staticClass:"line-item"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"environment"}}),t._v(t._s(n.position))],1):t._e(),n.description?[a("div",{staticClass:"line-item"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"flag"}}),t._v(t._s(n.description))],1)]:t._e(),a("div",{staticClass:"line-item"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"team"}}),t._l(n.memberList,(function(e){return[a("a-tooltip",{key:e.id,attrs:{title:e.memberInfo.name+" "+(e.is_owner?" · 组织者":e.status?1==e.status?" · 已接受":" · 已拒绝":" · 未响应")}},[a("a-tag",[t._v("\n "+t._s(e.memberInfo.name)+"\n ")])],1)]}))],2)],2)])],1),a("li",[i<=2?a("div",{on:{click:function(e){return e.stopPropagation(),t.showCalendarPop(n)}}},[t._v(t._s(n.title))]):t._e(),3==i?a("a-popover",{key:n.id,staticClass:"calendar-pop",attrs:{visible:n.visibleMore,title:"",trigger:"click",getPopupContainer:t.getPopup}},[a("a",{attrs:{slot:"content"},slot:"content"},[a("a-card",{staticClass:"calendar-pop-detail",staticStyle:{width:"350px"},attrs:{size:"small"}},[a("div",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.format("YYYY-MM-DD")))]),a("div",{attrs:{slot:"extra"},slot:"extra"},[a("a-tooltip",{attrs:{title:"关闭面板"}},[a("a",{staticClass:"text-default"},[a("a-icon",{attrs:{type:"close"},on:{click:function(t){n.visibleMore=!1,n.visibleInner=!1}}})],1)])],1),a("ul",{staticClass:"events"},[t._l(t.list[e.format("YYYY-MM-DD")],(function(e,r){return[i<=3?a("a-popover",{key:e.id,staticClass:"calendar-pop",attrs:{placement:"left",visible:e.visibleInner,title:"",trigger:"click",getPopupContainer:t.getPopup}},[a("a",{attrs:{slot:"content"},slot:"content"},[a("a-card",{staticClass:"calendar-pop-detail",staticStyle:{width:"350px"},attrs:{size:"small"}},[a("div",{attrs:{slot:"title"},slot:"title"},[n.created_by!==t.currentMemberCode?[1==e.myStatus?a("span",{staticClass:"m-l-xs muted text-success"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle",theme:"filled"}}),t._v("已接受")],1):t._e(),2==e.myStatus?a("span",{staticClass:"m-l-xs muted text-error"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle",theme:"filled"}}),t._v("已拒绝")],1):t._e(),e.waitConfirm?[a("a",{staticClass:"m-l-xs muted",on:{click:function(a){return t.confirmJoinEvents(e,1)}}},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"check-circle"}}),t._v("接受")],1),a("a",{staticClass:"m-l muted",on:{click:function(a){return t.confirmJoinEvents(e,2)}}},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"minus-circle"}}),t._v("拒绝")],1)]:t._e()]:[t._v("\n 我组织的\n ")]],2),a("div",{attrs:{slot:"extra"},slot:"extra"},[e.created_by==t.currentMemberCode?[a("a-tooltip",{attrs:{title:"编辑日程"}},[a("a",{staticClass:"text-default",on:{click:function(a){return t.rowClick(e,"edit")}}},[a("a-icon",{attrs:{type:"edit"}})],1)]),a("a-tooltip",{attrs:{title:"取消日程"}},[a("a",{staticClass:"text-default",on:{click:function(a){return t.rowClick(e,"del")}}},[a("a-icon",{attrs:{type:"delete"}})],1)])]:t._e(),a("a-tooltip",{attrs:{title:"关闭面板"}},[a("a",{staticClass:"text-default"},[a("a-icon",{attrs:{type:"close"},on:{click:function(t){e.visibleInner=!1}}})],1)])],2),a("div",{staticClass:"calendar-content"},[a("div",[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"profile"}}),t._v(t._s(e.title))],1),a("div",{staticStyle:{display:"flex","line-height":"30px","align-items":"center"}},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"clock-circle"}}),a("div",[t._v(t._s(t.moment(e.begin_time).format("YYYY年MM月DD日 HH:mm")))]),a("div",[t._v(" - ")]),a("div",[t._v(t._s(t.moment(e.end_time).format("YYYY年MM月DD日 HH:mm")))])],1),e.position?a("div",{staticClass:"line-item"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"environment"}}),t._v(t._s(e.position))],1):t._e(),e.description?[a("div",{staticClass:"line-item"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"flag"}}),t._v(t._s(e.description))],1)]:t._e(),a("div",{staticClass:"line-item"},[a("a-icon",{staticClass:"m-r-xs",attrs:{type:"team"}}),t._l(e.memberList,(function(e){return[a("a-tooltip",{key:e.id,attrs:{title:e.memberInfo.name+" "+(e.is_owner?" · 组织者":e.status?1==e.status?" · 已接受":" · 已拒绝":" · 未响应")}},[a("a-tag",[t._v("\n "+t._s(e.memberInfo.name)+"\n ")])],1)]}))],2)],2)])],1),a("li",[a("div",{on:{click:function(a){return a.stopPropagation(),t.showCalendarPopInner(e)}}},[t._v(t._s(e.title))])])]):t._e()]}))],2)])],1),3===i?a("div",{on:{click:function(e){return e.stopPropagation(),t.showCalendarPopMore(n)}}},[t._v("还有"+t._s(t.list[e.format("YYYY-MM-DD")].length-3)+"项...")]):t._e()]):t._e()],1)]):t._e()]}))],2)}},{key:"headerRender",fn:function(e){var n=e.value,i=(e.type,e.onChange);e.onTypeChange;return[a("div",{staticClass:"calendar-header"},[a("a-button",{staticClass:"m-r",attrs:{type:"dashed"},on:{click:function(e){return t.changeMonth(0,i)}}},[t._v("今天")]),a("a-button",{staticClass:"m-r",attrs:{shape:"circle"},on:{click:function(e){return t.changeMonth(-1,i)}}},[a("a-icon",{attrs:{type:"left"}})],1),a("span",{staticClass:"m-r",staticStyle:{"font-size":"16px"}},[t._v(t._s(n.format("YYYY年MM月")))]),a("a-button",{attrs:{shape:"circle"},on:{click:function(e){return t.changeMonth(1,i)}}},[a("a-icon",{attrs:{type:"right"}})],1),a("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?a("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")),u=(a("ac6a"),a("7514"),a("7f7f"),a("ade3")),m=a("1157"),p=a.n(m),f=a("c1df"),h=a.n(f),v=a("b39f"),b=a("2f62"),C=a("c24f"),g=a("2f14"),_=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("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"}},[a("a-spin",{attrs:{spinning:t.loading}},[a("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)}}},[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{span:24}},[a("a-form-model-item",{attrs:{label:"标题",prop:"title"}},[a("a-input",{model:{value:t.formData.title,callback:function(e){t.$set(t.formData,"title",e)},expression:"formData.title"}})],1)],1),a("a-col",{attrs:{span:24}},[a("a-row",{attrs:{gutter:16}},[a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{label:"开始时间",prop:"begin_time"}},[a("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),a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{label:"结束时间",prop:"end_time"}},[a("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),a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{label:"所属项目",prop:"memberList"}},[a("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(e){return[a("a-select-option",{key:e.code,attrs:{value:e.code}},[t._v("\n "+t._s(e.name)+"\n ")])]}))],2)],1)],1),a("a-col",{attrs:{span:12}},[a("a-form-model-item",{attrs:{label:"日程地点",prop:"position"}},[a("a-input",{model:{value:t.formData.position,callback:function(e){t.$set(t.formData,"position",e)},expression:"formData.position"}})],1)],1),a("a-col",{attrs:{span:24}},[a("a-form-model-item",{attrs:{label:"选择成员",prop:"memberList"}},[a("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(e){return[a("a-select-option",{key:e.code,attrs:{disabled:!t.canRemove(e.code),value:e.code,label:e.name}},[a("a-avatar",{staticClass:"m-r-sm",attrs:{size:24,icon:"user",src:e.avatar}}),t._v("\n "+t._s(e.name)+"\n ")],1)]}))],2)],1)],1),a("a-col",{attrs:{span:24}},[a("a-form-model-item",{attrs:{label:"备注",prop:"description"}},[a("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=[],j=a("24d2"),k=a("9f5d");function w(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 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(u["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:[s["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(j["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(k["d"])({projectCode:this.currentProjectCode,pageSize:300}).then((function(e){t.projectMemberList=e.data.list}))},getProjectList:function(){var t=this;Object(j["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 n=[];a.memberList.forEach((function(t){n.push(t.member_code)})),a.member_list=n,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(n){e.submitting=!1,Object(g["a"])(n,!0)&&(e.$emit("confirm",a),t.show=!1)}))},rowClick:function(){var t=Object(d["a"])(regeneratorRuntime.mark((function t(e,a){var n,i,r=arguments;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:r.length>2&&void 0!==r[2]?r[2]:null,n=this,n.formData.id=0,"add"==a||"edit"==a||"new"==a?(n.formData={id:0,title:void 0,description:void 0,begin_time:null,end_time:null,all_day:!1,project_code:n.$route.params.code,position:void 0,member_list:[n.currentMemberCode]},n.actionInfo.modalTitle="新增日程","edit"==a&&(n.actionInfo.modalTitle="编辑日程",n.formData.id=e.id,i=[],e.memberList.forEach((function(t){i.push(t.member_code)})),e.member_list=i,n.formData=x({},e)),n.actionInfo.modalStatus=!0,n.$nextTick((function(){n.$refs.ruleForm.clearValidate()}))):"del"==a&&n.$confirm({title:"确定要删除?",content:"关联的相关信息将会同时被删除",okText:"确定",okType:"danger",cancelText:"放弃",onOk:function(){Object(v["b"])({eventsCode:e.code}).then((function(t){Object(g["a"])(t,!0)&&n.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,_,y,!1,null,null,null),P=Y.exports;function L(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?L(Object(a),!0).forEach((function(e){Object(u["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:[s["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:o.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(){p()(".ant-fullcalendar-date").hover((function(){p()(".add-item").hide(),p()(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(n){Object(g["a"])(n)&&(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){o.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){o.a.forIn(this.list,(function(t){t.forEach((function(t){t.visible=!1,t.visibleInner=!1}))})),t&&(t.visibleInner=!0)},showCalendarPopMore:function(t){o.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,n){var i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:i=this,this.eventsDate=n||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?(i.eventsCode="","edit"==a&&(i.eventsCode=e.code),i.eventsModal=!0):"del"==a&&i.$confirm({title:"确定要删除?",content:"关联的相关信息将会同时被删除",okText:"确定",okType:"danger",cancelText:"放弃",onOk:function(){Object(v["b"])({eventsCode:e.code}).then((function(t){Object(g["a"])(t,!0)&&i.init(!0)}))}});case 5:case"end":return t.stop()}}),t,this)})));function e(e,a,n){return t.apply(this,arguments)}return e}(),getPopup:function(){return document.getElementById("calendar-index")}}},E=I,T=(a("18c8"),Object(O["a"])(E,c,l,!1,null,null,null)),$=T.exports,H={name:"CommonCalendar",components:{calendar:$},mixins:[s["a"]],data:function(){return{keyword:"",selectedKeys:["0"]}},watch:{keyword:function(){this.search()}},created:function(){},methods:{}},V=H,z=Object(O["a"])(V,n,i,!1,null,null,null);e["default"]=z.exports},6991:function(t,e,a){},b39f:function(t,e,a){"use strict";a.d(e,"e",(function(){return i})),a.d(e,"f",(function(){return r})),a.d(e,"g",(function(){return o})),a.d(e,"a",(function(){return s})),a.d(e,"d",(function(){return c})),a.d(e,"c",(function(){return l})),a.d(e,"b",(function(){return d}));var n=a("22b6");function i(t){return n["a"].post("project/events",t)}function r(t){return n["a"].post("project/events/myList",t)}function o(t){return n["a"].post("project/events/read",t)}function s(t){return n["a"].post("project/events/confirmJoin",t)}function c(t){return n["a"].post("project/events/getEventsListByCalendar",t)}function l(t){var e="project/events/save";return t.code&&(e="project/events/edit"),n["a"].post(e,t)}function d(t){return n["a"].post("project/events/delete",t)}}}]); |