2026-10-20 16:52:05 +03:30
|
|
|
import{_ as X}from"./BasicMainCard-33e38576.js";import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-aed8f5e4.js";import{_ as K}from"./BasicInput.vue_vue_type_style_index_0_lang-e6a4e582.js";import{_ as Q,u as Y}from"./useBaseTable-e7a67916.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-f90e25b2.js";import{I as T}from"./Icon-29e38d16.js";import{t as tt}from"./useDataTime-6e234adb.js";import{getBooksTable as et,updateBook as ot,addBook as at,deleteBook as lt}from"./books-c52edb11.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,R as rt,l as y,n as $,C as nt,t as ut,H as c,S as ct}from"./index-1ba0f9ec.js";import{g as P}from"./convert-2ad76038.js";import{g as j}from"./index-c4537a3b.js";import{M as mt}from"./index-ec322234.js";import{S as dt}from"./index-4bff02a6.js";import{T as z}from"./isSymbol-355a1404.js";import{U as pt}from"./index-f4084f09.js";import"./Grid-660f1a55.js";import"./index-f22a4554.js";import"./_plugin-vue_export-helper-31e07528.js";import"./shallowequal-e0d9eafb.js";import"./index-3f6d5caa.js";import"./vnode-c4e67237.js";import"./index-73cafb1e.js";import"./useState-dcd360f8.js";import"./useRefs-5e33302c.js";import"./_flatRest-7877cdf8.js";import"./isMobile-e2e89480.js";import"./omit-f5d28cd3.js";import"./index-c136a321.js";import"./Col-f8806a10.js";import"./styleChecker-19ce40ea.js";import"./isPlainObject-e945bc1f.js";import"./usePrice-bc935b83.js";import"./index-aafc0fe2.js";import"./SearchOutlined-95278fe5.js";import"./FormItemContext-33ef1221.js";import"./index-8f2b7e91.js";import"./updateLocale-a8654270.js";import"./useMemo-ee45fb46.js";import"./lodash-27f814e6.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-36a1ea6e.js";import"./index-c8127d4e.js";import"./Badge-8a8eeb58.js";import"./isNumeric-3f69e2aa.js";import"./index-a8579634.js";import"./index-e22339b6.js";import"./index-876da578.js";import"./LeftOutlined-93011b30.js";import"./css-aae66f86.js";import"./DialogWrap-394d7eb0.js";import"./pickAttrs-0ddf9a54.js";import"./index-e0664925.js";import"./toArray-41940180.js";import"./index-175b83cf.js";import"./index-83b891e2.js";import"./index-65e13d19.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"},Re=it({__name:"index",setup(p){const R={authorization:`Bearer ${j()||localStorage.getItem("tamin_token")||""}`},[N,L]=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 S(){b.value=!1}function q(o){return o.type.startsWith("image/")?o.size/1024/1024<5?!0:(c.error("حجم تصویر باید کمتر از
|