You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
7.3 KiB
1 lines
7.3 KiB
import{d as I,v as U,l as B,r as b,h as k,c as F,e as a,w as d,a as h,t as c,u as e,i as f,k as t,J as z,m as $,M as L,E as N,D as O,G as j,H as R,K as M,O as S,P as G,Q as H,L as J}from"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{_ as K,g as Q,d as q}from"./attendance-edit.vue_vue_type_style_index_0_lang-cdea515b.js";import{_ as W}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css */const X={class:"main-container"},Y={class:"flex justify-between items-center"},Z={class:"text-lg"},ee={class:"mt-[10px]"},ae={class:"mt-[16px] flex justify-end"},te=I({__name:"attendance",setup(le){const v=U().meta.title;let l=B({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{campus_id:"",staff_id:"",attendance_date:"",check_in_time:"",check_out_time:"",status:"",remarks:"",created_at:"",updated_at:"",coordinate:""}});const w=b();b([]);const m=(p=1)=>{l.loading=!0,l.page=p,Q({page:l.page,limit:l.limit,...l.searchParam}).then(o=>{l.loading=!1,l.data=o.data.data,l.total=o.data.total}).catch(()=>{l.loading=!1})};m();const u=b(null),P=()=>{u.value.setFormData(),u.value.showDialog=!0},V=p=>{u.value.setFormData(p),u.value.showDialog=!0},y=p=>{L.confirm(t("attendanceDeleteTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{q(p).then(()=>{m()}).catch(()=>{})})},x=p=>{p&&(p.resetFields(),m())};return(p,o)=>{const _=N,i=O,n=j,C=R,g=M,s=S,D=G,E=H,T=J;return k(),F("div",X,[a(g,{class:"box-card !border-none",shadow:"never"},{default:d(()=>[h("div",Y,[h("span",Z,c(e(v)),1),a(_,{type:"primary",onClick:P},{default:d(()=>[f(c(e(t)("addAttendance")),1)]),_:1})]),a(g,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:d(()=>[a(C,{inline:!0,model:e(l).searchParam,ref_key:"searchFormRef",ref:w},{default:d(()=>[a(n,{label:e(t)("campusId"),prop:"campus_id"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.campus_id,"onUpdate:modelValue":o[0]||(o[0]=r=>e(l).searchParam.campus_id=r),placeholder:e(t)("campusIdPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("staffId"),prop:"staff_id"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.staff_id,"onUpdate:modelValue":o[1]||(o[1]=r=>e(l).searchParam.staff_id=r),placeholder:e(t)("staffIdPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("attendanceDate"),prop:"attendance_date"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.attendance_date,"onUpdate:modelValue":o[2]||(o[2]=r=>e(l).searchParam.attendance_date=r),placeholder:e(t)("attendanceDatePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("checkInTime"),prop:"check_in_time"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.check_in_time,"onUpdate:modelValue":o[3]||(o[3]=r=>e(l).searchParam.check_in_time=r),placeholder:e(t)("checkInTimePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("checkOutTime"),prop:"check_out_time"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.check_out_time,"onUpdate:modelValue":o[4]||(o[4]=r=>e(l).searchParam.check_out_time=r),placeholder:e(t)("checkOutTimePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("status"),prop:"status"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.status,"onUpdate:modelValue":o[5]||(o[5]=r=>e(l).searchParam.status=r),placeholder:e(t)("statusPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("remarks"),prop:"remarks"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.remarks,"onUpdate:modelValue":o[6]||(o[6]=r=>e(l).searchParam.remarks=r),placeholder:e(t)("remarksPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("createdAt"),prop:"created_at"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.created_at,"onUpdate:modelValue":o[7]||(o[7]=r=>e(l).searchParam.created_at=r),placeholder:e(t)("createdAtPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("updatedAt"),prop:"updated_at"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.updated_at,"onUpdate:modelValue":o[8]||(o[8]=r=>e(l).searchParam.updated_at=r),placeholder:e(t)("updatedAtPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,{label:e(t)("coordinate"),prop:"coordinate"},{default:d(()=>[a(i,{modelValue:e(l).searchParam.coordinate,"onUpdate:modelValue":o[9]||(o[9]=r=>e(l).searchParam.coordinate=r),placeholder:e(t)("coordinatePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(n,null,{default:d(()=>[a(_,{type:"primary",onClick:o[10]||(o[10]=r=>m())},{default:d(()=>[f(c(e(t)("search")),1)]),_:1}),a(_,{onClick:o[11]||(o[11]=r=>x(w.value))},{default:d(()=>[f(c(e(t)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),h("div",ee,[z((k(),$(D,{data:e(l).data,size:"large"},{empty:d(()=>[h("span",null,c(e(l).loading?"":e(t)("emptyData")),1)]),default:d(()=>[a(s,{prop:"campus_id",label:e(t)("campusId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"staff_id",label:e(t)("staffId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"attendance_date",label:e(t)("attendanceDate"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"check_in_time",label:e(t)("checkInTime"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"check_out_time",label:e(t)("checkOutTime"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"status",label:e(t)("status"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"remarks",label:e(t)("remarks"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"created_at",label:e(t)("createdAt"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"updated_at",label:e(t)("updatedAt"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{prop:"coordinate",label:e(t)("coordinate"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(s,{label:e(t)("operation"),fixed:"right","min-width":"120"},{default:d(({row:r})=>[a(_,{type:"primary",link:"",onClick:A=>V(r)},{default:d(()=>[f(c(e(t)("edit")),1)]),_:2},1032,["onClick"]),a(_,{type:"primary",link:"",onClick:A=>y(r.id)},{default:d(()=>[f(c(e(t)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[T,e(l).loading]]),h("div",ae,[a(E,{"current-page":e(l).page,"onUpdate:current-page":o[12]||(o[12]=r=>e(l).page=r),"page-size":e(l).limit,"onUpdate:page-size":o[13]||(o[13]=r=>e(l).limit=r),layout:"total, sizes, prev, pager, next, jumper",total:e(l).total,onSizeChange:o[14]||(o[14]=r=>m()),onCurrentChange:m},null,8,["current-page","page-size","total"])])]),a(K,{ref_key:"editAttendanceDialog",ref:u,onComplete:m},null,512)]),_:1})])}}});const Ce=W(te,[["__scopeId","data-v-3de62876"]]);export{Ce as default};
|
|
|