import{w as u,W as _}from"./index.BKEMpsLA.js";import{a as b,r as g,w as D,c as k,o as v,Q as y,s as T}from"./vue.YrNK8sx4.js";const C=b({__name:"index",props:{modelValue:{type:Number||String}},setup(a){const c=a,r=g();return D(()=>c.modelValue,async l=>{const o=await u().getParentDeptById(l);if(o!=null&&o.nodes){let m="";console.log(o),o.nodes.forEach((n,d)=>{m+=d>0?`/${n.name}`:n.name}),r.value=m}},{immediate:!0}),(l,i)=>(v(),k("div",null,y(r.value),1))}}),$=(a={create_datetime:{form:!1,table:!1,search:!1},update_datetime:{form:!1,table:!1,search:!1},creator_name:{form:!1,table:!1,search:!1},modifier_name:{form:!1,table:!1,search:!1},dept_belong_id:{form:!1,table:!1,search:!1},description:{form:!1,table:!1,search:!1}})=>{var c,r,l,i,o,m,n,d,f,h,p,w;return{dept_belong_id:{title:"所属部门",type:"dict-tree",search:{show:((c=a.dept_belong_id)==null?void 0:c.search)||!1},dict:_({url:"/api/system/dept/all_dept/",isTree:!0,value:"id",label:"name",children:"children"}),column:{align:"center",width:300,show:((r=a.dept_belong_id)==null?void 0:r.table)||!1,component:{name:T(C),vModel:"modelValue"}},form:{show:((l=a.dept_belong_id)==null?void 0:l.form)||!1,component:{multiple:!1,clearable:!0,props:{checkStrictly:!0,props:{label:"name",value:"id"}}},helper:"默认不填则为当前创建用户的部门ID"}},description:{title:"备注",search:{show:((i=a.description)==null?void 0:i.search)||!1},type:"textarea",column:{show:!1,width:100},form:{show:!1,component:{placeholder:"请输入内容",showWordLimit:!0,maxlength:"200"}},viewForm:{show:!1}},modifier_name:{title:"修改人",search:{show:((o=a.modifier_name)==null?void 0:o.search)||!1},column:{width:100,show:((m=a.modifier_name)==null?void 0:m.table)||!1},form:{show:!1},viewForm:{show:!0}},creator_name:{title:"创建人",search:{show:((n=a.creator_name)==null?void 0:n.search)||!1},column:{width:100,show:((d=a.creator_name)==null?void 0:d.table)||!1},form:{show:!1},viewForm:{show:!0}},update_datetime:{title:"更新时间",type:"datetime",search:{show:((f=a.update_datetime)==null?void 0:f.search)||!1,col:{span:8},component:{type:"datetimerange",props:{"start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss","picker-options":{shortcuts:[{text:"最近一周",onClick(t){const s=new Date,e=new Date;e.setTime(e.getTime()-3600*1e3*24*7),t.$emit("pick",[e,s])}},{text:"最近一个月",onClick(t){const s=new Date,e=new Date;e.setTime(e.getTime()-3600*1e3*24*30),t.$emit("pick",[e,s])}},{text:"最近三个月",onClick(t){const s=new Date,e=new Date;e.setTime(e.getTime()-3600*1e3*24*90),t.$emit("pick",[e,s])}}]}}},valueResolve(t){const{key:s,value:e}=t;e&&(t.form.update_datetime_after=e[0],t.form.update_datetime_before=e[1])}},column:{width:160,show:((h=a.update_datetime)==null?void 0:h.table)||!1},form:{show:!1},viewForm:{show:!0}},create_datetime:{title:"创建时间",type:"datetime",search:{show:((p=a.create_datetime)==null?void 0:p.search)||!1,col:{span:8},component:{type:"datetimerange",props:{"start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss","picker-options":{shortcuts:[{text:"最近一周",onClick(t){const s=new Date,e=new Date;e.setTime(e.getTime()-3600*1e3*24*7),t.$emit("pick",[e,s])}},{text:"最近一个月",onClick(t){const s=new Date,e=new Date;e.setTime(e.getTime()-3600*1e3*24*30),t.$emit("pick",[e,s])}},{text:"最近三个月",onClick(t){const s=new Date,e=new Date;e.setTime(e.getTime()-3600*1e3*24*90),t.$emit("pick",[e,s])}}]}}},valueResolve(t){const{key:s,value:e}=t;e&&(t.form.create_datetime_after=e[0],t.form.create_datetime_before=e[1])}},column:{width:160,show:((w=a.create_datetime)==null?void 0:w.table)||!1},form:{show:!1},viewForm:{show:!0}}}};export{$ as c};
