You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
6.1 KiB
1 lines
6.1 KiB
import{d as H,v as J,l as K,r as _,h as r,c,e as a,w as n,a as g,t as u,u as e,i as y,k as l,F as h,O as w,m as k,J as M,B as L,S as W,E as q,_ as A,$ as Q,G as X,H as Y,K as Z,a1 as ee,a2 as te,a3 as ae,L as oe}from"./index-4c331f20.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{u as D}from"./dict-6dd77593.js";import{_ as le,g as ne,d as ie,a as re}from"./communication-records-edit.vue_vue_type_style_index_0_lang-b16a4ac2.js";import{_ as se}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css *//* empty css */const ce={class:"main-container"},ue={class:"flex justify-between items-center"},me={class:"text-lg"},de={class:"mt-[10px]"},pe={key:0},_e={key:0},ve={key:0},fe={class:"mt-[16px] flex justify-end"},ge=H({__name:"communication_records",setup(ye){const I=J().meta.title;let o=K({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{resource_id:"",communication_type:""}});const R=_();_([]);const b=_([]);(async()=>{b.value=await(await D("communication_type")).data.dictionary})();const E=_([]);(async()=>{E.value=await(await D("communication_result")).data.dictionary})();const T=_([]);(async()=>{T.value=await(await D("tag")).data.dictionary})();const p=(m=1)=>{o.loading=!0,o.page=m,ne({page:o.page,limit:o.limit,...o.searchParam}).then(i=>{o.loading=!1,o.data=i.data.data,o.total=i.data.total}).catch(()=>{o.loading=!1})};p();const v=_(null),$=()=>{v.value.setFormData(),v.value.showDialog=!0},z=m=>{v.value.setFormData(m),v.value.showDialog=!0},N=m=>{W.confirm(l("communicationRecordsDeleteTips"),l("warning"),{confirmButtonText:l("confirm"),cancelButtonText:l("cancel"),type:"warning"}).then(()=>{ie(m).then(()=>{p()}).catch(()=>{})})},F=_([]);(async()=>{F.value=await(await re({})).data})();const S=m=>{m&&(m.resetFields(),p())};return(m,i)=>{const f=q,x=A,P=Q,C=X,U=Y,V=Z,d=ee,j=te,O=ae,G=oe;return r(),c("div",ce,[a(V,{class:"box-card !border-none",shadow:"never"},{default:n(()=>[g("div",ue,[g("span",me,u(e(I)),1),a(f,{type:"primary",onClick:$},{default:n(()=>[y(u(e(l)("addCommunicationRecords")),1)]),_:1})]),a(V,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:n(()=>[a(U,{inline:!0,model:e(o).searchParam,ref_key:"searchFormRef",ref:R},{default:n(()=>[a(C,{label:e(l)("resourceId"),prop:"resource_id"},{default:n(()=>[a(P,{class:"w-[280px]",modelValue:e(o).searchParam.resource_id,"onUpdate:modelValue":i[0]||(i[0]=t=>e(o).searchParam.resource_id=t),clearable:"",placeholder:e(l)("resourceIdPlaceholder")},{default:n(()=>[(r(!0),c(h,null,w(F.value,(t,s)=>(r(),k(x,{key:s,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(C,{label:e(l)("communicationType"),prop:"communication_type"},{default:n(()=>[a(P,{class:"w-[280px]",modelValue:e(o).searchParam.communication_type,"onUpdate:modelValue":i[1]||(i[1]=t=>e(o).searchParam.communication_type=t),clearable:"",placeholder:e(l)("communicationTypePlaceholder")},{default:n(()=>[a(x,{label:"全部",value:""}),(r(!0),c(h,null,w(b.value,(t,s)=>(r(),k(x,{key:s,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(C,null,{default:n(()=>[a(f,{type:"primary",onClick:i[2]||(i[2]=t=>p())},{default:n(()=>[y(u(e(l)("search")),1)]),_:1}),a(f,{onClick:i[3]||(i[3]=t=>S(R.value))},{default:n(()=>[y(u(e(l)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),g("div",de,[M((r(),k(j,{data:e(o).data,size:"large"},{empty:n(()=>[g("span",null,u(e(o).loading?"":e(l)("emptyData")),1)]),default:n(()=>[a(d,{prop:"resource_id_name",label:e(l)("resourceId"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(d,{prop:"resource_type",label:e(l)("resourceType"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(d,{label:e(l)("communicationType"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:n(({row:t})=>[(r(!0),c(h,null,w(b.value,(s,B)=>(r(),c("div",null,[s.value==t.communication_type?(r(),c("div",pe,u(s.name),1)):L("",!0)]))),256))]),_:1},8,["label"]),a(d,{label:e(l)("communicationResult"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:n(({row:t})=>[(r(!0),c(h,null,w(E.value,(s,B)=>(r(),c("div",null,[s.value==t.communication_result?(r(),c("div",_e,u(s.name),1)):L("",!0)]))),256))]),_:1},8,["label"]),a(d,{prop:"communication_time",label:e(l)("communicationTime"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(d,{prop:"remarks",label:e(l)("remarks"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),a(d,{label:e(l)("tag"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:n(({row:t})=>[(r(!0),c(h,null,w(T.value,(s,B)=>(r(),c("div",null,[s.value==t.tag?(r(),c("div",ve,u(s.name),1)):L("",!0)]))),256))]),_:1},8,["label"]),a(d,{label:e(l)("operation"),fixed:"right","min-width":"120"},{default:n(({row:t})=>[a(f,{type:"primary",link:"",onClick:s=>z(t)},{default:n(()=>[y(u(e(l)("edit")),1)]),_:2},1032,["onClick"]),a(f,{type:"primary",link:"",onClick:s=>N(t.id)},{default:n(()=>[y(u(e(l)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[G,e(o).loading]]),g("div",fe,[a(O,{"current-page":e(o).page,"onUpdate:current-page":i[4]||(i[4]=t=>e(o).page=t),"page-size":e(o).limit,"onUpdate:page-size":i[5]||(i[5]=t=>e(o).limit=t),layout:"total, sizes, prev, pager, next, jumper",total:e(o).total,onSizeChange:i[6]||(i[6]=t=>p()),onCurrentChange:p},null,8,["current-page","page-size","total"])])]),a(le,{ref_key:"editCommunicationRecordsDialog",ref:v,onComplete:p},null,512)]),_:1})])}}});const We=se(ge,[["__scopeId","data-v-3386893c"]]);export{We as default};
|
|
|