liudong
2024-07-25 f99c87cbd7b9aabfd4903894b05a2933afbea8b4
src/views/dmx/knowledgeLib/index.vue
@@ -6,16 +6,22 @@
        <div class="lf-container-top">
          <a-input-search
            :placeholder="$t('cardList.searchInput.placeholder')"
            style="width: 110px;"
            style="width: 130px;"
          />
          <a-button type="primary" @click="add" style="margin-left: 10px">
            <template #icon>
              <icon-plus />
            </template>
          </a-button>
          <addKnow></addKnow>
        </div>
        <div class="lf-container-down">
          <div class="tabs">
            <div
              class="tab"
              v-for="(tab, index) in tabs"
              :key="index"
              @click="selectTab(index)"
              :class="{ 'active': selectedTab === index }"
            >
              {{ tab }}
            </div>
          </div>
        </div>
      </div>
      <div class="rt-container">
@@ -38,7 +44,7 @@
                            style="width: 200px;margin-right: 10px"
                          />
                          <!--            新建-->
                          <add edit="add" />
                          <add />
                        </a-col>
                        <!--              <a-col :span="8">-->
                        <!--                <a-form-item field="name" :label="$t('searchTable.form.name')">-->
@@ -250,7 +256,7 @@
                    {{ $t(`searchTable.form.status.${record.status}`) }}
                  </template>
                  <template #operations="{ record }">
                    <add edit="edit" :record = 'record' />
                    <a-popconfirm content="确定删除吗?" type="warning" @ok="deleteItem(record)">
                      <a-button v-permission="['admin']" type="text" size="small">
                        {{ $t('删除') }}
@@ -263,12 +269,12 @@
          </a-tab-pane>
          <a-tab-pane key="2" title="测试">
            <div class="rt-container-main">
              <test ></test>
            </div>
          </a-tab-pane>
          <a-tab-pane key="3" title="配置">
            <div class="rt-container-main">
              <config ></config>
            </div>
          </a-tab-pane>
        </a-tabs>
@@ -287,7 +293,10 @@
  import type { TableColumnData } from '@arco-design/web-vue/es/table/interface';
  import cloneDeep from 'lodash/cloneDeep';
  import Sortable from 'sortablejs';
  import add from '@/views/user/account/add.vue'
  import add from '@/views/dmx/knowledgeLib/add.vue'
  import addKnow from '@/views/dmx/knowledgeLib/addKnow.vue'
  import config from '@/views/dmx/knowledgeLib/config.vue'
  import test from '@/views/dmx/knowledgeLib/test.vue'
  import { deleteAccount } from "@/api/account";
  type SizeProps = 'mini' | 'small' | 'medium' | 'large';
  type Column = TableColumnData & { checked?: true };
@@ -312,6 +321,12 @@
  const size = ref<SizeProps>('medium');
  let visible = ref(false)
  let selectedTab = ref(0)
  let tabs = reactive(['法律知识库', '政务知识库', '医学知识库', '其他知识库'])
  const  selectTab = (index) => {
    selectedTab.value= index;
  }
  const basePagination: Pagination = {
    current: 1,
@@ -344,43 +359,29 @@
    //   dataIndex: 'index',
    //   slotName: 'index',
    // },
    // {
    //   title: t('searchTable.columns.number'),
    //   dataIndex: 'number',
    // },
    {
      title: t('用户名'),
      title: t('名称'),
      dataIndex: 'name',
    },
    // {
    //   title: t('searchTable.columns.contentType'),
    //   dataIndex: 'contentType',
    //   slotName: 'contentType',
    // },
    // {
    //   title: t('searchTable.columns.filterType'),
    //   dataIndex: 'filterType',
    // },
    // {
    //   title: t('searchTable.columns.count'),
    //   dataIndex: 'count',
    // },
    {
      title: t('创建时间'),
      title: t('分快数'),
      dataIndex: 'contentType',
      slotName: 'contentType',
    },
    {
      title: t('上传时间'),
      dataIndex: 'filterType',
    },
    {
      title: t('创建人'),
      dataIndex: 'count',
    },
    {
      title: t('解析状态'),
      dataIndex: 'createdTime',
    },
    {
      title: t('所属部门'),
      dataIndex: 'filterType',
      slotName: 'filterType',
    },
    {
      title: t('备注'),
      dataIndex: 'status',
      slotName: 'status',
    },
    {
      title: t('searchTable.columns.operations'),
      title: t('操作'),
      dataIndex: 'operations',
      slotName: 'operations',
    },
@@ -559,9 +560,38 @@
          display: flex;
        }
        .lf-container-down{
          width: 80%;
          display: flex;
          flex-direction: column;
          width: 90%;
          height: calc(100% - 5rem);
          border: 1px solid #cccccc;
          border: 1px solid #eeeeee;
          overflow: auto;
          padding: 10px;
          .tabs .tab {
            cursor: pointer;
            box-sizing: border-box;
            margin: 10px 0;
            padding:0 10px;
            color: rgba(0, 0, 0, 0.88);
            font-size: 14px;
            height: 40px;
            line-height: 40px;
            list-style: none;
            position: relative;
            background: #ffffff;
            border: 1px solid #f0f0f0;
            border-radius: 8px;
          }
          .tabs .tab:hover {
            border: 1px solid #ffffff;
            background: #e8e8ea;
            box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.16), 0 3px 6px 0 rgba(0, 0, 0, 0.12), 0 5px 12px 4px rgba(0, 0, 0, 0.09);
          }
          .tabs .tab.active {
            border: 1px solid #e8e8ea;
            background: #e8e8ea;
            cursor: pointer;
          }
        }
      }
      .rt-container{