2 lines
9.2 KiB
JavaScript
2 lines
9.2 KiB
JavaScript
import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-f76fec1b.js";import{_ as K,u as Q}from"./useBaseTable-45427402.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-e7cef717.js";import{I as T}from"./Icon-b8613529.js";import{t as Z}from"./useDataTime-7db5a46b.js";import{g as $}from"./convert-2ad76038.js";import{_ as q}from"./TextPreview.vue_vue_type_script_setup_true_lang-a779e657.js";import{_ as j}from"./CustomTag.vue_vue_type_script_setup_true_lang-ae242498.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-166b4ef1.js";import{g as O}from"./index-b9bbd6f2.js";import{l as re}from"./lodash-593efeb6.js";import{a as ue,u as ce,c as pe,d as me}from"./category-52bfb93c.js";import{M as de,_ as fe}from"./index-58b86fb2.js";import{I as _e,b as ge}from"./index-7005b758.js";import{_ as ve,F as he}from"./index-f98d2511.js";import{U as be}from"./index-6c7cbb7d.js";import{T as N}from"./isSymbol-c953ccc2.js";import"./index-de862045.js";import"./vnode-c85f1a09.js";import"./_plugin-vue_export-helper-e5be29c6.js";import"./updateLocale-6eb93789.js";import"./index-08810a1f.js";import"./shallowequal-78a96afc.js";import"./useState-43a565ec.js";import"./useMemo-99a24173.js";import"./FormItemContext-0e89b3aa.js";import"./omit-55909a9d.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-6e462f47.js";import"./index-8bcb6210.js";import"./Badge-a3c7a3a7.js";import"./isNumeric-3f69e2aa.js";import"./index-ad625a72.js";import"./index-011e0893.js";import"./index-1465c5c8.js";import"./styleChecker-2eddf97d.js";import"./index-75be736e.js";import"./index-7f046693.js";import"./DialogWrap-88ddfe3e.js";import"./pickAttrs-5cd7ef1f.js";import"./css-aae66f86.js";import"./index-3ad11dd3.js";import"./toArray-cf38ce67.js";import"./SearchOutlined-3d6399d7.js";import"./isMobile-e2e89480.js";import"./index-991e4e35.js";import"./textUtils-c37780ad.js";import"./isPlainObject-ed4c9976.js";import"./_flatRest-ae97161b.js";import"./Col-6dc2da7a.js";import"./index-dfddf43f.js";import"./useRefs-ca4d56b6.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
|