From 1acf226d3a1be0cf65ecc5fcd83ec9f2efe3ef50 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Thu, 16 Dec 2021 16:04:06 +0800 Subject: [PATCH 1/2] fix issue --- templates/repo/modelmanage/showinfo.tmpl | 22 +++++++++++++++------- web_src/js/components/Model.vue | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/templates/repo/modelmanage/showinfo.tmpl b/templates/repo/modelmanage/showinfo.tmpl index 0ce08d899..dc6825588 100644 --- a/templates/repo/modelmanage/showinfo.tmpl +++ b/templates/repo/modelmanage/showinfo.tmpl @@ -110,7 +110,12 @@ 模型描述 -
+ +
+ + +
+ @@ -221,15 +226,16 @@ function tranSize(value){ function editorFn(context){ let id= context.dataset.id let text = context.dataset.desc - console.log(id,text) - $('#edit-td').replaceWith("
"); - + let textValue = text.replace(/enter;/g,'\r\n') + $('#edit-td').replaceWith(`
`); } function editorCancel(text,id){ - $('#edit-div').replaceWith(`
${text}
`) + let objkey = text.replace(/enter;/g,'\r\n') + $('#edit-div').replaceWith(`
${objkey}
`) } function editorSure(text,id){ let description=$('#textarea-value').val() + let sourcetext = $('#textarea-value').val().replace(/\n/g,'enter;') let data = { ID:id, Description:description @@ -239,16 +245,18 @@ function editorSure(text,id){ type:'PUT', data:data }).done((res)=>{ - $('#edit-div').replaceWith(`
${description}
`) + $('#edit-div').replaceWith(`
${description}
`) }) } function renderInfo(obj,accObj,id){ for(let key in obj){ if(key==="Description"){ + let descriptionText=obj[key].replace(/\r\n/g,'enter;') $(`#${key}`).text(obj[key]) $(`#${key}`).attr("title",obj[key]) + $('#edit-pencil').attr("data-id",id) - $('#edit-pencil').attr("data-desc",obj[key]) + $('#edit-pencil').attr("data-desc",descriptionText) } else if(key==="Label"){ $('#Label').empty() diff --git a/web_src/js/components/Model.vue b/web_src/js/components/Model.vue index 783f43ce0..1ba4a76d7 100644 --- a/web_src/js/components/Model.vue +++ b/web_src/js/components/Model.vue @@ -292,7 +292,7 @@ export default { if(!this.loadNodeMap.get(row.cName)){ const parent = store.states.data const index = parent.findIndex(child => child.ID == row.ID) - parent.splice(index, 1) + this.getModelList() }else{ let {tree,treeNode,resolve} = this.loadNodeMap.get(row.cName) const keys = Object.keys(store.states.lazyTreeNodeMap); From 7c550bd23f379985e5fc2cf115cf9cf0af8949e0 Mon Sep 17 00:00:00 2001 From: zhoupzh Date: Wed, 22 Dec 2021 16:48:53 +0800 Subject: [PATCH 2/2] fix some issue --- templates/repo/cloudbrain/new.tmpl | 23 ++++++-- templates/repo/modelmanage/index.tmpl | 1 - templates/repo/modelmanage/showinfo.tmpl | 67 +++++++++++++++++++++++- web_src/js/components/Model.vue | 5 +- 4 files changed, 89 insertions(+), 7 deletions(-) diff --git a/templates/repo/cloudbrain/new.tmpl b/templates/repo/cloudbrain/new.tmpl index 82f761c07..eb7805a23 100755 --- a/templates/repo/cloudbrain/new.tmpl +++ b/templates/repo/cloudbrain/new.tmpl @@ -93,6 +93,14 @@ display: none; } + .icons{ + /* position: absolute !important; + right: 150px; + top: 14px; + z-index: 2; */ + } + +
@@ -182,9 +190,10 @@
-
+
+ {{range .images}} @@ -261,9 +270,17 @@