增加文本比较功能

This commit is contained in:
Minho
2017-06-09 18:14:55 +08:00
parent 33ad75a088
commit fc9a237259
63 changed files with 14512 additions and 23 deletions

View File

@@ -458,7 +458,7 @@ func (c *DocumentController) Upload() {
attachment.DocumentId = doc_id
}
if strings.EqualFold(ext, ".jpg") || strings.EqualFold(ext, ".jpeg") || strings.EqualFold(ext, "png") || strings.EqualFold(ext, "gif") {
if strings.EqualFold(ext, ".jpg") || strings.EqualFold(ext, ".jpeg") || strings.EqualFold(ext, ".png") || strings.EqualFold(ext, ".gif") {
attachment.HttpPath = "/" + strings.Replace(strings.TrimPrefix(filePath, commands.WorkingDirectory), "\\", "/", -1)
if strings.HasPrefix(attachment.HttpPath, "//") {
@@ -1078,6 +1078,11 @@ func (c *DocumentController) RestoreHistory() {
c.JsonResult(0, "ok", doc)
}
func (c *DocumentController) Compare() {
c.Prepare()
c.TplName = "document/compare.tpl"
}
//递归生成文档序列数组.
func RecursiveFun(parent_id int, prefix, dpath string, c *DocumentController, book *models.BookResult, docs []*models.Document, paths *list.List) {
for _, item := range docs {