sf_web_dist/js/bind-aircraft.1758705418851D2WOhPms.js
2025-09-24 17:18:33 +08:00

2 lines
3.0 KiB
JavaScript

import{ag as e,D as a,r as l,m as r,e as o,w as t,N as g,bp as u,g as m,bq as _,am as d,O as n,l as p,an as i,aX as s,d6 as f,aO as c}from"./index.1758705418851CdmBKQ2N.js";import{E as y}from"./el-text.1758705418851X1CgxUPv.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 V=w,D=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(()=>V.showBindAircraftDialog,e=>{e&&(D.telegram_group=V.currentRow.telegram_group,D.telegram_group_name=V.currentRow.telegram_group_name,D.telegram_notify=""!=V.currentRow.telegram_notify?JSON.parse(V.currentRow.telegram_notify).join(","):"")});const R=l(),v=b,B=()=>{v("update:showBindAircraftDialog",!1),q()},q=()=>{D.telegram_group="",D.telegram_notify="",D.telegram_group_name="",D.google_code=""},x=()=>{let e={shop_id:V.currentRow.shop_id,telegram_group:D.telegram_group,telegram_notify:D.telegram_notify.split(","),telegram_group_name:D.telegram_group_name,google_code:D.google_code};R.value.validate(a=>{a&&f(e).then(e=>{c.success("绑定成功"),B(),R.value.resetForm()})})};return(e,a)=>{const l=d,f=_,c=y,b=u,V=i,v=s;return o(),r(v,{"model-value":w.showBindAircraftDialog,title:"绑定飞机",width:"600px","before-close":B},{footer:t(()=>[p("div",h,[g(V,{type:"primary",onClick:x},{default:t(()=>a[5]||(a[5]=[n(" 绑定群ID ")])),_:1,__:[5]}),g(V,{type:"danger",onClick:x},{default:t(()=>a[6]||(a[6]=[n(" 清除群ID ")])),_:1,__:[6]})])]),default:t(()=>[g(b,{model:m(D),"label-width":"auto",ref_key:"channelRef",ref:R},{default:t(()=>[g(f,{label:"飞机群ID",prop:"telegram_group"},{default:t(()=>[g(l,{modelValue:m(D).telegram_group,"onUpdate:modelValue":a[0]||(a[0]=e=>m(D).telegram_group=e),placeholder:"飞机群ID"},null,8,["modelValue"])]),_:1}),g(f,{label:"飞机群名称",prop:"telegram_group_name"},{default:t(()=>[g(l,{modelValue:m(D).telegram_group_name,"onUpdate:modelValue":a[1]||(a[1]=e=>m(D).telegram_group_name=e),placeholder:"飞机群名称"},null,8,["modelValue"])]),_:1}),g(f,{label:"绑定通知",prop:"telegram_notify"},{default:t(()=>[g(l,{modelValue:m(D).telegram_notify,"onUpdate:modelValue":a[2]||(a[2]=e=>m(D).telegram_notify=e),type:"textarea",autosize:{minRows:4},placeholder:"请输入绑定通知飞机号"},null,8,["modelValue"]),g(c,{type:"danger"},{default:t(()=>a[4]||(a[4]=[n("用英文,分割")])),_:1,__:[4]})]),_:1}),g(f,{label:"谷歌验证码",prop:"google_code"},{default:t(()=>[g(l,{modelValue:m(D).google_code,"onUpdate:modelValue":a[3]||(a[3]=e=>m(D).google_code=e),placeholder:"谷歌验证码"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}};export{w as default};