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

V1.0.1.250205-250325

1.安排值班>列表及顶部》增加 “相互换班功能”
2.系统配置》值班类型〉支持启用禁用功能
上级 bfc0d625
流水线 #33902 已失败 ,包含阶段
in 31 second
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
.selectTitleIcon[data-v-cb788a4c]:hover{cursor:pointer}
\ No newline at end of file
.selectTitleIcon[data-v-444bf3f9]:hover{cursor:pointer}
\ 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"><link rel="shortcut icon" href=favicon.ico><title>值班管理</title><link href=css/app.35e59e0d.css rel=stylesheet></head><body><script charset=utf-8 src="https://map.qq.com/api/gljs?v=1.exp&key=IZXBZ-OTAWV-XU7PV-5FAAL-F6VXH-7XBQP"></script><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 党建管理系统。</strong></noscript><div id=app></div><script src=js/chunk-vendors.231bdbe1.js></script><script src=js/app.5ed199ca.js></script></body></html> <!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"><link rel="shortcut icon" href=favicon.ico><title>值班管理</title><link href=css/app.37b2e41c.css rel=stylesheet></head><body><script charset=utf-8 src="https://map.qq.com/api/gljs?v=1.exp&key=IZXBZ-OTAWV-XU7PV-5FAAL-F6VXH-7XBQP"></script><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 党建管理系统。</strong></noscript><div id=app></div><script src=js/chunk-vendors.231bdbe1.js></script><script src=js/app.405261ce.js></script></body></html>
\ No newline at end of file \ No newline at end of file
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a44c5"],{"069b":function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return p})),r.d(e,"c",(function(){return s}));var n=r("b6bd");r("8e6e"),r("ac6a"),r("456d");var c=r("bd86");r("7f7f");function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){Object(c["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(t,e){var r={first_id:t.first_id,second_id:t.second_id};return n["a"].get("/api/Watch/api/Watch/ExchangeDuty",a({params:r},e))}function p(t){return n["a"].get("/api/Watch/api/Watch/GetExchangableDuty",t)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){Object(c["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e){var r={id:t.id,status:t.status};return n["a"].get("/api/WatchType/api/WatchType/EnableWatchType",b({params:r},e))}}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d2084c8"],{a3cc:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{scopedSlots:t._u([{key:"title",fn:function(){return[n("div",{staticStyle:{height:"30px",display:"flex","align-items":"center"}},[n("RadioGroup",{attrs:{type:"button"},model:{value:t.buttonSize,callback:function(e){t.buttonSize=e},expression:"buttonSize"}},[n("Radio",{attrs:{label:"type"}},[t._v("值班类型")]),n("Radio",{attrs:{label:"time"}},[t._v("值班时间")]),n("Radio",{attrs:{label:"campus"}},[t._v("校区配置")]),n("Radio",{attrs:{label:"info"}},[t._v("消息提醒")]),n("Radio",{attrs:{label:"attendance"}},[t._v("考勤管理")])],1),n("div",{staticStyle:{display:"flex","align-items":"center","margin-left":"15px"}},[n("h3",[t._v("系部干事换班:")]),n("i-switch",{attrs:{size:"large","true-value":"1","false-value":"0"},on:{"on-change":t.onChange},scopedSlots:t._u([{key:"open",fn:function(){return[n("span",[t._v("开启")])]},proxy:!0},{key:"close",fn:function(){return[n("span",[t._v("关闭")])]},proxy:!0}]),model:{value:t.configSwitchValue,callback:function(e){t.configSwitchValue=e},expression:"configSwitchValue"}})],1)],1)]},proxy:!0},{key:"extra",fn:function(){return[n("div",{staticStyle:{display:"flex","flex-wrap":"nowrap","align-items":"center"}},[t.showComponent.info||t.showComponent.attendance?t._e():n("Input",{attrs:{placeholder:"请输入关键词...",clearable:""},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}}),t.showComponent.info||t.showComponent.attendance?t._e():n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:t.searchEvent}},[t._v("查找\n ")]),t.showComponent.info||t.showComponent.attendance?t._e():n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:t.addWatchType}},[t._v("\n "+t._s(t.ModalTitleValue)+"\n ")]),t.showComponent.attendance?n("Button",{attrs:{type:"primary"},on:{click:t.addAttendance}},[t._v("添加考勤范围")]):t._e()],1)]},proxy:!0}])},[t.showComponent.type?n("watchType",{attrs:{input:t.formTop,searchValue:t.searchValue},on:{cancelModal:t.cancelModal}}):t._e(),t.showComponent.info?n("MessageConfig"):t._e(),t.showComponent.campus?n("Campus",{attrs:{input:t.formTop,searchValue:t.searchValue},on:{cancelModal:t.cancelModal}}):t._e(),t.showComponent.time?n("WatchHour",{attrs:{input:t.formTop,searchValue:t.searchValue},on:{cancelModal:t.cancelModal}}):t._e(),t.showComponent.attendance?n("Attendance",{ref:"attendance"}):t._e(),n("Modal",{attrs:{title:""+t.ModalTitleValue,"cancel-text":"取消","ok-text":"确认","mask-closable":!1,loading:t.loading},on:{"on-ok":function(e){return t.modalOk()}},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":80}},[t.showComponent.type?n("FormItem",{attrs:{label:"值班名称",prop:"input1"}},[n("Input",{attrs:{clearable:"",placeholder:"请选择值班名称"},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1):t._e(),t.showComponent.type?n("FormItem",{attrs:{label:"值班时间",prop:"input3"}},[n("Select",{attrs:{clearable:"",placeholder:"请选择值班时间"},model:{value:t.formTop.input3,callback:function(e){t.$set(t.formTop,"input3",e)},expression:"formTop.input3"}},t._l(t.watchHourTimeList,(function(e){return n("Option",{key:e.id,attrs:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1):t._e(),t.showComponent.type?n("FormItem",{attrs:{label:"签到类型",prop:"signInType"}},[n("Select",{attrs:{clearable:"",placeholder:"请选择签到类型"},model:{value:t.formTop.type,callback:function(e){t.$set(t.formTop,"type",e)},expression:"formTop.type"}},[n("Option",{attrs:{value:0}},[t._v("免打卡")]),n("Option",{attrs:{value:1}},[t._v("无定位打卡")]),n("Option",{attrs:{value:2}},[t._v("定位拍照打卡")])],1)],1):t._e(),t.showComponent.type?n("FormItem",{attrs:{label:"值班备注",prop:"input2"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入值班备注"},model:{value:t.formTop.input2,callback:function(e){t.$set(t.formTop,"input2",e)},expression:"formTop.input2"}})],1):t._e(),t.showComponent.campus?n("FormItem",{attrs:{label:"校区名称",prop:"input1"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入校区名称"},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1):t._e(),t.showComponent.time?n("FormItem",{attrs:{label:"区间名称",prop:"timeName1"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入区间名称"},model:{value:t.formTop.timeName1,callback:function(e){t.$set(t.formTop,"timeName1",e)},expression:"formTop.timeName1"}})],1):t._e(),t.showComponent.time?n("FormItem",{attrs:{label:"时间",prop:"watchTime"}},[n("TimePicker",{staticStyle:{width:"100%"},attrs:{clearable:"",format:"HH:mm",type:"timerange",placement:"bottom-end",placeholder:"请选择时间"},on:{"on-change":t.selectTileValue},model:{value:t.formTop.watchTime,callback:function(e){t.$set(t.formTop,"watchTime",e)},expression:"formTop.watchTime"}})],1):t._e()],1)],1)],1)],1)},o=[],i=n("5e9b"),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.columns,data:t.data,loading:t.loading},scopedSlots:t._u([{key:"sign_type",fn:function(e){var a=e.row;return[0==a.sign_type?n("span",[t._v("免打卡")]):t._e(),1==a.sign_type?n("span",[t._v("无定位打卡")]):t._e(),2==a.sign_type?n("span",[t._v("定位拍照打卡")]):t._e()]}},{key:"action",fn:function(e){var a=e.row;return[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.update(a)}}},[t._v("修改")]),n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"error",size:"small"},on:{click:function(e){return t.Delete(a)}}},[t._v("删除")])]}}])}),n("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[n("Page",{attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1),n("Modal",{attrs:{title:"值班类型","cancel-text":"取消","ok-text":"确认","mask-closable":!1},on:{"on-ok":t.modalOk},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":100}},[n("FormItem",{attrs:{label:"值班类型",prop:"input1"}},[n("Input",{model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1),n("FormItem",{attrs:{label:"值班时间",prop:"input2"}},[n("Select",{attrs:{placeholder:""},model:{value:t.formTop.input3,callback:function(e){t.$set(t.formTop,"input3",e)},expression:"formTop.input3"}},t._l(t.watchHourTimeList,(function(e){return n("Option",{key:e.id,attrs:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1),n("FormItem",{attrs:{label:"签到类型"}},[n("Select",{attrs:{placeholder:""},model:{value:t.formTop.type,callback:function(e){t.$set(t.formTop,"type",e)},expression:"formTop.type"}},[n("Option",{attrs:{value:0}},[t._v("免打卡")]),n("Option",{attrs:{value:1}},[t._v("无定位打卡")]),n("Option",{attrs:{value:2}},[t._v("定位拍照打卡")])],1)],1),n("FormItem",{attrs:{label:"值班类型备注",prop:"input2"}},[n("Input",{model:{value:t.formTop.input2,callback:function(e){t.$set(t.formTop,"input2",e)},expression:"formTop.input2"}})],1)],1)],1)],1)},s=[],c=(n("96cf"),n("3b8d")),u=n("967e"),l=n.n(u),p=n("806c"),m={name:"watchType",components:{},props:["input","searchValue"],data:function(){return{watchHourTimeList:[],modal:!1,formTop:{id:"",input1:"",input2:"",input3:"",type:""},page_size:10,page_index:1,total:null,loading:!1,columns:[{title:"序号",type:"index"},{title:"值班类型",key:"watchtypename"},{title:"类型备注",key:"watchtype_remark"},{title:"签到类型",slot:"sign_type"},{title:"值班时间",key:"watchhourname"},{title:"操作",slot:"action",align:"center"}],data:[]}},computed:{},watch:{"input.flag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a,o;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e,"$parent",this.$parent),!e){t.next=10;break}return a={watchtypename:this.input.input1,watchtype_remark:this.input.input2,watchhour_id:this.input.input3,sign_type:this.input.type},t.next=5,i["Y"](a);case 5:return o=t.sent,t.next=8,this.GetWatchTypeList();case 8:this.input.flag=!1,1===o.code&&this.$emit("cancelModal",!1);case 10:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),"input.searchFlag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e),!e){t.next=6;break}return t.next=4,this.GetWatchTypeList();case 4:this.input.searchFlag=!1,this.$emit("cancelModal",!1);case 6:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},methods:{modalOk:function(){var t=this;p["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={watchtypeid:t.formTop.id,watchtypename:t.formTop.input1,watchtype_remark:t.formTop.input2,watchhour_id:t.formTop.input3,sign_type:t.formTop.type},e.next=3,i["Y"](n);case 3:return a=e.sent,e.next=6,t.GetWatchTypeList();case 6:return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)}))))},update:function(t){this.formTop.id=t.watchtypeid,this.formTop.input1=t.watchtypename,this.formTop.input2=t.watchtype_remark,this.formTop.input3=t.watchhour_id,this.formTop.type=t.sign_type,this.modal=!0},DeleteAction:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:p["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function t(){var n,a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={id:e.formTop.id},t.next=3,i["X"](n);case 3:return a=t.sent,t.next=6,e.GetWatchTypeList();case 6:return t.abrupt("return",a);case 7:case"end":return t.stop()}}),t)}))));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),Delete:function(t){var e=this;this.formTop.id=t.watchtypeid,this.publicConfirm((function(){return e.DeleteAction()}))},currentPage:function(t){console.log(t),this.page_index=t,this.GetWatchTypeList()},currentPageCount:function(t){console.log(t,"currentPageCount"),this.page_size=t,this.GetWatchTypeList()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(c["a"])(l.a.mark((function e(){return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Spin.hide(),this.$Message["success"]({background:!0,content:"操作成功"}))},GetWatchTypeList:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this,n=arguments;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n.length>0&&void 0!==n[0]?n[0]:"",p["getInitListRequest"](Object(c["a"])(l.a.mark((function t(){var n,a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,n={name:e.searchValue,page_size:e.page_size,page_index:e.page_index},t.next=4,i["z"](n);case 4:a=t.sent,e.data=a.response.data,e.total=a.response.data_count,e.loading=!1;case 8:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){var t=this;this.GetWatchTypeList(),i["w"]().then((function(e){t.watchHourTimeList=e.response}))},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){console.info("🚀🚀🚀destroyed,")},activated:function(){}},d=m,h=n("2877"),f=Object(h["a"])(d,r,s,!1,null,"a436287e",null),g=f.exports,w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.columns,data:t.data,loading:t.loading},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.row;return[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.update(a)}}},[t._v("修改")]),n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"error",size:"small"},on:{click:function(e){return t.Delete(a)}}},[t._v("删除")])]}}])}),n("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[n("Page",{attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1),n("Modal",{attrs:{title:"配置校区","cancel-text":"取消","ok-text":"确认","mask-closable":!1},on:{"on-ok":t.modalOk},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":80}},[n("FormItem",{attrs:{label:"配置校区",prop:"input1"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入校区名称"},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1)],1)],1)],1)},v=[],b={name:"watchType",components:{},props:["input","searchValue"],data:function(){return{loading:!1,spinShow:!1,modal:!1,formTop:{id:"",input1:"",input2:""},page_size:10,page_index:1,total:null,columns:[{title:"序号",type:"index"},{title:"校区名称",key:"campusname"},{title:"操作",slot:"action",align:"center"}],data:[]}},computed:{},watch:{"input.flag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a,o;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e){t.next=9;break}return a={campusname:this.input.input1},t.next=4,i["d"](a);case 4:return o=t.sent,t.next=7,this.GetCampusList();case 7:this.input.flag=!1,1===o.code&&this.$emit("cancelModal",!1);case 9:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),"input.searchFlag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e){t.next=5;break}return t.next=3,this.GetCampusList();case 3:this.input.searchFlag=!1,this.$emit("cancelModal",!1);case 5:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},methods:{modalOk:function(){var t=this;p["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={campusid:t.formTop.id,campusname:t.formTop.input1},e.next=3,i["d"](n);case 3:if(a=e.sent,1!==a.code){e.next=7;break}return e.next=7,t.GetCampusList();case 7:return e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)}))))},update:function(t){this.formTop.id=t.campusid,this.formTop.input1=t.campusname,this.modal=!0},DeleteAction:function(){var t=this;p["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={campusid:t.formTop.id},e.next=3,i["c"](n);case 3:return a=e.sent,t.GetCampusList(),e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)}))))},Delete:function(t){var e=this;this.formTop.id=t.campusid,this.publicConfirm((function(){return e.DeleteAction()}))},currentPage:function(t){console.log(t),this.page_index=t,this.GetCampusList()},currentPageCount:function(t){console.log(t,"currentPageCount"),this.page_size=t,this.GetCampusList()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(c["a"])(l.a.mark((function e(){return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Message["success"]({background:!0,content:"操作成功"}),this.$Spin.hide())},GetCampusList:function(){var t=this;p["getInitListRequest"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loading=!0,n={name:t.searchValue,page_size:t.page_size,page_index:t.page_index},e.next=4,i["g"](n);case 4:a=e.sent,t.data=a.response.data,t.total=a.response.data_count,t.loading=!1;case 8:case"end":return e.stop()}}),e)}))))}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){this.GetCampusList()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},y=b,T=Object(h["a"])(y,w,v,!1,null,"6b53c222",null),k=T.exports,x=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.columns,data:t.data,loading:t.loading},scopedSlots:t._u([{key:"advance_day",fn:function(e){var n=e.row;return[t._v("\n "+t._s(n.advance_day)+"天\n ")]}},{key:"action",fn:function(e){var a=e.row;return[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.update(a)}}},[t._v("修改")])]}}])}),n("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[n("Page",{attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1),n("Modal",{attrs:{title:"值班类型","cancel-text":"取消","ok-text":"确认","mask-closable":!1},on:{"on-ok":t.modalOk},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":80}},[n("FormItem",{attrs:{label:"提前天数",prop:"input1"}},[n("InputNumber",{staticStyle:{width:"100%"},attrs:{max:10,min:1},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1),n("FormItem",{attrs:{label:"提醒时间",prop:"input2"}},[n("TimePicker",{staticStyle:{width:"100%"},attrs:{format:"HH:mm",placeholder:"Select time"},on:{"on-change":t.getSelectTime},model:{value:t.formTop.input2,callback:function(e){t.$set(t.formTop,"input2",e)},expression:"formTop.input2"}})],1)],1)],1)],1)},_=[],C={name:"watchType",components:{},props:["input","searchValue"],data:function(){return{loading:!1,modal:!1,formTop:{time_task_id:"",id:"",input1:1,input2:""},page_size:10,page_index:1,total:null,columns:[{title:"序号",type:"index"},{title:"提前天数",slot:"advance_day"},{title:"提醒时间",key:"remind_time"},{title:"操作",slot:"action",align:"center"}],data:[]}},computed:{},watch:{"input.flag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a,o;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e),!e){t.next=10;break}return a={watchtypename:this.input.input1,watchtype_remark:this.formTop.input2},t.next=5,i["Y"](a);case 5:return o=t.sent,t.next=8,this.GetMessageConfigInfo();case 8:this.input.flag=!1,1===o.code&&this.$emit("cancelModal",!1);case 10:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),"input.searchFlag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e),!e){t.next=7;break}return t.next=4,this.GetMessageConfigInfo();case 4:a=t.sent,this.input.searchFlag=!1,1===a.code&&this.$emit("cancelModal",!1);case 7:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},methods:{getSelectTime:function(t){this.formTop.input2=t},modalOk:function(){var t=this;p["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={megconfigid:t.formTop.id,advance_day:t.formTop.input1,remind_time:t.formTop.input2,time_task_id:t.formTop.time_task_id},e.next=3,i["k"](n);case 3:return a=e.sent,e.next=6,t.GetMessageConfigInfo();case 6:return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)}))))},update:function(t){this.formTop.id=t.megconfigid,this.formTop.input1=t.advance_day,this.formTop.input2=t.remind_time,this.formTop.time_task_id=t.time_task_id,this.modal=!0},DeleteAction:function(){var t=Object(c["a"])(l.a.mark((function t(){var e;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={id:this.formTop.id},t.next=3,i["X"](e);case 3:t.sent,this.GetMessageConfigInfo();case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),Delete:function(t){var e=this;this.formTop.id=t.watchtypeid,this.publicConfirm((function(){return e.DeleteAction()}))},currentPage:function(t){console.log(t),this.page_index=t,this.GetMessageConfigInfo()},currentPageCount:function(t){console.log(t,"currentPageCount"),this.page_size=t,this.GetMessageConfigInfo()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(c["a"])(l.a.mark((function e(){return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Spin.hide(),this.$Message["success"]({background:!0,content:"操作成功"}))},GetMessageConfigInfo:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this,n=arguments;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n.length>0&&void 0!==n[0]?n[0]:"",p["getInitListRequest"](Object(c["a"])(l.a.mark((function t(){var n;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,e.data=[],t.next=4,i["j"]();case 4:n=t.sent,e.data.push(n.response),e.loading=!1;case 7:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()},beforeCreate:function(){console.info("🚀🚀🚀,")},created:function(){},beforeMount:function(){},mounted:function(){this.GetMessageConfigInfo()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){console.info("🚀🚀🚀destroyed,")},activated:function(){}},M=C,S=Object(h["a"])(M,x,_,!1,null,"d1c9db82",null),O=S.exports,$=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.columns,data:t.data,loading:t.loading},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.row;return[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.update(a)}}},[t._v("修改")]),n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"error",size:"small"},on:{click:function(e){return t.Delete(a)}}},[t._v("删除")])]}}])}),n("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[n("Page",{attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1),n("Modal",{attrs:{title:"值班类型","cancel-text":"取消","ok-text":"确认","mask-closable":!1},on:{"on-ok":t.modalOk},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":80}},[n("FormItem",{attrs:{label:"区间名称",prop:"input1"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入区间名称"},model:{value:t.formTop.timeName,callback:function(e){t.$set(t.formTop,"timeName",e)},expression:"formTop.timeName"}})],1),n("FormItem",{attrs:{label:"时间",prop:"input2"}},[n("TimePicker",{staticStyle:{width:"100%"},attrs:{clearable:"",format:"HH:mm",type:"timerange",placement:"bottom-end",placeholder:"请选择时间"},on:{"on-change":t.selectTileValue},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1)],1)],1)],1)},L=[],F={name:"watchType",components:{},props:["input","searchValue"],data:function(){return{loading:!1,modal:!1,formTop:{id:"",input1:"",input2:"",timeName:""},page_size:10,page_index:1,total:null,columns:[{title:"序号",type:"index"},{title:"区间名称",key:"watchhourname"},{title:"开始时间",key:"watchhour_start_time"},{title:"结束时间",key:"watchhour_end_time"},{title:"操作",slot:"action",align:"center"}],data:[]}},computed:{},watch:{"input.flag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a,o;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e){t.next=9;break}return a={watchhourname:this.input.timeName1,watchhour_start_time:this.input.watchTime[0],watchhour_end_time:this.input.watchTime[1]},t.next=4,i["S"](a);case 4:return o=t.sent,t.next=7,this.GetWatchHourList();case 7:this.input.flag=!1,1===o.code&&this.$emit("cancelModal",!1);case 9:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),"input.searchFlag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e),!e){t.next=7;break}return t.next=4,this.GetWatchHourList();case 4:t.sent,this.input.searchFlag=!1,this.$emit("cancelModal",!1);case 7:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},methods:{selectTileValue:function(t){this.formTop.input1=t,console.log("🚀🚀🚀,",t)},modalOk:function(){var t=this;p["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={watchhourid:t.formTop.id,watchhourname:t.formTop.timeName,watchhour_start_time:t.formTop.input1[0],watchhour_end_time:t.formTop.input1[1]},e.next=3,i["S"](n);case 3:return a=e.sent,e.next=6,t.GetWatchHourList();case 6:return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)}))))},update:function(t){this.formTop.id=t.watchhourid,this.formTop.timeName=t.watchhourname,this.formTop.input1=[t.watchhour_start_time,t.watchhour_end_time],this.modal=!0},DeleteAction:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:p["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function t(){var n,a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={id:e.formTop.id},t.next=3,i["R"](n);case 3:return a=t.sent,t.next=6,e.GetWatchHourList();case 6:return t.abrupt("return",a);case 7:case"end":return t.stop()}}),t)}))));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),Delete:function(t){var e=this;this.formTop.id=t.watchhourid,this.publicConfirm((function(){return e.DeleteAction()}))},currentPage:function(t){console.log(t),this.page_index=t,this.GetWatchHourList()},currentPageCount:function(t){console.log(t,"currentPageCount"),this.page_size=t,this.GetWatchHourList()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(c["a"])(l.a.mark((function e(){return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Spin.hide(),this.$Message["success"]({background:!0,content:"操作成功"}))},GetWatchHourList:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this,n=arguments;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n.length>0&&void 0!==n[0]?n[0]:"",p["getInitListRequest"](Object(c["a"])(l.a.mark((function t(){var n,a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,n={condition:e.searchValue,page_size:e.page_size,page_index:e.page_index},t.next=4,i["v"](n);case 4:a=t.sent,e.data=a.response.data,e.total=a.response.data_count,e.loading=!1;case 8:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()},beforeCreate:function(){console.info("🚀🚀🚀,")},created:function(){},beforeMount:function(){},mounted:function(){this.GetWatchHourList()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){console.info("🚀🚀🚀destroyed,")},activated:function(){}},I=F,V=Object(h["a"])(I,$,L,!1,null,"4f220e4f",null),z=V.exports,j=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.tableColumns,data:t.tableData,loading:t.loading1},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.row;return[n("a",{on:{click:function(e){return t.rowDelete(a)}}},[t._v("删除")])]}}])}),n("Modal",{attrs:{"mask-closable":"",title:(t.isEdit?"编辑":"添加")+"考勤地点"},on:{"on-cancle":function(e){t.address=void 0}},scopedSlots:t._u([{key:"footer",fn:function(){return[n("Button",{attrs:{type:"primary",disabled:void 0==t.address},on:{click:t.nextStep}},[t._v("下一步")])]},proxy:!0}]),model:{value:t.editModalShow,callback:function(e){t.editModalShow=e},expression:"editModalShow"}},[[n("iframe",{attrs:{id:"mapPage",width:"100%",height:"500px",frameborder:"0",src:"https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=IZXBZ-OTAWV-XU7PV-5FAAL-F6VXH-7XBQP&referer=myapp"}})]],2),n("Modal",{attrs:{"mask-closable":"",title:"地点设置"},scopedSlots:t._u([{key:"footer",fn:function(){return[n("Button",{on:{click:function(e){t.locSetModalShow=!1}}},[t._v("上一步")]),n("Button",{attrs:{type:"primary",loading:t.btSaveLoading},on:{click:t.saveAttendance}},[t._v("确定")])]},proxy:!0}]),model:{value:t.locSetModalShow,callback:function(e){t.locSetModalShow=e},expression:"locSetModalShow"}},[[n("Form",{attrs:{"label-colon":"","label-width":100}},[n("Row",[n("Col",{attrs:{span:"24"}},[n("FormItem",{attrs:{label:"标题"}},[n("Input",{attrs:{type:"text"},model:{value:t.addrTitle,callback:function(e){t.addrTitle=e},expression:"addrTitle"}})],1)],1),n("Col",{attrs:{span:"24"}},[n("FormItem",{attrs:{label:"地点名称"}},[n("Input",{attrs:{type:"text"},model:{value:t.addrName,callback:function(e){t.addrName=e},expression:"addrName"}})],1)],1),n("Col",{attrs:{span:"24"}},[n("FormItem",{attrs:{label:"打卡范围"}},[n("Select",{model:{value:t.addrRange,callback:function(e){t.addrRange=e},expression:"addrRange"}},t._l(t.addrRangeList,(function(e){return n("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1)],1)],1)],1)]],2)],1)},G=[],P={data:function(){return{loading1:!1,tableColumns:[{title:"序号",type:"index",width:80,align:"center"},{title:"标题",key:"title"},{title:"地址",key:"address"},{title:"纬度",key:"latitude"},{title:"经度",key:"longitude"},{title:"误差",key:"offset"},{title:"创建时间",key:"createtime"},{title:"操作",slot:"action",width:120,align:"center"}],tableData:[],isEdit:!1,editModalShow:!1,addrTitle:"",addrName:void 0,addrRange:100,address:void 0,addrRangeList:[{label:"100米",value:100},{label:"200米",value:200},{label:"300米",value:300},{label:"400米",value:400},{label:"500米",value:500},{label:"600米",value:600},{label:"700米",value:700},{label:"800米",value:800},{label:"900米",value:900},{label:"1000米",value:1e3},{label:"2000米",value:2e3},{label:"3000米",value:3e3}],locSetModalShow:!1,btSaveLoading:!1}},computed:{},created:function(){this.getAttendanceList()},mounted:function(){var t=this;window.addEventListener("message",(function(e){var n=e.data;n&&"locationPicker"==n.module&&(t.address=n)}),!1)},methods:{nextStep:function(){this.addrName=this.address.poiname,this.addrTitle=this.address.poiname,this.locSetModalShow=!0},saveAttendance:function(){var t=this,e={title:this.addrTitle,address:this.addrName,latitude:this.address.latlng.lat,longitude:this.address.latlng.lng,offset:this.addrRange};this.btSaveLoading=!0,i["b"](e).then((function(e){1==e.code?(t.globalMessage("success",e.response),t.getAttendanceList(),t.editModalShow=!1,t.locSetModalShow=!1,t.address=void 0,t.addrName=void 0):t.globalMessage("error",e.msg_detail)})).catch((function(e){t.globalMessage("error",e)})).finally((function(){t.btSaveLoading=!1}))},rowDelete:function(t){var e=this;this.$Modal.confirm({title:"提示",content:"是否确认删除考勤 ".concat(t.title," ?"),loading:!0,onOk:function(){i["a"](t.attendanceid).then((function(t){1==t.code?(e.globalMessage("success",t.response),e.$Modal.remove(),e.getAttendanceList()):e.globalMessage("error",t.msg_detail)})).catch((function(t){e.globalMessage("error",t)}))}})},getAttendanceList:function(){var t=this;this.loading1=!0,i["f"]().then((function(e){t.tableData=e.response})).catch((function(e){t.globalMessage("error",e)})).finally((function(){t.loading1=!1}))},globalMessage:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.$Message[t]({type:t,content:e,duration:n,background:a})}}},N=P,D=Object(h["a"])(N,j,G,!1,null,"62188d4a",null),R=D.exports,H={components:{watchType:g,MessageConfig:O,Campus:k,WatchHour:z,Attendance:R},data:function(){return{configSwitchValue:"0",watchHourTimeList:[],watchTypeList:[],showComponent:{type:!0,time:!1,campus:!1,info:!1,attendance:!1},buttonSize:"",searchValue:"",loading:!0,modal:!1,formTop:{input1:"",input2:"",input3:"",type:"",flag:!1,searchFlag:!1,timeName1:"",watchTime:[]},ruleValidate:{input1:[{required:!0,message:"该项不能为空",trigger:"blur"}],input3:[{required:!0,message:"该项不能为空",trigger:"blur"}],input2:[{required:!0,message:"该项不能为空",trigger:"blur"}],signInType:[{required:!0,message:"该项不能为空",trigger:"change"}],timeName1:[{required:!0,type:"date",message:"该项不能为空",trigger:"change"}],watchTime:[{required:!0,type:"array",message:"该项不能为空",trigger:"change"}]}}},computed:{ModalTitleValue:function(){return!0===this.showComponent.type?"增添值班类型":!0===this.showComponent.info?"配置消息提醒":!0===this.showComponent.time?"增添值班时间":"增添校区"},ModalInputLabelValue:function(){var t=["权限名称","权限备注"],e=["校区名称"],n=["校区名称"],a=["校区名称"];return!0===this.showComponent.type?t:!0===this.showComponent.campus?e:!0===this.showComponent.time?a:n}},watch:{buttonSize:function(t,e){console.info("🚀🚀🚀,",t),this.columnButtonState(t)}},methods:{onChange:function(t){var e=this;i["e"]({value:t}).then((function(t){1===t.code&&(e.$Message.success(t.msg),i["h"]().then((function(t){e.configSwitchValue=t.response})))}))},selectTileValue:function(t){this.watchTime=t},searchEvent:function(){this.formTop.searchFlag=!0},cancelModal:function(t){this.spinShow=t,this.modal=t,this.formTop.searchFlag=t,this.formTop.flag=t},addWatchType:function(){this.modal=!0,this.formTop={input1:"",input2:"",input3:"",type:"",flag:!1,searchFlag:!1,timeName1:"",watchTime:[]},this.$refs.updateRoleValue.resetFields()},addAttendance:function(){this.$refs.attendance.isEdit=!1,this.$refs.attendance.editModalShow=!0},modalOk:function(){this.formTop.flag=!0},columnButtonState:function(t){switch(t){case"type":this.showComponent.type=!0,this.showComponent.info=!1,this.showComponent.time=!1,this.showComponent.campus=!1,this.showComponent.attendance=!1,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break;case"info":this.showComponent.type=!1,this.showComponent.info=!0,this.showComponent.time=!1,this.showComponent.campus=!1,this.showComponent.attendance=!1,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break;case"time":this.showComponent.type=!1,this.showComponent.info=!1,this.showComponent.time=!0,this.showComponent.campus=!1,this.showComponent.attendance=!1,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break;case"campus":this.showComponent.type=!1,this.showComponent.info=!1,this.showComponent.time=!1,this.showComponent.campus=!0,this.showComponent.attendance=!1,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break;case"attendance":this.showComponent.type=!1,this.showComponent.info=!1,this.showComponent.time=!1,this.showComponent.campus=!1,this.showComponent.attendance=!0,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break}}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){var t=this;i["w"]().then((function(e){t.watchHourTimeList=e.response})),i["h"]().then((function(e){t.configSwitchValue=e.response}))},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},A=H,W=Object(h["a"])(A,a,o,!1,null,"3c049d80",null);e["default"]=W.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d2084c8"],{a3cc:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{scopedSlots:t._u([{key:"title",fn:function(){return[n("div",{staticStyle:{height:"30px",display:"flex","align-items":"center"}},[n("RadioGroup",{attrs:{type:"button"},model:{value:t.buttonSize,callback:function(e){t.buttonSize=e},expression:"buttonSize"}},[n("Radio",{attrs:{label:"type"}},[t._v("值班类型")]),n("Radio",{attrs:{label:"time"}},[t._v("值班时间")]),n("Radio",{attrs:{label:"campus"}},[t._v("校区配置")]),n("Radio",{attrs:{label:"info"}},[t._v("消息提醒")]),n("Radio",{attrs:{label:"attendance"}},[t._v("考勤管理")])],1),n("div",{staticStyle:{display:"flex","align-items":"center","margin-left":"15px"}},[n("h3",[t._v("系部干事换班:")]),n("i-switch",{attrs:{size:"large","true-value":"1","false-value":"0"},on:{"on-change":t.onChange},scopedSlots:t._u([{key:"open",fn:function(){return[n("span",[t._v("开启")])]},proxy:!0},{key:"close",fn:function(){return[n("span",[t._v("关闭")])]},proxy:!0}]),model:{value:t.configSwitchValue,callback:function(e){t.configSwitchValue=e},expression:"configSwitchValue"}})],1)],1)]},proxy:!0},{key:"extra",fn:function(){return[n("div",{staticStyle:{display:"flex","flex-wrap":"nowrap","align-items":"center"}},[t.showComponent.info||t.showComponent.attendance?t._e():n("Input",{attrs:{placeholder:"请输入关键词...",clearable:""},model:{value:t.searchValue,callback:function(e){t.searchValue=e},expression:"searchValue"}}),t.showComponent.info||t.showComponent.attendance?t._e():n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:t.searchEvent}},[t._v("查找\n ")]),t.showComponent.info||t.showComponent.attendance?t._e():n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:t.addWatchType}},[t._v("\n "+t._s(t.ModalTitleValue)+"\n ")]),t.showComponent.attendance?n("Button",{attrs:{type:"primary"},on:{click:t.addAttendance}},[t._v("添加考勤范围")]):t._e()],1)]},proxy:!0}])},[t.showComponent.type?n("watchType",{attrs:{input:t.formTop,searchValue:t.searchValue},on:{cancelModal:t.cancelModal}}):t._e(),t.showComponent.info?n("MessageConfig"):t._e(),t.showComponent.campus?n("Campus",{attrs:{input:t.formTop,searchValue:t.searchValue},on:{cancelModal:t.cancelModal}}):t._e(),t.showComponent.time?n("WatchHour",{attrs:{input:t.formTop,searchValue:t.searchValue},on:{cancelModal:t.cancelModal}}):t._e(),t.showComponent.attendance?n("Attendance",{ref:"attendance"}):t._e(),n("Modal",{attrs:{title:""+t.ModalTitleValue,"cancel-text":"取消","ok-text":"确认","mask-closable":!1,loading:t.loading},on:{"on-ok":function(e){return t.modalOk()}},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":80}},[t.showComponent.type?n("FormItem",{attrs:{label:"值班名称",prop:"input1"}},[n("Input",{attrs:{clearable:"",placeholder:"请选择值班名称"},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1):t._e(),t.showComponent.type?n("FormItem",{attrs:{label:"值班时间",prop:"input3"}},[n("Select",{attrs:{clearable:"",placeholder:"请选择值班时间"},model:{value:t.formTop.input3,callback:function(e){t.$set(t.formTop,"input3",e)},expression:"formTop.input3"}},t._l(t.watchHourTimeList,(function(e){return n("Option",{key:e.id,attrs:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1):t._e(),t.showComponent.type?n("FormItem",{attrs:{label:"签到类型",prop:"signInType"}},[n("Select",{attrs:{clearable:"",placeholder:"请选择签到类型"},model:{value:t.formTop.type,callback:function(e){t.$set(t.formTop,"type",e)},expression:"formTop.type"}},[n("Option",{attrs:{value:0}},[t._v("免打卡")]),n("Option",{attrs:{value:1}},[t._v("无定位打卡")]),n("Option",{attrs:{value:2}},[t._v("定位拍照打卡")])],1)],1):t._e(),t.showComponent.type?n("FormItem",{attrs:{label:"值班备注",prop:"input2"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入值班备注"},model:{value:t.formTop.input2,callback:function(e){t.$set(t.formTop,"input2",e)},expression:"formTop.input2"}})],1):t._e(),t.showComponent.campus?n("FormItem",{attrs:{label:"校区名称",prop:"input1"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入校区名称"},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1):t._e(),t.showComponent.time?n("FormItem",{attrs:{label:"区间名称",prop:"timeName1"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入区间名称"},model:{value:t.formTop.timeName1,callback:function(e){t.$set(t.formTop,"timeName1",e)},expression:"formTop.timeName1"}})],1):t._e(),t.showComponent.time?n("FormItem",{attrs:{label:"时间",prop:"watchTime"}},[n("TimePicker",{staticStyle:{width:"100%"},attrs:{clearable:"",format:"HH:mm",type:"timerange",placement:"bottom-end",placeholder:"请选择时间"},on:{"on-change":t.selectTileValue},model:{value:t.formTop.watchTime,callback:function(e){t.$set(t.formTop,"watchTime",e)},expression:"formTop.watchTime"}})],1):t._e()],1)],1)],1)],1)},o=[],i=n("5e9b"),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.columns,data:t.data,loading:t.loading},scopedSlots:t._u([{key:"sign_type",fn:function(e){var a=e.row;return[0==a.sign_type?n("span",[t._v("免打卡")]):t._e(),1==a.sign_type?n("span",[t._v("无定位打卡")]):t._e(),2==a.sign_type?n("span",[t._v("定位拍照打卡")]):t._e()]}},{key:"is_enable",fn:function(e){var a=e.row;return[n("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},on:{"on-change":function(e){return t.onChangeSwitch(e,a)}},scopedSlots:t._u([{key:"open",fn:function(){return[n("span",[t._v("启用")])]},proxy:!0},{key:"close",fn:function(){return[n("span",[t._v("禁用")])]},proxy:!0}],null,!0),model:{value:a.is_enable,callback:function(e){t.$set(a,"is_enable",e)},expression:"row.is_enable"}})]}},{key:"action",fn:function(e){var a=e.row;return[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.update(a)}}},[t._v("修改")]),n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"error",size:"small"},on:{click:function(e){return t.Delete(a)}}},[t._v("删除")])]}}])}),n("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[n("Page",{attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1),n("Modal",{attrs:{title:"值班类型","cancel-text":"取消","ok-text":"确认","mask-closable":!1},on:{"on-ok":t.modalOk},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":100}},[n("FormItem",{attrs:{label:"值班类型",prop:"input1"}},[n("Input",{model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1),n("FormItem",{attrs:{label:"值班时间",prop:"input2"}},[n("Select",{attrs:{placeholder:""},model:{value:t.formTop.input3,callback:function(e){t.$set(t.formTop,"input3",e)},expression:"formTop.input3"}},t._l(t.watchHourTimeList,(function(e){return n("Option",{key:e.id,attrs:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1),n("FormItem",{attrs:{label:"签到类型"}},[n("Select",{attrs:{placeholder:""},model:{value:t.formTop.type,callback:function(e){t.$set(t.formTop,"type",e)},expression:"formTop.type"}},[n("Option",{attrs:{value:0}},[t._v("免打卡")]),n("Option",{attrs:{value:1}},[t._v("无定位打卡")]),n("Option",{attrs:{value:2}},[t._v("定位拍照打卡")])],1)],1),n("FormItem",{attrs:{label:"值班类型备注",prop:"input2"}},[n("Input",{model:{value:t.formTop.input2,callback:function(e){t.$set(t.formTop,"input2",e)},expression:"formTop.input2"}})],1)],1)],1)],1)},s=[],c=(n("96cf"),n("3b8d")),u=n("967e"),l=n.n(u),p=n("069b"),m=n("806c"),d={name:"watchType",components:{},props:["input","searchValue"],data:function(){return{watchHourTimeList:[],modal:!1,formTop:{id:"",input1:"",input2:"",input3:"",type:""},page_size:10,page_index:1,total:null,loading:!1,columns:[{title:"序号",type:"index"},{title:"值班类型",key:"watchtypename"},{title:"类型备注",key:"watchtype_remark"},{title:"签到类型",slot:"sign_type"},{title:"值班时间",key:"watchhourname"},{title:"启用/禁用",slot:"is_enable"},{title:"操作",slot:"action",align:"center"}],data:[]}},computed:{},watch:{"input.flag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a,o;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e,"$parent",this.$parent),!e){t.next=10;break}return a={watchtypename:this.input.input1,watchtype_remark:this.input.input2,watchhour_id:this.input.input3,sign_type:this.input.type},t.next=5,i["Y"](a);case 5:return o=t.sent,t.next=8,this.GetWatchTypeList();case 8:this.input.flag=!1,1===o.code&&this.$emit("cancelModal",!1);case 10:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),"input.searchFlag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e),!e){t.next=6;break}return t.next=4,this.GetWatchTypeList();case 4:this.input.searchFlag=!1,this.$emit("cancelModal",!1);case 6:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},methods:{onChangeSwitch:function(t,e){var n=this;m["myEncapsulationFunction"]((function(){return p["c"]({id:e.watchtypeid,status:Boolean(t)}).then((function(t){return 1===t.code&&n.GetWatchTypeList(),t}))}))},modalOk:function(){var t=this;m["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={watchtypeid:t.formTop.id,watchtypename:t.formTop.input1,watchtype_remark:t.formTop.input2,watchhour_id:t.formTop.input3,sign_type:t.formTop.type},e.next=3,i["Y"](n);case 3:return a=e.sent,e.next=6,t.GetWatchTypeList();case 6:return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)}))))},update:function(t){this.formTop.id=t.watchtypeid,this.formTop.input1=t.watchtypename,this.formTop.input2=t.watchtype_remark,this.formTop.input3=t.watchhour_id,this.formTop.type=t.sign_type,this.modal=!0},DeleteAction:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:m["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function t(){var n,a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={id:e.formTop.id},t.next=3,i["X"](n);case 3:return a=t.sent,t.next=6,e.GetWatchTypeList();case 6:return t.abrupt("return",a);case 7:case"end":return t.stop()}}),t)}))));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),Delete:function(t){var e=this;this.formTop.id=t.watchtypeid,this.publicConfirm((function(){return e.DeleteAction()}))},currentPage:function(t){console.log(t),this.page_index=t,this.GetWatchTypeList()},currentPageCount:function(t){console.log(t,"currentPageCount"),this.page_size=t,this.GetWatchTypeList()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(c["a"])(l.a.mark((function e(){return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Spin.hide(),this.$Message["success"]({background:!0,content:"操作成功"}))},GetWatchTypeList:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this,n=arguments;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n.length>0&&void 0!==n[0]?n[0]:"",m["getInitListRequest"](Object(c["a"])(l.a.mark((function t(){var n,a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,n={name:e.searchValue,page_size:e.page_size,page_index:e.page_index},t.next=4,i["z"](n);case 4:a=t.sent,e.data=a.response.data,e.total=a.response.data_count,e.loading=!1;case 8:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){var t=this;this.GetWatchTypeList(),i["w"]().then((function(e){t.watchHourTimeList=e.response}))},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){console.info("🚀🚀🚀destroyed,")},activated:function(){}},h=d,f=n("2877"),g=Object(f["a"])(h,r,s,!1,null,"48d45fe8",null),w=g.exports,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.columns,data:t.data,loading:t.loading},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.row;return[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.update(a)}}},[t._v("修改")]),n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"error",size:"small"},on:{click:function(e){return t.Delete(a)}}},[t._v("删除")])]}}])}),n("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[n("Page",{attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1),n("Modal",{attrs:{title:"配置校区","cancel-text":"取消","ok-text":"确认","mask-closable":!1},on:{"on-ok":t.modalOk},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":80}},[n("FormItem",{attrs:{label:"配置校区",prop:"input1"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入校区名称"},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1)],1)],1)],1)},b=[],y={name:"watchType",components:{},props:["input","searchValue"],data:function(){return{loading:!1,spinShow:!1,modal:!1,formTop:{id:"",input1:"",input2:""},page_size:10,page_index:1,total:null,columns:[{title:"序号",type:"index"},{title:"校区名称",key:"campusname"},{title:"操作",slot:"action",align:"center"}],data:[]}},computed:{},watch:{"input.flag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a,o;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e){t.next=9;break}return a={campusname:this.input.input1},t.next=4,i["d"](a);case 4:return o=t.sent,t.next=7,this.GetCampusList();case 7:this.input.flag=!1,1===o.code&&this.$emit("cancelModal",!1);case 9:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),"input.searchFlag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e){t.next=5;break}return t.next=3,this.GetCampusList();case 3:this.input.searchFlag=!1,this.$emit("cancelModal",!1);case 5:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},methods:{modalOk:function(){var t=this;m["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={campusid:t.formTop.id,campusname:t.formTop.input1},e.next=3,i["d"](n);case 3:if(a=e.sent,1!==a.code){e.next=7;break}return e.next=7,t.GetCampusList();case 7:return e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)}))))},update:function(t){this.formTop.id=t.campusid,this.formTop.input1=t.campusname,this.modal=!0},DeleteAction:function(){var t=this;m["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={campusid:t.formTop.id},e.next=3,i["c"](n);case 3:return a=e.sent,t.GetCampusList(),e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)}))))},Delete:function(t){var e=this;this.formTop.id=t.campusid,this.publicConfirm((function(){return e.DeleteAction()}))},currentPage:function(t){console.log(t),this.page_index=t,this.GetCampusList()},currentPageCount:function(t){console.log(t,"currentPageCount"),this.page_size=t,this.GetCampusList()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(c["a"])(l.a.mark((function e(){return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Message["success"]({background:!0,content:"操作成功"}),this.$Spin.hide())},GetCampusList:function(){var t=this;m["getInitListRequest"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loading=!0,n={name:t.searchValue,page_size:t.page_size,page_index:t.page_index},e.next=4,i["g"](n);case 4:a=e.sent,t.data=a.response.data,t.total=a.response.data_count,t.loading=!1;case 8:case"end":return e.stop()}}),e)}))))}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){this.GetCampusList()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},T=y,k=Object(f["a"])(T,v,b,!1,null,"6b53c222",null),x=k.exports,_=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.columns,data:t.data,loading:t.loading},scopedSlots:t._u([{key:"advance_day",fn:function(e){var n=e.row;return[t._v("\n "+t._s(n.advance_day)+"天\n ")]}},{key:"action",fn:function(e){var a=e.row;return[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.update(a)}}},[t._v("修改")])]}}])}),n("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[n("Page",{attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1),n("Modal",{attrs:{title:"值班类型","cancel-text":"取消","ok-text":"确认","mask-closable":!1},on:{"on-ok":t.modalOk},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":80}},[n("FormItem",{attrs:{label:"提前天数",prop:"input1"}},[n("InputNumber",{staticStyle:{width:"100%"},attrs:{max:10,min:1},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1),n("FormItem",{attrs:{label:"提醒时间",prop:"input2"}},[n("TimePicker",{staticStyle:{width:"100%"},attrs:{format:"HH:mm",placeholder:"Select time"},on:{"on-change":t.getSelectTime},model:{value:t.formTop.input2,callback:function(e){t.$set(t.formTop,"input2",e)},expression:"formTop.input2"}})],1)],1)],1)],1)},C=[],S={name:"watchType",components:{},props:["input","searchValue"],data:function(){return{loading:!1,modal:!1,formTop:{time_task_id:"",id:"",input1:1,input2:""},page_size:10,page_index:1,total:null,columns:[{title:"序号",type:"index"},{title:"提前天数",slot:"advance_day"},{title:"提醒时间",key:"remind_time"},{title:"操作",slot:"action",align:"center"}],data:[]}},computed:{},watch:{"input.flag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a,o;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e),!e){t.next=10;break}return a={watchtypename:this.input.input1,watchtype_remark:this.formTop.input2},t.next=5,i["Y"](a);case 5:return o=t.sent,t.next=8,this.GetMessageConfigInfo();case 8:this.input.flag=!1,1===o.code&&this.$emit("cancelModal",!1);case 10:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),"input.searchFlag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e),!e){t.next=7;break}return t.next=4,this.GetMessageConfigInfo();case 4:a=t.sent,this.input.searchFlag=!1,1===a.code&&this.$emit("cancelModal",!1);case 7:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},methods:{getSelectTime:function(t){this.formTop.input2=t},modalOk:function(){var t=this;m["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={megconfigid:t.formTop.id,advance_day:t.formTop.input1,remind_time:t.formTop.input2,time_task_id:t.formTop.time_task_id},e.next=3,i["k"](n);case 3:return a=e.sent,e.next=6,t.GetMessageConfigInfo();case 6:return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)}))))},update:function(t){this.formTop.id=t.megconfigid,this.formTop.input1=t.advance_day,this.formTop.input2=t.remind_time,this.formTop.time_task_id=t.time_task_id,this.modal=!0},DeleteAction:function(){var t=Object(c["a"])(l.a.mark((function t(){var e;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={id:this.formTop.id},t.next=3,i["X"](e);case 3:t.sent,this.GetMessageConfigInfo();case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),Delete:function(t){var e=this;this.formTop.id=t.watchtypeid,this.publicConfirm((function(){return e.DeleteAction()}))},currentPage:function(t){console.log(t),this.page_index=t,this.GetMessageConfigInfo()},currentPageCount:function(t){console.log(t,"currentPageCount"),this.page_size=t,this.GetMessageConfigInfo()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(c["a"])(l.a.mark((function e(){return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Spin.hide(),this.$Message["success"]({background:!0,content:"操作成功"}))},GetMessageConfigInfo:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this,n=arguments;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n.length>0&&void 0!==n[0]?n[0]:"",m["getInitListRequest"](Object(c["a"])(l.a.mark((function t(){var n;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,e.data=[],t.next=4,i["j"]();case 4:n=t.sent,e.data.push(n.response),e.loading=!1;case 7:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()},beforeCreate:function(){console.info("🚀🚀🚀,")},created:function(){},beforeMount:function(){},mounted:function(){this.GetMessageConfigInfo()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){console.info("🚀🚀🚀destroyed,")},activated:function(){}},M=S,O=Object(f["a"])(M,_,C,!1,null,"d1c9db82",null),$=O.exports,L=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.columns,data:t.data,loading:t.loading},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.row;return[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.update(a)}}},[t._v("修改")]),n("Button",{staticStyle:{"margin-left":"10px"},attrs:{type:"error",size:"small"},on:{click:function(e){return t.Delete(a)}}},[t._v("删除")])]}}])}),n("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[n("Page",{attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1),n("Modal",{attrs:{title:"值班类型","cancel-text":"取消","ok-text":"确认","mask-closable":!1},on:{"on-ok":t.modalOk},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"updateRoleValue",attrs:{model:t.formTop,"label-width":80}},[n("FormItem",{attrs:{label:"区间名称",prop:"input1"}},[n("Input",{attrs:{clearable:"",placeholder:"请输入区间名称"},model:{value:t.formTop.timeName,callback:function(e){t.$set(t.formTop,"timeName",e)},expression:"formTop.timeName"}})],1),n("FormItem",{attrs:{label:"时间",prop:"input2"}},[n("TimePicker",{staticStyle:{width:"100%"},attrs:{clearable:"",format:"HH:mm",type:"timerange",placement:"bottom-end",placeholder:"请选择时间"},on:{"on-change":t.selectTileValue},model:{value:t.formTop.input1,callback:function(e){t.$set(t.formTop,"input1",e)},expression:"formTop.input1"}})],1)],1)],1)],1)},F=[],I={name:"watchType",components:{},props:["input","searchValue"],data:function(){return{loading:!1,modal:!1,formTop:{id:"",input1:"",input2:"",timeName:""},page_size:10,page_index:1,total:null,columns:[{title:"序号",type:"index"},{title:"区间名称",key:"watchhourname"},{title:"开始时间",key:"watchhour_start_time"},{title:"结束时间",key:"watchhour_end_time"},{title:"操作",slot:"action",align:"center"}],data:[]}},computed:{},watch:{"input.flag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){var a,o;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e){t.next=9;break}return a={watchhourname:this.input.timeName1,watchhour_start_time:this.input.watchTime[0],watchhour_end_time:this.input.watchTime[1]},t.next=4,i["S"](a);case 4:return o=t.sent,t.next=7,this.GetWatchHourList();case 7:this.input.flag=!1,1===o.code&&this.$emit("cancelModal",!1);case 9:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),"input.searchFlag":function(){var t=Object(c["a"])(l.a.mark((function t(e,n){return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log(e),!e){t.next=7;break}return t.next=4,this.GetWatchHourList();case 4:t.sent,this.input.searchFlag=!1,this.$emit("cancelModal",!1);case 7:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}()},methods:{selectTileValue:function(t){this.formTop.input1=t,console.log("🚀🚀🚀,",t)},modalOk:function(){var t=this;m["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function e(){var n,a;return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={watchhourid:t.formTop.id,watchhourname:t.formTop.timeName,watchhour_start_time:t.formTop.input1[0],watchhour_end_time:t.formTop.input1[1]},e.next=3,i["S"](n);case 3:return a=e.sent,e.next=6,t.GetWatchHourList();case 6:return e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)}))))},update:function(t){this.formTop.id=t.watchhourid,this.formTop.timeName=t.watchhourname,this.formTop.input1=[t.watchhour_start_time,t.watchhour_end_time],this.modal=!0},DeleteAction:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:m["myEncapsulationFunction"](Object(c["a"])(l.a.mark((function t(){var n,a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={id:e.formTop.id},t.next=3,i["R"](n);case 3:return a=t.sent,t.next=6,e.GetWatchHourList();case 6:return t.abrupt("return",a);case 7:case"end":return t.stop()}}),t)}))));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),Delete:function(t){var e=this;this.formTop.id=t.watchhourid,this.publicConfirm((function(){return e.DeleteAction()}))},currentPage:function(t){console.log(t),this.page_index=t,this.GetWatchHourList()},currentPageCount:function(t){console.log(t,"currentPageCount"),this.page_size=t,this.GetWatchHourList()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(c["a"])(l.a.mark((function e(){return l.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Spin.hide(),this.$Message["success"]({background:!0,content:"操作成功"}))},GetWatchHourList:function(){var t=Object(c["a"])(l.a.mark((function t(){var e=this,n=arguments;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n.length>0&&void 0!==n[0]?n[0]:"",m["getInitListRequest"](Object(c["a"])(l.a.mark((function t(){var n,a;return l.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.loading=!0,n={condition:e.searchValue,page_size:e.page_size,page_index:e.page_index},t.next=4,i["v"](n);case 4:a=t.sent,e.data=a.response.data,e.total=a.response.data_count,e.loading=!1;case 8:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}()},beforeCreate:function(){console.info("🚀🚀🚀,")},created:function(){},beforeMount:function(){},mounted:function(){this.GetWatchHourList()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){console.info("🚀🚀🚀destroyed,")},activated:function(){}},V=I,z=Object(f["a"])(V,L,F,!1,null,"4f220e4f",null),j=z.exports,G=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Table",{attrs:{columns:t.tableColumns,data:t.tableData,loading:t.loading1},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.row;return[n("a",{on:{click:function(e){return t.rowDelete(a)}}},[t._v("删除")])]}}])}),n("Modal",{attrs:{"mask-closable":"",title:(t.isEdit?"编辑":"添加")+"考勤地点"},on:{"on-cancle":function(e){t.address=void 0}},scopedSlots:t._u([{key:"footer",fn:function(){return[n("Button",{attrs:{type:"primary",disabled:void 0==t.address},on:{click:t.nextStep}},[t._v("下一步")])]},proxy:!0}]),model:{value:t.editModalShow,callback:function(e){t.editModalShow=e},expression:"editModalShow"}},[[n("iframe",{attrs:{id:"mapPage",width:"100%",height:"500px",frameborder:"0",src:"https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=IZXBZ-OTAWV-XU7PV-5FAAL-F6VXH-7XBQP&referer=myapp"}})]],2),n("Modal",{attrs:{"mask-closable":"",title:"地点设置"},scopedSlots:t._u([{key:"footer",fn:function(){return[n("Button",{on:{click:function(e){t.locSetModalShow=!1}}},[t._v("上一步")]),n("Button",{attrs:{type:"primary",loading:t.btSaveLoading},on:{click:t.saveAttendance}},[t._v("确定")])]},proxy:!0}]),model:{value:t.locSetModalShow,callback:function(e){t.locSetModalShow=e},expression:"locSetModalShow"}},[[n("Form",{attrs:{"label-colon":"","label-width":100}},[n("Row",[n("Col",{attrs:{span:"24"}},[n("FormItem",{attrs:{label:"标题"}},[n("Input",{attrs:{type:"text"},model:{value:t.addrTitle,callback:function(e){t.addrTitle=e},expression:"addrTitle"}})],1)],1),n("Col",{attrs:{span:"24"}},[n("FormItem",{attrs:{label:"地点名称"}},[n("Input",{attrs:{type:"text"},model:{value:t.addrName,callback:function(e){t.addrName=e},expression:"addrName"}})],1)],1),n("Col",{attrs:{span:"24"}},[n("FormItem",{attrs:{label:"打卡范围"}},[n("Select",{model:{value:t.addrRange,callback:function(e){t.addrRange=e},expression:"addrRange"}},t._l(t.addrRangeList,(function(e){return n("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1)],1)],1)],1)]],2)],1)},P=[],N={data:function(){return{loading1:!1,tableColumns:[{title:"序号",type:"index",width:80,align:"center"},{title:"标题",key:"title"},{title:"地址",key:"address"},{title:"纬度",key:"latitude"},{title:"经度",key:"longitude"},{title:"误差",key:"offset"},{title:"创建时间",key:"createtime"},{title:"操作",slot:"action",width:120,align:"center"}],tableData:[],isEdit:!1,editModalShow:!1,addrTitle:"",addrName:void 0,addrRange:100,address:void 0,addrRangeList:[{label:"100米",value:100},{label:"200米",value:200},{label:"300米",value:300},{label:"400米",value:400},{label:"500米",value:500},{label:"600米",value:600},{label:"700米",value:700},{label:"800米",value:800},{label:"900米",value:900},{label:"1000米",value:1e3},{label:"2000米",value:2e3},{label:"3000米",value:3e3}],locSetModalShow:!1,btSaveLoading:!1}},computed:{},created:function(){this.getAttendanceList()},mounted:function(){var t=this;window.addEventListener("message",(function(e){var n=e.data;n&&"locationPicker"==n.module&&(t.address=n)}),!1)},methods:{nextStep:function(){this.addrName=this.address.poiname,this.addrTitle=this.address.poiname,this.locSetModalShow=!0},saveAttendance:function(){var t=this,e={title:this.addrTitle,address:this.addrName,latitude:this.address.latlng.lat,longitude:this.address.latlng.lng,offset:this.addrRange};this.btSaveLoading=!0,i["b"](e).then((function(e){1==e.code?(t.globalMessage("success",e.response),t.getAttendanceList(),t.editModalShow=!1,t.locSetModalShow=!1,t.address=void 0,t.addrName=void 0):t.globalMessage("error",e.msg_detail)})).catch((function(e){t.globalMessage("error",e)})).finally((function(){t.btSaveLoading=!1}))},rowDelete:function(t){var e=this;this.$Modal.confirm({title:"提示",content:"是否确认删除考勤 ".concat(t.title," ?"),loading:!0,onOk:function(){i["a"](t.attendanceid).then((function(t){1==t.code?(e.globalMessage("success",t.response),e.$Modal.remove(),e.getAttendanceList()):e.globalMessage("error",t.msg_detail)})).catch((function(t){e.globalMessage("error",t)}))}})},getAttendanceList:function(){var t=this;this.loading1=!0,i["f"]().then((function(e){t.tableData=e.response})).catch((function(e){t.globalMessage("error",e)})).finally((function(){t.loading1=!1}))},globalMessage:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.$Message[t]({type:t,content:e,duration:n,background:a})}}},D=N,R=Object(f["a"])(D,G,P,!1,null,"62188d4a",null),H=R.exports,W={components:{watchType:w,MessageConfig:$,Campus:x,WatchHour:j,Attendance:H},data:function(){return{configSwitchValue:"0",watchHourTimeList:[],watchTypeList:[],showComponent:{type:!0,time:!1,campus:!1,info:!1,attendance:!1},buttonSize:"",searchValue:"",loading:!0,modal:!1,formTop:{input1:"",input2:"",input3:"",type:"",flag:!1,searchFlag:!1,timeName1:"",watchTime:[]},ruleValidate:{input1:[{required:!0,message:"该项不能为空",trigger:"blur"}],input3:[{required:!0,message:"该项不能为空",trigger:"blur"}],input2:[{required:!0,message:"该项不能为空",trigger:"blur"}],signInType:[{required:!0,message:"该项不能为空",trigger:"change"}],timeName1:[{required:!0,type:"date",message:"该项不能为空",trigger:"change"}],watchTime:[{required:!0,type:"array",message:"该项不能为空",trigger:"change"}]}}},computed:{ModalTitleValue:function(){return!0===this.showComponent.type?"增添值班类型":!0===this.showComponent.info?"配置消息提醒":!0===this.showComponent.time?"增添值班时间":"增添校区"},ModalInputLabelValue:function(){var t=["权限名称","权限备注"],e=["校区名称"],n=["校区名称"],a=["校区名称"];return!0===this.showComponent.type?t:!0===this.showComponent.campus?e:!0===this.showComponent.time?a:n}},watch:{buttonSize:function(t,e){console.info("🚀🚀🚀,",t),this.columnButtonState(t)}},methods:{onChange:function(t){var e=this;i["e"]({value:t}).then((function(t){1===t.code&&(e.$Message.success(t.msg),i["h"]().then((function(t){e.configSwitchValue=t.response})))}))},selectTileValue:function(t){this.watchTime=t},searchEvent:function(){this.formTop.searchFlag=!0},cancelModal:function(t){this.spinShow=t,this.modal=t,this.formTop.searchFlag=t,this.formTop.flag=t},addWatchType:function(){this.modal=!0,this.formTop={input1:"",input2:"",input3:"",type:"",flag:!1,searchFlag:!1,timeName1:"",watchTime:[]},this.$refs.updateRoleValue.resetFields()},addAttendance:function(){this.$refs.attendance.isEdit=!1,this.$refs.attendance.editModalShow=!0},modalOk:function(){this.formTop.flag=!0},columnButtonState:function(t){switch(t){case"type":this.showComponent.type=!0,this.showComponent.info=!1,this.showComponent.time=!1,this.showComponent.campus=!1,this.showComponent.attendance=!1,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break;case"info":this.showComponent.type=!1,this.showComponent.info=!0,this.showComponent.time=!1,this.showComponent.campus=!1,this.showComponent.attendance=!1,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break;case"time":this.showComponent.type=!1,this.showComponent.info=!1,this.showComponent.time=!0,this.showComponent.campus=!1,this.showComponent.attendance=!1,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break;case"campus":this.showComponent.type=!1,this.showComponent.info=!1,this.showComponent.time=!1,this.showComponent.campus=!0,this.showComponent.attendance=!1,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break;case"attendance":this.showComponent.type=!1,this.showComponent.info=!1,this.showComponent.time=!1,this.showComponent.campus=!1,this.showComponent.attendance=!0,this.searchValue="",this.formTop.input1="",this.formTop.input2="",this.formTop.input3="",this.formTop.type="",this.formTop.timeName1="";break}}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){var t=this;i["w"]().then((function(e){t.watchHourTimeList=e.response})),i["h"]().then((function(e){t.configSwitchValue=e.response}))},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},A=W,E=Object(f["a"])(A,a,o,!1,null,"3c049d80",null);e["default"]=E.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-79dc2843"],{3846:function(t,e,a){a("9e1e")&&"g"!=/./g.flags&&a("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:a("0bfb")})},"5df3":function(t,e,a){"use strict";var n=a("02f4")(!0);a("01f9")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,a=this._i;return a>=e.length?{value:void 0,done:!0}:(t=n(e,a),this._i+=t.length,{value:t,done:!1})}))},"6b54":function(t,e,a){"use strict";a("3846");var n=a("cb7c"),i=a("0bfb"),r=a("9e1e"),l="toString",s=/./[l],o=function(t){a("2aba")(RegExp.prototype,l,t,!0)};a("79e5")((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?o((function(){var t=n(this);return"/".concat(t.source,"/","flags"in t?t.flags:!r&&t instanceof RegExp?i.call(t):void 0)})):s.name!=l&&o((function(){return s.call(this)}))},"9ca0":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("div",[a("Card",{staticStyle:{width:"100%"},scopedSlots:t._u([{key:"title",fn:function(){return[a("div",{staticStyle:{display:"flex","align-items":"center"}},[a("h3",{staticStyle:{height:"30px",display:"flex","align-items":"center"}},[t._v("值班安排    ")]),t.selectFlag?t._e():a("div",{staticClass:"selectTitleIcon",staticStyle:{display:"flex","align-items":"center"},on:{click:function(e){t.selectFlag=!0}}},[a("span",[t._v("展开")]),a("Icon",{staticClass:"selectTitleIcon",attrs:{size:25,type:"ios-arrow-dropright",color:"#2d8cf0"}})],1),t.selectFlag?a("div",{staticClass:"selectTitleIcon",staticStyle:{display:"flex","align-items":"center"},on:{click:function(e){t.selectFlag=!t.selectFlag}}},[a("span",[t._v("收起")]),a("Icon",{staticClass:"selectTitleIcon",attrs:{size:25,type:"ios-arrow-dropdown",color:"#2d8cf0"}})],1):t._e()]),a("transition",{attrs:{name:"move-up"}},[t.selectFlag?a("div",[a("Row",{staticStyle:{"margin-top":"10px"},attrs:{justify:"space-between",wrap:""}},t._l(t.cityListAll,(function(e,n){return a("Col",{key:n,attrs:{span:4.5}},[a("div",{staticStyle:{display:"flex","flex-wrap":"nowrap","align-items":"center"}},[a("span",{staticStyle:{"margin-right":"5px"}},[t._v(t._s(e[1]))]),a("Select",{key:n,staticStyle:{width:"10.5vw"},attrs:{clearable:""},model:{value:t.cityListAllObject[e[2]],callback:function(a){t.$set(t.cityListAllObject,e[2],a)},expression:"cityListAllObject[item[2]]"}},t._l(e[0],(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)])})),1),a("Row",{staticStyle:{"margin-top":"10px"},attrs:{justify:"space-between",wrap:""}},[a("Col",{attrs:{span:4.5}},[a("div",{staticStyle:{display:"flex","justify-content":"center","align-items":"center"}},[a("span",[t._v("值班日期: ")]),a("DatePicker",{staticStyle:{width:"10.5vw"},attrs:{clearable:"",type:"daterange",placeholder:"请选择值班日期"},on:{"on-change":t.dutyDateSelect},model:{value:t.dutyDateX,callback:function(e){t.dutyDateX=e},expression:"dutyDateX"}})],1)]),a("Col",{attrs:{span:4.5}},[a("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[a("span",[t._v("值班领导:    ")]),a("Select",{staticStyle:{width:"10.5vw"},attrs:{clearable:"",placeholder:"是否为值班领导"},model:{value:t.cityListAllObject.is_lead,callback:function(e){t.$set(t.cityListAllObject,"is_lead",e)},expression:"cityListAllObject.is_lead"}},t._l(t.dutyRole,(function(e,n){return a("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1)]),a("Col",{attrs:{span:4.5}},[a("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[a("span",[t._v("姓名/卡号:")]),a("Input",{staticStyle:{width:"10.5vw","margin-right":"8.5vw"},attrs:{clearable:"",placeholder:"请输入姓名或卡号"},model:{value:t.cityListAllObject.key_name,callback:function(e){t.$set(t.cityListAllObject,"key_name",e)},expression:"cityListAllObject.key_name"}})],1)]),a("Col",{attrs:{span:4.5}},[a("Button",{attrs:{type:"primary",icon:"ios-search"},on:{click:t.search}},[t._v("查询数据")])],1)],1)],1):t._e()])]},proxy:!0},{key:"extra",fn:function(){return[a("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[a("Button",{staticStyle:{"margin-right":"8px"},attrs:{type:"warning"},on:{click:t.batchPush}},[t._v("批量推送")]),a("Button",{staticStyle:{"margin-right":"8px"},attrs:{type:"warning"},on:{click:function(e){return t.intershiftHandle("add")}}},[t._v("相互换班")]),a("ButtonGroup",[a("Button",{attrs:{icon:"ios-add-circle-outline"},on:{click:function(e){return t.handleButtonClick("addDuty")}}},[t._v("增添值班")]),a("Button",{attrs:{label:"dutyDataOutput",icon:"ios-log-out"},on:{click:t.dutyDataImport}},[t._v("数据导出\n ")]),a("Button",{staticStyle:{display:"flex","align-items":"center"},attrs:{icon:"ios-cloud-upload-outline",label:"dutyModelInput"},on:{click:function(e){return t.handleButtonClick("dutyModelInput")}}},[t._v("\n 模板导入\n ")]),a("Button",{attrs:{label:"dutyModelOutput",icon:"ios-log-out"},on:{click:function(e){t.exportModalShow=!0}}},[t._v("模板导出\n ")])],1)],1)]},proxy:!0}])},[a("Table",{attrs:{border:"",loading:t.tableLoading,columns:t.columns,data:t.data,height:t.tableHeightCal},on:{"on-select":t.onSelect,"on-select-cancel":t.onSelectCancel,"on-select-all":t.onSelectAll,"on-select-all-cancel":t.onSelectAllCancel},scopedSlots:t._u([{key:"watch_remark",fn:function(e){var a=e.row;return[t._v("\n "+t._s(a.watch_remark)+"\n ")]}},{key:"is_lead",fn:function(e){var a=e.row;return[t._v("\n "+t._s(["值班教师","值班领导"][a.is_lead])+"\n ")]}},{key:"action",fn:function(e){var n=e.row;return[a("div",{staticStyle:{display:"flex","justify-content":"space-evenly"}},[a("Button",{attrs:{type:"warning",size:"small"},on:{click:function(e){return t.pushDuty(n)}}},[t._v("推送")]),a("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.intershiftHandle("edit",n)}}},[t._v("相互换班")]),a("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.updateDuty(n)}}},[t._v("修改")]),a("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.deleteDuty(n)}}},[t._v("删除")])],1)]}}])}),a("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[a("Page",{key:t.pageKey,attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"page-size-opts":[100,200,500,1e3],"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1)],1),a("Modal",{attrs:{title:t.publicModalTitle,closable:"","mask-closable":!1,width:"40%"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:t.asyncCancel}},[t._v("取消")]),a("Button",{attrs:{type:"primary"},on:{click:t.asyncOK}},[t._v("确定")])]},proxy:!0}]),model:{value:t.addDuty,callback:function(e){t.addDuty=e},expression:"addDuty"}},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":80}},[a("FormItem",{attrs:{label:"姓名",prop:"username1"}},[a("Select",{attrs:{filterable:"",placeholder:"请选择用户"},on:{"on-change":t.usernameChange},model:{value:t.formValidate.username1,callback:function(e){t.$set(t.formValidate,"username1",e)},expression:"formValidate.username1"}},t._l(t.userArray,(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1),a("FormItem",{attrs:{label:"工号",prop:"card_name"}},[a("Input",{attrs:{placeholder:"请输入工号"},model:{value:t.formValidate.card_name,callback:function(e){t.$set(t.formValidate,"card_name",e)},expression:"formValidate.card_name"}})],1),a("FormItem",{attrs:{label:"联系方式",prop:"mobile"}},[a("Input",{attrs:{type:"number",placeholder:"请输入联系方式"},model:{value:t.formValidate.mobile,callback:function(e){t.$set(t.formValidate,"mobile",e)},expression:"formValidate.mobile"}})],1),t._l(t.addDutySlectList,(function(e,n){return a("FormItem",{key:n,attrs:{label:e[1],prop:e[2],"label-width":80}},[a("Select",{attrs:{placeholder:e[1],filterable:!0},model:{value:t.formValidate[e[2]],callback:function(a){t.$set(t.formValidate,e[2],a)},expression:"formValidate[item[2]]"}},t._l(e[0],(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)})),a("FormItem",{attrs:{label:"是否为值班领导",prop:"is_lead"}},[a("Select",{attrs:{placeholder:"是否为值班领导"},model:{value:t.formValidate.is_lead,callback:function(e){t.$set(t.formValidate,"is_lead",e)},expression:"formValidate.is_lead"}},t._l(t.dutyRole,(function(e,n){return a("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1),a("FormItem",{attrs:{label:"值班日期",prop:"watch_date"}},[a("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"date",options:t.options1,placeholder:"请选择值班日期"},on:{"on-change":t.dutyDate},model:{value:t.formValidate.watch_date,callback:function(e){t.$set(t.formValidate,"watch_date",e)},expression:"formValidate.watch_date"}})],1),a("FormItem",{attrs:{label:"值班班级",prop:"watch_remark"}},[a("Input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:"值班班级"},model:{value:t.formValidate.watch_remark,callback:function(e){t.$set(t.formValidate,"watch_remark",e)},expression:"formValidate.watch_remark"}})],1)],2)],1),a("Modal",{attrs:{title:"修改值班安排",width:"40%"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:t.updateCancel}},[t._v("取消")]),a("Button",{attrs:{type:"primary"},on:{click:t.updateOK}},[t._v("确定")])]},proxy:!0}]),model:{value:t.updateDutyModal,callback:function(e){t.updateDutyModal=e},expression:"updateDutyModal"}},[a("Form",{ref:"updateDutyFrom",attrs:{model:t.updateDutyFrom,rules:t.updeteRuleValidate,"label-width":80}},[a("FormItem",{attrs:{label:"姓名",prop:"username1"}},[a("Select",{attrs:{filterable:"",placeholder:"请选择用户"},on:{"on-change":t.usernameChange1},model:{value:t.updateDutyFrom.username1,callback:function(e){t.$set(t.updateDutyFrom,"username1",e)},expression:"updateDutyFrom.username1"}},t._l(t.userArray,(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1),a("FormItem",{attrs:{label:"工号",prop:"card_name"}},[a("Input",{attrs:{placeholder:"请输入工号"},model:{value:t.updateDutyFrom.card_name,callback:function(e){t.$set(t.updateDutyFrom,"card_name",e)},expression:"updateDutyFrom.card_name"}})],1),a("FormItem",{attrs:{label:"联系方式",prop:"mobile"}},[a("Input",{attrs:{type:"number",placeholder:"请输入联系方式"},model:{value:t.updateDutyFrom.mobile,callback:function(e){t.$set(t.updateDutyFrom,"mobile",e)},expression:"updateDutyFrom.mobile"}})],1),t._l(t.addDutySlectList,(function(e,n){return a("FormItem",{key:n,attrs:{label:e[1],prop:e[2],"label-width":80}},[a("Select",{attrs:{placeholder:e[1]},model:{value:t.updateDutyFrom[e[2]],callback:function(a){t.$set(t.updateDutyFrom,e[2],a)},expression:"updateDutyFrom[item[2]]"}},t._l(e[0],(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)})),a("FormItem",{attrs:{label:"是否为值班领导",prop:"is_lead"}},[a("Select",{attrs:{placeholder:"是否为值班领导"},model:{value:t.updateDutyFrom.is_lead,callback:function(e){t.$set(t.updateDutyFrom,"is_lead",e)},expression:"updateDutyFrom.is_lead"}},t._l(t.dutyRole,(function(e,n){return a("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1),a("FormItem",{attrs:{label:"值班日期",prop:"watch_date"}},[a("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"date",value:t.updateDutyFrom.watch_date,options:t.options1},on:{"on-change":t.updateDutyDate}})],1),a("FormItem",{attrs:{label:"值班班级",prop:"watch_remark"}},[a("Input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:"值班班级"},model:{value:t.updateDutyFrom.watch_remark,callback:function(e){t.$set(t.updateDutyFrom,"watch_remark",e)},expression:"updateDutyFrom.watch_remark"}})],1)],2)],1),a("Modal",{attrs:{title:t.publicModalTitle,width:"40%"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:t.dutyDataInputCancel}},[t._v("取消")]),a("Button",{attrs:{type:"primary"},on:{click:t.dutyDataInputOK}},[t._v("确定")])]},proxy:!0}]),model:{value:t.dutyDataInputModal,callback:function(e){t.dutyDataInputModal=e},expression:"dutyDataInputModal"}},[a("Form",{ref:"dutyDataInput",attrs:{model:t.dutyDataInputObject,rules:t.rulesDutyDataInput,"label-width":80}},[a("FormItem",{attrs:{label:"姓名或卡号",prop:"key_name"}},[a("Input",{attrs:{placeholder:"请输入姓名或卡号"},model:{value:t.dutyDataInputObject.key_name,callback:function(e){t.$set(t.dutyDataInputObject,"key_name",e)},expression:"dutyDataInputObject.key_name"}})],1),a("FormItem",{attrs:{label:"值班日期",prop:"watch_date"}},[a("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange"},on:{"on-change":t.dutyDataInputDateSelect}})],1),a("FormItem",{attrs:{label:"是否为值班领导",prop:"is_lead"}},[a("Select",{attrs:{placeholder:"是否为值班领导"},model:{value:t.dutyDataInputObject.is_lead,callback:function(e){t.$set(t.dutyDataInputObject,"is_lead",e)},expression:"dutyDataInputObject.is_lead"}},t._l(t.dutyRole,(function(e,n){return a("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1),t._l(t.addDutySlectList,(function(e,n){return a("FormItem",{key:n,attrs:{label:e[1],prop:e[2],"label-width":80}},[a("Select",{attrs:{placeholder:e[1]},model:{value:t.dutyDataInputObject[e[2]],callback:function(a){t.$set(t.dutyDataInputObject,e[2],a)},expression:"dutyDataInputObject[item[2]]"}},t._l(e[0],(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)}))],2)],1),a("Modal",{attrs:{title:t.publicModalTitle,width:"40%"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:t.dutyModelImportCancel}},[t._v("取消")])]},proxy:!0}]),model:{value:t.dutyModelImportModal,callback:function(e){t.dutyModelImportModal=e},expression:"dutyModelImportModal"}},[a("Upload",{attrs:{"before-upload":t.dutyModelUpload,"on-error":t.dutyModelError,"on-success":t.dutyModelSuccess,"on-format-error":t.dutyModelFormatError,format:["xlsx"],multiple:!1,type:"drag",action:""}},[a("div",{staticStyle:{padding:"120px 0"}},[a("Icon",{staticStyle:{color:"#3399ff"},attrs:{type:"ios-cloud-upload",size:"52"}}),a("p",[t._v("值班模板文件上传")])],1)])],1),a("Modal",{attrs:{"mask-closable":!1,title:"模板导出"},on:{"on-ok":t.exportTemplate},model:{value:t.exportModalShow,callback:function(e){t.exportModalShow=e},expression:"exportModalShow"}},[a("span",[t._v("模板年月:")]),a("DatePicker",{attrs:{type:"month",format:"yyyy-MM",placeholder:""},model:{value:t.tempYearMonth,callback:function(e){t.tempYearMonth=e},expression:"tempYearMonth"}})],1),a("Modal",{attrs:{title:"相互换班",loading:t.intershift.loading,width:"600"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:function(e){t.intershift.show=!1}}},[t._v("取消")]),a("Button",{attrs:{type:"primary"},on:{click:t.confirmIntershift}},[t._v("确定")])]},proxy:!0}]),model:{value:t.intershift.show,callback:function(e){t.$set(t.intershift,"show",e)},expression:" intershift.show"}},[a("Form",{ref:"Form5",attrs:{model:t.intershift.formData,rules:t.intershift.rule,"label-width":100}},[a("Card",[a("FormItem",{attrs:{label:"姓名",prop:"first_lodger_id"}},[a("Button",{attrs:{disabled:"edit"==t.intershift.addOrEditFlag,type:"primary",ghost:"",long:""},on:{click:function(e){return t.selectorHandle("top")}}},[t._v(t._s(t.intershift.formData.top.username?t.intershift.formData.top.username+"("+t.intershift.formData.top.card_name+")":"请选择")+"\n ")])],1),a("FormItem",{attrs:{label:"换班日期"}},[a("Button",{attrs:{type:"default",ghost:"",long:"",disabled:""}},[t._v(t._s(t.intershift.formData.top.watch_date?""+t.intershift.formData.top.watch_date:"暂无换班日期")+"\n ")])],1)],1),a("div",{staticClass:"ivu-text-center ivu-mt ivu-mb"},[a("Icon",{attrs:{type:"md-repeat",size:"48"}})],1),a("Card",[a("FormItem",{attrs:{label:"姓名",prop:""}},[a("Button",{attrs:{type:"primary",ghost:"",long:""},on:{click:function(e){return t.selectorHandle("bottom")}}},[t._v(t._s(t.intershift.formData.bottom.username?t.intershift.formData.bottom.username+"("+t.intershift.formData.bottom.card_name+")":"请选择")+"\n ")])],1),a("FormItem",{attrs:{label:"换班日期"}},[a("Button",{attrs:{type:"default",ghost:"",long:"",disabled:""}},[t._v(t._s(t.intershift.formData.bottom.watch_date?""+t.intershift.formData.bottom.watch_date:"暂无换班日期")+"\n ")])],1)],1)],1)],1),a("Modal",{attrs:{styles:{top:"20px"},title:"选择人员",width:"1000","footer-hide":""},model:{value:t.personnelSelector.show,callback:function(e){t.$set(t.personnelSelector,"show",e)},expression:"personnelSelector.show"}},[a("Form",{ref:"formInline",attrs:{inline:"","label-position":"right","label-width":80}},[t._e(),t._e(),t._e(),a("FormItem",{attrs:{label:"姓名/卡号"}},[a("Input",{staticStyle:{width:"200px"},attrs:{clearable:"",placeholder:"请输入关键字"},model:{value:t.personnelSelector.params.condition,callback:function(e){t.$set(t.personnelSelector.params,"condition",e)},expression:"personnelSelector.params.condition"}})],1),a("FormItem",{attrs:{label:"部门"}},[a("Input",{staticStyle:{width:"200px"},attrs:{clearable:"",placeholder:"请输入关键字"},model:{value:t.personnelSelector.params.deptName,callback:function(e){t.$set(t.personnelSelector.params,"deptName",e)},expression:"personnelSelector.params.deptName"}})],1),t._e(),a("FormItem",[a("Button",{attrs:{type:"primary"},on:{click:t.handleSearch}},[t._v("搜索")]),a("Button",{staticStyle:{"margin-left":"10px"},on:{click:t.handleReset}},[t._v("重置")])],1)],1),a("div",[a("Table",{ref:"table",attrs:{size:"small",height:"500",stripe:"",border:"","highlight-row":"",columns:t.personnelSelector.tableColumns,data:t.personnelSelector.tableData,loading:t.personnelSelector.loading},on:{"on-selection-change":t.selectionChange},scopedSlots:t._u([{key:"action",fn:function(e){var n=e.row;return[a("a",{on:{click:function(e){return t.pick(n)}}},[t._v("选择")])]}}])}),a("div",{staticClass:"ivu-mt ivu-text-center"},[a("Page",{attrs:{"show-total":"","show-sizer":"",total:t.personnelSelector.total,current:t.personnelSelector.params.page,"page-size":t.personnelSelector.params.page_size,"page-size-opts":[10,20,50,100,1e3,5e3,1e4]},on:{"update:current":function(e){return t.$set(t.personnelSelector.params,"page",e)},"on-change":t.handleChangeCurrent,"on-page-size-change":t.handleChangepage_size}})],1)],1)],1)],1)},i=[],r=(a("8e6e"),a("456d"),a("ac6a"),a("5df3"),a("28a5"),a("20d6"),a("96cf"),a("3b8d")),l=(a("6b54"),a("6762"),a("2fdb"),a("bd86")),s=(a("a481"),a("967e")),o=a.n(s),c=a("5e9b"),u=a("2ef0"),d=a.n(u),p=a("c276"),m=(a("a78e"),a("5a0c")),h=a.n(m),y=a("806c"),f=a("069b");function g(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 b(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?g(Object(a),!0).forEach((function(e){Object(l["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):g(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var _={components:{},data:function(){return{personnelSelector:{topOrBottomFlag:"",show:!1,params:{deptName:"",grade:"",classVal:"",deptyId:"",lodgerKeyWord:"",gender:"",page:1,page_size:10},loading:!1,tableData:[],tableColumns:[{title:"姓名",key:"username",minWidth:100},{title:"工号",key:"card_name",minWidth:100},{title:"值班日期",key:"watch_date",minWidth:100},{title:"部门",key:"dept_name",minWidth:100},{title:"操作",slot:"action",width:100,align:"center"}],total:0,current:1,size:10},intershift:{addOrEditFlag:"",show:!1,formData:{top:{watchid:"",watch_date:"",dept_id:"",card_name:"",username:"",dept_name:""},bottom:{watchid:"",watch_date:"",dept_id:"",card_name:"",username:"",dept_name:""}},dutyDateList:[],rules:{name:[{required:!0,message:"请选择人员",trigger:"change"}],date:[{required:!0,message:"请选择换班日期",trigger:"change"}]}},userArray:[],tableLoading:!1,fileUploadFlag:!1,loadingStatus:!1,file:null,dutyModelImportModal:!1,dutyDataInputObject:{startTime:"",endTime:"",is_lead:"",watch_date:"",campusid:"",watch_hour_id:"",watchtypeid:"",dept_id:""},publicModalTitle:"",dutyDataInputModal:!1,DatePickerKey:1,updateDutyFrom:{},updateDutyModal:!1,addDutySlectList:[],dutyRole:[{label:"否",value:0},{label:"是",value:1}],options1:{disabledDate:function(t){return t&&t.valueOf()<Date.now()-864e5}},formValidate:{username:"",watch_date:"",mobile:"",is_lead:"",card_name:"",watch_remark:"",campusid:"",watch_hour_id:"",watchtypeid:"",dept_id:""},rulesDutyDataInput:{key_name:[{type:"string",required:!0,message:"姓名或工号不能为空!",trigger:"blur"}],watch_date:[{type:"string",required:!0,message:"值班日期不能为空!",trigger:"change"}],is_lead:[{type:"number",required:!0,message:"值班权限不能为空!",trigger:"change"}],campusid:[{type:"string",required:!0,message:"值班类型不能为空!",trigger:"change"}],watchtypeid:[{type:"string",required:!0,message:"值班校区不能为空!",trigger:"change"}],dept_id:[{type:"string",required:!0,message:"值班部门不能为空!",trigger:"change"}]},updeteRuleValidate:{username1:[{type:"string",required:!0,message:"姓名不能为空!",trigger:"change"}],card_name:[{type:"string",required:!0,message:"工号不能为空!!",trigger:"blur"}],mobile:[{type:"string",required:!0,message:"联系方式不能为空!",trigger:"blur"}],watch_date:[{type:"string",required:!0,message:"值班日期不能为空!",trigger:"blur"}],is_lead:[{type:"number",required:!0,message:"值班权限不能为空!",trigger:"change"}],campusid:[{type:"string",required:!0,message:"值班类型不能为空!",trigger:"change"}],watchtypeid:[{type:"string",required:!0,message:"值班校区不能为空!",trigger:"change"}],dept_id:[{type:"string",required:!0,message:"值班部门不能为空!",trigger:"change"}]},ruleValidate:{username1:[{type:"string",required:!0,message:"姓名不能为空!",trigger:"change"}],card_name:[{type:"string",required:!0,message:"工号不能为空!!",trigger:"change"}],mobile:[{type:"string",required:!0,message:"联系方式不能为空!",trigger:"blur"}],watch_date:[{type:"string",required:!0,message:"值班日期不能为空!",trigger:"change"}],is_lead:[{type:"number",required:!0,message:"值班权限不能为空!",trigger:"change"}],campusid:[{type:"string",required:!0,message:"值班类型不能为空!",trigger:"change"}],watchtypeid:[{type:"string",required:!0,message:"值班校区不能为空!",trigger:"change"}],dept_id:[{type:"string",required:!0,message:"值班部门不能为空!",trigger:"change"}]},addDutyLoading:!0,addDuty:!1,selectFlag:!1,cityListAllObject:{dutyType:"",dutyHourTime:"",dutyCampus:"",dutyDepSelect:"",key_name:"",is_lead:3,dutyDate:"",startTime:(new Date).toLocaleDateString("cn",{hour12:!1}).replace(/\//g,"-"),endTime:(new Date).toLocaleDateString("cn",{hour12:!1}).replace(/\//g,"-"),startTimeSearch:"",endTimeSearch:"",startTimeFlag:"",endTimeFlag:""},cityListAlltSearchFlagObject:{dutyType:"",dutyHourTime:"",dutyCampus:"",dutyDepSelect:"",key_name:"",is_lead:3,dutyDate:"",startTimeSearch:"",endTimeSearch:""},buttonSize:"",searchSlecte:["值班类型","值班部门","值班校区"],cityListAll:[],model1:"",model2:"",model3:"",model4:"",pageKey:1,total:0,page_index:1,page_size:100,is_lead:3,columns:[{type:"selection",width:60,align:"center",fixed:"left"},{title:"姓名",key:"username",minWidth:150},{title:"工号",key:"card_name",minWidth:150},{title:"联系方式",key:"mobile",minWidth:150},{title:"值班部门",key:"dept_name",minWidth:150},{title:"值班类型",key:"watchtypename",minWidth:150},{title:"值班校区",key:"campusname",minWidth:150},{title:"值班权限",slot:"is_lead",minWidth:150},{title:"值班班级",resizable:!0,slot:"watch_remark",width:300},{title:"值班时间",key:"watch_hour_time",minWidth:150},{title:"值班日期",key:"watch_date",minWidth:150,sortable:!0},{title:"操作",slot:"action",minWidth:280,align:"center",fixed:"right"}],data:[],pushListSlc:[],exportModalShow:!1,tempYearMonth:"",dutyDateX:[]}},computed:{tableHeightCal:function(){return document.documentElement.clientHeight-360},util:function(){return p["a"]}},watch:{"cityListAllObject.dutyType":function(t,e){console.log("🚀🚀🚀,",t)},"cityListAllObject.dutyHourTime":function(t,e){console.log("🚀🚀🚀,",t)},"cityListAllObject.dutyCampus":function(t,e){console.log("🚀🚀🚀,",t)},"cityListAllObject.dutyDepSelect":function(t,e){console.log("🚀🚀🚀,",t)},dutyDataInputObject:{deep:!0,handler:function(t,e){console.log("🚀🚀🚀,",t)}},cityListAllObject:{deep:!0,handler:function(t,e){console.log("🚀🚀🚀,",t)}},formValidate:{deep:!0,handler:function(t,e){console.log("🚀🚀🚀,",t)}}},methods:{selectorHandle:function(t){this.getPersonnelList(),this.personnelSelector.show=!0,this.personnelSelector.topOrBottomFlag=t},cascaderChange:function(t){this.personnelSelector.params.classVal=t,this.getPersonnelList()},handleSearch:function(){this.personnelSelector.params.page=1,this.getPersonnelList()},handleReset:function(){this.personnelSelector.params={grade:"",classVal:"",deptyId:"",lodgerKeyWord:"",gender:"",page:1,page_size:10},this.getPersonnelList()},pick:function(t){this.intershift.formData[this.personnelSelector.topOrBottomFlag]=t,this.personnelSelector.show=!1},handleChangeCurrent:function(t){this.personnelSelector.params.page=t,this.getPersonnelList()},handleChangepage_size:function(t){this.personnelSelector.params.page_size=t,this.getPersonnelList()},selectionChange:function(t){this.personnelSelector.selection=t},getPersonnelList:function(){var t=this;this.personnelSelector.loading=!0;var e=b({},this.personnelSelector.params);f["b"](e).then((function(e){if(1===e.code){e.response=e.response.filter((function(e){return e.watchid!==t.intershift.formData.top.watchid&&e.watchid!==t.intershift.formData.bottom.watchid}));var a=e.response.filter((function(e){var a=t.personnelSelector.params.condition?t.personnelSelector.params.condition.toLowerCase():"";return!a||(e.username&&e.username.toString().toLowerCase().includes(a)||e.card_name&&e.card_name.toString().toLowerCase().includes(a))})).filter((function(e){var a=t.personnelSelector.params.deptName?t.personnelSelector.params.deptName.toLowerCase():"";return!a||e.dept_name&&e.dept_name.toString().toLowerCase().includes(a)}));t.personnelSelector.tableData=a.slice((t.personnelSelector.params.page-1)*t.personnelSelector.params.page_size,t.personnelSelector.params.page*t.personnelSelector.params.page_size),t.personnelSelector.total=a.length}})).catch((function(){t.$Message.error("获取人员列表失败")})).finally((function(){t.personnelSelector.loading=!1}))},resetFormDate:function(){this.intershift.formData={top:{watchid:"",watch_date:"",dept_id:"",card_name:"",username:"",dept_name:""},bottom:{watchid:"",watch_date:"",dept_id:"",card_name:"",username:"",dept_name:""}}},intershiftHandle:function(t,e){this.resetFormDate(),this.intershift.addOrEditFlag=t,this.intershift.show=!0,e&&(this.intershift.formData.top=e)},confirmIntershift:function(){var t=this;console.log("🚀🚀🚀,",this.intershift.formData),this.intershift.formData.top.watchid&&this.intershift.formData.bottom.watchid?y["publicConfirm"]((function(){y["myEncapsulationFunction"]((function(){return f["a"]({first_id:t.intershift.formData.top.watchid,second_id:t.intershift.formData.bottom.watchid}).then((function(e){if(1===e.code)return t.intershift.show=!1,t.getWatchList(),e}))}))})):this.$Message.warning("请选择要换班人员")},usernameChange1:function(t){var e=this;c["N"]({card:t}).then((function(t){e.updateDutyFrom=b(b({},e.updateDutyFrom),t.response)}))},usernameChange:function(t){var e=this;c["N"]({card:t}).then((function(t){e.formValidate=b(b({},e.formValidate),t.response)}))},dutyModelImportCancel:function(){this.dutyModelImportModal=!1},dutyModelImportOK:function(){this.file=null,this.loadingStatus=!1},dutyModelUpload:function(){var t=Object(r["a"])(o.a.mark((function t(e){var a,n;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=new FormData,a.append("file",e),t.next=4,c["T"](a);case 4:if(n=t.sent,1===n.code){t.next=9;break}this.$Message.error(n.msg_detail),t.next=12;break;case 9:return t.next=11,this.getWatchList();case 11:this.dutyModelImportModal=!1;case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),dutyModelFormatError:function(t,e){this.$Message.error("文件格式错误!")},dutyModelSuccess:function(t,e,a){this.$Message.info(t.msg)},dutyModelError:function(t,e,a){},dutyDataInputCancel:function(){this.dutyDataInputModal=!1},dutyDataImport:function(){var t=Object(r["a"])(o.a.mark((function t(){var e,a;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={start_time:""!==this.cityListAlltSearchFlagObject.startTimeSearch?this.cityListAlltSearchFlagObject.startTimeSearch:this.cityListAllObject.startTime,end_time:""!==this.cityListAlltSearchFlagObject.endTimeSearch?this.cityListAlltSearchFlagObject.endTimeSearch:this.cityListAllObject.endTime,is_lead:this.cityListAlltSearchFlagObject.is_lead,dep_id:this.cityListAlltSearchFlagObject.dutyDepSelect,key_name:this.cityListAlltSearchFlagObject.key_name,type_id:this.cityListAlltSearchFlagObject.dutyType,watchhour_time:this.cityListAlltSearchFlagObject.dutyHourTime,campus_id:this.cityListAlltSearchFlagObject.dutyCampus},t.next=3,c["P"](e);case 3:a=t.sent,window.location.href=this.$ascURL+a.response;case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),dutyDataInputOK:function(){var t=this;this.$refs["dutyDataInput"].validate(function(){var e=Object(r["a"])(o.a.mark((function e(a){var n,i;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!a){e.next=6;break}return n={dep_id:t.dutyDataInputObject.dep_id,key_name:t.dutyDataInputObject.key_name,start_time:t.dutyDataInputObject.startTime,end_time:t.dutyDataInputObject.endTime,type_id:t.dutyDataInputObject.watchtypeid,watchhour_time:t.dutyDataInputObject.watch_hour_id,is_lead:t.dutyDataInputObject.is_lead},e.next=4,c["P"](n);case 4:i=e.sent,window.location.href=t.$ascURL+i.response;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},dutyDataInputDateSelect:function(t){this.dutyDataInputObject.watch_date=t[0]+"-"+t[1],this.dutyDataInputObject.startTime=t[0],this.dutyDataInputObject.endTime=t[1]},updateDutyDate:function(t){this.updateDutyFrom.watch_date=t},updateCancel:function(){this.updateDutyModal=!1},updateOK:function(){var t=this;this.$refs["updateDutyFrom"].validate((function(e){e&&y["myEncapsulationFunction"](Object(r["a"])(o.a.mark((function e(){var a,n;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.updateDutyFrom,e.next=3,c["V"](a);case 3:return n=e.sent,t.getWatchList(),t.updateDutyModal=!1,e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)}))))}))},validateTime:function(t){var e=new Date(t),a=e.getFullYear(),n=e.getMonth(),i=e.getDate();return"".concat(a,"-").concat(n,"-").concat(i)},onSelect:function(t,e){this.pushListSlc.push(e.watchid)},onSelectCancel:function(t,e){var a=this.pushListSlc.findIndex((function(t){return t==e.watchid}));this.pushListSlc.splice(a,1)},onSelectAll:function(t){this.pushListSlc=t.map((function(t){return t.watchid}))},onSelectAllCancel:function(t){this.pushListSlc=[]},batchPush:function(){var t=this;0!=this.pushListSlc.length?this.$Modal.confirm({title:"提示",content:"是否确认推送?",loading:!0,onOk:function(){t.pushM(t.pushListSlc).then((function(){t.$Modal.remove(),t.getWatchList()}))}}):this.$Message.warning({content:"请选择要推送的人员",background:!0})},pushDuty:function(t){var e=this;this.$Modal.confirm({title:"提示",content:"是否确认推送?",loading:!0,onOk:function(){e.pushM([t.watchid]).then((function(){e.$Modal.remove()}))}})},pushM:function(t){var e=this;return new Promise((function(a){c["W"](t).then((function(t){1==t.code?e.$Message.success({content:t.msg,background:!0}):e.$Message.error({content:t.msg_detail,background:!0})})).finally((function(){a()}))}))},updateDuty:function(t){this.updateDutyFrom=d.a.cloneDeep(b(b({},t),{},{username1:t.card_name})),this.updateDutyModal=!0},deleteDuty:function(t){var e=this;this.publicConfirm((function(){y["myEncapsulationFunction"](Object(r["a"])(o.a.mark((function a(){var n,i;return o.a.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n={id:t.watchid},a.next=3,c["Q"](n);case 3:return i=a.sent,e.getWatchList(),a.abrupt("return",i);case 6:case"end":return a.stop()}}),a)}))))}))},search:function(){var t=Object(r["a"])(o.a.mark((function t(){return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.cityListAllObject.startTimeSearch=""!==this.cityListAllObject.startTimeFlag?this.cityListAllObject.startTimeFlag:this.cityListAllObject.startTime,this.cityListAllObject.endTimeSearch=""!==this.cityListAllObject.endtTimeFlag?this.cityListAllObject.endtTimeFlag:this.cityListAllObject.endTime,void 0===this.cityListAllObject.is_lead?this.cityListAllObject.is_lead=3:this.cityListAllObject.is_lead,this.cityListAlltSearchFlagObject=d.a.cloneDeep(this.cityListAllObject),this.pageKey++,this.page_index=1,t.next=8,this.getWatchList();case 8:t.sent;case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),dutyDateSelect:function(t){this.cityListAllObject.startTimeFlag=t[0],this.cityListAllObject.endtTimeFlag=t[1]},dutyDate:function(t){this.formValidate.watch_date=t},asyncOK:function(){var t=this,e=d.a.cloneDeep(this.formValidate);this.$refs["formValidate"].validate((function(a){a&&y["myEncapsulationFunction"](Object(r["a"])(o.a.mark((function a(){var n;return o.a.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,c["O"](e);case 2:return n=a.sent,a.next=5,t.getWatchList();case 5:return t.addDuty=!1,a.abrupt("return",n);case 7:case"end":return a.stop()}}),a)}))))}))},asyncCancel:function(){this.addDuty=!1},exportTemplate:function(){var t=h()(this.tempYearMonth).format("YYYY-MM").split("-");c["U"](t[0],t[1]).then((function(t){window.open(t.response)}))},handleButtonClick:function(){var t=Object(r["a"])(o.a.mark((function t(e){var a;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:t.t0=e,t.next="addDuty"===t.t0?3:"dutyModelOutput"===t.t0?8:"dutyDataOutput"===t.t0?13:"dutyModelInput"===t.t0?16:18;break;case 3:return this.publicModalTitle="增添值班数据",this.formValidate.watch_date="",this.$refs["formValidate"].resetFields(),this.addDuty=!0,t.abrupt("break",18);case 8:return t.next=10,c["U"]();case 10:return a=t.sent,window.location.href=this.$ascURL+a.response,t.abrupt("break",18);case 13:return this.publicModalTitle="值班数据导出",this.dutyDataInputModal=!0,t.abrupt("break",18);case 16:this.publicModalTitle="值班模板导入",this.dutyModelImportModal=!0;case 18:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),addDutySearchSelectList:function(){var t=this;Promise.all([this.getSearchSelectListPromiseAllAction("dept_name","值班部门","dept_id",c["u"]),this.getSearchSelectListPromiseAllAction("dutyType","值班类型","watchtypeid",c["A"]),this.getSearchSelectListPromiseAllAction("campusname","值班校区","campusid",c["t"])]).then((function(e){t.addDutySlectList=e,console.log("🚀🚀🚀,",e),t.DatePickerKey++}))},getSearchSelectListPromiseAllAction:function(t,e,a,n){return new Promise(function(){var t=Object(r["a"])(o.a.mark((function t(i,r){var l,s;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:l=t.sent,s=[l.response,e,a],i(s);case 5:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}())},getSearchSelectList:function(){var t=this;Promise.all([this.getSearchSelectListPromiseAllAction("dutyType","值班类型:","dutyType",c["A"]),this.getSearchSelectListPromiseAllAction("dutyHourTime","值班时段:","dutyHourTime",c["w"]),this.getSearchSelectListPromiseAllAction("dutyCampus","值班校区:","dutyCampus",c["t"]),this.getSearchSelectListPromiseAllAction("dutyDepSelect","值班部门:","dutyDepSelect",c["u"])]).then((function(e){t.cityListAll=e}))},getWatchList:function(){var t=Object(r["a"])(o.a.mark((function t(){var e=this;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:y["getInitListRequest"](Object(r["a"])(o.a.mark((function t(){var a,n;return o.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.tableLoading=!0,e.pushListSlc=[],a={page_index:e.page_index,page_size:e.page_size,start_time:""!==e.cityListAlltSearchFlagObject.startTimeSearch?e.cityListAlltSearchFlagObject.startTimeSearch:e.cityListAllObject.startTime,end_time:""!==e.cityListAlltSearchFlagObject.endTimeSearch?e.cityListAlltSearchFlagObject.endTimeSearch:e.cityListAllObject.endTime,is_lead:e.cityListAlltSearchFlagObject.is_lead,dep_id:e.cityListAlltSearchFlagObject.dutyDepSelect,key_name:e.cityListAlltSearchFlagObject.key_name,type_id:e.cityListAlltSearchFlagObject.dutyType,watchhour_time:e.cityListAlltSearchFlagObject.dutyHourTime,campus_id:e.cityListAlltSearchFlagObject.dutyCampus},t.next=5,c["x"](a);case 5:n=t.sent,e.data=n.response.data,e.total=n.response.data_count,e.tableLoading=!1;case 9:case"end":return t.stop()}}),t)}))));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),currentPage:function(t){this.page_index=t,this.getWatchList()},currentPageCount:function(t){this.page_size=t,this.getWatchList()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(r["a"])(o.a.mark((function e(){return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function a(){return e.apply(this,arguments)}return a}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Spin.hide(),this.$Message["success"]({background:!0,content:"操作成功"}))},GetUserSelect:function(){var t=this;c["s"]({condition:""}).then((function(e){t.userArray=e.response}))}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){var t=new Date,e=h()(t).format("YYYY-MM-")+h()(t).startOf("month").format("DD"),a=h()(t).format("YYYY-MM-")+h()(t).endOf("month").format("DD");this.cityListAllObject.startTimeFlag=e,this.cityListAllObject.endtTimeFlag=a,this.cityListAlltSearchFlagObject.startTimeSearch=e,this.cityListAlltSearchFlagObject.endTimeSearch=a,this.dutyDateX=[new Date(e),new Date(a)],this.addDutySearchSelectList(),this.getWatchList(),this.getSearchSelectList(),this.GetUserSelect()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},w=_,S=(a("b0a9"),a("2877")),v=Object(S["a"])(w,n,i,!1,null,"cb788a4c",null);e["default"]=v.exports},b0a9:function(t,e,a){"use strict";a("b321")},b321:function(t,e,a){}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d8989a66"],{3846:function(t,e,a){a("9e1e")&&"g"!=/./g.flags&&a("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:a("0bfb")})},"5df3":function(t,e,a){"use strict";var n=a("02f4")(!0);a("01f9")(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,a=this._i;return a>=e.length?{value:void 0,done:!0}:(t=n(e,a),this._i+=t.length,{value:t,done:!1})}))},"6b54":function(t,e,a){"use strict";a("3846");var n=a("cb7c"),r=a("0bfb"),i=a("9e1e"),l="toString",s=/./[l],c=function(t){a("2aba")(RegExp.prototype,l,t,!0)};a("79e5")((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?c((function(){var t=n(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?r.call(t):void 0)})):s.name!=l&&c((function(){return s.call(this)}))},"9ca0":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("div",[a("Card",{staticStyle:{width:"100%"},scopedSlots:t._u([{key:"title",fn:function(){return[a("div",{staticStyle:{display:"flex","align-items":"center"}},[a("h3",{staticStyle:{height:"30px",display:"flex","align-items":"center"}},[t._v("值班安排    ")]),t.selectFlag?t._e():a("div",{staticClass:"selectTitleIcon",staticStyle:{display:"flex","align-items":"center"},on:{click:function(e){t.selectFlag=!0}}},[a("span",[t._v("展开")]),a("Icon",{staticClass:"selectTitleIcon",attrs:{size:25,type:"ios-arrow-dropright",color:"#2d8cf0"}})],1),t.selectFlag?a("div",{staticClass:"selectTitleIcon",staticStyle:{display:"flex","align-items":"center"},on:{click:function(e){t.selectFlag=!t.selectFlag}}},[a("span",[t._v("收起")]),a("Icon",{staticClass:"selectTitleIcon",attrs:{size:25,type:"ios-arrow-dropdown",color:"#2d8cf0"}})],1):t._e()]),a("transition",{attrs:{name:"move-up"}},[t.selectFlag?a("div",[a("Row",{staticStyle:{"margin-top":"10px"},attrs:{justify:"space-between",wrap:""}},t._l(t.cityListAll,(function(e,n){return a("Col",{key:n,attrs:{span:4.5}},[a("div",{staticStyle:{display:"flex","flex-wrap":"nowrap","align-items":"center"}},[a("span",{staticStyle:{"margin-right":"5px"}},[t._v(t._s(e[1]))]),a("Select",{key:n,staticStyle:{width:"10.5vw"},attrs:{clearable:""},model:{value:t.cityListAllObject[e[2]],callback:function(a){t.$set(t.cityListAllObject,e[2],a)},expression:"cityListAllObject[item[2]]"}},t._l(e[0],(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)])})),1),a("Row",{staticStyle:{"margin-top":"10px"},attrs:{justify:"space-between",wrap:""}},[a("Col",{attrs:{span:4.5}},[a("div",{staticStyle:{display:"flex","justify-content":"center","align-items":"center"}},[a("span",[t._v("值班日期: ")]),a("DatePicker",{staticStyle:{width:"10.5vw"},attrs:{clearable:"",type:"daterange",placeholder:"请选择值班日期"},on:{"on-change":t.dutyDateSelect},model:{value:t.dutyDateX,callback:function(e){t.dutyDateX=e},expression:"dutyDateX"}})],1)]),a("Col",{attrs:{span:4.5}},[a("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[a("span",[t._v("值班领导:    ")]),a("Select",{staticStyle:{width:"10.5vw"},attrs:{clearable:"",placeholder:"是否为值班领导"},model:{value:t.cityListAllObject.is_lead,callback:function(e){t.$set(t.cityListAllObject,"is_lead",e)},expression:"cityListAllObject.is_lead"}},t._l(t.dutyRole,(function(e,n){return a("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1)]),a("Col",{attrs:{span:4.5}},[a("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[a("span",[t._v("姓名/卡号:")]),a("Input",{staticStyle:{width:"10.5vw","margin-right":"8.5vw"},attrs:{clearable:"",placeholder:"请输入姓名或卡号"},model:{value:t.cityListAllObject.key_name,callback:function(e){t.$set(t.cityListAllObject,"key_name",e)},expression:"cityListAllObject.key_name"}})],1)]),a("Col",{attrs:{span:4.5}},[a("Button",{attrs:{type:"primary",icon:"ios-search"},on:{click:t.search}},[t._v("查询数据")])],1)],1)],1):t._e()])]},proxy:!0},{key:"extra",fn:function(){return[a("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[a("Button",{staticStyle:{"margin-right":"8px"},attrs:{type:"warning"},on:{click:t.batchPush}},[t._v("批量推送")]),a("Button",{staticStyle:{"margin-right":"8px"},attrs:{type:"warning"},on:{click:t.intershiftHandle}},[t._v("相互换班")]),a("ButtonGroup",[a("Button",{attrs:{icon:"ios-add-circle-outline"},on:{click:function(e){return t.handleButtonClick("addDuty")}}},[t._v("增添值班")]),a("Button",{attrs:{label:"dutyDataOutput",icon:"ios-log-out"},on:{click:t.dutyDataImport}},[t._v("数据导出\n ")]),a("Button",{staticStyle:{display:"flex","align-items":"center"},attrs:{icon:"ios-cloud-upload-outline",label:"dutyModelInput"},on:{click:function(e){return t.handleButtonClick("dutyModelInput")}}},[t._v("\n 模板导入\n ")]),a("Button",{attrs:{label:"dutyModelOutput",icon:"ios-log-out"},on:{click:function(e){t.exportModalShow=!0}}},[t._v("模板导出\n ")])],1)],1)]},proxy:!0}])},[a("Table",{attrs:{border:"",loading:t.tableLoading,columns:t.columns,data:t.data,height:t.tableHeightCal},on:{"on-select":t.onSelect,"on-select-cancel":t.onSelectCancel,"on-select-all":t.onSelectAll,"on-select-all-cancel":t.onSelectAllCancel},scopedSlots:t._u([{key:"watch_remark",fn:function(e){var a=e.row;return[t._v("\n "+t._s(a.watch_remark)+"\n")]}},{key:"is_lead",fn:function(e){var a=e.row;return[t._v("\n "+t._s(["值班教师","值班领导"][a.is_lead])+"\n ")]}},{key:"action",fn:function(e){var n=e.row;return[a("div",{staticStyle:{display:"flex","justify-content":"space-evenly"}},[a("Button",{attrs:{type:"warning",size:"small"},on:{click:function(e){return t.pushDuty(n)}}},[t._v("推送")]),a("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.intershiftHandle(n)}}},[t._v("相互换班")]),a("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.updateDuty(n)}}},[t._v("修改")]),a("Button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.deleteDuty(n)}}},[t._v("删除")])],1)]}}])}),a("div",{staticStyle:{width:"100%",height:"70px",display:"flex","align-items":"center"}},[a("Page",{key:t.pageKey,attrs:{"show-total":"","show-sizer":"","show-elevator":"",total:t.total,"page-size":t.page_size,"page-size-opts":[100,200,500,1e3],"model-value":"page_index"},on:{"on-change":t.currentPage,"on-page-size-change":t.currentPageCount}})],1)],1),a("Modal",{attrs:{title:t.publicModalTitle,closable:"","mask-closable":!1,width:"40%"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:t.asyncCancel}},[t._v("取消")]),a("Button",{attrs:{type:"primary"},on:{click:t.asyncOK}},[t._v("确定")])]},proxy:!0}]),model:{value:t.addDuty,callback:function(e){t.addDuty=e},expression:"addDuty"}},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":80}},[a("FormItem",{attrs:{label:"姓名",prop:"username1"}},[a("Select",{attrs:{filterable:"",placeholder:"请选择用户"},on:{"on-change":t.usernameChange},model:{value:t.formValidate.username1,callback:function(e){t.$set(t.formValidate,"username1",e)},expression:"formValidate.username1"}},t._l(t.userArray,(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1),a("FormItem",{attrs:{label:"工号",prop:"card_name"}},[a("Input",{attrs:{placeholder:"请输入工号"},model:{value:t.formValidate.card_name,callback:function(e){t.$set(t.formValidate,"card_name",e)},expression:"formValidate.card_name"}})],1),a("FormItem",{attrs:{label:"联系方式",prop:"mobile"}},[a("Input",{attrs:{type:"number",placeholder:"请输入联系方式"},model:{value:t.formValidate.mobile,callback:function(e){t.$set(t.formValidate,"mobile",e)},expression:"formValidate.mobile"}})],1),t._l(t.addDutySlectList,(function(e,n){return a("FormItem",{key:n,attrs:{label:e[1],prop:e[2],"label-width":80}},[a("Select",{attrs:{placeholder:e[1],filterable:!0},model:{value:t.formValidate[e[2]],callback:function(a){t.$set(t.formValidate,e[2],a)},expression:"formValidate[item[2]]"}},t._l(e[0],(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)})),a("FormItem",{attrs:{label:"是否为值班领导",prop:"is_lead"}},[a("Select",{attrs:{placeholder:"是否为值班领导"},model:{value:t.formValidate.is_lead,callback:function(e){t.$set(t.formValidate,"is_lead",e)},expression:"formValidate.is_lead"}},t._l(t.dutyRole,(function(e,n){return a("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1),a("FormItem",{attrs:{label:"值班日期",prop:"watch_date"}},[a("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"date",options:t.options1,placeholder:"请选择值班日期"},on:{"on-change":t.dutyDate},model:{value:t.formValidate.watch_date,callback:function(e){t.$set(t.formValidate,"watch_date",e)},expression:"formValidate.watch_date"}})],1),a("FormItem",{attrs:{label:"值班班级",prop:"watch_remark"}},[a("Input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:"值班班级"},model:{value:t.formValidate.watch_remark,callback:function(e){t.$set(t.formValidate,"watch_remark",e)},expression:"formValidate.watch_remark"}})],1)],2)],1),a("Modal",{attrs:{title:"修改值班安排",width:"40%"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:t.updateCancel}},[t._v("取消")]),a("Button",{attrs:{type:"primary"},on:{click:t.updateOK}},[t._v("确定")])]},proxy:!0}]),model:{value:t.updateDutyModal,callback:function(e){t.updateDutyModal=e},expression:"updateDutyModal"}},[a("Form",{ref:"updateDutyFrom",attrs:{model:t.updateDutyFrom,rules:t.updeteRuleValidate,"label-width":80}},[a("FormItem",{attrs:{label:"姓名",prop:"username1"}},[a("Select",{attrs:{filterable:"",placeholder:"请选择用户"},on:{"on-change":t.usernameChange1},model:{value:t.updateDutyFrom.username1,callback:function(e){t.$set(t.updateDutyFrom,"username1",e)},expression:"updateDutyFrom.username1"}},t._l(t.userArray,(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1),a("FormItem",{attrs:{label:"工号",prop:"card_name"}},[a("Input",{attrs:{placeholder:"请输入工号"},model:{value:t.updateDutyFrom.card_name,callback:function(e){t.$set(t.updateDutyFrom,"card_name",e)},expression:"updateDutyFrom.card_name"}})],1),a("FormItem",{attrs:{label:"联系方式",prop:"mobile"}},[a("Input",{attrs:{type:"number",placeholder:"请输入联系方式"},model:{value:t.updateDutyFrom.mobile,callback:function(e){t.$set(t.updateDutyFrom,"mobile",e)},expression:"updateDutyFrom.mobile"}})],1),t._l(t.addDutySlectList,(function(e,n){return a("FormItem",{key:n,attrs:{label:e[1],prop:e[2],"label-width":80}},[a("Select",{attrs:{placeholder:e[1]},model:{value:t.updateDutyFrom[e[2]],callback:function(a){t.$set(t.updateDutyFrom,e[2],a)},expression:"updateDutyFrom[item[2]]"}},t._l(e[0],(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)})),a("FormItem",{attrs:{label:"是否为值班领导",prop:"is_lead"}},[a("Select",{attrs:{placeholder:"是否为值班领导"},model:{value:t.updateDutyFrom.is_lead,callback:function(e){t.$set(t.updateDutyFrom,"is_lead",e)},expression:"updateDutyFrom.is_lead"}},t._l(t.dutyRole,(function(e,n){return a("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1),a("FormItem",{attrs:{label:"值班日期",prop:"watch_date"}},[a("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"date",value:t.updateDutyFrom.watch_date,options:t.options1},on:{"on-change":t.updateDutyDate}})],1),a("FormItem",{attrs:{label:"值班班级",prop:"watch_remark"}},[a("Input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:"值班班级"},model:{value:t.updateDutyFrom.watch_remark,callback:function(e){t.$set(t.updateDutyFrom,"watch_remark",e)},expression:"updateDutyFrom.watch_remark"}})],1)],2)],1),a("Modal",{attrs:{title:t.publicModalTitle,width:"40%"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:t.dutyDataInputCancel}},[t._v("取消")]),a("Button",{attrs:{type:"primary"},on:{click:t.dutyDataInputOK}},[t._v("确定")])]},proxy:!0}]),model:{value:t.dutyDataInputModal,callback:function(e){t.dutyDataInputModal=e},expression:"dutyDataInputModal"}},[a("Form",{ref:"dutyDataInput",attrs:{model:t.dutyDataInputObject,rules:t.rulesDutyDataInput,"label-width":80}},[a("FormItem",{attrs:{label:"姓名或卡号",prop:"key_name"}},[a("Input",{attrs:{placeholder:"请输入姓名或卡号"},model:{value:t.dutyDataInputObject.key_name,callback:function(e){t.$set(t.dutyDataInputObject,"key_name",e)},expression:"dutyDataInputObject.key_name"}})],1),a("FormItem",{attrs:{label:"值班日期",prop:"watch_date"}},[a("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange"},on:{"on-change":t.dutyDataInputDateSelect}})],1),a("FormItem",{attrs:{label:"是否为值班领导",prop:"is_lead"}},[a("Select",{attrs:{placeholder:"是否为值班领导"},model:{value:t.dutyDataInputObject.is_lead,callback:function(e){t.$set(t.dutyDataInputObject,"is_lead",e)},expression:"dutyDataInputObject.is_lead"}},t._l(t.dutyRole,(function(e,n){return a("Option",{key:n,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1),t._l(t.addDutySlectList,(function(e,n){return a("FormItem",{key:n,attrs:{label:e[1],prop:e[2],"label-width":80}},[a("Select",{attrs:{placeholder:e[1]},model:{value:t.dutyDataInputObject[e[2]],callback:function(a){t.$set(t.dutyDataInputObject,e[2],a)},expression:"dutyDataInputObject[item[2]]"}},t._l(e[0],(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.name))])})),1)],1)}))],2)],1),a("Modal",{attrs:{title:t.publicModalTitle,width:"40%"},scopedSlots:t._u([{key:"footer",fn:function(){return[a("Button",{attrs:{type:"text"},on:{click:t.dutyModelImportCancel}},[t._v("取消")])]},proxy:!0}]),model:{value:t.dutyModelImportModal,callback:function(e){t.dutyModelImportModal=e},expression:"dutyModelImportModal"}},[a("Upload",{attrs:{"before-upload":t.dutyModelUpload,"on-error":t.dutyModelError,"on-success":t.dutyModelSuccess,"on-format-error":t.dutyModelFormatError,format:["xlsx"],multiple:!1,type:"drag",action:""}},[a("div",{staticStyle:{padding:"120px 0"}},[a("Icon",{staticStyle:{color:"#3399ff"},attrs:{type:"ios-cloud-upload",size:"52"}}),a("p",[t._v("值班模板文件上传")])],1)])],1),a("Modal",{attrs:{"mask-closable":!1,title:"模板导出"},on:{"on-ok":t.exportTemplate},model:{value:t.exportModalShow,callback:function(e){t.exportModalShow=e},expression:"exportModalShow"}},[a("span",[t._v("模板年月:")]),a("DatePicker",{attrs:{type:"month",format:"yyyy-MM",placeholder:""},model:{value:t.tempYearMonth,callback:function(e){t.tempYearMonth=e},expression:"tempYearMonth"}})],1),a("Modal",{attrs:{title:"相互换班",loading:t.intershift.loading,width:"600"},on:{"on-ok":t.confirmIntershift},model:{value:t.intershift.show,callback:function(e){t.$set(t.intershift,"show",e)},expression:" intershift.show"}},[a("Form",{ref:"Form5",attrs:{model:t.intershift.formData,rules:t.intershift.rule,"label-width":100}},[a("Card",[a("FormItem",{attrs:{label:"姓名",prop:"first_lodger_id"}},[a("Button",{attrs:{type:"primary",ghost:"",long:""},on:{click:function(e){return t.selectorHandle("relief")}}},[t._v(t._s(t.intershift.formData.name?""+t.intershift.formData.name:"请选择"))])],1),a("FormItem",{attrs:{label:"换班日期"}},[a("Select",{attrs:{filterable:"",clearable:""},model:{value:t.intershift.formData.date,callback:function(e){t.$set(t.intershift.formData,"date",e)},expression:"intershift.formData.date"}},t._l(t.intershift.dutyDateList,(function(e,n){return a("Option",{key:n,attrs:{value:e}},[t._v(t._s(e))])})),1)],1)],1),a("div",{staticClass:"ivu-text-center ivu-mt ivu-mb"},[a("Icon",{attrs:{type:"md-repeat",size:"48"}})],1),a("Card",[a("FormItem",{attrs:{label:"姓名",prop:""}},[a("Button",{attrs:{type:"primary",ghost:"",long:""},on:{click:function(e){return t.selectorHandle("theChangeover")}}},[t._v(t._s(t.intershift.formData.name?""+t.intershift.formData.name:"请选择"))])],1),a("FormItem",{attrs:{label:"换班日期"}},[a("Select",{attrs:{filterable:"",clearable:""},model:{value:t.intershift.formData.date,callback:function(e){t.$set(t.intershift.formData,"date",e)},expression:"intershift.formData.date"}},t._l(t.intershift.dutyDateList,(function(e,n){return a("Option",{key:n,attrs:{value:e}},[t._v(t._s(e))])})),1)],1)],1)],1)],1),a("Modal",{attrs:{styles:{top:"20px"},title:"选择人员",width:"1000","footer-hide":""},model:{value:t.personnelSelector.show,callback:function(e){t.$set(t.personnelSelector,"show",e)},expression:"personnelSelector.show"}},[a("Form",{ref:"formInline",attrs:{inline:"","label-position":"right","label-width":80}},[t._e(),t._e(),t._e(),a("FormItem",{attrs:{label:"姓名/卡号"}},[a("Input",{staticStyle:{width:"200px"},attrs:{clearable:"",placeholder:"请输入关键字"},model:{value:t.personnelSelector.params.coondition,callback:function(e){t.$set(t.personnelSelector.params,"coondition",e)},expression:"personnelSelector.params.coondition"}})],1),t._e(),a("FormItem",[a("Button",{attrs:{type:"primary"},on:{click:t.handleSearch}},[t._v("搜索")]),a("Button",{staticStyle:{"margin-left":"10px"},on:{click:t.handleReset}},[t._v("重置")])],1)],1),a("div",[a("Table",{ref:"table",attrs:{size:"small",height:"500",stripe:"",border:"","highlight-row":"",columns:t.personnelSelector.tableColumns,data:t.personnelSelector.tableData,loading:t.personnelSelector.loading},on:{"on-selection-change":t.selectionChange},scopedSlots:t._u([{key:"action",fn:function(e){var n=e.row;return[a("a",{on:{click:function(e){return t.pick(n)}}},[t._v("选择")])]}}])}),a("div",{staticClass:"ivu-mt ivu-text-center"},[a("Page",{attrs:{"show-total":"","show-sizer":"",total:t.personnelSelector.total,current:t.personnelSelector.params.page,"page-size":t.personnelSelector.params.page_size,"page-size-opts":[10,20,50,100,1e3,5e3,1e4]},on:{"update:current":function(e){return t.$set(t.personnelSelector.params,"page",e)},"on-change":t.handleChangeCurrent,"on-page-size-change":t.handleChangepage_size}})],1)],1)],1)],1)},r=[],i=(a("8e6e"),a("456d"),a("ac6a"),a("5df3"),a("28a5"),a("20d6"),a("96cf"),a("3b8d")),l=(a("6b54"),a("6762"),a("2fdb"),a("7f7f"),a("bd86")),s=(a("a481"),a("967e")),c=a.n(s),o=a("5e9b"),u=a("2ef0"),d=a.n(u),p=a("c276"),m=(a("a78e"),a("5a0c")),h=a.n(m),y=a("806c"),f=a("b6bd");function g(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 b(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?g(Object(a),!0).forEach((function(e){Object(l["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):g(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function _(t,e){var a={condition:t.condition};return f["a"].get("/api/UserInfo/api/UserInfo/GetUserSelect",b({params:a},e))}function v(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?v(Object(a),!0).forEach((function(e){Object(l["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):v(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var w={components:{},data:function(){return{personnelSelector:{show:!1,params:{grade:"",classVal:"",deptyId:"",lodgerKeyWord:"",gender:"",page:1,page_size:10},loading:!1,tableData:[{name:"张三",card_number:"001",id:1},{name:"李四",card_number:"002",id:2},{name:"王五",card_number:"003",id:3},{name:"赵六",card_number:"004",id:4},{name:"孙七",card_number:"005",id:5}],tableColumns:[{title:"姓名",key:"name",minWidth:100},{title:"工号",key:"card_number",minWidth:100},{title:"操作",slot:"action",width:100,align:"center"}],total:0,current:1,size:10},intershift:{show:!1,formData:{name:"",card_number:"",date:"",user_id:""},dutyDateList:[],rules:{name:[{required:!0,message:"请选择人员",trigger:"change"}],date:[{required:!0,message:"请选择换班日期",trigger:"change"}]}},userArray:[],tableLoading:!1,fileUploadFlag:!1,loadingStatus:!1,file:null,dutyModelImportModal:!1,dutyDataInputObject:{startTime:"",endTime:"",is_lead:"",watch_date:"",campusid:"",watch_hour_id:"",watchtypeid:"",dept_id:""},publicModalTitle:"",dutyDataInputModal:!1,DatePickerKey:1,updateDutyFrom:{},updateDutyModal:!1,addDutySlectList:[],dutyRole:[{label:"否",value:0},{label:"是",value:1}],options1:{disabledDate:function(t){return t&&t.valueOf()<Date.now()-864e5}},formValidate:{username:"",watch_date:"",mobile:"",is_lead:"",card_name:"",watch_remark:"",campusid:"",watch_hour_id:"",watchtypeid:"",dept_id:""},rulesDutyDataInput:{key_name:[{type:"string",required:!0,message:"姓名或工号不能为空!",trigger:"blur"}],watch_date:[{type:"string",required:!0,message:"值班日期不能为空!",trigger:"change"}],is_lead:[{type:"number",required:!0,message:"值班权限不能为空!",trigger:"change"}],campusid:[{type:"string",required:!0,message:"值班类型不能为空!",trigger:"change"}],watchtypeid:[{type:"string",required:!0,message:"值班校区不能为空!",trigger:"change"}],dept_id:[{type:"string",required:!0,message:"值班部门不能为空!",trigger:"change"}]},updeteRuleValidate:{username1:[{type:"string",required:!0,message:"姓名不能为空!",trigger:"change"}],card_name:[{type:"string",required:!0,message:"工号不能为空!!",trigger:"blur"}],mobile:[{type:"string",required:!0,message:"联系方式不能为空!",trigger:"blur"}],watch_date:[{type:"string",required:!0,message:"值班日期不能为空!",trigger:"blur"}],is_lead:[{type:"number",required:!0,message:"值班权限不能为空!",trigger:"change"}],campusid:[{type:"string",required:!0,message:"值班类型不能为空!",trigger:"change"}],watchtypeid:[{type:"string",required:!0,message:"值班校区不能为空!",trigger:"change"}],dept_id:[{type:"string",required:!0,message:"值班部门不能为空!",trigger:"change"}]},ruleValidate:{username1:[{type:"string",required:!0,message:"姓名不能为空!",trigger:"change"}],card_name:[{type:"string",required:!0,message:"工号不能为空!!",trigger:"change"}],mobile:[{type:"string",required:!0,message:"联系方式不能为空!",trigger:"blur"}],watch_date:[{type:"string",required:!0,message:"值班日期不能为空!",trigger:"change"}],is_lead:[{type:"number",required:!0,message:"值班权限不能为空!",trigger:"change"}],campusid:[{type:"string",required:!0,message:"值班类型不能为空!",trigger:"change"}],watchtypeid:[{type:"string",required:!0,message:"值班校区不能为空!",trigger:"change"}],dept_id:[{type:"string",required:!0,message:"值班部门不能为空!",trigger:"change"}]},addDutyLoading:!0,addDuty:!1,selectFlag:!1,cityListAllObject:{dutyType:"",dutyHourTime:"",dutyCampus:"",dutyDepSelect:"",key_name:"",is_lead:3,dutyDate:"",startTime:(new Date).toLocaleDateString("cn",{hour12:!1}).replace(/\//g,"-"),endTime:(new Date).toLocaleDateString("cn",{hour12:!1}).replace(/\//g,"-"),startTimeSearch:"",endTimeSearch:"",startTimeFlag:"",endTimeFlag:""},cityListAlltSearchFlagObject:{dutyType:"",dutyHourTime:"",dutyCampus:"",dutyDepSelect:"",key_name:"",is_lead:3,dutyDate:"",startTimeSearch:"",endTimeSearch:""},buttonSize:"",searchSlecte:["值班类型","值班部门","值班校区"],cityListAll:[],model1:"",model2:"",model3:"",model4:"",pageKey:1,total:0,page_index:1,page_size:100,is_lead:3,columns:[{type:"selection",width:60,align:"center",fixed:"left"},{title:"姓名",key:"username",minWidth:150},{title:"工号",key:"card_name",minWidth:150},{title:"联系方式",key:"mobile",minWidth:150},{title:"值班部门",key:"dept_name",minWidth:150},{title:"值班类型",key:"watchtypename",minWidth:150},{title:"值班校区",key:"campusname",minWidth:150},{title:"值班权限",slot:"is_lead",minWidth:150},{title:"值班班级",resizable:!0,slot:"watch_remark",width:300},{title:"值班时间",key:"watch_hour_time",minWidth:150},{title:"值班日期",key:"watch_date",minWidth:150,sortable:!0},{title:"操作",slot:"action",minWidth:280,align:"center",fixed:"right"}],data:[],pushListSlc:[],exportModalShow:!1,tempYearMonth:"",dutyDateX:[]}},computed:{tableHeightCal:function(){return document.documentElement.clientHeight-360},util:function(){return p["a"]}},watch:{"cityListAllObject.dutyType":function(t,e){console.log("🚀🚀🚀,",t)},"cityListAllObject.dutyHourTime":function(t,e){console.log("🚀🚀🚀,",t)},"cityListAllObject.dutyCampus":function(t,e){console.log("🚀🚀🚀,",t)},"cityListAllObject.dutyDepSelect":function(t,e){console.log("🚀🚀🚀,",t)},dutyDataInputObject:{deep:!0,handler:function(t,e){console.log("🚀🚀🚀,",t)}},cityListAllObject:{deep:!0,handler:function(t,e){console.log("🚀🚀🚀,",t)}},formValidate:{deep:!0,handler:function(t,e){console.log("🚀🚀🚀,",t)}}},methods:{selectorHandle:function(){this.getPersonnelList(),this.personnelSelector.show=!0},cascaderChange:function(t){this.personnelSelector.params.classVal=t,this.getPersonnelList()},handleSearch:function(){this.personnelSelector.params.page=1,this.getPersonnelList()},handleReset:function(){this.personnelSelector.params={grade:"",classVal:"",deptyId:"",lodgerKeyWord:"",gender:"",page:1,page_size:10},this.getPersonnelList()},pick:function(t){this.intershift.formData=S(S({},this.intershift.formData),{},{name:t.name,card_number:t.card_number,user_id:t.id}),this.personnelSelector.show=!1},handleChangeCurrent:function(t){this.personnelSelector.params.page=t,this.getPersonnelList()},handleChangepage_size:function(t){this.personnelSelector.params.page_size=t,this.getPersonnelList()},selectionChange:function(t){this.personnelSelector.selection=t},getPersonnelList:function(){var t=this;this.personnelSelector.loading=!0;var e=S({},this.personnelSelector.params);_(e).then((function(e){if(1===e.code){var a=e.response.filter((function(e){var a=t.personnelSelector.params.coondition?t.personnelSelector.params.coondition.toLowerCase():"";return!a||e.name&&e.name.toString().toLowerCase().includes(a)}));t.personnelSelector.tableData=a.slice((t.personnelSelector.params.page-1)*t.personnelSelector.params.page_size,t.personnelSelector.params.page*t.personnelSelector.params.page_size),t.personnelSelector.total=a.length}})).catch((function(){t.$Message.error("获取人员列表失败")})).finally((function(){t.personnelSelector.loading=!1}))},intershiftHandle:function(t){this.intershift.show=!0,this.intershift.formData=S(S({},this.intershift.formData),{},{name:t.name,card_number:t.card_number,user_id:t.id})},confirmIntershift:function(){console.log("🚀🚀🚀,",this.intershift.formData)},usernameChange1:function(t){var e=this;o["N"]({card:t}).then((function(t){e.updateDutyFrom=S(S({},e.updateDutyFrom),t.response)}))},usernameChange:function(t){var e=this;o["N"]({card:t}).then((function(t){e.formValidate=S(S({},e.formValidate),t.response)}))},dutyModelImportCancel:function(){this.dutyModelImportModal=!1},dutyModelImportOK:function(){this.file=null,this.loadingStatus=!1},dutyModelUpload:function(){var t=Object(i["a"])(c.a.mark((function t(e){var a,n;return c.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=new FormData,a.append("file",e),t.next=4,o["T"](a);case 4:if(n=t.sent,1===n.code){t.next=9;break}this.$Message.error(n.msg_detail),t.next=12;break;case 9:return t.next=11,this.getWatchList();case 11:this.dutyModelImportModal=!1;case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),dutyModelFormatError:function(t,e){this.$Message.error("文件格式错误!")},dutyModelSuccess:function(t,e,a){this.$Message.info(t.msg)},dutyModelError:function(t,e,a){},dutyDataInputCancel:function(){this.dutyDataInputModal=!1},dutyDataImport:function(){var t=Object(i["a"])(c.a.mark((function t(){var e,a;return c.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={start_time:""!==this.cityListAlltSearchFlagObject.startTimeSearch?this.cityListAlltSearchFlagObject.startTimeSearch:this.cityListAllObject.startTime,end_time:""!==this.cityListAlltSearchFlagObject.endTimeSearch?this.cityListAlltSearchFlagObject.endTimeSearch:this.cityListAllObject.endTime,is_lead:this.cityListAlltSearchFlagObject.is_lead,dep_id:this.cityListAlltSearchFlagObject.dutyDepSelect,key_name:this.cityListAlltSearchFlagObject.key_name,type_id:this.cityListAlltSearchFlagObject.dutyType,watchhour_time:this.cityListAlltSearchFlagObject.dutyHourTime,campus_id:this.cityListAlltSearchFlagObject.dutyCampus},t.next=3,o["P"](e);case 3:a=t.sent,window.location.href=this.$ascURL+a.response;case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),dutyDataInputOK:function(){var t=this;this.$refs["dutyDataInput"].validate(function(){var e=Object(i["a"])(c.a.mark((function e(a){var n,r;return c.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!a){e.next=6;break}return n={dep_id:t.dutyDataInputObject.dep_id,key_name:t.dutyDataInputObject.key_name,start_time:t.dutyDataInputObject.startTime,end_time:t.dutyDataInputObject.endTime,type_id:t.dutyDataInputObject.watchtypeid,watchhour_time:t.dutyDataInputObject.watch_hour_id,is_lead:t.dutyDataInputObject.is_lead},e.next=4,o["P"](n);case 4:r=e.sent,window.location.href=t.$ascURL+r.response;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},dutyDataInputDateSelect:function(t){this.dutyDataInputObject.watch_date=t[0]+"-"+t[1],this.dutyDataInputObject.startTime=t[0],this.dutyDataInputObject.endTime=t[1]},updateDutyDate:function(t){this.updateDutyFrom.watch_date=t},updateCancel:function(){this.updateDutyModal=!1},updateOK:function(){var t=this;this.$refs["updateDutyFrom"].validate((function(e){e&&y["myEncapsulationFunction"](Object(i["a"])(c.a.mark((function e(){var a,n;return c.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.updateDutyFrom,e.next=3,o["V"](a);case 3:return n=e.sent,t.getWatchList(),t.updateDutyModal=!1,e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)}))))}))},validateTime:function(t){var e=new Date(t),a=e.getFullYear(),n=e.getMonth(),r=e.getDate();return"".concat(a,"-").concat(n,"-").concat(r)},onSelect:function(t,e){this.pushListSlc.push(e.watchid)},onSelectCancel:function(t,e){var a=this.pushListSlc.findIndex((function(t){return t==e.watchid}));this.pushListSlc.splice(a,1)},onSelectAll:function(t){this.pushListSlc=t.map((function(t){return t.watchid}))},onSelectAllCancel:function(t){this.pushListSlc=[]},batchPush:function(){var t=this;0!=this.pushListSlc.length?this.$Modal.confirm({title:"提示",content:"是否确认推送?",loading:!0,onOk:function(){t.pushM(t.pushListSlc).then((function(){t.$Modal.remove(),t.getWatchList()}))}}):this.$Message.warning({content:"请选择要推送的人员",background:!0})},pushDuty:function(t){var e=this;this.$Modal.confirm({title:"提示",content:"是否确认推送?",loading:!0,onOk:function(){e.pushM([t.watchid]).then((function(){e.$Modal.remove()}))}})},pushM:function(t){var e=this;return new Promise((function(a){o["W"](t).then((function(t){1==t.code?e.$Message.success({content:t.msg,background:!0}):e.$Message.error({content:t.msg_detail,background:!0})})).finally((function(){a()}))}))},updateDuty:function(t){this.updateDutyFrom=d.a.cloneDeep(S(S({},t),{},{username1:t.card_name})),this.updateDutyModal=!0},deleteDuty:function(t){var e=this;this.publicConfirm((function(){y["myEncapsulationFunction"](Object(i["a"])(c.a.mark((function a(){var n,r;return c.a.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n={id:t.watchid},a.next=3,o["Q"](n);case 3:return r=a.sent,e.getWatchList(),a.abrupt("return",r);case 6:case"end":return a.stop()}}),a)}))))}))},search:function(){var t=Object(i["a"])(c.a.mark((function t(){return c.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.cityListAllObject.startTimeSearch=""!==this.cityListAllObject.startTimeFlag?this.cityListAllObject.startTimeFlag:this.cityListAllObject.startTime,this.cityListAllObject.endTimeSearch=""!==this.cityListAllObject.endtTimeFlag?this.cityListAllObject.endtTimeFlag:this.cityListAllObject.endTime,void 0===this.cityListAllObject.is_lead?this.cityListAllObject.is_lead=3:this.cityListAllObject.is_lead,this.cityListAlltSearchFlagObject=d.a.cloneDeep(this.cityListAllObject),this.pageKey++,this.page_index=1,t.next=8,this.getWatchList();case 8:t.sent;case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),dutyDateSelect:function(t){this.cityListAllObject.startTimeFlag=t[0],this.cityListAllObject.endtTimeFlag=t[1]},dutyDate:function(t){this.formValidate.watch_date=t},asyncOK:function(){var t=this,e=d.a.cloneDeep(this.formValidate);this.$refs["formValidate"].validate((function(a){a&&y["myEncapsulationFunction"](Object(i["a"])(c.a.mark((function a(){var n;return c.a.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,o["O"](e);case 2:return n=a.sent,a.next=5,t.getWatchList();case 5:return t.addDuty=!1,a.abrupt("return",n);case 7:case"end":return a.stop()}}),a)}))))}))},asyncCancel:function(){this.addDuty=!1},exportTemplate:function(){var t=h()(this.tempYearMonth).format("YYYY-MM").split("-");o["U"](t[0],t[1]).then((function(t){window.open(t.response)}))},handleButtonClick:function(){var t=Object(i["a"])(c.a.mark((function t(e){var a;return c.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:t.t0=e,t.next="addDuty"===t.t0?3:"dutyModelOutput"===t.t0?8:"dutyDataOutput"===t.t0?13:"dutyModelInput"===t.t0?16:18;break;case 3:return this.publicModalTitle="增添值班数据",this.formValidate.watch_date="",this.$refs["formValidate"].resetFields(),this.addDuty=!0,t.abrupt("break",18);case 8:return t.next=10,o["U"]();case 10:return a=t.sent,window.location.href=this.$ascURL+a.response,t.abrupt("break",18);case 13:return this.publicModalTitle="值班数据导出",this.dutyDataInputModal=!0,t.abrupt("break",18);case 16:this.publicModalTitle="值班模板导入",this.dutyModelImportModal=!0;case 18:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),addDutySearchSelectList:function(){var t=this;Promise.all([this.getSearchSelectListPromiseAllAction("dept_name","值班部门","dept_id",o["u"]),this.getSearchSelectListPromiseAllAction("dutyType","值班类型","watchtypeid",o["A"]),this.getSearchSelectListPromiseAllAction("campusname","值班校区","campusid",o["t"])]).then((function(e){t.addDutySlectList=e,console.log("🚀🚀🚀,",e),t.DatePickerKey++}))},getSearchSelectListPromiseAllAction:function(t,e,a,n){return new Promise(function(){var t=Object(i["a"])(c.a.mark((function t(r,i){var l,s;return c.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:l=t.sent,s=[l.response,e,a],r(s);case 5:case"end":return t.stop()}}),t)})));return function(e,a){return t.apply(this,arguments)}}())},getSearchSelectList:function(){var t=this;Promise.all([this.getSearchSelectListPromiseAllAction("dutyType","值班类型:","dutyType",o["A"]),this.getSearchSelectListPromiseAllAction("dutyHourTime","值班时段:","dutyHourTime",o["w"]),this.getSearchSelectListPromiseAllAction("dutyCampus","值班校区:","dutyCampus",o["t"]),this.getSearchSelectListPromiseAllAction("dutyDepSelect","值班部门:","dutyDepSelect",o["u"])]).then((function(e){t.cityListAll=e}))},getWatchList:function(){var t=Object(i["a"])(c.a.mark((function t(){var e=this;return c.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:y["getInitListRequest"](Object(i["a"])(c.a.mark((function t(){var a,n;return c.a.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.tableLoading=!0,e.pushListSlc=[],a={page_index:e.page_index,page_size:e.page_size,start_time:""!==e.cityListAlltSearchFlagObject.startTimeSearch?e.cityListAlltSearchFlagObject.startTimeSearch:e.cityListAllObject.startTime,end_time:""!==e.cityListAlltSearchFlagObject.endTimeSearch?e.cityListAlltSearchFlagObject.endTimeSearch:e.cityListAllObject.endTime,is_lead:e.cityListAlltSearchFlagObject.is_lead,dep_id:e.cityListAlltSearchFlagObject.dutyDepSelect,key_name:e.cityListAlltSearchFlagObject.key_name,type_id:e.cityListAlltSearchFlagObject.dutyType,watchhour_time:e.cityListAlltSearchFlagObject.dutyHourTime,campus_id:e.cityListAlltSearchFlagObject.dutyCampus},t.next=5,o["x"](a);case 5:n=t.sent,e.data=n.response.data,e.total=n.response.data_count,e.tableLoading=!1;case 9:case"end":return t.stop()}}),t)}))));case 1:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),currentPage:function(t){this.page_index=t,this.getWatchList()},currentPageCount:function(t){this.page_size=t,this.getWatchList()},publicConfirm:function(t){this.$Modal.confirm({title:"警告",content:"<p>是否继续此操作?</p>",cancelText:"取消",okText:"确定",onOk:function(){var e=Object(i["a"])(c.a.mark((function e(){return c.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:case"end":return e.stop()}}),e)})));function a(){return e.apply(this,arguments)}return a}()})},publicMessage:function(t){1!==t.code?this.$Message["warning"]({background:!0,content:"操作异常"}):(this.$Spin.hide(),this.$Message["success"]({background:!0,content:"操作成功"}))},GetUserSelect:function(){var t=this;o["s"]({condition:""}).then((function(e){t.userArray=e.response}))}},beforeCreate:function(){},created:function(){},beforeMount:function(){},mounted:function(){var t=new Date,e=h()(t).format("YYYY-MM-")+h()(t).startOf("month").format("DD"),a=h()(t).format("YYYY-MM-")+h()(t).endOf("month").format("DD");this.cityListAllObject.startTimeFlag=e,this.cityListAllObject.endtTimeFlag=a,this.cityListAlltSearchFlagObject.startTimeSearch=e,this.cityListAlltSearchFlagObject.endTimeSearch=a,this.dutyDateX=[new Date(e),new Date(a)],this.addDutySearchSelectList(),this.getWatchList(),this.getSearchSelectList(),this.GetUserSelect()},beforeUpdate:function(){},updated:function(){},beforeDestroy:function(){},destroyed:function(){},activated:function(){}},D=w,k=(a("c746"),a("2877")),O=Object(k["a"])(D,n,r,!1,null,"444bf3f9",null);e["default"]=O.exports},c746:function(t,e,a){"use strict";a("f462")},f462:function(t,e,a){}}]);
\ No newline at end of file
import { type AxiosRequestConfig } from "axios";
/**
* 双向换班
* /api/Watch/api/Watch/ExchangeDuty
*/
export declare function getApiWatchApiWatchExchangeDuty(params: GetApiWatchApiWatchExchangeDutyParams, config?: AxiosRequestConfig): import("axios").AxiosPromise<{
code: number;
status: string;
msg: string;
msg_detail: string;
response: string;
}>;
export interface GetApiWatchApiWatchExchangeDutyParams {
/** 换班id的第一个id */
first_id?: string;
/** 换班id的第二个id */
second_id?: string;
}
import request from "@/plugins/request";
/**
* 双向换班
* /api/Watch/api/Watch/ExchangeDuty
*/
export function getApiWatchApiWatchExchangeDuty(params, config) {
const paramsInput = {
first_id: params.first_id,
second_id: params.second_id,
};
return request.get(`/api/Watch/api/Watch/ExchangeDuty`, {
params: paramsInput,
...config,
});
}
import { type AxiosRequestConfig } from "axios";
/**
* 获取调班值班
* /api/Watch/api/Watch/GetExchangableDuty
*/
export declare function getApiWatchApiWatchGetExchangableDuty(config?: AxiosRequestConfig): import("axios").AxiosPromise<{
code: number;
status: string;
msg: string;
msg_detail: string;
response: {
watchid: string;
watch_date: string;
dept_id: string;
card_name: string;
username: string;
dept_name: string;
}[];
}>;
import request from "@/plugins/request";
/**
* 获取调班值班
* /api/Watch/api/Watch/GetExchangableDuty
*/
export function getApiWatchApiWatchGetExchangableDuty(config) {
return request.get(`/api/Watch/api/Watch/GetExchangableDuty`, config);
}
...@@ -7,6 +7,8 @@ export * from "./postApiWatchApiWatchWatchDataExport"; ...@@ -7,6 +7,8 @@ export * from "./postApiWatchApiWatchWatchDataExport";
export * from "./getApiWatchApiWatchWatchImportTemplate"; export * from "./getApiWatchApiWatchWatchImportTemplate";
export * from "./postApiWatchApiWatchWatchImport"; export * from "./postApiWatchApiWatchWatchImport";
export * from "./getApiWatchApiWatchWatchInfoSaveOneSelf"; export * from "./getApiWatchApiWatchWatchInfoSaveOneSelf";
export * from "./getApiWatchApiWatchExchangeDuty";
export * from "./getApiWatchApiWatchGetExchangableDuty";
export * from "./postApiWatchApiWatchWatchSendMeg"; export * from "./postApiWatchApiWatchWatchSendMeg";
export * from "./getApiWatchApiWatchGetWatchCount"; export * from "./getApiWatchApiWatchGetWatchCount";
export * from "./getApiWatchApiWatchGetWatchHourTime"; export * from "./getApiWatchApiWatchGetWatchHourTime";
......
...@@ -7,6 +7,8 @@ export * from "./postApiWatchApiWatchWatchDataExport"; ...@@ -7,6 +7,8 @@ export * from "./postApiWatchApiWatchWatchDataExport";
export * from "./getApiWatchApiWatchWatchImportTemplate"; export * from "./getApiWatchApiWatchWatchImportTemplate";
export * from "./postApiWatchApiWatchWatchImport"; export * from "./postApiWatchApiWatchWatchImport";
export * from "./getApiWatchApiWatchWatchInfoSaveOneSelf"; export * from "./getApiWatchApiWatchWatchInfoSaveOneSelf";
export * from "./getApiWatchApiWatchExchangeDuty";
export * from "./getApiWatchApiWatchGetExchangableDuty";
export * from "./postApiWatchApiWatchWatchSendMeg"; export * from "./postApiWatchApiWatchWatchSendMeg";
export * from "./getApiWatchApiWatchGetWatchCount"; export * from "./getApiWatchApiWatchGetWatchCount";
export * from "./getApiWatchApiWatchGetWatchHourTime"; export * from "./getApiWatchApiWatchGetWatchHourTime";
......
import { type AxiosRequestConfig } from "axios";
/**
* 启用禁用值班类型
* /api/WatchType/api/WatchType/EnableWatchType
*/
export declare function getApiWatchTypeApiWatchTypeEnableWatchType(params: GetApiWatchTypeApiWatchTypeEnableWatchTypeParams, config?: AxiosRequestConfig): import("axios").AxiosPromise<{
code: number;
status: string;
msg: string;
msg_detail: string;
response: string;
}>;
export interface GetApiWatchTypeApiWatchTypeEnableWatchTypeParams {
/** 值班类型id */
id: string;
/** true-启用,false-禁用 */
status: boolean;
}
import request from "@/plugins/request";
/**
* 启用禁用值班类型
* /api/WatchType/api/WatchType/EnableWatchType
*/
export function getApiWatchTypeApiWatchTypeEnableWatchType(params, config) {
const paramsInput = {
id: params.id,
status: params.status,
};
return request.get(`/api/WatchType/api/WatchType/EnableWatchType`, {
params: paramsInput,
...config,
});
}
...@@ -16,6 +16,8 @@ export declare function getApiWatchTypeApiWatchTypeGetWatchTypeInfo(params: GetA ...@@ -16,6 +16,8 @@ export declare function getApiWatchTypeApiWatchTypeGetWatchTypeInfo(params: GetA
sign_type: number; sign_type: number;
watchhour_id: string; watchhour_id: string;
watchhourname: string; watchhourname: string;
is_del: number;
is_enable: number;
}; };
}>; }>;
export interface GetApiWatchTypeApiWatchTypeGetWatchTypeInfoParams { export interface GetApiWatchTypeApiWatchTypeGetWatchTypeInfoParams {
......
...@@ -36,6 +36,8 @@ export declare function getApiWatchTypeApiWatchTypeGetWatchTypeList(params: GetA ...@@ -36,6 +36,8 @@ export declare function getApiWatchTypeApiWatchTypeGetWatchTypeList(params: GetA
sign_type: number; sign_type: number;
watchhour_id: string; watchhour_id: string;
watchhourname: string; watchhourname: string;
is_del: number;
is_enable: number;
}[]; }[];
query: { query: {
[x: string]: any; [x: string]: any;
......
...@@ -2,3 +2,4 @@ export * from "./getApiWatchTypeApiWatchTypeGetWatchTypeList"; ...@@ -2,3 +2,4 @@ export * from "./getApiWatchTypeApiWatchTypeGetWatchTypeList";
export * from "./getApiWatchTypeApiWatchTypeGetWatchTypeInfo"; export * from "./getApiWatchTypeApiWatchTypeGetWatchTypeInfo";
export * from "./postApiWatchTypeApiWatchTypeWatchTypeSave"; export * from "./postApiWatchTypeApiWatchTypeWatchTypeSave";
export * from "./getApiWatchTypeApiWatchTypeWatchTypeDel"; export * from "./getApiWatchTypeApiWatchTypeWatchTypeDel";
export * from "./getApiWatchTypeApiWatchTypeEnableWatchType";
...@@ -2,3 +2,4 @@ export * from "./getApiWatchTypeApiWatchTypeGetWatchTypeList"; ...@@ -2,3 +2,4 @@ export * from "./getApiWatchTypeApiWatchTypeGetWatchTypeList";
export * from "./getApiWatchTypeApiWatchTypeGetWatchTypeInfo"; export * from "./getApiWatchTypeApiWatchTypeGetWatchTypeInfo";
export * from "./postApiWatchTypeApiWatchTypeWatchTypeSave"; export * from "./postApiWatchTypeApiWatchTypeWatchTypeSave";
export * from "./getApiWatchTypeApiWatchTypeWatchTypeDel"; export * from "./getApiWatchTypeApiWatchTypeWatchTypeDel";
export * from "./getApiWatchTypeApiWatchTypeEnableWatchType";
export interface ExchangableWatchResponse {
/**
* Desc:值班id
* Default:
* Nullable:False
*/
watchid?: string;
/**
* Desc:值班日期
* Default:
* Nullable:True
*/
watch_date?: string;
/**
* Desc:部门
* Default:
* Nullable:True
*/
dept_id?: string;
/**
* Desc:员工号
* Default:
* Nullable:True
*/
card_name?: string;
/**
* Desc:员工姓名
* Default:
* Nullable:True
*/
username?: string;
/**
* Desc:值班部门
* Default:
* Nullable:True
*/
dept_name?: string;
}
import { type ExchangableWatchResponse } from "../../interface";
export interface ExchangableWatchResponseListMessageModel {
code?: number;
status?: string;
msg?: string;
msg_detail?: string;
response?: ExchangableWatchResponse[];
}
...@@ -6,4 +6,6 @@ export interface WatchType { ...@@ -6,4 +6,6 @@ export interface WatchType {
sign_type?: number; sign_type?: number;
watchhour_id?: string; watchhour_id?: string;
watchhourname?: string; watchhourname?: string;
is_del?: number;
is_enable?: number;
} }
...@@ -60,6 +60,8 @@ export * from "./apiTypes/Watch"; ...@@ -60,6 +60,8 @@ export * from "./apiTypes/Watch";
export * from "./apiTypes/WatchPageModel"; export * from "./apiTypes/WatchPageModel";
export * from "./apiTypes/WatchPageModelMessageModel"; export * from "./apiTypes/WatchPageModelMessageModel";
export * from "./apiTypes/WatchMessageModel"; export * from "./apiTypes/WatchMessageModel";
export * from "./apiTypes/ExchangableWatchResponse";
export * from "./apiTypes/ExchangableWatchResponseListMessageModel";
export * from "./apiTypes/Int32MessageModel"; export * from "./apiTypes/Int32MessageModel";
export * from "./apiTypes/StringListMessageModel"; export * from "./apiTypes/StringListMessageModel";
export * from "./apiTypes/WatchHour"; export * from "./apiTypes/WatchHour";
......
...@@ -60,6 +60,8 @@ export * from "./apiTypes/Watch"; ...@@ -60,6 +60,8 @@ export * from "./apiTypes/Watch";
export * from "./apiTypes/WatchPageModel"; export * from "./apiTypes/WatchPageModel";
export * from "./apiTypes/WatchPageModelMessageModel"; export * from "./apiTypes/WatchPageModelMessageModel";
export * from "./apiTypes/WatchMessageModel"; export * from "./apiTypes/WatchMessageModel";
export * from "./apiTypes/ExchangableWatchResponse";
export * from "./apiTypes/ExchangableWatchResponseListMessageModel";
export * from "./apiTypes/Int32MessageModel"; export * from "./apiTypes/Int32MessageModel";
export * from "./apiTypes/StringListMessageModel"; export * from "./apiTypes/StringListMessageModel";
export * from "./apiTypes/WatchHour"; export * from "./apiTypes/WatchHour";
......
...@@ -4,11 +4,11 @@ import Vue from "vue"; ...@@ -4,11 +4,11 @@ import Vue from "vue";
let vm = new Vue() let vm = new Vue()
export function publicConfirm(publicFunction) { export function publicConfirm(publicFunction,text='<p>是否继续此操作?</p>') {
// 公共弹窗删除 // 公共弹窗删除
Modal.confirm({ Modal.confirm({
title: '警告', title: '提示',
content: '<p>是否继续此操作?</p>', content: text,
cancelText: "取消", cancelText: "取消",
okText: '确定', okText: '确定',
onOk: async () => { onOk: async () => {
...@@ -49,36 +49,46 @@ export function storageAddEventListener(fun) { ...@@ -49,36 +49,46 @@ export function storageAddEventListener(fun) {
}); });
} }
export async function myEncapsulationFunction(fun) { export async function myEncapsulationFunction(fun, isShowSuccessText = false, text = '正在提交中...') {
// Spin.show() // Spin.show()
Message.loading({
duration: 0,
content: text,
})
let res = await fun() let res = await fun()
if (isShowSuccessText) return Message.destroy();
try { try {
switch (res.code) { switch (res.code) {
case 1 : case 1 :
Message.destroy()
Message['success']({ Message['success']({
background: true, background: true,
content: res.msg content: res.msg,
duration: 2,
}); });
break; break;
default : default :
Message.destroy()
Message['error']({ Message['error']({
background: true, background: true,
content: res.msg_detail content: res.msg_detail,
duration: 2,
}); });
} }
console.log("try")
// Spin.hide() // Spin.hide()
return res return res
} catch (e) { } catch (e) {
console.log("catch,", e) Message.destroy()
Spin.hide()
Message['error']({ Message['error']({
background: true, background: true,
content: res.msg_detail content: res.msg_detail,
duration: 2,
}); });
} }
} }
export function getInitListRequest(fun) { export function getInitListRequest(fun) {
try { try {
vm.prototypeLoading = true vm.prototypeLoading = true
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
width: 100%; width: 100%;
" "
> >
V1.0.1.250205-250305 V1.0.1.250205-250325
</span> </span>
</div> </div>
</div> </div>
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<template #extra> <template #extra>
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<Button style="margin-right: 8px;" type="warning" @click="batchPush">批量推送</Button> <Button style="margin-right: 8px;" type="warning" @click="batchPush">批量推送</Button>
<Button style="margin-right: 8px;" type="warning" @click="intershiftHandle">相互换班</Button> <Button style="margin-right: 8px;" type="warning" @click="intershiftHandle('add')">相互换班</Button>
<ButtonGroup> <ButtonGroup>
<Button @click="handleButtonClick('addDuty')" icon="ios-add-circle-outline">增添值班</Button> <Button @click="handleButtonClick('addDuty')" icon="ios-add-circle-outline">增添值班</Button>
<Button @click="dutyDataImport" label="dutyDataOutput" icon="ios-log-out">数据导出 <Button @click="dutyDataImport" label="dutyDataOutput" icon="ios-log-out">数据导出
...@@ -103,8 +103,8 @@ ...@@ -103,8 +103,8 @@
@on-select-all="onSelectAll" @on-select-all="onSelectAll"
@on-select-all-cancel="onSelectAllCancel"> @on-select-all-cancel="onSelectAllCancel">
<template #watch_remark="{row}"> <template #watch_remark="{row}">
{{row.watch_remark}} {{ row.watch_remark }}
<!-- <Ellipsis :transfer="true" :text="row.watch_remark" :length="8" tooltip/>--> <!-- <Ellipsis :transfer="true" :text="row.watch_remark" :length="8" tooltip/>-->
</template> </template>
<template #is_lead="{row}"> <template #is_lead="{row}">
{{ ['值班教师', '值班领导'][row.is_lead] }} {{ ['值班教师', '值班领导'][row.is_lead] }}
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<template #action="{row}"> <template #action="{row}">
<div style="display: flex;justify-content: space-evenly"> <div style="display: flex;justify-content: space-evenly">
<Button @click="pushDuty(row)" type="warning" size="small">推送</Button> <Button @click="pushDuty(row)" type="warning" size="small">推送</Button>
<Button @click="intershiftHandle(row)" type="primary" size="small">相互换班</Button> <Button @click="intershiftHandle('edit',row)" type="primary" size="small">相互换班</Button>
<Button @click="updateDuty(row)" type="primary" size="small">修改</Button> <Button @click="updateDuty(row)" type="primary" size="small">修改</Button>
<Button @click="deleteDuty(row)" type="primary" size="small">删除</Button> <Button @click="deleteDuty(row)" type="primary" size="small">删除</Button>
</div> </div>
...@@ -293,43 +293,56 @@ ...@@ -293,43 +293,56 @@
</Modal> </Modal>
<!-- 相互换班 --> <!-- 相互换班 -->
<Modal v-model=" intershift.show" title="相互换班" :loading="intershift.loading" width="600" @on-ok="confirmIntershift"> <Modal v-model=" intershift.show" title="相互换班" :loading="intershift.loading" width="600"
>
<Form ref="Form5" :model="intershift.formData" :rules="intershift.rule" :label-width="100"> <Form ref="Form5" :model="intershift.formData" :rules="intershift.rule" :label-width="100">
<Card> <Card>
<FormItem label="姓名" prop="first_lodger_id"> <FormItem label="姓名" prop="first_lodger_id">
<Button type="primary" ghost long @click="selectorHandle('relief')">{{ <Button :disabled="intershift.addOrEditFlag == 'edit'" type="primary" ghost long
intershift.formData.name @click="selectorHandle('top')">{{
? `${intershift.formData.name}` intershift.formData.top.username
? `${intershift.formData.top.username + `(${intershift.formData.top.card_name})`}`
: "请选择" : "请选择"
}}</Button> }}
</Button>
</FormItem> </FormItem>
<FormItem label="换班日期"> <FormItem label="换班日期">
<Select v-model="intershift.formData.date" filterable clearable> <Button type="default" ghost long disabled>{{
<Option v-for="(item,i) in intershift.dutyDateList" :value="item" :key="i">{{item}}</Option> intershift.formData.top.watch_date
</Select> ? `${intershift.formData.top.watch_date}`
: "暂无换班日期"
}}
</Button>
</FormItem> </FormItem>
</Card> </Card>
<div class="ivu-text-center ivu-mt ivu-mb"> <div class="ivu-text-center ivu-mt ivu-mb">
<Icon type="md-repeat" size="48" /> <Icon type="md-repeat" size="48"/>
</div> </div>
<Card> <Card>
<FormItem label="姓名" prop=""> <FormItem label="姓名" prop="">
<Button type="primary" ghost long @click="selectorHandle('theChangeover')">{{ <Button type="primary" ghost long @click="selectorHandle('bottom')">{{
intershift.formData.name intershift.formData.bottom.username
? `${intershift.formData.name}` ? `${intershift.formData.bottom.username + `(${intershift.formData.bottom.card_name})`}`
: "请选择" : "请选择"
}}</Button> }}
</Button>
</FormItem> </FormItem>
<FormItem label="换班日期"> <FormItem label="换班日期">
<Select v-model="intershift.formData.date" filterable clearable> <Button type="default" ghost long disabled>{{
<Option v-for="(item,i) in intershift.dutyDateList" :value="item" :key="i">{{item}}</Option> intershift.formData.bottom.watch_date
</Select> ? `${intershift.formData.bottom.watch_date}`
: "暂无换班日期"
}}
</Button>
</FormItem> </FormItem>
</Card> </Card>
</Form> </Form>
<template #footer>
<Button type="text" @click="intershift.show = false">取消</Button>
<Button type="primary" @click="confirmIntershift">确定</Button>
</template>
</Modal> </Modal>
...@@ -338,22 +351,29 @@ ...@@ -338,22 +351,29 @@
<Form ref="formInline" inline label-position="right" :label-width="80"> <Form ref="formInline" inline label-position="right" :label-width="80">
<FormItem label="年级" v-if="false"> <FormItem label="年级" v-if="false">
<Select v-model="personnelSelector.params.grade" filterable style="width: 200px" clearable> <Select v-model="personnelSelector.params.grade" filterable style="width: 200px" clearable>
<Option v-for="(item,i) in personnelSelector.gradeList" :value="item" :key="i">{{item}}</Option> <Option v-for="(item,i) in personnelSelector.gradeList" :value="item" :key="i">{{ item }}</Option>
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="班级" v-if="false"> <FormItem label="班级" v-if="false">
<Cascader style="width: 200px" v-model="personnelSelector.params.classVal" :data="personnelSelector.classTree" change-on-select @on-change="cascaderChange"> <Cascader style="width: 200px" v-model="personnelSelector.params.classVal" :data="personnelSelector.classTree"
change-on-select @on-change="cascaderChange">
</Cascader> </Cascader>
</FormItem> </FormItem>
<FormItem v-if="false" label="部门"> <FormItem v-if="false" label="部门">
<Select v-model="personnelSelector.params.deptyId" filterable style="width: 200px" clearable> <Select v-model="personnelSelector.params.deptyId" filterable style="width: 200px" clearable>
<Option v-for="(item, i) in personnelSelector.deptList" :value="item.department_id" :key="i">{{ <Option v-for="(item, i) in personnelSelector.deptList" :value="item.department_id" :key="i">{{
item.department_name item.department_name
}}</Option> }}
</Option>
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="姓名/卡号"> <FormItem label="姓名/卡号">
<Input style="width: 200px" v-model="personnelSelector.params.coondition" clearable placeholder="请输入关键字"> </Input> <Input style="width: 200px" v-model="personnelSelector.params.condition" clearable
placeholder="请输入关键字"> </Input>
</FormItem>
<FormItem label="部门">
<Input style="width: 200px" v-model="personnelSelector.params.deptName" clearable
placeholder="请输入关键字"> </Input>
</FormItem> </FormItem>
<FormItem v-if="false" label="性别"> <FormItem v-if="false" label="性别">
<Select v-model="personnelSelector.params.gender" style="width: 200px" filterable clearable> <Select v-model="personnelSelector.params.gender" style="width: 200px" filterable clearable>
...@@ -392,7 +412,7 @@ ...@@ -392,7 +412,7 @@
:page-size="personnelSelector.params.page_size" :page-size="personnelSelector.params.page_size"
:page-size-opts="[10, 20, 50, 100,1000,5000,10000]" :page-size-opts="[10, 20, 50, 100,1000,5000,10000]"
@on-change="handleChangeCurrent" @on-change="handleChangeCurrent"
@on-page-size-change="handleChangepage_size" /> @on-page-size-change="handleChangepage_size"/>
</div> </div>
</div> </div>
</Modal> </Modal>
...@@ -401,25 +421,28 @@ ...@@ -401,25 +421,28 @@
</template> </template>
<script> <script>
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等) //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》'; //例如:import 《组件名称》 from '《组件路径》';
import * as api from '../../api/lezRequest' import * as api from '../../api/lezRequest'
import _ from "lodash"; import _ from "lodash";
import util from '@/libs/util'; import util from '@/libs/util';
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import dayjs from 'dayjs' import dayjs from 'dayjs'
import * as hooks from "../../hooks/index" import * as hooks from "../../hooks/index"
import * as request from '@/api/request/controller' import * as request from '@/api/request/controller'
export default {
export default {
//import引入的组件需要注入到对象中才能使用", //import引入的组件需要注入到对象中才能使用",
components: {}, components: {},
data() { data() {
//这里存放数据", //这里存放数据",
return { return {
//人员选择器 //人员选择器
personnelSelector:{ personnelSelector: {
show:false, topOrBottomFlag: '',
params:{ show: false,
params: {
deptName: '',
grade: '', grade: '',
classVal: '', classVal: '',
deptyId: '', deptyId: '',
...@@ -429,42 +452,26 @@ ...@@ -429,42 +452,26 @@
page_size: 10 page_size: 10
}, },
loading: false, loading: false,
tableData: [ tableData: [],
{ tableColumns: [
name: '张三',
card_number: '001',
id: 1
},
{
name: '李四',
card_number: '002',
id: 2
},
{ {
name: '王五', title: '姓名',
card_number: '003', key: 'username',
id: 3 minWidth: 100
}, },
{ {
name: '赵六', title: '工号',
card_number: '004', key: 'card_name',
id: 4 minWidth: 100
}, },
{ {
name: '孙七', title: '值班日期',
card_number: '005', key: 'watch_date',
id: 5
}
],
tableColumns: [
{
title: '姓名',
key: 'name',
minWidth: 100 minWidth: 100
}, },
{ {
title: '工号', title: '部门',
key: 'card_number', key: 'dept_name',
minWidth: 100 minWidth: 100
}, },
{ {
...@@ -479,21 +486,34 @@ ...@@ -479,21 +486,34 @@
size: 10 size: 10
}, },
//相互换班 //相互换班
intershift:{ intershift: {
show:false, addOrEditFlag: '',
formData:{ show: false,
name: '', formData: {
card_number: '', top: {
date: '', "watchid": "",
user_id: '' "watch_date": "",
"dept_id": "",
"card_name": "",
"username": "",
"dept_name": ""
},
bottom: {
"watchid": "",
"watch_date": "",
"dept_id": "",
"card_name": "",
"username": "",
"dept_name": ""
}
}, },
dutyDateList: [], dutyDateList: [],
rules:{ rules: {
name: [ name: [
{ required: true, message: '请选择人员', trigger: 'change' } {required: true, message: '请选择人员', trigger: 'change'}
], ],
date: [ date: [
{ required: true, message: '请选择换班日期', trigger: 'change' } {required: true, message: '请选择换班日期', trigger: 'change'}
] ]
} }
}, },
...@@ -778,9 +798,10 @@ ...@@ -778,9 +798,10 @@
methods: { methods: {
/** 人员选择器 */ /** 人员选择器 */
//触发人员选择器 //触发人员选择器
selectorHandle() { selectorHandle(key) {
this.getPersonnelList(); this.getPersonnelList();
this.personnelSelector.show = true; this.personnelSelector.show = true;
this.personnelSelector.topOrBottomFlag = key;
}, },
// 级联选择器变化 // 级联选择器变化
cascaderChange(e) { cascaderChange(e) {
...@@ -810,14 +831,9 @@ ...@@ -810,14 +831,9 @@
this.getPersonnelList(); this.getPersonnelList();
}, },
// 选择人员 // 选择换班人员
pick(row) { pick(row) {
this.intershift.formData = { this.intershift.formData[this.personnelSelector.topOrBottomFlag] = row;
...this.intershift.formData,
name: row.name,
card_number: row.card_number,
user_id: row.id
};
this.personnelSelector.show = false; this.personnelSelector.show = false;
}, },
...@@ -844,15 +860,31 @@ ...@@ -844,15 +860,31 @@
const params = { const params = {
...this.personnelSelector.params ...this.personnelSelector.params
}; };
request.getApiUserInfoApiUserInfoGetUserSelect(params) request.getApiWatchApiWatchGetExchangableDuty(params)
.then(res => { .then(res => {
if(res.code === 1) { if (res.code === 1) {
//过滤掉 top/bottom选中人员
res.response = res.response.filter(cur=>
(cur.watchid !== this.intershift.formData.top.watchid && cur.watchid !== this.intershift.formData.bottom.watchid ))
//前端分页 //前端分页
// 先根据搜索条件过滤数据
const filteredData = res.response.filter(item => { const filteredData = res.response.filter(item => {
const condition = this.personnelSelector.params.coondition ? this.personnelSelector.params.coondition.toLowerCase() : ''; //姓名卡号字段
const condition = this.personnelSelector.params.condition ? this.personnelSelector.params.condition.toLowerCase() : '';
if (!condition) return true; if (!condition) return true;
return (item.name && item.name.toString().toLowerCase().includes(condition)) return (
(item.username && item.username.toString().toLowerCase().includes(condition)) ||
(item.card_name && item.card_name.toString().toLowerCase().includes(condition))
);
}).filter(item => {
{
//部门字段
const dept_name = this.personnelSelector.params.deptName ? this.personnelSelector.params.deptName.toLowerCase() : '';
if (!dept_name) return true;
return (
(item.dept_name && item.dept_name.toString().toLowerCase().includes(dept_name))
);
}
}); });
// 再进行分页 // 再进行分页
...@@ -871,25 +903,58 @@ ...@@ -871,25 +903,58 @@
}); });
}, },
/** 人员选择器 */ /** 人员选择器 */
resetFormDate() {
this.intershift.formData = {
top: {
"watchid": "",
"watch_date": "",
"dept_id": "",
"card_name": "",
"username": "",
"dept_name": ""
},
bottom: {
"watchid": "",
"watch_date": "",
"dept_id": "",
"card_name": "",
"username": "",
"dept_name": ""
}
}
},
//触发相互换班 //触发相互换班
intershiftHandle(row) { intershiftHandle(key, row) {
this.resetFormDate()
this.intershift.addOrEditFlag = key
this.intershift.show = true; this.intershift.show = true;
this.intershift.formData = { if (row) this.intershift.formData.top = row;
...this.intershift.formData,
name: row.name,
card_number: row.card_number,
user_id: row.id
};
}, },
//提交相互换班 //提交相互换班
confirmIntershift() { confirmIntershift() {
console.log("🚀🚀🚀,", this.intershift.formData) console.log("🚀🚀🚀,", this.intershift.formData)
if (!this.intershift.formData.top.watchid || !this.intershift.formData.bottom.watchid) {
this.$Message.warning('请选择要换班人员')
return
}
hooks.publicConfirm(()=>{
hooks.myEncapsulationFunction(()=>{
return request.getApiWatchApiWatchExchangeDuty({
'first_id':this.intershift.formData.top.watchid,
'second_id':this.intershift.formData.bottom.watchid
}).then(res=>{
if (res.code === 1) {
this.intershift.show = false
this.getWatchList()
return res
}
})
})
})
}, },
usernameChange1(e) { usernameChange1(e) {
api.UserWalk({card: e}).then(res => { api.UserWalk({card: e}).then(res => {
this.updateDutyFrom = {...this.updateDutyFrom, ...res.response} this.updateDutyFrom = {...this.updateDutyFrom, ...res.response}
...@@ -1346,7 +1411,7 @@ ...@@ -1346,7 +1411,7 @@
activated() { activated() {
}, },
} }
</script> </script>
......
...@@ -22,6 +22,21 @@ ...@@ -22,6 +22,21 @@
<span v-if="row.sign_type == 1">无定位打卡</span> <span v-if="row.sign_type == 1">无定位打卡</span>
<span v-if="row.sign_type == 2">定位拍照打卡</span> <span v-if="row.sign_type == 2">定位拍照打卡</span>
</template> </template>
<template #is_enable="{ row }">
<Switch
@on-change="onChangeSwitch($event,row)"
size="large"
v-model="row.is_enable"
:true-value="1"
:false-value="0">
<template #open>
<span>启用</span>
</template>
<template #close>
<span>禁用</span>
</template>
</Switch>
</template>
<!-- 操作 --> <!-- 操作 -->
<template #action="{row}"> <template #action="{row}">
<Button type="primary" size="small" @click="update(row)">修改</Button> <Button type="primary" size="small" @click="update(row)">修改</Button>
...@@ -89,6 +104,7 @@ ...@@ -89,6 +104,7 @@
<script> <script>
import * as api from '../../../../api/lezRequest' import * as api from '../../../../api/lezRequest'
import * as request from '@/api/request/controller'
import * as hooks from '../../../../hooks/index' import * as hooks from '../../../../hooks/index'
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等) //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》'; //例如:import 《组件名称》 from '《组件路径》';
...@@ -138,6 +154,11 @@ ...@@ -138,6 +154,11 @@
title: '值班时间', title: '值班时间',
key: 'watchhourname', key: 'watchhourname',
}, },
{
title: '启用/禁用',
slot: 'is_enable',
},
// { // {
// title: '备注', // title: '备注',
// key:'role_remark', // key:'role_remark',
...@@ -185,6 +206,20 @@ ...@@ -185,6 +206,20 @@
}, },
//方法集合", //方法集合",
methods: { methods: {
//启用或禁用
onChangeSwitch(e,row){
hooks.myEncapsulationFunction(()=>{
return request.getApiWatchTypeApiWatchTypeEnableWatchType({
id:row.watchtypeid,
status:Boolean(e)
}).then(res=>{
if (res.code === 1){
this.GetWatchTypeList()
}
return res
})
})
},
modalOk() { modalOk() {
hooks.myEncapsulationFunction(async () => { hooks.myEncapsulationFunction(async () => {
let data = { let data = {
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或