index-IWro36R1.js 3.7 KB

1
  1. import{d as T,b as g,T as v}from"./baTable-MdxYOkAk.js";import{a1 as k,_ as I}from"./index-EwE51S_X.js";import{d as B,r as C,a2 as M,a as N,av as V,o as S,K as i,e as o,f as c,y as d,L as p,j as s,F as E,B as F,p as L,l as R,i as m,m as A}from"./vue-A59npLRR.js";import{_ as q}from"./popupForm.vue_vue_type_script_setup_true_lang-a80RGh4H.js";import{T as G}from"./index-K8IR974I.js";import"./echarts-cxb9vJr1.js";import"./index-r6iTpmP6.js";import"./index-XALue448.js";const O=r=>(L("data-v-20156e99"),r=r(),R(),r),$={class:"default-main ba-table-box"},j=O(()=>m("div",{class:"ba-markdown"},[m("div",null,[A(" 1、图文、图片、音频、视频,需要您在微信公众号管理平台进行上传。"),m("a",{href:"https://mp.weixin.qq.com",target:"_blank"},"微信公众号管理平台")]),m("div",null,"2、下方图文列表中,展示的是在微信公众平台已发布的图文信息,非已群发的信息。")],-1)),H=B({name:"xmwechat/offiaccount/material",__name:"index",setup(r){const a=C({materialType:"text",materialTypeList:[{label:"文本",name:"text"},{label:"图文",name:"news"},{label:"图片",name:"image"},{label:"音频",name:"voice"},{label:"视频",name:"video"}]}),{t}=M(),u=N(),b=T(["edit","delete"]),e=new g(new k("/admin/xmwechat.offiaccount.Material/"),{pk:"id",column:[{label:t("xmwechat.offiaccount.material.title"),prop:"title",align:"center",operator:!1,show:!1},{label:t("xmwechat.offiaccount.material.name"),prop:"name",align:"center",operator:!1,show:!1},{label:t("xmwechat.offiaccount.material.image"),prop:"image",align:"center",render:"image",operator:!1,show:!1},{label:t("xmwechat.offiaccount.material.content"),prop:"content",align:"center",operator:!1},{label:t("xmwechat.offiaccount.material.create_time"),prop:"create_time",align:"center",render:"datetime",operator:"RANGE",sortable:"custom",width:160,timeFormat:"yyyy-mm-dd hh:MM:ss",show:!1},{label:t("xmwechat.offiaccount.material.update_time"),prop:"update_time",align:"center",render:"datetime",operator:"RANGE",width:200,timeFormat:"yyyy-mm-dd hh:MM:ss"},{label:t("Operate"),align:"center",width:100,render:"buttons",buttons:b,operator:!1}],dblClickNotEditColumn:["all"]},{defaultItems:{type:"text",status:"1",content:null}});V("baTable",e);const h=l=>{a.materialType=l,e.table.filter.search=[{field:"type",val:l,operator:"="}],e.getIndex(),a.materialType=="text"?(e.table.column[0].show=!1,e.table.column[1].show=!1,e.table.column[2].show=!1,e.table.column[3].show=!0,e.table.column[4].show=!0,e.table.column[5].show=!0,e.table.column[6].show=!0):a.materialType=="news"?(e.table.column[0].show=!0,e.table.column[1].show=!1,e.table.column[2].show=!1,e.table.column[3].show=!1,e.table.column[5].show=!0,e.table.column[6].show=!1):(a.materialType=="image"||a.materialType=="voice"||a.materialType=="video")&&(e.table.column[0].show=!1,e.table.column[1].show=!0,e.table.column[2].show=!1,e.table.column[3].show=!1,e.table.column[5].show=!0,e.table.column[6].show=!1)};return S(()=>{var l;e.table.ref=u.value,e.mount(),e.table.filter.search=[{field:"type",val:a.materialType,operator:"="}],(l=e.getIndex())==null||l.then(()=>{e.initSort(),e.dragSort()})}),(l,f)=>{const w=i("el-alert"),_=i("el-tab-pane"),y=i("el-tabs");return o(),c("div",$,[a.materialType==="text"?(o(),d(G,{key:0,buttons:["refresh","add"]})):(o(),d(w,{key:1,class:"ba-table-alert","show-icon":""},{default:p(()=>[j]),_:1})),s(y,{type:"border-card",modelValue:a.materialType,"onUpdate:modelValue":f[0]||(f[0]=n=>a.materialType=n),onTabChange:h},{default:p(()=>[(o(!0),c(E,null,F(a.materialTypeList,(n,x)=>(o(),c("div",{key:x},[s(_,{label:n.label,name:n.name},{default:p(()=>[s(v,{ref_for:!0,ref_key:"tableRef",ref:u},null,512)]),_:2},1032,["label","name"])]))),128))]),_:1},8,["modelValue"]),s(q)])}}}),X=I(H,[["__scopeId","data-v-20156e99"]]);export{X as default};