zhangxiao
2024-08-14 a7b5e177db655a98c299d3342538e23bd4e647da
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 == '编辑模型') {