gameapi-client/dist-API/assets/index.m-wxJLEY.js

2 lines
7.4 KiB
JavaScript
Raw Permalink Normal View History

2025-08-14 10:33:48 +08:00
import{T as w,r as _,C as _e,J as ge,k as n,G as L,o as d,c as R,H as g,I as z,f as l,d as e,e as o,l as Q,K as j,L as A,m as v,q as p,D as G,n as H,t as J,B as ve,h as be}from"./index.R3qQMktZ.js";function ye(i){return w({url:"/system/post/list",method:"get",params:i})}function he(i){return w({url:"/system/post/"+i,method:"get"})}function Ve(i){return w({url:"/system/post",method:"post",data:i})}function Ce(i){return w({url:"/system/post",method:"put",data:i})}function we(i){return w({url:"/system/post/"+i,method:"delete"})}const ke={class:"app-container"},Se={class:"dialog-footer"},Ne=ve({name:"Post"}),Ue=Object.assign(Ne,{setup(i){const{proxy:c}=be(),{sys_normal_disable:x}=c.useDict("sys_normal_disable"),$=_([]),b=_(!1),U=_(!0),k=_(!0),P=_([]),T=_(!0),B=_(!0),D=_(0),I=_(""),O=_e({form:{},queryParams:{pageNum:1,pageSize:10,postCode:void 0,postName:void 0,status:void 0},rules:{postName:[{required:!0,message:"岗位名称不能为空",trigger:"blur"}],postCode:[{required:!0,message:"岗位编码不能为空",trigger:"blur"}],postSort:[{required:!0,message:"岗位顺序不能为空",trigger:"blur"}]}}),{queryParams:u,form:s,rules:M}=ge(O);function h(){U.value=!0,ye(u.value).then(r=>{$.value=r.rows,D.value=r.total,U.value=!1})}function W(){b.value=!1,q()}function q(){s.value={postId:void 0,postCode:void 0,postName:void 0,postSort:0,status:"0",remark:void 0},c.resetForm("postRef")}function S(){u.value.pageNum=1,h()}function X(){c.resetForm("queryRef"),S()}function Y(r){P.value=r.map(a=>a.postId),T.value=r.length!=1,B.value=!r.length}function Z(){q(),b.value=!0,I.value="添加岗位"}function E(r){q();const a=r.postId||P.value;he(a).then(V=>{s.value=V.data,b.value=!0,I.value="修改岗位"})}function ee(){c.$refs.postRef.validate(r=>{r&&(s.value.postId!=null?Ce(s.value).then(a=>{c.$modal.msgSuccess("修改成功"),b.value=!1,h()}):Ve(s.value).then(a=>{c.$modal.msgSuccess("新增成功"),b.value=!1,h()}))})}function F(r){const a=r.postId||P.value;c.$modal.confirm('是否确认删除岗位编号为"'+a+'"的数据项?').then(function(){return we(a)}).then(()=>{h(),c.$modal.msgSuccess("删除成功")}).catch(()=>{})}function te(){c.download("system/post/export",{...u.value},`post_${new Date().getTime()}.xlsx`)}return h(),(r,a)=>{const V=n("el-input"),f=n("el-form-item"),le=n("el-option"),oe=n("el-select"),m=n("el-button"),K=n("el-form"),N=n("el-col"),ae=n("right-toolbar"),ne=n("el-row"),y=n("el-table-column"),se=n("dict-tag"),ue=n("el-table"),re=n("pagination"),de=n("el-input-number"),pe=n("el-radio"),ie=n("el-radio-group"),me=n("el-dialog"),C=L("hasPermi"),ce=L("loading");return d(),R("div",ke,[g(e(K,{model:l(u),ref:"queryRef",inline:!0},{default:o(()=>[e(f,{label:"岗位编码",prop:"postCode"},{default:o(()=>[e(V,{modelValue:l(u).postCode,"onUpdate:modelValue":a[0]||(a[0]=t=>l(u).postCode=t),placeholder:"请输入岗位编码",clearable:"",style:{width:"200px"},onKeyup:Q(S,["enter"])},null,8,["modelValue"])]),_:1}),e(f,{label:"岗位名称",prop:"postName"},{default:o(()=>[e(V,{modelValue:l(u).postName,"onUpdate:modelValue":a[1]||(a[1]=t=>l(u).postName=t),placeholder:"请输入岗位名称",clearable:"",style:{width:"200px"},onKeyup:Q(S,["enter"])},null,8,["modelValue"])]),_:1}),e(f,{label:"状态",prop:"status"},{default:o(()=>[e(oe,{modelValue:l(u).status,"onUpdate:modelValue":a[2]||(a[2]=t=>l(u).status=t),placeholder:"岗位状态",clearable:"",style:{width:"200px"}},{default:o(()=>[(d(!0),R(j,null,A(l(x),t=>(d(),v(le,{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(f,null,{default:o(()=>[e(m,{type:"primary",icon:"Search",onClick:S},{default:o(()=>[p("搜索")]),_:1}),e(m,{icon:"Refresh",onClick:X},{default:o(()=>[p("重置")]),_:1})]),_:1})]),_:1},8,["model"]),[[z,l(k)]]),e(ne,{gutter:10,class:"mb8"},{default:o(()=>[e(N,{span:1.5},{default:o(()=>[g((d(),v(m,{type:"primary",plain:"",icon:"Plus",onClick:Z},{default:o(()=>[p("新增")]),_:1})),[[C,["system:post:add"]]])]),_:1}),e(N,{span:1.5},{default:o(()=>[g((d(),v(m,{type:"success",plain:"",icon:"Edit",disa