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
5.2 KiB
1 lines
5.2 KiB
import{d as B,v as $,l as U,r as g,h as f,c as x,e as a,w as s,a as _,t as d,u as e,i as h,k as l,F as Z,O as N,m as k,J as R,S as O,E as G,_ as H,ac as J,G as K,D as M,H as W,K as q,$ as A,a0 as Q,a1 as X,L as Y}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 */import"./el-form-item-4ed993c7.js";/* empty css */import{_ as ee,g as te,d as ae,a as le}from"./zhjw-students-survey-edit.vue_vue_type_style_index_0_lang-68886616.js";import{_ as oe}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css */const ne={class:"main-container"},se={class:"flex justify-between items-center"},re={class:"text-lg"},ie={class:"mt-[10px]"},de={class:"mt-[16px] flex justify-end"},ue=B({__name:"zhjw_students_survey",setup(pe){const P=$().meta.title;let t=U({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{students_id:"",height:"",weight:"",update_time:""}});const b=g();g([]);const i=(r=1)=>{t.loading=!0,t.page=r,te({page:t.page,limit:t.limit,...t.searchParam}).then(o=>{t.loading=!1,t.data=o.data.data,t.total=o.data.total}).catch(()=>{t.loading=!1})};i();const u=g(null),C=()=>{u.value.setFormData(),u.value.showDialog=!0},E=r=>{u.value.setFormData(r),u.value.showDialog=!0},V=r=>{O.confirm(l("zhjwStudentsSurveyDeleteTips"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{ae(r).then(()=>{i()}).catch(()=>{})})},y=g([]);(async()=>{y.value=await(await le({})).data})();const j=r=>{r&&(r.resetFields(),i())};return(r,o)=>{const p=G,z=H,D=J,m=K,v=M,F=W,S=q,c=A,T=Q,I=X,L=Y;return f(),x("div",ne,[a(S,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[_("div",se,[_("span",re,d(e(P)),1),a(p,{type:"primary",onClick:C},{default:s(()=>[h(d(e(l)("addZhjwStudentsSurvey")),1)]),_:1})]),a(S,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:s(()=>[a(F,{inline:!0,model:e(t).searchParam,ref_key:"searchFormRef",ref:b},{default:s(()=>[a(m,{label:e(l)("studentsId"),prop:"students_id"},{default:s(()=>[a(D,{class:"w-[280px]",modelValue:e(t).searchParam.students_id,"onUpdate:modelValue":o[0]||(o[0]=n=>e(t).searchParam.students_id=n),clearable:"",placeholder:e(l)("studentsIdPlaceholder")},{default:s(()=>[(f(!0),x(Z,null,N(y.value,(n,w)=>(f(),k(z,{key:w,label:n.name,value:n.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(m,{label:e(l)("height"),prop:"height"},{default:s(()=>[a(v,{modelValue:e(t).searchParam.height,"onUpdate:modelValue":o[1]||(o[1]=n=>e(t).searchParam.height=n),placeholder:e(l)("heightPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(m,{label:e(l)("weight"),prop:"weight"},{default:s(()=>[a(v,{modelValue:e(t).searchParam.weight,"onUpdate:modelValue":o[2]||(o[2]=n=>e(t).searchParam.weight=n),placeholder:e(l)("weightPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(m,{label:e(l)("updateTime"),prop:"update_time"},{default:s(()=>[a(v,{modelValue:e(t).searchParam.update_time,"onUpdate:modelValue":o[3]||(o[3]=n=>e(t).searchParam.update_time=n),placeholder:e(l)("updateTimePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(m,null,{default:s(()=>[a(p,{type:"primary",onClick:o[4]||(o[4]=n=>i())},{default:s(()=>[h(d(e(l)("search")),1)]),_:1}),a(p,{onClick:o[5]||(o[5]=n=>j(b.value))},{default:s(()=>[h(d(e(l)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),_("div",ie,[R((f(),k(T,{data:e(t).data,size:"large"},{empty:s(()=>[_("span",null,d(e(t).loading?"":e(l)("emptyData")),1)]),default:s(()=>[a(c,{prop:"students_id_name",label:e(l)("studentsId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{prop:"height",label:e(l)("height"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{prop:"weight",label:e(l)("weight"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{prop:"create_time",label:e(l)("createTime"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(c,{label:e(l)("operation"),fixed:"right","min-width":"120"},{default:s(({row:n})=>[a(p,{type:"primary",link:"",onClick:w=>E(n)},{default:s(()=>[h(d(e(l)("edit")),1)]),_:2},1032,["onClick"]),a(p,{type:"primary",link:"",onClick:w=>V(n.id)},{default:s(()=>[h(d(e(l)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[L,e(t).loading]]),_("div",de,[a(I,{"current-page":e(t).page,"onUpdate:current-page":o[6]||(o[6]=n=>e(t).page=n),"page-size":e(t).limit,"onUpdate:page-size":o[7]||(o[7]=n=>e(t).limit=n),layout:"total, sizes, prev, pager, next, jumper",total:e(t).total,onSizeChange:o[8]||(o[8]=n=>i()),onCurrentChange:i},null,8,["current-page","page-size","total"])])]),a(ee,{ref_key:"editZhjwStudentsSurveyDialog",ref:u,onComplete:i},null,512)]),_:1})])}}});const Le=oe(ue,[["__scopeId","data-v-0f30697b"]]);export{Le as default};
|
|
|