2021-06-03 18:57:56 +00:00
|
|
|
|
package code
|
|
|
|
|
|
|
|
|
|
import (
|
2022-03-12 17:12:29 +00:00
|
|
|
|
. "code.hoteas.com/golang/hotime/common"
|
2021-06-03 18:57:56 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var Config = Map{
|
2022-07-11 11:13:20 +00:00
|
|
|
|
"name": "HoTimeDashBoard",
|
|
|
|
|
//"id": "2f92h3herh23rh2y8",
|
2021-06-03 18:57:56 +00:00
|
|
|
|
"label": "HoTime管理平台",
|
2022-08-03 18:41:41 +00:00
|
|
|
|
"stop": Slice{"role", "org"}, //不更新的,同时不允许修改用户自身对应的表数据
|
2022-08-03 04:07:55 +00:00
|
|
|
|
"labelConfig": Map{
|
|
|
|
|
"show": "开启",
|
|
|
|
|
"add": "添加",
|
|
|
|
|
"delete": "删除",
|
|
|
|
|
"edit": "编辑",
|
|
|
|
|
"info": "查看详情",
|
|
|
|
|
"download": "下载清单",
|
|
|
|
|
},
|
2021-06-11 00:06:44 +00:00
|
|
|
|
"menus": []Map{
|
2022-07-11 11:13:20 +00:00
|
|
|
|
//{"label": "平台首页", "name": "HelloWorld", "icon": "el-icon-s-home"},
|
2021-06-11 00:06:44 +00:00
|
|
|
|
//{"label": "测试表格", "table": "table", "icon": "el-icon-suitcase"},
|
|
|
|
|
//{"label": "系统管理", "name": "setting", "icon": "el-icon-setting",
|
|
|
|
|
// "menus": []Map{
|
2022-01-12 09:33:20 +00:00
|
|
|
|
// {"label": "用户管理", "table": "user",
|
|
|
|
|
// "default": {
|
|
|
|
|
// "path": "info",
|
|
|
|
|
// "id": "1"
|
|
|
|
|
// },
|
|
|
|
|
// "auth": ["show","edit","info","add","delete"],
|
|
|
|
|
// },
|
2021-06-11 00:06:44 +00:00
|
|
|
|
// {"label": "组织管理", "table": "organization"},
|
|
|
|
|
// {"label": "地区管理", "table": "area"},
|
|
|
|
|
// {"label": "角色管理", "table": "role"},
|
|
|
|
|
// {"label": "日志管理", "table": "log"},
|
|
|
|
|
// {"label": "系统设置", "table": "system", "default": "edit"},
|
|
|
|
|
// },
|
|
|
|
|
//},
|
2021-06-03 18:57:56 +00:00
|
|
|
|
},
|
|
|
|
|
}
|
2021-06-11 01:41:23 +00:00
|
|
|
|
var DefaultMenuParentName = "sys"
|
2021-06-11 00:06:44 +00:00
|
|
|
|
|
2021-06-07 03:32:47 +00:00
|
|
|
|
var ColumnDataType = map[string]string{
|
|
|
|
|
//sqlite专有类型
|
|
|
|
|
"real": "number",
|
|
|
|
|
//mysql数据类型宽泛类型
|
|
|
|
|
"int": "number",
|
|
|
|
|
"float": "number",
|
|
|
|
|
"double": "number",
|
|
|
|
|
"decimal": "number",
|
2022-07-11 11:13:20 +00:00
|
|
|
|
"integer": "number", //sqlite3
|
2021-06-07 03:32:47 +00:00
|
|
|
|
"char": "text",
|
|
|
|
|
"text": "text",
|
|
|
|
|
"blob": "text",
|
|
|
|
|
"date": "time",
|
|
|
|
|
"time": "time",
|
|
|
|
|
"year": "time",
|
|
|
|
|
"geometry": "gis", //不建议使用gis类型,建议使用其他代替
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ColumnShow struct {
|
2022-10-18 19:37:52 +00:00
|
|
|
|
Name string //名称
|
|
|
|
|
|
|
|
|
|
List bool //列表权限
|
|
|
|
|
Edit bool //新增和编辑权限
|
|
|
|
|
Info bool //详情权限
|
|
|
|
|
Must bool //字段全匹配
|
2021-06-07 03:32:47 +00:00
|
|
|
|
Type string //空字符串表示
|
2021-07-03 20:03:29 +00:00
|
|
|
|
Strict bool //name严格匹配必须是这个词才行
|
2021-06-07 03:32:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-18 19:37:52 +00:00
|
|
|
|
var RuleConfig = []Map{
|
|
|
|
|
{"name": "idcard", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "id", "add": false, "list": true, "edit": false, "info": true, "must": false, "strict": true, "type": ""},
|
|
|
|
|
{"name": "sn", "add": false, "list": true, "edit": false, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "parent_ids", "add": false, "list": false, "edit": false, "info": false, "must": false, "strict": true, "type": "index"},
|
|
|
|
|
{"name": "index", "add": false, "list": false, "edit": false, "info": false, "must": false, "strict": true, "type": "index"},
|
|
|
|
|
|
|
|
|
|
{"name": "parent_id", "add": true, "list": true, "edit": true, "info": true, "must": false, "true": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "amount", "add": true, "list": true, "edit": true, "info": true, "must": false, "strict": true, "type": "money"},
|
|
|
|
|
|
|
|
|
|
{"name": "info", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": "textArea"},
|
|
|
|
|
|
|
|
|
|
{"name": "status", "add": true, "list": true, "edit": true, "info": true, "must": false, "strict": false, "type": "select"},
|
|
|
|
|
{"name": "state", "add": true, "list": true, "edit": true, "info": true, "must": false, "strict": false, "type": "select"},
|
|
|
|
|
{"name": "sex", "add": true, "list": true, "edit": true, "info": true, "must": false, "strict": false, "type": "select"},
|
|
|
|
|
|
|
|
|
|
{"name": "delete", "add": false, "list": false, "edit": false, "info": false, "must": false, "strict": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "lat", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "lng", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "latitude", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "longitude", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "password", "add": true, "list": false, "edit": true, "info": false, "must": false, "strict": false, "type": "password"},
|
|
|
|
|
{"name": "pwd", "add": true, "list": false, "edit": true, "info": false, "must": false, "strict": false, "type": "password"},
|
|
|
|
|
|
|
|
|
|
{"name": "version", "add": false, "list": false, "edit": false, "info": false, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "seq", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "sort", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "note", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "description", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "abstract", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "content", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": "textArea"},
|
|
|
|
|
|
|
|
|
|
{"name": "address", "add": true, "list": true, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "full_name", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
|
|
|
|
|
{"name": "create_time", "add": false, "list": false, "edit": false, "info": true, "must": false, "strict": true, "type": "time"},
|
|
|
|
|
{"name": "modify_time", "add": false, "list": true, "edit": false, "info": true, "must": false, "strict": true, "type": "time"},
|
|
|
|
|
|
|
|
|
|
{"name": "image", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": "image"},
|
|
|
|
|
|
|
|
|
|
{"name": "img", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": "image"},
|
|
|
|
|
{"name": "avatar", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": "image"},
|
|
|
|
|
{"name": "icon", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": "image"},
|
|
|
|
|
|
|
|
|
|
{"name": "file", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": "file"},
|
|
|
|
|
|
|
|
|
|
{"name": "age", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "email", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "time", "add": true, "list": true, "edit": true, "info": true, "must": false, "strict": false, "type": "time"},
|
|
|
|
|
|
|
|
|
|
{"name": "level", "add": false, "list": false, "edit": false, "info": true, "must": false, "strict": false, "type": ""},
|
|
|
|
|
{"name": "rule", "add": true, "list": true, "edit": true, "info": true, "must": false, "strict": false, "type": "form"},
|
|
|
|
|
|
|
|
|
|
{"name": "auth", "add": true, "list": false, "edit": true, "info": true, "must": false, "strict": false, "type": "auth"},
|
|
|
|
|
|
|
|
|
|
{"name": "table", "add": false, "list": true, "edit": false, "info": true, "must": false, "strict": false, "type": "table"},
|
|
|
|
|
{"name": "table_id", "add": false, "list": true, "edit": false, "info": true, "must": false, "strict": false, "type": "table_id"},
|
2021-06-07 03:32:47 +00:00
|
|
|
|
}
|
2022-10-18 19:37:52 +00:00
|
|
|
|
|
|
|
|
|
//var ColumnNameType = []ColumnShow{
|
|
|
|
|
// //通用
|
|
|
|
|
// {"idcard", false, true, true, false, "", false},
|
|
|
|
|
// {"id", true, false, true, false, "", true},
|
|
|
|
|
// {"sn", true, false, true, false, "", false},
|
|
|
|
|
// {"parent_ids", false, false, false, false, "index", true},
|
|
|
|
|
// {"parent_id", true, true, true, false, "", true},
|
|
|
|
|
// {"amount", true, true, true, false, "money", true},
|
|
|
|
|
// {"info", false, true, true, false, "textArea", false},
|
|
|
|
|
// //"sn"{true,true,true,""},
|
|
|
|
|
// {"status", true, true, true, false, "select", false},
|
|
|
|
|
// {"state", true, true, true, false, "select", false},
|
|
|
|
|
// {"sex", true, true, true, false, "select", false},
|
|
|
|
|
// {"delete", false, false, false, false, "", false},
|
|
|
|
|
//
|
|
|
|
|
// {"lat", false, true, true, false, "", false},
|
|
|
|
|
// {"lng", false, true, true, false, "", false},
|
|
|
|
|
// {"latitude", false, true, true, false, "", false},
|
|
|
|
|
// {"longitude", false, true, true, false, "", false},
|
|
|
|
|
//
|
|
|
|
|
// {"index", false, false, false, false, "index", false},
|
|
|
|
|
//
|
|
|
|
|
// {"password", false, true, false, false, "password", false},
|
|
|
|
|
// {"pwd", false, true, false, false, "password", false},
|
|
|
|
|
//
|
|
|
|
|
// {"version", false, false, false, false, "", false},
|
|
|
|
|
// {"seq", false, true, true, false, "", false},
|
|
|
|
|
// {"sort", false, true, true, false, "", false},
|
|
|
|
|
// {"note", false, true, true, false, "", false},
|
|
|
|
|
// {"description", false, true, true, false, "", false},
|
|
|
|
|
// {"abstract", false, true, true, false, "", false},
|
|
|
|
|
// {"content", false, true, true, false, "textArea", false},
|
|
|
|
|
// {"address", true, true, true, false, "", false},
|
|
|
|
|
// {"full_name", false, true, true, false, "", false},
|
|
|
|
|
// {"create_time", false, false, true, false, "time", true},
|
|
|
|
|
// {"modify_time", true, false, true, false, "time", true},
|
|
|
|
|
// {"image", false, true, true, false, "image", false},
|
|
|
|
|
// {"img", false, true, true, false, "image", false},
|
|
|
|
|
// {"icon", false, true, true, false, "image", false},
|
|
|
|
|
// {"avatar", false, true, true, false, "image", false},
|
|
|
|
|
// {"file", false, true, true, false, "file", false},
|
|
|
|
|
// {"age", false, true, true, false, "", false},
|
|
|
|
|
// {"email", false, true, true, false, "", false},
|
|
|
|
|
// {"time", true, true, true, false, "time", false},
|
|
|
|
|
// {"level", false, false, true, false, "", false},
|
|
|
|
|
// {"rule", true, true, true, false, "form", false},
|
|
|
|
|
// {"auth", false, true, true, false, "auth", true},
|
|
|
|
|
// {"table", true, false, true, false, "table", false},
|
|
|
|
|
// {"table_id", true, false, true, false, "table_id", false},
|
|
|
|
|
//}
|