数通智联化工云平台
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

import{d as v,C as w,I as D,r as o,h as a,o as x,c as B,m as n,w as V,B as C}from"./index-3679850f.js";const E=v({__name:"list",setup(T){const i=w(),t=D({visible:!1,row:{}}),c=o(),s=o(),p=o({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:l}=i.resolve({path:"/design/dataScreen/show/"+e.id});window.open(l)}},{label:"删除",key:"del",type:"danger"}],config:{}}),r=e=>{i.push({path:"/design/dataScreen",query:{id:e.id}})},d=o({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=o({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,l)=>{const g=a("ak-list"),h=a("ak-form"),k=a("el-dialog");return x(),B("div",null,[n(g,{ref_key:"tableListEl",ref:s,requestUrl:"designList",deleteUrl:"designDelete",searchData:d.value,tableData:p.value,beforeRequest:y},null,8,["searchData","tableData"]),n(k,{modelValue:t.visible,"onUpdate:modelValue":l[0]||(l[0]=_=>t.visible=_),title:"设置",width:"480px","destroy-on-close":""},{default:V(()=>[n(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};