PageSourceSearch

https://www.caodui.com.cn/assets/KnowledgeRequestCreate-0a48f417.js

js caodui.com.cn collected 2026-10-02 01:20:50 UTC 3,815 bytes, 1 lines download raw bytes

1import{v as h,w,x as _,B as C,F as d,G as y,H as e,N as q,I as i,J as S,T as k,a5 as R,K as E,Q as x,W as f,Y as n}from"./head-ed4e7f32.js";import{c as T}from"./knowledgeRequest-6bc58401.js";import{g as b}from"./navUtils-43efce75.js";import{C as B}from"./chevron-left-e218a396.js";import{L as K}from"./loader-circle-573350c0.js";import{S as L}from"./save-e12ffb97.js";import"./base-dd5e669f.js";import"./createLucideIcon-1b00ea2d.js";const N={class:"h-screen flex flex-col bg-slate-50 overflow-hidden"},V={class:"flex-none bg-white px-6 py-4 z-10 border-b border-slate-200"},z={class:"flex items-center gap-4 max-w-5xl mx-auto w-full"},A={class:"flex-1 overflow-y-auto p-6"},F={class:"max-w-5xl mx-auto space-y-6"},P={class:"bg-white rounded-xl border border-slate-200 shadow-sm p-8"},U={class:"space-y-6"},D={class:"space-y-2"},G={class:"text-xs text-slate-500 text-right"},I={class:"flex-none bg-white/80 backdrop-blur-md border-t border-slate-200 p-4 z-40"},M={class:"max-w-5xl mx-auto flex justify-end gap-4"},j=["disabled"],ee=h({__name:"KnowledgeRequestCreate",setup(H){const u=w(),g=_(),c=()=>`/dashboard/${b()}/knowledge-base/knowledge-request`,a=f(!1),o=f({requestContent:""}),v=async()=>{var s;if(!o.value.requestContent.trim()){n.warning("请输入请求内容");return}a.value=!0;try{const t=b();console.log("KnowledgeRequestCreate - 当前导航来源:",t);const l=t.toUpperCase().replace("-","_")==="AFTER_SALE"?"AFTER_SERVICE":t.toUpperCase().replace("-","_");console.log("KnowledgeRequestCreate - 转换后的salesType参数:",l);const m={bizType:"PRE_SALE_DEBUG",requestContent:o.value.requestContent,salesType:l},r=await T(m);console.log("KnowledgeRequestCreate - 请求参数:",m),r.data&&r.data.code===0?(n.success("创建成功"),u.push(c())):n.error(((s=r.data)==null?void 0:s.msg)||"创建失败")}catch(t){n.error((t==null?void 0:t.message)||"创建失败")}finally{a.value=!1}},p=()=>{u.push(c())};return C(()=>{const s=g.query||{};s.requestContent&&(o.value.requestContent=String(s.requestContent))}),(s,t)=>(d(),y("div",N,[e("header",V,[e("div",z,[e("button",{onClick:p,class:"p-2 -ml-2 text-slate-500 hover:bg-slate-100 rounded-full transition-colors"},[q(i(B),{class:"w-5 h-5"})]),t[1]||(t[1]=e("div",null,[e("h1",{class:"text-lg font-bold text-slate-900"},"新建请求"),e("p",{class:"text-xs text-slate-500 mt-0.5"},"创建新的知识库请求,提交后将进入处理流程")],-1))])]),e("div",A,[e("div",F,[e("div",P,[e("div",U,[e("div",D,[t[2]||(t[2]=e("label",{class:"text-sm font-medium text-slate-700 flex items-center"},[S(" 请求内容 "),e("span",{class:"text-red-500 ml-1"},"*")],-1)),k(e("textarea",{"onUpdate:modelValue":t[0]||(t[0]=l=>o.value.requestContent=l),rows:"12",class:"flex w-full rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm shadow-sm placeholder:text-slate-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/20 focus-visible:border-emerald-500 disabled:cursor-not-allowed disabled:opacity-50 transition-all resize-none",placeholder:"请输入详细的请求内容,以便我们更好地为您服务..."},null,512),[[R,o.value.requestContent]]),e("p",G,E(o.value.requestContent.length)+"/2000",1)])])])])]),e("div",I,[e("div",M,[e("button",{class:"px-6 h-10 rounded-full text-slate-500 hover:text-slate-700 hover:bg-slate-100 transition-colors font-medium",onClick:p}," 取消 "),t[4]||(t[4]=e("div",{class:"w-px h-6 bg-slate-200 my-auto"},null,-1)),e("button",{class:"px-8 h-10 rounded-full bg-slate-900 text-white hover:bg-slate-800 shadow-lg transition-all font-bold flex items-center gap-2",disabled:a.value,onClick:v},[a.value?(d(),x(i(K),{key:0,class:"w-4 h-4 animate-spin"})):(d(),x(i(L),{key:1,class:"w-4 h-4"})),t[3]||(t[3]=e("span",null,"提交请求",-1))],8,j)])])]))}});export{ee as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.