2 lines
8.9 KiB
JavaScript
2 lines
8.9 KiB
JavaScript
import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-8174f671.js";import{_ as K,u as Q}from"./useBaseTable-e1239fc4.js";import{_ as Y}from"./button.vue_vue_type_style_index_0_lang-6d9e6004.js";import{I as $}from"./Icon-3cba35ff.js";import{t as Z}from"./useDataTime-39d365d2.js";import{g as M}from"./convert-2ad76038.js";import{_ as q}from"./TextPreview.vue_vue_type_script_setup_true_lang-e9e24e71.js";import{_ as D}from"./CustomTag.vue_vue_type_script_setup_true_lang-be045106.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-03881eed.js";import{g as O}from"./index-7ad871fb.js";import{l as re}from"./lodash-78d38859.js";import{a as ue,u as ce,c as pe,d as me}from"./category-078d9c2c.js";import{M as de,_ as fe}from"./index-a6dd452f.js";import{I as _e,b as ge}from"./index-ef10ea82.js";import{_ as ve,F as he}from"./index-0b8e44c3.js";import{U as be}from"./index-28c9621f.js";import{T as N}from"./isSymbol-72806280.js";import"./index-c4251c82.js";import"./vnode-dddce04c.js";import"./_plugin-vue_export-helper-7a7517f7.js";import"./updateLocale-ce915111.js";import"./index-bc659f42.js";import"./index-6e050cc2.js";import"./omit-0bf0f784.js";import"./useState-164294d5.js";import"./index-2b937264.js";import"./toArray-9d324686.js";import"./FormItemContext-77a35a1f.js";import"./pickAttrs-bd4d06ea.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-9e1881c0.js";import"./index-fbef06fa.js";import"./Badge-7d333aab.js";import"./isNumeric-3f69e2aa.js";import"./index-245d34d2.js";import"./index-2245e0eb.js";import"./styleChecker-230f1d69.js";import"./index-b336c82b.js";import"./DialogWrap-ab772604.js";import"./css-aae66f86.js";import"./index-d1c6db2d.js";import"./textUtils-c37780ad.js";import"./isPlainObject-b1bc5d24.js";import"./_flatRest-08d5cdb1.js";import"./Col-8b6b3139.js";import"./useRefs-d2ce1514.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),xt=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.
|