|
|
import{_ as B,a2 as I,C as L,r as f,e as h,P as T,o as F,c as R,g as b,w as S,m as c,I as N,K as O,h as i,ah as y,f as t,n as d,i as P,ag as j,p as z,q as K,t as M}from"./index-9b4667b6.js";import{u as U,a as W}from"./useAvueTable-780cbd26.js";import"./trading_partner-798a55a7.js";const u=p=>(z("data-v-9fd74ebb"),p=p(),K(),p),G={class:"line-height-0"},H={class:"popover-content grid-3-2-20"},J=u(()=>t("div",{class:"item-child bg-#FEE3E2"},null,-1)),Q=u(()=>t("div",{class:"item-child bg-#FEE7CD"},null,-1)),Y=u(()=>t("div",{class:"item-child bg-#FDC6C4"},null,-1)),Z=u(()=>t("div",{class:"item-child bg-#FEC48B"},null,-1)),ee=u(()=>t("div",{class:"item-child bg-#F54A45"},null,-1)),te=u(()=>t("div",{class:"item-child bg-#ED6D0C"},null,-1)),se={class:"item custom"},oe=u(()=>t("div",{class:"ml8px"},"\u81EA\u5B9A\u4E49\u989C\u8272",-1)),ie={class:"mt-20px text-center"},le={__name:"index",props:{tableRef:Object,list:{type:Array,default:()=>[]},options:[Object],requiredRef:{type:Boolean,default:!0}},emits:["resetSign","handleSign"],setup(p,{emit:E}){const l=p,{recordSnapshot:w}=U(),x=W(),A=I(),D=L(()=>A.sideTheme==="theme-dark"),{proxy:m}=M();let k=f([]);const g=f(),_=f(!1),$=f(),V=()=>{if(k.value=l.requiredRef?l.list:x.getSelectionList(),k.value.length===0)return m.$modal.msgWarning("\u8BF7\u52FE\u9009\u9700\u8981\u6807\u8BB0\u7684\u6570\u636E\uFF01");_.value=!0},X=r=>{const e=r.target.parentNode.classList,o=Array.from(e);["popover-content","el-color-svpanel","el-color-hue-slider"].some(v=>o.includes(v))||(_.value=!1)},n=async r=>{q();const{fn:e,id:o,component:a}=l.options,v={ids:k.value.map(s=>o?s[o]:s.id),bgc:r},C=await e(v);m==null||m.$modal.msgSuccess(C.msg),l.requiredRef?l.tableRef.clearSelection():j.emit("clearSelection",a),E(r?"handleSign":"resetSign"),_.value=!1},q=()=>{const{id:r,key:e="bgc"}=l.options;let o=l.requiredRef?l.tableRef.tableSelect:x.getSelectionList();w({revoke:!0,list:o.map(a=>({id:r?a[r]:a.id,[e]:a[e]}))})};return(r,e)=>{const o=h("el-button"),a=h("el-color-picker"),v=h("el-popover"),C=T("click-outside");return F(),R("div",G,[b(o,{class:"ml8px mr8px",ref_key:"buttonRef",ref:$,type:"primary",onClick:V},{default:S(()=>[c("\u6807\u8BB0")]),_:1},512),b(v,{"virtual-ref":i($),trigger:"click","virtual-triggering":"",visible:i(_),width:200,"popper-style":{backgroundColor:i(D)?i(y).backgroundDarkPrimary:i(y).backgroundLightPrimary}},{default:S(()=>[N((F(),R("div",{style:O({color:i(D)?i(y).backgroundLight:"#606266"})},[t("div",H,[t("div",{class:"item",onClick:e[0]||(e[0]=d(s=>n("#FEE3E2"),["stop"]))},[J,c(" \u5F02\u5E38 ")]),t("div",{class:"item",onClick:e[1]||(e[1]=d(s=>n("#FEE7CD"),["stop"]))},[Q,c(" \u5F85\u786E\u8BA4 ")]),t("div",{class:"item",onClick:e[2]||(e[2]=d(s=>n("#FDC6C4"),["stop"]))},[Y,c(" \u53EF\u7591 ")]),t("div",{class:"item",onClick:e[3]||(e[3]=d(s=>n("#FEC48B"),["stop"]))},[Z,c(" XXX ")]),t("div",{class:"item",onClick:e[4]||(e[4]=d(s=>n("#F54A45"),["stop"]))},[ee,c(" \u91CD\u70B9 ")]),t("div",{class:"item",onClick:e[5]||(e[5]=d(s=>n("#ED6D0C"),["stop"]))},[te,c(" XXXX ")]),t("div",se,[b(a,{modelValue:i(g),"onUpdate:modelValue":e[6]||(e[6]=s=>P(g)?g.value=s:null),onChange:e[7]||(e[7]=s=>n(i(g)))},null,8,["modelValue"]),oe])]),t("div",ie,[b(o,{size:"small",onClick:e[8]||(e[8]=d(s=>n(""),["stop"]))},{default:S(()=>[c("\u91CD\u7F6E")]),_:1})])],4)),[[C,X]])]),_:1},8,["virtual-ref","visible","popper-style"])])}}},ce=B(le,[["__scopeId","data-v-9fd74ebb"]]);export{ce as default};
|