Merge branch 'main' of http://101.34.228.45:3000/auto/AicsKnowledgeBase into main
commit
fc3dfa7ef4
|
@ -12,6 +12,7 @@ import "qrc:///AicsKnowledgeBase/qml/component"
|
|||
import "qrc:///AicsKnowledgeBase/qml/global"
|
||||
|
||||
FluArea {
|
||||
property ListModel noteListModel2: ListModel {}
|
||||
Popup {
|
||||
id: popup
|
||||
modal: true //模态, 为 true后弹出窗口会叠加一个独特的背景调光效果
|
||||
|
@ -28,7 +29,7 @@ FluArea {
|
|||
backgroundColor: "#f9f9f9"
|
||||
NoteList {
|
||||
id: noteList
|
||||
//noteListModel: content_page.noteListModel
|
||||
noteListModel: noteListModel2
|
||||
onOpen: function handle(noteId, authorId) {
|
||||
emit: SignalFileOperation.openNote(noteId, authorId)
|
||||
popup.close()
|
||||
|
@ -79,7 +80,6 @@ FluArea {
|
|||
property string brief: "这是一个简介"
|
||||
property string fileUrl: "https://api.hammer-hfut.tk:233/aics/file/"
|
||||
property string suffix: "md"
|
||||
property ListModel noteListModel
|
||||
|
||||
function getType(suffix) {
|
||||
if (suffix === "md")
|
||||
|
@ -128,18 +128,19 @@ FluArea {
|
|||
}
|
||||
content_page.favoriteCount = starers.length
|
||||
|
||||
noteList.setListModel([])
|
||||
var notes = data.knowledgeFileAttribute.notes
|
||||
noteCount = notes.length
|
||||
console.log(noteCount)
|
||||
var noteItems = []
|
||||
|
||||
noteListModel2.clear()
|
||||
for (i = 0; i < notes.length; i++) {
|
||||
var note = notes[i]
|
||||
|
||||
Request.getSearch(
|
||||
"search/note/" + notes[i].id + "/content",
|
||||
response => {
|
||||
noteItems.push({
|
||||
noteListModel2.append({
|
||||
"uuid": note.id,
|
||||
"title": note.title,
|
||||
"brief": response,
|
||||
|
@ -149,9 +150,10 @@ FluArea {
|
|||
"stars": note.starers.length,
|
||||
"date": note.createTime
|
||||
})
|
||||
console.log(
|
||||
noteListModel2.count)
|
||||
})
|
||||
}
|
||||
noteList.noteListModel.append(noteItems)
|
||||
if (content_area.type === "MD") {
|
||||
// console.log(content_area.type)
|
||||
FileTransferManager.getMarkdown(
|
||||
|
|
Loading…
Reference in New Issue