PageSourceSearch

https://moviecool.asia/_nuxt/Ctl-d23k2.js

js moviecool.asia collected 2026-10-03 17:57:27 UTC 8,328 bytes, 1 lines download raw bytes

1import{o as te}from"./D1d4xVG6.js";import{D as s,E as y,J as M,Kt as ae,On as o,_ as t,b as m,bt as oe,ct as ne,er as se,k as ie,mt as l,o as Y,qt as r,tr as _,v as q,vn as g,w as re,y as S}from"./IKVlQCqm.js";import{F as le,P as de}from"./ALo04WKn.js";import{p as me}from"./COqa1XKc.js";import{t as C}from"./0p9REYoh.js";import{t as ue}from"./-Hr1cHui.js";import{t as _e}from"./Cg23tsp3.js";import{t as pe}from"./DV4dZY2j.js";import{t as fe}from"./B6d-cI7N2.js";import{t as ce}from"./jgI2ctVV.js";import{t as ve}from"./DJX3E4Rx.js";import{r as ye}from"./CmDXUycz.js";import{t as he}from"./BQoOBjNj.js";import{i as ge,n as ke,t as we}from"./DYWhaV9x2.js";import{t as be}from"./BLLOWLLq2.js";import{t as $e}from"./DrshRDvA2.js";import{t as Ce}from"./CIhpkm062.js";import{t as Ve}from"./BYKE_W-x2.js";import{n as xe,t as Ne}from"./taiCTBTY2.js";import{t as Se}from"./DanHkgse2.js";import{t as Ee}from"./CTqvK6Gd2.js";import{r as Le}from"./DqSY_8uN2.js";var Te={class:"page !pt-0"},Ue={class:"backend_title"},De={class:"relative"},Ie={key:0},Oe={key:1},Fe={class:"buttons !m-0"},Me={key:0},Ye={key:1},qe={class:"space-y-4"},Ae={class:"grow"},je={class:"buttons"},Be={key:0},Pe={key:1},Re={class:"backend_title"},Je={class:"mt-6 flex items-end space-x-4",id:"searchbar"},Ge={key:0},Ke={class:"small"},ze=["onClick"],He={class:"text-base"},Qe={key:0,class:"text-xs"},We={class:"time"},Xe={class:"time"},Ze={class:"time"},et={class:"time"},tt={class:"username"},at={class:"tool"},ot={class:"flex items-center justify-between"},nt={key:0},A="award",st=ie({__name:"award",async setup(it){let k,E;he({layout:"backend",middleware:["auth"]});const p=M("DIALOGS"),j=M("BACKEND_NAV");j.value=A;const{data:L}=([k,E]=ae(()=>ye(_e)),k=await k,E(),k);te();const V=ue(),T=me(),w=`/api/${A}`,v=g(!1),B=g(null),U={name:V.FILM_REGIONS.reduce((u,e)=>(u[e]="",u),{})},P=Le({}),i=g(JSON.parse(JSON.stringify(U))),h=g({order_by:"count DESC",search:""}),f=g({current:1,last:10,items:[]});function b(){i.value=JSON.parse(JSON.stringify(U))}async function R(u){p.value.showLoading(async()=>{let e=we(i.value);i.value.uid_create=L.value.user.id,i.value.uid_update=L.value.user.id;let n=await C(w,{method:"POST",body:e});p.value.hideLoading(()=>ke(n,p)),N(),b(),v.value=!1})}function J(){p.value.alert("請確認必填資料均有正確填寫",()=>setTimeout(()=>x(),100))}async function $(u){p.value.showLoading(async()=>{try{let e=await C(w,{query:Object.assign({page:u},h.value)});if(e?.items){let n=e.items;for(let d=0;d<n.length;d++)n[d].name=n[d].name||{},n[d].names=Object.keys(n[d].name).filter(c=>c!="tw"&&n[d].name[c]!="").map(c=>n[d].name[c]),n[d].reference=n[d].reference||{};e.items=n,f.value=e,setTimeout(()=>ge(),0)}}finally{p.value.hideLoading(()=>x())}})}function x(){document.querySelector(".page")&&document.querySelector(".page").parentNode.scrollTo({top:0,behavior:"smooth"})}function G(){v.value=!0,setTimeout(()=>b(),100)}async function D(u){let e=await C(`${w}/${u}`);e.name=e.name||{},e.reference=e.reference||{},i.value=e,v.value=!0,setTimeout(()=>x(),100)}function K(u){p.value.confirm("請問您確定要刪除此筆資料嗎?",async()=>{await C(`${w}/${u}`,{method:"DELETE"}),N()})}async function N(){await $(1)}return ne(()=>{N(),T.query.edit&&D(T.query.edit)}),(u,e)=>{const n=ve,d=fe,c=be,z=xe,H=Ne,I=Ce,Q=Se,W=$e,X=pe,O=ce,Z=Ve,ee=Ee;return l(),m("div",Te,[o(v)?(l(),q(Q,{key:0,state:o(i),schema:o(P),onSubmit:R,onError:J},{default:r(()=>[t("div",Ue,[t("div",De,[o(i).id?(l(),m("h1",Ie,"更新影劇獎")):(l(),m("h1",Oe,"新增影劇獎")),e[13]||(e[13]=t("div",{class:"comment"},"請由下方工具進行編輯",-1))]),t("div",Fe,[s(n,{variant:"outline",icon:"mdi:arrow-left-thin",onClick:e[0]||(e[0]=a=>v.value=!1)},{default:r(()=>e[14]||(e[14]=[y("回列表",-1)])),_:1,__:[14]}),s(n,{variant:"outline",type:"reset",onClick:e[1]||(e[1]=a=>b())},{default:r(()=>e[15]||(e[15]=[y("重置",-1)])),_:1,__:[15]}),s(n,{type:"submit"},{default:r(()=>[o(i).id?(l(),m("span",Me,"更新")):(l(),m("span",Ye,"建立"))]),_:1})])]),s(I,{class:"ring-0"},{default:r(()=>[t("div",qe,[s(c,{class:"w-full"},{default:r(()=>[t("div",Ae,[s(d,{modelValue:o(i).id,"onUpdate:modelValue":e[2]||(e[2]=a=>
1o(i).id=a),name:"id",label:"內部編號",readonly:""},null,8,["modelValue"])]),o(i).id?(l(),q(n,{key:0,class:"mt-6",variant:"outline",color:"neutral",icon:"mdi:open-in-new",to:`/award/${o(i).id}`,target:"_blank"},null,8,["to"])):S("",!0)]),_:1}),s(z,{modelValue:o(i).name,"onUpdate:modelValue":e[3]||(e[3]=a=>o(i).name=a),name:"name",label:"影劇獎名稱",dict:o(V).FILM_REGION_DICT,sorting:o(V).FILM_REGIONS},null,8,["modelValue","dict","sorting"]),s(H,{modelValue:o(i).photo_url,"onUpdate:modelValue":e[4]||(e[4]=a=>o(i).photo_url=a),blob:o(i).photo_blob,"onUpdate:blob":e[5]||(e[5]=a=>o(i).photo_blob=a),name:"photo_url",label:"影劇獎代表照片",onDelete:e[6]||(e[6]=a=>o(i).photo_url="")},null,8,["modelValue","blob"]),s(d,{modelValue:o(i).description,"onUpdate:modelValue":e[7]||(e[7]=a=>o(i).description=a),name:"description",label:"影劇獎說明",rows:5,type:"textarea",help:"內文常用符號建議:《 》【 】( )『 』,.。;"},null,8,["modelValue"])])]),_:1}),t("div",je,[s(n,{variant:"outline",icon:"mdi:arrow-left-thin",onClick:e[8]||(e[8]=a=>v.value=!1)},{default:r(()=>e[16]||(e[16]=[y("回列表",-1)])),_:1,__:[16]}),s(n,{variant:"outline",type:"reset",onClick:e[9]||(e[9]=a=>b())},{default:r(()=>e[17]||(e[17]=[y("重置",-1)])),_:1,__:[17]}),s(n,{type:"submit"},{default:r(()=>[o(i).id?(l(),m("span",Be,"更新")):(l(),m("span",Pe,"建立"))]),_:1})])]),_:1},8,["state","schema"])):(l(),m(Y,{key:1},[t("div",Re,[e[19]||(e[19]=t("div",{class:"relative"},[t("h1",null,"影劇獎編輯"),t("div",{class:"comment"},"請由下方列表選擇影劇獎進行編輯")],-1)),s(n,{icon:"mdi:plus",onClick:le(G,["prevent"])},{default:r(()=>e[18]||(e[18]=[y("新增影劇獎",-1)])),_:1,__:[18]})]),t("div",Je,[s(W,{modelValue:o(h).search,"onUpdate:modelValue":e[11]||(e[11]=a=>o(h).search=a),name:"search",type:"text",placeholder:"Search...",icon:"mdi:search",onKeypress:e[12]||(e[12]=de(a=>$(1),["enter"]))},re({_:2},[o(h).search?{name:"trailing",fn:r(()=>[s(n,{color:"neutral",variant:"link",icon:"mdi:times",onClick:e[10]||(e[10]=a=>{o(h).search="",$(1)})})]),key:"0"}:void 0]),1032,["modelValue"])]),s(I,{class:"mt-6 ring-0",ui:{body:"!p-1"}},{default:r(()=>[s(Z,null,{default:r(()=>[e[21]||(e[21]=t("thead",null,[t("tr",null,[t("th",{width:"10%"},"ID"),t("th",{width:"10%"},"Picture"),t("th",{width:"20%"},"Name"),t("th",{width:" 5%"},"Year Start"),t("th",{width:" 5%"},"Year Last"),t("th",{width:" 5%"},"# Seq"),t("th",{width:" 5%"},"# Prize"),t("th",{width:"10%"},"Create"),t("th",{width:"10%"},"Update"),t("th",{width:"10%"},"User"),t("th",{width:" 7%"})])],-1)),t("tbody",{ref_key:"list",ref:B},[!o(f)?.items||o(f).items.length==0?(l(),m("tr",Ge,e[20]||(e[20]=[t("td",{colspan:"100%",style:{"text-align":"center"}},"目前資料庫內沒有資料",-1)]))):(l(!0),m(Y,{key:1},oe(o(f).items,a=>(l(),m("tr",{key:a.id},[t("td",Ke,[s(X,{to:`/award/${a.id}`,target:"_blank"},{default:r(()=>[y(_(a.id),1)]),_:2},1032,["to"])]),t("td",null,[t("div",{class:"image",style:se(`background-image: url(${a.photo_url}), url(/images/default.png)`),onClick:F=>o(p).showImage(a.photo_url)},null,12,ze)]),t("td",null,[t("div",He,_(a.name?.tw),1),a.names?.length>0?(l(),m("div",Qe," ("+_(a.names.join(", "))+")",1)):S("",!0)]),t("td",We,_(a.min_year),1),t("td",Xe,_(a.max_year),1),t("td",null,_(a.sequence),1),t("td",null,_(a.count),1),t("td",Ze,_(a.time_create?u.$dayjs(a.time_create).format("YYYY-MM-DD HH:mm"):""),1),t("td",et,_(a.time_update?u.$dayjs(a.time_update).format("YYYY-MM-DD HH:mm"):""),1),t("td",tt,_(a.uid_update),1),t("td",at,[s(c,null,{default:r(()=>[s(O,{text:"Edit"},{default:r(()=>[s(n,{variant:"outline",size:"xs",icon:"mdi:edit-outline",onClick:F=>D(a.id)},null,8,["onClick"])]),_:2},1024),s(O,{text:"Delete"},{default:r(()=>[s(n,{variant:"outline",size:"xs",icon:"mdi:times",onClick:F=>K(a.id)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)])]))),128))],512)]),_:1,__:[21]}),t("div",ot,[o(f)?.items&&o(f).items.length!=0?(l(),m("div",nt,"總數:"+_(o(f).count||0),1)):S("",!0),s(ee,{pagination:o(f),handler:$},null,8,["pagination"])])]),_:1})],64))])}}}),Et=st;export{Et as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.