const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RoleDrawer.Dc7uvm8a.js","assets/index.CWsdHise.js","assets/vue.D1BjjNmv.js","assets/index.BrBLyUM_.css","assets/splitpanes.DuIxzowM.js","assets/splitpanes.C2zCCjIY.css","assets/api.Cqv5xqTb.js","assets/RoleUsersStores.BrCt7dHf.js","assets/_plugin-vue_export-helper.DlAUqK2U.js","assets/RoleDrawer.B5S87lfr.css","assets/BatchTagsDialog.CNThQxxE.js","assets/api.DubYhiX5.js","assets/crud.GfbU8OUS.js","assets/authFunction.2PhVp3FH.js","assets/BatchTagsDialog.DTzxFghR.css","assets/BatchCategoryDialog.DusMxF3q.js","assets/BatchCompetencyTagsDialog.DLK8AFsD.js","assets/BatchCompetencyTagsDialog.BMjIQFET.css"])))=>i.map(i=>d[i]); import{k as G,_ as m,s as U}from"./index.CWsdHise.js";import{createCrudOptions as W}from"./crud.GfbU8OUS.js";import{R as F}from"./api.Cqv5xqTb.js";import{R as j}from"./RoleMenuBtnStores.DfUoOZZZ.js";import{R as H}from"./RoleMenuFieldStores.D-gdfxnU.js";import{R as J}from"./RoleUsersStores.BrCt7dHf.js";import K from"./treeList.DeB1d_th.js";import{G as Q,a as z,b as X}from"./api.0y_CnWgp.js";import{a as v,r as _,q as Y,aj as f,J as C,o as h,K as p,S as r,b as y,H as Z,u as i,c as ee,Q as oe,aA as g}from"./vue.D1BjjNmv.js";import{_ as te}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./api.DubYhiX5.js";import"./authFunction.2PhVp3FH.js";const se={class:"document-box document-left-box"},ae={class:"document-box document-right-box"},ne={key:1},re=v({name:"role"}),ce=v({...re,setup(le){const E=g(()=>m(()=>import("./RoleDrawer.Dc7uvm8a.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),b=g(()=>m(()=>import("./BatchTagsDialog.CNThQxxE.js"),__vite__mapDeps([10,11,1,2,3,12,13,8,14]))),k=g(()=>m(()=>import("./BatchCategoryDialog.DusMxF3q.js"),__vite__mapDeps([15,11,1,2,3,12,13]))),w=g(()=>m(()=>import("./BatchCompetencyTagsDialog.DLK8AFsD.js"),__vite__mapDeps([16,1,2,3,11,8,17]))),D=_(),R=_(),x=_(),B=F(),L=j(),I=H(),q=J(),N=_();_([]);const T=_([]),{crudBinding:P,crudRef:S,crudExpose:d}=G({createCrudOptions:W,context:{RoleDrawer:B,RoleMenuBtn:L,RoleMenuField:I,$message:{warning:e=>U(e)},openBatchTagsDialog:e=>{D.value.open(e)},openBatchCategoryDialog:e=>{R.value.open(e)},openBatchCompetencyTagsDialog:e=>{x.value.open(e)},selectedRows:[]}}),A=_(1),M=e=>{var o,l;console.log("record",e);const a=((o=e==null?void 0:e.currentNode)==null?void 0:o.id)||"",t=a.replace(/^(open_|prof_|category_|tag_)/,"");A.value=!isNaN(Number(t))&&t!==null?t:1;let n;const s=(l=e==null?void 0:e.firstLevel)==null?void 0:l.id,c=a.startsWith("open_")?"open":a.startsWith("prof_")?"professional":a.startsWith("category_")?"category":a.startsWith("tag_")?"tag":s;c==="open"||s==="root"?n="0":s==="psychology_questions"?n="4":s==="common_questions"?n="1":(c==="professional"||s==="professional_questions")&&(n="1,2,3,4,6");const u={form:{limit:20,question_form:n,...c==="category"?{category:t}:{},...c==="tag"?{tag:t}:{}}};d.doSearch(u)},V=e=>{console.log("node",e)},O=e=>{console.log("node",e)},$=()=>{Q({}).then(e=>{console.log("ret",e);const a=e.data;z({}).then(t=>{console.log("res",t);const n=t.data.items;X({}).then(s=>{console.log("res",s);const c=s.data.items,u=[{id:"root",title:"职位开放题",children:a.map(o=>({...o,id:`open_${o.id}`,title:o.name||o.title,question_type:"open",chinese_explanation:o.chinese_explanation||""}))},{id:"professional_questions",title:"专业考察题库",children:a.map(o=>({...o,id:`prof_${o.id}`,title:o.name||o.title,question_type:"professional",chinese_explanation:o.chinese_explanation||""}))},...n.map(o=>({id:`category_${o.id}`,title:o.name,children:c.filter(l=>l.category_id===o.id).map(l=>({id:`tag_${l.id}`,title:l.name,chinese_explanation:l.chinese_explanation||""}))}))];T.value=u})})})};return Y(async()=>{$(),d.doRefresh(),q.get_all_users()}),(e,a)=>{const t=f("el-col"),n=f("el-tooltip"),s=f("fs-crud"),c=f("el-row"),u=f("fs-page");return h(),C(u,null,{default:p(()=>[r(c,{class:"document-el-row"},{default:p(()=>[r(t,{span:3},{default:p(()=>[y("div",se,[r(K,{ref_key:"treeListRef",ref:N,treeData:T.value,onTreeClick:M,onUpdateDocument:V,onDeleteDocument:O},null,8,["treeData"])])]),_:1}),r(t,{span:21},{default:p(()=>[y("div",ae,[r(s,Z({ref_key:"crudRef",ref:S,"dialog-width":800},i(P)),{"cell-chinese_explanation":p(o=>[o.row.chinese_explanation?(h(),C(n,{key:0,content:o.row.chinese_explanation,placement:"top","hide-after":2e3},{default:p(()=>[y("span",null,oe(o.row.chinese_explanation),1)]),_:2},1032,["content"])):(h(),ee("span",ne,"-"))]),_:1},16)])]),_:1})]),_:1}),r(i(E)),r(i(b),{ref_key:"batchTagsDialogRef",ref:D,crudExpose:i(d)},null,8,["crudExpose"]),r(i(k),{ref_key:"batchCategoryDialogRef",ref:R,crudExpose:i(d)},null,8,["crudExpose"]),r(i(w),{ref_key:"batchCompetencyTagsDialogRef",ref:x,crudExpose:i(d)},null,8,["crudExpose"])]),_:1})}}}),xe=te(ce,[["__scopeId","data-v-7e8be0e2"]]);export{xe as default};