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
6.1 KiB
1 lines
6.1 KiB
import{d as $,v as D,l as R,r as v,f as S,h as b,c as V,e as a,w as n,a as _,t as d,u as e,i as f,k as o,F as j,O as A,m as x,J as O,S as G,E as H,_ as J,ac as K,G as M,D as W,H as q,K as Q,$ as X,a0 as Y,a1 as Z,L as ee}from"./index-208710d8.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{g as te,d as ae,a as oe}from"./enterprise_information-b350b0f6.js";import{_ as le}from"./_plugin-vue_export-helper-c27b6911.js";const re={class:"main-container"},ne={class:"flex justify-between items-center"},se={class:"text-lg"},ie={class:"mt-[10px]"},pe={class:"mt-[16px] flex justify-end"},de=$({__name:"enterprise_information",setup(me){const E=D().meta.title;let t=R({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{campuses_id:"",enterprise_name:"",enterprise_abbreviation:"",phone:"",profession:"",website:""}});const w=v();v([]);const m=(s=1)=>{t.loading=!0,t.page=s,te({page:t.page,limit:t.limit,...t.searchParam}).then(l=>{t.loading=!1,t.data=l.data.data,t.total=l.data.total}).catch(()=>{t.loading=!1})};m();const g=S(),C=()=>{g.push("/enterprise_information/enterprise_information_edit")},k=s=>{g.push("/enterprise_information/enterprise_information_edit?id="+s.id)},I=s=>{G.confirm(o("enterpriseInformationDeleteTips"),o("warning"),{confirmButtonText:o("confirm"),cancelButtonText:o("cancel"),type:"warning"}).then(()=>{ae(s).then(()=>{m()}).catch(()=>{})})},P=v([]);(async()=>{P.value=await(await oe({})).data})();const L=s=>{s&&(s.resetFields(),m())};return(s,l)=>{const u=H,B=J,F=K,p=M,c=W,T=q,y=Q,i=X,U=Y,N=Z,z=ee;return b(),V("div",re,[a(y,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[_("div",ne,[_("span",se,d(e(E)),1),a(u,{type:"primary",onClick:C},{default:n(()=>[f(d(e(o)("addEnterpriseInformation")),1)]),_:1})]),a(y,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:n(()=>[a(T,{inline:!0,model:e(t).searchParam,ref_key:"searchFormRef",ref:w},{default:n(()=>[a(p,{label:e(o)("campusesId"),prop:"campuses_id"},{default:n(()=>[a(F,{class:"w-[280px]",modelValue:e(t).searchParam.campuses_id,"onUpdate:modelValue":l[0]||(l[0]=r=>e(t).searchParam.campuses_id=r),clearable:"",placeholder:e(o)("campusesIdPlaceholder")},{default:n(()=>[(b(!0),V(j,null,A(P.value,(r,h)=>(b(),x(B,{key:h,label:r.name,value:r.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(p,{label:e(o)("enterpriseName"),prop:"enterprise_name"},{default:n(()=>[a(c,{modelValue:e(t).searchParam.enterprise_name,"onUpdate:modelValue":l[1]||(l[1]=r=>e(t).searchParam.enterprise_name=r),placeholder:e(o)("enterpriseNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(p,{label:e(o)("enterpriseAbbreviation"),prop:"enterprise_abbreviation"},{default:n(()=>[a(c,{modelValue:e(t).searchParam.enterprise_abbreviation,"onUpdate:modelValue":l[2]||(l[2]=r=>e(t).searchParam.enterprise_abbreviation=r),placeholder:e(o)("enterpriseAbbreviationPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(p,{label:e(o)("phone"),prop:"phone"},{default:n(()=>[a(c,{modelValue:e(t).searchParam.phone,"onUpdate:modelValue":l[3]||(l[3]=r=>e(t).searchParam.phone=r),placeholder:e(o)("phonePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(p,{label:e(o)("profession"),prop:"profession"},{default:n(()=>[a(c,{modelValue:e(t).searchParam.profession,"onUpdate:modelValue":l[4]||(l[4]=r=>e(t).searchParam.profession=r),placeholder:e(o)("professionPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(p,{label:e(o)("website"),prop:"website"},{default:n(()=>[a(c,{modelValue:e(t).searchParam.website,"onUpdate:modelValue":l[5]||(l[5]=r=>e(t).searchParam.website=r),placeholder:e(o)("websitePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(p,null,{default:n(()=>[a(u,{type:"primary",onClick:l[6]||(l[6]=r=>m())},{default:n(()=>[f(d(e(o)("search")),1)]),_:1}),a(u,{onClick:l[7]||(l[7]=r=>L(w.value))},{default:n(()=>[f(d(e(o)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),_("div",ie,[O((b(),x(U,{data:e(t).data,size:"large"},{empty:n(()=>[_("span",null,d(e(t).loading?"":e(o)("emptyData")),1)]),default:n(()=>[a(i,{prop:"campuses_id_name",label:e(o)("campusesId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(i,{prop:"enterprise_name",label:e(o)("enterpriseName"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(i,{prop:"enterprise_abbreviation",label:e(o)("enterpriseAbbreviation"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(i,{prop:"phone",label:e(o)("phone"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(i,{prop:"profession",label:e(o)("profession"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(i,{prop:"website",label:e(o)("website"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(i,{prop:"establishment_time",label:e(o)("establishmentTime"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(i,{label:e(o)("operation"),fixed:"right","min-width":"120"},{default:n(({row:r})=>[a(u,{type:"primary",link:"",onClick:h=>k(r)},{default:n(()=>[f(d(e(o)("edit")),1)]),_:2},1032,["onClick"]),a(u,{type:"primary",link:"",onClick:h=>I(r.id)},{default:n(()=>[f(d(e(o)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[z,e(t).loading]]),_("div",pe,[a(N,{"current-page":e(t).page,"onUpdate:current-page":l[8]||(l[8]=r=>e(t).page=r),"page-size":e(t).limit,"onUpdate:page-size":l[9]||(l[9]=r=>e(t).limit=r),layout:"total, sizes, prev, pager, next, jumper",total:e(t).total,onSizeChange:l[10]||(l[10]=r=>m()),onCurrentChange:m},null,8,["current-page","page-size","total"])])])]),_:1})])}}});const Ue=le(de,[["__scopeId","data-v-0de87307"]]);export{Ue as default};
|
|
|