import{al as B,a$ as D,_ as k,d as U,w as r,r as d,aC as R,H as M,o as N,G as $,C as h,j as p,l as b,J as I,aN as O}from"./index.js";import{h as T,a as j,b as H,c as V}from"./index.b7e2fe70.js";import{p as q,s as y,i as S,M as z}from"./modal.ffdded.js";import{u as G}from"./use-page-search.f7bc460e.js";import J from"./sort-modal.12b77f.js";import"./index.da6d65fd.js";import"./platform-modal.118c44.js";const L=[{prop:"id",label:"ID",width:"80px"},{prop:"platform_code",label:"\u5E73\u53F0\u7F16\u53F7",width:"160px"},{prop:"platform_name",label:"\u5E73\u53F0\u540D\u79F0"},{prop:"platform_type",label:"\u5BF9\u63A5\u5E73\u53F0",cellRenderer({row:s}){return B(D,null,{default:()=>{var n;return((n=q.find(({value:a})=>String(a)===String(s.platform_type)))==null?void 0:n.label)||"--"}})}},{prop:"status",label:"\u72B6\u6001",cellRenderer({row:s}){var n;return B(D,{type:((n=y.find(({value:a})=>String(a)===String(s.status)))==null?void 0:n.type)||""},{default:()=>{var a;return((a=y.find(({value:l})=>String(l)===String(s.status)))==null?void 0:a.label)||"--"}})}},{prop:"desc",label:"\u6392\u5E8F\u6743\u91CD",width:"80px"},{prop:"creater",label:"\u521B\u5EFA\u4EBA"},{prop:"addtime",label:"\u521B\u5EFA\u65F6\u95F4",minWidth:"145px"},{prop:"",label:"\u64CD\u4F5C",fixed:"right",width:"185px",slot:"operation"}],W={title:"\u539F\u56E0\u7BA1\u7406",columns:L,apis:{httpList:T,httpAdd:!0,httpStatus:j,httpUpdate:!0,httpDelete:H}},w={formItems:[{field:"create_timer",type:"date_picker",otherOptions:{endProp:"end",startProp:"start",type:"daterange",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}},{field:"status",type:"select",placeholder:"\u5E73\u53F0\u72B6\u6001",options:y},{field:"platform_name",type:"input",placeholder:" \u5E73\u53F0\u540D\u79F0"},{field:"creater",type:"input",placeholder:" \u521B\u5EFA\u4EBA"}]},K=U({__name:"index",setup(s){const n="terrace",a=r(null),l=r(!1),i=r(!1),c=r(!1),f=r(!1),u=r(S()),x={pageSearchHook:()=>G(void 0,void 0,w)};async function v(o){f.value=!0;const e=await V({id:o});f.value=!1;const{id:m,platform_name:g,platform_type:F,use_type:_,is_select_pay_rate:E,pay_list:t,desc:C}=e.data;u.value={id:m,platform_name:g,platform_type:F,use_type:_,is_select_pay_rate:E,pay_list:t,desc:C}}const P={content:{create:()=>{u.value=S(),l.value=!1,i.value=!0},preview:async({id:o})=>{await v(o),l.value=!0,i.value=!0},update:async({id:o,status:e})=>{if(String(e)==="1"){O.warning("\u7981\u7528\u540E\uFF0C\u624D\u53EF\u4EE5\u4FEE\u6539\uFF01");return}await v(o),l.value=!1,i.value=!0}}};async function A(o){await v(o),c.value=!0}return(o,e)=>{const m=d("ElButton"),g=d("ElTooltip"),F=d("PageContainer"),_=d("PageAuth"),E=R("loading");return M((N(),$(_,{pageName:n},{default:h(()=>[p(F,{hooks:x,events:P,"content-config":b(W),"search-config":b(w),"get-content-ref":t=>a.value=t},{content_action:h(({id:t})=>[p(g,{placement:"top",content:"\u6392\u5E8F"},{default:h(()=>[p(m,{size:"small",link:"",type:"primary",icon:b(I)("setting"),onClick:C=>A(t)},null,8,["icon","onClick"])]),_:2},1024)]),_:1},8,["content-config","search-config","get-content-ref"]),p(z,{visible:i.value,"onUpdate:visible":e[0]||(e[0]=t=>i.value=t),data:u.value,"onUpdate:data":e[1]||(e[1]=t=>u.value=t),disabled:l.value,onRefresh:e[2]||(e[2]=t=>a.value.onSearch())},null,8,["visible","data","disabled"]),p(J,{visible:c.value,"onUpdate:visible":e[3]||(e[3]=t=>c.value=t),data:u.value,"onUpdate:data":e[4]||(e[4]=t=>u.value=t),onRefresh:e[5]||(e[5]=t=>a.value.onSearch())},null,8,["visible","data"])]),_:1})),[[E,f.value]])}}});var oe=k(K,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/terrace/index.vue"]]);export{oe as default};
