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
4.8 KiB
1 lines
4.8 KiB
import{d as O,v as Y,r as m,l as j,ag as E,M as H,k as t,h as u,c as h,a as i,t as b,u as o,e as s,w as r,F as k,O as y,m as L,i as I,_ as $,ac as z,G,bg as K,D as W,H as A,K as J,E as Q}from"./index-208710d8.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{u as M}from"./dict-a1ae66ab.js";import{b as X,a as Z,e as ee,c as ae}from"./follow_up_reminders-7c98eda8.js";const te={class:"main-container"},le={class:"detail-head"},oe=i("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),se={class:"ml-[1px]"},re=i("span",{class:"adorn"},"|",-1),de={class:"right"},ie={class:"fixed-footer-wrap"},ne={class:"fixed-footer"},Pe=O({__name:"follow_up_reminders_edit",setup(ue){const V=Y(),w=parseInt(V.query.id),p=m(!1),R=V.meta.title,x={id:0,follow_up_logs_id:"",reminder_time:"",reminder_method:"",task_status:"",err_msg:""},l=j({...x});w&&(async(c=0)=>{Object.assign(l,x);const e=await(await X(c)).data;Object.keys(l).forEach(d=>{e[d]!=null&&(l[d]=e[d])})})(w);const U=m();m([]);let f=m([]);(async()=>{f.value=await(await M("reminder_method")).data.dictionary})(),E(()=>f.value,()=>{l.reminder_method=f.value[0].value});let g=m([]);(async()=>{g.value=await(await M("task_status")).data.dictionary})(),E(()=>g.value,()=>{l.task_status=g.value[0].value});const D=m([]);(async()=>{D.value=await(await Z({})).data})();const q=H(()=>({follow_up_logs_id:[{required:!0,message:t("followUpLogsIdPlaceholder"),trigger:"blur"}],reminder_time:[{required:!0,message:t("reminderTimePlaceholder"),trigger:"blur"}],reminder_method:[{required:!0,message:t("reminderMethodPlaceholder"),trigger:"blur"}],task_status:[{required:!0,message:t("taskStatusPlaceholder"),trigger:"blur"}],err_msg:[{required:!0,message:t("errMsgPlaceholder"),trigger:"blur"}]})),C=async c=>{p.value||!c||await c.validate(async e=>{e&&(p.value=!0,(w?ee:ae)(l).then(n=>{p.value=!1,history.back()}).catch(n=>{p.value=!1}))})},F=()=>{history.back()};return(c,e)=>{const d=$,v=z,n=G,S=K,B=W,T=A,N=J,P=Q;return u(),h("div",te,[i("div",le,[i("div",{class:"left",onClick:e[0]||(e[0]=a=>F())},[oe,i("span",se,b(o(t)("returnToPreviousPage")),1)]),re,i("span",de,b(o(R)),1)]),s(N,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[s(T,{model:l,"label-width":"90px",ref_key:"formRef",ref:U,rules:o(q),class:"page-form"},{default:r(()=>[s(n,{label:o(t)("followUpLogsId"),prop:"follow_up_logs_id"},{default:r(()=>[s(v,{class:"input-width",modelValue:l.follow_up_logs_id,"onUpdate:modelValue":e[1]||(e[1]=a=>l.follow_up_logs_id=a),clearable:"",placeholder:o(t)("followUpLogsIdPlaceholder")},{default:r(()=>[s(d,{label:"请选择",value:""}),(u(!0),h(k,null,y(D.value,(a,_)=>(u(),L(d,{key:_,label:a.id,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),s(n,{label:o(t)("reminderTime"),prop:"reminder_time",class:"input-width"},{default:r(()=>[s(S,{class:"flex-1 !flex",modelValue:l.reminder_time,"onUpdate:modelValue":e[2]||(e[2]=a=>l.reminder_time=a),clearable:"",type:"datetime","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:o(t)("reminderTimePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),s(n,{label:o(t)("reminderMethod"),prop:"reminder_method"},{default:r(()=>[s(v,{class:"input-width",modelValue:l.reminder_method,"onUpdate:modelValue":e[3]||(e[3]=a=>l.reminder_method=a),clearable:"",placeholder:o(t)("reminderMethodPlaceholder")},{default:r(()=>[s(d,{label:"请选择",value:""}),(u(!0),h(k,null,y(o(f),(a,_)=>(u(),L(d,{key:_,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),s(n,{label:o(t)("taskStatus"),prop:"task_status"},{default:r(()=>[s(v,{class:"input-width",modelValue:l.task_status,"onUpdate:modelValue":e[4]||(e[4]=a=>l.task_status=a),clearable:"",placeholder:o(t)("taskStatusPlaceholder")},{default:r(()=>[s(d,{label:"请选择",value:""}),(u(!0),h(k,null,y(o(g),(a,_)=>(u(),L(d,{key:_,label:a.name,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),s(n,{label:o(t)("errMsg")},{default:r(()=>[s(B,{modelValue:l.err_msg,"onUpdate:modelValue":e[5]||(e[5]=a=>l.err_msg=a),type:"textarea",rows:"4",clearable:"",placeholder:o(t)("errMsgPlaceholder"),class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1}),i("div",ie,[i("div",ne,[s(P,{type:"primary",onClick:e[6]||(e[6]=a=>C(U.value))},{default:r(()=>[I(b(o(t)("save")),1)]),_:1}),s(P,{onClick:e[7]||(e[7]=a=>F())},{default:r(()=>[I(b(o(t)("cancel")),1)]),_:1})])])])}}});export{Pe as default};
|
|
|