You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
3.5 KiB
1 lines
3.5 KiB
import{d as x,C as V,I as w,r as l,h as a,o as B,c as T,m as s,w as m,l as C,t as u,B as L}from"./index-3679850f.js";const q=x({__name:"list",setup(N){const i=V(),t=w({visible:!1,row:{}}),n=l(),r=l(),d=l({columns:[{label:"勾选",type:"selection"},{prop:"id",label:"ID",width:"60px"},{prop:"name",label:"表单名称",width:"150px"},{prop:"sourceName",label:"数据源名称/ID",width:"150px"},{prop:"category",label:"分类",config:{dictKey:"form"}},{prop:"status",label:"状态",config:{dictKey:"status",tagList:{0:"info",1:"success"}}},{prop:"creatName",label:"创建人"},{prop:"creatDate",label:"创建时间",width:200,config:{formatter:"{y}-{m}-{d} {h}:{i}:{s}"}},{label:"操作",prop:"__control",width:"220px",fixed:"right"}],controlBtn:[{label:"新增",type:"primary",size:"small",click:()=>{c({})}},{label:"删除",key:"del",size:"small"}],operateBtn:[{label:"设置",key:"set",click:e=>{t.visible=!0,L(()=>{t.row=e,n.value.setValue(e)})}},{label:"创建列表",click:e=>{i.push({path:"/design/dataList",query:{form:e.id}})}},{label:"编辑",click:e=>{c(e)}},{label:"删除",key:"del"}],config:{expand:!0}}),c=e=>{i.push({path:"/design/form",query:{id:e.id}})},f=l({list:[{type:"input",control:{modelValue:"",placeholder:"请输入表单名称"},config:{},name:"name",item:{label:"表单名称"}},{type:"input",control:{modelValue:"",placeholder:"请输入数据源名称"},config:{},name:"sourceName",item:{label:"数据源名称"}},{type:"select",control:{modelValue:"",placeholder:"请选择表单分类"},config:{optionsType:2,optionsFun:"form"},name:"category",item:{label:"分类"}},{type:"button",control:{label:"查询",key:"submit",type:"primary"}},{type:"button",control:{label:"重置",key:"reset"}}],form:{labelWidth:"",class:"",size:"default"},config:{}}),b=l({list:[{type:"input",control:{modelValue:""},config:{},name:"name",item:{label:"表单名称"},customRules:[{type:"required",message:"请输入表单名称",trigger:"blur"}]},{type:"select",control:{modelValue:"",appendToBody:!0},options:[],config:{optionsType:2,optionsFun:"form"},name:"category",item:{label:"分类"}},{type:"select",control:{modelValue:"",appendToBody:!0},options:[],config:{optionsType:1,optionsFun:"roleList",method:"post",label:"name",value:"id",help:"哪些角色可以查看"},name:"roleId",item:{label:"权限角色"}},{type:"select",control:{modelValue:"",appendToBody:!0},options:[],config:{optionsType:2,optionsFun:"status"},name:"status",item:{label:"启用状态"}},{type:"div",control:{},config:{textAlign:"center"},list:[{type:"button",control:{label:"修改",type:"primary",key:"submit"},config:{span:0}},{type:"button",control:{label:"取消",key:"reset"},config:{span:0}}]}],form:{labelWidth:"140px",class:"",size:"default",name:"formDialog"}}),y=e=>{e==="success"&&(t.visible=!1,t.row={},r.value.getListData())},g=e=>(e.id=t.row.id,e),h=e=>{e==="reset"&&(t.visible=!1)},k=e=>(e.type=1,e);return(e,p)=>{const _=a("ak-list"),v=a("ak-form"),D=a("el-dialog");return B(),T("div",null,[s(_,{ref_key:"tableListEl",ref:r,requestUrl:"designList",deleteUrl:"designDelete",searchData:f.value,tableData:d.value,beforeRequest:k},{sourceName:m(({row:o})=>[C("div",null,u(o.sourceName)+"/"+u(o.source),1)]),_:1},8,["searchData","tableData"]),s(D,{modelValue:t.visible,"onUpdate:modelValue":p[0]||(p[0]=o=>t.visible=o),title:"设置",width:"480px","destroy-on-close":""},{default:m(()=>[s(v,{ref_key:"formEl",ref:n,formData:b.value,type:2,editUrl:"designChange",afterSubmit:y,beforeSubmit:g,onBtnClick:h},null,8,["formData"])]),_:1},8,["modelValue"])])}}});export{q as default};
|
|
|