/** * 业务类型的属性参照 * @author weidy * @date 2022-04-05 */ layui.define(['layer','vciWebReferGrid'],function(exports){ var ReferGrid = function(){ this.backPath = (configData.compatibility?path:configData.objectServicePath); }; ReferGrid.prototype.vciFieldTypeMap = { VTBoolean:"布尔型", VTClob: "长文本", VTDate:"日期", VTDateTime:"日期时间", VTTime:"时间", VTLong:"长整型", VTDouble:"金额/双精度", VTInteger:"整形", VTFilePath:"文件", VTString:"字符串" }; ReferGrid.prototype.showReferDialog = function (referConfig){ //只需要设置默认的值,调用VciWebReferGrid即可 var that = this; referConfig.options.url = referConfig.options.url?referConfig.options.url:'btmTypeController/gridAttributesByBtmId'; referConfig.options.backPath = referConfig.options.backPath?referConfig.options.backPath:that.backPath; if(!("method" in referConfig.options)){ referConfig.options.method = 'get'; } if(!('valueField' in referConfig.options)){ referConfig.options.valueField = 'id'; } if(!('where' in referConfig.options)){ referConfig.options.where = { btmTypeId:referConfig.options.btmTypeId }; } if(!("tableConfig" in referConfig.options)){ referConfig.options.tableConfig = { limit:-1, cols: [layui.table.getIndexColumn(), layui.table.getCheckColumn(), { field: 'id', title: '属性英文编号', sort:true, width: 150 }, { field: 'name', title: '属性中文名称', sort:true, width: 160 },{ field: 'attributeLength', title: '属性长度', sort: true, width: 90 },{ field:'attrDataType', title:'属性类型', sort:true, width:150, templet:function (d){ return that.vciFieldTypeMap[d.attrDataType]; } }], queryColumns: [ { field: 'name', title: '属性英文编号' }, { field: 'label', title: '属性中文名称' } ] }; } layui.vciWebReferGrid.showReferDialog(referConfig); }; var rg = new ReferGrid(); exports('platform/objectService/OsAttributeForBtmRefer',rg); });