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.7 KiB
1 lines
5.7 KiB
import{d as ae,r as _,ag as B,ar as F,X as oe,aY as ne,o as i,b as R,g as le,a,w as n,f as l,ah as se,F as ie,e as re,c as r,j as d,a7 as f,t as ce,N as C,s as x,D as N,O as de,E,ai as ue,aj as pe,aP as _e,aQ as me,G as fe,aT as ge,aJ as he,$ as we,aU as ye,ao as ve,aM as be}from"./index-b0696d90.js";/* empty css */import{_ as ke}from"./delete-a6250ce4.js";import{_ as Oe}from"./edit-b02c4768.js";/* empty css *//* empty css */import{_ as xe}from"./plus-15786e11.js";import{_ as Ee}from"./refresh-2973caed.js";import{_ as Ve}from"./search-b60582af.js";import{g as Ie,b as Se,e as $}from"./index-78cafc02.js";import{_ as ze}from"./addorgcont.vue_vue_type_script_setup_true_lang-7d25149c.js";import{_ as Te}from"./editorgcont.vue_vue_type_script_setup_true_lang-4375b451.js";/* empty css *//* empty css *//* empty css */const Be={class:"app-container"},Fe={class:"search"},Xe=ae({__name:"index",setup(Re){const V=_(B),O=_(!1),w=_(!1),y=_(!1),u=F({}),I=_(),v=_(),o=F({}),D=_();function p(){O.value=!0,Ie(u).then(({data:e})=>{I.value=e}).finally(()=>{O.value=!1})}const U=()=>{p()},L=()=>{V.value.resetFields(),p()};function M(){Se().then(({data:e})=>{v.value=e})}function S(e){w.value=!0,e?(o.name=e.name,o.organizationtype=e.id):(o.name="",o.organizationtype=0)}function P(e){o.id=e.id,o.number=e.number,o.name=e.name,o.superior=e.superior,o.organizationtype=e.organizationtype,o.abbreviation=e.abbreviation,o.time=e.time,o.state=e.state,o.wechatorganizationid=e.wechatorganizationid,o.superiorsun=e.superiorsun,o.schoole=e.schoole,o.kingdeeid=e.kingdeeid,o.ispower=e.ispower,o.sort=e.sort,o.typeName=e.typeName,o.level=e.level,o.status=e.status,y.value=!0}function K(e){de.confirm("确认删除<"+e.name+">数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{$({id:e.id,istrue:2,status:3}).then(()=>{E.success("删除成功"),p()})}).catch(()=>E.info("已取消删除"))}function Q(e){D.value=e.id}function j(e,s){let b=1;s||(b=2),$({id:e,istrue:2,status:b}).then(({data:k})=>{E.success("编辑成功"),p()})}return oe(()=>{M(),p()}),(e,s)=>{const b=ue,k=pe,A=_e,G=me,H=Ve,m=fe,J=Ee,X=B,z=xe,c=ge,T=he,Y=we,q=Oe,W=ke,Z=ye,ee=ve,g=ne("hasPerm"),te=be;return i(),R("div",Be,[le("div",Fe,[a(X,{ref_key:"searchOrgFormRef",ref:V,model:l(u),inline:!0},{default:n(()=>[a(k,{label:"关键字",prop:"keywords"},{default:n(()=>[a(b,{modelValue:l(u).keywords,"onUpdate:modelValue":s[0]||(s[0]=t=>l(u).keywords=t),placeholder:"行政组织名称/编号",clearable:"",onKeyup:se(l(u),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),a(k,{label:"行政组织类别",prop:"class"},{default:n(()=>[a(G,{modelValue:l(u).class,"onUpdate:modelValue":s[1]||(s[1]=t=>l(u).class=t),clearable:"",placeholder:"请选择行政组织类别"},{default:n(()=>[(i(!0),R(ie,null,re(l(v),t=>(i(),r(A,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(k,null,{default:n(()=>[a(m,{type:"primary",onClick:U},{icon:n(()=>[a(H)]),default:n(()=>[d(" 搜索 ")]),_:1}),a(m,{onClick:L},{icon:n(()=>[a(J)]),default:n(()=>[d(" 重置 ")]),_:1})]),_:1})]),_:1},8,["model"])]),a(ee,{shadow:"never"},{header:n(()=>[f((i(),r(m,{type:"success",onClick:s[2]||(s[2]=t=>S({}))},{icon:n(()=>[a(z)]),default:n(()=>[d(" 新增 ")]),_:1})),[[g,["125601218356588544"]]])]),default:n(()=>[f((i(),r(Z,{data:l(I),"highlight-current-row":"","tree-props":{children:"child",hasChildren:"haschild"},"row-key":"id",border:"",onRowClick:Q},{default:n(()=>[a(c,{fixed:"",label:"编号",prop:"number",width:"100",align:"center"}),a(c,{fixed:"",label:"行政组织名称",prop:"name"}),a(c,{label:"行政组织简称",prop:"abbreviation",width:"140"}),a(c,{label:"组织类型",prop:"typeName",width:"100",align:"center"}),a(c,{label:"微信对照码",width:"100",align:"center"},{default:n(t=>[t.row.wechatorganizationid!=0?(i(),r(T,{key:0,class:"mx-1",type:"success"},{default:n(()=>[d(ce(t.row.wechatorganizationid),1)]),_:2},1024)):C("",!0),t.row.wechatorganizationid==0?(i(),r(T,{key:1,class:"mx-1",type:"danger"},{default:n(()=>[d("无")]),_:1})):C("",!0)]),_:1}),a(c,{label:"金蝶HR对照码",prop:"kingdeeid",width:"200"}),f((i(),r(c,{label:"状态",prop:"state",width:"100",align:"center"},{default:n(t=>[a(Y,{modelValue:t.row.status,"onUpdate:modelValue":h=>t.row.status=h,class:"ml-2","inline-prompt":"",style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"},"active-text":"启用","inactive-text":"禁用",onChange:h=>j(t.row.id,t.row.status)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1})),[[g,["125601349537640448"]]]),a(c,{fixed:"right",align:"center",label:"操作",width:"220"},{default:n(t=>[f((i(),r(m,{type:"primary",link:"",size:"small",onClick:x(h=>S(t.row),["stop"])},{default:n(()=>[a(z),d("新增 ")]),_:2},1032,["onClick"])),[[g,["125601218356588544"]]]),f((i(),r(m,{type:"primary",link:"",size:"small",onClick:x(h=>P(t.row),["stop"])},{default:n(()=>[a(q),d("编辑 ")]),_:2},1032,["onClick"])),[[g,["125601298207748096"]]]),f((i(),r(m,{type:"primary",link:"",size:"small",onClick:x(h=>K(t.row),["stop"])},{default:n(()=>[a(W),d(" 删除 ")]),_:2},1032,["onClick"])),[[g,["125601398141235200"]]])]),_:1})]),_:1},8,["data"])),[[te,l(O)]])]),_:1}),a(ze,{addOrgIsShow:l(w),"onUpdate:addOrgIsShow":s[3]||(s[3]=t=>N(w)?w.value=t:null),addorginfocont:l(o),orgclasslistary:l(v),onRefreshorgtree:p},null,8,["addOrgIsShow","addorginfocont","orgclasslistary"]),a(Te,{editOrgIsShow:l(y),"onUpdate:editOrgIsShow":s[4]||(s[4]=t=>N(y)?y.value=t:null),editorginfocont:l(o),orgclasslistary:l(v),onRefreshorgtree:p},null,8,["editOrgIsShow","editorginfocont","orgclasslistary"])])}}});export{Xe as default};
|
|
|