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

2 lines
8.6 KiB
JavaScript
Raw Normal View History

2026-09-19 17:37:47 +03:30
import{_ as G}from"./BasicMainCard-8291a0be.js";import{_ as K}from"./BasicModal.vue_vue_type_style_index_0_lang-9330561a.js";import{_ as X}from"./BasicInput.vue_vue_type_style_index_0_lang-672b5a8b.js";import{_ as Q,u as Y}from"./useBaseTable-05b26333.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-bd7de123.js";import{I as T}from"./Icon-26941971.js";import{t as tt}from"./useDataTime-af597da2.js";import{getBooksTable as et,updateBook as ot,addBook as at,deleteBook as lt}from"./books-20d355ef.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,K as rt,l as y,n as $,B as nt,t as ut,G as c,L as ct}from"./index-6d0cd65e.js";import{g as P}from"./convert-2ad76038.js";import{g as j}from"./index-1a5043f1.js";import{M as mt}from"./index-1fdbf8ec.js";import{S as dt}from"./index-1d24a383.js";import{T as z}from"./isSymbol-94624ad1.js";import{U as pt}from"./index-207fac00.js";import"./Grid-849ebb25.js";import"./index-ae4857ed.js";import"./_plugin-vue_export-helper-057121dd.js";import"./shallowequal-969229a1.js";import"./index-0e770d03.js";import"./vnode-272c72c0.js";import"./index-8d45f2c0.js";import"./useState-6a654be9.js";import"./useRefs-b0f30c2d.js";import"./_flatRest-2e1bd5be.js";import"./isMobile-e2e89480.js";import"./omit-0042b203.js";import"./index-a30aaa52.js";import"./Col-27d7ac55.js";import"./styleChecker-0273aaa3.js";import"./isPlainObject-d2ad9b1e.js";import"./usePrice-bc935b83.js";import"./index-0a3c8350.js";import"./SearchOutlined-f7ba34a1.js";import"./FormItemContext-b6ebc5a2.js";import"./index-eddc2482.js";import"./updateLocale-cd480df1.js";import"./useMemo-fb6ccae7.js";import"./lodash-6c37e040.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-8a3278c2.js";import"./index-61e1d708.js";import"./Badge-a066a44e.js";import"./isNumeric-3f69e2aa.js";import"./index-08466728.js";import"./index-19225493.js";import"./index-cbd32094.js";import"./DialogWrap-b6637bda.js";import"./pickAttrs-ae9bd1c0.js";import"./css-aae66f86.js";import"./index-b2a6c339.js";import"./toArray-5fe0a9e6.js";import"./index-3f13e53b.js";import"./index-17510b5d.js";import"./index-373d7dab.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("فقط