diff --git a/code/makecode.go b/code/makecode.go index 27e62d5..a2921d3 100644 --- a/code/makecode.go +++ b/code/makecode.go @@ -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 { - for ck, _ := range that.TableColumns { - //判断不止一个前缀相同 - if strings.Index(ck, prefixName) == 0 && ck != prefixName && ck != fk { - isNewPrefix = true - break - } + //if tablePrefixCode != -1 { + for ck, _ := range that.TableColumns { + //判断不止一个前缀相同 + 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:] diff --git a/example/admin/init.go b/example/admin/init.go index a0b981d..5f323f7 100644 --- a/example/admin/init.go +++ b/example/admin/init.go @@ -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, diff --git a/example/config/app.json b/example/config/app.json deleted file mode 100644 index 77bde92..0000000 --- a/example/config/app.json +++ /dev/null @@ -1,2013 +0,0 @@ -{ - "id": "d5b5439d83c30a18e93b8bbff9940e8b", - "label": "HoTime管理平台", - "menus": [ - { - "icon": "el-icon-s-home", - "label": "平台首页", - "name": "HelloWorld" - }, - { - "icon": "el-icon-setting", - "label": "系统管理", - "menus": [ - { - "label": "关联原材料", - "table": "produce_material" - }, - { - "label": "成品管理", - "table": "product" - }, - { - "label": "人员管理", - "table": "admin" - }, - { - "label": "事项管理", - "table": "category" - }, - { - "label": "炉温监控", - "table": "furnace_temperature" - }, - { - "label": "部门管理", - "table": "org" - }, - { - "label": "生产计划", - "table": "produce" - }, - { - "label": "原材料管理", - "table": "material" - }, - { - "label": "出入库管理", - "table": "material_inout" - }, - { - "label": "角色管理", - "table": "role" - }, - { - "label": "客户管理", - "table": "user" - } - ], - "name": "sys" - }, - { - "icon": "el-icon-setting", - "label": "抽检管理", - "menus": [ - { - "label": "抽检管理", - "table": "product_spot_check" - }, - { - "label": "质检管理", - "table": "product_check" - } - ], - "name": "product" - } - ], - "name": "admin", - "tables": { - "admin": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "名称", - "name": "name", - "type": "text" - }, - { - "label": "手机号", - "name": "phone", - "type": "text" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "info": false, - "label": "密码", - "list": false, - "must": false, - "name": "password", - "type": "password" - }, - { - "label": "头像", - "list": false, - "must": false, - "name": "avatar_img", - "type": "image" - }, - { - "label": "角色", - "link": "role", - "name": "role_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "部门", - "link": "org", - "name": "org_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "人员管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "部门", - "link": "org", - "name": "org_id", - "type": "tree", - "value": "name" - } - ], - "table": "admin" - }, - "category": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "名称", - "name": "name", - "type": "text" - }, - { - "label": "排序 序号越大越排前面", - "list": false, - "must": false, - "name": "sort", - "sortable": true, - "type": "number" - }, - { - "label": "归属专区", - "link": "category", - "must": false, - "name": "parent_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "创建人员", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "关联部门", - "link": "org", - "name": "org_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "info": false, - "label": "索引", - "list": false, - "must": false, - "name": "index", - "notUse": true, - "type": "index" - } - ], - "label": "事项管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "归属专区", - "link": "category", - "name": "parent_id", - "type": "tree", - "value": "name" - }, - { - "label": "关联部门", - "link": "org", - "name": "org_id", - "type": "tree", - "value": "name" - } - ], - "table": "category" - }, - "furnace_temperature": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "日期", - "name": "name", - "type": "text" - }, - { - "label": "炉温照片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - } - ], - "label": "炉温监控", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "furnace_temperature" - }, - "material": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "原材料名称", - "name": "name", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "当前数量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "总消耗数", - "name": "used", - "sortable": true, - "type": "number" - }, - { - "label": "总存储数", - "name": "saved", - "sortable": true, - "type": "number" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "参数1", - "name": "rule", - "type": "text" - } - ], - "label": "原材料管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "material" - }, - "material_inout": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "出入库数量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "剩余数量", - "name": "saved", - "sortable": true, - "type": "number" - }, - { - "label": "对应原材料", - "link": "material", - "name": "material_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "入库", - "value": "0" - }, - { - "name": "出库", - "value": "1" - }, - { - "name": "退货", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "参数1", - "name": "rule", - "type": "text" - }, - { - "label": "关联生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "出入库管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "入库", - "value": "0" - }, - { - "name": "出库", - "value": "1" - }, - { - "name": "退货", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "material_inout" - }, - "org": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "编号", - "name": "sn", - "type": "text" - }, - { - "label": "组织名称", - "name": "name", - "type": "text" - }, - { - "label": "上级组织", - "link": "org", - "must": false, - "name": "parent_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "add": false, - "edit": false, - "label": "注册时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "创建用户", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "info": false, - "label": "索引 格式为逗号分隔,1,2,", - "list": false, - "must": false, - "name": "index", - "notUse": true, - "type": "index" - } - ], - "label": "部门管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "上级组织", - "link": "org", - "name": "parent_id", - "type": "tree", - "value": "name" - } - ], - "table": "org" - }, - "produce": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "计划名", - "name": "name", - "type": "text" - }, - { - "label": "对应成品", - "link": "product", - "name": "product_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "客户", - "link": "user", - "name": "user_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "开始时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已完成", - "value": "0" - }, - { - "name": "待生产", - "value": "1" - }, - { - "name": "生产中", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "计划生产总量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "当前已生产", - "name": "now", - "sortable": true, - "type": "number" - }, - { - "add": false, - "edit": false, - "label": "计划完成时间", - "must": false, - "name": "finish_time", - "type": "time" - }, - { - "label": "其他规则", - "name": "rule", - "type": "text" - } - ], - "label": "生产计划", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已完成", - "value": "0" - }, - { - "name": "待生产", - "value": "1" - }, - { - "name": "生产中", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "produce" - }, - "produce_material": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "关联原材料", - "link": "material", - "name": "material_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "计划使用数量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "已使用数量", - "name": "used", - "sortable": true, - "type": "number" - }, - { - "label": "关联生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - } - ], - "type": "select" - } - ], - "label": "关联原材料", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "produce_material" - }, - "product": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "成品名称", - "name": "name", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "当前数量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "总发货量", - "name": "used", - "sortable": true, - "type": "number" - }, - { - "label": "总生产量", - "name": "saved", - "sortable": true, - "type": "number" - }, - { - "label": "抽检覆盖量", - "name": "spot_check_count", - "sortable": true, - "type": "number" - }, - { - "label": "发货抽检总覆盖量", - "name": "spot_check_used", - "sortable": true, - "type": "number" - }, - { - "label": "总抽检总覆盖量", - "name": "spot_check_saved", - "sortable": true, - "type": "number" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "参数1", - "name": "rule", - "type": "text" - }, - { - "label": "抽检参数", - "name": "rule_spot_check", - "type": "text" - }, - { - "label": "质检参数", - "name": "rule_check", - "type": "text" - } - ], - "label": "成品管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "product" - }, - "product_check": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "对应成品", - "link": "product", - "name": "product_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "质检结论", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "参数1", - "name": "rule", - "type": "text" - }, - { - "label": "生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "质检管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "质检结论", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "product_check" - }, - "product_spot_check": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "对应成品", - "link": "product", - "name": "product_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "抽检结论", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "参数1", - "name": "rule", - "type": "text" - }, - { - "label": "生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "抽检管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "抽检结论", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "product_spot_check" - }, - "role": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "名称", - "name": "name", - "type": "text" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "规则", - "name": "rule", - "type": "text" - } - ], - "label": "角色管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "role" - }, - "user": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "用户姓名", - "name": "name", - "type": "text" - }, - { - "label": "公司名称", - "name": "company", - "type": "text" - }, - { - "label": "手机号码", - "name": "phone", - "type": "text" - }, - { - "label": "邮箱", - "list": false, - "must": false, - "name": "email", - "type": "text" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "隐藏", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "头像", - "list": false, - "must": false, - "name": "avatar", - "type": "image" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - } - ], - "label": "客户管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "隐藏", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "user" - } - } -} \ No newline at end of file diff --git a/example/config/config.json b/example/config/config.json index 217fead..ef79327 100644 --- a/example/config/config.json +++ b/example/config/config.json @@ -45,8 +45,5 @@ "mode": 2, "port": "80", "sessionName": "HOTIME", - "smsKey": "b0eb4bf0198b9983cffcb85b69fdf4fa", - "smsLogin": "【恩易办】您的验证码为:{code},请在5分钟内使用,切勿将验证码泄露于他人,如非本人操作请忽略。", - "smsNotice": "【恩易办】你收到一条新的预约事项,{name}预约办理{ctg}事项,预约办理时间:{date},排号:{sn}。", "tpt": "tpt" } \ No newline at end of file diff --git a/example/myhs.exe b/example/myhs.exe index c55f9e3..0252a23 100644 Binary files a/example/myhs.exe and b/example/myhs.exe differ