build(frontend): 更新数据任务列表构建

This commit is contained in:
caoxiaozhu
2026-07-27 09:50:33 +08:00
parent 88a82ed771
commit 42c0e4f5c2
127 changed files with 129 additions and 129 deletions

View File

@@ -0,0 +1 @@
import{a as y,E as h}from"./el-form-item-Bf1ASn5W.js";import{E as B}from"./index-CMWHMPp0.js";import{E as R}from"./index-D0UXUP15.js";import{d as S,G as I,e as N,w as l,j as g,z as O,o as m,s as o,q as v,c as x,ad as U,n as V,f as q,bx as F,M as L,x as b,aa as M,A as w,y as j,v as z,ac as D}from"./index-DdQQsURt.js";import{P}from"./PageCard-Bbwtm1na.js";import{u as A}from"./tools-Bvr8YCWw.js";import{_ as G}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./castArray-CpvD1ywp.js";import"./_baseClone-D4mnAM_M.js";import"./raf-BYY9WY16.js";import"./index-0bM-ph_e.js";import"./index-Cgs7GwqN.js";import"./el-card-tEKE7Xc8.js";const $={class:"icon-grid"},H=["onClick"],J=S({__name:"ToolCreateView",setup(K){const d=D(),p=z(),n=A(),i=j(),s=g(()=>d.params.id!=null),c=g(()=>s.value?n.getTool(d.params.id):void 0),e=O({id:"",name:"",description:"",url:"",icon:"fa-cog"}),C={name:[{required:!0,message:"请输入工具名称",trigger:"blur"},{max:30,message:"不超过 30 字符",trigger:"blur"}],url:[{required:!0,message:"请输入跳转地址",trigger:"blur"}]};function k(){i.value&&i.value.validate(f=>{f&&(s.value?(n.updateTool(e.id,{...e}),w.success("更新成功")):(n.addTool({...e,id:"custom_"+Date.now()}),w.success("添加成功")),p.push("/tools"))})}function E(){p.back()}return I(()=>{c.value&&Object.assign(e,c.value)}),(f,a)=>{const u=B,r=y,_=R,T=h;return m(),N(P,{title:s.value?"编辑自定义工具":"添加自定义工具"},{default:l(()=>[o(T,{ref_key:"formRef",ref:i,model:e,rules:C,"label-width":"100px",style:{"max-width":"600px"}},{default:l(()=>[o(r,{label:"工具名称",prop:"name"},{default:l(()=>[o(u,{modelValue:e.name,"onUpdate:modelValue":a[0]||(a[0]=t=>e.name=t),placeholder:"请输入工具名称",maxlength:"30","show-word-limit":""},null,8,["modelValue"])]),_:1}),o(r,{label:"工具描述"},{default:l(()=>[o(u,{modelValue:e.description,"onUpdate:modelValue":a[1]||(a[1]=t=>e.description=t),type:"textarea",rows:2,maxlength:"100","show-word-limit":""},null,8,["modelValue"])]),_:1}),o(r,{label:"跳转地址",prop:"url"},{default:l(()=>[o(u,{modelValue:e.url,"onUpdate:modelValue":a[2]||(a[2]=t=>e.url=t),placeholder:"相对路径或完整 URL"},null,8,["modelValue"])]),_:1}),o(r,{label:"图标"},{default:l(()=>[v("div",$,[(m(!0),x(L,null,U(q(F),t=>(m(),x("div",{key:t,class:V(["icon-option",{selected:e.icon===t}]),onClick:Q=>e.icon=t},[v("i",{class:V(["fa",t])},null,2)],10,H))),128))])]),_:1}),o(r,null,{default:l(()=>[o(_,{type:"primary",onClick:k},{default:l(()=>[b(M(s.value?"保存":"添加"),1)]),_:1}),o(_,{onClick:E},{default:l(()=>[...a[3]||(a[3]=[b("取消",-1)])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["title"])}}}),ue=G(J,[["__scopeId","data-v-249def81"]]);export{ue as default};