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
7.6 KiB
1 lines
7.6 KiB
import{d as F,v as T,l as B,r as h,h as g,c as S,e as l,w as i,a as f,t as u,u as e,i as v,k as a,J as N,m as z,M as I,E as $,D as L,G as j,H as M,K as G,O as H,P as J,Q as K,L as O}from"./index-f5d841af.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{_ as Q,g as q,d as A}from"./service-edit.vue_vue_type_style_index_0_lang-df56b9cc.js";import{_ as W}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css */const X={class:"main-container"},Y={class:"flex justify-between items-center"},Z={class:"text-lg"},ee={class:"mt-[10px]"},le={class:"mt-[16px] flex justify-end"},ae=F({__name:"service",setup(te){const P=T().meta.title;let t=B({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{service_name:"",preview_image_url:"",description:"",service_type:"",execution_rules:"",staff_reminder:"",customer_reminder:"",customer_confirmation:"",customer_feedback:"",status:""}});const b=h();h([]);const p=(d=1)=>{t.loading=!0,t.page=d,q({page:t.page,limit:t.limit,...t.searchParam}).then(o=>{t.loading=!1,t.data=o.data.data,t.total=o.data.total}).catch(()=>{t.loading=!1})};p();const c=h(null),V=()=>{c.value.setFormData(),c.value.showDialog=!0},y=d=>{c.value.setFormData(d),c.value.showDialog=!0},x=d=>{I.confirm(a("serviceDeleteTips"),a("warning"),{confirmButtonText:a("confirm"),cancelButtonText:a("cancel"),type:"warning"}).then(()=>{A(d).then(()=>{p()}).catch(()=>{})})},k=d=>{d&&(d.resetFields(),p())};return(d,o)=>{const _=$,m=L,s=j,C=M,w=G,n=H,U=J,E=K,R=O;return g(),S("div",X,[l(w,{class:"box-card !border-none",shadow:"never"},{default:i(()=>[f("div",Y,[f("span",Z,u(e(P)),1),l(_,{type:"primary",onClick:V},{default:i(()=>[v(u(e(a)("addService")),1)]),_:1})]),l(w,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:i(()=>[l(C,{inline:!0,model:e(t).searchParam,ref_key:"searchFormRef",ref:b},{default:i(()=>[l(s,{label:e(a)("serviceName"),prop:"service_name"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.service_name,"onUpdate:modelValue":o[0]||(o[0]=r=>e(t).searchParam.service_name=r),placeholder:e(a)("serviceNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("previewImageUrl"),prop:"preview_image_url"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.preview_image_url,"onUpdate:modelValue":o[1]||(o[1]=r=>e(t).searchParam.preview_image_url=r),placeholder:e(a)("previewImageUrlPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("description"),prop:"description"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.description,"onUpdate:modelValue":o[2]||(o[2]=r=>e(t).searchParam.description=r),placeholder:e(a)("descriptionPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("serviceType"),prop:"service_type"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.service_type,"onUpdate:modelValue":o[3]||(o[3]=r=>e(t).searchParam.service_type=r),placeholder:e(a)("serviceTypePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("executionRules"),prop:"execution_rules"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.execution_rules,"onUpdate:modelValue":o[4]||(o[4]=r=>e(t).searchParam.execution_rules=r),placeholder:e(a)("executionRulesPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("staffReminder"),prop:"staff_reminder"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.staff_reminder,"onUpdate:modelValue":o[5]||(o[5]=r=>e(t).searchParam.staff_reminder=r),placeholder:e(a)("staffReminderPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("customerReminder"),prop:"customer_reminder"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.customer_reminder,"onUpdate:modelValue":o[6]||(o[6]=r=>e(t).searchParam.customer_reminder=r),placeholder:e(a)("customerReminderPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("customerConfirmation"),prop:"customer_confirmation"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.customer_confirmation,"onUpdate:modelValue":o[7]||(o[7]=r=>e(t).searchParam.customer_confirmation=r),placeholder:e(a)("customerConfirmationPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("customerFeedback"),prop:"customer_feedback"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.customer_feedback,"onUpdate:modelValue":o[8]||(o[8]=r=>e(t).searchParam.customer_feedback=r),placeholder:e(a)("customerFeedbackPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,{label:e(a)("status"),prop:"status"},{default:i(()=>[l(m,{modelValue:e(t).searchParam.status,"onUpdate:modelValue":o[9]||(o[9]=r=>e(t).searchParam.status=r),placeholder:e(a)("statusPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(s,null,{default:i(()=>[l(_,{type:"primary",onClick:o[10]||(o[10]=r=>p())},{default:i(()=>[v(u(e(a)("search")),1)]),_:1}),l(_,{onClick:o[11]||(o[11]=r=>k(b.value))},{default:i(()=>[v(u(e(a)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),f("div",ee,[N((g(),z(U,{data:e(t).data,size:"large"},{empty:i(()=>[f("span",null,u(e(t).loading?"":e(a)("emptyData")),1)]),default:i(()=>[l(n,{prop:"service_name",label:e(a)("serviceName"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"preview_image_url",label:e(a)("previewImageUrl"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"description",label:e(a)("description"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"service_type",label:e(a)("serviceType"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"execution_rules",label:e(a)("executionRules"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"staff_reminder",label:e(a)("staffReminder"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"customer_reminder",label:e(a)("customerReminder"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"customer_confirmation",label:e(a)("customerConfirmation"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"customer_feedback",label:e(a)("customerFeedback"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{prop:"status",label:e(a)("status"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),l(n,{label:e(a)("operation"),fixed:"right","min-width":"120"},{default:i(({row:r})=>[l(_,{type:"primary",link:"",onClick:D=>y(r)},{default:i(()=>[v(u(e(a)("edit")),1)]),_:2},1032,["onClick"]),l(_,{type:"primary",link:"",onClick:D=>x(r.id)},{default:i(()=>[v(u(e(a)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[R,e(t).loading]]),f("div",le,[l(E,{"current-page":e(t).page,"onUpdate:current-page":o[12]||(o[12]=r=>e(t).page=r),"page-size":e(t).limit,"onUpdate:page-size":o[13]||(o[13]=r=>e(t).limit=r),layout:"total, sizes, prev, pager, next, jumper",total:e(t).total,onSizeChange:o[14]||(o[14]=r=>p()),onCurrentChange:p},null,8,["current-page","page-size","total"])])]),l(Q,{ref_key:"editServiceDialog",ref:c,onComplete:p},null,512)]),_:1})])}}});const Ce=W(ae,[["__scopeId","data-v-4708d6ce"]]);export{Ce as default};
|
|
|