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

2 lines
8.7 KiB
JavaScript
Raw Normal View History

2026-08-11 18:06:14 +03:30
import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-1f90009d.js";import{_ as K,u as Q}from"./useBaseTable-253c2441.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-3cd9de9f.js";import{I as P}from"./Icon-1c8e1e9a.js";import{t as Z}from"./useDataTime-083dad6f.js";import{g as $}from"./convert-2ad76038.js";import{_ as q}from"./TextPreview.vue_vue_type_script_setup_true_lang-a1cc9442.js";import{_ as D}from"./CustomTag.vue_vue_type_script_setup_true_lang-9cac157b.js";import{b as a,d as tt,g as d,r as et,v as at,l as ot,o as F,c as j,a as _,w as r,e as it,j as c,H as lt,k as nt,D as m,I as st}from"./index-157892ef.js";import{g as O}from"./index-68ce3f2c.js";import{a as rt,u as ut,c as ct,d as pt}from"./brand-ecf712b0.js";import{l as mt}from"./lodash-b0b4e146.js";import{M as dt,_ as ft}from"./index-e60f1d66.js";import{I as _t,b as gt}from"./index-2e17d8ae.js";import{_ as vt,F as ht}from"./index-1d294154.js";import{U as bt}from"./index-d38f12f7.js";import{T as N}from"./isSymbol-d560f493.js";import"./index-d692d775.js";import"./vnode-4a81629f.js";import"./_plugin-vue_export-helper-b335f697.js";import"./updateLocale-5b074ed4.js";import"./index-bc659f42.js";import"./index-47a95ccc.js";import"./omit-e1b41de8.js";import"./useState-c3e69ab5.js";import"./index-10655c40.js";import"./toArray-0cb2ab82.js";import"./FormItemContext-9d898e7c.js";import"./pickAttrs-99fc3772.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-18d9510e.js";import"./index-db2fbdbd.js";import"./Badge-65e3af71.js";import"./isNumeric-3f69e2aa.js";import"./index-7e24c386.js";import"./index-3631a093.js";import"./styleChecker-a54924f7.js";import"./index-d809d721.js";import"./DialogWrap-30578cd1.js";import"./css-aae66f86.js";import"./index-c3f6f95c.js";import"./textUtils-c37780ad.js";import"./isPlainObject-86af753d.js";import"./_flatRest-6d155af7.js";import"./Col-b55f55a6.js";import"./useRefs-3fd4fb6c.js";const xt=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:e=>e.index+1},{title:"تصویر ",dataIndex:"image",key:"image",customRender:e=>{const C=$(e.record.image);return a("img",{src:C,width:60},null)}},{title:"عنوان",dataIndex:"title",key:"title"},{title:"توضیحات",dataIndex:"description",key:"description",width:500,customRender:e=>a(q,{text:e.record.description},null)},{title:"وضعیت ",dataIndex:"active",key:"active",type:"Boolean",width:100,customRender:e=>a("div",{class:"flex justify-center"},[a(D,{class:"px-3 font-bold py-1",textColor:e!=null&&e.record.active?"#65a30d":"#dc2626",bgColor:e!=null&&e.record.active?"#ecfccb":"#fee2e2"},{default:()=>[e!=null&&e.record.active?"فعال":"غیر فعال"]})])},{title:"وضعیت دسترسی ",dataIndex:"public",key:"public",filterField:"public",type:"Boolean",width:150,customRender:e=>a("div",{class:"flex justify-center"},[a(D,{class:"px-3 font-bold py-1",textColor:e!=null&&e.record.public?"#0d6fa3":"#333333",bgColor:e!=null&&e.record.public?"#cbe9fc":"#eaeaea"},{default:()=>[e!=null&&e.record.public?"عمومی":"خصوصی"]})])},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:e=>Z(e.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],yt={class:"flex justify-between items-center mb-4"},kt=_("h2",null,"برند ها",-1),wt={class:"gap-2 flex justify-center"},It=_("span",null,"حذف",-1),Bt=_("span",null,"ویرایش",-1),Ct={class:"grid grid-cols-3 gap-4"},Ut={key:0},Tt=_("div",{style:{"margin-top":"8px"}},"آپلود",-1),xe=tt({__name:"index",setup(e){`${O()||localStorage.getItem("tamin_token")||""}`;const[C,M]=Q(),E=d({columns:xt,api:rt,defaultPageLimit:20}),h=d(!1),k=d(!1),w=d(null),V=d([]),b=d(0),I=d(0),n=et({title:"",active:!0,image:void 0,owner_id:void 0,id:void 0,description:void 0,public:void 0});let z=mt.cloneDeep(n);d();const g=d([]);function H(){V.value=[],k.value=!1,w.value=null,h.value=!0}function R(){Object.assign(n,z),g.value=[],h.value=!1}function S(l){return l.type.startsWith("image/")?l.size/1024/102