Documentation ¶
Overview ¶
在线成果登记
成果类型和折标系数表
成果里的附件操作
接受ecms传过来的成果清单
在线成果登记
注意:在Go的标准库encoding/json包中,允许使用 map[string]interface{}和[]interface{} 类型的值来分别存放未知结构的JSON对象或数组 在线价值登记
在线成果登记
Index ¶
- Variables
- func Createip()
- func FileSize(file string) (int64, error)
- func Getiprole(ip string) (role int)
- func RemoveRepByMap(slc []int) []int
- type AchDepart
- type AchEmployee
- type AchSecoffice
- type Achievement
- func (c *Achievement) Achievcategory()
- func (c *Achievement) AchievementSend()
- func (c *Achievement) AddAchievcategory()
- func (c *Achievement) AddCatalog()
- func (c *Achievement) CatalogAttachment()
- func (c *Achievement) CatalogContent()
- func (c *Achievement) DeleteAchievcategory()
- func (c *Achievement) DeleteCatalog()
- func (c *Achievement) DownSendCatalog()
- func (c *Achievement) Echarts()
- func (c *Achievement) Echarts2()
- func (c *Achievement) Echarts3()
- func (c *Achievement) GetAchievement()
- func (c *Achievement) GetAchievementUser()
- func (c *Achievement) Import_Xls_Catalog()
- func (c *Achievement) ModifyCatalog()
- func (c *Achievement) ModifyContent()
- func (c *Achievement) ModifyLink()
- func (c *Achievement) Participate()
- func (c *Achievement) ProjectAchievement()
- func (c *Achievement) ProjectUserParticipate()
- func (c *Achievement) SecParticipate()
- func (c *Achievement) SecProjectAchievement()
- func (c *Achievement) SecofficeData()
- func (c *Achievement) Secofficeshow()
- func (c *Achievement) SendCatalog()
- func (c *Achievement) Specialty()
- func (c *Achievement) UpdateAchievcategory()
- type AdminController
- func (c *AdminController) AddCalendar()
- func (c *AdminController) AddCarousel()
- func (c *AdminController) AddCategory()
- func (c *AdminController) AddDepartment()
- func (c *AdminController) AddIpsegment()
- func (c *AdminController) AddsynchIp()
- func (c *AdminController) Admin()
- func (c *AdminController) Calendar()
- func (c *AdminController) Carousel()
- func (c *AdminController) Category()
- func (c *AdminController) CategoryTitle()
- func (c *AdminController) DeleteCalendar()
- func (c *AdminController) DeleteCategory()
- func (c *AdminController) DeleteDepartment()
- func (c *AdminController) DeleteIpsegment()
- func (c *AdminController) DeletesynchIp()
- func (c *AdminController) Department()
- func (c *AdminController) DepartmentTitle()
- func (c *AdminController) DropCalendar()
- func (c *AdminController) Get()
- func (c *AdminController) Ipsegment()
- func (c *AdminController) Jsoneditor()
- func (c *AdminController) ResizeCalendar()
- func (c *AdminController) SearchCalendar()
- func (c *AdminController) SynchIp()
- func (c *AdminController) Test1()
- func (c *AdminController) Testdown()
- func (c *AdminController) UpdateCalendar()
- func (c *AdminController) UpdateCategory()
- func (c *AdminController) UpdateDepartment()
- func (c *AdminController) UpdateIpsegment()
- func (c *AdminController) UpdatesynchIp()
- type AdminLogController
- type AdminMeritController
- func (c *AdminMeritController) AddMerit()
- func (c *AdminMeritController) AddSecofficeMerit()
- func (c *AdminMeritController) DeleteMerit()
- func (c *AdminMeritController) ImportMeritTopics()
- func (c *AdminMeritController) Merit()
- func (c *AdminMeritController) SecofficeMerit()
- func (c *AdminMeritController) UpdateMerit()
- type AttachController
- type CatalogContentlevel
- type CatalogLinkCont
- type CatalogLinkConts
- type CatalogLinkEditable
- type EcmsController
- type Employee
- type FileNode
- type FroalaController
- type IndexController
- type List1
- type LoginController
- type Logstruct
- type MeritCategory
- type MeritController
- func (c *MeritController) AddMerit()
- func (c *MeritController) Delete()
- func (c *MeritController) DownSendMerit()
- func (c *MeritController) GetMerit()
- func (c *MeritController) GetMeritTreeJson()
- func (c *MeritController) Jsoneditor()
- func (c *MeritController) MeritExamined()
- func (c *MeritController) MeritSend()
- func (c *MeritController) Myself()
- func (c *MeritController) SecofficeData()
- func (c *MeritController) Secofficeshow()
- func (c *MeritController) SendMerit()
- func (c *MeritController) TestXorm()
- func (c *MeritController) UpdateMerit()
- type MeritDepartment
- type MeritList
- type MeritMark
- type MeritSecoffice
- type MeritTopicSlice
- type Person
- type Project
- type RegistController
- type RoleController
- func (c *RoleController) Delete()
- func (c *RoleController) Get()
- func (c *RoleController) GetRoleAchieve()
- func (c *RoleController) GetRolePermission()
- func (c *RoleController) Post()
- func (c *RoleController) RoleAchieve()
- func (c *RoleController) Test()
- func (c *RoleController) Update()
- func (c *RoleController) UserRole()
- type Select1
- type TestController
- type Tree
- type UploadimgFroala
- type UserController
- func (c *UserController) AddUser()
- func (c *UserController) DeleteUser()
- func (c *UserController) GetUserByUsername()
- func (c *UserController) ImportUsers()
- func (c *UserController) Index()
- func (this *UserController) Roleerr()
- func (c *UserController) UpdateUser()
- func (c *UserController) User()
- func (c *UserController) Usermyself()
- func (c *UserController) View()
- type Userrole
- type Userselect
Constants ¶
This section is empty.
Variables ¶
var (
Iprolemaps map[string]int
)
1 init函数是用于程序执行前做包的初始化的函数,比如初始化包里的变量等 2 每个包可以拥有多个init函数 3 包的每个源文件也可以拥有多个init函数 4 同一个包中多个init函数的执行顺序go语言没有明确的定义(说明) 5 不同包的init函数按照包导入的依赖关系决定该初始化函数的执行顺序 6 init函数不能被其他函数调用,而是在main函数执行之前,自动被调用 读取iprole.txt文件,作为全局变量Iprolemaps,供调用访问者ip的权限用
Functions ¶
Types ¶
type AchEmployee ¶
type AchSecoffice ¶
type AchSecoffice struct { Id int64 `json:"id"` //`form:"-"` Pid int64 `form:"-"` Title string `json:"text"` Tags [1]string `json:"tags"` //显示员工数量 Employee []AchEmployee `json:"nodes"` Level string `json:"Level"` Href string `json:"href"` //点击科室,显示总体情况 Selectable bool `json:"selectable"` //否则点击node,没反应,即默认false点击展开收缩 }
type Achievement ¶
type Achievement struct {
beego.Controller
}
func (*Achievement) AchievementSend ¶
func (c *Achievement) AchievementSend()
20170608修改 显示登录用户待提交,处于设计,校核,审查,已提交,已经完成的 author=登录的人名,登录名所处制图-状态为1;设计-状态为2;校核-状态为3;审查-状态为4;已经完成,6;已经提交,5
func (*Achievement) AddAchievcategory ¶
func (c *Achievement) AddAchievcategory()
func (*Achievement) AddCatalog ¶
func (c *Achievement) AddCatalog()
在线添加目录,即插入一条目录 只能填写自己是设计/绘图/编制/校核的成果,并且至少下级有一级,不能添加审查
func (*Achievement) GetAchievement ¶
func (c *Achievement) GetAchievement()
根据权限,显示侧栏结构,方便查看科室里员工总体情况,以及查看员工个人详细
func (*Achievement) GetAchievementUser ¶
func (c *Achievement) GetAchievementUser()
用户登录后获得自己所在的分院和科室,然后显示对应的菜单 同时显示所有的成果记录 这个没用
func (*Achievement) Import_Xls_Catalog ¶
func (c *Achievement) Import_Xls_Catalog()
上传excel文件,导入成果到数据库 管理员上传,状态是根据表格,其他人上传都只能状态是的位置
func (*Achievement) Participate ¶
func (c *Achievement) Participate()
*********下面是统计分析************ 用户参与的项目列表和自己的贡献及项目总分值
func (*Achievement) ProjectAchievement ¶
func (c *Achievement) ProjectAchievement()
点击个人参与的项目,弹出模态框,显示这个项目所有成果 没有区分时间 没有按时间排序!!!
func (*Achievement) ProjectUserParticipate ¶
func (c *Achievement) ProjectUserParticipate()
展示一个项目所有参与人员的贡献率
func (*Achievement) SecParticipate ¶
func (c *Achievement) SecParticipate()
*******下面是科室统计分析 科室参与的项目列表和项目总分值
func (*Achievement) SecProjectAchievement ¶
func (c *Achievement) SecProjectAchievement()
显示科室月度全部成果
func (*Achievement) SecofficeData ¶
func (c *Achievement) SecofficeData()
上面那个是显示右侧页面 这个是填充数据——科室内人员成果情况统计
func (*Achievement) Secofficeshow ¶
func (c *Achievement) Secofficeshow()
下面关于用户名的取得需要重新来改改 上面那个是显示侧栏 这个是显示右侧iframe框架内容——科室内人员成果情况统计
func (*Achievement) UpdateAchievcategory ¶
func (c *Achievement) UpdateAchievcategory()
type AdminController ¶
type AdminController struct {
beego.Controller
}
CMSADMIN API
func (*AdminController) AddCalendar ¶
func (c *AdminController) AddCalendar()
********************日历开始************** 添加日历
func (*AdminController) AddCategory ¶
func (c *AdminController) AddCategory()
@Title Post Category by pid title code grade @Description Get Category list by title info @Success 200 {object} models.AddAdminCategory @Param pid query string false "parentid of category" @Param title query string false "title of category" @Param code query string false "code of category" @Param grade query string false "grade of category" @router /category/addcategory [post] 添加
func (*AdminController) Admin ¶
func (c *AdminController) Admin()
func (*AdminController) Calendar ¶
func (c *AdminController) Calendar()
返回日历json数据 如果是管理员,则显示全部,非管理员,显示公开
func (*AdminController) Category ¶
func (c *AdminController) Category()
@Title Get Category list @Description Get Category list by some info @Success 200 {object} models.GetAdminCategory @Param id path string false "category id" @router /category/:id [get] 根据数字id或空查询分类,如果有pid,则查询下级,如果pid为空,则查询类别
func (*AdminController) CategoryTitle ¶
func (c *AdminController) CategoryTitle()
@Title Get Category by title @Description Get Category list by title info @Success 200 {object} models.GetAdminCategory @Param title query string false "title of search" @router /categorytitle [get] 根据名称title查询分级表
func (*AdminController) DeleteDepartment ¶
func (c *AdminController) DeleteDepartment()
删除,如果有下级,一起删除
func (*AdminController) Department ¶
func (c *AdminController) Department()
******后台部门结构******** 根据数字id或空查询分类,如果有pid,则查询下级,如果pid为空,则查询类别
func (*AdminController) DepartmentTitle ¶
func (c *AdminController) DepartmentTitle()
根据名称title查询分级表
func (*AdminController) Get ¶
func (c *AdminController) Get()
func (*AdminController) Jsoneditor ¶
func (c *AdminController) Jsoneditor()
func (*AdminController) SearchCalendar ¶
func (c *AdminController) SearchCalendar()
func (*AdminController) SynchIp ¶
func (c *AdminController) SynchIp()
******编辑项目同步ip********** 根据项目id查询ip
func (*AdminController) Test1 ¶
func (c *AdminController) Test1()
func (*AdminController) Testdown ¶
func (c *AdminController) Testdown()
type AdminLogController ¶
type AdminLogController struct {
beego.Controller
}
CMSADMIN API
func (*AdminLogController) ErrLog ¶
func (c *AdminLogController) ErrLog()
@Title getAdminBlock @Description get log list @Success 200 {object} success @Failure 400 Invalid page @Failure 404 page not found @router /errlog [get]
func (*AdminLogController) InfoLog ¶
func (c *AdminLogController) InfoLog()
@Title getAdminBlock @Description get log list @Success 200 {object} success @Failure 400 Invalid page @Failure 404 page not found @router /infolog [get]
type AdminMeritController ¶
type AdminMeritController struct {
beego.Controller
}
CMSADMIN API
func (*AdminMeritController) AddSecofficeMerit ¶
func (c *AdminMeritController) AddSecofficeMerit()
向科室id里添加价值分类
func (*AdminMeritController) ImportMeritTopics ¶
func (c *AdminMeritController) ImportMeritTopics()
@Title post import merittopic excel @Description post import merit excel @Success 200 {object} SUCCESS @Failure 400 Invalid page supplied @Failure 404 file not found @router /importmerittopics [post] 上传excel文件,格式:第一行,序号-名称-编号,都打上格子
func (*AdminMeritController) Merit ¶
func (c *AdminMeritController) Merit()
**********价值*********** 取得所有价值分类,或没有下级的价值 根据数字id或空查询分类,如果有pid,则查询下级,如果pid为空,则查询类别
func (*AdminMeritController) SecofficeMerit ¶
func (c *AdminMeritController) SecofficeMerit()
根据科室id得到价值分类,填充table
type AttachController ¶
type AttachController struct {
beego.Controller
}
func (*AttachController) Attachment ¶
func (c *AttachController) Attachment()
目前有文章中的图片、成果中文档的预览、onlyoffice中的文档协作、pdf中的附件路径等均采用绝对路径型式 文章中的附件呢? default中的pdf页面中的{{.pdflink}},绝对路径
type Session struct { Session int }
attachment/路径/附件名称
type CatalogContentlevel ¶
type CatalogContentlevel struct { Id int64 Content string Title string Editable bool CatalogId int64 Created time.Time `orm:"auto_now_add;type(datetime)"` Updated time.Time `orm:"auto_now_add;type(datetime)"` }
设计说明表
type CatalogLinkCont ¶
type CatalogLinkCont struct { Id int64 `json:"id"` ProjectNumber string //项目编号 ProjectName string //项目名称 DesignStage string //阶段 Section string //专业 Tnumber string //成果编号 Name string //成果名称 Category string //成果类型 Page string //成果计量单位 Count float64 //成果数量 Drawn string //编制、绘制 Designd string //设计 Checked string //校核 Examined string //审查 Verified string //核定 Approved string //批准 Complex float64 //难度系数 Drawnratio float64 //编制、绘制占比系数 Designdratio float64 //设计系数 Checkedratio float64 //校核系数 Examinedratio float64 //审查系数 Datestring string //保存字符型日期 Date time.Time `orm:"null;auto_now_add;type(datetime)"` Created time.Time `orm:"auto_now_add;type(datetime)"` Updated time.Time `orm:"auto_now_add;type(datetime)"` Author string //上传者 State int // Catalog models.Catalog Link []models.CatalogLink Content []models.CatalogContent }
Catalog添加附件链接和设计说明、校审意见
type CatalogLinkConts ¶
type CatalogLinkConts struct { Id int64 ProjectNumber string //项目编号 ProjectName string //项目名称 DesignStage string //阶段 Section string //专业 Tnumber string //成果编号 Name string //成果名称 Category string //成果类型 Page string //成果计量单位 Count float64 //成果数量 Drawn string //编制、绘制 Designd string //设计 Checked string //校核 Examined string //审查 Verified string //核定 Approved string //批准 Complex float64 //难度系数 Drawnratio float64 //编制、绘制占比系数 Designdratio float64 //设计系数 Checkedratio float64 //校核系数 Examinedratio float64 //审查系数 Datestring string //保存字符型日期 Date time.Time `orm:"null;auto_now_add;type(datetime)"` Created time.Time `orm:"auto_now_add;type(datetime)"` Updated time.Time `orm:"auto_now_add;type(datetime)"` Author string //上传者 State int // Catalog models.Catalog Link []models.CatalogLink Content []models.CatalogContent }
Catalog添加附件链接和设计说明、校审意见
type CatalogLinkEditable ¶
type CatalogLinkEditable struct { Id int64 CatalogId int64 Url string `orm:"sie(500)"` Editable bool Created time.Time `orm:"auto_now_add;type(datetime)"` Updated time.Time `orm:"auto_now_add;type(datetime)"` }
附件链接表
type EcmsController ¶
type EcmsController struct {
beego.Controller
}
func (*EcmsController) GetEcmsPost ¶
func (c *EcmsController) GetEcmsPost()
type FileNode ¶
type FileNode struct { // Id int64 `json:"id"` Title string `json:"text"` Mark int `json:"mark"` FileNodes []*FileNode `json:"nodes"` }
树状目录数据
type FroalaController ¶
type FroalaController struct {
beego.Controller
}
CMSWX froala API
func (*FroalaController) UploadMeritImg ¶
func (c *FroalaController) UploadMeritImg()
@Title post merit user img @Description post user merit img @Param meritid query string true "The id of adminmerit" @Success 200 {object} SUCCESS @Failure 400 Invalid page supplied @Failure 404 articl not found @router /uploadmeritimg [post] merit添加用户价值图片上传
type IndexController ¶
type IndexController struct {
beego.Controller
}
type LoginController ¶
type LoginController struct {
beego.Controller
}
CMSWX login API
func (*LoginController) WxLogin ¶
func (c *LoginController) WxLogin()
@Title post wx login @Description post wx login @Param id path string true "The id of wx" @Param code path string true "The jscode of wxuser" @Success 200 {object} success @Failure 400 Invalid page supplied @Failure 404 articl not found @router /wxlogin/:id [get] 微信小程序访问微信服务器获取用户信息
type MeritCategory ¶
type MeritCategory struct { Id int64 `json:"Id"` Pid int64 `form:"-"` //这个为0表示是分类 Title string `json:"text"` Tags [2]int `json:"tags"` List []MeritList `json:"nodes"` Level string `json:"Level"` //4 Selectable bool `json:"selectable"` }
价值分类
type MeritController ¶
type MeritController struct {
beego.Controller
}
func (*MeritController) AddMerit ¶
func (c *MeritController) AddMerit()
@Title post user merit @Description post user merit @Param meritid query string true "The id of merit" @Param title query string true "The title of merit_topic" @Param content query string true "The content of merit_topic" @Param active query string true "The actuve of merit_topic" @Success 200 {object} SUCCESS @Failure 400 Invalid page supplied @Failure 404 merit not found @router /addmerit [post] 用户进行价值添加
func (*MeritController) GetMerit ¶
func (c *MeritController) GetMerit()
管理员1登录后显示侧栏:所有部门——科室——价值分类——价值 分院2登录侧栏显示: 分院——科室——价值分类——价值 科室主任3登录侧栏显示: 科室——价值分类——价值 用户4登录后侧栏显示: 价值分类——价值
func (*MeritController) GetMeritTreeJson ¶
func (c *MeritController) GetMeritTreeJson()
@Title get merit tree json @Description get merit tree json @Success 200 {object} SUCCESS @Failure 400 Invalid page supplied @Failure 404 merit not found @router /getmerittreejson [get]
func (*MeritController) Jsoneditor ¶
func (c *MeritController) Jsoneditor()
@Title get merit tree jsoneditor @Description get merit tree jsoneditor @Success 200 {object} models.GetAllMerit @Failure 400 Invalid page supplied @Failure 404 merit not found @router /meritjson [get] 给jsoneditor返回json数据
func (*MeritController) MeritSend ¶
func (c *MeritController) MeritSend()
显示指定价值下的登录用户待提交,已提交,已经完成的价值内容——计算分值
func (*MeritController) Myself ¶
func (c *MeritController) Myself()
这个是显示右侧iframe框架内容——用户登录默认页面,自己的全部价值内容列表 如果是主任以上权限人查看,则id代表用户名id,个人查看,id则代表价值id 要修改——已经完成的*************
func (*MeritController) SecofficeData ¶
func (c *MeritController) SecofficeData()
上面那个是显示右侧页面 这个是填充数据——科室内人员成果情况统计
func (*MeritController) Secofficeshow ¶
func (c *MeritController) Secofficeshow()
下面关于用户名的取得需要重新来改改 上面那个是显示侧栏 这个是显示右侧iframe框架内容——科室内人员情况统计
func (*MeritController) TestXorm ¶
func (c *MeritController) TestXorm()
@Title get usertopics list @Description get usertopics by page @Success 200 {object} models.GetProductsPage @Failure 400 Invalid page supplied @Failure 404 articls not found @router /testxorm [get] 测试取得xorm取得结构体嵌套_查不出来,奇怪
type MeritDepartment ¶
type MeritList ¶
type MeritList struct { Id int64 `json:"Id"` Pid int64 `form:"-"` Title string `json:"text"` Tags [2]int `json:"tags"` Mark string `json:"mark2"` //打分2 List string //大型、中型…… ListMark string //对应列表打分 Level string `json:"Level"` //4 Selectable bool `json:"selectable"` }
价值内容
type MeritSecoffice ¶
type MeritTopicSlice ¶
type MeritTopicSlice struct { Id int64 MeritCate string `json:"meritcate"` //价值分类 Merit string `json:"merit"` //价值 MeritId int64 UserId int64 UserNickName string `json:"usernickname"` Title string `json:"title"` Choose string Content string `json:"content"` State int //1编写状态,未提交;2编写者提交,等待审核确认;3,已经审核确认 Mark int `json:"mark"` Created time.Time `orm:"index","auto_now_add;type(datetime)"` Updated time.Time `orm:"index","auto_now_add;type(datetime)"` }
type Project ¶
type Project struct { Id int64 ProjectNumber string //项目编号 ProjectName string //项目名称 DesignStage string //阶段 Section string //专业 Value float64 Myvalue float64 Percent float64 }
个人参与的项目列表
type RegistController ¶
type RegistController struct {
beego.Controller
}
func (*RegistController) CheckUname ¶
func (this *RegistController) CheckUname()
func (*RegistController) Get ¶
func (this *RegistController) Get()
func (*RegistController) GetUname1 ¶
func (this *RegistController) GetUname1()
get方法,用于x-editable的select2方法
func (*RegistController) RegistErr ¶
func (this *RegistController) RegistErr()
func (*RegistController) WxRegist ¶
func (c *RegistController) WxRegist()
@Title post wx regist @Description post wx regist @Param uname query string true "The username of ueser" @Param password query string true "The password of account" @Param code query string true "The code of wx" @Param app_version query string true "The app_version of wx" @Success 200 {object} models.SaveUser @Failure 400 Invalid page supplied @Failure 404 user not found @router /wxregist [post] 添加微信小程序珠三角设代阅览版注册
type RoleController ¶
type RoleController struct {
beego.Controller
}
func (*RoleController) Delete ¶
func (c *RoleController) Delete()
swagger:operation POST /v1/auth/role/delete RoleController RoleController
删除角色信息
删除某个指定域中的角色信息
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: domain_id in: query description: domain code number required: true type: string format:
responses:
'200': description: success
func (*RoleController) Get ¶
func (c *RoleController) Get()
func (*RoleController) GetRoleAchieve ¶
func (c *RoleController) GetRoleAchieve()
查询角色所具有的查询科室成果、科室价值的权限
func (*RoleController) GetRolePermission ¶
func (c *RoleController) GetRolePermission()
查询角色所具有的权限对应的项目目录
func (*RoleController) RoleAchieve ¶
func (c *RoleController) RoleAchieve()
给角色赋查看科室成果、科室价值的权限——根据权限显示侧栏菜单 先删除角色对于这个组织架构的所有权限
func (*RoleController) Test ¶
func (c *RoleController) Test()
func (*RoleController) Update ¶
func (c *RoleController) Update()
swagger:operation PUT /v1/auth/role/put RoleController RoleController
更新角色信息
更新某个域中的角色信息,角色编码不能更新
--- produces: - application/json - application/xml - text/xml - text/html parameters:
- name: domain_id in: query description: domain code number required: true type: string format:
responses:
'200': description: success
func (*RoleController) UserRole ¶
func (c *RoleController) UserRole()
AddPolicy(sec string, ptype string, rule []string) 添加用户角色 先删除用户所有角色
type TestController ¶
type TestController struct {
beego.Controller
}
func (*TestController) Test ¶
func (c *TestController) Test()
type UploadimgFroala ¶
type UploadimgFroala struct {
// contains filtered or unexported fields
}
type UserController ¶
type UserController struct {
beego.Controller
}
func (*UserController) GetUserByUsername ¶
func (c *UserController) GetUserByUsername()
用户查看自己,修改密码等
func (*UserController) ImportUsers ¶
func (c *UserController) ImportUsers()
上传excel文件,导入到数据库 引用来自category的查看成果类型里的成果
func (*UserController) Index ¶
func (c *UserController) Index()
func (*UserController) Roleerr ¶
func (this *UserController) Roleerr()