2026-10-04 13:31:09 +03:30
|
|
|
import{_ as X}from"./BasicMainCard-ff1543bd.js";import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-6296deb9.js";import{_ as K}from"./BasicInput.vue_vue_type_style_index_0_lang-06536e2e.js";import{_ as Q,u as Y}from"./useBaseTable-e18d3b32.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-fbfa965d.js";import{I as T}from"./Icon-671f08f9.js";import{t as tt}from"./useDataTime-206d8d2e.js";import{getBooksTable as et,updateBook as ot,addBook as at,deleteBook as lt}from"./books-f1c979ce.js";import{d as it,i as _,o as I,c as M,e as s,w as d,b as a,f as st,L as rt,l as y,n as $,C as nt,t as ut,H as c,M as ct}from"./index-c678e119.js";import{g as P}from"./convert-2ad76038.js";import{g as j}from"./index-af384b16.js";import{M as mt}from"./index-66da2c76.js";import{S as dt}from"./index-5203b45e.js";import{T as z}from"./isSymbol-5130882b.js";import{U as pt}from"./index-ff90b762.js";import"./Grid-192c1e72.js";import"./index-88858982.js";import"./_plugin-vue_export-helper-edd5ed68.js";import"./shallowequal-93b92d94.js";import"./index-27b4bb6d.js";import"./vnode-34fe2aaf.js";import"./index-ea10bb13.js";import"./useState-fb1fd992.js";import"./useRefs-d469f03d.js";import"./_flatRest-89cece1c.js";import"./isMobile-e2e89480.js";import"./omit-30cc2465.js";import"./index-2a1871d2.js";import"./Col-65d77001.js";import"./styleChecker-c202e4d7.js";import"./isPlainObject-2f8cd8cc.js";import"./usePrice-bc935b83.js";import"./index-e517c667.js";import"./SearchOutlined-445bfd70.js";import"./FormItemContext-53695780.js";import"./index-c5016c96.js";import"./updateLocale-e9df593e.js";import"./useMemo-3527b8f5.js";import"./lodash-2343a0ae.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-0d6b57d1.js";import"./index-064013c2.js";import"./Badge-b566fed9.js";import"./isNumeric-3f69e2aa.js";import"./index-d768dcac.js";import"./index-05e85885.js";import"./index-d80ea252.js";import"./DialogWrap-0297f46d.js";import"./pickAttrs-09168c62.js";import"./css-aae66f86.js";import"./index-01af60d8.js";import"./toArray-acd138e5.js";import"./index-31ed7972.js";import"./index-679d69b0.js";import"./index-e3658ae2.js";const vt=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:p=>p.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"زیرعنوان",dataIndex:"sub_title",key:"sub_title"},{title:"تعداد قصه ها",dataIndex:"total_storys",key:"total_storys",align:"center",width:120,customRender:p=>p.record.total_storys??0},{title:"تصویر کاور",dataIndex:"cover",key:"cover",customRender:p=>p.record.cover||"-"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:p=>tt(p.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],ft={class:"flex justify-between items-center mb-4"},_t=a("h2",null,"کتاب ها",-1),gt={class:"gap-2 flex justify-center"},ht=a("span",null,"حذف",-1),bt=a("span",null,"ویرایش",-1),xt={class:"space-y-4 relative"},yt={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center justify-center"},kt=a("div",{class:"mb-1 text-sm text-gray-600"},"عنوان *",-1),wt=a("div",{class:"mb-1 text-sm text-gray-600"},"زیرعنوان",-1),Bt=a("div",{class:"mb-1 text-sm text-gray-600"},"آپلود تصویر کاور",-1),Ct={key:0},It=a("div",null,"آپلود کاور",-1),Mt={key:0,class:"mt-1"},Ut={class:"h-2 rounded bg-gray-200 overflow-hidden"},Tt={class:"text-xs text-gray-700 font-semibold text-center mt-1"},$e=it({__name:"index",setup(p){const L={authorization:`Bearer ${j()||localStorage.getItem("tamin_token")||""}`},[N,R]=Y(),O=_({columns:vt,api:et,defaultPageLimit:20}),b=_(!1),k=_(!1),w=_(null),g=_([]),h=_(0),v=_(0),u=_({title:"",sub_title:null,cover:null});function V(){g.value=[],k.value=!1,w.value=null,u.value={title:"",sub_title:null,cover:null},b.value=!0}function D(){b.value=!1}function q(o){return o.type.startsWith("image/")?o.size/1024/1024<5?!0:(c.error("حجم تصویر باید کمتر از 5MB باشد"),!1):(c.error("فقط
|