提交 d5285488 编写于 作者: 刘英杰's avatar 刘英杰

V20240828 保存

上级 39979f2a
.index[data-v-a4e5c79e]{width:100%;box-sizing:border-box;padding:10px;background-color:#fff}table[data-v-a4e5c79e]{width:100%;background-color:#fff;border-color:#e3e8ee;text-align:center;border-radius:4px;border-top:1px solid #e3e8ee;border-left:1px solid #e3e8ee}tr[data-v-a4e5c79e]{border:none;text-align:center}td[data-v-a4e5c79e]{border-bottom:1px solid #e3e8ee;border-right:1px solid #e3e8ee;text-align:center;box-sizing:border-box;padding:6px;cursor:pointer;max-width:150px}td[data-v-a4e5c79e]:hover{background:#e7f7f4}td:hover .dis[data-v-a4e5c79e]{display:block;text-align:center;margin:0 auto;cursor:pointer}tr[data-v-a4e5c79e]:first-child{height:30px;background-color:#f3f3f3;border:none;color:#525252;font-weight:700;width:50px}.sepacialy[data-v-a4e5c79e]{border-top:1px solid #e3e8ee;border-left:1px solid #e3e8ee}.table-heard[data-v-a4e5c79e]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;box-sizing:border-box;padding:10px 10px}.table-heard .center[data-v-a4e5c79e]{display:flex;justify-content:center;align-items:center}.table-heard .center p[data-v-a4e5c79e]{font-size:20px;margin:0 30px}.course-item[data-v-a4e5c79e]{display:flex;justify-content:center;flex-direction:column;gap:6px;align-items:center;min-height:80px;border-radius:4px;box-sizing:border-box;padding:10px 0}.course-item p[data-v-a4e5c79e]{color:#3a3a3a}.time[data-v-a4e5c79e]{background:#f7f7f7;color:#707070;font-weight:700}
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><title>值班管理</title><link href=css/chunk-vendors.cc1990b1.css rel=stylesheet><link href=css/app.a786022a.css rel=stylesheet></head><body><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 值班管理。</strong></noscript><div id=app></div><script src=js/chunk-vendors.9ae50470.js></script><script src=js/app.c113b860.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><title>值班管理</title><link href=css/chunk-vendors.cc1990b1.css rel=stylesheet><link href=css/app.a786022a.css rel=stylesheet></head><body><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 值班管理。</strong></noscript><div id=app></div><script src=js/chunk-vendors.9ae50470.js></script><script src=js/app.2ea0e833.js></script></body></html>
\ No newline at end of file
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d43c11c"],{"6d0c":function(t,e,a){"use strict";a("99a4")},"99a4":function(t,e,a){},ba6e:function(t,e,a){"use strict";a.r(e);a("7f7f");var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ele-body"},[e("Card",{ref:"card",attrs:{bordered:!1,"dis-hover":""}},[t.loading?e("Spin",{attrs:{fix:""}}):t._e(),e("div",{staticClass:"table-heard"},[e("div",[e("Tag",{attrs:{size:"large"}},[t._v(t._s(this.currentWeekRange[0]+"至"+this.currentWeekRange[1])+"\n ")]),e("Button",{attrs:{type:"primary"},on:{click:function(e){t.importDuty.show=!0}}},[t._v("导出值班日志")])],1),e("div",{staticClass:"center"},[e("Button",{attrs:{size:"default"},on:{click:t.weekPre}},[e("Icon",{attrs:{type:"ios-arrow-back"}}),t._v("\n 上一周\n ")],1),e("p",[t._v(t._s(t.currentYear)+"年"+t._s(t.currentMonth)+"月")]),e("Button",{attrs:{size:"default"},on:{click:t.weekNext}},[t._v("下一周\n "),e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1),e("div")]),e("table",{attrs:{align:"center",cellpadding:"0",cellspacing:"0"}},[e("tr",{staticClass:"sepacialy"},[e("td"),t._l(t.weekGround,(function(a,n){return e("td",{key:n},[t._v(t._s(a))])}))],2),t._l(t.timeGround,(function(a,n){return e("tr",{key:n},[e("td",{staticClass:"time"},[t._v(t._s(a.typeName))]),t._l(t.weekGround,(function(a,i){return e("td",{key:i,attrs:{align:"center",valign:"middle"}},t._l(t.course[i].dutydatas,(function(a,o){return e("div",{key:o,on:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[a.duty_type_id===t.timeGround[n].id?e("div",{staticClass:"course-item"},[e("p",[a.duty_daytime_people?e("Tag",{staticStyle:{height:"auto"},attrs:{color:"blue"},nativeOn:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[t._v("\n 白天:"+t._s(a.duty_daytime_people)+"\n ")]):t._e()],1),e("p",[a.duty_night_people?e("Tag",{staticStyle:{height:"auto"},attrs:{color:"red"},nativeOn:{click:function(e){return t.clickCell(a,t.course[i].date)}}},[t._v("\n 晚上:"+t._s(a.duty_night_people)+"\n ")]):t._e()],1)]):t._e()])})),0)}))],2)}))],2)],1),e("Modal",{staticClass:"add-modal",attrs:{loading:t.modalLoading,title:"值班安排",width:"50%"},on:{"on-ok":t.handleConfirm,"on-cancel":t.handleClose},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[e("Form",{ref:"form",attrs:{"label-width":150,model:t.formData,rules:t.formRule}},[e("FormItem",{attrs:{label:"分类名称"}},[e("Input",{attrs:{disabled:""},model:{value:t.selectItem.duty_type_name,callback:function(e){t.$set(t.selectItem,"duty_type_name",e)},expression:"selectItem.duty_type_name"}})],1),e("FormItem",{attrs:{label:"值班日期"}},[e("Input",{attrs:{disabled:""},model:{value:t.selectDate,callback:function(e){t.selectDate=e},expression:"selectDate"}})],1),e("FormItem",{attrs:{label:"白天值班人员"}},[e("Select",{attrs:{filterable:"",multiple:""},model:{value:t.duty_daytime_people_id,callback:function(e){t.duty_daytime_people_id=e},expression:"duty_daytime_people_id"}},t._l(t.peopleOption,(function(a){return e("Option",{key:a.id,attrs:{label:a.name,value:a.id}},[e("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[e("p",[t._v(t._s(a.name)+"\n "),e("span",{staticStyle:{color:"#9a9a9a"}},[t._v("("+t._s(a.card)+")")])]),e("p",{staticStyle:{color:"#ccc"}},[t._v(t._s(a.dept_name))])])])})),1)],1),e("FormItem",{attrs:{label:"晚上值班人员"}},[e("Select",{attrs:{filterable:"",multiple:""},model:{value:t.duty_night_people_id,callback:function(e){t.duty_night_people_id=e},expression:"duty_night_people_id"}},t._l(t.peopleOption,(function(a){return e("Option",{key:a.id,attrs:{label:a.name,value:a.id}},[e("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[e("p",[t._v(t._s(a.name)+"\n "),e("span",{staticStyle:{color:"#9a9a9a"}},[t._v("("+t._s(a.card)+")")])]),e("p",{staticStyle:{color:"#ccc"}},[t._v(t._s(a.dept_name))])])])})),1)],1)],1)],1),e("Modal",{attrs:{width:"460"},scopedSlots:t._u([{key:"header",fn:function(){return[e("p",{staticStyle:{color:"#2D8CF0","text-align":"center"}},[e("Icon",{attrs:{type:"ios-information-circle"}}),e("span",[t._v("导出值班日志")])],1)]},proxy:!0},{key:"footer",fn:function(){return[e("Button",{attrs:{type:"primary",size:"large",loading:t.importDuty.loading,long:""},on:{click:t.importDutyFun}},[t._v("导出值班日志")])]},proxy:!0}]),model:{value:t.importDuty.show,callback:function(e){t.$set(t.importDuty,"show",e)},expression:"importDuty.show"}},[e("div",{staticStyle:{"text-align":"center"}},[e("Form",{attrs:{"label-width":80}},[e("FormItem",{attrs:{label:"值班日期",prop:"user"}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",placement:"bottom-end",placeholder:"请选择值班日期"},model:{value:t.importDuty.date,callback:function(e){t.$set(t.importDuty,"date",e)},expression:"importDuty.date"}})],1)],1)],1)])],1)},i=[],o=(a("ac6a"),a("e191")),r=a("61be"),s=a("d02c"),c=a("5a0c"),l=a.n(c),d={props:{},data:function(){return{importDuty:{loading:!1,show:!1,date:[l()().format("YYYY-MM-DD"),l()().format("YYYY-MM-DD")],formData:{begin_time:"",end_time:""}},weekGround:["周一","周二","周三","周四","周五","周六","周日"],course:[],timeGround:[],currentYear:"",currentMonth:"",currentDay:"",currentWeek:"",days:[],currentWeekRange:[],defalultWeekGround:["周一","周二","周三","周四","周五","周六","周日"],coachColorMap:{"张三":"#2B2E4A","李四":"#521262","王五":"#903749"},loading:!1,showModal:!1,selectDate:"",selectItem:"",formData:{},formRule:{},peopleOption:[],duty_daytime_people_id:[],duty_night_people_id:[],modalLoading:!0}},created:function(){},mounted:function(){this.initData(),this.GetPersonByCondiction()},methods:{importDutyFun:function(){var t=this;return this.importDuty.loading=!0,this.importDuty.formData={begin_time:l()(this.importDuty.date[0]).format("YYYY-MM-DD"),end_time:l()(this.importDuty.date[1]).format("YYYY-MM-DD")},s["g"](this.importDuty.formData,{responseType:"blob"}).then((function(e){r["a"](e,"".concat(t.importDuty.formData.begin_time+"至"+t.importDuty.formData.end_time,"值班数据")),t.importDuty.loading=!1})).finally((function(){t.importDuty.loading=!1}))},getData:function(){var t=this,e={begin:this.currentWeekRange[0],end:this.currentWeekRange[1]};this.loading=!0,Object(o["b"])(e).then((function(e){t.loading=!1,t.timeGround=[],t.course=e,t.course[0].dutydatas.forEach((function(e){t.timeGround.push({id:e.duty_type_id,typeName:e.duty_type_name})}))}))},formatDate:function(t,e,a){var n=t,i=e;i<10&&(i="0".concat(i));var o=a;return o<10&&(o="0".concat(o)),"".concat(n,"-").concat(i,"-").concat(o)},initData:function(t){var e=this,a="";a=t?new Date(t):new Date,this.currentDay=a.getDate(),this.currentYear=a.getFullYear(),this.currentMonth=a.getMonth()+1,this.currentWeek=a.getDay(),0===this.currentWeek&&(this.currentWeek=7);var n=this.formatDate(this.currentYear,this.currentMonth,this.currentDay);this.days.length=0;for(var i=this.currentWeek-1;i>=0;i-=1){var o=new Date(n);o.setDate(o.getDate()-i),this.days.push(o)}for(var r=1;r<=7-this.currentWeek;r+=1){var s=new Date(n);s.setDate(s.getDate()+r),this.days.push(s)}this.currentWeekRange=[this.formatDate(this.days[0].getFullYear(),this.days[0].getMonth()+1,this.days[0].getDate()),this.formatDate(this.days[6].getFullYear(),this.days[6].getMonth()+1,this.days[6].getDate())];var c=[];this.days.forEach((function(t){c.push("".concat(t.getMonth()+1,"/").concat(t.getDate()))})),this.defalultWeekGround.map((function(t,a){e.weekGround[a]=t+"(".concat(c[a],")")})),this.getData()},weekPre:function(){var t=this.days[0];t.setDate(t.getDate()-7),this.initData(t)},weekNext:function(){var t=this.days[6];t.setDate(t.getDate()+7),this.initData(t)},GetPersonByCondiction:function(){var t=this,e={page_index:1,page_size:1e4};Object(o["c"])(e).then((function(e){t.peopleOption=e.data}))},clickCell:function(t,e){this.selectDate=e,this.selectItem=t,this.duty_daytime_people_id=t.duty_daytime_people_list.map((function(t){return t.id})),this.duty_night_people_id=t.duty_night_people_list.map((function(t){return t.id})),this.showModal=!0},handleConfirm:function(){var t=this,e={duty_type_id:this.selectItem.duty_type_id,date:this.selectDate,record_id:this.selectItem.record_id,duty_daytime_people_id:this.duty_daytime_people_id,duty_night_people_id:this.duty_night_people_id};console.log(e),Object(o["a"])(e).then((function(e){t.handleModalLoading(),t.showModal=!1,t.$Message.success("安排成功"),t.duty_daytime_people_id=[],t.duty_night_people_id=[],t.getData()})).catch((function(){t.handleModalLoading()}))},handleModalLoading:function(){var t=this;this.modalLoading=!1,this.$nextTick((function(){t.modalLoading=!0}))},handleClose:function(){this.duty_daytime_people_id=[],this.duty_night_people_id=[]}},computed:{}},u=d,p=(a("6d0c"),a("2877")),_=Object(p["a"])(u,n,i,!1,null,"a4e5c79e",null);e["default"]=_.exports},e191:function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return r}));var n=a("b6bd");function i(t){return Object(n["a"])({url:"/api/DutyRecord/GetDutyArrangeByDateList",method:"get",params:t})}function o(t){return Object(n["a"])({url:"/api/Common/GetPersonByCondiction",method:"get",params:t})}function r(t){return Object(n["a"])({url:"/api/DutyRecord/DutyArrangeIns",method:"post",data:t})}}}]);
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或