yyuap-ref
Version:
cloud os fe ref project which is based on tinper
42 lines (37 loc) • 1.59 kB
JavaScript
import createModal from '../createApi/createApi.es.js';
const option = {
title: '弹窗标题',
refType:3,//1:树形 2.单表 3.树卡型 4.多选 5.default
isRadio:false,//1.true 单选 2.false多选
hasPage:true,
backdrop:true,
showLine:false,//树参照是否显示连线
emptyBtn:true,//清空按钮是否显示
tabData:[//tab标签
{"title":"常用","key":"commonUse"},
{"title":"全部","key":"total"},
{"title":"推荐","key":"recommed"}
],// option中可增加defaultActiveKey作为默认tab标签
param:{//url请求参数
refCode:'test_treeTable',//test_common||test_grid||test_tree||test_treeTable
tenantId:'xxx',
sysId:'xxx',
refModelUrl: 'http://workbench.yyuap.com/ref/rest/testref_ctr/',
},
refModelUrl:{
TreeUrl:'http://workbench.yyuap.com/ref/rest/iref_ctr/blobRefTree', //树请求
TreeGridUrl:'http://workbench.yyuap.com/ref/rest/iref_ctr/blobRefTree', //树表树请求
GridUrl:'http://workbench.yyuap.com/ref/rest/iref_ctr/commonRefsearch',//单选多选请求
TableBodyUrl:'http://workbench.yyuap.com/ref/rest/iref_ctr/blobRefTreeGrid',//表体请求
TableBarUrl:'http://workbench.yyuap.com/ref/rest/iref_ctr/refInfo',//表头请求
totalDataUrl:'http://workbench.yyuap.com/ref/diwork/iref_ctr/matchPKRefJSON',//根据refcode请求完整数据
},
checkedArray:[],
onCancel: function (p) {
console.log(p)
},
onSave: function (sels) {
console.log(sels);
},
}
createModal(option)