2026-10-10 10:47:47 +03:30
|
|
|
import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-3186fd13.js";import{_ as K,u as Q}from"./useBaseTable-e684a9eb.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-de1581fe.js";import{I as T}from"./Icon-623de3ea.js";import{t as Z}from"./useDataTime-284d8334.js";import{g as $}from"./convert-2ad76038.js";import{_ as q}from"./TextPreview.vue_vue_type_script_setup_true_lang-fd9d13cd.js";import{_ as j}from"./CustomTag.vue_vue_type_script_setup_true_lang-be5073f4.js";import{e as a,d as ee,i as d,h as te,x as ae,p as oe,o as D,c as F,b as _,w as r,f as ie,l as c,L as le,n as ne,H as m,M as se}from"./index-185c08ed.js";import{g as O}from"./index-58ff633a.js";import{l as re}from"./lodash-0633e973.js";import{a as ue,u as ce,c as pe,d as me}from"./category-840b2ecb.js";import{M as de,_ as fe}from"./index-2573091c.js";import{I as _e,b as ge}from"./index-a29d0cc7.js";import{_ as ve,F as he}from"./index-82269ca5.js";import{U as be}from"./index-c950ff98.js";import{T as N}from"./isSymbol-18d6b370.js";import"./index-5a721f2f.js";import"./vnode-8a371720.js";import"./_plugin-vue_export-helper-e26fbd9a.js";import"./updateLocale-d0f4ef4d.js";import"./index-f463cb03.js";import"./shallowequal-6622fb79.js";import"./useState-50bb8c1f.js";import"./useMemo-4f3c1eb4.js";import"./FormItemContext-2d3e7341.js";import"./omit-d93eaa18.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-e9f1c563.js";import"./index-9383b001.js";import"./Badge-51142f0a.js";import"./isNumeric-3f69e2aa.js";import"./index-9e9f857b.js";import"./index-a2809ce1.js";import"./index-33777d70.js";import"./styleChecker-7bb1c6f5.js";import"./index-975de3f6.js";import"./index-1f485cc0.js";import"./DialogWrap-9863a7c0.js";import"./pickAttrs-e062aa3e.js";import"./css-aae66f86.js";import"./index-0ee37254.js";import"./toArray-da31f78e.js";import"./SearchOutlined-d9b8def2.js";import"./isMobile-e2e89480.js";import"./index-77ae4c49.js";import"./textUtils-c37780ad.js";import"./isPlainObject-5638f45d.js";import"./_flatRest-947e7901.js";import"./Col-2d184441.js";import"./index-b2f5f66c.js";import"./useRefs-b56c6fdc.js";const xe=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:e=>e.index+1},{title:"تصویر ",dataIndex:"image",key:"image",width:80,customRender:e=>{const k=$(e.record.image);return k?a("img",{src:k,width:60},null):a(T,{icon:"vuesax-linear:category"},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:150,customRender:e=>a("div",{class:"flex justify-center"},[a(j,{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(j,{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",width:80,customRender:e=>e.record.created_at?Z(e.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"},Ce=_("span",null,"حذف",-1),Ie=_("span",null,"ویرایش",-1),Ue={class:"grid grid-cols-3 gap-4"},Be={key:0},Me=_("div",{style:{"margin-top":"8px"}},"آپلود",-1),Ut=ee({__name:"index",setup(e){`${O()||localStorage.getItem("tamin_token")||""}`;const[k,L]=Q(),E=d({columns:xe,api:ue,defaultPageLimit:20}),h=d(!1),w=d(!1),C=d(null),V=d([]),b=d(0),I=d(0),n=te({title:"",active:!0,imag
|