import{_ as L}from"./index.4047ffb3.js";import{r as C,b as N,d as R}from"./index.7f83e315.js";import{G as q,H as z,D as G,F as M,I as $,w as H,C as O,L as j,M as J}from"./element-plus.9cae3cb1.js";import{d as x,_ as K,b as P,aq as Q,o as i,c as h,V as t,M as e,u as c,a,S as d,O as E,L as F,U as W,aa as X,T as Y,bl as Z,bk as tt}from"./@vue.96c135a1.js";import"./@vueuse.f4694335.js";import"./lodash.fc1b942f.js";import"./@amap.8a62addd.js";import"./axios.108bc101.js";import"./vue-router.64fdcd9a.js";import"./pinia.aebd7275.js";import"./css-color-function.91b6e704.js";import"./color.d62296c5.js";import"./clone.f2407509.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./dayjs.37feae28.js";import"./@element-plus.07bd0514.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.80787eb0.js";import"./tslib.60310f1a.js";import"./zrender.6f33727c.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.3d7ee361.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";function et(){return C.get({url:"/setting.hot_search/getConfig"})}function ot(r){return C.post({url:"/setting.hot_search/setConfig",params:r})}const _=r=>(Z("data-v-bd261930"),r=r(),tt(),r),at={class:"hot-search"},st=_(()=>a("div",{class:"form-tips"},"\u9ED8\u8BA4\u5F00\u542F\uFF0C\u5173\u95ED\u5219\u524D\u7AEF\u4E0D\u663E\u793A\u8BE5\u529F\u80FD",-1)),nt={class:"lg:flex"},lt={class:"flex-1 min-w-0"},rt={class:"hot-search-phone mt-4 lg:mt-0 lg:ml-4 flex-none"},ut=_(()=>a("div",{class:"mb-4 text-center"},"- \u70ED\u641C\u9884\u89C8\u56FE -",-1)),it={class:"hot-search-phone-content"},ct={class:"search-com"},dt={class:"search-con flex items-center px-[15px]"},_t=_(()=>a("span",{class:"ml-[5px]"},"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",-1)),mt=_(()=>a("div",{class:"hot-search-title"},"\u70ED\u95E8\u641C\u7D22",-1)),pt={class:"hot-search-text"},ht=x({name:"search"}),ft=x({...ht,setup(r){const n=K({status:1,data:[]}),B=P(()=>n.data.filter(o=>o.name).sort((o,l)=>l.sort-o.sort)),f=async()=>{try{const o=await et();for(const l in n)n[l]=o[l]}catch(o){console.log("\u83B7\u53D6=>",o)}},y=()=>{n.data.push({name:"",sort:0})},V=o=>{n.data.splice(o,1)},w=async()=>{try{await ot(n),f()}catch(o){console.log("\u4FDD\u5B58=>",o)}};return f(),(o,l)=>{const b=q,k=z,S=G,I=M,g=$,m=H,D=O,p=j,U=J,A=N,T=L,v=Q("perms");return i(),h("div",at,[t(g,{class:"!border-none",shadow:"never"},{default:e(()=>[t(I,{ref:"formRef",model:c(n),"label-width":"100px"},{default:e(()=>[t(S,{label:"\u529F\u80FD\u72B6\u6001",style:{"margin-bottom":"0"}},{default:e(()=>[a("div",null,[t(k,{modelValue:c(n).status,"onUpdate:modelValue":l[0]||(l[0]=s=>c(n).status=s)},{default:e(()=>[t(b,{label:1},{default:e(()=>[d("\u5F00\u542F")]),_:1}),t(b,{label:0},{default:e(()=>[d("\u5173\u95ED")]),_:1})]),_:1},8,["modelValue"]),st])]),_:1})]),_:1},8,["model"])]),_:1}),t(g,{class:"!border-none mt-4",shadow:"never"},{default:e(()=>[a("div",nt,[a("div",lt,[t(m,{type:"primary",class:"mb-4",onClick:y},{default:e(()=>[d("\u6DFB\u52A0")]),_:1}),t(U,{size:"large",data:c(n).data},{default:e(()=>[t(p,{label:"\u5173\u952E\u8BCD",prop:"describe","min-width":"160"},{default:e(({row:s})=>[t(D,{modelValue:s.name,"onUpdate:modelValue":u=>s.name=u,clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57","show-word-limit":"",maxlength:"30"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(p,{label:"\u6392\u5E8F",prop:"describe","min-width":"160"},{default:e(({row:s})=>[t(D,{modelValue:s.sort,"onUpdate:modelValue":u=>s.sort=u,type:"number"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(p,{label:"\u64CD\u4F5C","min-width":"80",fixed:"right"},{default:e(({$index:s})=>[E((i(),F(m,{type:"danger",link:"",onClick:u=>V(s)},{default:e(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["setting:storage:edit"]]])]),_:1})]),_:1},8,["data"])]),a("div",rt,[ut,a("div",it,[a("div",ct,[a("div",dt,[t(A,{name:"el-icon-Search",size:17}),_t])]),mt,a("div",pt,[(i(!0),h(W,null,X(c(B),(s,u)=>(i(),h("span",{key:u},Y(s.name),1))),128))])])])])]),_:1}),E((i(),F(T,null,{default:e(()=>[t(m,{type:"primary",onClick:w},{default:e(()=>[d("\u4FDD\u5B58")]),_:1})]),_:1})),[[v,["setting.hot_search/setConfig"]]])])}}});const Wt=R(ft,[["__scopeId","data-v-bd261930"]]);export{Wt as default};
