Commit c487676e by 无尘

fix: 保存考勤组排班数据

parent 4f236e47
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.e37493a3386971e079c52e186a0fee46.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.b7c07c3d8823d43565ac.js></script><script type=text/javascript src=./static/js/vendor.0000e68e65e4a9dc3840.js></script><script type=text/javascript src=./static/js/app.c62fd44245419b03ee57.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.f93a072e332bb5b428e0ac6defe0269b.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.9cba65c9c2f87be3d0d3.js></script><script type=text/javascript src=./static/js/vendor.0000e68e65e4a9dc3840.js></script><script type=text/javascript src=./static/js/app.127eaf5b22eb011f8382.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([32],{"4HoI":function(t,s){},B9Yg:function(t,s,e){t.exports=e.p+"static/img/gic-error.8aba914.png"},"Q3j/":function(t,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var i=e("B9Yg"),a=e.n(i),n={name:"page404",data:function(){return{img_404:a.a}},computed:{message:function(){return"登录遇到错误啦!请确认您是否已是好办管理员,如不是,请联系管理员。"}},mounted:function(){}},r={render:function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[s("div",{staticClass:"wscn-http404"},[s("div",{staticClass:"pic-404"},[s("img",{staticClass:"pic-404__parent",attrs:{src:this.img_404,alt:"404"}})]),this._v(" "),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__headline"},[this._v(this._s(this.message))]),this._v(" "),s("a",{staticClass:"bullshit__return-home",attrs:{href:"#/login",rel:"noopener noreferrer"}},[this._v("返回好办登录页")])])])])},staticRenderFns:[]};var c=e("VU/8")(n,r,!1,function(t){e("4HoI")},"data-v-45ea1cc1",null);s.default=c.exports}});
\ No newline at end of file
webpackJsonp([31],{"4HoI":function(t,s){},B9Yg:function(t,s,e){t.exports=e.p+"static/img/gic-error.8aba914.png"},"Q3j/":function(t,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var i=e("B9Yg"),a=e.n(i),n={name:"page404",data:function(){return{img_404:a.a}},computed:{message:function(){return"登录遇到错误啦!请确认您是否已是好办管理员,如不是,请联系管理员。"}},mounted:function(){}},r={render:function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticStyle:{background:"#f0f2f5","margin-top":"-20px",height:"100%"}},[s("div",{staticClass:"wscn-http404"},[s("div",{staticClass:"pic-404"},[s("img",{staticClass:"pic-404__parent",attrs:{src:this.img_404,alt:"404"}})]),this._v(" "),s("div",{staticClass:"bullshit"},[s("div",{staticClass:"bullshit__headline"},[this._v(this._s(this.message))]),this._v(" "),s("a",{staticClass:"bullshit__return-home",attrs:{href:"#/login",rel:"noopener noreferrer"}},[this._v("返回好办登录页")])])])])},staticRenderFns:[]};var c=e("VU/8")(n,r,!1,function(t){e("4HoI")},"data-v-45ea1cc1",null);s.default=c.exports}});
\ No newline at end of file
webpackJsonp([69],{S8oU:function(t,e){},gncU:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=a("Ke24"),n=a("Ch4/"),i=a("PI0u"),r=a("P9l9"),c={name:"app-detail",components:{commonDetailTop:o.a},props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){var t=this;return{projectName:"",activeBrand:this.brandId,activeGroup:this.activeGroupId,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,activeId:"1",topMenuData:[{id:"1",name:"每日统计"}],conditionObj:{attenceGroupName:"",choiceDate:""},tableData:[],currentPage:1,pageSize:20,total:0,workClassShow:!1,classesId:"",choiceDateCopy:[],pickerOptions:{onPick:function(e){var a=e.maxDate,o=e.minDate;t.choiceDateCopy=[o.getTime()],a&&(t.choiceDateCopy=[])},disabledDate:function(e){if(t.choiceDateCopy.length){var a=t.choiceDateCopy[0]-2592e6,o=t.choiceDateCopy[0]+2592e6;return e.getTime()<a||e.getTime()>o||e.getTime()>Date.now()-864e4}return e.getTime()>Date.now()-864e4}}}},methods:{changeDate:function(t){t||(this.choiceDateCopy=[],this.conditionObj.choiceDate=[]),this.currentPage=1,this.getTableList()},toWorkGroupSet:function(){this.$router.push("/workGroupSet?appIcon="+this.$route.query.appIcon)},toEditWorkTime:function(t,e){this.$router.push("/workTimeManage?appIcon="+this.$route.query.appIcon+"&attenceGroupId="+e.attenceGroupId)},toTableSet:function(){this.workClassShow=!0,this.classesId=row.classesId},hideSetDialog:function(){this.workClassShow=!1,this.classesId="",this.currentPage=1,this.getTableList(this.brandId)},toInput:Object(i.a)(function(t,e){this.currentPage=1,this.getTableList(this.brandId)},500),clearInput:function(){this.currentPage=1,this.getTableList(this.brandId)},changeCondition:function(){this.currentPage=1,this.getTableList(this.brandId)},getDayFields:function(t){var e=this;e.conditionObj.choiceDate||(e.conditionObj.choiceDate=[]);var a={brandId:t||e.activeBrand,enterpriseId:e.enterpriseId,userName:e.conditionObj.attenceGroupName,startDate:e.conditionObj.choiceDate[0],endDate:e.conditionObj.choiceDate[1],pageNum:e.currentPage,pageSize:e.pageSize};Object(r.e)("/haoban-app-attence-web/attence-total-day",a).then(function(t){var a=t.data;if(1==a.errorCode)return console.log(a.result.list),e.tabletData=a.result.list||[],void(e.total=a.result.total);n.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleSizeChange:function(t){this.pageSize=t,this.getTableList(this.brandId)},handleCurrentChange:function(t){this.currentPage=t,this.getTableList(this.brandId)},toUpdateSet:function(){this.currentPage=1,this.getTableList(this.brandId)},getTableList:function(t){var e=this;e.conditionObj.choiceDate||(e.conditionObj.choiceDate=[]);var a={brandId:t||e.activeBrand,enterpriseId:e.enterpriseId,userName:e.conditionObj.attenceGroupName,startDate:e.conditionObj.choiceDate[0],endDate:e.conditionObj.choiceDate[1],pageNum:e.currentPage,pageSize:e.pageSize};Object(r.e)("/haoban-app-attence-web/attence-total-day",a).then(function(t){var a=t.data;if(1==a.errorCode)return console.log(a.result.list),e.tabletData=a.result.list||[],void(e.total=a.result.total);n.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){t&&(this.activeBrand=t)},activeGroupId:function(t,e){t&&(this.activeGroup=t)},tabType:function(t,e){}},mounted:function(){this.$emit("showTab","11"),this.brandId&&1!=this.brandId&&(this.activeBrand=this.brandId),this.getTableList(this.brandId)}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",[a("common-detail-top",{attrs:{topMenuData:t.topMenuData,activeId:t.activeId}}),t._v(" "),a("div",{staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"m-b-20"},[a("div",{staticClass:"switch-wrap"},[a("div",{staticClass:"flex flex-space-between"},[a("div",[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入考勤组/人员名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.attenceGroupName);var a}},model:{value:t.conditionObj.attenceGroupName,callback:function(e){t.$set(t.conditionObj,"attenceGroupName",e)},expression:"conditionObj.attenceGroupName"}}),t._v(" "),a("el-date-picker",{staticClass:"search-date",attrs:{format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",editable:!1,"picker-options":t.pickerOptions,type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.changeDate},model:{value:t.conditionObj.choiceDate,callback:function(e){t.$set(t.conditionObj,"choiceDate",e)},expression:"conditionObj.choiceDate"}})],1),t._v(" "),a("div",[a("el-button",{attrs:{type:"primary"},on:{click:t.toTableSet}},[t._v("设置报表")]),a("el-button",{staticClass:"p-l-10",attrs:{type:"primary"},on:{click:t.toUpdateSet}},[t._v("更新报表")])],1)])])]),t._v(" "),a("div",[a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%"},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"考勤组名称",width:"120","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.attenceGroupName))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"人数"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.personCount))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"类型","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(1==e.row.attenceType?"固定排班":2==e.row.attenceType?"排班制":"自由排班"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"考勤时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"最近更新时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.updateTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.updateTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[2!=e.row.attenceType||e.row.personCount?t._e():a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toEditWorkTime(e.$index,e.row)}}},[t._v("编辑排班")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toEditGroup(e.$index,e.row)}}},[t._v("修改规则")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])],1)])},staticRenderFns:[]};var l=a("VU/8")(c,s,!1,function(t){a("S8oU")},"data-v-5ae9c619",null);e.default=l.exports}});
\ No newline at end of file
webpackJsonp([70],{FT0U:function(t,e){},Gk4o:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("2eFk"),o=a("fvdr"),i=a("Qie6"),c={name:"reviewed",data:function(){return{bgHeight:window.screen.availHeight-380+"px",appName:"签到",appIcon:"",activeBrand:"",activeGroup:""}},computed:{},methods:{changeRoute:function(t){this.$router.push(t)},selectBrandId:function(t,e){this.activeBrand=t,this.activeGroup=e}},watch:{activeBrand:function(t,e){this.activeBrand=t},activeGroup:function(t,e){this.activeGroup=t}},mounted:function(){var t=this.$route.query.appIcon;t&&(this.appIcon=window.unescape(t)),document.documentElement.style.backgroundColor="#f0f2f5"},destroyed:function(){document.documentElement.style.backgroundColor="#fff"},components:{appDetail:n.a,commonAppTop:o.a,commonDetailLeft:i.a}},r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"my-customer-wrap common-set-wrap"},[a("div",{staticClass:"right-content"},[a("common-app-top",{attrs:{appName:t.appName,appIcon:t.appIcon},on:{selectBrandId:t.selectBrandId}}),t._v(" "),a("div",{staticClass:"right-box",style:{"min-height":t.bgHeight}},[a("div",{staticClass:"apps-content flex",style:{"min-height":t.bgHeight}},[a("div",{staticClass:"apps-content-right"},[a("transition",{attrs:{name:"fade",mode:"out-in"}},[a("router-view",{attrs:{brandId:t.activeBrand,activeGroupId:t.activeGroup}})],1)],1)])])],1),t._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var s=a("VU/8")(c,r,!1,function(t){a("FT0U")},"data-v-59c4a073",null);e.default=s.exports}});
\ No newline at end of file
webpackJsonp([69],{FT0U:function(t,e){},Gk4o:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("2eFk"),o=a("fvdr"),i=a("Qie6"),c={name:"reviewed",data:function(){return{bgHeight:window.screen.availHeight-380+"px",appName:"签到",appIcon:"",activeBrand:"",activeGroup:""}},computed:{},methods:{changeRoute:function(t){this.$router.push(t)},selectBrandId:function(t,e){this.activeBrand=t,this.activeGroup=e}},watch:{activeBrand:function(t,e){this.activeBrand=t},activeGroup:function(t,e){this.activeGroup=t}},mounted:function(){var t=this.$route.query.appIcon;t&&(this.appIcon=window.unescape(t)),document.documentElement.style.backgroundColor="#f0f2f5"},destroyed:function(){document.documentElement.style.backgroundColor="#fff"},components:{appDetail:n.a,commonAppTop:o.a,commonDetailLeft:i.a}},r={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"my-customer-wrap common-set-wrap"},[a("div",{staticClass:"right-content"},[a("common-app-top",{attrs:{appName:t.appName,appIcon:t.appIcon},on:{selectBrandId:t.selectBrandId}}),t._v(" "),a("div",{staticClass:"right-box",style:{"min-height":t.bgHeight}},[a("div",{staticClass:"apps-content flex",style:{"min-height":t.bgHeight}},[a("div",{staticClass:"apps-content-right"},[a("transition",{attrs:{name:"fade",mode:"out-in"}},[a("router-view",{attrs:{brandId:t.activeBrand,activeGroupId:t.activeGroup}})],1)],1)])])],1),t._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var s=a("VU/8")(c,r,!1,function(t){a("FT0U")},"data-v-59c4a073",null);e.default=s.exports}});
\ No newline at end of file
webpackJsonp([70],{gncU:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("Ke24"),o=a("Ch4/"),i=a("PI0u"),r=a("P9l9"),c={name:"app-detail",components:{commonDetailTop:n.a},props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){var t=this;return{projectName:"",activeBrand:this.brandId,activeGroup:this.activeGroupId,enterpriseId:JSON.parse(localStorage.getItem("userInfo")).enterpriseId,activeId:"1",topMenuData:[{id:"1",name:"每日统计"}],conditionObj:{attenceGroupName:"",choiceDate:""},tableData:[],currentPage:1,pageSize:20,total:0,workClassShow:!1,classesId:"",choiceDateCopy:[],pickerOptions:{onPick:function(e){var a=e.maxDate,n=e.minDate;t.choiceDateCopy=[n.getTime()],a&&(t.choiceDateCopy=[])},disabledDate:function(e){if(t.choiceDateCopy.length){var a=t.choiceDateCopy[0]-2592e6,n=t.choiceDateCopy[0]+2592e6;return e.getTime()<a||e.getTime()>n||e.getTime()>Date.now()-864e4}return e.getTime()>Date.now()-864e4}}}},methods:{changeDate:function(t){t||(this.choiceDateCopy=[],this.conditionObj.choiceDate=[]),this.currentPage=1,this.getTableList()},toWorkGroupSet:function(){this.$router.push("/workGroupSet?appIcon="+this.$route.query.appIcon)},toEditWorkTime:function(t,e){this.$router.push("/workTimeManage?appIcon="+this.$route.query.appIcon+"&attenceGroupId="+e.attenceGroupId)},toTableSet:function(){this.workClassShow=!0,this.classesId=row.classesId},hideSetDialog:function(){this.workClassShow=!1,this.classesId="",this.currentPage=1,this.getTableList(this.brandId)},toInput:Object(i.a)(function(t,e){this.currentPage=1,this.getTableList(this.brandId)},500),clearInput:function(){this.currentPage=1,this.getTableList(this.brandId)},changeCondition:function(){this.currentPage=1,this.getTableList(this.brandId)},getDayFields:function(t){var e=this;e.conditionObj.choiceDate||(e.conditionObj.choiceDate=[]);var a={brandId:t||e.activeBrand,enterpriseId:e.enterpriseId,userName:e.conditionObj.attenceGroupName,startDate:e.conditionObj.choiceDate[0],endDate:e.conditionObj.choiceDate[1],pageNum:e.currentPage,pageSize:e.pageSize};Object(r.e)("/haoban-app-attence-web/attence-total-day",a).then(function(t){var a=t.data;if(1==a.errorCode)return console.log(a.result.list),e.tabletData=a.result.list||[],void(e.total=a.result.total);o.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleSizeChange:function(t){this.pageSize=t,this.getTableList(this.brandId)},handleCurrentChange:function(t){this.currentPage=t,this.getTableList(this.brandId)},toUpdateSet:function(){this.currentPage=1,this.getTableList(this.brandId)},getTableList:function(t){var e=this;e.conditionObj.choiceDate||(e.conditionObj.choiceDate=[]);var a={brandId:t||e.activeBrand,enterpriseId:e.enterpriseId,userName:e.conditionObj.attenceGroupName,startDate:e.conditionObj.choiceDate[0],endDate:e.conditionObj.choiceDate[1],pageNum:e.currentPage,pageSize:e.pageSize};Object(r.e)("/haoban-app-attence-web/attence-total-day",a).then(function(t){var a=t.data;if(1==a.errorCode)return console.log(a.result.list),e.tabletData=a.result.list||[],void(e.total=a.result.total);o.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(t,e){t&&(this.activeBrand=t)},activeGroupId:function(t,e){t&&(this.activeGroup=t)},tabType:function(t,e){}},mounted:function(){this.$emit("showTab","11"),this.brandId&&1!=this.brandId&&(this.activeBrand=this.brandId),this.getTableList(this.brandId)}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",[a("common-detail-top",{attrs:{topMenuData:t.topMenuData,activeId:t.activeId}}),t._v(" "),a("div",{staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"m-b-20"},[a("div",{staticClass:"switch-wrap"},[a("div",{staticClass:"flex flex-space-between"},[a("div",{staticClass:"flex"},[a("el-input",{staticClass:"w-264",staticStyle:{width:"264px"},attrs:{placeholder:"请输入考勤组/人员名称","prefix-icon":"el-icon-search",clearable:""},on:{clear:t.clearInput},nativeOn:{keyup:function(e){return a=e,t.toInput(a,t.conditionObj.attenceGroupName);var a}},model:{value:t.conditionObj.attenceGroupName,callback:function(e){t.$set(t.conditionObj,"attenceGroupName",e)},expression:"conditionObj.attenceGroupName"}}),t._v(" "),a("el-date-picker",{staticClass:"search-date m-l-10",attrs:{format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",editable:!1,"picker-options":t.pickerOptions,type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.changeDate},model:{value:t.conditionObj.choiceDate,callback:function(e){t.$set(t.conditionObj,"choiceDate",e)},expression:"conditionObj.choiceDate"}})],1),t._v(" "),a("div",[a("el-button",{attrs:{type:"primary"},on:{click:t.toTableSet}},[t._v("设置报表")]),a("el-button",{staticClass:"p-l-10",attrs:{type:"primary"},on:{click:t.toUpdateSet}},[t._v("更新报表")])],1)])])]),t._v(" "),a("div",[a("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%"},attrs:{data:t.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"考勤组名称",width:"120","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.attenceGroupName))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"人数"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.personCount))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"类型","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(1==e.row.attenceType?"固定排班":2==e.row.attenceType?"排班制":"自由排班"))]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"考勤时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row)+"\n ")]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"",label:"最近更新时间","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v(t._s(t._f("timeStampToYmd")(e.row.updateTime)))]),t._v(" "),a("div",[t._v(t._s(t._f("timeStampToHms")(e.row.updateTime)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[2!=e.row.attenceType||e.row.personCount?t._e():a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toEditWorkTime(e.$index,e.row)}}},[t._v("编辑排班")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toEditGroup(e.$index,e.row)}}},[t._v("修改规则")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.toDel(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),0!=t.tableData.length?a("div",{staticClass:"block common-wrap__page text-right m-t-24"},[a("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[20,40,60,80],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1):t._e()],1)])],1)])},staticRenderFns:[]};var l=a("VU/8")(c,s,!1,function(t){a("x33c")},"data-v-57facd1a",null);e.default=l.exports},x33c:function(t,e){}});
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,f,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],d[t]&&u.push(d[t][0]),d[t]=0;for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(e[r]=f[r]);for(c&&c(a,f,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=b(b.s=n[i]);return o};var a={},d={103:0};function b(c){if(a[c])return a[c].exports;var d=a[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,b),d.l=!0,d.exports}b.e=function(e){var c=d[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,b){c=d[e]=[a,b]});c[2]=a;var f=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,b.nc&&n.setAttribute("nonce",b.nc),n.src=b.p+"static/js/"+e+"."+{0:"ab616832b6f6019a8690",1:"fe9dec1f31b04053fd7e",2:"54aabab28c7735d34c10",3:"b7e6d57d97174b75b050",4:"11254d7e3a102121b8ec",5:"ceb9a6b8f809b344b078",6:"124ad8222f7b043b44ae",7:"ebad93a8c5bffffd9e98",8:"f1c9fb5c9212483138d8",9:"b5aae16b3951516573ad",10:"ebbed2d956a1376f014a",11:"59c7813cc972f62b1d18",12:"879536ae7ce46f0c54ec",13:"57e51fc1b6342003f25d",14:"9cf830eb000e3ac61f70",15:"5c14bafeffc769f2eb46",16:"f483f95dbac654c7de5a",17:"ff6edf624b982c354977",18:"447fe4adcec70a86ea14",19:"d7d09ae4564d64842009",20:"455fd80bd8af15457c57",21:"c1b5e15e28768af52654",22:"2a873e819c6c369d5cd1",23:"d2380bf3c276e741313b",24:"b1832faa7c26cd1e9d72",25:"550aafc88ac4d0c8a14f",26:"e0ba8ad05ad14e4c0abc",27:"80efeaa8fe902850d85c",28:"70cb3f87bd69723dbd41",29:"c5bb15e8e1bd17cdc0f7",30:"9cc352d1f452ed39c7a4",31:"20f69d688df3827843c5",32:"0c7863fa05e5c75053c3",33:"f4e32fc6846aa744ee48",34:"0fb2eb67d47b9ecbd519",35:"9126da15eeae50bce7e6",36:"2cadbd4ded3457625f52",37:"8dc3e1f0f3e416135406",38:"9f4a46d2ce3c9477a06b",39:"b33ea830129fb895dd77",40:"52567857be12ee835446",41:"7264f33d2c3cf44d63a5",42:"9cacb9b0dc2a83864afe",43:"2324b3155ba3e3fe67b2",44:"a899f81af77b5d1b6daf",45:"d4e2ecd5b9efc4c430de",46:"03ae66bfca82c8ffa033",47:"393792502b1faedfd75b",48:"e413bb6ddbf0598e75ed",49:"8be0d341bf9560ab91d8",50:"edc711153403cc5a63ed",51:"5996349b24bab60188ec",52:"8e0bba68aa5e71955d4a",53:"86bbf67dd9e404acbe4f",54:"ddb7223a0928a1e1f4ce",55:"ef82ecd8807c80c07283",56:"52e6d99e9c54ec107c38",57:"04c21ade68e092912ad8",58:"ee398ad1c913c4c2ab6c",59:"582b016b4eda170bb861",60:"34b991ba5a199b8e4040",61:"f2dbd6d166f5018e7367",62:"2b352c28006429462f15",63:"ab01ba664ebbda2847d1",64:"b74592601e7caef1de9e",65:"515774c23255d836ad26",66:"023f892322dbb28f128e",67:"071cd1e7b61c5772738f",68:"1dd1e3d4d03e947443e2",69:"32e9f26303ac0d02f438",70:"a226d330de7ebb2a4c5f",71:"9551ae81326c57064dec",72:"cb1b3985b92be4556fc1",73:"b6b1fb51b601c0fafcda",74:"6206c00744e77bc84fec",75:"93eb5a61daaa3a1df425",76:"78e5a422e9fecbbd255a",77:"b3f7cf4d2b54d306c522",78:"1fc3472c5f95a0a66979",79:"69811ba75d1fceae9737",80:"12442b543aff65f2c05d",81:"00a94b58ac2affb758dc",82:"1fa56152d6bdcfd4ec14",83:"976088a6ee120b8caa17",84:"45dae077c86a1a0050ff",85:"0c7635a15cceae31d981",86:"d0d0607a424156f2d88d",87:"aee44c25b8d252c44b6e",88:"6583c4b0dc7a8f908fa2",89:"efe4f1f2709c6221cd8e",90:"f965c0ab799d944946de",91:"432e6232fb6d5ad3498c",92:"40e90149e575b118d77b",93:"96b6ac9b6398b7d7360f",94:"3b3320da6662e7e5c1cb",95:"04507f6fadd31b01a746",96:"d4a4beef007fa347bd93",97:"8b0f08b3974b32d7bc2a",98:"69c8efc82743796dc255",99:"58cc1884c4f80303999a",102:"2c7e1d628bd2f4ac709c"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=d[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return n.onerror=n.onload=t,f.appendChild(n),a},b.m=e,b.c=a,b.d=function(e,c,a){b.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},b.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(c,"a",c),c},b.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},b.p="./",b.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,f,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],b[t]&&u.push(b[t][0]),b[t]=0;for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(e[r]=f[r]);for(c&&c(a,f,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=d(d.s=n[i]);return o};var a={},b={103:0};function d(c){if(a[c])return a[c].exports;var b=a[c]={i:c,l:!1,exports:{}};return e[c].call(b.exports,b,b.exports,d),b.l=!0,b.exports}d.e=function(e){var c=b[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,d){c=b[e]=[a,d]});c[2]=a;var f=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,d.nc&&n.setAttribute("nonce",d.nc),n.src=d.p+"static/js/"+e+"."+{0:"ab616832b6f6019a8690",1:"fe9dec1f31b04053fd7e",2:"54aabab28c7735d34c10",3:"b7e6d57d97174b75b050",4:"11254d7e3a102121b8ec",5:"ceb9a6b8f809b344b078",6:"124ad8222f7b043b44ae",7:"ebad93a8c5bffffd9e98",8:"f1c9fb5c9212483138d8",9:"b5aae16b3951516573ad",10:"ebbed2d956a1376f014a",11:"59c7813cc972f62b1d18",12:"879536ae7ce46f0c54ec",13:"57e51fc1b6342003f25d",14:"9cf830eb000e3ac61f70",15:"8af6142c39019489292a",16:"f483f95dbac654c7de5a",17:"ff6edf624b982c354977",18:"447fe4adcec70a86ea14",19:"d7d09ae4564d64842009",20:"455fd80bd8af15457c57",21:"c1b5e15e28768af52654",22:"2a873e819c6c369d5cd1",23:"d2380bf3c276e741313b",24:"b1832faa7c26cd1e9d72",25:"550aafc88ac4d0c8a14f",26:"e0ba8ad05ad14e4c0abc",27:"80efeaa8fe902850d85c",28:"70cb3f87bd69723dbd41",29:"c5bb15e8e1bd17cdc0f7",30:"ea05d43b99177823fbdc",31:"b8b827be7489c76082e9",32:"5e1383bc5cac66f2999a",33:"61635e97ee430e22a19b",34:"85dcbf17af5b76ae54c4",35:"016601bb5d7237c9d04f",36:"2cadbd4ded3457625f52",37:"8dc3e1f0f3e416135406",38:"9f4a46d2ce3c9477a06b",39:"b33ea830129fb895dd77",40:"52567857be12ee835446",41:"7264f33d2c3cf44d63a5",42:"9cacb9b0dc2a83864afe",43:"2324b3155ba3e3fe67b2",44:"a899f81af77b5d1b6daf",45:"d4e2ecd5b9efc4c430de",46:"03ae66bfca82c8ffa033",47:"393792502b1faedfd75b",48:"e413bb6ddbf0598e75ed",49:"8be0d341bf9560ab91d8",50:"edc711153403cc5a63ed",51:"5996349b24bab60188ec",52:"8e0bba68aa5e71955d4a",53:"86bbf67dd9e404acbe4f",54:"ddb7223a0928a1e1f4ce",55:"ef82ecd8807c80c07283",56:"52e6d99e9c54ec107c38",57:"04c21ade68e092912ad8",58:"ee398ad1c913c4c2ab6c",59:"582b016b4eda170bb861",60:"34b991ba5a199b8e4040",61:"f2dbd6d166f5018e7367",62:"2b352c28006429462f15",63:"ab01ba664ebbda2847d1",64:"b74592601e7caef1de9e",65:"515774c23255d836ad26",66:"023f892322dbb28f128e",67:"071cd1e7b61c5772738f",68:"1dd1e3d4d03e947443e2",69:"743ce24f263c6fd8f2ac",70:"fc31890c98eea0486566",71:"9551ae81326c57064dec",72:"cb1b3985b92be4556fc1",73:"b6b1fb51b601c0fafcda",74:"6206c00744e77bc84fec",75:"93eb5a61daaa3a1df425",76:"78e5a422e9fecbbd255a",77:"b3f7cf4d2b54d306c522",78:"1fc3472c5f95a0a66979",79:"69811ba75d1fceae9737",80:"12442b543aff65f2c05d",81:"00a94b58ac2affb758dc",82:"1fa56152d6bdcfd4ec14",83:"976088a6ee120b8caa17",84:"45dae077c86a1a0050ff",85:"0c7635a15cceae31d981",86:"d0d0607a424156f2d88d",87:"aee44c25b8d252c44b6e",88:"6583c4b0dc7a8f908fa2",89:"efe4f1f2709c6221cd8e",90:"f965c0ab799d944946de",91:"432e6232fb6d5ad3498c",92:"40e90149e575b118d77b",93:"96b6ac9b6398b7d7360f",94:"3b3320da6662e7e5c1cb",95:"04507f6fadd31b01a746",96:"d4a4beef007fa347bd93",97:"8b0f08b3974b32d7bc2a",98:"69c8efc82743796dc255",99:"58cc1884c4f80303999a",102:"2c7e1d628bd2f4ac709c"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=b[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),b[e]=void 0)}return n.onerror=n.onload=t,f.appendChild(n),a},d.m=e,d.c=a,d.d=function(e,c,a){d.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},d.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(c,"a",c),c},d.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},d.p="./",d.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-10-21 14:27:29
* @LastEditors : 无尘
* @LastEditTime : 2019-12-20 10:09:46
* @LastEditTime : 2019-12-21 17:32:06
-->
<!--
......@@ -839,6 +839,27 @@ export default {
const arrD = ele.forbidEndEndTime[0].split('-');
ele.allowEndEndTime = arrD[0].split(':')[0] + arrD[0].split(':')[1];
});
}else {
that.formData.classessTimesJson.forEach(ele => {
if (ele.startTime != ele.endTime) {
const arrA = ele.forbidStartBeginTime[0].split('-');
ele.allowStartBeginTime = !ele.allowStartBeginTime ? arrA[0].split(':')[0] + arrA[0].split(':')[1] : ele.allowStartBeginTime;
const arrB = ele.forbidStartEndTime[0].split('-');
ele.allowStartEndTime = ! ele.allowStartEndTime ? arrB[0].split(':')[0] + arrB[0].split(':')[1] : ele.allowStartEndTime;
const arrC = ele.forbidEndStartTime[0].split('-');
ele.allowEndStartTime = !ele.allowEndStartTime? arrC[0].split(':')[0] + arrC[0].split(':')[1] : ele.allowEndStartTime;
const arrD = ele.forbidEndEndTime[0].split('-');
ele.allowEndEndTime = !ele.allowEndEndTime ? arrD[0].split(':')[0] + arrD[0].split(':')[1] : ele.allowEndEndTime;
}else {
ele.allowStartBeginTime = '';
const arrB = ele.forbidStartEndTime[0].split('-');
ele.allowStartEndTime = ! ele.allowStartEndTime ? arrB[0].split(':')[0] + arrB[0].split(':')[1] : ele.allowStartEndTime;
const arrC = ele.forbidEndStartTime[0].split('-');
ele.allowEndStartTime = !ele.allowEndStartTime? arrC[0].split(':')[0] + arrC[0].split(':')[1] : ele.allowEndStartTime;
ele.allowEndEndTime = '';
}
});
}
that.$refs[formName].validate(valid => {
if (valid) {
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors : 无尘
* @LastEditTime : 2019-12-21 15:48:30
-->
<template>
<div class="custom-dialog-wrap">
<el-dialog :title="'自定义' + customTitle" :visible.sync="customDialog" width="761px" :before-close="handleCardClose">
<div class="custom-dialog__title">
<p class="custom-dialog__p">
请选择您想在首页展示的{{ customTitle }},还可以再勾选<span> {{ 8 - checkList.length }} </span>
</p>
</div>
<div class="custom-dialog__checkbox">
<el-checkbox-group v-model="checkList" @change="customChange" :max="8">
<template v-if="customType === 'data'">
<el-checkbox v-for="item in customData" :label="item.dataViewId" :key="item.dataViewId" name="type">{{ item.fieldTitle }}</el-checkbox>
</template>
<template v-if="customType != 'data'">
<el-checkbox v-for="item in customData" :label="item.settingViewId" :key="item.settingViewId" name="type">{{ item.fieldTitle }}</el-checkbox>
</template>
</el-checkbox-group>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="customCancel">取 消</el-button>
<el-button type="primary" @click="customConfirm">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { postRequest, postJson } from '@/api/api';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
export default {
name: 'custom-dialog',
props: {
showCustomDialog: {
type: Boolean,
default: false
},
customType: {
type: String,
default: ''
},
customTitle: {
type: String,
default: ''
}
},
data() {
return {
repProjectName: 'haoban-manage-web', // 项目名
customDialog: false, // 弹框显示
// 复选框数据
customData: [
/*{
dataViewId: 1,
fieldTitle: "通讯录行政架构",
homeDisplay: true
}*/
],
checkList: [] //已选数据
};
},
/* eslint-disable */
beforeMount() {},
methods: {
/**
* 关闭
*/
handleCardClose() {
const that = this;
that.customCancel();
},
/**
* 取消
*/
customCancel() {
const that = this;
that.customDialog = false;
that.$emit('customHandleConfirm');
},
/**
* 确定
*/
customConfirm() {
const that = this;
if (!that.checkList.length) {
that.$message.error({
duration: 1000,
message: '请选择操作'
});
return false;
}
that.setData(that.checkList);
},
/**
* 复选框选择事件
*/
/* eslint-disable */
customChange(value) {
},
/**
* 设置首页数据概览显示项
*/
setData(list) {
const that = this;
let para = {
viewIdList: list
};
let url = that.customType == 'data' ? '/haoban-manage-web/home/set-display-enterprise-data' : '/haoban-manage-web/home/set-display-quick-entry';
postJson(url, para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('设置成功', 'success');
that.$emit('customHandleConfirm');
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取 设置首页数据概览显示项
*/
getCardList() {
const that = this;
let para = {
all: true
};
that.customType == 'data' ? (para.fetchData = false) : '';
// 判断企业数据概览
let url = that.customType == 'data' ? '/haoban-manage-web/home/find-enterprise-data' : '/haoban-manage-web/home/find-quick-entry';
that.checkList = [];
postRequest(url, para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
let selList = [];
resData.result.forEach(function(ele, index) {
if (!!ele.homeDisplay) {
that.customType == 'data' ? selList.push(ele.dataViewId) : selList.push(ele.settingViewId);
}
});
that.customData = resData.result;
that.checkList = selList;
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
showCustomDialog: function(newData, oldData) {
const that = this;
that.customDialog = newData;
},
customType: function(newData, oldData) {
const that = this;
if (!!newData) {
that.getCardList();
}
}
},
/* 接收数据 */
mounted() {
const that = this;
that.customDialog = that.showCustomDialog;
}
};
</script>
<style lang="scss" scoped>
.custom-dialog {
&-wrap {
}
&__title {
width: 100%;
height: 38px;
padding: 12px 15px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(235, 238, 245, 1);
}
&__p {
width: 100%;
font-size: 14px;
color: #606266;
span {
color: #1890ff;
}
}
&__checkbox {
width: 100%;
min-height: 100px;
max-height: 300px;
padding-top: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow-y: auto;
.el-checkbox {
width: 22%;
margin-left: 16px;
line-height: 62px;
&.is-checked {
/deep/ .el-checkbox__label {
color: #1890ff;
}
}
}
}
}
</style>
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-11-07 17:30:04
* @LastEditors : 无尘
* @LastEditTime : 2019-12-21 14:20:59
* @LastEditTime : 2019-12-21 17:24:12
-->
<!--
......@@ -54,6 +54,7 @@
</div>
</template>
<script>
import showMsg from '@/common/js/showmsg';
export default {
name: 'people-day-class',
props: {
......@@ -128,12 +129,28 @@ export default {
};
},
/**
* 隐藏
*/
hideSet() {
let div = document.createElement('button');
document.body.appendChild(div);
div.click();
document.body.removeChild(div);
},
/**
* 选择班次
*/
daySet(item) {
const that = this;
const y = new Date().getFullYear();
const m = new Date().getMonth() + 1 < 10 ? new Date().getMonth() + 1 : '0' + (new Date().getMonth() + 1);
const d = new Date().getDate() < 10 ? new Date().getDate() : '0' + new Date().getDate();
if (new Date(that.weekDay).getTime() < new Date(String(y) + '-' + String(m) + '-' + String(d)).getTime()) {
showMsg.showmsg('不能设置今天以前的排班', 'warning');
return false;
}
that.hideSet();
let arr = that.itemData.setClassesList.map(ele => ele.weekDay);
console.log(that.itemData, item, that.weekDay);
if (arr.includes(that.weekDay)) {
that.itemData.setClassesList.forEach(ele => {
if (ele.weekDay == that.weekDay) {
......@@ -143,8 +160,8 @@ export default {
ele.isRest = true;
}
});
console.log(that.itemData);
that.$emit('refreshData', JSON.parse(JSON.stringify(that.itemData)));
that.$forceUpdate();
}
},
......@@ -153,18 +170,38 @@ export default {
*/
dayWeekSet() {
const that = this;
const y = new Date().getFullYear();
const m = new Date().getMonth() + 1 > 10 ? new Date().getMonth() + 1 : '0' + (new Date().getMonth() + 1);
const d = new Date().getDate() > 10 ? new Date().getDate() : '0' + new Date().getDate();
if (new Date(that.weekDay).getTime() < new Date(String(y) + '-' + String(m) + '-' + String(d)).getTime()) {
showMsg.showmsg('不能设置今天以前的排班', 'warning');
return false;
}
that.hideSet();
// 当前选择的几号,还有轮询排班周期
let today = new Date(that.weekDay).getTime();
let cycleLength = that.cycleData[0].classesList.length; // 排班有几个班次,相当于一个周期是几天
// 然后在这个日期区间内按照排班周期设置
that.itemData.setClassesList.forEach((date, index) => {
for (let index = 0; index < that.itemData.setClassesList.length; index++) {
if (new Date(that.itemData.setClassesList[index].weekDay).getTime() >= today) {
that.itemData.setClassesList[index].classesName = that.cycleData[0].classesList[index % cycleLength].classesName;
that.itemData.setClassesList[index].classesId = that.cycleData[0].classesList[index % cycleLength].classesId;
that.itemData.setClassesList[index].classColor = that.cycleData[0].classesList[index % cycleLength].classColor;
that.itemData.setClassesList[index].isRest = true;
}
}
/* that.itemData.setClassesList.forEach((date, index) => {
// 不能保证顺序
if (new Date(date.weekDay).getTime() >= today) {
console.log(index % cycleLength);
date.classesName = that.cycleData[0].classesList[index % cycleLength].classesName;
date.classesId = that.cycleData[0].classesList[index % cycleLength].classesId;
date.classColor = that.cycleData[0].classesList[index % cycleLength].classColor;
date.isRest = true;
}
});
}); */
// console.log('周期设置:', that.itemData);
that.$emit('refreshData', JSON.parse(JSON.stringify(that.itemData)));
that.$forceUpdate();
}
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors : 无尘
* @LastEditTime : 2019-12-21 15:18:47
* @LastEditTime : 2019-12-21 15:44:45
-->
<!--
......@@ -18,9 +18,9 @@
<div class="m-b-20">
<div class="switch-wrap">
<div class="flex flex-space-between">
<div>
<div class="flex">
<el-input placeholder="请输入考勤组/人员名称" v-model="conditionObj.attenceGroupName" class="w-264" style="width: 264px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value, conditionObj.attenceGroupName)" clearable @clear="clearInput"></el-input>
<el-date-picker @change="changeDate" class="search-date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :editable="false" v-model="conditionObj.choiceDate" :picker-options="pickerOptions" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
<el-date-picker class="search-date m-l-10" @change="changeDate" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :editable="false" v-model="conditionObj.choiceDate" :picker-options="pickerOptions" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
</div>
<div><el-button type="primary" @click="toTableSet">设置报表</el-button><el-button class="p-l-10" type="primary" @click="toUpdateSet">更新报表</el-button></div>
</div>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-04-12 17:56:45
* @LastEditors : 无尘
* @LastEditTime : 2019-12-21 11:41:46
* @LastEditTime : 2019-12-21 17:23:49
-->
<template>
<div class="notice-list-wrap">
......@@ -467,7 +467,6 @@ export default {
},
hideCycleDialog(val) {
const that = this;
console.log(val);
that.rangeShow = false;
if (!val) {
return false;
......
......@@ -8,8 +8,7 @@
-->
<!--
我的顾客应用:
<app-detail ></app-detail>
-->
<template>
<div class="app-detail-wrap">
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-09-18 15:25:12
* @LastEditors : 无尘
* @LastEditTime : 2019-12-21 15:12:06
* @LastEditTime : 2019-12-21 17:22:15
-->
<template>
......@@ -72,8 +72,10 @@
<template v-for="(item, index) in dates">
<el-table-column prop="" show-overflow-tooltip :key="index + 'thead'" :resizable="false">
<template slot="header" slot-scope="scope">
{{ item.weekDay ? parseInt(item.weekDay.split('-')[2]) : '' }} <br />
{{ item.dayOfWeek }}
<div :class="['text-center', item.dayOfWeek == '六' || item.dayOfWeek == '日' ? 'color-red' : '']">
{{ item.weekDay ? parseInt(item.weekDay.split('-')[2]) : '' }} <br />
{{ item.dayOfWeek }}
</div>
</template>
<template slot-scope="scope">
<div class="day-work">
......@@ -285,13 +287,11 @@ export default {
}
const tableCopy = JSON.parse(JSON.stringify(that.tableData));
tableCopy.forEach(ele => {
console.log(ele.userId == item.userId);
if (ele.userId == item.userId) {
ele.setClassesList = item.setClassesList;
}
});
that.tableData = JSON.parse(JSON.stringify(tableCopy));
console.log(item, that.tableData);
that.$forceUpdate();
},
/**
......@@ -360,11 +360,6 @@ export default {
let resData = res.data;
if (resData.errorCode == 1) {
if (resData.result && resData.result.length) {
/* resData.result.forEach(ele => {
if (ele.classesList) {
ele.classesList = JSON.parse(ele.classesList);
}
}); */
resData.result.forEach(ele => {
if (ele.classesList && ele.classesList.length) {
ele.classesList.forEach(child => {
......@@ -377,7 +372,6 @@ export default {
}
});
}
console.log('cycleData:', resData.result);
that.cycleData = resData.result || [];
}
})
......@@ -397,7 +391,6 @@ export default {
month: that.yearMonth,
enterpriseId: that.enterpriseId,
attenceGroupId: that.$route.query.attenceGroupId
// taskType: 1 //0不良评价,1话务任务
};
postRequest('/haoban-app-attence-web/set-classes-detail', para)
.then(res => {
......@@ -405,14 +398,17 @@ export default {
if (resData.errorCode == 1) {
that.total = resData.result.totalCount;
that.dates = JSON.parse(JSON.stringify(resData.result.params.dateList));
resData.result.params.userList.forEach(ele => {
ele.setClassesList.forEach(child => {
child.classColor = !!child.classColor ? child.classColor : '';
that.classes.forEach(item => {
if (child.classesId == item.classesId) {
child.classColor = item.classColor;
}
});
});
});
that.tableData = JSON.parse(JSON.stringify(resData.result.params.userList)) || [];
console.log(that.tableData, that.dates);
return false;
}
errMsg.errorMsg(resData);
......@@ -443,10 +439,7 @@ export default {
mounted() {
const that = this;
that.$emit('showTab', '2');
console.log(that.yearMonth);
that.getClassifyData();
that.getTableList();
}
};
</script>
......@@ -469,6 +462,9 @@ export default {
display: inline-block;
}
}
.color-red {
color: #ff0000;
}
.work-time {
width: 100%;
.work-time-content {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment