You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
3.0 KiB
JavaScript

var C=(y,u,t)=>new Promise((c,s)=>{var f=o=>{try{r(t.next(o))}catch(a){s(a)}},l=o=>{try{r(t.throw(o))}catch(a){s(a)}},r=o=>o.done?c(o.value):Promise.resolve(o.value).then(f,l);r((t=t.apply(y,u)).next())});import{P as E}from"./index-D9u9z1rb.js";import{u as D,_ as I}from"./useTable-nv9giSxv.js";import{_ as T}from"./index-DduuDa4W.js";import{i as $,f as P,c as B,a as M,b as x,_ as N}from"./IndividualRecordModal.vue_vue_type_script_setup_true_lang-3sE6QJFn.js";import{b as S}from"./download-BsJ55YCN.js";import{u as V}from"./index-DOVZCDDs.js";import{I as k}from"./entry/index-DbrbbsCh-1723702159782.js";import{d as L,aa as A,n as F,_ as n,a8 as d,a9 as i,k as w,u as e,m as g,G as h,ac as G}from"./vue-aEZWZQSa.js";import"./useContentViewHeight-89PWWjum.js";import"./useWindowSizeFn-DE1eO4db.js";import"./antd-BY-1PcYE.js";import"./onMountedOrActivated-BIJ0U1R1.js";import"./useForm-CWPDAxdO.js";import"./FormItem.vue_vue_type_script_lang-DQcDBttf.js";import"./componentMap-CVvNnVzI.js";import"./RadioButtonGroup.vue_vue_type_script_setup_true_lang-Czt7G3zm.js";import"./copyTextToClipboard-BBFF3Y3I.js";import"./style-ZVTxFzof.js";import"./helper-nGdd1AW2.js";import"./BasicForm.vue_vue_type_style_index_0_lang-fWyk1YG7.js";import"./sortable.esm-CnNXHMH-.js";import"./useSortable-CyjTTtzk.js";import"./useLoading-CZUdUDy4.js";const pe=L({name:"IndividualRecord",__name:"index",setup(y){const[u,{reload:t,multipleRemove:c,selected:s}]=D({rowSelection:{type:"checkbox"},title:"个体评估记录列表",api:$,showIndexColumn:!1,rowKey:"id",useSearchForm:!0,formConfig:{schemas:P,baseColProps:{xs:24,sm:24,md:24,lg:6}},columns:B,actionColumn:{width:200,title:"操作",key:"action",fixed:"right"}}),[f,{openModal:l}]=V();function r(m){l(!0,{record:m,update:!0})}function o(){l(!0,{update:!1})}function a(m){return C(this,null,function*(){yield x([m.id]),yield t()})}return(m,p)=>{const _=A("a-button"),v=F("auth");return n(),d(e(E),{dense:""},{default:i(()=>[w(e(I),{onRegister:e(u)},{toolbar:i(()=>[g((n(),d(_,{onClick:p[0]||(p[0]=R=>e(S)(e(M),"个体评估记录数据"))},{default:i(()=>[h("导出")]),_:1})),[[v,"report:individualRecord:export"]]),g((n(),d(_,{type:"primary",danger:"",onClick:p[1]||(p[1]=R=>e(c)(e(x))),disabled:!e(s)},{default:i(()=>[h("删除")]),_:1},8,["disabled"])),[[v,"report:individualRecord:remove"]]),g((n(),d(_,{type:"primary",onClick:o},{default:i(()=>[h("新增")]),_:1})),[[v,"report:individualRecord:add"]])]),bodyCell:i(({column:R,record:b})=>[R.key==="action"?(n(),d(e(T),{key:0,stopButtonPropagation:"",actions:[{label:"修改",icon:e(k).EDIT,type:"primary",ghost:!0,auth:"report:individualRecord:edit",onClick:r.bind(null,b)},{label:"删除",icon:e(k).DELETE,type:"primary",danger:!0,ghost:!0,auth:"report:individualRecord:remove",popConfirm:{placement:"left",title:"是否删除个体评估记录["+b.id+"]?",confirm:a.bind(null,b)}}]},null,8,["actions"])):G("",!0)]),_:1},8,["onRegister"]),w(N,{onRegister:e(f),onReload:e(t)},null,8,["onRegister","onReload"])]),_:1})}}});export{pe as default};