2025-03-20 10:46:42 +08:00

2 lines
4.0 KiB
JavaScript

import{L as R,M as $,N as O,O as P,B as T,C as U,w as A,D as I}from"./element-plus.2acb577d.js";import{_ as j}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{u as q}from"./usePaging.23706826.js";import{u as K}from"./useDictOptions.4fbfb4d7.js";import{_ as Q,a as Z,b as z,c as G}from"./edit.vue_vue_type_script_setup_true_name_oaMessageEdit_lang.d353022e.js";import{t as H,f as J}from"./index.81df6f20.js";import{d as B,s as W,r as C,Z as X,o as F,c as Y,U as t,L as a,u as o,R as m,M as ee,K as w,a as g,S as te,i as oe,Q as ae,n as le}from"./@vue.821a47ec.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.f292cd50.js";import"./lodash.6bfd3540.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";const ie={class:"mt-4"},se={class:"flex mt-4 justify-end"},ne=B({name:"oaMessageLists"}),Qe=B({...ne,setup(re){const _=W(),f=C(!1),p=X({title:"",from_uid:"",to_uid:""}),b=C([]),E=i=>{b.value=i.map(({id:e})=>e)},{dictData:D}=K(""),{pager:n,getLists:r,resetParams:k,resetPage:y}=q({fetchFun:G,params:p}),h=async i=>{var d,u;let e=await Z({id:i.id});f.value=!0,await le(),(d=_.value)==null||d.open("edit"),(u=_.value)==null||u.setFormData(e)},V=async i=>{await J.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await z({id:i}),r()};return r(),(i,e)=>{const d=T,u=U,c=A,x=I,v=R,s=$,M=O,L=j,S=P;return F(),Y("div",null,[t(v,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(x,{class:"mb-[-16px]",model:o(p),inline:""},{default:a(()=>[t(u,{label:"\u6D88\u606F\u4E3B\u9898",prop:"title"},{default:a(()=>[t(d,{class:"w-[280px]",modelValue:o(p).title,"onUpdate:modelValue":e[0]||(e[0]=l=>o(p).title=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6D88\u606F\u4E3B\u9898"},null,8,["modelValue"])]),_:1}),t(u,null,{default:a(()=>[t(c,{type:"primary",onClick:o(y)},{default:a(()=>e[3]||(e[3]=[m("\u67E5\u8BE2")])),_:1},8,["onClick"]),t(c,{onClick:o(k)},{default:a(()=>e[4]||(e[4]=[m("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),ee((F(),w(v,{class:"!border-none",shadow:"never"},{default:a(()=>[g("div",ie,[t(M,{data:o(n).lists,onSelectionChange:E},{default:a(()=>[t(s,{label:"\u6D88\u606F\u4E3B\u9898",prop:"title","show-overflow-tooltip":""}),t(s,{label:"\u6D88\u606F\u5185\u5BB9",prop:"content","show-overflow-tooltip":""}),t(s,{label:"\u662F\u5426\u5DF2\u8BFB",prop:"is_read","show-overflow-tooltip":""}),t(s,{label:"\u9605\u8BFB\u65F6\u95F4","show-overflow-tooltip":""},{default:a(({row:l})=>[m(te(l.read_time==0?"":o(H)(l.read_time,"yyyy-mm-dd hh:MM")),1)]),_:1}),t(s,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),t(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:l})=>[t(c,{type:"primary",link:"",onClick:N=>h(l)},{default:a(()=>e[5]||(e[5]=[m(" \u8BE6\u60C5 ")])),_:2},1032,["onClick"]),t(c,{type:"danger",link:"",onClick:N=>V(l.id)},{default:a(()=>e[6]||(e[6]=[m(" \u5220\u9664 ")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),g("div",se,[t(L,{modelValue:o(n),"onUpdate:modelValue":e[1]||(e[1]=l=>oe(n)?n.value=l:null),onChange:o(r)},null,8,["modelValue","onChange"])])]),_:1})),[[S,o(n).loading]]),o(f)?(F(),w(Q,{key:0,ref_key:"editRef",ref:_,"dict-data":o(D),onSuccess:o(r),onClose:e[2]||(e[2]=l=>(f.value=!1,o(r)()))},null,8,["dict-data","onSuccess"])):ae("",!0)])}}});export{Qe as default};