2 lines
9.2 KiB
JavaScript
2 lines
9.2 KiB
JavaScript
import{_ as X}from"./BasicModal.vue_vue_type_style_index_0_lang-04d97f2a.js";import{_ as G,u as Q}from"./useBaseTable-3820970d.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-5de0d8e3.js";import{I as $}from"./Icon-87be71cf.js";import{t as Z}from"./useDataTime-4d99ffa4.js";import{g as M}from"./convert-2ad76038.js";import{_ as q}from"./TextPreview.vue_vue_type_script_setup_true_lang-55d9718f.js";import{_ as j}from"./CustomTag.vue_vue_type_script_setup_true_lang-63586118.js";import{b as a,d as ee,g as d,r as te,v as ae,l as oe,o as D,c as F,a as _,w as r,e as ie,j as c,J as le,k as ne,D as m,K as se}from"./index-6af34310.js";import{g as O}from"./index-fedcc8bf.js";import{l as re}from"./lodash-e4e61e75.js";import{a as ue,u as ce,c as pe,d as me}from"./category-d3ca658c.js";import{M as de,_ as fe}from"./index-402d2a38.js";import{I as _e,b as ge}from"./index-a9aa8901.js";import{_ as ve,F as he}from"./index-d224c105.js";import{U as be}from"./index-a8d977ad.js";import{T as N}from"./isSymbol-74667f0e.js";import"./index-1cc8f5ba.js";import"./vnode-6bd0f81f.js";import"./_plugin-vue_export-helper-4395e3ae.js";import"./updateLocale-ce5acd65.js";import"./index-54c8d4d2.js";import"./shallowequal-73e7ce81.js";import"./useState-99a639ca.js";import"./useMemo-b6d62481.js";import"./FormItemContext-752394af.js";import"./omit-0d248b9d.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-064ba967.js";import"./index-2e0cb6a7.js";import"./Badge-34585beb.js";import"./isNumeric-3f69e2aa.js";import"./index-12ea9e69.js";import"./index-12698051.js";import"./index-7ce3f98c.js";import"./styleChecker-3b14718f.js";import"./index-850ddaf5.js";import"./index-56af14ac.js";import"./DialogWrap-532fa905.js";import"./pickAttrs-a6fd0b4c.js";import"./css-aae66f86.js";import"./index-0bc83ff9.js";import"./toArray-1c539327.js";import"./SearchOutlined-15a5b0f1.js";import"./isMobile-e2e89480.js";import"./index-f3fb0dd4.js";import"./textUtils-c37780ad.js";import"./isPlainObject-f211f712.js";import"./_flatRest-fd0e6fb4.js";import"./Col-1a0e8c9f.js";import"./index-dd895eee.js";import"./useRefs-a7f6cac5.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(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},Te=_("div",{style:{"margin-top":"8px"}},"آپلود",-1),Ut=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),C=d(null),V=d([]),b=d(0),I=d(0),n=te({title:"",active:!0,imag
|