import{d as B,q as n,U as $,r as m,o as f,c as C,e as g,j as b,g as e,f as w,aA as H,W as i,x as I,i as N,aw as q,ak as z,al as L,_ as U}from "./index-f5e1fd05.js";import{l as j}from "./login-bottom-ec7c87ff.js";import{f as A,g as O}from "./session-8b690360.js";import{u as k}from "./home-420faaf8.js";const u= c=>(z("data-v-18ba9d62"),c=c(),L(),c),Q={class:"EndTokeDialog_main"},R={class:"title"},W=["src"],F=u(()=>e("span",null,"结束会话",-1)),G=u(()=>e("p",null,"是否结束本轮会话？为了更好的提供咨询服务，请您为小助手评分。",-1)),J={class:"select"},K=u(()=>e("span",{class:"label"},"是否满意:",-1)),M={class:"select_list"},P={key:0,class:"select"},X=u(()=>e("span",{class:"label"},"原因:",-1)),Y={class:"select_list"},Z=B({name:"EndTokeDialog",__name:"EndTokeDialog",setup(c, {expose:S}){const d=n(!1),t=n(1),a=n(1),y=n([]),r=n([]),T=[{type:"selection",align:"left"},{label:"问题",prop:"userQuestion"},{label:"回答",prop:"answer"}];S({async open(){await $(),d.value=!0;const o=await A({sessionId:k().selectCaseInfo.sessionId});y.value=o.data}});const _=()=>{d.value=!1,r.value=[],t.value=1,a.value=1},h= o=>{o===1&&(r.value=[],a.value=3),t.value=o},v= o=>{a.value=o},x= o=>{const s=[];o.forEach(p=>{s.push(p.id)}),r.value=s},E=async()=>{(await O({answerHistoryIdList:r.value,reasonType:t.value===2?a.value:void 0,sessionId:k().selectCaseInfo.sessionId,sessionScore:t.value})).code===200&&(q("提交成功!",{type:"success"}),k().changeSelectCaseInfo({sessionId:"",sessionName:"",sessionState:null}),_())};return(o, s)=>{const p=m("el-icon"),D=m("pure-table"),V=m("el-dialog");return f(),C("div",null,[g(V,{width:"820","append-to-body":"",title:"",modelValue:d.value,"onUpdate:modelValue":s[5]||(s[5]= l=>d.value=l),"custom-class":"EndTokeDialog"},{default:b(()=>[e("div",Q,[e("div",R,[e("img",{src:w(j),alt:""},null,8,W),F,g(p,{onClick:_,size:"20",class:"icon"},{default:b(()=>[g(w(H))]),_:1})]),G,e("div",J,[K,e("div",M,[e("div",{onClick:s[0]||(s[0]= l=>h(1)),class:i([t.value===1?"actived select_item":"select_item"])}," 满意 ",2),e("div",{onClick:s[1]||(s[1]= l=>h(2)),class:i([t.value===2?"actived select_item":"select_item"])}," 不满意 ",2)])]),t.value===2?(f(),C("div",P,[X,e("div",Y,[e("div",{onClick:s[2]||(s[2]= l=>v(1)),class:i(["select_item",[a.value===1?"actived ":""]])}," 信息错误 ",2),e("div",{onClick:s[3]||(s[3]= l=>v(2)),class:i(["select_item",[a.value===2?"actived":""]])}," 答非所问 ",2),e("div",{onClick:s[4]||(s[4]= l=>v(3)),class:i(["select_item",[a.value===3?"actived":""]])}," 其他 ",2)])])):I("",!0),t.value===2?(f(),N(D,{key:1,style:{height:"430px"},"align-whole":"center",showOverflowTooltip:"","table-layout":"auto","row-key":"id",data:y.value,onSelectionChange:x,columns:T,"header-cell-style":{background:"var(--el-table-row-hover-bg-color)",color:"var(--el-text-color-primary)"}},null,8,["data","header-cell-style"])):I("",!0),e("div",{class:"btn_footer"},[e("div",{class:"main_btn",onClick:E},"提交, 结束会话"),e("div",{class:"btn",onClick:_},"取消, 继续会话")])])]),_:1},8,["modelValue"])])}}});const ae=U(Z,[["__scopeId","data-v-18ba9d62"]]);export{ae as default};
