2026-07-26 16:24:36 +03:30
|
|
|
import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-acac591d.js";import{_ as K,u as Q}from"./useBaseTable-c2761680.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-c37c204f.js";import{I as P}from"./Icon-6b61a044.js";import{t as Z}from"./useDataTime-f3f5ea50.js";import{g as $}from"./convert-2ad76038.js";import{_ as q}from"./TextPreview.vue_vue_type_script_setup_true_lang-243a4d0d.js";import{_ as D}from"./CustomTag.vue_vue_type_script_setup_true_lang-1741adcd.js";import{b as a,d as ee,g as d,r as te,v as ae,l as oe,o as F,c as j,a as _,w as r,e as ie,j as c,H as le,k as ne,D as m,I as se}from"./index-4dccb174.js";import{g as O}from"./index-d825960e.js";import{a as re,u as ue,c as ce,d as pe}from"./brand-32949bcb.js";import{l as me}from"./lodash-0f8911c3.js";import{M as de,_ as fe}from"./index-a34bba22.js";import{I as _e,a as ge}from"./index-4762b7d8.js";import{_ as ve,F as he}from"./index-495b789b.js";import{U as be}from"./index-bd458d30.js";import{T as N}from"./isSymbol-80c521a5.js";import"./index-f08752bf.js";import"./vnode-8e0d49aa.js";import"./_plugin-vue_export-helper-fc650ede.js";import"./updateLocale-72f02bbd.js";import"./useState-7760581d.js";import"./index-c7f692d2.js";import"./toArray-8c6d8405.js";import"./FormItemContext-d26e27b7.js";import"./pickAttrs-13d22210.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-c92640b4.js";import"./index-895cd0d7.js";import"./isNumeric-3f69e2aa.js";import"./index-00d83bfc.js";import"./index-8f783c3c.js";import"./styleChecker-133e2b1a.js";import"./index-ce6d92ba.js";import"./LeftOutlined-2d8ca514.js";import"./css-aae66f86.js";import"./DialogWrap-715ad625.js";import"./index-6a54d8cb.js";import"./textUtils-c37780ad.js";import"./isPlainObject-819f93b0.js";import"./_flatRest-00780a2d.js";import"./Col-c87d3a9d.js";import"./useRefs-b5c660b2.js";const xe=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:t=>t.index+1},{title:"تصویر ",dataIndex:"image",key:"image",customRender:t=>{const C=$(t.record.image);return a("img",{src:C,width:60},null)}},{title:"عنوان",dataIndex:"title",key:"title"},{title:"توضیحات",dataIndex:"description",key:"description",width:500,customRender:t=>a(q,{text:t.record.description},null)},{title:"وضعیت ",dataIndex:"active",key:"active",type:"Boolean",width:100,customRender:t=>a("div",{class:"flex justify-center"},[a(D,{class:"px-3 font-bold py-1",textColor:t!=null&&t.record.active?"#65a30d":"#dc2626",bgColor:t!=null&&t.record.active?"#ecfccb":"#fee2e2"},{default:()=>[t!=null&&t.record.active?"فعال":"غیر فعال"]})])},{title:"وضعیت دسترسی ",dataIndex:"public",key:"public",filterField:"public",type:"Boolean",width:150,customRender:t=>a("div",{class:"flex justify-center"},[a(D,{class:"px-3 font-bold py-1",textColor:t!=null&&t.record.public?"#0d6fa3":"#333333",bgColor:t!=null&&t.record.public?"#cbe9fc":"#eaeaea"},{default:()=>[t!=null&&t.record.public?"عمومی":"خصوصی"]})])},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:t=>Z(t.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],ye={class:"flex justify-between items-center mb-4"},ke=_("h2",null,"برند ها",-1),we={class:"gap-2 flex justify-center"},Ie=_("span",null,"حذف",-1),Be=_("span",null,"ویرایش",-1),Ce={class:"grid grid-cols-3 gap-4"},Ue={key:0},Te=_("div",{style:{"margin-top":"8px"}},"آپلود",-1),vt=ee({__name:"index",setup(t){`${O()||localStorage.getItem("tamin_token")||""}`;const[C,M]=Q(),E=d({columns:xe,api:re,defaultPageLimit:20}),h=d(!1),k=d(!1),w=d(null),V=d([]),b=d(0),I=d(0),n=te({title:"",active:!0,image:void 0,owner_id:void 0,id:void 0,description:void 0,public:void 0});let z=me.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/1024<5?!0:(m.error("حجم تصویر باید کمتر از 5MB باشد"),!1)
|