import{D as S,_ as E,r,c as u,x as P,o as x,d as q,e,f as t,k as m,y as C,z as I,A as L,n as Q,q as R}from"./index-CCGWKeq6.js";function A(p){return S({url:"/industry/l",method:"get",params:p})}function F(p){return S({url:p.id?"/industry/u":"/industry/c",method:"post",data:p})}const j={class:"app-container"},G={class:"dialog-footer"},H={__name:"index",setup(p){const{proxy:b}=R(),V=r([]),v=r(!1),g=r(0),o=r({pageNum:1,pageSize:10}),d=r(!1),i=r({name:""});function c(){const n={...o.value};n.time&&n.time.length==2&&(n.startTime=n.time[0]+" 00:00:00",n.endTime=n.time[1]+" 23:59:59"),delete n.time,v.value=!0,A(n).then(l=>{V.value=l.data.list,g.value=l.data.total,v.value=!1})}function h(){if(!i.value.name)return b.$modal.msgError("请输入行业名称");F(i.value).then(n=>{b.$modal.msgSuccess("操作成功"),d.value=!1,c()})}function k(){o.value.pageNum=1,o.value.pageSize=10,c()}function N(){o.value={pageNum:1,pageSize:10},k()}return c(),(n,l)=>{const y=u("el-input"),_=u("el-form-item"),s=u("el-button"),w=u("el-form"),z=u("el-col"),U=u("el-row"),f=u("el-table-column"),$=u("el-table"),B=u("pagination"),T=u("el-dialog"),D=P("loading");return x(),q("div",j,[e(w,{model:o.value,ref:"queryRef",inline:!0},{default:t(()=>[e(_,{label:"行业名称"},{default:t(()=>[e(y,{placeholder:"请输入",modelValue:o.value.name,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value.name=a)},null,8,["modelValue"])]),_:1}),e(_,null,{default:t(()=>[e(s,{type:"primary",icon:"Search",onClick:k},{default:t(()=>[m("搜索")]),_:1}),e(s,{icon:"Refresh",onClick:N},{default:t(()=>[m("重置")]),_:1})]),_:1})]),_:1},8,["model"]),e(U,{gutter:10,class:"mb8"},{default:t(()=>[e(z,{span:1.5},{default:t(()=>[e(s,{type:"primary",plain:"",onClick:l[1]||(l[1]=a=>{d.value=!0,i.value={name:""}}),icon:"Plus"},{default:t(()=>[m("新增")]),_:1})]),_:1})]),_:1}),C((x(),I($,{data:V.value,"show-overflow-tooltip":"",style:{width:"100%"}},{default:t(()=>[e(f,{label:"行业名称",prop:"name"}),e(f,{label:"阿里岗位类型编号",prop:"code"}),e(f,{label:"创建时间",prop:"createTime",align:"center",width:"160"}),e(f,{label:"操作",width:"120",align:"center","class-name":"small-padding fixed-width"},{default:t(({row:a})=>[e(s,{link:"",type:"primary",icon:"Edit",onClick:J=>{d.value=!0,i.value={name:a.name,id:a.id}}},{default:t(()=>[m("编辑")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[D,v.value]]),C(e(B,{total:g.value,page:o.value.pageNum,"onUpdate:page":l[2]||(l[2]=a=>o.value.pageNum=a),limit:o.value.pageSize,"onUpdate:limit":l[3]||(l[3]=a=>o.value.pageSize=a),onPagination:c},null,8,["total","page","limit"]),[[L,g.value>0]]),e(T,{title:"新增行业",modelValue:d.value,"onUpdate:modelValue":l[7]||(l[7]=a=>d.value=a),width:"450px","append-to-body":""},{footer:t(()=>[Q("div",G,[e(s,{type:"primary",onClick:h},{default:t(()=>[m("提 交")]),_:1}),e(s,{onClick:l[6]||(l[6]=a=>d.value=!1)},{default:t(()=>[m("取 消")]),_:1})])]),default:t(()=>[e(w,{"label-width":"140px"},{default:t(()=>[e(_,{label:"行业名称",prop:"name"},{default:t(()=>[e(y,{modelValue:i.value.name,"onUpdate:modelValue":l[4]||(l[4]=a=>i.value.name=a),placeholder:"请输入"},null,8,["modelValue"])]),_:1}),e(_,{label:"阿里岗位类型编号",prop:"code"},{default:t(()=>[e(y,{modelValue:i.value.code,"onUpdate:modelValue":l[5]||(l[5]=a=>i.value.code=a),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},M=E(H,[["__scopeId","data-v-0ec6cc74"]]);export{M as default};
