import{u as z}from"./countryInfo.Df1X6FZ-.js";import{_ as B}from"./index.vue_vue_type_script_setup_true_lang.DKtMKa0b.js";import{u as I}from"./enum.CeuIC-qV.js";import{d as N,r as U,ai as _,o,c as n,u as e,U as l,O as c,J as D,F as L,M as $,T as i,a as d,S as f}from"./vue.1RczIYhx.js";import{_ as E}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./hasPermission.Dyr7g3RK.js";import"./index.fM6cvGYs.js";import"./elementPlus.CXoFsoPv.js";const j={class:"font-medium"},A={key:0},J={key:1},M={style:{"font-weight":"600","font-size":"13px"}},O={key:2},q={style:{"font-weight":"600","font-size":"13px"}},G={key:3},H={class:"content-ellipsis"},K={key:4},P={key:1},Q={key:1},R={key:5},W={key:6},X={key:7},Y={key:8},Z={key:9},ee={class:"flex justify-center"},te={key:10},oe=N({__name:"DataTableSlot",props:{row:{},field:{}},emits:["open-negativeLabel"],setup(h,{emit:k}){const b=h,{row:t,field:s}=b,g=k,p=z().Countries.find(r=>r.code==t.country_code),y=p?p.color:"#3875F6",w=U("www.amazon.com");function x(r){const a=I.find(u=>u.value===r);return a?a.label:"未知"}function C(r){switch(r){case 0:return"success";case 1:return"primary";case 2:return"warning";case 3:return"danger";default:return"info"}}function T(){g("open-negativeLabel",t)}return(r,a)=>{const u=_("el-tag"),v=_("el-link"),V=_("el-tooltip"),F=_("el-rate"),S=_("el-switch");return o(),n("div",j,[e(s)==="country_code"?(o(),n("div",A,[l(u,{"disable-transitions":!0,style:D({color:e(y),borderColor:e(y)}),effect:"plain",round:""},{default:c(()=>[f(i(e(p)?e(p).name:"-"),1)]),_:1},8,["style"])])):e(s)==="title"?(o(),n("div",J,[l(v,{disabled:!e(t).title,href:e(t).url,underline:!1,target:"_blank"},{default:c(()=>[d("span",M,i(e(t).title||"-"),1)]),_:1},8,["disabled","href"])])):e(s)==="reviewer_name"?(o(),n("div",O,[l(v,{disabled:!e(t).reviewer_name,href:`https://${e(w)}/gp/profile/amzn1.account.${e(t).reviewer_id}/ref=cm_cr_srp_d_gw_btm?ie=UTF8`,underline:!1,target:"_blank"},{default:c(()=>[d("span",q,i(e(t).reviewer_name||"-"),1)]),_:1},8,["disabled","href"])])):e(s)==="content"?(o(),n("div",G,[l(V,{content:e(t).content,disabled:e(t).content.length<=80,"show-after":350,effect:"dark",placement:"top","popper-class":"custom-tooltip"},{default:c(()=>[d("span",H,i(e(t).content),1)]),_:1},8,["content","disabled"])])):e(s)==="score"?(o(),n("div",K,[e(t).score!==null&&e(t).score!==void 0&&e(t).score!==""?(o(),n(L,{key:0},[e(t).score>0?(o(),$(F,{key:0,modelValue:e(t).score,"onUpdate:modelValue":a[0]||(a[0]=m=>e(t).score=m),colors:["#FF0000","#FF9900","#67C23A"],disabled:"","text-color":"#1e293b"},null,8,["modelValue"])):(o(),n("span",P,i(e(t).score),1))],64)):(o(),n("span",Q,"-"))])):e(s)==="tiv"?(o(),n("div",R,[l(u,{type:C(e(t).tiv)},{default:c(()=>[f(i(x(e(t).tiv)),1)]),_:1},8,["type"])])):e(s)==="helpful"?(o(),n("div",W,[d("span",null,i(e(t).helpful),1)])):e(s)==="verified"?(o(),n("div",X,[l(S,{modelValue:e(t).verified,"onUpdate:modelValue":a[1]||(a[1]=m=>e(t).verified=m),disabled:"",size:"small"},null,8,["modelValue"])])):e(s)==="create_datetime"?(o(),n("div",Y,[d("span",null,i(e(t).create_datetime),1)])):e(s)==="operate"?(o(),n("div",Z,[d("div",ee,[l(B,{size:"small",type:"danger",onClick:T},{default:c(()=>a[2]||(a[2]=[f(" 负面标签 ")])),_:1})])])):(o(),n("div",te,i(e(t)[e(s)]||"-"),1))])}}}),pe=E(oe,[["__scopeId","data-v-90aabb5b"]]);export{pe as default};
