12 |
- "use strict";(self["webpackChunkbaozhidao_putoutstorage"]=self["webpackChunkbaozhidao_putoutstorage"]||[]).push([[401],{4257:function(e,t,a){a.d(t,{Z:function(){return _}});var n=a(6252),l=a(3577);const s={class:"mark-green1"},r=(0,n._)("div",{class:"mark-green2"},[(0,n._)("div",{class:"mark-green3"})],-1),i=[r];function o(e,t){return(0,n.wg)(),(0,n.iD)("div",s,i)}var d=a(3744);const c={},p=(0,d.Z)(c,[["render",o]]);var u=p;const m={class:"bg"},f={class:"bg-tit"},g={style:{display:"flex","align-items":"center",flex:"1","flex-shrink":"0","min-width":"200px"}};var w=(0,n.aZ)({__name:"bg",props:{istitle:{type:String,default:()=>""}},setup(e){const t=e;return(e,a)=>{const s=(0,n.up)("el-text");return(0,n.wg)(),(0,n.iD)("div",m,[(0,n._)("div",f,[(0,n._)("div",g,[(0,n.Wm)(u),(0,n.Wm)(s,{style:{"margin-left":"20px"},tag:"b"},{default:(0,n.w5)((()=>[(0,n.WI)(e.$slots,"tit",{},(()=>[(0,n.Uk)((0,l.zw)(t.istitle),1)]))])),_:3})]),(0,n.WI)(e.$slots,"btn")]),(0,n.WI)(e.$slots,"bg")])}}});const y=w;var _=y},1271:function(e,t,a){a.d(t,{Z:function(){return p}});var n=a(6252),l=a(3577),s=a(2262);const r={class:"searchAdd"},i={class:"searchAdd-left"},o={class:"searchAdd-right"};var d=(0,n.aZ)({__name:"searchAdd",props:{isButtom:{type:String,default:()=>""},labelWidth:{type:String,default:()=>"100"},inline:{type:Boolean,default:()=>!0}},emits:["event"],setup(e,{emit:t}){const a=e,d=(0,s.qj)({input:""}),c=t,p=()=>{c("event",d.input)};return(e,t)=>{const s=(0,n.up)("el-button"),d=(0,n.up)("el-form-item"),c=(0,n.up)("el-form");return(0,n.wg)(),(0,n.iD)("div",r,[(0,n._)("div",i,[(0,n.Wm)(c,{inline:a.inline},{default:(0,n.w5)((()=>[(0,n.WI)(e.$slots,"searchConter"),(0,n.Wm)(d,null,{default:(0,n.w5)((()=>[(0,n.Wm)(s,{type:"primary",onClick:p},{default:(0,n.w5)((()=>[(0,n.Uk)((0,l.zw)(a.isButtom),1)])),_:1})])),_:1})])),_:3},8,["inline"])]),(0,n._)("div",o,[(0,n.WI)(e.$slots,"searchBtn")])])}}});const c=d;var p=c},1401:function(e,t,a){a.r(t),a.d(t,{default:function(){return b}});var n=a(6252),l=a(3577),s=a(9963),r=a(2262),i=a(4257),o=a(9996),d=a(844),c=a(1348),p=a(1271),u=a(2531),m=a(1809),f=a(3907);const g={class:"company"},w={class:"custom-tree-node"},y=(0,n._)("span",null,null,-1),_={style:{"padding-right":"20px",display:"flex","align-items":"center"}};var h=(0,n.aZ)({__name:"index",setup(e){const t=(0,f.oR)(),a=(0,r.qj)({search:"",params:{deptName:"",parentId:0},dataTree:[]}),h={children:"children",label:"deptName"},v=async()=>{const e=await(0,u.P4)({deptName:a.search});200==e.code&&(a.dataTree=e.data)};v();const b=async()=>{const e=await(0,u.eY)({});200==e.code&&t.commit("setIsUserInfo",e?.data)};(0,n.bv)((()=>{b()}));const k=async()=>{a.params.deptName?(a.params.parentId=0,W()):(0,o.bM)({title:"格式错误",message:"哎呀,目录名称输入好像不正确哦",type:"error"})},W=async()=>{const e=await(0,u.uQ)(a.params);200==e.code&&"创建成功"==e.msg&&(0,u.k$)({deptId:e.data}),v()},x=(e,t)=>{d.T.prompt("请输入目录名称","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"目录不允许为空",draggable:!0}).then((({value:e})=>{a.params.parentId=t.id,a.params.deptName=e,W()})).catch((()=>{c.z8.info("取消新增目录")}))},C=(e,t)=>{d.T.prompt("请输入目录名称","提示",{draggable:!0,confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"目录不允许为空",inputValue:t.deptName?t.deptName:""}).then((async({value:e})=>{const a={id:t.id,deptName:e},n=await(0,u.Hp)(a);console.log("编辑成功",n),200==n.code&&"更新成功"==n.msg&&v()})).catch((()=>{c.z8.info("取消编辑目录")}))},I=(e,t)=>{d.T.confirm("删除目录操作,是否继续执行删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",draggable:!0,type:"warning",center:!0}).then((async()=>{const e=await(0,u.CO)({id:t.id});200==e.code&&"删除成功"==e.msg&&v()})).catch((()=>{c.z8.info("取消删除")}))};return(e,o)=>{const d=(0,n.up)("el-input"),c=(0,n.up)("el-form-item"),u=(0,n.up)("el-button"),f=(0,n.up)("el-form"),b=(0,n.up)("FolderOpened"),W=(0,n.up)("el-icon"),U=(0,n.up)("el-tree");return(0,n.wg)(),(0,n.iD)("div",g,[(0,n.Wm)(p.Z,{isButtom:"查询",onEvent:v},{searchConter:(0,n.w5)((()=>[(0,n.Wm)(c,{label:"公司名称"},{default:(0,n.w5)((()=>[(0,n.Wm)(d,{modelValue:a.search,"onUpdate:modelValue":o[0]||(o[0]=e=>a.search=e),placeholder:"请输入公司名称",clearable:"",style:{width:"200px"}},null,8,["modelValue"])])),_:1})])),_:1}),(0,n.Wm)(i.Z,{istitle:"公司列表"},(0,n.Nv)({bg:(0,n.w5)((()=>[(0,n.Wm)(U,{data:a.dataTree,props:h},{default:(0,n.w5)((({node:e,data:t})=>[(0,n._)("span",w,[(0,n._)("span",null,[(0,n.Wm)(W,{style:{margin:"0 6px 0 2px"},size:"16"},{default:(0,n.w5)((()=>[(0,n.Wm)(b)])),_:1}),(0,n.Uk)(" "+(0,l.zw)(e.label),1)]),y,(0,n._)("div",_,[(0,n.Wm)(u,{onClick:(0,s.iM)((a=>x(e,t)),["stop"]),type:"primary"},{default:(0,n.w5)((()=>[(0,n.Uk)("新增子级")])),_:2},1032,["onClick"]),(0,n.Wm)(u,{onClick:(0,s.iM)((a=>C(e,t)),["stop"]),style:{"margin-left":"20px"},type:"success"},{default:(0,n.w5)((()=>[(0,n.Uk)("编辑")])),_:2},1032,["onClick"]),(0,n.Wm)(u,{onClick:(0,s.iM)((e=>(0,r.SU)(m.X)(t)),["stop"]),style:{"margin-left":"20px"},type:"warning"},{default:(0,n.w5)((()=>[(0,n.Uk)("进入")])),_:2},1032,["onClick"]),(0,n.Wm)(u,{onClick:(0,s.iM)((a=>I(e,t)),["stop"]),style:{"margin-left":"20px"},type:"danger"},{default:(0,n.w5)((()=>[(0,n.Uk)("删除")])),_:2},1032,["onClick"])])])])),_:1},8,["data"])])),_:2},[(0,r.SU)(t).state.isuserInfo&&0==(0,r.SU)(t).state.isuserInfo.deptId?{name:"btn",fn:(0,n.w5)((()=>[(0,n.Wm)(f,{inline:!0,class:"demo-form-inline"},{default:(0,n.w5)((()=>[(0,n.Wm)(c,{label:"添加一级目录",style:{"margin-bottom":"0"}},{default:(0,n.w5)((()=>[(0,n.Wm)(d,{modelValue:a.params.deptName,"onUpdate:modelValue":o[1]||(o[1]=e=>a.params.deptName=e),placeholder:"请输入添加一级目录",clearable:"",style:{width:"150px"}},null,8,["modelValue"])])),_:1}),(0,n.Wm)(c,{style:{"margin-right":"20px","margin-bottom":"0"}},{default:(0,n.w5)((()=>[(0,n.Wm)(u,{type:"primary",onClick:k},{default:(0,n.w5)((()=>[(0,n.Uk)("添加")])),_:1})])),_:1})])),_:1})])),key:"0"}:void 0]),1024)])}}});const v=h;var b=v}}]);
- //# sourceMappingURL=401.a34dc089.js.map
|