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

2 lines
8.8 KiB
JavaScript
Raw Normal View History

2026-07-15 17:50:32 +03:30
import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-59e3a60f.js";import{_ as K,u as Q}from"./useBaseTable-37cc5c4e.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-f45a0e84.js";import{I as $}from"./Icon-1df01939.js";import{t as Z}from"./useDataTime-d0312d21.js";import{g as M}from"./convert-2ad76038.js";import{_ as q}from"./TextPreview.vue_vue_type_script_setup_true_lang-ca3a87e7.js";import{_ as D}from"./CustomTag.vue_vue_type_script_setup_true_lang-5a76a041.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 se,D as m,I as ne}from"./index-4ed3ac6f.js";import{g as O}from"./index-2fe56cac.js";import{l as re}from"./lodash-93f7118d.js";import{a as ue,u as ce,c as pe,d as me}from"./category-be124c54.js";import{M as de,_ as fe}from"./index-11cc1aef.js";import{I as _e,a as ge}from"./index-9cf626d0.js";import{_ as ve,F as he}from"./index-4208692b.js";import{U as be}from"./index-f8e98698.js";import{T as N}from"./isSymbol-affa2e59.js";import"./index-59052094.js";import"./vnode-89c9e7cb.js";import"./_plugin-vue_export-helper-63226944.js";import"./updateLocale-bc84b8d6.js";import"./useState-8f767204.js";import"./index-a14f73db.js";import"./toArray-7ead3702.js";import"./FormItemContext-2461cbab.js";import"./pickAttrs-5db0ba14.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-33c708c4.js";import"./index-634fb851.js";import"./isNumeric-3f69e2aa.js";import"./index-0555c827.js";import"./index-da74a8b6.js";import"./styleChecker-8552d8dc.js";import"./index-23a87c32.js";import"./LeftOutlined-61414320.js";import"./css-aae66f86.js";import"./DialogWrap-576e3f01.js";import"./index-0259cd70.js";import"./textUtils-c37780ad.js";import"./isPlainObject-28bd6686.js";import"./_flatRest-1f22619a.js";import"./Col-a5f65985.js";import"./useRefs-68a2914e.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=M(e.record.image);return k?a("img",{src:k,width:60},null):a($,{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(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",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"},Ie=_("span",null,"حذف",-1),Ce=_("span",null,"ویرایش",-1),Ue={class:"grid grid-cols-3 gap-4"},Be={key:0},Te=_("div",{style:{"margin-top":"8px"}},"آپلود",-1),vt=ee({__name:"index",setup(e){`${O()||localStorage.getItem("tamin_token")||""}`;const[k,R]=Q(),E=d({columns:xe,api:ue,defaultPageLimit:20}),h=d(!1),w=d(!1),I=d(null),V=d([]),b=d(0),C=d(0),s=te({title:"",active:!0,image:void 0,owner_id:void 0,id:void 0,description:void 0,public:void 0});let z=re.cloneDeep(s);d();const g=d([]);function H(){V.value=[],w.value=!1,I.value=null,h.value=!0}function L(){Object.assign(s,z),g.value=[],h.value=!1}function S(l){return l.type.startsWith("im