zhangxiao
2024-08-05 8742aa1ca9a96e75c18d4f9e3c52bddd8e190898
src/views/dmx/IntelligentAgent/components/editAgent.vue
@@ -19,57 +19,31 @@
    title-align="start"
    fullscreen
  >
    <div class="main-container">
      <div class="main-container-lf">
        <div style="padding: 10px; font-size: 16px; background: #eeeeee"
          >智能体配置</div
        >
        <div style="display: flex; width: 100%" :style="{ height: height }">
          <div style="width: 50%; height: 100%">
            <div style="padding: 10px; font-size: 12px; color: #2a2a2b"
              >智能体画像</div
            >
            <div>
              <a-textarea
                v-model="system"
                placeholder=""
                disabled
                style="height: 400px; background: #ffffff; color: #666666"
              />
            </div>
  <div class="main-container">
    <div class="main-container-lf">
      <div style="padding: 10px;font-size: 16px;">智能体配置</div>
      <div style="display: flex;width: 100%;" :style="{height:height}">
        <div style="width: 50%;height: 100%">
          <div style="padding: 10px;font-size: 12px;color: #2a2a2b;">智能体画像</div>
          <div>
            <a-textarea v-model="system" placeholder="" disabled style="height: 400px;color: #666666"  />
          </div>
          <div style="background: #eeeeee; width: 50%">
            <a-form
              ref="formRef"
              :rules="rules"
              :model="form"
              @submit="handleSubmit"
              layout="vertical"
            >
              <a-collapse :default-active-key="['1']">
                <a-collapse-item
                  header="基础信息"
                  key="0"
                  v-if="typeAngint == 'edit'"
                >
                  <a-input
                    v-model="form.name"
                    placeholder="请输入智能体名称"
                    style="width: 200px; margin-top: 10px"
                  />
                </a-collapse-item>
                <a-collapse-item header="AI模型配置" key="1">
                  <a-space direction="vertical" size="large">
                    <a-select
                      :size="'large'"
                      v-model="form.llm_id"
                      :style="{ width: '25rem' }"
                      placeholder="请选择 ..."
                    >
                      <a-optgroup
                        :label="index"
                        v-for="(item, index) in modelList"
                        :key="index"
        </div>
        <div style="width: 50%;border: 1px solid var(--color-neutral-3);">
          <a-form ref="formRef" :rules="rules" :model="form" @submit="handleSubmit"  layout="vertical" >
            <a-collapse :default-active-key="['1']">
              <a-collapse-item header="基础信息" key="0" v-if="typeAngint == 'edit'">
                <a-input v-model="form.name" placeholder="请输入智能体名称"  style="width:200px;margin-top: 10px" />
              </a-collapse-item>
              <a-collapse-item header="AI模型配置" key="1">
                <a-space direction="vertical" size="large">
                  <a-select :size="'large'" v-model="form.llm_id" :style="{width:'25rem'}" placeholder="请选择 ...">
                    <a-optgroup  :label="index" v-for="(item,index) in modelList" :key=index>
                      <a-option
                        v-for="(obj) in item"
                        :key='obj.fid'
                        :value="obj.llm_id"
                      >
                        <a-option
                          v-for="obj in item"