智慧教务系统 PHP-NiuCloud框架开发
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.8 KiB

import{d as Y,v as Z,l as M,r as _,f as O,h as u,c as v,e as a,w as r,a as b,t as m,u as e,i as w,k as l,F as P,O as I,m as g,J as G,S as H,E as J,_ as K,ac as q,G as A,bg as Q,D as X,H as ee,K as le,$ as ae,a0 as te,a1 as oe,L as se}from"./index-775ec1fd.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 *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{g as re,d as ne,a as de,b as ie,c as ue,e as pe}from"./zhjw_roll-ea579648.js";import{_ as me}from"./_plugin-vue_export-helper-c27b6911.js";const ce={class:"main-container"},_e={class:"flex justify-between items-center"},he={class:"text-lg"},fe={class:"mt-[10px]"},be={class:"mt-[16px] flex justify-end"},we=Y({__name:"zhjw_roll",setup(ve){const z=Z().meta.title;let t=M({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{students_id:"",registration_date:"",student_number:"",name:"",price:"",staff_id:"",course_validity:"",renewal_class:"",courses_id:""}});const C=_();_([]);const c=(i=1)=>{t.loading=!0,t.page=i,re({page:t.page,limit:t.limit,...t.searchParam}).then(s=>{t.loading=!1,t.data=s.data.data,t.total=s.data.total}).catch(()=>{t.loading=!1})};c();const x=O(),D=()=>{x.push("/zhjw_roll/zhjw_roll_edit")},U=i=>{x.push("/zhjw_roll/zhjw_roll_edit?id="+i.id)},R=i=>{H.confirm(l("zhjwRollDeleteTips"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{ne(i).then(()=>{c()}).catch(()=>{})})},L=_([]);(async()=>{L.value=await(await de({})).data})();const k=_([]);(async()=>{k.value=await(await ie({})).data})();const j=_([]);(async()=>{j.value=await(await ue({})).data})();const S=_([]);(async()=>{S.value=await(await pe({})).data})();const B=i=>{i&&(i.resetFields(),c())};return(i,s)=>{const h=J,y=K,V=q,d=A,F=Q,f=X,N=ee,E=le,n=ae,T=te,$=oe,W=se;return u(),v("div",ce,[a(E,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[b("div",_e,[b("span",he,m(e(z)),1),a(h,{type:"primary",onClick:D},{default:r(()=>[w(m(e(l)("addZhjwRoll")),1)]),_:1})]),a(E,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:r(()=>[a(N,{inline:!0,model:e(t).searchParam,ref_key:"searchFormRef",ref:C},{default:r(()=>[a(d,{label:e(l)("studentsId"),prop:"students_id"},{default:r(()=>[a(V,{class:"w-[280px]",modelValue:e(t).searchParam.students_id,"onUpdate:modelValue":s[0]||(s[0]=o=>e(t).searchParam.students_id=o),clearable:"",placeholder:e(l)("studentsIdPlaceholder")},{default:r(()=>[(u(!0),v(P,null,I(L.value,(o,p)=>(u(),g(y,{key:p,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(d,{label:e(l)("registrationDate"),prop:"registration_date"},{default:r(()=>[a(F,{modelValue:e(t).searchParam.registration_date,"onUpdate:modelValue":s[1]||(s[1]=o=>e(t).searchParam.registration_date=o),type:"datetimerange",format:"YYYY-MM-DD hh:mm:ss","start-placeholder":e(l)("startDate"),"end-placeholder":e(l)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),a(d,{label:e(l)("studentNumber"),prop:"student_number"},{default:r(()=>[a(f,{modelValue:e(t).searchParam.student_number,"onUpdate:modelValue":s[2]||(s[2]=o=>e(t).searchParam.student_number=o),placeholder:e(l)("studentNumberPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(d,{label:e(l)("name"),prop:"name"},{default:r(()=>[a(f,{modelValue:e(t).searchParam.name,"onUpdate:modelValue":s[3]||(s[3]=o=>e(t).searchParam.name=o),placeholder:e(l)("namePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(d,{label:e(l)("price"),prop:"price"},{default:r(()=>[a(f,{modelValue:e(t).searchParam.price,"onUpdate:modelValue":s[4]||(s[4]=o=>e(t).searchParam.price=o),placeholder:e(l)("pricePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(d,{label:e(l)("staffId"),prop:"staff_id"},{default:r(()=>[a(V,{class:"w-[280px]",modelValue:e(t).searchParam.staff_id,"onUpdate:modelValue":s[5]||(s[5]=o=>e(t).searchParam.staff_id=o),clearable:"",placeholder:e(l)("staffIdPlaceholder")},{default:r(()=>[(u(!0),v(P,null,I(k.value,(o,p)=>(u(),g(y,{key:p,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(d,{label:e(l)("courseValidity"),prop:"course_validity"},{default:r(()=>[a(f,{modelValue:e(t).searchParam.course_validity,"onUpdate:modelValue":s[6]||(s[6]=o=>e(t).searchParam.course_validity=o),placeholder:e(l)("courseValidityPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(d,{label:e(l)("renewalClass"),prop:"renewal_class"},{default:r(()=>[a(f,{modelValue:e(t).searchParam.renewal_class,"onUpdate:modelValue":s[7]||(s[7]=o=>e(t).searchParam.renewal_class=o),placeholder:e(l)("renewalClassPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(d,{label:e(l)("coursesId"),prop:"courses_id"},{default:r(()=>[a(V,{class:"w-[280px]",modelValue:e(t).searchParam.courses_id,"onUpdate:modelValue":s[8]||(s[8]=o=>e(t).searchParam.courses_id=o),clearable:"",placeholder:e(l)("coursesIdPlaceholder")},{default:r(()=>[(u(!0),v(P,null,I(j.value,(o,p)=>(u(),g(y,{key:p,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(d,null,{default:r(()=>[a(h,{type:"primary",onClick:s[9]||(s[9]=o=>c())},{default:r(()=>[w(m(e(l)("search")),1)]),_:1}),a(h,{onClick:s[10]||(s[10]=o=>B(C.value))},{default:r(()=>[w(m(e(l)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),b("div",fe,[G((u(),g(T,{data:e(t).data,size:"large"},{empty:r(()=>[b("span",null,m(e(t).loading?"":e(l)("emptyData")),1)]),default:r(()=>[a(n,{prop:"students_id_name",label:e(l)("studentsId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"registration_date",label:e(l)("registrationDate"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"student_number",label:e(l)("studentNumber"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"name",label:e(l)("name"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"price",label:e(l)("price"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"staff_id_name",label:e(l)("staffId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"course_validity",label:e(l)("courseValidity"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"renewal_class",label:e(l)("renewalClass"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"courses_id_name",label:e(l)("coursesId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{prop:"phone",label:e(l)("phone"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(n,{label:e(l)("operation"),fixed:"right","min-width":"120"},{default:r(({row:o})=>[a(h,{type:"primary",link:"",onClick:p=>U(o)},{default:r(()=>[w(m(e(l)("edit")),1)]),_:2},1032,["onClick"]),a(h,{type:"primary",link:"",onClick:p=>R(o.id)},{default:r(()=>[w(m(e(l)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[W,e(t).loading]]),b("div",be,[a($,{"current-page":e(t).page,"onUpdate:current-page":s[11]||(s[11]=o=>e(t).page=o),"page-size":e(t).limit,"onUpdate:page-size":s[12]||(s[12]=o=>e(t).limit=o),layout:"total, sizes, prev, pager, next, jumper",total:e(t).total,onSizeChange:s[13]||(s[13]=o=>c()),onCurrentChange:c},null,8,["current-page","page-size","total"])])])]),_:1})])}}});const Oe=me(we,[["__scopeId","data-v-05075dad"]]);export{Oe as default};