123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- package model
- import (
- model2 "Medical_OAuth/common/model"
- )
- type SysMenu struct {
- model2.Model
- ParentId int `json:"parentId" gorm:"size:11;"` // 父id
- ServiceMenuId int `json:"serviceMenuId" gorm:"size:4;not null;comment:服务菜单ID"` //服务菜单ID
- ServiceId int `json:"serviceId" gorm:"size:4;not null;comment:服务ID"` // 服务ID
- Sort int `json:"sort" gorm:"size:4;"` // 排序
- Visible string `json:"visible" gorm:"size:1;"` // 1-显示 0-隐藏
- MenuPath string `json:"paths" gorm:"size:128;" swaggerignore:"true"` //
- Name string `json:"name" gorm:"-"` // 菜单名称
- MenuType string `json:"menuType" gorm:"-"` // 菜单类型
- Icon string `json:"icon" gorm:"-"` // 图标
- Component string `json:"component" gorm:"-"` // 组件路径
- IsFrame string `json:"isFrame" gorm:"-"` // 是否外链 1-是 2-否
- Path string `json:"path" gorm:"-"` // 外链路由地址
- Permission string `json:"permission" gorm:"-"` // 权限标识
- Children []SysMenu `json:"children,omitempty" gorm:"-"`
- model2.ControlBy
- model2.ModelTime
- }
- type SysMenuSlice []SysMenu
- func (x SysMenuSlice) Len() int { return len(x) }
- func (x SysMenuSlice) Less(i, j int) bool { return x[i].Sort < x[j].Sort }
- func (x SysMenuSlice) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
- func (SysMenu) TableName() string {
- return "sys_menu"
- }
- func (e *SysMenu) Generate() model2.ActiveRecord {
- o := *e
- return &o
- }
- func (e *SysMenu) GetId() interface{} {
- return e.Id
- }
- var (
- NoDeptMenu = `[
- {
- "path": "/usermanagement",
- "name": "usermanagement",
- "icon": "icon-icon-",
- "component": "@/views/usermanagement/index.vue",
- "redirect": "/usermanagement/user",
- "meta": {
- "roles": false,
- "title": "用户管理"
- },
- "children": [
- {
- "path": "/usermanagement/user",
- "name": "user",
- "icon": "icon-icon-",
- "component": "@/views/usermanagement/user/index.vue",
- "meta": {
- "roles": false,
- "title": "用户管理"
- }
- },
- {
- "path": "/usermanagement/company",
- "name": "company",
- "icon": "icon-zhuye1",
- "component": "@/views/usermanagement/company/index.vue",
- "meta": {
- "roles": false,
- "title": "公司管理"
- }
- }
- ]
- }
- ]`
- HaveDeptMenu = `[
- {
- "path": "/home",
- "name": "home",
- "icon": "icon-shouye_zhuyehui",
- "component": "@/views/home/index.vue",
- "meta": {
- "roles": false,
- "title": "工作台"
- }
- },
- {
- "path": "/essentialinfo",
- "name": "essentialinfo",
- "icon": "icon-zhuye1",
- "component": "@/views/essentialinfo/index.vue",
- "meta": {
- "roles": false,
- "title": "基本信息"
- }
- },
- {
- "path": "/usermanagement",
- "name": "usermanagement",
- "icon": "icon-icon-",
- "component": "@/views/usermanagement/index.vue",
- "redirect": "/usermanagement/user",
- "meta": {
- "roles": false,
- "title": "用户管理"
- },
- "children": [
- {
- "path": "/usermanagement/user",
- "name": "user",
- "icon": "icon-icon-",
- "component": "@/views/usermanagement/user/index.vue",
- "meta": {
- "roles": false,
- "title": "用户管理"
- }
- },
- {
- "path": "/usermanagement/company",
- "name": "company",
- "icon": "icon-zhuye1",
- "component": "@/views/usermanagement/company/index.vue",
- "meta": {
- "roles": false,
- "title": "公司管理"
- }
- }
- ]
- },
- {
- "path": "/stockcontrol",
- "name": "stockcontrol",
- "icon": "icon-_kucun",
- "component": "@/views/stockcontrol/index.vue",
- "redirect": "/stockcontrol/storagePut",
- "meta": {
- "roles": false,
- "title": "库存管理"
- },
- "children": [
- {
- "path": "/stockcontrol/storagePut",
- "name": "storagePut",
- "icon": "icon-_kucun",
- "component": "@/views/stockcontrol/storagePut/index.vue",
- "meta": {
- "roles": false,
- "title": "入库管理"
- }
- },
- {
- "path": "/stockcontrol/storageFrom",
- "name": "storageFrom",
- "icon": "icon-ruku",
- "component": "@/views/stockcontrol/storageFrom/index.vue",
- "meta": {
- "roles": false,
- "title": "出库管理"
- }
- },
- {
- "path": "/stockcontrol/storageInquire",
- "name": "storageInquire",
- "icon": "icon-fenxixiangmuku",
- "component": "@/views/stockcontrol/storageInquire/index.vue",
- "meta": {
- "roles": false,
- "title": "库存查询"
- }
- },
- {
- "path": "/stockcontrol/transmitReceive",
- "name": "transmitReceive",
- "icon": "icon-ruku",
- "component": "@/views/stockcontrol/transmitReceive/index.vue",
- "meta": {
- "roles": false,
- "title": "收发记录"
- }
- }
- ]
- },
- {
- "path": "/salesmanagement",
- "name": "salesmanagement",
- "icon": "icon-chukuliucheng",
- "component": "@/views/salesmanagement/index.vue",
- "redirect": "/salesmanagement/sellManage",
- "meta": {
- "roles": false,
- "title": "销售管理"
- },
- "children": [
- {
- "path": "/salesmanagement/sellManage",
- "name": "sellManage",
- "icon": "icon-chukuliucheng",
- "component": "@/views/salesmanagement/sellManage/index.vue",
- "meta": {
- "roles": false,
- "title": "销售管理"
- }
- },
- {
- "path": "/salesmanagement/storageOrderGoods",
- "name": "storageOrderGoods",
- "icon": "icon-dingdan",
- "component": "@/views/salesmanagement/storageOrderGoods/index.vue",
- "meta": {
- "roles": false,
- "title": "销售订单"
- }
- }
- ]
- },
- {
- "path": "/medicine",
- "name": "medicine",
- "icon": "icon-yaopin",
- "component": "@/views/medicine/index.vue",
- "redirect": "/medicine/medicineManage",
- "meta": {
- "roles": false,
- "title": "药品管理"
- },
- "children": [
- {
- "path": "/medicine/medicineManage",
- "name": "medicineManage",
- "icon": "icon-yaopin",
- "component": "@/views/medicine/medicineManage/index.vue",
- "meta": {
- "roles": false,
- "title": "药品管理"
- }
- }
- ]
- }
- ]
- `
- )
|