Files
machartaa_admin_dist/dist/assets/index-1990dcf1.js
T

2 lines
8.6 KiB
JavaScript
Raw Normal View History

2026-07-26 21:18:50 +03:30
import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-7e7e37ca.js";import{_ as K,u as Q}from"./useBaseTable-1503ffff.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-c90761af.js";import{I as P}from"./Icon-ecd42e7a.js";import{t as Z}from"./useDataTime-57fc1f09.js";import{g as $}from"./convert-2ad76038.js";import{_ as q}from"./TextPreview.vue_vue_type_script_setup_true_lang-83aa5405.js";import{_ as D}from"./CustomTag.vue_vue_type_script_setup_true_lang-26ce6308.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-a1cbdc04.js";import{g as O}from"./index-9eef711d.js";import{a as re,u as ue,c as ce,d as pe}from"./brand-852796c9.js";import{l as me}from"./lodash-5e93f948.js";import{M as de,_ as fe}from"./index-9c349efd.js";import{I as _e,a as ge}from"./index-0f8757b7.js";import{_ as ve,F as he}from"./index-a23af28e.js";import{U as be}from"./index-efbd5d64.js";import{T as N}from"./isSymbol-52713665.js";import"./index-81112407.js";import"./vnode-2778ccba.js";import"./_plugin-vue_export-helper-a1c1a00b.js";import"./updateLocale-16bb7b9a.js";import"./useState-7eb66b9e.js";import"./index-1a119724.js";import"./toArray-8d6c1cc7.js";import"./FormItemContext-8408af52.js";import"./pickAttrs-21cead41.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-c33a79e6.js";import"./index-022013ee.js";import"./isNumeric-3f69e2aa.js";import"./index-be2c7609.js";import"./index-c8c86a9a.js";import"./styleChecker-0c4cbd10.js";import"./index-9c0e62f2.js";import"./LeftOutlined-40fb7e14.js";import"./css-aae66f86.js";import"./DialogWrap-65e27abc.js";import"./index-039fd9c4.js";import"./textUtils-c37780ad.js";import"./isPlainObject-f510e32a.js";import"./_flatRest-61b4c813.js";import"./Col-08ce96dd.js";import"./useRefs-d6fb9168.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)