1 |
- var R=Object.defineProperty,D=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable;var w=(o,e,t)=>e in o?R(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,_=(o,e)=>{for(var t in e||(e={}))N.call(e,t)&&w(o,t,e[t]);if(b)for(var t of b(e))V.call(e,t)&&w(o,t,e[t]);return o},C=(o,e)=>D(o,A(e));var f=(o,e,t)=>new Promise((m,u)=>{var d=n=>{try{i(t.next(n))}catch(r){u(r)}},p=n=>{try{i(t.throw(n))}catch(r){u(r)}},i=n=>n.done?m(n.value):Promise.resolve(n.value).then(d,p);i((t=t.apply(o,e)).next())});import{u as E,B as F}from"./useTable-B6PunZL5.js";import{T as L}from"./index-BIj58_Cj.js";import{u as U}from"./index-CzIUqxsa.js";import{g as W,c as $,s as j,_ as q,d as G}from"./AgentBaseDrawer.vue_vue_type_script_setup_true_lang-D5_PB65G.js";import{v as M}from"./entry/index-DJx93RYF-1731481145019.js";import{d as z,f as B,ag as H,a9 as J,_ as k,$ as K,k as g,a7 as c,G as O,a6 as P,u as l,a0 as Q}from"./vue-B5pbXMv7.js";import"./useForm-pwHPrILC.js";import"./index-D_SNX-7K.js";import"./antd-CBeLo_oO.js";import"./tree-BtJaOqz0.js";import"./copyTextToClipboard-Dngb1Nn3.js";import"./index-BDsRYE32.js";import"./index-wDJjh9Os.js";import"./index-BzfGKMh3.js";import"./index-DkGmfgEA.js";import"./index-Cuu0w1HY.js";import"./useWindowSizeFn-BxA6-zLj.js";import"./plugin-C2XGVjF6.js";import"./uuid-BUBnBT7J.js";import"./onMountedOrActivated-C3HH8-CK.js";import"./sortable.esm-BEDva30o.js";import"./useSortable-lvT7rWOs.js";const Ce=z({name:"AgentBaseManagement",__name:"index",setup(o){const{t:e}=M.useI18n(),t=B(),m=B(!1),d=H().query.collectionId,[p,{openDrawer:i}]=U(),[n,{reload:r}]=E({title:e("wechat.agentBase.agentBaseList"),api:a=>W(C(_({},a),{collectionId:d})),columns:$,formConfig:{labelWidth:120,schemas:j},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!1,clickToRowSelect:!1,actionColumn:{width:30,title:e("common.action"),dataIndex:"action",fixed:void 0},rowKey:"id",rowSelection:{type:"checkbox",columnWidth:20,onChange:(a,s)=>{t.value=a,m.value=a.length>0}}});function y(){i(!0,{isUpdate:!1})}function x(a){i(!0,{record:a,isUpdate:!0})}function T(a){return f(this,null,function*(){(yield G({id:a.id})).code===0&&(yield r())})}function v(){return f(this,null,function*(){yield r()})}return(a,s)=>{const I=J("a-button");return k(),K("div",null,[g(l(F),{onRegister:l(n)},{tableTitle:c(()=>s[0]||(s[0]=[])),toolbar:c(()=>[g(I,{type:"primary",onClick:y},{default:c(()=>s[1]||(s[1]=[O(" 添加知识 ")])),_:1})]),bodyCell:c(({column:S,record:h})=>[S.key==="action"?(k(),P(l(L),{key:0,actions:[{icon:"clarity:note-edit-line",onClick:x.bind(null,h)},{icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:l(e)("common.deleteConfirm"),placement:"left",confirm:T.bind(null,h)}}]},null,8,["actions"])):Q("",!0)]),_:1},8,["onRegister"]),g(q,{onRegister:l(p),onSuccess:v},null,8,["onRegister"])])}}});export{Ce as default};
|