(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5438145d"],{"626e":function(e,t,r){},9508:function(e,t,r){},a573:function(e,t,r){"use strict";r("626e")},c5ee:function(e,t,r){"use strict";r("9508")},caae:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"dashboard-container"},[r("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"element-loading-background":"rgba(255, 255, 255)"}},[r("div",{staticStyle:{"text-align":"center"},attrs:{slot:"header"},slot:"header"},[e._v("工程师状态列表")]),r("div",{staticClass:"change-month-button-group"},[r("el-form",{attrs:{inline:!0}},[r("el-form-item",{staticClass:"department-select-span",attrs:{label:"部 门"}},[r("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){return e.getTableDataByDept(e.year,e.month)}},model:{value:e.departmentId,callback:function(t){e.departmentId=t},expression:"departmentId"}},e._l(e.departmentList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.deptName,value:e.id}})})),1)],1),r("el-form-item",{staticClass:"department-select-span",attrs:{label:"技能查询"}},[r("div",{staticClass:"block"},[r("el-cascader",{staticStyle:{height:"36px",width:"350px"},attrs:{placeholder:"试试搜索:指南",size:"medium ",options:e.options,props:e.props,filterable:"",clearable:"","collapse-tags":e.collapseTags,"max-collapse-tags":e.maxCount,"popper-class":"dropDownPanel"},model:{value:e.skillSearchList,callback:function(t){e.skillSearchList=t},expression:"skillSearchList"}})],1)]),r("el-form-item",[r("el-button",{attrs:{type:"info",plain:""},on:{click:e.handleSearch}},[e._v("查询")])],1),r("el-button",{staticClass:"siemens-button",attrs:{type:"primary",icon:"el-icon-refresh-right"},on:{click:e.resetDepartmentSearch}},[e._v("查看全部")])],1),r("el-button-group",[r("el-button",{staticClass:"siemens-button",attrs:{type:"primary",icon:"el-icon-arrow-left"},on:{click:e.lastmonth}},[e._v("上一月")]),r("el-button",{staticClass:"siemens-button",attrs:{type:"primary"},on:{click:e.currentmonth}},[e._v("当月")]),r("el-button",{staticClass:"siemens-button",attrs:{type:"primary"},on:{click:e.nextmonth}},[e._v("下一月"),r("i",{staticClass:"el-icon-arrow-right el-icon--right"})])],1)],1),r("div",{staticClass:"year-month-span"},[r("span",[e._v(e._s(e.year)+"年")]),r("span",[e._v(e._s(e.month)+"月")])]),r("div",[r("el-table",{ref:"statusTable",attrs:{data:e.engiArray,border:"",width:"100%","header-cell-style":e.headerCellStyle,"summary-method":e.getSummaries,"cell-style":e.cellStyle,"row-style":{height:"20px"}},on:{"cell-click":e.clickTableCell}},[r("el-table-column",{attrs:{type:"index",label:"序号",width:"50",align:"center",fixed:"",index:e.indexMethods}}),r("el-table-column",{attrs:{prop:"realName",label:"姓名",width:"54",fixed:"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[r("el-popover",{attrs:{placement:"top",width:"400",trigger:"hover"}},[e._l(a.userSkill,(function(t,a){return r("div",{key:a,staticClass:"emphasis-box",style:{border:"2px solid "+e.skillColor(t.skilltypeId).border,color:e.skillColor(t.skilltypeId).text},on:{mouseover:function(r){r.target.style.backgroundColor=e.skillColor(t.skilltypeId).hover},mouseout:function(e){e.target.style.backgroundColor=""}}},[e._v(" "+e._s(t.name)+" ")])})),r("span",{attrs:{slot:"reference"},slot:"reference"},[e._v(e._s(a.realName))])],2)]}}])}),r("el-table-column",{attrs:{prop:"deptName",label:"部门",fixed:"",align:"center"}}),r("el-table-column",{attrs:{"header-align":"center",align:"center",label:e.year+"年"+e.month+"月"}},e._l(e.monthDay[this.month-1],(function(t){return r("el-table-column",{key:t,attrs:{width:"46",align:"center",formatter:e.getStatusIdByCalDate},scopedSlots:e._u([{key:"header",fn:function(a){return[r("div",[e._v(" "+e._s(t.toString())+" ")]),"Sat"==e.weekStr(e.year,e.month,t)||"Sun"==e.weekStr(e.year,e.month,t)?r("div",{staticStyle:{"border-top":"1px solid #ebeef5","background-color":"#bfbfbf",margin:"0 -10px","font-size":"10px"}},[e._v(" "+e._s(e.weekStr(e.year,e.month,t))+" ")]):e.isCurrentDay(e.year,e.month,t)?r("div",{staticStyle:{"border-top":"1px solid #ebeef5","background-color":"#b8d1cf",margin:"0 -10px","font-size":"10px"}},[e._v(" "+e._s(e.weekStr(e.year,e.month,t))+" ")]):r("div",{staticStyle:{"border-top":"1px solid #ebeef5","font-size":"10px"}},[e._v(" "+e._s(e.weekStr(e.year,e.month,t))+" ")])]}},{key:"default",fn:function(a){var o=a.row;a.$index;return e._l(o.workRecordsList,(function(a,s){return r("div",{key:a.id,staticClass:"status-span",style:e.cssByStatusIdInCell(e.engiStatusCheckByDate(e.year,e.month,t,a)),on:{click:function(t){return e.editStatus(o,s)},contextmenu:function(t){return t.preventDefault(),e.deleteStatus(o,s)}}},[r("el-popover",{attrs:{placement:"right-end",trigger:"hover"}},[r("div",[r("span",[e._v("项目名称: "+e._s(o.workRecordsList[s].projectTitle))]),r("el-divider"),r("span",[e._v("所在城市: "+e._s(e.cityCodeToCityName(o.workRecordsList[s].location)))]),r("el-divider"),r("span",[e._v("区间状态: "+e._s(e.statusIdToStatusName(o.workRecordsList[s].statusId))+" ")]),r("el-divider"),r("span",[e._v("项目时间: "+e._s(o.workRecordsList[s].startTime)+"至"+e._s(o.workRecordsList[s].endTime))]),r("el-divider"),r("span",[e._v(" 成本中心: "+e._s(o.workRecordsList[s].costCenter?o.workRecordsList[s].costCenter:"未录入成本号")+" ")])],1),r("div",{attrs:{slot:"reference"},slot:"reference"},[e._v(" "+e._s(e.engiInfoCheckByDate(e.year,e.month,t,a))+" ")])])],1)}))}}],null,!0)})})),1),r("el-table-column",{attrs:{label:"操作",align:"center",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;t.$index;return[e.hasButtonPermission(a)?r("el-button",{staticStyle:{"background-color":"#009c99"},attrs:{type:"primary",size:"mini",icon:"el-icon-plus",title:"添加",circle:""},on:{click:function(t){return e.addStatus(a)}}}):e._e()]}}])})],1),r("div",{staticClass:"status-desc-group"},[r("span",{staticStyle:{"background-color":"#92d050",width:"40px","border-radius":"5px"}}),r("span",[e._v("现场执行")]),r("span",{staticStyle:{"background-color":"#00b0f0",width:"40px","border-radius":"5px"}}),r("span",[e._v("现场调研")]),r("span",{staticStyle:{"background-color":"#ffc000",width:"40px","border-radius":"5px"}}),r("span",[e._v("方案编写、程序编写、项目总结")]),r("span",{staticStyle:{"background-color":"#00b050",width:"40px","border-radius":"5px"}}),r("span",[e._v("内部项目执行")]),r("span",{staticStyle:{"background-color":"#ffff00",width:"40px","border-radius":"5px"}}),r("span",[e._v("培训、学习")]),r("span",{staticStyle:{"background-color":"#a6a6a6",width:"40px","border-radius":"5px"}}),r("span",[e._v("休假")])]),r("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"center"},attrs:{"current-page":e.page,"page-sizes":[20,35,50],"page-size":e.limit,layout:"prev, pager, next, jumper,->,sizes,total",total:e.total,"pager-count":7,background:""},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}}),r("el-dialog",{attrs:{title:"工程师状态添加",visible:e.addDialogVisible,width:"width","close-on-click-modal":!1},on:{"update:visible":function(t){e.addDialogVisible=t}}},[r("div",[r("el-form",{ref:"addWorkRecordForm",attrs:{"label-width":"80px",model:e.addStatusForm,rules:e.computRulesOfAddWordRecord}},[r("el-form-item",{attrs:{label:"姓名"}},[r("el-input",{staticStyle:{width:"150px"},attrs:{disabled:""},model:{value:e.addStatusForm.realName,callback:function(t){e.$set(e.addStatusForm,"realName",t)},expression:"addStatusForm.realName"}})],1),r("el-form-item",{attrs:{label:"项目名称",prop:"projectTitle"}},[r("el-autocomplete",{staticClass:"inline-input",attrs:{"fetch-suggestions":e.queryProectTitleSearchAsync,placeholder:"请输入项目名称","trigger-on-focus":!1},on:{select:e.handleSelect},model:{value:e.addStatusForm.projectTitle,callback:function(t){e.$set(e.addStatusForm,"projectTitle",t)},expression:"addStatusForm.projectTitle"}})],1),r("el-form-item",{attrs:{label:"所在城市",prop:"location"}},[r("el-cascader",{staticClass:"city-item",attrs:{size:"large",options:e.cityOptions,placeholder:"请选择所在城市"},model:{value:e.addStatusForm.location,callback:function(t){e.$set(e.addStatusForm,"location",t)},expression:"addStatusForm.location"}})],1),r("el-form-item",{attrs:{label:"区间状态",prop:"statusId"}},[r("el-select",{attrs:{placeholder:"请选择区间状态"},model:{value:e.addStatusForm.statusId,callback:function(t){e.$set(e.addStatusForm,"statusId",t)},expression:"addStatusForm.statusId"}},[r("el-option",{staticStyle:{"background-color":"#92d050"},attrs:{label:"现场执行",value:"1"}}),r("el-option",{staticStyle:{"background-color":"#00b0f0"},attrs:{label:"现场调研",value:"2"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"方案编写",value:"3"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"程序编写",value:"4"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"项目总结",value:"5"}}),r("el-option",{staticStyle:{"background-color":"#00b050"},attrs:{label:"内部项目执行",value:"6"}}),r("el-option",{staticStyle:{"background-color":"#ffff00"},attrs:{label:"培训",value:"7"}}),r("el-option",{staticStyle:{"background-color":"#ffff00"},attrs:{label:"学习",value:"8"}}),r("el-option",{staticStyle:{"background-color":"#a6a6a6"},attrs:{label:"休假",value:"9"}})],1)],1),r("el-form-item",{attrs:{label:"项目时间",prop:"datePicked"}},[r("el-col",{attrs:{span:15}},[r("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd"},on:{change:e.addPickDate},model:{value:e.addStatusForm.datePicked,callback:function(t){e.$set(e.addStatusForm,"datePicked",t)},expression:"addStatusForm.datePicked"}})],1)],1),r("el-form-item",{attrs:{label:"成本号",prop:"costCenter"}},[r("el-autocomplete",{staticClass:"inline-input",attrs:{"fetch-suggestions":e.queryCostCenterSearchAsync,placeholder:"请输入成本中心号","trigger-on-focus":!1},on:{select:e.handleSelect},model:{value:e.addStatusForm.costCenter,callback:function(t){e.$set(e.addStatusForm,"costCenter",t)},expression:"addStatusForm.costCenter"}})],1)],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.addWorkRecord}},[e._v("确 定")]),r("el-button",{on:{click:function(t){e.addDialogVisible=!1}}},[e._v("取 消")])],1)]),r("el-dialog",{attrs:{title:"工程师状态修改",visible:e.editDialogVisible,width:"width","close-on-click-modal":!1},on:{"update:visible":function(t){e.editDialogVisible=t}}},[r("div",[r("el-form",{ref:"editWorkRecordForm",attrs:{"label-width":"auto",model:e.editStatusForm,rules:e.computRulesOfEditWordRecord}},[r("el-form-item",{attrs:{label:"姓名"}},[r("el-input",{staticStyle:{width:"150px"},attrs:{disabled:""},model:{value:e.editStatusForm.realName,callback:function(t){e.$set(e.editStatusForm,"realName",t)},expression:"editStatusForm.realName"}})],1),r("el-form-item",{attrs:{label:"项目名称",prop:"workRecordsList[0].projectTitle"}},[r("el-autocomplete",{staticClass:"inline-input",attrs:{"fetch-suggestions":e.queryProectTitleSearchAsync,placeholder:"请输入项目名称","trigger-on-focus":!1},on:{select:e.handleSelect},model:{value:e.editStatusForm.workRecordsList[0].projectTitle,callback:function(t){e.$set(e.editStatusForm.workRecordsList[0],"projectTitle",t)},expression:"editStatusForm.workRecordsList[0].projectTitle"}})],1),r("el-form-item",{attrs:{label:"所在城市",prop:"workRecordsList[0].location"}},[r("el-cascader",{staticClass:"city-item",attrs:{size:"large",options:e.cityOptions,placeholder:"请选择所在城市"},model:{value:e.editStatusForm.workRecordsList[0].location,callback:function(t){e.$set(e.editStatusForm.workRecordsList[0],"location",t)},expression:"editStatusForm.workRecordsList[0].location"}})],1),r("el-form-item",{attrs:{label:"区间状态",prop:"workRecordsList[0].statusId"}},[r("el-select",{attrs:{placeholder:"请选择区间状态"},model:{value:e.editStatusForm.workRecordsList[0].statusId,callback:function(t){e.$set(e.editStatusForm.workRecordsList[0],"statusId",t)},expression:"editStatusForm.workRecordsList[0].statusId"}},[r("el-option",{staticStyle:{"background-color":"#92d050"},attrs:{label:"现场执行",value:"1"}}),r("el-option",{staticStyle:{"background-color":"#00b0f0"},attrs:{label:"现场调研",value:"2"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"方案编写",value:"3"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"程序编写",value:"4"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"项目总结",value:"5"}}),r("el-option",{staticStyle:{"background-color":"#00b050"},attrs:{label:"内部项目执行",value:"6"}}),r("el-option",{staticStyle:{"background-color":"#ffff00"},attrs:{label:"培训",value:"7"}}),r("el-option",{staticStyle:{"background-color":"#ffff00"},attrs:{label:"学习",value:"8"}}),r("el-option",{staticStyle:{"background-color":"#a6a6a6"},attrs:{label:"休假",value:"9"}})],1)],1),r("el-form-item",{attrs:{label:"项目时间",prop:"workRecordsList[0].datePicked"}},[r("el-col",{attrs:{span:15}},[r("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd"},on:{change:e.editPickDate},model:{value:e.editStatusForm.workRecordsList[0].datePicked,callback:function(t){e.$set(e.editStatusForm.workRecordsList[0],"datePicked",t)},expression:"editStatusForm.workRecordsList[0].datePicked"}})],1)],1),r("el-form-item",{attrs:{label:"成本号",prop:"costCenter"}},[r("el-autocomplete",{staticClass:"inline-input",attrs:{"fetch-suggestions":e.queryCostCenterSearchAsync,placeholder:"请输入成本中心号","trigger-on-focus":!1},on:{select:e.handleSelect},model:{value:e.editStatusForm.workRecordsList[0].costCenter,callback:function(t){e.$set(e.editStatusForm.workRecordsList[0],"costCenter",t)},expression:"editStatusForm.workRecordsList[0].costCenter"}})],1),e.addWorkOrderWhenEditDialogVisible?r("div",[r("el-form-item",{attrs:{label:"新增工作记录"}}),r("el-form-item",{attrs:{label:"项目名称",prop:"projectTitleOfNewOrder"}},[r("el-autocomplete",{staticClass:"inline-input",attrs:{"fetch-suggestions":e.queryProectTitleSearchAsync,placeholder:"请输入项目名称","trigger-on-focus":!1},on:{select:e.handleSelect},model:{value:e.editStatusForm.projectTitleOfNewOrder,callback:function(t){e.$set(e.editStatusForm,"projectTitleOfNewOrder",t)},expression:"editStatusForm.projectTitleOfNewOrder"}})],1),r("el-form-item",{attrs:{label:"所在城市",prop:"locationOfNewOrder"}},[r("el-cascader",{staticClass:"city-item",attrs:{size:"large",options:e.cityOptions,placeholder:"请选择所在城市"},model:{value:e.editStatusForm.locationOfNewOrder,callback:function(t){e.$set(e.editStatusForm,"locationOfNewOrder",t)},expression:"editStatusForm.locationOfNewOrder"}})],1),r("el-form-item",{attrs:{label:"区间状态",prop:"statusIdOfNewOrder"}},[r("el-select",{attrs:{placeholder:"请选择区间状态"},model:{value:e.editStatusForm.statusIdOfNewOrder,callback:function(t){e.$set(e.editStatusForm,"statusIdOfNewOrder",t)},expression:"editStatusForm.statusIdOfNewOrder"}},[r("el-option",{staticStyle:{"background-color":"#92d050"},attrs:{label:"现场执行",value:"1"}}),r("el-option",{staticStyle:{"background-color":"#00b0f0"},attrs:{label:"现场调研",value:"2"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"方案编写",value:"3"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"程序编写",value:"4"}}),r("el-option",{staticStyle:{"background-color":"#ffc000"},attrs:{label:"项目总结",value:"5"}}),r("el-option",{staticStyle:{"background-color":"#00b050"},attrs:{label:"内部项目执行",value:"6"}}),r("el-option",{staticStyle:{"background-color":"#ffff00"},attrs:{label:"培训",value:"7"}}),r("el-option",{staticStyle:{"background-color":"#ffff00"},attrs:{label:"学习",value:"8"}}),r("el-option",{staticStyle:{"background-color":"#a6a6a6"},attrs:{label:"休假",value:"9"}})],1)],1),r("el-form-item",{attrs:{label:"项目时间",prop:"datePickedOfNewOrder"}},[r("el-col",{attrs:{span:15}},[r("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd"},on:{change:e.editPickDateOfNewOrder},model:{value:e.editStatusForm.datePickedOfNewOrder,callback:function(t){e.$set(e.editStatusForm,"datePickedOfNewOrder",t)},expression:"editStatusForm.datePickedOfNewOrder"}})],1)],1),r("el-form-item",{attrs:{label:"成本号",prop:"costCenter"}},[r("el-autocomplete",{staticClass:"inline-input",attrs:{"fetch-suggestions":e.queryCostCenterSearchAsync,placeholder:"请输入成本中心号","trigger-on-focus":!1},on:{select:e.handleSelect},model:{value:e.editStatusForm.costCenterOfNewOrder,callback:function(t){e.$set(e.editStatusForm,"costCenterOfNewOrder",t)},expression:"editStatusForm.costCenterOfNewOrder"}})],1)],1):e._e()],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[e.addButtonOfEditDialog?r("el-button",{attrs:{type:"success"},on:{click:e.addButtonOfEditWorkRecordDialog}},[e._v("添 加")]):e._e(),r("el-button",{attrs:{type:"primary"},on:{click:e.saveButtonOfEditWorkRecordDialog}},[e._v("保 存")]),r("el-button",{on:{click:e.cancelButtonOfEditWorkRecordDialog}},[e._v("取 消")])],1)])],1)])],1)},o=[],s=r("b85c"),i=r("5530"),n=r("c7eb"),l=r("1da1"),d=(r("b64b"),r("d81d"),r("ac1f"),r("5319"),r("a15b"),r("fb6a"),r("1276"),r("d3b7"),r("25f0"),r("b0c0"),r("00b4"),r("2f62")),c=r("0644"),u=r.n(c),p=r("ef6c"),h={name:"Record",data:function(){var e=this,t=function(t,r,a){if(e.editStatusForm.workRecordsList[0].datePicked&&e.editStatusForm.datePickedOfNewOrder){var o=e.methodOfCheckDateRangeIfConflict(e.editStatusForm.workRecordsList[0].datePicked[0],e.editStatusForm.workRecordsList[0].datePicked[1],e.editStatusForm.datePickedOfNewOrder[0],e.editStatusForm.datePickedOfNewOrder[1]);o?a(new Error("工单的项目时间冲突,请重新选择时间")):a()}else a()};return{page:1,limit:20,total:0,list:[],engiArray:[],departmentId:" ",departmentList:[],loading:!1,addDialogVisible:!1,editDialogVisible:!1,addWorkOrderWhenEditDialogVisible:!1,addButtonOfEditDialog:!0,cityOptions:p["regionData"],timeout:null,addStatusForm:{realName:"",location:"",statusId:"",startTime:"",endTime:"",projectTitle:"",costCenter:"",datePicked:"",workRecordsList:[{statusId:"",projectTitle:"",datePicked:"",startTime:"",endTime:""}]},editStatusForm:{realName:"",workRecordsList:[{statusId:"",projectTitle:"",datePicked:"",startTime:"",endTime:"",location:"",costCenter:""}],addWorkRecordsList:{statusId:"",projectTitle:"",datePicked:"",startTime:"",endTime:""},statusIdOfNewOrder:"",projectTitleOfNewOrder:"",datePickedOfNewOrder:"",startTimeOfNewOrder:"",endTimeOfNewOrder:"",locationOfNewOrder:"",costCenterOfNewOrder:""},statusFormToSend:{gid:"",startTime:"",endTime:"",statusId:"",projectTitle:""},dateBoxFlag:!1,year:(new Date).getFullYear(),month:(new Date).getMonth()+1,day:(new Date).getDate(),previousMonth:[],nextMonth:[],week:["Sun","Mon","Tues","Wed","Thur","Fri","Sat"],monthDay:[31,28,31,30,31,30,31,31,30,31,30,31],rulesOfAddWordRecord:{projectTitle:[{required:!0,message:"请输入项目名称",trigger:"blur"}],location:[{required:!0,message:"请选择所在城市",trigger:["blur","change"]}],statusId:[{required:!0,message:"请选择区间状态",trigger:["blur","change"]}],datePicked:[{type:"array",required:!0,message:"请选择项目时间",trigger:"blur",fields:{0:{type:"string",required:!0,message:"请选择开始时间"},1:{type:"string",required:!0,message:"请选择结束时间"}}}]},rulesOfEditWordRecord:{"workRecordsList[0].projectTitle":[{required:!0,message:"请输入项目名称",trigger:"blur"}],"workRecordsList[0].location":[{required:!0,message:"请选择所在城市",trigger:["blur","change"]}],"workRecordsList[0].statusId":[{required:!0,message:"请选择区间状态",trigger:"blur"}],"workRecordsList[0].datePicked":[{type:"array",required:!0,message:"请选择项目时间",trigger:"blur",fields:{0:{type:"string",required:!0,message:"请选择开始时间"},1:{type:"string",required:!0,message:"请选择结束时间"}}},{validator:t,trigger:["blur","change"]}],projectTitleOfNewOrder:[{required:!0,message:"请输入新增工单的项目名称",trigger:"blur"}],locationOfNewOrder:[{required:!0,message:"请选择所在城市",trigger:["blur","change"]}],statusIdOfNewOrder:[{required:!0,message:"请选择新增工单的区间状态",trigger:["blur","change"]}],datePickedOfNewOrder:[{type:"array",required:!0,message:"请选择新增工单的项目时间",trigger:"blur",fields:{0:{type:"string",required:!0,message:"请选择开始时间"},1:{type:"string",required:!0,message:"请选择结束时间"}}},{validator:t,trigger:["blur","change"]}]},skillSearchList:{},props:{multiple:!0},options:[],collapseTags:!0,maxCount:10}},mounted:function(){var e=this;return Object(l["a"])(Object(n["a"])().mark((function t(){var r;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return console.log(e.$store.state.user),e.getDepartmentList(),e.selectTableData(),t.next=5,e.$API.skilltype.reqGetSkillTypeWithLabels();case 5:r=t.sent,e.options=e.convertDataToCascader(r.data);case 7:case"end":return t.stop()}}),t)})))()},created:function(){},computed:Object(i["a"])(Object(i["a"])({},Object(d["b"])(["gid","employeeNo","name","deptId","permissions"])),{},{date:function(){if(0===this.year||0===this.month||0===this.day)return"";var e=new Date(this.year,this.month,0).getDate();return this.day>e&&(this.day=e),this.year+"-"+this.month+"-"+this.day},hasButtonPermission:function(){return function(e){return-1!==this.permissions.indexOf("btn.UpdateRecord")||-1===this.permissions.indexOf("btn.UpdateRecord")&&-1!==this.permissions.indexOf("btn.UpdatePersonalRecord")&&(e.gid===this.gid||void 0)}},skillColor:function(){return function(e){var t=e%10,r={1:{border:"#FFB6C1",text:"#FFB6C1",hover:"#FFE4E1"},2:{border:"#90EE90",text:"#90EE90",hover:"#E6E6FA"},3:{border:"#ADD8E6",text:"#ADD8E6",hover:"#FFF0F5"},4:{border:"#D8BFD8",text:"#D8BFD8",hover:"#FFF0F5"},5:{border:"#f3f37f;",text:"#f3f37f;",hover:"#FFF8DC"},6:{border:"#D3D3D3",text:"#D3D3D3",hover:"#F5F5F5"},7:{border:"#A0522D",text:"#A0522D",hover:"#DEB887"}};return r[t]||{border:"#000000",text:"#000000",hover:"#FFFFFF"}}},intArray:function(){return 0===Object.keys(this.skillSearchList).length?[]:this.skillSearchList.map((function(e){return parseInt(e[1],10)}))},computRulesOfAddWordRecord:function(){return this.updateRulesBasedOnRole(),this.rulesOfAddWordRecord},computRulesOfEditWordRecord:function(){return this.updateRulesBasedOnRole(),this.rulesOfEditWordRecord}}),methods:{updateRulesBasedOnRole:function(){"5"===this.$store.state.user.roleId&&(this.rulesOfAddWordRecord.costCenter=[{required:!0,message:"请输入成本号",trigger:"blur"}],this.rulesOfEditWordRecord.costCenter=[{required:!0,message:"请输入成本号",trigger:"blur"}])},isCurrentDay:function(e,t,r){var a=new Date;return e===a.getFullYear()&&t===a.getMonth()+1&&r===a.getDate()},selectTableData:function(){this.departmentId=this.deptId,(15===this.departmentId||this.departmentId>16&&this.departmentId<42)&&(this.departmentId=""),this.getTableDataByDept()},isHasButtonPermission:function(e){return-1!==this.permissions.indexOf("btn.UpdateRecord")||-1===this.permissions.indexOf("btn.UpdateRecord")&&-1!==this.permissions.indexOf("btn.UpdatePersonalRecord")&&(e.gid===this.gid||void 0)},methodOfCheckDateRangeIfConflict:function(e,t,r,a){var o=new Date(e.replace("-","/").replace("-","/")),s=new Date(t.replace("-","/").replace("-","/")),i=new Date(r.replace("-","/").replace("-","/")),n=new Date(a.replace("-","/").replace("-","/"));return o>=i&&o<=n||(s>=i&&s<=n||o<=i&&s>=n)},indexMethods:function(e){var t=this.page,r=this.limit;return e+1+(t-1)*r},getTableData:function(){var e=arguments,t=this;return Object(l["a"])(Object(n["a"])().mark((function r(){var a,o,s,i,l,d,c,u,p,h,m;return Object(n["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=e.length>0&&void 0!==e[0]?e[0]:t.year,o=e.length>1&&void 0!==e[1]?e[1]:t.month,t.loading=!0,t.handleMonthLastDay(),t.dayScreen(),s=t.page,i=t.limit,r.next=8,t.$API.user.reqGetUserPageWithSkills(s,i);case 8:if(l=r.sent,console.log(l),0===l.code){for(d in l.data.list)t.$set(l.data.list[d],"workRecordsList",[]);t.engiArray=l.data.list,t.total=l.data.total}return r.next=13,t.$API.select.reqSelectEngiStatusByMap(a,o,s,i);case 13:if(c=r.sent,0===c.code)for(p in u=c.data,u)for(h in t.engiArray)if(p===t.engiArray[h].gid)for(m in u[p])t.engiArray[h].workRecordsList.push(u[p][m]);t.$nextTick((function(){})),t.$nextTick((function(){t.$refs.statusTable.doLayout()})),t.loading=!1;case 18:case"end":return r.stop()}}),r)})))()},getTableDataByDept:function(){var e=arguments,t=this;return Object(l["a"])(Object(n["a"])().mark((function r(){var a,o,s,i,l,d,c,u,p,h,m,f,g;return Object(n["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=e.length>0&&void 0!==e[0]?e[0]:t.year,o=e.length>1&&void 0!==e[1]?e[1]:t.month,(t.departmentId<15||16===t.departmentId)&&t.page>1&&(t.page=1),t.loading=!0,t.handleMonthLastDay(),t.dayScreen(),s=t.page,i=t.limit,l=t.departmentId,d={page:t.page,limit:t.limit,deptId:l,skillIdList:t.intArray.join(",")},r.next=10,t.$API.user.reqGetUserPageWithSkills(d);case 10:if(c=r.sent,0===c.code){for(u in c.data.list)t.$set(c.data.list[u],"workRecordsList",[]);t.engiArray=c.data.list,t.total=c.data.total}return r.next=14,t.$API.select.reqSelectEngiStatusByDept(a,o,l,s,i);case 14:if(p=r.sent,0===p.code)for(m in h=p.data,h)for(f in t.engiArray)if(m===t.engiArray[f].gid)for(g in h[m])t.engiArray[f].workRecordsList.push(h[m][g]);t.$nextTick((function(){t.$refs.statusTable.doLayout()})),t.loading=!1;case 18:case"end":return r.stop()}}),r)})))()},weekStr:function(e,t,r){var a=new Date(e,t-1,r);return this.week[a.getDay()]},getDepartmentList:function(){var e=this;return Object(l["a"])(Object(n["a"])().mark((function t(){var r;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$API.select.reqGetDepartments();case 2:r=t.sent,0===r.code&&(e.departmentList=r.data);case 4:case"end":return t.stop()}}),t)})))()},resetDepartmentSearch:function(){this.departmentId="",this.getTableDataByDept()},handleClick:function(e){},handleCurrentChange:function(e){this.page=e,this.departmentId?this.getTableDataByDept():this.getTableData()},handleSizeChange:function(e){this.limit=e,this.departmentId?this.getTableDataByDept():this.getTableData()},isLeapYear:function(e){return e%100===0?e%400===0:e%4===0},currentmonth:function(){var e=new Date;this.year=e.getFullYear(),this.handleMonthLastDay(),this.month=e.getMonth()+1,this.day=e.getDate(),this.getTableDataByDept()},lastmonth:function(){this.month--,this.month<1&&(this.month=12,this.year--),this.getTableDataByDept()},nextmonth:function(){this.month++,this.month>12&&(this.month=1,this.year++),this.getTableDataByDept()},handleMonthLastDay:function(){this.isLeapYear(this.year)?this.monthDay[1]=29:this.monthDay[1]=28},dayScreen:function(){var e=this,t=new Date(this.year,this.month-1,1),r=t.getDay(),a=null;a=1===this.month?this.monthDay[11]:this.monthDay[this.month-2];for(var o=0;o=a&&e<=o},compareTheSameDate:function(e,t){var r=new Date(e).setHours(0,0,0,0),a=new Date(t).setHours(0,0,0,0);return r===a},engiStatusCheckByDate:function(e,t,r,a){var o=new Date(e,t-1,r);if(this.dateIsInRange(o,a.startTime.substring(0,10),a.endTime.substring(0,10)))return a.statusId},dateIsMid:function(e,t,r){var a=new Date(t);a.setHours(0,0,0);var o=a.getTime(),s=new Date(r);s.setHours(0,0,0);var i=s.getTime(),n=e.getTime();return Math.abs(n-(o+i)/2)<432e5},fmtDateToString:function(e){return e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()},getBetweenDate:function(e,t){var r=[],a=864e5,o=e.getTime(),s=t.getTime()-o;if(0===s)return r.push(new Date(o).toLocaleDateString("zh",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(/\//g,"-")),r;var i=0;while(i<=s)s>0&&(r.push(new Date(o+i).toLocaleDateString("zh",{year:"numeric",month:"2-digit",day:"2-digit"}).replace(/\//g,"-")),i+=a);return r},getTheMidOfArr:function(e){var t=e.length;return t%2!==0?e[(t-1)/2]:e[t/2-1]},engiInfoCheckByDate:function(e,t,r,a){var o=new Date(e,t-1,r);if(this.dateIsInRange(o,a.startTime.substring(0,10),a.endTime.substring(0,10))){var s={statusId:a["statusId"],projectTitle:a["projectTitle"],startTime:a["startTime"],endTime:a["endTime"]};return this.compareTheSameDate(this.fmtDateToString(o),this.getTheMidOfArr(this.getBetweenDate(new Date(s.startTime),new Date(s.endTime))))?s.projectTitle.length<5?s.projectTitle:s.projectTitle.substring(0,3)+"...":" "}},cssByStatusIdInCell:function(e){return"1"===e?"background-color: #92d050; width:50px;height:21px;font-size:9px;":"2"===e?"background-color: #00b0f0;width:50px;height:21px;font-size:9px; ":"3"===e||"4"===e||"5"===e?"background-color: #ffc000;width:50px;height:21px;font-size:9px; ":"6"===e?"background-color: #00b050;width:50px;height:21px;font-size:9px; ":"7"===e||"8"===e?"background-color: #ffff00;width:50px;height:21px;font-size:9px; ":"9"===e?"background-color: #a6a6a6;width:50px;height:21px;font-size:9px; ":void 0},formatCityOptions:function(e){for(var t="",r=0;r0)for(var o=0;o0){var o,i={value:a[0].skilltypeId,label:r,children:[]},n=Object(s["a"])(a);try{for(n.s();!(o=n.n()).done;){var l=o.value,d={value:l.id,label:l.name};i.children.push(d)}}catch(c){n.e(c)}finally{n.f()}t.push(i)}}return t}},watch:{year:function(e){var t=/^[1-9]\d*$/g;if(!t.test(e)){var r=new Date;this.year=r.getFullYear()}e<0&&(this.year=1),e>1e4&&(this.year=1e4),this.dayScreen()},month:function(e){var t=/^[1-9]\d*$/g;if(!t.test(e)){var r=new Date;this.month=r.getMonth()+1}e<1&&(this.month=1),e>12&&(this.month=12),this.handleMonthLastDay(),this.dayScreen()}}},m=h,f=(r("a573"),r("c5ee"),r("2877")),g=Object(f["a"])(m,a,o,!1,null,"248cf186",null);t["default"]=g.exports}}]);