Commit e923a045 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

Beta

See merge request !208
parents 92a4f93e 8c09d74f
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
name="viewport" name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/> />
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_4711453_t9t0ftzqft.css" /> <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4711453_usul8q5bwqp.css" />
<link <link
rel="preload" rel="preload"
href="https://gsst-poe-sit.gz.bcebos.com/front/SourceHanSansCN-Medium.otf" href="https://gsst-poe-sit.gz.bcebos.com/front/SourceHanSansCN-Medium.otf"
......
import { NSwitch } from 'naive-ui' import { NEllipsis, NSwitch } from 'naive-ui'
import { KnowledgeDocumentItem, KnowledgeItem } from './types.d' import { KnowledgeDocumentItem, KnowledgeItem } from './types.d'
import { formatDateTime } from '@/utils/date-formatter' import { formatDateTime } from '@/utils/date-formatter'
import i18n from '@/locales' import i18n from '@/locales'
import { KnowledgeTypeIcon } from '@/enums/knowledge'
const t = i18n.global.t const t = i18n.global.t
...@@ -19,7 +20,15 @@ export function createKnowledgeColumn( ...@@ -19,7 +20,15 @@ export function createKnowledgeColumn(
width: 210, width: 210,
fixed: 'left', fixed: 'left',
render(row: KnowledgeItem) { render(row: KnowledgeItem) {
return row.knowledgeName || '--' return (
<div class='flex items-center gap-[10px]'>
<div
class='h-[22px] w-[22px] flex-shrink-0 bg-contain bg-no-repeat'
style={{ backgroundImage: `url(${KnowledgeTypeIcon[row.knowledgeType]})` }}
/>
<NEllipsis class='flex-1'>{row.knowledgeName || '--'}</NEllipsis>
</div>
)
}, },
}, },
{ {
......
...@@ -47,6 +47,8 @@ const currentKnowledgeData = ref<KnowledgeFormDataInterface>({ ...@@ -47,6 +47,8 @@ const currentKnowledgeData = ref<KnowledgeFormDataInterface>({
knowledgeType: 'Base', knowledgeType: 'Base',
}) })
const refreshIconRotating = ref(false)
const isDisabledBatchDelBtn = computed(() => { const isDisabledBatchDelBtn = computed(() => {
return checkedKdIdList.value.length <= 0 return checkedKdIdList.value.length <= 0
}) })
...@@ -243,6 +245,11 @@ function handleToUploadDocument() { ...@@ -243,6 +245,11 @@ function handleToUploadDocument() {
function handleBackKnowledgeList() { function handleBackKnowledgeList() {
router.replace({ name: 'PersonalSpaceKnowledge' }) router.replace({ name: 'PersonalSpaceKnowledge' })
} }
async function handleRefreshKnowledgeDocumentList() {
refreshIconRotating.value = true
await handleGetKnowledgeDocumentList().finally(() => (refreshIconRotating.value = false))
}
</script> </script>
<template> <template>
...@@ -261,7 +268,13 @@ function handleBackKnowledgeList() { ...@@ -261,7 +268,13 @@ function handleBackKnowledgeList() {
</div> </div>
</div> </div>
<div class="mb-[18px] flex justify-end"> <div class="mb-[18px] flex items-center justify-end">
<i
class="iconfont icon-refresh mr-[14px] cursor-pointer text-[20px] text-[#d3d3d3] transition-[rotate] duration-150 ease-in-out hover:opacity-80"
:class="{ 'rotate-360': refreshIconRotating }"
@click="handleRefreshKnowledgeDocumentList"
/>
<NInput <NInput
v-model:value="searchDocumentInputValue" v-model:value="searchDocumentInputValue"
:placeholder="t('personal_space_module.knowledge_module.search_knowledge_document_placeholder')" :placeholder="t('personal_space_module.knowledge_module.search_knowledge_document_placeholder')"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment