From fd15b2a99a4ebd476a54671c560b3a89f69b621e Mon Sep 17 00:00:00 2001 From: zhangxiao <898441624@qq.com> Date: 星期二, 27 八月 2024 10:26:42 +0800 Subject: [PATCH] feat: 修改bug --- src/views/dmx/knowledgeLib/index.vue | 87 +++++++++++++++++++++++++------------------ 1 files changed, 51 insertions(+), 36 deletions(-) diff --git a/src/views/dmx/knowledgeLib/index.vue b/src/views/dmx/knowledgeLib/index.vue index 8bae1eb..994f862 100644 --- a/src/views/dmx/knowledgeLib/index.vue +++ b/src/views/dmx/knowledgeLib/index.vue @@ -23,8 +23,9 @@ :class="{ active: selectedTab === index }" > {{ tab.name }} - <a-popover position="bl"> + <a-popover position="bl" > <icon-more + v-hasPermi="'/kb/delete'" :style="{ position: 'absolute', top: '10px', right: '10px' }" /> <template #content> @@ -34,6 +35,7 @@ <span style="cursor: pointer; color: #4977ba; font-size: 12px" @click="deleteKnowledge(tab.id)" + v-hasPermi="'/kb/delete'" ><icon-delete style="font-size: 14px" />鍒犻櫎</span > </template> @@ -88,6 +90,7 @@ type="text" class="button" style="color: #2a2a2b" + v-hasPermi="'/kb/data_status'" @click="enableDisable(1)" > <template #icon> @@ -101,6 +104,7 @@ type="text" class="button" style="color: #2a2a2b" + v-hasPermi="'/kb/data_status'" @click="enableDisable(0)" > <template #icon> @@ -114,6 +118,7 @@ type="text" class="button" style="color: #2a2a2b" + v-hasPermi="'/kb/data_analysis'" @click="addBlock(1)" > <template #icon> @@ -127,6 +132,7 @@ type="text" class="button" style="color: #2a2a2b" + v-hasPermi="'/kb/data_analysis'" @click="addBlock(2)" > <template #icon> @@ -140,6 +146,7 @@ <a-button type="text" class="button" + v-hasPermi="'/kb/data_delete'" style="color: #2a2a2b" @click="addBlock(3)" > @@ -464,17 +471,19 @@ </div> </template> <template #action="{ record }"> - <a-button - type="text" - :disabled="record.run == '1'" - @click="handleClick(record)" - v-hasPermi="'/kb/data_update'" - size="small" - > - <template #icon> - <icon-tool /> - </template> - </a-button> + <a-tooltip content="瑙f瀽鏂规硶"> + <a-button + type="text" + :disabled="record.run == '1'" + @click="handleClick(record)" + 鏌� + size="small" + > + <template #icon> + <icon-tool /> + </template> + </a-button> + </a-tooltip> <edit :item="record" v-hasPermi="'/kb/rename'" @@ -485,30 +494,34 @@ type="warning" @ok="deleteItem(record)" > + <a-tooltip content="鍒犻櫎"> + <a-button + type="text" + size="small" + :disabled="record.run == '1'" + v-hasPermi="'/kb/data_delete'" + > + <template #icon> + <icon-delete /> + </template> + </a-button> + </a-tooltip> + </a-popconfirm> + <a-tooltip content="涓嬭浇"> <a-button type="text" size="small" + v-hasPermi="'/kb/data_download'" :disabled="record.run == '1'" - v-hasPermi="'/kb/data_delete'" + @click="onDownloadDocument(record)" > <template #icon> - <icon-delete /> + <icon-download /> </template> </a-button> - </a-popconfirm> + </a-tooltip> + <!-- <a-button - type="text" - size="small" - v-hasPermi="'/kb/data_download'" - :disabled="record.run == '1'" - @click="onDownloadDocument(record)" - > - <template #icon> - <icon-download /> - </template> - </a-button> - - <!-- <a-button type="text" size="small" :disabled="record.run == '1'" @@ -593,12 +606,12 @@ <!-- </div>--> </div> </div> - <a-modal title=" " v-model:visible="visible" :footer="false" fullscreen> - <!-- <docx previewSrc="http://192.168.20.116:1080/v1/document/get/405c3efa4d8c11ef97560242ac120006"></docx>--> - <docx v-if="documenttype == 'docx'" :previewSrc="previewSrc"></docx> - <excel v-if="documenttype == 'excel'" :previewSrc="previewSrc"></excel> - <txtPdf v-if="documenttype == 'txtPdf'" :previewSrc="previewSrc"></txtPdf> - </a-modal> + <!-- <a-modal title=" " v-model:visible="visible" :footer="false" fullscreen>--> + <!-- <!– <docx previewSrc="http://192.168.20.116:1080/v1/document/get/405c3efa4d8c11ef97560242ac120006"></docx>–>--> + <!-- <docx v-if="documenttype == 'docx'" :previewSrc="previewSrc"></docx>--> + <!-- <excel v-if="documenttype == 'excel'" :previewSrc="previewSrc"></excel>--> + <!-- <txtPdf v-if="documenttype == 'txtPdf'" :previewSrc="previewSrc"></txtPdf>--> + <!-- </a-modal>--> <tool ref="toolForm" :kbtenantInfo="kbtenantInfo" @@ -648,9 +661,9 @@ import config from '@/views/dmx/knowledgeLib/config.vue'; import test from '@/views/dmx/knowledgeLib/test.vue'; import tool from '@/views/dmx/knowledgeLib/tool.vue'; - import docx from '@/views/dmx/knowledgeLib/components/docx.vue'; - import excel from '@/views/dmx/knowledgeLib/components/excel.vue'; - import txtPdf from '@/views/dmx/knowledgeLib/components/txtPdf.vue'; + // import docx from '@/views/dmx/knowledgeLib/components/docx.vue'; + // import excel from '@/views/dmx/knowledgeLib/components/excel.vue'; + // import txtPdf from '@/views/dmx/knowledgeLib/components/txtPdf.vue'; import { Message, Modal } from '@arco-design/web-vue'; import { documentHeight, parseTime } from '@/utils'; import { deleteLlm } from '@/api/model'; @@ -972,12 +985,14 @@ setLoading(true); try { const { data } = await queryKbList({ page: 1, page_size: 10 }); + console.log(data, '鏌ヨ鐭ヨ瘑搴撳垪琛�'); tabs.value = data; if (tabs.value.length > 0) { // 瀹氫綅鍒版柊澧炵殑鐭ヨ瘑搴撳崟鍏� selectedTab.value = tabs.value.findIndex((item) => item.id == id); getKbdetail(id); // 鑾峰彇璇︽儏 + kbobj.id = id; activeKey.value = '3'; } } catch (err) { -- Gitblit v1.8.0