初次提交
This commit is contained in:
parent
9d5f8438c5
commit
97b2f54383
@ -323,6 +323,10 @@ func (that *MakeCode) Db2JSON(name string, path string, db *db.HoTimeDB) {
|
||||
isMenusGet := false //判断是否被目录收录
|
||||
for indexKey, _ := range that.IndexMenus {
|
||||
indexCode := strings.Index(indexKey, fk)
|
||||
if indexCode == 0 {
|
||||
isMenusGet = false
|
||||
continue
|
||||
}
|
||||
//如果相等或者表名在目录中已经设置(主要前一位是/并且他是最后一个字符串)
|
||||
if indexKey == fk || (indexCode != -1 && indexKey[indexCode-1] == '/' && indexKey[indexCode:] == fk) {
|
||||
isMenusGet = true
|
||||
@ -339,16 +343,21 @@ func (that *MakeCode) Db2JSON(name string, path string, db *db.HoTimeDB) {
|
||||
//并且代表有前缀,根据数据表分库设定使用
|
||||
if tablePrefixCode != -1 {
|
||||
prefixName = fk[:tablePrefixCode]
|
||||
} else {
|
||||
prefixName = fk
|
||||
}
|
||||
if tablePrefixCode != -1 {
|
||||
//if tablePrefixCode != -1 {
|
||||
for ck, _ := range that.TableColumns {
|
||||
//判断不止一个前缀相同
|
||||
if strings.Index(ck, prefixName) == 0 && ck != prefixName && ck != fk {
|
||||
if strings.Index(ck, prefixName) == 0 && ck != fk {
|
||||
isNewPrefix = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
prefixName = DefaultMenuParentName + ":" + prefixName
|
||||
|
||||
menuIns := Map{"label": that.TableConfig.GetMap(fk).GetString("label"), "table": fk}
|
||||
//多耗费一点内存
|
||||
mMenu := Map{"menus": Slice{menuIns}, "label": that.TableConfig.GetMap(fk).GetString("label"), "name": prefixName, "icon": "el-icon-setting"}
|
||||
@ -408,6 +417,9 @@ func (that *MakeCode) Db2JSON(name string, path string, db *db.HoTimeDB) {
|
||||
if prefixColumn > -1 && that.TableConfig[oldTableName[prefixColumn+1:]] != nil {
|
||||
oldTableName = oldTableName[prefixColumn+1:]
|
||||
}
|
||||
if prefixColumn >= len(oldTableName) {
|
||||
prefixColumn = -1
|
||||
}
|
||||
//如果依然找不到则查询system_org是否存在
|
||||
if prefixColumn > -1 && that.TableConfig[DefaultMenuParentName+"_"+oldTableName[prefixColumn+1:]] != nil {
|
||||
oldTableName = DefaultMenuParentName + "_" + oldTableName[prefixColumn+1:]
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
. "../../../hotime/common"
|
||||
)
|
||||
|
||||
var ID = "d5b5439d83c30a18e93b8bbff9940e8b"
|
||||
var ID = "b6e1eae6a28c3e962c4e5e6b4650209e"
|
||||
|
||||
// Project 管理端项目
|
||||
var Project = Proj{
|
||||
@ -18,8 +18,10 @@ var Project = Proj{
|
||||
"org": orgCtr,
|
||||
"produce": produceCtr,
|
||||
"produce_material": produce_materialCtr,
|
||||
"produce_product": produce_productCtr,
|
||||
"product": productCtr,
|
||||
"product_check": product_checkCtr,
|
||||
"product_line": product_lineCtr,
|
||||
"product_spot_check": product_spot_checkCtr,
|
||||
"role": roleCtr,
|
||||
"user": userCtr,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -45,8 +45,5 @@
|
||||
"mode": 2,
|
||||
"port": "80",
|
||||
"sessionName": "HOTIME",
|
||||
"smsKey": "b0eb4bf0198b9983cffcb85b69fdf4fa",
|
||||
"smsLogin": "【恩易办】您的验证码为:{code},请在5分钟内使用,切勿将验证码泄露于他人,如非本人操作请忽略。",
|
||||
"smsNotice": "【恩易办】你收到一条新的预约事项,{name}预约办理{ctg}事项,预约办理时间:{date},排号:{sn}。",
|
||||
"tpt": "tpt"
|
||||
}
|
BIN
example/myhs.exe
BIN
example/myhs.exe
Binary file not shown.
Loading…
Reference in New Issue
Block a user