1 |
- /* empty css *//* empty css */import{_ as e}from"./index.vue_vue_type_script_setup_true_lang-8d4d2c2d.js";import{u as t}from"./useGetList-10bd17fb.js";/* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css */import{_ as a}from"./destroy.vue_vue_type_script_setup_true_lang-3e425698.js";import{_ as s}from"./update.vue_vue_type_script_setup_true_lang-03546537.js";import{_ as l}from"./add.vue_vue_type_script_setup_true_lang-ff3ef2bf.js";import{_ as o}from"./search.vue_vue_type_script_setup_true_lang-5fdc06f2.js";/* empty css *//* empty css *//* empty css */import r from"./create-e6f16df9.js";import{u as i}from"./useDestroy-ee426241.js";import{b as p}from"./index-7e2f0ac4.js";import{d as u,q as m,n,z as d,ar as c,f as _,o as j,c as y,a as b,w as f,F as v,p as g,l as h,e as k,Z as x,b as w,t as C,a5 as V,a6 as S,B as M,D as N,aa as q,ah as U,ab as z,a2 as D}from"./index-fe6c8641.js";/* empty css */import"./index-7cd89372.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./useCreate-21e18dc5.js";import"./useShow-401252b0.js";/* empty css *//* empty css *//* empty css */import"./http-3c23965b.js";const F={key:0},G={class:"table-default"},L={class:"pt-5 pl-2"},Z=u({__name:"index",setup(u){const Z=m([]);let B=m(!1);const{data:H,query:I,search:K,reset:P,loading:R}=t("system/notices/notice/list",!0),{destroy:W,deleted:X}=i("post"),Y=n((()=>{var e;return null==(e=H.value)?void 0:e.data})),$=m({}),A=e=>{p(e).then((e=>{Z.value=e.data}))},E=e=>{A(e?{name:e}:{})},J=e=>{B.value=!0,$.value=e?e.id:e};return d((()=>{A({}),K(),X(K)})),(t,i)=>{const p=V,u=S,m=M,n=N,d=o,H=l,X=q,A=U,O=s,Q=a,T=z,ee=e,te=c("action"),ae=D;return _(B)?(j(),h(r,{key:1,onClose:i[3]||(i[3]=e=>(_(K),B.value=!1,void K())),primary:$.value,api:_("system/notices/notice/edit")},null,8,["primary","api"])):(j(),y("div",F,[b(d,{search:_(K),reset:_(P)},{body:f((()=>[b(u,{label:"标题"},{default:f((()=>[b(p,{modelValue:_(I).title,"onUpdate:modelValue":i[0]||(i[0]=e=>_(I).title=e),clearable:""},null,8,["modelValue"])])),_:1}),b(u,{label:"通知类型"},{default:f((()=>[b(n,{modelValue:_(I).notice_type_id,"onUpdate:modelValue":i[1]||(i[1]=e=>_(I).notice_type_id=e),filterable:"",remote:"",clearable:"","remote-method":E},{default:f((()=>[(j(!0),y(v,null,g(Z.value,(e=>(j(),h(m,{key:e.id,label:e.name,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),k("div",G,[k("div",L,[x(b(H,{onClick:i[2]||(i[2]=e=>J(null))},null,512),[[te,"contentManage.System\\Notices.addNotice"]])]),x((j(),h(T,{data:_(Y),class:"mt-3"},{default:f((()=>[b(X,{prop:"sort",label:"排序"}),b(X,{prop:"title",label:"标题"}),b(X,{prop:"type_txt",label:"类型"}),b(X,{prop:"notice_type_txt",label:"通知类型"}),b(X,{label:"通知人群"},{default:f((e=>[(j(!0),y(v,null,g(e.row.notice_obj,(e=>(j(),h(A,{type:"success",class:"m-1",key:e.id,size:"default",effect:"dark"},{default:f((()=>[w(C(e.name),1)])),_:2},1024)))),128))])),_:1}),b(X,{prop:"created_at",label:"发布时间"}),b(X,{label:"操作",width:"200"},{default:f((e=>[x(b(O,{onClick:t=>J(e.row)},null,8,["onClick"]),[[te,"contentManage.System\\Notices.edit"]]),x(b(Q,{onClick:t=>_(W)("system/notices/notice/del",e.row.id)},null,8,["onClick"]),[[te,"contentManage.System\\Notices.delete"]])])),_:1})])),_:1},8,["data"])),[[ae,_(R)]]),b(ee)])]))}}});export{Z as default};
|