Skip to content

Commit

Permalink
fix: 资源文档压缩包增加未变更状态 (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
leafage-collb authored Jul 13, 2023
1 parent f05d342 commit 4b86c09
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/dashboard-front/src/language/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,8 @@ export default {
"覆盖 <strong style=\"color: #EA3536;\"> {updateNum} </strong> 条": "Override <strong style=\"color: #EA3536;\"> {updateNum} </strong>",
"新建 <strong style=\"color: #2DCB56;\"> {createDocNum} </strong> 条,": "Create <strong style=\"color: #2DCB56;\"> {createDocNum} </strong>,",
"覆盖 <strong style=\"color: #EA3536;\"> {updateDocNum} </strong> 条": "Override <strong style=\"color: #EA3536;\"> {updateDocNum} </strong>",
"变更 <strong style=\"color: #2DCB56;\"> {updateNum} </strong> 条,": "Change <strong style=\"color: #2DCB56;\"> {updateNum} </strong>,",
"未变更 <strong style=\"color: #63656E\"> {updateNum} </strong> 条,": "Unchanged <strong style=\"color: #63656E\"> {updateNum} </strong>,",
"环境【{curStage}】将发布版本 {releaseVersion},当前版本将被覆盖,发布后,环境下新版本的资源可被访问。": "The stage [{curStage}] will release version {releaseVersion}, the current version will be overwritten, and after the release, the resources of the new version will be accessible.",
"蓝鲸应用ID [{detailsAppCode}] 访问API网关 [{currentApigwName}] 资源的请求详情": "App [{detailsAppCode}] Request details for accessing resources of the gateway [{currentApigwName}]",
"确定删除 【{DataName}】标签": "Confirm to delete the label [{DataName}]",
Expand Down
2 changes: 2 additions & 0 deletions src/dashboard-front/src/language/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,8 @@ export default {
"覆盖 <strong style=\"color: #EA3536;\"> {updateNum} </strong> 条": "覆盖 <strong style=\"color: #EA3536;\"> {updateNum} </strong> 条",
"新建 <strong style=\"color: #2DCB56;\"> {createDocNum} </strong> 条,": "新建 <strong style=\"color: #2DCB56;\"> {createDocNum} </strong> 条,",
"覆盖 <strong style=\"color: #EA3536;\"> {updateDocNum} </strong> 条": "覆盖 <strong style=\"color: #EA3536;\"> {updateDocNum} </strong> 条",
"变更 <strong style=\"color: #2DCB56;\"> {updateNum} </strong> 条,": "变更 <strong style=\"color: #2DCB56;\"> {updateNum} </strong> 条,",
"未变更 <strong style=\"color: #63656E\"> {updateNum} </strong> 条,": "未变更 <strong style=\"color: #63656E\"> {updateNum} </strong> 条,",
"环境【{curStage}】将发布版本 {releaseVersion},当前版本将被覆盖,发布后,环境下新版本的资源可被访问。": "环境【{curStage}】将发布版本 {releaseVersion},当前版本将被覆盖,发布后,环境下新版本的资源可被访问。",
"蓝鲸应用ID [{detailsAppCode}] 访问API网关 [{currentApigwName}] 资源的请求详情": "蓝鲸应用ID [{detailsAppCode}] 访问API网关 [{currentApigwName}] 资源的请求详情",
"确定删除 【{DataName}】标签": "确定删除 【{DataName}】标签",
Expand Down
32 changes: 21 additions & 11 deletions src/dashboard-front/src/views/resource/import-doc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
<p class="f14 ag-table-header">
{{ $t('请确认以下文档变更:') }}
<span v-html="addInfo"></span>
<span v-html="coverInfo"></span>
<span v-html="changeInfo"></span>
<span v-html="unchangedInfo"></span>
<span v-html="resourceInfo"></span>
<bk-input
class="fr"
Expand Down Expand Up @@ -393,9 +394,9 @@
const results = this.selectedResourceDocs.filter(item => item.id && !item.resource_doc_id)
return results.length
},
updateNum () {
updateDocList () {
const results = this.selectedResourceDocs.filter(item => item.id && item.resource_doc_id)
return results.length
return results
},
noExistNum () {
const results = this.resourceList.filter(item => !item.id)
Expand All @@ -404,8 +405,11 @@
addInfo () {
return this.$t(`新建 <strong style="color: #2DCB56;"> {createNum} </strong> 条,`, { createNum: this.createNum })
},
coverInfo () {
return this.$t(`覆盖 <strong style="color: #3a84ff;"> {updateNum} </strong> 条,`, { updateNum: this.updateNum })
changeInfo () {
return this.$t(`变更 <strong style="color: #2DCB56;"> {updateNum} </strong> 条,`, { updateNum: this.updateDocList.filter(v => v.is_change).length })
},
unchangedInfo () {
return this.$t(`未变更 <strong style="color: #63656E"> {updateNum} </strong> 条,`, { updateNum: this.updateDocList.filter(v => !v.is_change).length })
},
resourceInfo () {
return this.$t(`资源不存在 <strong style="color: #EA3536;"> {noExistNum} </strong> 条`, { noExistNum: this.noExistNum })
Expand Down Expand Up @@ -443,7 +447,8 @@
name: item.name,
id: item.id,
resource_doc_id: item.resource_doc_id,
filename: item.filename || ''
filename: item.filename || '',
is_change: item.resource_doc_content_changed
})
})
}
Expand All @@ -466,7 +471,8 @@
name: item.name,
id: item.id,
resource_doc_id: item.resource_doc_id,
filename: item.filename || ''
filename: item.filename || '',
is_change: item.resource_doc_content_changed
})
})
}
Expand Down Expand Up @@ -503,7 +509,8 @@
name: item.name,
id: item.id,
resource_doc_id: item.resource_doc_id,
filename: item.filename || ''
filename: item.filename || '',
is_change: item.resource_doc_content_changed
})
}
})
Expand Down Expand Up @@ -787,7 +794,8 @@
name: item.name,
id: item.id,
resource_doc_id: item.resource_doc_id,
filename: item.filename || ''
filename: item.filename || '',
is_change: item.resource_doc_content_changed
})
}
})
Expand All @@ -809,7 +817,8 @@
name: item.name,
id: item.id,
resource_doc_id: item.resource_doc_id,
filename: item.filename || ''
filename: item.filename || '',
is_change: item.resource_doc_content_changed
})
}
}
Expand Down Expand Up @@ -861,7 +870,8 @@
name: item.name,
id: item.id,
resource_doc_id: item.resource_doc_id,
filename: item.filename || ''
filename: item.filename || '',
is_change: item.resource_doc_content_changed
})
return prev
}, [])
Expand Down

0 comments on commit 4b86c09

Please sign in to comment.