import{d as q,n as G,o as n,c as r,a as v,b as a,w as o,D as K,q as p,k as i,E as A,r as c,G as H,F as U,s as j,g as J,I as O,j as d,x as u,T as Q,_ as R}from"./index-DIl-pxgT.js";import{g as B}from"./project-DH-EQEsQ.js";import{g as W}from"./classification-CUKwOuh8.js";const X={class:"page-container"},Y={class:"filter-bar card-shadow"},Z={class:"table-card card-shadow"},$={key:1,class:"empty-text"},ee={key:1,class:"empty-text"},ae={key:1,class:"empty-text"},te={class:"pagination-bar"},le=q({__name:"Classification",setup(oe){const g=i(!1),h=i([]),_=i(1),b=i(50),w=i(0),x=i(void 0),k=i(void 0),m=i(""),z=i([]),V=i([]);function I(l){return l>=.8?"confidence-high":l>=.5?"confidence-mid":"confidence-low"}async function y(){g.value=!0;try{const l={page:_.value,page_size:b.value};m.value&&(l.keyword=m.value);const t=await B(l);h.value=[],w.value=0}catch(l){A.error((l==null?void 0:l.message)||"加载失败")}finally{g.value=!1}}function L(){_.value=1,y()}async function P(){try{const[l,t]=await Promise.all([B({page:1,page_size:100}),W()]);z.value=(l==null?void 0:l.data)||[],V.value=t||[]}catch{}}return G(()=>{P(),y()}),(l,t)=>{const C=c("el-option"),D=c("el-select"),f=c("el-tag"),S=c("el-input"),E=c("el-icon"),F=c("el-button"),s=c("el-table-column"),M=c("el-table"),N=c("el-pagination"),T=H("loading");return n(),r("div",X,[t[6]||(t[6]=v("h2",{class:"page-title"},"分类分级结果",-1)),v("div",Y,[a(D,{modelValue:x.value,"onUpdate:modelValue":t[0]||(t[0]=e=>x.value=e),placeholder:"选择项目",clearable:"",style:{width:"180px"}},{default:o(()=>[(n(!0),r(U,null,j(z.value,e=>(n(),p(C,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(D,{modelValue:k.value,"onUpdate:modelValue":t[1]||(t[1]=e=>k.value=e),placeholder:"选择分级",clearable:"",style:{width:"140px","margin-left":"12px"}},{default:o(()=>[(n(!0),r(U,null,j(V.value,e=>(n(),p(C,{key:e.id,label:e.name,value:e.id},{default:o(()=>[a(f,{size:"small",color:e.color,effect:"dark"},{default:o(()=>[d(u(e.code),1)]),_:2},1032,["color"]),d(" "+u(e.name),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"]),a(S,{modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=e=>m.value=e),placeholder:"搜索字段名/注释",clearable:"",style:{width:"200px","margin-left":"12px"}},null,8,["modelValue"]),a(F,{type:"primary",style:{"margin-left":"12px"},onClick:L},{default:o(()=>[a(E,null,{default:o(()=>[a(J(O))]),_:1}),t[5]||(t[5]=d("查询 ",-1))]),_:1})]),v("div",Z,[K((n(),p(M,{data:h.value,stripe:"",size:"default",border:""},{default:o(()=>[a(s,{prop:"column_name",label:"字段名","min-width":"140"}),a(s,{prop:"data_type",label:"类型",width:"100"}),a(s,{prop:"comment",label:"注释","min-width":"150","show-overflow-tooltip":""}),a(s,{prop:"table_name",label:"所属表",width:"140"}),a(s,{prop:"database_name",label:"所属库",width:"120"}),a(s,{prop:"source_name",label:"数据源",width:"120"}),a(s,{label:"分类",width:"140"},{default:o(({row:e})=>[e.category_name?(n(),p(f,{key:0,size:"small",type:"info"},{default:o(()=>[d(u(e.category_name),1)]),_:2},1024)):(n(),r("span",$,"--"))]),_:1}),a(s,{label:"分级",width:"100"},{default:o(({row:e})=>[e.level_name?(n(),p(f,{key:0,size:"small",color:e.level_color,effect:"dark"},{default:o(()=>[d(u(e.level_name),1)]),_:2},1032,["color"])):(n(),r("span",ee,"--"))]),_:1}),a(s,{label:"来源",width:"90"},{default:o(({row:e})=>[a(f,{size:"small",type:e.source==="auto"?"warning":"success"},{default:o(()=>[d(u(e.source==="auto"?"自动":"人工"),1)]),_:2},1032,["type"])]),_:1}),a(s,{prop:"confidence",label:"置信度",width:"90"},{default:o(({row:e})=>[e.confidence>0?(n(),r("span",{key:0,class:Q(I(e.confidence))},u((e.confidence*100).toFixed(0))+"% ",3)):(n(),r("span",ae,"--"))]),_:1})]),_:1},8,["data"])),[[T,g.value]]),v("div",te,[a(N,{"current-page":_.value,"onUpdate:currentPage":t[3]||(t[3]=e=>_.value=e),"page-size":b.value,"onUpdate:pageSize":t[4]||(t[4]=e=>b.value=e),total:w.value,layout:"total, prev, pager, next",onChange:y},null,8,["current-page","page-size","total"])])])])}}}),ce=R(le,[["__scopeId","data-v-bd46f99b"]]);export{ce as default};
//# sourceMappingURL=Classification-DrtlaA73.js.map
