sf_web_dist/js/bind-aircraft.1759039765765BCCyATDg.js
2025-09-28 14:11:55 +08:00

2 lines
2.8 KiB
JavaScript

import{ag as e,D as a,r,m as l,e as t,w as o,N as g,bp as m,g as u,bq as _,am as i,O as n,l as d,an as s,aX as p,d5 as f,aO as c}from"./index.1759039765765CugQQnXZ.js";import{E as y}from"./el-text.1759039765765DzpNY_dW.js";const h={class:"dialog-footer"},w={__name:"bind-aircraft",props:{showBindAircraftDialog:{type:Boolean,default:!1},currentRow:{type:Object,default:{}}},emits:["update:showBindAircraftDialog"],setup(w,{emit:b}){const D=w,V=e({telegram_group:"",telegram_group_name:"",telegram_notify:""});e({telegram_group:[{required:!0,message:"请输入群组ID",trigger:"blur"}],telegram_group_name:[{required:!0,message:"请输入群组名称",trigger:"blur"}],telegram_notify:[{required:!0,message:"请输入绑定通知飞机号",trigger:"blur"}],google_code:[{required:!0,message:"请输入谷歌验证码",trigger:"blur"}]}),a(()=>D.showBindAircraftDialog,e=>{e&&(V.telegram_group=D.currentRow.telegram_group,V.telegram_group_name=D.currentRow.telegram_group_name,V.telegram_notify=""!=D.currentRow.telegram_notify?JSON.parse(D.currentRow.telegram_notify).join(","):"")});const R=r(),v=b,B=()=>{v("update:showBindAircraftDialog",!1),q()},q=()=>{V.telegram_group="",V.telegram_notify="",V.telegram_group_name="",V.google_code=""},x=()=>{V.telegram_notify=V.telegram_notify.replace(/\n/g,",");let e={shop_id:D.currentRow.shop_id,telegram_group:V.telegram_group,telegram_notify:V.telegram_notify.split(",").filter(e=>e&&""!==e.trim()),telegram_group_name:V.telegram_group_name,google_code:V.google_code};R.value.validate(a=>{a&&f(e).then(e=>{c.success("绑定成功"),B(),R.value.resetForm(),v("refreshLoad")})})};return(e,a)=>{const r=i,f=_,c=y,b=m,D=s,v=p;return t(),l(v,{"model-value":w.showBindAircraftDialog,title:"绑定飞机",width:"600px","before-close":B},{footer:o(()=>[d("div",h,[g(D,{type:"primary",onClick:x},{default:o(()=>a[4]||(a[4]=[n(" 确认修改 ")])),_:1,__:[4]})])]),default:o(()=>[g(b,{model:u(V),"label-width":"auto",ref_key:"channelRef",ref:R},{default:o(()=>[g(f,{label:"飞机群ID",prop:"telegram_group"},{default:o(()=>[g(r,{modelValue:u(V).telegram_group,"onUpdate:modelValue":a[0]||(a[0]=e=>u(V).telegram_group=e),placeholder:"飞机群ID"},null,8,["modelValue"])]),_:1}),g(f,{label:"飞机群名称",prop:"telegram_group_name"},{default:o(()=>[g(r,{modelValue:u(V).telegram_group_name,"onUpdate:modelValue":a[1]||(a[1]=e=>u(V).telegram_group_name=e),placeholder:"飞机群名称"},null,8,["modelValue"])]),_:1}),g(f,{label:"绑定通知",prop:"telegram_notify"},{default:o(()=>[g(r,{modelValue:u(V).telegram_notify,"onUpdate:modelValue":a[2]||(a[2]=e=>u(V).telegram_notify=e),type:"textarea",autosize:{minRows:4},placeholder:"请输入绑定通知飞机号"},null,8,["modelValue"]),g(c,{type:"danger"},{default:o(()=>a[3]||(a[3]=[n("用英文,分割或者另起一行")])),_:1,__:[3]})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}};export{w as default};