zhangxiao
2024-08-26 a4ca216c5b215f323b3c439b2f445dad72bbfce1
src/views/dmx/knowledgeLib/index.vue
@@ -464,17 +464,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="解析方法">
                      <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>
                    <edit
                      :item="record"
                      v-hasPermi="'/kb/rename'"
@@ -485,28 +487,32 @@
                      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-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-tooltip>
                    <!-- <a-button
                      type="text"
@@ -972,12 +978,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) {