5.0.227
parent
8b626178be
commit
3bc2b00e83
Binary file not shown.
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 13 KiB |
File diff suppressed because one or more lines are too long
|
@ -86,6 +86,7 @@ layui.define('jquery', function (exports) {
|
|||
, text = elemBar.find('.' + ELEM + '-text');
|
||||
elemBar.css('width', percent);
|
||||
text.text(percent);
|
||||
elemBar.attr("lay-percent", percent);
|
||||
return this;
|
||||
};
|
||||
|
||||
|
@ -422,6 +423,7 @@ layui.define('jquery', function (exports) {
|
|||
|
||||
if (othis.attr('lay-showPercent')) {
|
||||
setTimeout(function () {
|
||||
percent = elemBar.attr('lay-percent');
|
||||
elemBar.html('<span class="' + ELEM + '-text">' + percent + '</span>');
|
||||
}, 350);
|
||||
}
|
||||
|
|
|
@ -977,12 +977,17 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function (exports)
|
|||
});
|
||||
} else if (options.dataSource) { //根据数据集渲染
|
||||
var res = {}
|
||||
, startLimit = curr * options.limit - options.limit;
|
||||
if (options.dataSource.xtype == 'MemoryDataSetBase') {
|
||||
let startLimit = curr * options.limit - options.limit
|
||||
res[response.dataName] = options.dataSource.getDatas().concat().splice(startLimit, options.limit);
|
||||
res[response.countName] = options.dataSource.getTotalCount();
|
||||
} else {
|
||||
res[response.dataName] = options.dataSource.getDatas();
|
||||
res[response.countName] = options.dataSource.getTotalCount();
|
||||
}
|
||||
if (typeof options.parseData === 'function') {
|
||||
res = options.parseData(res) || res;
|
||||
}
|
||||
res[response.dataName] = options.data;
|
||||
res[response.countName] = options.count;
|
||||
that.renderData(res, curr, res[response.countName]), sort();
|
||||
options.time = (new Date().getTime() - that.startTime) + ' ms'; //耗时(接口请求+视图渲染)
|
||||
that.setColsWidth();
|
||||
|
@ -1537,7 +1542,12 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function (exports)
|
|||
that.loadingnews();
|
||||
if (options.dataSource) {
|
||||
var ds = options.dataSource;
|
||||
ds.reload({ params: { page: obj.curr, limit: obj.limit } });
|
||||
ds.reload({
|
||||
page: obj.curr, limit: obj.limit, loadFinishCallBack: () => {
|
||||
console.info('loadFinishCallBack');
|
||||
that.pullData(obj.curr);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.pullData(obj.curr);
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2188,6 +2188,76 @@ setImage(url: string): void
|
|||
*/
|
||||
class YhPlayer extends ContainerBase {
|
||||
|
||||
}
|
||||
/**
|
||||
*高德地图组件
|
||||
*/
|
||||
class GaodeMap extends PopInputBase {
|
||||
/**
|
||||
*是否开启搜索接口
|
||||
默认值: "true",需要付费
|
||||
*/
|
||||
isPlaceSearch: boolean
|
||||
|
||||
/**
|
||||
* 得到弹出的编辑器
|
||||
* @returns 弹出的编辑器实例
|
||||
|
||||
*/
|
||||
getPopEdior(): IPopInputBaseEditor
|
||||
|
||||
/**
|
||||
* 注册点击并选中任意日期时触发
|
||||
* @param val 地址json
|
||||
|
||||
*/
|
||||
onRenderDisplayValue(val: AddressValueJson): void
|
||||
|
||||
}
|
||||
/**
|
||||
*分析组件
|
||||
*/
|
||||
class GaodeMapDistribution extends FieldDbComponentBase {
|
||||
cityInfo: any
|
||||
currMarker: any[]
|
||||
districtInfo: any
|
||||
districtSearch: any
|
||||
geocoder: any
|
||||
getMapAddressInfo: any[]
|
||||
infoWindow: any
|
||||
map: any
|
||||
mapId: string
|
||||
mapInputId: string
|
||||
marker: any
|
||||
markers: any[]
|
||||
markersFour: any[]
|
||||
markersThree: any[]
|
||||
markersTwo: any[]
|
||||
provinceInfo: any
|
||||
|
||||
/**
|
||||
* 获取组件经纬度的值
|
||||
子类重载这个方法实现自定义取值赋值过程
|
||||
* @returns 经纬度的值
|
||||
|
||||
*/
|
||||
getLngLat(): any
|
||||
|
||||
/**
|
||||
* 加载数据
|
||||
* @param paramObj 参数对象
|
||||
* @param isNew 可选参数 默认值:false 重新一次查询清掉所有的以前查的参数
|
||||
|
||||
*/
|
||||
loadData(paramObj: any,isNew: boolean): void
|
||||
|
||||
/**
|
||||
* 加载数据
|
||||
* @param ret 返回的结果集 参数对象* @returns
|
||||
|
||||
*/
|
||||
packageData(ret: IRetVo): void
|
||||
|
||||
}
|
||||
/**
|
||||
* 组件步骤数组属性编辑器
|
||||
|
@ -4654,6 +4724,14 @@ getTempParamValue(paramName: string): any
|
|||
*/
|
||||
hasDataChanged(): boolean
|
||||
|
||||
/**
|
||||
* page加载json
|
||||
* @param strJson json字符串
|
||||
* @param resetId 是否重设所有的Id 默认值false* @returns
|
||||
|
||||
*/
|
||||
loadFromJson(strJson: string,resetId: boolean): DesignerPageBase
|
||||
|
||||
/**
|
||||
* 注册是否允许关闭回调
|
||||
* @param fn 回调函数
|
||||
|
@ -9245,6 +9323,32 @@ remove = "remove",
|
|||
*刷新记录事件 发生在: afterEdit ,afterReject,afterCommit
|
||||
*/
|
||||
update = "update"
|
||||
}
|
||||
/**
|
||||
*合计的类型
|
||||
*/
|
||||
enum DataSourceTotalType {
|
||||
|
||||
/**
|
||||
*平均值
|
||||
*/
|
||||
avg = "AVG",
|
||||
/**
|
||||
*总数
|
||||
*/
|
||||
count = "COUNT",
|
||||
/**
|
||||
*最大
|
||||
*/
|
||||
max = "MAX",
|
||||
/**
|
||||
*最小
|
||||
*/
|
||||
min = "MIN",
|
||||
/**
|
||||
*求和
|
||||
*/
|
||||
sum = "SUM"
|
||||
}
|
||||
/**
|
||||
*数据源状态
|
||||
|
@ -9298,6 +9402,10 @@ fields: IField[]
|
|||
*/
|
||||
ignorePage: boolean
|
||||
/**
|
||||
*主键
|
||||
*/
|
||||
keys: string[]
|
||||
/**
|
||||
*保存修改过的行
|
||||
数据提交时候要用到里面的行生成changes
|
||||
*/
|
||||
|
@ -9314,6 +9422,10 @@ repeatPost: boolean
|
|||
*显示保存的对话框
|
||||
*/
|
||||
showPostLoading: boolean
|
||||
/**
|
||||
*总数量
|
||||
*/
|
||||
totalLength: number
|
||||
|
||||
/**
|
||||
* 增加附带额外参数回调函数
|
||||
|
@ -9408,6 +9520,14 @@ eachRow(eachCallBack: any,scope: object): void
|
|||
*/
|
||||
find(fn: DataSourceQureyRowHandle,formIndex: number): Row
|
||||
|
||||
/**
|
||||
* 查找数据,注意这个并不会把查到数据加载的数据源的rows内
|
||||
* @param conditions 条件IAdvQueryItem数组
|
||||
* @param callback 回调
|
||||
|
||||
*/
|
||||
findDataByCon(conditions: IAdvQueryItem[],callback: any): void
|
||||
|
||||
/**
|
||||
* 本地数据查找行
|
||||
例子: var index= ds.findIndex((row)=>{return row.get('FieldName')=='xxxyyy'});
|
||||
|
@ -9584,6 +9704,13 @@ getRows(): Row[]
|
|||
*/
|
||||
getSortState(): ISortInfo
|
||||
|
||||
/**
|
||||
* 得到列的合计数值
|
||||
* @param field 列编号* @returns 返回列的合计值,存在返回非空数字,否则返回空
|
||||
|
||||
*/
|
||||
getTotalByField(field: string): number
|
||||
|
||||
/**
|
||||
* 获取总数
|
||||
* @returns 数据源的总记录数量 这是分页情况, 这个数量不一定等于getCount()
|
||||
|
@ -9591,6 +9718,13 @@ getSortState(): ISortInfo
|
|||
*/
|
||||
getTotalCount(): number
|
||||
|
||||
/**
|
||||
* 返回所有的合计数值
|
||||
* @returns 返回所有列的合计值
|
||||
|
||||
*/
|
||||
getTotals(): ItotalResult
|
||||
|
||||
/**
|
||||
* 获取数据源的树形结构数据
|
||||
* @param idField 节点唯一字段 默然值:RWID
|
||||
|
@ -9799,7 +9933,7 @@ refreshRow(row: Row,callback: DataSourceRefureshRowHandle): void
|
|||
|
||||
/**
|
||||
* 取消所有记录的修改
|
||||
会触发所有修改记录的afterReject
|
||||
会触发所有修改记录的reject事件
|
||||
|
||||
*/
|
||||
rejectChanges(): void
|
||||
|
@ -9883,6 +10017,13 @@ setCurrentRowById(id: string): void
|
|||
*/
|
||||
setRows(rows: Row[]): void
|
||||
|
||||
/**
|
||||
* 设置合计的对象
|
||||
* @param val
|
||||
|
||||
*/
|
||||
setTotals(val: any): void
|
||||
|
||||
/**
|
||||
* 排序
|
||||
* @param fieldName 字段名
|
||||
|
@ -9892,10 +10033,10 @@ setRows(rows: Row[]): void
|
|||
sort(fieldName: string,dir: FieldSortDirection): boolean
|
||||
|
||||
/**
|
||||
* 统计 注意:只有是数字类型的字段才能统计
|
||||
* @param field 需要统计的字段名
|
||||
* 合计 注意:只有是数字类型的字段才能合计
|
||||
* @param field 需要合计的字段名
|
||||
* @param start 开始
|
||||
* @param end 结束* @returns 统计的结果
|
||||
* @param end 结束* @returns 合计的结果
|
||||
|
||||
*/
|
||||
sum(field: string,start: number,end: number): number
|
||||
|
@ -10136,16 +10277,51 @@ query: any
|
|||
}
|
||||
*/
|
||||
sort: object
|
||||
/**
|
||||
*额外的合计信息
|
||||
设置了这个参数, getTotals() 内获取每个字段的合计值.
|
||||
{
|
||||
field1: 'avg',
|
||||
field2: 'sum'
|
||||
}
|
||||
*/
|
||||
totals: ItotalObject
|
||||
}
|
||||
/**
|
||||
*解析的结果
|
||||
*/
|
||||
interface IReadResult {
|
||||
/**
|
||||
*额外的合计字段值
|
||||
*/
|
||||
extTotals: ItotalResult
|
||||
/**
|
||||
*字段数组
|
||||
*/
|
||||
fields: IField[]
|
||||
/**
|
||||
*数据记录数组
|
||||
*/
|
||||
rows: any[]
|
||||
/**
|
||||
*是否成功
|
||||
*/
|
||||
success: boolean
|
||||
/**
|
||||
*总数
|
||||
*/
|
||||
totalRows: number
|
||||
}
|
||||
/**
|
||||
*合计项
|
||||
*/
|
||||
interface ItotalObject {
|
||||
}
|
||||
/**
|
||||
*合计结果项
|
||||
*/
|
||||
interface ItotalResult {
|
||||
}
|
||||
/**
|
||||
*数据源提交回调
|
||||
*@param err 错误信息 ,无错误时候为空
|
||||
|
@ -10447,6 +10623,20 @@ kuais = "kuais"
|
|||
*/
|
||||
enum TableColumnSortDirection {
|
||||
asc = "asc",desc = "desc"
|
||||
}
|
||||
/**
|
||||
*列的总计方式
|
||||
*/
|
||||
enum TableColumnTotalType {
|
||||
|
||||
/**
|
||||
*全局统计,后台统计
|
||||
*/
|
||||
all = "all",
|
||||
/**
|
||||
*按页统计
|
||||
*/
|
||||
page = "page"
|
||||
}
|
||||
/**
|
||||
*table组件的列接口
|
||||
|
@ -10569,7 +10759,7 @@ toolbar: string
|
|||
/**
|
||||
*是否开启合计行
|
||||
*/
|
||||
totalRow: boolean
|
||||
totalRow: TableColumnTotalType
|
||||
/**
|
||||
*自定义的合计脚本
|
||||
*/
|
||||
|
@ -13970,6 +14160,69 @@ render(elemtId: string,json: Object): void
|
|||
*/
|
||||
save(auto: boolean): void
|
||||
|
||||
}
|
||||
/**
|
||||
*组件/组渲染基类
|
||||
*/
|
||||
class CmpConfigRenderBase {
|
||||
|
||||
}
|
||||
/**
|
||||
*默认组件的渲染器实现
|
||||
*/
|
||||
class DefCmpConfigRender extends CmpConfigRenderBase {
|
||||
|
||||
}
|
||||
/**
|
||||
*默认组件组的渲染器实现
|
||||
*/
|
||||
class DefCmpGroupConfigRender extends CmpConfigRenderBase {
|
||||
|
||||
}
|
||||
/**
|
||||
*默认设计器渲染器
|
||||
*/
|
||||
class DefDesignerRender extends DesignerRenderBase {
|
||||
|
||||
}
|
||||
/**
|
||||
*设计器界面渲染渲染基类
|
||||
*/
|
||||
class DesignerRenderBase {
|
||||
|
||||
}
|
||||
/**
|
||||
*怪兽设计器组渲染器
|
||||
*/
|
||||
class GsCmpGroupConfigRender extends CmpConfigRenderBase {
|
||||
|
||||
}
|
||||
/**
|
||||
*怪兽设计器渲染器
|
||||
*/
|
||||
class GsDesignerRender extends DesignerRenderBase {
|
||||
|
||||
}
|
||||
/**
|
||||
*设计器界面渲染类
|
||||
*/
|
||||
interface DesignerCmpRender {
|
||||
/**
|
||||
*获取css样式
|
||||
*/
|
||||
getCss: any
|
||||
/**
|
||||
*获取html
|
||||
*/
|
||||
getHtml: any
|
||||
/**
|
||||
*渲染组件组
|
||||
*/
|
||||
renderComponentGroups: any
|
||||
/**
|
||||
*渲染组件
|
||||
*/
|
||||
renderComponentItems: any
|
||||
}
|
||||
/**
|
||||
*界面设计器历史记录类
|
||||
|
@ -14002,6 +14255,15 @@ getPage(): DesignerPageBase
|
|||
*/
|
||||
render(previewElemtId: string): void
|
||||
|
||||
}
|
||||
/**
|
||||
*模板加载类接口
|
||||
*/
|
||||
interface ItemplateLoader {
|
||||
/**
|
||||
*加载模板
|
||||
*/
|
||||
__loadTemplate: any
|
||||
}
|
||||
/**
|
||||
* 版本管理类
|
||||
|
@ -16499,124 +16761,74 @@ static getComponentClasses(): object
|
|||
* @returns 组的数组
|
||||
|
||||
*/
|
||||
static getComponentGroups(): ICompomentGroup[]
|
||||
static getComponentGroups(): IRegCmpGroup[]
|
||||
|
||||
/**
|
||||
* 得到经过排序后的组件的组的数组
|
||||
* @returns 组的数组
|
||||
|
||||
*/
|
||||
static getComponentGroupsBySort(): ICompomentGroup[]
|
||||
static getComponentGroupsBySort(): IRegCmpGroup[]
|
||||
|
||||
/**
|
||||
* 得到组的层次
|
||||
* @param group 组件组的实例* @returns 返回组件的层次
|
||||
|
||||
*/
|
||||
static getGroupLev(group: ICompomentGroup): number
|
||||
static getGroupLev(group: IRegCmpGroup): number
|
||||
|
||||
/**
|
||||
* 获取注册的组件的数组
|
||||
* @returns 返回注册的组件配置数组
|
||||
|
||||
*/
|
||||
static getRegeditConfigs(): IRegeditComponentConfig[]
|
||||
static getRegeditConfigs(): IRegCmpConfig[]
|
||||
|
||||
/**
|
||||
* 获取注册的组件的信息,分组,图标等信息。。。
|
||||
* @param className 组件类名* @returns 非空 组件的注册信息 则返回undefine
|
||||
|
||||
*/
|
||||
static getRegeditsConfigByClassName(className: string): IRegeditComponentConfig
|
||||
static getRegeditsConfigByClassName(className: string): IRegCmpConfig
|
||||
|
||||
/**
|
||||
* 通过唯一id获取组件的注册信息 ,分组,图标等信息。。。
|
||||
* @param id 组件注册信息的唯一id* @returns 非空注册的组件信息 ,则返回undefine
|
||||
|
||||
*/
|
||||
static getRegeditsConfigById(id: string): IRegeditComponentConfig
|
||||
static getRegeditsConfigById(id: string): IRegCmpConfig
|
||||
|
||||
/**
|
||||
* 注册组件
|
||||
* @param componentClass 组件的class
|
||||
* @param regeditConfig 注册的参数: { icon: 'fa fa-film', gourp: "layout", title: '输入选项卡个数', name: '选项卡',visiable:true } icon支持 字体图标,css图标,base64图标
|
||||
* @param regeditConfig 注册的参数: { icon: 'fa fa-film', group: "layout", title: '输入选项卡个数', name: '选项卡',visiable:true } icon支持 字体图标,css图标,base64图标
|
||||
|
||||
|
||||
*/
|
||||
static regedit(componentClass: object,regeditConfig: IRegeditComponentConfig | IRegeditComponentConfig[]): void
|
||||
static regedit(componentClass: object,regeditConfig: IRegCmpConfig | IRegCmpConfig[]): void
|
||||
|
||||
/**
|
||||
* 注册组件群组 by gk
|
||||
* @param group group = {name:"行列布局",id:"form",desc:"可以设置界面的行列布局", help:"", visiable:true}* @returns 返回增加或者存在的group对象
|
||||
|
||||
*/
|
||||
static regeditGroup(group: ICompomentGroup): ICompomentGroup
|
||||
static regeditGroup(group: IRegCmpGroup): IRegCmpGroup
|
||||
|
||||
}
|
||||
/**
|
||||
*组件分组
|
||||
*组件注册信息的基类
|
||||
*/
|
||||
interface ICompomentGroup {
|
||||
/**
|
||||
*描述
|
||||
*/
|
||||
desc: string
|
||||
/**
|
||||
*是否展开
|
||||
*/
|
||||
expand: boolean
|
||||
interface ICompomentItemConifg {
|
||||
/**
|
||||
*帮助信息
|
||||
*/
|
||||
help: string
|
||||
/**
|
||||
* 组id
|
||||
*/
|
||||
id: string
|
||||
/**
|
||||
*子组
|
||||
*/
|
||||
items: ICompomentGroup[]
|
||||
/**
|
||||
*名称
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
*父组
|
||||
*/
|
||||
parentGroup: ICompomentGroup
|
||||
/**
|
||||
*排序
|
||||
*/
|
||||
sort: number
|
||||
/**
|
||||
*可见
|
||||
*/
|
||||
visiable: boolean
|
||||
}
|
||||
/**
|
||||
*组件注册服务类配置接口
|
||||
*/
|
||||
interface IRegeditComponentConfig {
|
||||
/**
|
||||
*组件的创建时配置项 构造函数的参数
|
||||
*/
|
||||
config: object
|
||||
/**
|
||||
*组件的分组
|
||||
*/
|
||||
gourp: string
|
||||
/**
|
||||
*帮助信息Url
|
||||
*/
|
||||
help: string
|
||||
/**
|
||||
* 组件再界面设计器上的图标
|
||||
*/
|
||||
icon: string
|
||||
/**
|
||||
*唯一id
|
||||
动态生成的每次刷新都不一样
|
||||
*/
|
||||
id: string
|
||||
/**
|
||||
|
@ -16628,7 +16840,53 @@ name: string
|
|||
*/
|
||||
sort: number
|
||||
/**
|
||||
*组件的hit
|
||||
*标题
|
||||
*/
|
||||
title: string
|
||||
/**
|
||||
*是否可见
|
||||
*/
|
||||
visiable: Boolean
|
||||
}
|
||||
/**
|
||||
*组件注册信息接口
|
||||
用于记录组件的注册信息.用于辅助显示在设计器的组件工具栏内
|
||||
*/
|
||||
interface IRegCmpConfig {
|
||||
/**
|
||||
*组件的创建时配置项 构造函数的参数
|
||||
*/
|
||||
config: object
|
||||
/**
|
||||
*组件的分组
|
||||
*/
|
||||
group: string
|
||||
/**
|
||||
*帮助信息
|
||||
*/
|
||||
help: string
|
||||
/**
|
||||
* 组件再界面设计器上的图标
|
||||
*/
|
||||
icon: string
|
||||
/**
|
||||
*唯一id
|
||||
*/
|
||||
id: string
|
||||
/**
|
||||
*名称
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
*渲染器 工具栏渲染组件
|
||||
*/
|
||||
renderer: IRegeditComponentConfigRender
|
||||
/**
|
||||
*排序,数字越小排位越靠前
|
||||
*/
|
||||
sort: number
|
||||
/**
|
||||
*标题
|
||||
*/
|
||||
title: string
|
||||
/**
|
||||
|
@ -16641,6 +16899,64 @@ visiable: Boolean
|
|||
xtype: string
|
||||
}
|
||||
/**
|
||||
*组件分组注册信息接口
|
||||
*/
|
||||
interface IRegCmpGroup {
|
||||
/**
|
||||
*是否展开
|
||||
*/
|
||||
expand: boolean
|
||||
/**
|
||||
*帮助信息
|
||||
*/
|
||||
help: string
|
||||
/**
|
||||
* 组件再界面设计器上的图标
|
||||
*/
|
||||
icon: string
|
||||
/**
|
||||
*唯一id
|
||||
*/
|
||||
id: string
|
||||
/**
|
||||
*子组
|
||||
*/
|
||||
items: IRegCmpGroup[]
|
||||
/**
|
||||
*名称
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
*父组
|
||||
*/
|
||||
parentGroup: IRegCmpGroup
|
||||
/**
|
||||
*渲染器 工具栏渲染组件
|
||||
*/
|
||||
renderer: IRegeditComponentConfigRender
|
||||
/**
|
||||
*排序,数字越小排位越靠前
|
||||
*/
|
||||
sort: number
|
||||
/**
|
||||
*标题
|
||||
*/
|
||||
title: string
|
||||
/**
|
||||
*是否可见
|
||||
*/
|
||||
visiable: Boolean
|
||||
}
|
||||
/**
|
||||
*渲染
|
||||
*/
|
||||
interface IRegeditComponentConfigRender {
|
||||
/**
|
||||
*工具栏渲染组件的
|
||||
*/
|
||||
doRender: any
|
||||
}
|
||||
/**
|
||||
*组件的静态渲染服务
|
||||
由于html会吧大写属性变成小写属性.对于驼峰命名的属性大写字母前需要用横杠代替
|
||||
例子:
|
||||
|
@ -16903,6 +17219,92 @@ class DesignerService extends ServiceBase {
|
|||
|
||||
}
|
||||
/**
|
||||
*快搭提示框实现类
|
||||
*/
|
||||
class KDNotice {
|
||||
|
||||
}
|
||||
/**
|
||||
*快搭消息,通知,弹框的接口
|
||||
*/
|
||||
interface INotice {
|
||||
/**
|
||||
*消息提示,一般是在屏幕上中部提示,信息.会自动隐藏
|
||||
*/
|
||||
Message: any
|
||||
/**
|
||||
*模拟系统的消息提示框而实现的一套模态对话框组件,用于消息提示、确认消息和提交内容。
|
||||
*/
|
||||
MessageBox: any
|
||||
/**
|
||||
*悬浮出现在页面角落,显示全局的通知提醒消息。 这个与message有点功能重叠 可以控制不自动关闭
|
||||
*/
|
||||
Notification: any
|
||||
/**
|
||||
*初始化
|
||||
*/
|
||||
init: any
|
||||
/**
|
||||
*加载中
|
||||
*/
|
||||
loading: LoadingHandel
|
||||
}
|
||||
/**
|
||||
*加载中回调类型
|
||||
|
||||
*/
|
||||
declare type LoadingHandel = () => number
|
||||
/**
|
||||
*消息对话框确认回调类型
|
||||
|
||||
*/
|
||||
declare type MsgBoxConfirmHandel = (text: string,okCallBack: ConfirmCallBackHandle,title: string,cancelCallBack: ConfirmCallBackHandle) => number
|
||||
/**
|
||||
*消息对话框回调类型
|
||||
|
||||
*/
|
||||
declare type MsgBoxSuccessHandel = (text: string,callBackFunc: ConfirmCallBackHandle) => number
|
||||
/**
|
||||
*错误消息回调类型
|
||||
|
||||
*/
|
||||
declare type MsgErrorHandel = (err: string) => number
|
||||
/**
|
||||
*信息消息回调类型
|
||||
|
||||
*/
|
||||
declare type MsgInfoHandel = (info: string) => number
|
||||
/**
|
||||
*成功消息回调类型
|
||||
|
||||
*/
|
||||
declare type MsgSuccessHandel = (text: string) => number
|
||||
/**
|
||||
*警告消息回调类型
|
||||
|
||||
*/
|
||||
declare type MsgWarnHandel = (text: string) => number
|
||||
/**
|
||||
*错误通知回调类型
|
||||
|
||||
*/
|
||||
declare type NofErrorHandel = (err: string) => number
|
||||
/**
|
||||
*信息通知回调类型
|
||||
|
||||
*/
|
||||
declare type NofInfoHandel = (info: string) => number
|
||||
/**
|
||||
*成功通知回调类型
|
||||
|
||||
*/
|
||||
declare type NofSuccessHandel = (text: string) => number
|
||||
/**
|
||||
*警告通知回调类型
|
||||
|
||||
*/
|
||||
declare type NofWarnHandel = (text: string) => number
|
||||
/**
|
||||
*消息服务类
|
||||
组件,iframe,window直接的消息传递
|
||||
*/
|
||||
|
@ -17525,6 +17927,16 @@ type: FormType.page
|
|||
*/
|
||||
static Form(options: IFormOptions): number
|
||||
|
||||
/**
|
||||
* 弹出通知
|
||||
```typescript
|
||||
Form.Nt("您好!")
|
||||
```
|
||||
* @param text 警告信息* @returns 返回弹出层的唯一index
|
||||
|
||||
*/
|
||||
static Nt(text: string): number
|
||||
|
||||
/**
|
||||
* 添加script标签并执行代码
|
||||
* @param id 唯一字符串
|
||||
|
@ -17541,6 +17953,18 @@ static addJavaScript(id: string,javascript: string): boolean
|
|||
*/
|
||||
static addQueryString(url: string,paramObj: object): string
|
||||
|
||||
/**
|
||||
* 添加懒加载的Img
|
||||
注意:改函数不支持IE浏览器.只支持新版本的浏览器
|
||||
图片Img的初始格式:
|
||||
``` html
|
||||
<img class ="kdayun-img-lazload" data-src="/static/image/abc.png" src="${Common.getContextPath()}/static/image/loading.gif">
|
||||
```
|
||||
* @param imgs 图片imaged的html元素jQuery
|
||||
|
||||
*/
|
||||
static addlazyImgs(imgs: any): void
|
||||
|
||||
/**
|
||||
* 任意值转成boolean类型
|
||||
true: 'true', 11
|
||||
|
@ -17623,13 +18047,14 @@ static closeFormAll(type: FormType): void
|
|||
static compressImg(file: any,type: string,mx: number,mh: number): Promise<any>
|
||||
|
||||
/**
|
||||
* 弹出确定取消的对话框
|
||||
* 弹出[确定/取消]的模式对话框
|
||||
* @param text 提示信息
|
||||
* @param callBackFunc 确定后回调函数 返回false是不关闭窗口,否则都关闭
|
||||
* @param title 提示框的标题* @returns 返回弹出层的唯一index
|
||||
* @param okCallBack 确定后回调函数 返回false是不关闭窗口,否则都关闭
|
||||
* @param title 提示框的标题
|
||||
* @param cancelCallBack 取消关闭标题* @returns 返回弹出层的唯一index
|
||||
|
||||
*/
|
||||
static confirm(text: string,callBackFunc: ConfirmCallBackHandle,title: string): number
|
||||
static confirm(text: string,okCallBack: ConfirmCallBackHandle,title: string,cancelCallBack: ConfirmCallBackHandle): number
|
||||
|
||||
/**
|
||||
* 简单数据类型转换
|
||||
|
@ -17730,6 +18155,13 @@ static error(msg: any): void
|
|||
*/
|
||||
static errorMsg(errorTxt: string): number
|
||||
|
||||
/**
|
||||
* 弹出错误通知提示信息框.
|
||||
* @param errorTxt 提示的信息* @returns 返回弹出层的唯一index
|
||||
|
||||
*/
|
||||
static errorNt(errorTxt: string): number
|
||||
|
||||
/**
|
||||
* 解析typeScript/javascript脚本
|
||||
* @param script typeScript脚本字符串* @returns 返回 脚本的对象,否则返回null
|
||||
|
@ -17915,6 +18347,13 @@ static getFullUrl(url: string): string
|
|||
*/
|
||||
static getMenuId(): string
|
||||
|
||||
/**
|
||||
* 得到快搭通知消息接口对象
|
||||
* @returns
|
||||
|
||||
*/
|
||||
static getNotice(): INotice
|
||||
|
||||
/**
|
||||
* 获取当前页面的url 的参数值. 也就是就是问号后面的参数值
|
||||
注意:这只有请求方式是 get 时候才有效
|
||||
|
@ -17988,6 +18427,19 @@ static ie(): string | number | boolean
|
|||
*/
|
||||
static ifUndefine(value: any,defalutvalue: any): any
|
||||
|
||||
/**
|
||||
* 初始化懒加载图片容器
|
||||
注意图片Img的初始格式:
|
||||
``` html
|
||||
<img class ="kdayun-img-lazload" data-src="/static/image/abc.png" src="${Common.getContextPath()}/static/image/loading.gif">
|
||||
```
|
||||
* @param container 容器 htmlElement
|
||||
* @param lazloadClass 图懒加载的类名 默认值:kdayun-img-lazload
|
||||
* @param timeOut 延迟多少毫秒开始加载默认值:0 ;只针scroll方式有效,由于一些页面是动画弹出的页面存在延时显示需要在这里设置一个延时.否则第一次打开页面是无法显示图片的
|
||||
|
||||
*/
|
||||
static initLazLoad(container: Element,lazloadClass: string,timeOut: number): void
|
||||
|
||||
/**
|
||||
* 绑定input与树模糊查找,该函数来自ztree官方的demo
|
||||
* @param treeObj ztree树的对象
|
||||
|
@ -18057,6 +18509,16 @@ static isNotEmpty(value: any): boolean
|
|||
*/
|
||||
static isNotNil(value: any): boolean
|
||||
|
||||
/**
|
||||
* 懒加载图片函数
|
||||
注意图片Img的初始格式:
|
||||
<img class ="kdayun-img-lazload" data-src="/static/image/abc.png" src="${Common.getContextPath()}/static/image/loading.gif">
|
||||
* @param container 容器 htmlElement
|
||||
* @param lazloadClass 图懒加载的类名 默认值:kdayun-img-lazload
|
||||
|
||||
*/
|
||||
static lazyLoad(container: Element,lazloadClass: string): void
|
||||
|
||||
/**
|
||||
* 动态增加Css
|
||||
* @param cssUrl css的路径
|
||||
|
@ -18074,6 +18536,13 @@ static linkCss(cssUrl: string,cssname: string): void
|
|||
*/
|
||||
static loadScript(id: string,code: string,type: string): void
|
||||
|
||||
/**
|
||||
* 显示正在加载
|
||||
* @returns
|
||||
|
||||
*/
|
||||
static loading(): number
|
||||
|
||||
/**
|
||||
* 浏览器的控制台输出日志
|
||||
* @param msg 消息字符串
|
||||
|
@ -18093,13 +18562,12 @@ static matchsBetween(context: string,s1: string,s2: string): string
|
|||
/**
|
||||
* 警告弹出提示框
|
||||
```typescript
|
||||
Form.msg("您好!", { time: 30000 })
|
||||
Form.msg("您好!")
|
||||
```
|
||||
* @param text 警告信息
|
||||
* @param options 可选参数 弹出提示框的配置项* @returns 返回弹出层的唯一index
|
||||
* @param text 警告信息* @returns 返回弹出层的唯一index
|
||||
|
||||
*/
|
||||
static msg(text: string,options: IFormMsgOptions): number
|
||||
static msg(text: string): number
|
||||
|
||||
/**
|
||||
* 弹出没有数据提示
|
||||
|
@ -18258,12 +18726,12 @@ static setlocalCache(key: any,value: any): void
|
|||
static stringify(o: Object,excludes: string[]): string
|
||||
|
||||
/**
|
||||
* 成功 alert提示框
|
||||
* 成功模式对话框
|
||||
* @param text 提示标题
|
||||
* @param callBackFunc 点击确定回调函数
|
||||
* @param callBackFunc 点击确定回调函数* @returns 一个数值
|
||||
|
||||
*/
|
||||
static successAlert(text: string,callBackFunc: ConfirmCallBackHandle): void
|
||||
static successAlert(text: string,callBackFunc: ConfirmCallBackHandle): number
|
||||
|
||||
/**
|
||||
* 弹出成功msg提示框
|
||||
|
@ -18272,6 +18740,13 @@ static successAlert(text: string,callBackFunc: ConfirmCallBackHandle): void
|
|||
*/
|
||||
static successMsg(text: string): number
|
||||
|
||||
/**
|
||||
* 弹出成功通知提示框
|
||||
* @param text 提示信息* @returns 返回弹出层的唯一index
|
||||
|
||||
*/
|
||||
static successNt(text: string): number
|
||||
|
||||
/**
|
||||
* 数组元素位置互换
|
||||
* @param arr 数组
|
||||
|
@ -18350,6 +18825,13 @@ static uuid(prefix: string): string
|
|||
*/
|
||||
static warnMsg(text: string): number
|
||||
|
||||
/**
|
||||
* 弹出警告通知提示框
|
||||
* @param text 警告信息* @returns 返回弹出层的唯一index
|
||||
|
||||
*/
|
||||
static warnNt(text: string): number
|
||||
|
||||
/**
|
||||
* ajax请求
|
||||
* @param url 请求的路径
|
||||
|
@ -18561,6 +19043,10 @@ state: RetState
|
|||
*/
|
||||
interface IUploadFile {
|
||||
/**
|
||||
*二进制
|
||||
*/
|
||||
blobFileName: string
|
||||
/**
|
||||
*错误
|
||||
*/
|
||||
error: string
|
||||
|
@ -18636,13 +19122,6 @@ static aesDecode(str: string): string
|
|||
*/
|
||||
static aesEncode(str: string): string
|
||||
|
||||
/**
|
||||
* 得到全局配置对象
|
||||
* @returns 全局配置对象实例
|
||||
|
||||
*/
|
||||
static getConfig(): any
|
||||
|
||||
/**
|
||||
* md5编码字符串
|
||||
* @param str 字符串* @returns 返回加密后的字符串
|
||||
|
@ -20178,6 +20657,13 @@ onDone(callback: onDoneHandel): void
|
|||
*/
|
||||
onError(callback: onErrorHandel): void
|
||||
|
||||
/**
|
||||
* 文件数据处理
|
||||
* @param callback onDoneHandel事件处理函数
|
||||
|
||||
*/
|
||||
onProcessData(callback: onProcessDataHandel): void
|
||||
|
||||
/**
|
||||
* 值修改事件
|
||||
* @param callback 回调函数
|
||||
|
@ -22001,9 +22487,13 @@ templet: string
|
|||
*/
|
||||
title: string
|
||||
/**
|
||||
*后端的统计方式
|
||||
*/
|
||||
totalFunc: DataSourceTotalType
|
||||
/**
|
||||
*是否开启合计行
|
||||
*/
|
||||
totalRow: boolean
|
||||
totalRow: TableColumnTotalType
|
||||
/**
|
||||
*自定义的合计脚本
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
layui.use(['element', 'table', 'layer', 'form', 'zltreemenu', 'upload', 'zlPinYin', 'zlConfig', 'zlContext', 'treeGrid','theme'], function (exports) {
|
||||
layui.use(['element', 'table', 'layer', 'form', 'zltreemenu', 'upload', 'zlPinYin', 'zlConfig', 'zlContext', 'treeGrid', 'theme'], function (exports) {
|
||||
var $ = layui.$,
|
||||
zlContext = layui.zlContext,
|
||||
zltreemenu = layui.zltreemenu,
|
||||
|
@ -105,11 +105,13 @@ layui.use(['element', 'table', 'layer', 'form', 'zltreemenu', 'upload', 'zlPinYi
|
|||
var addTmpNode = function (nodes) {
|
||||
$.each(nodes, function (k, node) {
|
||||
if (node.EXPANDPROPERTY == "org" || node.EXPANDPROPERTY == "dept") {
|
||||
var tmpNode = {
|
||||
RWID: '*',
|
||||
OBJNAME: '*'
|
||||
};
|
||||
treeObj.addNodes(node, 0, tmpNode, true);
|
||||
if (node.SYS_ISLEAF != "1") {
|
||||
var tmpNode = {
|
||||
RWID: '*',
|
||||
OBJNAME: '*'
|
||||
};
|
||||
treeObj.addNodes(node, 0, tmpNode, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @Last Modified time: 2019-04-09 16:39:20
|
||||
*/
|
||||
|
||||
layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelectMultiple', 'zlSelectEx', 'zlpoptree', 'zlSelecttree', 'table', 'layer', 'laydate', 'form', 'zlPinYin', 'upload','theme'], function (exports) {
|
||||
layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu', 'zlSelectMultiple', 'zlSelectEx', 'zlpoptree', 'zlSelecttree', 'table', 'layer', 'laydate', 'form', 'zlPinYin', 'upload', 'theme'], function (exports) {
|
||||
var $ = layui.$,
|
||||
zlContext = layui.zlContext,
|
||||
zltreemenu = layui.zltreemenu,
|
||||
|
@ -51,6 +51,26 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
usercount = {},
|
||||
isloadTbsearch = false;
|
||||
|
||||
/**
|
||||
* 获取url的路径
|
||||
* @param url 相对路径/绝对路径
|
||||
* @return 返回处理过的路径.没有contextpath就加上,完整的路径http,https开头的原路返回
|
||||
*/
|
||||
function getUrl(url) {
|
||||
if (url === undefined || url == null) {
|
||||
return ''
|
||||
}
|
||||
if (url.startsWith('http') || url.startsWith('https')) {
|
||||
return url;
|
||||
}
|
||||
if (!url.startsWith(layui.cache['contentPath'])) {
|
||||
return layui.cache['contentPath'] + url;
|
||||
}
|
||||
else {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
var treeAction = {
|
||||
loadTree: function () {
|
||||
//创建zTree组件
|
||||
|
@ -94,11 +114,13 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
var addTmpNode = function (nodes) {
|
||||
$.each(nodes, function (k, node) {
|
||||
if (node.EXPANDPROPERTY == "org" || node.EXPANDPROPERTY == "dept") {
|
||||
var tmpNode = {
|
||||
RWID: '*',
|
||||
OBJNAME: '*'
|
||||
};
|
||||
treeObj.addNodes(node, 0, tmpNode, true);
|
||||
if (node.SYS_ISLEAF != "1") {
|
||||
var tmpNode = {
|
||||
RWID: '*',
|
||||
OBJNAME: '*'
|
||||
};
|
||||
treeObj.addNodes(node, 0, tmpNode, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -336,7 +358,8 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
} else {
|
||||
toux = '/static/image/userImg.png'
|
||||
}
|
||||
return '<div><img data-id="' + d.RWID + '" atl="" src="' + layui.cache['contentPath'] + toux + '" style="width:27px;height:27px"></div>'
|
||||
toux = getUrl(toux);
|
||||
return '<div><img data-id="' + d.RWID + '" atl="" src="' + toux + '" style="width:27px;height:27px"></div>'
|
||||
}
|
||||
}, {
|
||||
field: 'ISUSED',
|
||||
|
@ -394,7 +417,8 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
} else {
|
||||
toux = '/static/image/userImg.png'
|
||||
}
|
||||
return '<div><img data-id="' + d.RWID + '" atl="" src="' + layui.cache['contentPath'] + toux + '" style="width:70px;height:70px"><a style="color:#277FD0;cursor: pointer;">' + d.OBJNAME + '</a></div>'
|
||||
toux = getUrl(toux);
|
||||
return '<div><img data-id="' + d.RWID + '" atl="" src="' + toux + '" style="width:70px;height:70px"><a style="color:#277FD0;cursor: pointer;">' + d.OBJNAME + '</a></div>'
|
||||
}
|
||||
}, {
|
||||
field: 'YOUX',
|
||||
|
@ -495,7 +519,8 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
} else {
|
||||
toux = '/static/image/userImg.png'
|
||||
}
|
||||
return '<img data-id="' + d.RWID + '" atl="" src="' + layui.cache['contentPath'] + toux + '">'
|
||||
toux = getUrl(toux);
|
||||
return '<img data-id="' + d.RWID + '" atl="" src="' + toux + '">'
|
||||
}
|
||||
}, {
|
||||
field: 'MNGDEPNS',
|
||||
|
@ -854,7 +879,9 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
return layer.msg('上传失败' + res[msgName]);
|
||||
} else {
|
||||
$(res[dataName]).each(function (index, obj) {
|
||||
$('#imgPrieviewPic').attr('src', layui.cache['contentPath'] + obj["newFileName"]);
|
||||
let url = obj["newFileName"];
|
||||
url = getUrl(url);
|
||||
$('#imgPrieviewPic').attr('src', url);
|
||||
$('#frmGridUser input[name=TOUX]').val(obj["newFileName"]);
|
||||
});
|
||||
}
|
||||
|
@ -864,8 +891,10 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
if (type == 'edit') {
|
||||
zlContext.autoFill($('#frmGridUser'), row);
|
||||
if (row['TOUX'] !== '') {
|
||||
$('#frmGridUser input[name=TOUX]').val(row['TOUX']);
|
||||
$('#imgPrieviewPic').attr('src', layui.cache['contentPath'] + $('#frmGridUser input[name=TOUX]').val());
|
||||
let url = row['TOUX'];
|
||||
url = getUrl(url);
|
||||
$('#frmGridUser input[name=TOUX]').val(url);
|
||||
$('#imgPrieviewPic').attr('src', $('#frmGridUser input[name=TOUX]').val());
|
||||
}
|
||||
$('#frmGridUser input[name=EDITTYPE]').val('edit');
|
||||
$('#frmGridUser input[name=ORGID]').val(row['ORGID']);
|
||||
|
@ -880,7 +909,7 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
$('#frmGridUser input[name=EDITTYPE]').val('new');
|
||||
$('#frmGridUser input[name=ORGID]').val(orgNode.ORGID);
|
||||
$('#frmGridUser input[name=ISPASSED]').val('1');
|
||||
$('#frmGridUser input[name=SYS_SORT]').val(usercount[orgNode.ORGID] + 1);
|
||||
$('#frmGridUser input[name=SYS_SORT]').val(gridAction.getSort(orgNode.ORGID));
|
||||
|
||||
if (zlContext.browserType() == 'IE') {
|
||||
zlpoptree.render($('div[name=JIG_ID]'));
|
||||
|
@ -914,6 +943,10 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
}
|
||||
});
|
||||
},
|
||||
getSort: function (orgId) {
|
||||
return usercount[orgId] ? usercount[orgId] + 1 : 0
|
||||
|
||||
},
|
||||
viewRow: function (row) {
|
||||
var nodes = treeObj.getSelectedNodes();
|
||||
if (nodes.length == 0) {
|
||||
|
@ -1023,7 +1056,9 @@ layui.config({}).use(['element', 'zlExcel', 'zlConfig', 'zlContext', 'zltreemenu
|
|||
if (type == 'edit' && gridAction.currentEditObj) {
|
||||
gridAction.currentEditObj.update(row);
|
||||
if (row.TOUX) {
|
||||
$('[data-field="TOUX"]').find('img[data-id="' + row.RWID + '"]').attr('src', layui.cache['contentPath'] + row.TOUX);
|
||||
let url = row.TOUX;
|
||||
url = getUrl(url);
|
||||
$('[data-field="TOUX"]').find('img[data-id="' + row.RWID + '"]').attr('src', url);
|
||||
}
|
||||
|
||||
} else if (type == 'new') {
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
<link href="${request.contextPath}<@jstime url='/static/libs/formdesign/css/design.css'> </@jstime>" rel="stylesheet">
|
||||
<link href="${request.contextPath}<@jstime url='/static/libs/formdesign/css/bigscreenTheme/theme.css'> </@jstime>" rel="stylesheet">
|
||||
<link rel="stylesheet" href="${request.contextPath}<@jstime url='/static/libs/formdesign/css/font-awesome/css/font-awesome.css'> </@jstime>" media="all" />
|
||||
<link rel="stylesheet" href="${request.contextPath}<@jstime url='/static/libs/formdesign/css/iconfont/iconfont.css'> </@jstime>">
|
||||
|
||||
<!-- 添加发生重大事件获取哀悼日需要把网站变灰的样式 -->
|
||||
<@config id = Global.SYSOPTKEY_ISOPENZHIHUI orgid = "${orgid}" >
|
||||
<link id="filterCss" rel="stylesheet" href="${request.contextPath}<@jstime url='/static/modules/manager/css/filter.css'> </@jstime>" media="all">
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<link rel="stylesheet" href="${request.contextPath}<@jstime url='/static/libs/formdesign/css/design.css'> </@jstime>">
|
||||
<link rel="stylesheet" href="${request.contextPath}<@jstime url='/static/libs/formdesign/css/bigscreenTheme/theme.css'> </@jstime>">
|
||||
<link rel="stylesheet" href="${request.contextPath}<@jstime url='/static/libs/formdesign/css/font-awesome/css/font-awesome.css'> </@jstime>" media="all" />
|
||||
<link rel="stylesheet" href="${request.contextPath}<@jstime url='/static/libs/formdesign/css/iconfont/iconfont.css'> </@jstime>">
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
|
|
Loading…
Reference in New Issue