import{_ as H}from"./index.2a3cc40c.js";import{G as T,H as L,D as M,F as N,I as R,w as z,C as G,L as $,M as q}from"./element-plus.fa1aa32c.js";import{r as x,f as O,b as P,d as W}from"./index.0abf9e5c.js";import{d as C,a0 as j,e as J,ag as K,o as i,c as p,V as e,M as t,a as s,O as g,L as E,W as Q,a8 as X,U as Y,u as Z,T as u,b9 as ee,b8 as te}from"./@vue.cab01781.js";import"./@vueuse.724ed0af.js";import"./@element-plus.92b4185f.js";import"./lodash-es.29c53eac.js";import"./dayjs.22a46fd8.js";import"./axios.8058589d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.bbe6f09f.js";import"./vue-router.5046cc50.js";import"./pinia.e85e8286.js";import"./vue-demi.bfae2336.js";import"./css-color-function.5bd363c0.js";import"./color.232115c1.js";import"./clone.8f44c0eb.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.404eaa9c.js";import"./vue-clipboard3.19ab9072.js";import"./clipboard.6fb7c109.js";import"./echarts.6ad8c478.js";import"./zrender.f91f2f01.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.0ab41b7b.js";function oe(){return x.get({url:"/setting/search/detail"})}function se(c){return x.post({url:"/setting/search/save",params:c})}const d=c=>(ee("data-v-998cfa7c"),c=c(),te(),c),ae={class:"hot-search"},le=u("\u5F00\u542F"),ne=u("\u5173\u95ED"),ce=d(()=>s("div",{class:"form-tips"},"\u9ED8\u8BA4\u5F00\u542F\uFF0C\u5173\u95ED\u5219\u524D\u7AEF\u4E0D\u663E\u793A\u8BE5\u529F\u80FD",-1)),re={class:"lg:flex"},ie={class:"flex-1 min-w-0"},ue=u(" \u6DFB\u52A0 "),de=u(" \u5220\u9664 "),_e={class:"flex-none hot-search-phone mt-4 lg:mt-0 lg:ml-4"},me=d(()=>s("div",{class:"mb-4 text-center"},"- \u70ED\u641C\u9884\u89C8\u56FE -",-1)),pe={class:"hot-search-phone-content"},he={class:"search-com"},fe={class:"search-con flex items-center px-[15px]"},De=d(()=>s("span",{class:"ml-[5px]"},"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",-1)),be=d(()=>s("div",{class:"hot-search-title"},"\u70ED\u95E8\u641C\u7D22",-1)),ve={class:"hot-search-text"},Fe=u("\u4FDD\u5B58"),ge=C({name:"search"}),Ee=C({...ge,setup(c){const l=j({isHotSearch:1,list:[]}),B=J(()=>l.list.filter(o=>o.name).sort((o,n)=>n.sort-o.sort)),h=async()=>{try{const o=await oe();for(const n in l)l[n]=o[n]}catch(o){console.log("\u83B7\u53D6=>",o)}},y=()=>{l.list.push({name:"",sort:0})},V=o=>{l.list.splice(o,1)},w=async()=>{try{await se(l),O.msgSuccess("\u64CD\u4F5C\u6210\u529F"),h()}catch(o){console.log("\u4FDD\u5B58=>",o)}};return h(),(o,n)=>{const f=T,S=L,k=M,I=N,D=R,b=P,_=z,v=G,m=$,U=q,A=H,F=K("perms");return i(),p("div",ae,[e(D,{class:"!border-none",shadow:"never"},{default:t(()=>[e(I,{ref:"formRef",model:l,"label-width":"100px"},{default:t(()=>[e(k,{label:"\u529F\u80FD\u72B6\u6001",style:{"margin-bottom":"0"}},{default:t(()=>[s("div",null,[e(S,{modelValue:l.isHotSearch,"onUpdate:modelValue":n[0]||(n[0]=a=>l.isHotSearch=a)},{default:t(()=>[e(f,{label:1},{default:t(()=>[le]),_:1}),e(f,{label:0},{default:t(()=>[ne]),_:1})]),_:1},8,["modelValue"]),ce])]),_:1})]),_:1},8,["model"])]),_:1}),e(D,{class:"!border-none mt-4",shadow:"never"},{default:t(()=>[s("div",re,[s("div",ie,[e(_,{type:"primary",class:"mb-4",onClick:y},{icon:t(()=>[e(b,{name:"el-icon-Plus"})]),default:t(()=>[ue]),_:1}),e(U,{size:"large",data:l.list},{default:t(()=>[e(m,{label:"\u5173\u952E\u8BCD",prop:"describe","min-width":"200"},{default:t(({row:a})=>[e(v,{modelValue:a.name,"onUpdate:modelValue":r=>a.name=r,modelModifiers:{trim:!0},clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57","show-word-limit":"",maxlength:"30"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(m,{label:"\u6392\u5E8F",prop:"describe","min-width":"80"},{default:t(({row:a})=>[e(v,{modelValue:a.sort,"onUpdate:modelValue":r=>a.sort=r,type:"number",clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(m,{label:"\u64CD\u4F5C","min-width":"80",fixed:"right"},{default:t(({$index:a})=>[g((i(),E(_,{type:"danger",link:"",onClick:r=>V(a)},{default:t(()=>[de]),_:2},1032,["onClick"])),[[F,["setting:storage:edit"]]])]),_:1})]),_:1},8,["data"])]),s("div",_e,[me,s("div",pe,[s("div",he,[s("div",fe,[e(b,{name:"el-icon-Search",size:17}),De])]),be,s("div",ve,[(i(!0),p(Q,null,X(Z(B),(a,r)=>(i(),p("span",{class:"truncate max-w-full",key:r},Y(a.name),1))),128))])])])])]),_:1}),g((i(),E(A,null,{default:t(()=>[e(_,{type:"primary",onClick:w},{default:t(()=>[Fe]),_:1})]),_:1})),[[F,["setting:search:save"]]])])}}});const et=W(Ee,[["__scopeId","data-v-998cfa7c"]]);export{et as default};
