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.
2 lines
7.2 KiB
2 lines
7.2 KiB
|
4 months ago
|
import{d as Ve,r as s,ao as M,ax as U,G as Ce,cx as Te,a as m,f as xe,e,b as l,h as a,as as Ie,H as i,q as X,Y as v,c as _,j,I as y,$ as Se,cC as Ee,di as Fe,dj as J,dk as Ue,a7 as W,ae as Oe,dl as De,aj as Le,an as Be,ab as Pe,b3 as Re,M as $e,b4 as ze,aA as Me,ac as je,bI as Ae,aY as Ne,at as Ke,p as Ye,m as qe,_ as Ge}from"./index-e450010e.js";import{_ as He}from"./index-c5018719.js";import{_ as Qe}from"./plus-f2947ec6.js";import{_ as Je}from"./refresh-f1723430.js";import{_ as We}from"./search-71444aff.js";import{_ as Xe}from"./batchImportTimePeople.vue_vue_type_script_setup_true_lang-d42919a7.js";const Ze=T=>(Ye("data-v-53a5b3bb"),T=T(),qe(),T),el={class:"app-container"},ll={style:{"margin-bottom":"15px",height:"32px",display:"flex"}},tl=Ze(()=>X("i",{class:"fa fa-upload"},null,-1)),ol=Ve({__name:"index",setup(T){const Z="/systemapi/rongxin/downLoadTearms",A=s(M),x=s(M),u=U({page:1,pagesize:20,name:""}),O=s(!1),I=s(0),D=s([]),ee=s(0),N=s([]),b=s(!1),f=()=>{O.value=!0,Ee(u).then(n=>{I.value=n.data.total,D.value=n.data.list}).finally(()=>{O.value=!1})},K=s([]),le=()=>{Fe({id:309,all:1}).then(n=>{K.value=n.data})};Ce(()=>{f(),le()});const Y=()=>{u.page=1,f()};function te(){A.value.resetFields(),f()}const oe=(n,t)=>{console.log("改变状态---",n,t),t==1?t=2:t=1;let g={id:n,idstr:n.toString(),state:t,istrue:2};J(g).then(r=>{console.log("改变状态结果--》,",r),f()})},ae=n=>{ee.value=n.length,N.value=n.map(t=>t.id)},w=s(!1),k=U({name:""}),ne=()=>{w.value=!0},q=()=>{w.value=!1,x.value.resetFields(),f()},se=()=>{k.name="",x.value.resetFields()},de=()=>{Ue(k).then(n=>{q()})},ie=n=>{if(![n||N.value].join(",")){W.warning("请勾选删除项");return}Oe.confirm("确认删除已选中的数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let g={id:n,idstr:n.toString(),state:3,istrue:2};J(g).then(r=>{f()})}).catch(()=>W.info("已取消删除"))},V=s(!1),p=U({id:"",name:""}),re=n=>{p.id=n.id.toString(),p.name=n.name,V.value=!0},L=s(null),G=()=>{V.value=!1,L.value.resetFields(),f()},ue=()=>{p.id="",p.name="",L.value.resetFields()},me=()=>{De(p).then(n=>{G()})},c=s(!1),B=s(""),P=s(""),pe=n=>{B.value=n.id.toString(),P.value=n.name,c.value=!0},H=()=>{B.value="",P.value="",c.value=!1},S=U({orgId:""}),ce=()=>{b.value=!0},Q=()=>{b.value=!1},_e={label:"name",children:"child"};return(n,t)=>{const g=Le,r=Be,R=We,d=Pe,$=Je,E=M,fe=Qe,z=Re,ge=$e,ve=ze,he=He,ye=Me,F=je,be=Ae,we=Ne,h=Te("hasPerm"),ke=Ke;return m(),xe("div",el,[e(ye,{shadow:"never"},{header:l(()=>[e(E,{ref_key:"searchFormRef",ref:A,model:a(u),inline:!0},{default:l(()=>[e(r,{label:"班组名称",prop:"keywords"},{default:l(()=>[e(g,{modelValue:a(u).name,"onUpdate:modelValue":t[0]||(t[0]=o=>a(u).name=o),placeholder:"请输入关键字",clearable:"",onKeyup:Ie(Y,["enter"])},null,8,["modelValue"])]),_:1}),e(r,null,{default:l(()=>[e(d,{type:"primary",onClick:Y},{icon:l(()=>[e(R)]),default:l(()=>[i(" 搜索 ")]),_:1}),e(d,{onClick:te},{icon:l(()=>[e($)]),default:l(()=>[i(" 重置 ")]),_:1})]),_:1})]),_:1},8,["model"])]),default:l(()=>[X("div",ll,[v((m(),_(d,{type:"primary",onClick:t[1]||(t[1]=o=>ne())},{default:l(()=>[e(fe),i(" 新增 ")]),_:1})),[[h,["339372544081539072"]]]),v((m(),_(d,{plain:"",type:"primary",disabled:a(D).length===0,onClick:t[2]||(t[2]=o=>ce())},{default:l(()=>[tl,i("导出人员 ")]),_:1},8,["disabled"])),[[h,["339372760021086208"]]])]),v((m(),_(ve,{"highlight-current-row":"",data:a(D),stripe:"",onSelectionChange:ae,"header-cell-style":{background:"#F4F5F9"}},{default:l(()=>[e(z,{label:"班组名称",prop:"name"}),v((m(),_(z,{label:"状态",prop:"state",width:"100",align:"center"},{default:l(o=>[e(ge,{modelValue:o.row.status,"onUpdate:modelValue":C=>o.row.status=C,class:"ml-2","inline-prompt":"",style:{"--el-switch-on-color":"#1e5eff"},onChange:C=>oe(o.row.id,o.row.state)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1})),[[h,["339372659932409856"]]]),e(z,{fixed:"right",label:"操作",align:"center",width:"250"},{default:l(o=>[v((m(),_(d,{type:"primary",link:"",size:"small",onClick:j(C=>pe(o.ro
|