1 |
- import{q as i,m as n}from"./index.Dzkftxcu.js";import{w as d,D as f,H as h,x as p,y as w,a6 as u,I as _}from"./vue.Bi2Y_N79.js";const b=d({__name:"index",props:{modelValue:{type:Number||String}},setup(a){const t=a,s=f();return h(()=>t.modelValue,async e=>{const r=await i().getParentDeptById(e);if(r?.nodes){let o="";console.log(r),r.nodes.forEach((l,c)=>{o+=c>0?`/${l.name}`:l.name}),s.value=o}},{immediate:!0}),(e,m)=>(w(),p("div",null,u(s.value),1))}}),v=(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}})=>({dept_belong_id:{title:"所属部门",type:"dict-tree",search:{show:a.dept_belong_id?.search||!1},dict:n({url:"/api/system/dept/all_dept/",isTree:!0,value:"id",label:"name",children:"children"}),column:{align:"center",width:300,show:a.dept_belong_id?.table||!1,component:{name:_(b),vModel:"modelValue"}},form:{show:a.dept_belong_id?.form||!1,component:{multiple:!1,clearable:!0,props:{checkStrictly:!0,props:{label:"name",value:"id"}}},helper:"默认不填则为当前创建用户的部门ID"}},description:{title:"备注",search:{show:a.description?.search||!1},type:"textarea",column:{width:100,show:a.description?.table||!1},form:{show:a.description?.form||!1,component:{placeholder:"请输入内容",showWordLimit:!0,maxlength:"200"}},viewForm:{show:!0}},modifier_name:{title:"修改人",search:{show:a.modifier_name?.search||!1},column:{width:100,show:a.modifier_name?.table||!1},form:{show:!1},viewForm:{show:!0}},creator_name:{title:"创建人",search:{show:a.creator_name?.search||!1},column:{width:100,show:a.creator_name?.table||!1},form:{show:!1},viewForm:{show:!0}},update_datetime:{title:"更新时间",type:"datetime",search:{show:a.update_datetime?.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:a.update_datetime?.table||!1},form:{show:!1},viewForm:{show:!0}},create_datetime:{title:"创建时间",type:"datetime",search:{show:a.create_datetime?.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:a.create_datetime?.table||!1},form:{show:!1},viewForm:{show:!0}}});export{v as c};
|