Files
machartaa_admin_dist/dist/assets/index-e60e36f1.js
T

2 lines
8.4 KiB
JavaScript
Raw Normal View History

2026-08-15 11:59:58 +03:30
import{_ as X}from"./BasicMainCard-0d04fecc.js";import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-02d666ae.js";import{_ as K}from"./BasicInput.vue_vue_type_style_index_0_lang-037e8d8d.js";import{_ as Q,u as Y}from"./useBaseTable-8cba60ae.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-e2b25b37.js";import{I as T}from"./Icon-7978fe0f.js";import{t as tt}from"./useDataTime-8b5c8616.js";import{getBooksTable as et,updateBook as ot,addBook as at,deleteBook as lt}from"./books-760faabd.js";import{d as st,g as f,o as I,c as M,b as r,w as d,a,e as rt,H as it,j as x,k as $,y as nt,t as ut,D as c,I as ct}from"./index-ac7066b4.js";import{g as P}from"./convert-2ad76038.js";import{g as z}from"./index-d167af6e.js";import{M as mt}from"./index-83a7641b.js";import{S as dt}from"./index-a074700a.js";import{T as N}from"./isSymbol-666d5768.js";import{U as pt}from"./index-097ca7b7.js";import"./Grid-5e1e05b5.js";import"./index-29b429a8.js";import"./_plugin-vue_export-helper-4339814c.js";import"./index-5ae727af.js";import"./vnode-ef8e6ff6.js";import"./index-74186c79.js";import"./useState-277f1e57.js";import"./useRefs-a8a1b35f.js";import"./_flatRest-843ce72e.js";import"./isMobile-e2e89480.js";import"./index-d94bf113.js";import"./Col-c884cbb4.js";import"./styleChecker-8fccceee.js";import"./isPlainObject-a4fa2df5.js";import"./usePrice-bc935b83.js";import"./index-e101c0bd.js";import"./SearchOutlined-36fcc6f3.js";import"./FormItemContext-8e774be4.js";import"./index-802e18b7.js";import"./updateLocale-199556b5.js";import"./useMemo-51fb250b.js";import"./lodash-875c0571.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-4839fd2a.js";import"./index-25ae81e5.js";import"./Badge-fcb9007c.js";import"./isNumeric-3f69e2aa.js";import"./index-7f62cf48.js";import"./index-fa378035.js";import"./index-b18fec22.js";import"./DialogWrap-4b820301.js";import"./pickAttrs-73e6cb05.js";import"./css-aae66f86.js";import"./index-ff2f09c7.js";import"./toArray-518515e2.js";import"./index-f0d8ad9c.js";import"./index-27f1c09e.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"}],_t={class:"flex justify-between items-center mb-4"},ft=a("h2",null,"کتاب ها",-1),gt={class:"gap-2 flex justify-center"},ht=a("span",null,"حذف",-1),bt=a("span",null,"ویرایش",-1),yt={class:"space-y-4 relative"},xt={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"},Me=st({__name:"index",setup(p){const D={authorization:`Bearer ${z()||localStorage.getItem("tamin_token")||""}`},[j,L]=Y(),O=f({columns:vt,api:et,defaultPageLimit:20}),b=f(!1),k=f(!1),w=f(null),g=f([]),h=f(0),v=f(0),u=f({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 R(){b.value=!1}function q(o){return o.type.startsWith("image/")?o.size/1024/1024<5?!0:(c.error("حجم تصویر باید کمتر از 5MB باشد"),!1):(c.error("فقط فایل‌های تصویری مجاز است"),!1)}async function E(o){const{file:t,onSucces