zhangxiao
2024-08-14 a7b5e177db655a98c299d3342538e23bd4e647da
fix: 模型管理修改
4个文件已修改
53 ■■■■ 已修改文件
config/vite.config.dev.ts 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dmx/model/components/addPageModel.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dmx/model/components/addTableName.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dmx/model/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/vite.config.dev.ts
@@ -14,8 +14,8 @@
      proxy: {
        '/base': {
          // target: 'http://aiotlink.com:8189',
          //target: 'http://192.168.20.116:8089',
          target: 'http://192.168.20.158:8089',
          target: 'http://192.168.20.116:8089',
          // target: 'http://192.168.20.158:8089',
          changeOrigin: true,
          ws: true,
          // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
@@ -24,16 +24,16 @@
        },
        '/api': {
          // target: 'http://aiotlink.com:8189',
          //target: 'http://192.168.20.116:8089',
          target: 'http://192.168.20.158:8089',
          target: 'http://192.168.20.116:8089',
          // target: 'http://192.168.20.158:8089',
          changeOrigin: true,
          ws: true,
          // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
        },
        '/api/v1': {
          // target: 'http://aiotlink.com:8189',
          //target: 'http://192.168.20.116:8089',
          target: 'http://192.168.20.158:8089',
          target: 'http://192.168.20.116:8089',
          // target: 'http://192.168.20.158:8089',
          changeOrigin: true,
          ws: true,
          // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
src/views/dmx/model/components/addPageModel.vue
@@ -46,6 +46,9 @@
        <a-form-item field="api_base" label="基础URL">
          <a-input v-model="form.api_base" placeholder="请输入基础URL" />
        </a-form-item>
        <a-form-item field="name" label="API-Key">
          <a-input v-model="form.name" placeholder="API-Key" />
        </a-form-item>
        <!-- <a-form-item
          field="raptor"
          label="是否支持 Vision"
src/views/dmx/model/components/addTableName.vue
@@ -17,8 +17,20 @@
      :style="{ width: '90%', margin: '0 auto' }"
      layout="vertical"
    >
      <a-form-item field="name" label="模型名称">
        <a-input v-model="form.name" placeholder="请输入模型名称" />
      <a-form-item field="name" label="模型框架">
        <!-- <a-input v-model="form.name" placeholder="请输入模型名称" /> -->
        <a-select
          v-model="form.name"
          placeholder="请选择模型框架"
          allow-create
          allow-search
        >
          <a-option
            v-for="(item, index) in modalList"
            :value="index"
            :label="index"
          ></a-option>
        </a-select>
      </a-form-item>
      <!-- <a-form-item field="apiKey" label="API-Key">
        <a-input v-model="form.apiKey" placeholder="API-Key" />
@@ -66,7 +78,13 @@
    ref,
    computed,
  } from 'vue';
  import { addLlmFactory, getLlmDetail, editLlmFactory } from '@/api/model';
  import {
    modelmyLlms,
    addLlmFactory,
    getLlmDetail,
    editLlmFactory,
  } from '@/api/model';
  import { Message } from '@arco-design/web-vue';
  import { userModelState } from '@/store';
@@ -107,7 +125,7 @@
    name: [
      {
        required: true,
        message: '名称不允许为空',
        message: '模型框架不允许为空',
      },
    ],
    describe: [
@@ -194,6 +212,12 @@
    });
    formRef.value?.resetFields();
  };
  const modalList = ref([]);
  const queryModel = async () => {
    const res = await modelmyLlms();
    modalList.value = res.data;
  };
  queryModel();
  watchEffect(() => {
    if (props.nameList && props.title == '编辑模型') {
src/views/dmx/model/index.vue
@@ -120,7 +120,7 @@
              </a-tabs>
            </a-col>
            <div> </div>
            <div class="box_right">
            <div class="box_right" v-if="Object.keys(tabData).length > 0">
              <!-- <div class="search_input">
                <a-input-search
                  :placeholder="$t('cardList.searchInput.placeholder')"
@@ -128,7 +128,6 @@
                />
              </div> -->
              <div>
                <!-- <addModel></addModel> -->
                <a-button type="primary" @click="handleAddModel">
                  <template #icon>
                    <icon-plus />
@@ -415,6 +414,9 @@
      // border-radius: 0;
      // background-color: #eee;
    }
    :deep(.arco-tabs-tab-close-btn) {
      display: none;
    }
    :deep(.arco-tabs-tab-close-btn .arco-icon) {
      color: #666;
    }