Compare commits

...

1 Commits

Author SHA1 Message Date
chenjinsong
77e5037a19 fix: 增加2条105环境演示用知识库假数据 2024-01-15 17:11:55 +08:00
4 changed files with 72 additions and 16 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -17,7 +17,7 @@
</el-switch> </el-switch>
</div> </div>
<div class="card-icon"> <div class="card-icon">
<img :src="data.iconUrl"/> <img :src="data.iconUrl" style="max-height: 50px;"/>
</div> </div>
<div class="card-title"> <div class="card-title">
<div class="card-title-name" :title="data.label">{{data.label}}</div> <div class="card-title-name" :title="data.label">{{data.label}}</div>
@@ -747,20 +747,26 @@ export default {
const hint = this.aiTaggingList.find(d => d.knowledgeId === this.switchKnowledgeId) const hint = this.aiTaggingList.find(d => d.knowledgeId === this.switchKnowledgeId)
const toStatus = hint.status === 0 ? 1 : 0 const toStatus = hint.status === 0 ? 1 : 0
const url = toStatus === 0 ? api.knowledgeBaseLearningStop : api.knowledgeBaseLearningStart const url = toStatus === 0 ? api.knowledgeBaseLearningStop : api.knowledgeBaseLearningStart
axios.post(`${url}?knowledgeId=${hint.knowledgeId}`).then(res => { if (hint.knowledgeId === 101 || hint.knowledgeId === 102) {
if (res.status === 200) { hint.status = toStatus
hint.status = toStatus this.$message.success(this.$t('tip.success'))
this.$message.success(this.$t('tip.success'))
} else {
console.error(res.message)
this.$message.error(this.errorMsgHandler(res))
}
}).catch(e => {
console.error(e)
this.$message.error(this.errorMsgHandler(e))
}).finally(() => {
this.showConfirmSwitch = false this.showConfirmSwitch = false
}) } else {
axios.post(`${url}?knowledgeId=${hint.knowledgeId}`).then(res => {
if (res.status === 200) {
hint.status = toStatus
this.$message.success(this.$t('tip.success'))
} else {
console.error(res.message)
this.$message.error(this.errorMsgHandler(res))
}
}).catch(e => {
console.error(e)
this.$message.error(this.errorMsgHandler(e))
}).finally(() => {
this.showConfirmSwitch = false
})
}
} }
}, },
watch: { watch: {
@@ -799,6 +805,40 @@ export default {
} }
} }
}) })
// 2024-01-15 以下两个是为105环境演示准备的假数据
const data1 = {
knowledgeId: 101,
name: 'CyberGhost',
category: 'ai_tagging',
description: 'CyberGhost is a VPN service used to unblock sites and browse privately and anonymously.',
isBuiltIn: 1,
isPublished: 1,
status: 1,
showUpdate: false
}
const basicInfo1 = builtInKnowledgeBaseBasicInfo.find(bi => bi.knowledgeId === data1.knowledgeId)
this.aiTaggingList.push({
...data1,
...basicInfo1
})
const data2 = {
knowledgeId: 102,
name: 'HotSpotshield VPN',
category: 'ai_tagging',
description: 'Hotspot Shield is a public VPN service, providing\n' +
'a secure proxy connection through an encrypted\n' +
'channel between your device and the target\n' +
'website, using VPN technology.',
isBuiltIn: 1,
isPublished: 1,
status: 1,
showUpdate: false
}
const basicInfo2 = builtInKnowledgeBaseBasicInfo.find(bi => bi.knowledgeId === data2.knowledgeId)
this.aiTaggingList.push({
...data2,
...basicInfo2
})
} }
} }
}, },
@@ -872,9 +912,9 @@ export default {
const find = this.aiTaggingList.find(item => item.knowledgeId === this.switchKnowledgeId) const find = this.aiTaggingList.find(item => item.knowledgeId === this.switchKnowledgeId)
if (find) { if (find) {
if (find.status === 0) { if (find.status === 0) {
tip = this.$t('tip.confirmEnablePsiphon3') + '?' tip = this.$t('tip.confirmEnable') + '?'
} else if (find.status === 1) { } else if (find.status === 1) {
tip = this.$t('tip.confirmDisablePsiphon3') + '?' tip = this.$t('tip.confirmDisable') + '?'
} }
} }
} }

View File

@@ -1859,6 +1859,22 @@ export const builtInKnowledgeBaseBasicInfo = [
label: 'Anonymity', label: 'Anonymity',
iconUrl: 'images/knowledge-base-logo/anonymity.png', iconUrl: 'images/knowledge-base-logo/anonymity.png',
desc: 'Communication system that conceals users\' identities and activities to protect privacy and prevent tracking or surveillance. This database provides lists of Tor nodes, I2P nodes, obfs4, etc.' desc: 'Communication system that conceals users\' identities and activities to protect privacy and prevent tracking or surveillance. This database provides lists of Tor nodes, I2P nodes, obfs4, etc.'
},
// 2024-01-15 以下两个是为105环境演示准备的假数据
{
knowledgeId: 101,
label: 'CyberGhost',
iconUrl: 'images/knowledge-base-logo/cyber-ghost.png',
desc: 'CyberGhost is a VPN service used to unblock sites and browse privately and anonymously.'
},
{
knowledgeId: 102,
label: 'HotSpotshield VPN',
iconUrl: 'images/knowledge-base-logo/hospot-vpn.png',
desc: 'Hotspot Shield is a public VPN service, providing\n' +
'a secure proxy connection through an encrypted\n' +
'channel between your device and the target\n' +
'website, using VPN technology.'
} }
] ]