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.0 KiB
1 lines
3.0 KiB
import{d as v,I as w,r as l,a as D,c as x,l as a,w as B,m as n,C as V,B as C}from"./index-ea7eee8a.js";const E=v({__name:"list",setup(T){const i=V(),t=w({visible:!1,row:{}}),c=l(),s=l(),p=l({columns:[{label:"勾选",type:"selection"},{prop:"id",label:"ID",width:"60px"},{prop:"name",label:"名称",width:"150px"},{prop:"category",label:"分类",config:{dictKey:"list"}},{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:"180px",fixed:"right"}],controlBtn:[{label:"新增大屏",icon:"plus",type:"primary",click:()=>{r({})}},{label:"删除",key:"del",type:"danger",icon:"delete"}],operateBtn:[{label:"编辑",click:e=>{r(e)}},{label:"设置",click:e=>{t.visible=!0,C(()=>{t.row=e})}},{label:"查看",click:e=>{const{href:o}=i.resolve({path:"/design/dataScreen/show/"+e.id});window.open(o)}},{label:"删除",key:"del",type:"danger"}],config:{}}),r=e=>{i.push({path:"/design/dataScreen",query:{id:e.id}})},d=l({list:[{type:"input",control:{modelValue:"",placeholder:"请输入大屏名称"},config:{},name:"name",item:{label:"名称"}},{type:"button",control:{icon:"search",label:"查询",key:"submit",type:"primary"}},{type:"button",control:{label:"重置",key:"reset"}}],form:{labelWidth:"",class:"",size:"default"}}),u=l({list:[{type:"input",control:{modelValue:""},config:{},name:"name",item:{label:"名称"}},{type:"select",control:{modelValue:"",appendToBody:!0},options:[],config:{optionsType:2,optionsFun:"screen"},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"},config:{source:""}}),m=e=>{e==="success"&&(t.visible=!1,t.row={},s.value.getListData())},b=e=>(e.id=t.row.id,e),f=e=>{e==="reset"&&(t.visible=!1)},y=e=>(e.type=4,e);return(e,o)=>{const g=n("ak-list"),h=n("ak-form"),k=n("el-dialog");return D(),x("div",null,[a(g,{ref_key:"tableListEl",ref:s,requestUrl:"designList",deleteUrl:"designDelete",searchData:d.value,tableData:p.value,beforeRequest:y},null,8,["searchData","tableData"]),a(k,{modelValue:t.visible,"onUpdate:modelValue":o[0]||(o[0]=_=>t.visible=_),title:"设置",width:"480px","destroy-on-close":""},{default:B(()=>[a(h,{ref_key:"formEl",ref:c,formData:u.value,type:2,value:t.row,editUrl:"designChange",afterSubmit:m,beforeSubmit:b,onBtnClick:f},null,8,["formData","value"])]),_:1},8,["modelValue"])])}}});export{E as default};
|
|
|