flyboot注意事项
①ID必须为varchar(32),不可以设定为int自增类型
②updateTime及updateBy数据库要默认设定为空。
③实体中不要定义tenant_id字段,否则会在insert过程中提示属性重复,因为多租户会自动附加此字段tenant_id定做。
④只要后台出现代码更新的则必须前后端全部重机关报启动。先后端再前端。
⑤增加ADD、DELETE、等按键控制权限时,一定要删除
⑥在绑定数据字典的方法:
a.字段+“_dictText”
b.字段,显示时替换值,通过缓存读取。
{
title:'类型',
align:"center",
dataIndex: 'itemType',
customRender: (text) => {
//字典值替换通用方法
return filterDictTextByCache('item_type', text);
}
//字典数组缓存
stateDictOptions: [],
pmtCodeDictOptions: [],
itemTypeDictOptions: [],
initDictConfig(){
//初始化字典 - PMT码
initDictOptions('pmt_code').then((res) => {
if (res.success) {
this.pmtCodeDictOptions = res.result;
}
});
//初始化字典 - 物料类型
initDictOptions('item_type').then((res) => {
if (res.success) {
this.itemTypeDictOptions = res.result;
}
});
//初始化字典 - 状态
initDictOptions('state').then((res) => {
if (res.success) {
this.stateDictOptions = res.result;
}
});