From f6ba464aa7856b8201e313fe79e651aab34e6509 Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期一, 05 八月 2024 10:25:44 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web

---
 src/views/dmx/knowledgeLib/tool.vue |  811 ++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 455 insertions(+), 356 deletions(-)

diff --git a/src/views/dmx/knowledgeLib/tool.vue b/src/views/dmx/knowledgeLib/tool.vue
index 040fdf0..50da491 100644
--- a/src/views/dmx/knowledgeLib/tool.vue
+++ b/src/views/dmx/knowledgeLib/tool.vue
@@ -1,4 +1,3 @@
-
 <template>
   <a-button type="text" @click="handleClick" size="small">
     <template #icon>
@@ -14,232 +13,354 @@
     title-align="start"
     width="900px"
   >
-      <a-tabs default-active-key="1">
-        <a-tab-pane key="1">
-          <template #title>
-            <icon-calendar/> 瑙f瀽鏂规硶
-          </template>
-          <div style="width: 100%">
-            <div style="display: flex;align-items: center;">
-              <div>
-                瑙f瀽鏂规硶:
-              </div>
-              <div style="margin-left: 10px">
-                <a-select v-model="form.parser_id" placeholder="璇烽�夋嫨" >
-                  <a-option v-for="item in parser_ids" :key="item.value" :label="item.name" :value="item.value"></a-option>
-                </a-select>
-              </div>
+    <a-tabs default-active-key="1">
+      <a-tab-pane key="1">
+        <template #title> <icon-calendar /> 瑙f瀽鏂规硶 </template>
+        <div style="width: 100%">
+          <div style="display: flex; align-items: center">
+            <div> 瑙f瀽鏂规硶: </div>
+            <div style="margin-left: 10px">
+              <a-select v-model="form.parser_id" placeholder="璇烽�夋嫨">
+                <a-option
+                  v-for="item in parser_ids"
+                  :key="item.value"
+                  :label="item.name"
+                  :value="item.value"
+                ></a-option>
+              </a-select>
             </div>
-            <div class="parser">
-              <a-form ref="formRef" :rules="rules" :model="form"  auto-label-width @submit="handleSubmit" >
-                <a-divider style="margin-top: 10px" />
-                <a-form-item field="slider" label="鍧梩oken鏁�"
-                             :rules="[{type:'number', min:1,message:'slider is min than 1'}]">
-                  <a-slider v-model="form.chunk_token_num" :max="1000" show-input />
+          </div>
+          <div class="parser">
+            <a-form
+              ref="formRef"
+              :rules="rules"
+              :model="form"
+              auto-label-width
+              @submit="handleSubmit"
+            >
+              <a-divider style="margin-top: 10px" />
+              <a-form-item
+                field="slider"
+                label="鍧梩oken鏁�"
+                :rules="[
+                  { type: 'number', min: 1, message: 'slider is min than 1' },
+                ]"
+              >
+                <a-slider
+                  v-model="form.chunk_token_num"
+                  :max="1000"
+                  show-input
+                />
+              </a-form-item>
+              <a-divider style="margin-top: 10px" />
+              <a-form-item field="raptor" label="浣跨敤鍙洖澧炲己RAPTOR绛栫暐">
+                <a-space direction="vertical" size="large">
+                  <a-switch
+                    v-model="form.use_raptor"
+                    @change="onChangeRAPTOR"
+                  />
+                </a-space>
+              </a-form-item>
+              <div v-if="form.use_raptor">
+                <a-form-item field="prompt" label="鎻愮ず璇�">
+                  <a-textarea
+                    v-model="form.prompt"
+                    style="
+                      height: 10rem;
+                      border: 1px solid var(--color-fill-3);
+                      border-radius: 4px;
+                    "
+                    placeholder="璇峰~鍐欐彁绀鸿瘝"
+                  />
                 </a-form-item>
-                <a-divider style="margin-top: 10px" />
-                <a-form-item field="raptor" label="浣跨敤鍙洖澧炲己RAPTOR绛栫暐">
-                  <a-space direction="vertical" size="large">
-                    <a-switch v-model="form.use_raptor" @change="onChangeRAPTOR" />
+                <a-form-item
+                  field="slider"
+                  label="鏈�澶oken鏁�"
+                  :rules="[
+                    { type: 'number', min: 5, message: 'slider is min than 5' },
+                  ]"
+                >
+                  <a-slider
+                    v-model="form.max_token"
+                    :min="1"
+                    :max="1000"
+                    show-input
+                  />
+                </a-form-item>
+                <a-form-item
+                  field="slider"
+                  label="闃堝��"
+                  :rules="[
+                    { type: 'number', min: 5, message: 'slider is min than 5' },
+                  ]"
+                >
+                  <a-slider v-model="form.threshold" show-tooltip show-input />
+                </a-form-item>
+                <a-form-item
+                  field="slider"
+                  label="鏈�澶ц仛绫绘暟"
+                  :rules="[
+                    { type: 'number', min: 5, message: 'slider is min than 5' },
+                  ]"
+                >
+                  <a-slider v-model="form.max_cluster" :max="1000" show-input />
+                </a-form-item>
+                <a-form-item
+                  field="slider"
+                  label="闅忔満绉嶅瓙"
+                  v-model="form.random_seed"
+                  :rules="[
+                    { type: 'number', min: 5, message: 'slider is min than 5' },
+                  ]"
+                >
+                  <a-input-number
+                    v-model="form.random_seed"
+                    :style="{
+                      width: '300px',
+                      marginRight: '1rem',
+                      borderRadius: '4px',
+                    }"
+                    placeholder="璇疯緭鍏�"
+                    class="input-demo"
+                    :min="10"
+                    :max="100"
+                  />
+                  <a-button type="primary" @click="randomNumber">
+                    <icon-plus />
+                  </a-button>
+                </a-form-item>
+              </div>
+              <a-form-item>
+                <div style="width: 100%; text-align: right">
+                  <a-button @click="visible = false">鍙栨秷</a-button>
+                  <a-button
+                    style="margin-left: 10px"
+                    type="primary"
+                    html-type="submit"
+                    >纭畾</a-button
+                  >
+                </div>
+              </a-form-item>
+            </a-form>
+          </div>
+        </div>
+      </a-tab-pane>
+      <a-tab-pane key="2">
+        <template #title> <icon-clock-circle /> 鍒涘缓瑙f瀽鍧� </template>
+        <div class="details">
+          <div class="details-header">
+            <div
+              style="
+                display: flex;
+                align-items: center;
+                justify-content: flex-end;
+              "
+            >
+              <a-radio-group
+                v-model="radio"
+                type="button"
+                style="margin-right: 10px"
+                @change="onRadioChange"
+              >
+                <a-radio value="1">鍏ㄦ枃</a-radio>
+                <a-radio value="2">鐪佺暐</a-radio>
+              </a-radio-group>
+              <a-popover position="bottom">
+                <a-button
+                  type="outline"
+                  class="button"
+                  style="margin-right: 10px"
+                  >鎵归噺<icon-down style="margin-left: 4px"
+                /></a-button>
+                <template #content>
+                  <a-space direction="vertical">
+                    <a-checkbox
+                      :model-value="checkedAll"
+                      :indeterminate="indeterminate"
+                      @change="handleChangeAll"
+                      style="margin-left: 10px"
+                    >
+                      閫夋嫨鎵�鏈�
+                    </a-checkbox>
                   </a-space>
-                </a-form-item>
-                <div v-if="form.use_raptor">
-                  <a-form-item field="prompt" label="鎻愮ず璇�">
-                    <a-textarea
-                      v-model="form.prompt"
-                      style="height: 10rem;border: 1px solid  var(--color-fill-3);border-radius: 4px" placeholder="璇峰~鍐欐彁绀鸿瘝"  />
-                  </a-form-item>
-                  <a-form-item field="slider" label="鏈�澶oken鏁�"
-                               :rules="[{type:'number', min:5,message:'slider is min than 5'}]">
-                    <a-slider v-model="form.max_token" :min="1" :max="1000" show-input/>
-                  </a-form-item>
-                  <a-form-item field="slider" label="闃堝��" :rules="[{type:'number', min:5,message:'slider is min than 5'}]">
-                    <a-slider v-model="form.threshold"  show-tooltip show-input/>
-                  </a-form-item>
-                  <a-form-item field="slider" label="鏈�澶ц仛绫绘暟"
-                               :rules="[{type:'number', min:5,message:'slider is min than 5'}]">
-                    <a-slider v-model="form.max_cluster" :max="1000" show-input/>
-                  </a-form-item>
-                  <a-form-item field="slider" label="闅忔満绉嶅瓙" v-model="form.random_seed"
-                               :rules="[{type:'number', min:5,message:'slider is min than 5'}]">
-                    <a-input-number v-model="form.random_seed" :style="{width:'300px',marginRight:'1rem',borderRadius:'4px'}"
-                                    placeholder="璇疯緭鍏�" class="input-demo" :min="10" :max="100" />
-                    <a-button type="primary" @click="randomNumber">
-                      <icon-plus />
+                  <a-divider style="margin: 10px 0" />
+                  <p>
+                    <a-button type="text" class="button" style="color: #2a2a2b">
+                      <template #icon>
+                        <icon-check-circle />
+                      </template>
+                      鍚敤閫夊畾鐨�
                     </a-button>
-
-                  </a-form-item>
-
-                </div>
-                <a-form-item>
-                  <div style="width: 100%;text-align: right">
-                    <a-button @click="visible = false">鍙栨秷</a-button>
-                    <a-button style="margin-left: 10px" type="primary" html-type="submit">纭畾</a-button>
-                  </div>
-                </a-form-item>
-              </a-form>
+                  </p>
+                  <p>
+                    <a-button type="text" class="button" style="color: #2a2a2b">
+                      <template #icon>
+                        <icon-close-circle />
+                      </template>
+                      绂佺敤閫夊畾鐨�
+                    </a-button>
+                  </p>
+                  <a-divider style="margin: 10px 0" />
+                  <p>
+                    <a-button type="text" class="button" style="color: #2a2a2b">
+                      <template #icon>
+                        <icon-delete />
+                      </template>
+                      鍒犻櫎閫夊畾鐨�
+                    </a-button>
+                  </p>
+                </template>
+              </a-popover>
+              <a-button
+                type="outline"
+                class="button"
+                style="margin-right: 10px"
+              >
+                <template #icon>
+                  <icon-search />
+                </template>
+              </a-button>
+              <a-popover position="bottom">
+                <a-button
+                  type="outline"
+                  class="button"
+                  style="margin-right: 10px"
+                  ><icon-sort
+                /></a-button>
+                <template #content>
+                  <a-radio-group
+                    v-model="available_int"
+                    direction="vertical"
+                    size="large"
+                    @change="onChangeavailable"
+                  >
+                    <a-radio value="">鎵�鏈�</a-radio>
+                    <a-radio value="1">鍚敤</a-radio>
+                    <a-radio value="0">绂佺敤</a-radio>
+                  </a-radio-group>
+                </template>
+              </a-popover>
+              <addDetails :item="item"></addDetails>
             </div>
           </div>
-        </a-tab-pane>
-        <a-tab-pane key="2">
-          <template #title>
-            <icon-clock-circle/> 鍒涘缓瑙f瀽鍧�
-          </template>
-          <div class="details">
-            <div class="details-header">
-              <div style="display: flex; align-items: center;justify-content: flex-end;">
-                <a-radio-group v-model="radio" type="button"  style="margin-right: 10px" @change="onRadioChange">
-                  <a-radio value="1">鍏ㄦ枃</a-radio>
-                  <a-radio value="2">鐪佺暐</a-radio>
-                </a-radio-group>
-                <a-popover position="bottom">
-                  <a-button type="outline" class="button" style="margin-right: 10px;">鎵归噺<icon-down style="margin-left: 4px" /></a-button>
-                  <template #content>
-                    <a-space direction="vertical">
-                      <a-checkbox :model-value="checkedAll" :indeterminate="indeterminate" @change="handleChangeAll" style="margin-left: 10px">
-                        閫夋嫨鎵�鏈�
-                      </a-checkbox>
-                    </a-space>
-                    <a-divider style="margin: 10px 0" />
-                    <p>
-                      <a-button type="text" class="button" style="color: #2a2a2b">
-                        <template #icon>
-                          <icon-check-circle />
-                        </template>
-                        鍚敤閫夊畾鐨�
-                      </a-button>
-                    </p>
-                    <p>
-                      <a-button type="text" class="button" style="color: #2a2a2b">
-                        <template #icon>
-                          <icon-close-circle />
-                        </template>
-                        绂佺敤閫夊畾鐨�
-                      </a-button>
-                    </p>
-                    <a-divider style="margin: 10px 0" />
-                    <p>
-                      <a-button type="text" class="button" style="color: #2a2a2b">
-                        <template #icon>
-                          <icon-delete />
-                        </template>
-                        鍒犻櫎閫夊畾鐨�
-                      </a-button>
-                    </p>
-                  </template>
-                </a-popover>
-                <a-button type="outline" class="button" style="margin-right: 10px">
-                  <template #icon>
-                    <icon-search />
-                  </template>
-                </a-button>
-                <a-popover position="bottom">
-                  <a-button type="outline" class="button" style="margin-right: 10px"><icon-sort /></a-button>
-                  <template #content>
-                    <a-radio-group v-model="available_int" direction="vertical" size="large" @change="onChangeavailable">
-                      <a-radio value="">鎵�鏈�</a-radio>
-                      <a-radio value="1">鍚敤</a-radio>
-                      <a-radio value="0">绂佺敤</a-radio>
-                    </a-radio-group>
-                  </template>
-                </a-popover>
-                <addDetails :item="item"></addDetails>
+          <a-divider style="margin-top: 10px" />
+          <div class="groupMain">
+            <a-checkbox-group v-model="data" @change="handleChange">
+              <div
+                class="groupList"
+                :style="{ background: keyBg == '1' ? '#eff8ff' : 'white' }"
+              >
+                <a-checkbox value="1"></a-checkbox>
+                <div
+                  class="groupList-content"
+                  @click="groupListContentClick('1')"
+                  @dblclick="contentClick(1)"
+                >
+                  鑰� stable version 鏄渶鏂扮ǔ瀹氱増锛岀粡杩囧厖鍒嗘祴璇曞拰楠岃瘉锛宐ug 杈冨皯锛�
+                  閫傚悎鐢ㄤ簬鐢熶骇鐜銆傚叾鐗堟湰鍙烽�氬父涓哄弻鏁帮紝濡� 1.26銆俵egacy versions
+                  鍒欐槸涔嬪墠鍙戝竷鐨勭ǔ瀹氱増锛屽浜庨渶瑕�
+                  鐗瑰畾鏃х増鏈殑鍏煎鎬ф垨瀹夊叏鎬ф敮鎸佺殑鐢ㄦ埛鏈夌敤锛屼絾涓�鑸笉
+                  鎺ㄨ崘鐢ㄤ簬鏂伴」鐩紝闄ら潪鏈夌壒娈婇渶姹傘�傚湪瀹為檯浣跨敤涓紝濡傛灉杩芥眰鏈�鏂板姛鑳�
+                  涓旀効鎰忛潰瀵瑰彲鑳藉瓨鍦ㄧ殑涓�浜涗笉绋冲畾鍥犵礌锛屽彲浠ュ皾璇曚娇鐢ㄤ富绾跨増鏈繘琛屾祴璇曞拰鐮旂┒锛涘鏋滄槸鐢ㄤ簬鐢熶骇鐜
+                </div>
+                <div class="groupList-right">
+                  <a-switch
+                    v-model="switchType"
+                    checked-value="1"
+                    unchecked-value="0"
+                    @change="handleChangeStatus()"
+                  />
+                </div>
               </div>
-            </div>
-            <a-divider style="margin-top: 10px" />
-            <div class="groupMain">
-              <a-checkbox-group v-model="data" @change="handleChange" >
-                <div class="groupList" :style="{background:keyBg=='1'?'#eff8ff':'white'}">
-                  <a-checkbox  value="1"></a-checkbox>
-                  <div class="groupList-content" @click="groupListContentClick('1')" @dblclick="contentClick()">
-                    鑰� stable version 鏄渶鏂扮ǔ瀹氱増锛岀粡杩囧厖鍒嗘祴璇曞拰楠岃瘉锛宐ug 杈冨皯锛�
-                    閫傚悎鐢ㄤ簬鐢熶骇鐜銆傚叾鐗堟湰鍙烽�氬父涓哄弻鏁帮紝濡� 1.26銆俵egacy versions
-                    鍒欐槸涔嬪墠鍙戝竷鐨勭ǔ瀹氱増锛屽浜庨渶瑕�
-                    鐗瑰畾鏃х増鏈殑鍏煎鎬ф垨瀹夊叏鎬ф敮鎸佺殑鐢ㄦ埛鏈夌敤锛屼絾涓�鑸笉
-                    鎺ㄨ崘鐢ㄤ簬鏂伴」鐩紝闄ら潪鏈夌壒娈婇渶姹傘�傚湪瀹為檯浣跨敤涓紝濡傛灉杩芥眰鏈�鏂板姛鑳�
-                    涓旀効鎰忛潰瀵瑰彲鑳藉瓨鍦ㄧ殑涓�浜涗笉绋冲畾鍥犵礌锛屽彲浠ュ皾璇曚娇鐢ㄤ富绾跨増鏈繘琛屾祴璇曞拰鐮旂┒锛涘鏋滄槸鐢ㄤ簬鐢熶骇鐜
-                  </div>
-                  <div class="groupList-right">
-                    <a-switch v-model="switchType"  checked-value="1" unchecked-value="0" @change="handleChangeStatus()"/>
-                  </div>
-                </div>
 
-                <div class="groupList" :style="{background:keyBg=='2'?'#eff8ff':'white'}">
-                  <a-checkbox  value="1"></a-checkbox>
-                  <div class="groupList-content" @click="groupListContentClick('2')">
-                    鑰� stable version 鏄渶鏂扮ǔ瀹氱増锛岀粡杩囧厖鍒嗘祴璇曞拰楠岃瘉锛宐ug 杈冨皯锛�
-                    閫傚悎鐢ㄤ簬鐢熶骇鐜銆傚叾鐗堟湰鍙烽�氬父涓哄弻鏁帮紝濡� 1.26銆俵egacy versions
-                    鍒欐槸涔嬪墠鍙戝竷鐨勭ǔ瀹氱増锛屽浜庨渶瑕�
-                  </div>
-                  <div class="groupList-right">
-                    <a-switch v-model="switchType"  checked-value="1" unchecked-value="0" @change="handleChangeStatus()"/>
-                  </div>
+              <div
+                class="groupList"
+                :style="{ background: keyBg == '2' ? '#eff8ff' : 'white' }"
+              >
+                <a-checkbox value="1"></a-checkbox>
+                <div
+                  class="groupList-content"
+                  @click="groupListContentClick('2')"
+                  @dblclick="contentClick(1)"
+                >
+                  鑰� stable version 鏄渶鏂扮ǔ瀹氱増锛岀粡杩囧厖鍒嗘祴璇曞拰楠岃瘉锛宐ug 杈冨皯锛�
+                  閫傚悎鐢ㄤ簬鐢熶骇鐜銆傚叾鐗堟湰鍙烽�氬父涓哄弻鏁帮紝濡� 1.26銆俵egacy versions
+                  鍒欐槸涔嬪墠鍙戝竷鐨勭ǔ瀹氱増锛屽浜庨渶瑕�
                 </div>
-
-              </a-checkbox-group>
-            </div>
+                <div class="groupList-right">
+                  <a-switch
+                    v-model="switchType"
+                    checked-value="1"
+                    unchecked-value="0"
+                    @change="handleChangeStatus()"
+                  />
+                </div>
+              </div>
+            </a-checkbox-group>
           </div>
-          <eidtDetails ref="eidtDil"></eidtDetails>
-        </a-tab-pane>
-      </a-tabs>
+        </div>
+        <eidtDetails ref="eidtDil"></eidtDetails>
+      </a-tab-pane>
+    </a-tabs>
   </a-modal>
 </template>
 
 <script lang="ts" setup>
-import { onMounted, onBeforeMount, reactive, ref, computed } from "vue";
-import { Message } from "@arco-design/web-vue";
-import {kbdocumentchangeparser} from "@/api/kbList";
-import addDetails from '@/views/dmx/knowledgeLib/addDetails.vue'
-import eidtDetails from '@/views/dmx/knowledgeLib/eidtDetails.vue'
-const visible = ref(false);
-const loading = ref(false);
-const radio = ref('1');
-const keyBg = ref('');
-const eidtDil = ref();
+  import { onMounted, onBeforeMount, reactive, ref, computed } from 'vue';
+  import { Message } from '@arco-design/web-vue';
+  import { kbdocumentchangeparser } from '@/api/kbList';
+  import addDetails from '@/views/dmx/knowledgeLib/addDetails.vue';
+  import eidtDetails from '@/views/dmx/knowledgeLib/eidtDetails.vue';
+  const visible = ref(false);
+  const loading = ref(false);
+  const radio = ref('1');
+  const keyBg = ref('');
+  const eidtDil = ref();
 
-const props =  defineProps(['kbtenantInfo','item','kbdetail'])
-// const emit =  defineEmits(['upTabdateItem'])
+  const props = defineProps(['kbtenantInfo', 'item', 'kbdetail']);
+  // const emit =  defineEmits(['upTabdateItem'])
 
-let threshold = computed(()=>{
-  return form.threshold/100;
-})
+  let threshold = computed(() => {
+    return form.threshold / 100;
+  });
 
-const kbtenantInfo = props.kbtenantInfo;
+  const kbtenantInfo = props.kbtenantInfo;
 
-let  parser_ids = kbtenantInfo.parser_ids.split(',').map((item) => {
-  const [value1, value2] = item.split(':');
-  return {
-    name: value2,
-    value: value1,
+  let parser_ids = kbtenantInfo.parser_ids.split(',').map((item) => {
+    const [value1, value2] = item.split(':');
+    return {
+      name: value2,
+      value: value1,
+    };
+  });
+
+  const form = reactive({
+    parser_id: props.item.parser_id,
+    doc_id: props.item.id,
+    max_token: 698,
+    threshold: 30,
+    max_cluster: 233,
+    random_seed: 1500,
+    chunk_token_num: 128,
+    use_raptor: false,
+    pages: {},
+    prompt:
+      '璇锋�荤粨浠ヤ笅娈佃惤銆� 灏忓績鏁板瓧锛屼笉瑕佺紪閫犮�� 娈佃惤濡備笅锛歕n' +
+      '      {cluster_content}\n' +
+      '浠ヤ笂灏辨槸浣犻渶瑕佹�荤粨鐨勫唴瀹广��',
+  });
+  const formRef = ref(null);
+  const rules = {
+    prompt: [
+      {
+        required: true,
+        message: '鎻愮ず璇嶄笉鍏佽涓虹┖',
+      },
+    ],
   };
-});
-
-const form = reactive({
-  parser_id: props.item.parser_id,
-  doc_id: props.item.id,
-  max_token: 698,
-  threshold: 30,
-  max_cluster: 233,
-  random_seed: 1500,
-  chunk_token_num: 128,
-  use_raptor: false,
-  pages: {},
-  prompt: '璇锋�荤粨浠ヤ笅娈佃惤銆� 灏忓績鏁板瓧锛屼笉瑕佺紪閫犮�� 娈佃惤濡備笅锛歕n' +
-    '      {cluster_content}\n' +
-    '浠ヤ笂灏辨槸浣犻渶瑕佹�荤粨鐨勫唴瀹广��',
-});
-const formRef = ref(null);
-const rules = {
-  prompt: [
-    {
-      required: true,
-      message:'鎻愮ず璇嶄笉鍏佽涓虹┖',
-    },
-  ],
-}
-const formatter = (value) => {
-  return value / 100
-};
+  const formatter = (value) => {
+    return value / 100;
+  };
   function randomNumber() {
     // 鐢熸垚涓�涓粙浜巑in鍜宮ax涔嬮棿鐨勯殢鏈烘暣鏁帮紙鍖呭惈min鍜宮ax锛�
     const min = 1; // 鏈�灏忓��
@@ -247,169 +368,147 @@
     form.random_seed = Math.floor(Math.random() * (max - min + 1)) + min;
   }
 
-const handleSubmit = async ({values, errors}) => {
-  if(!errors){
-    let data = await kbdocumentchangeparser({
-      parser_id: form.parser_id,
-      doc_id: form.doc_id,
-      parser_config: {
-        raptor: {
-          use_raptor: form.use_raptor,
-          prompt: form.prompt,
-          max_token: form.max_token,
-          threshold: form.threshold,
-          max_cluster: form.max_cluster,
-          random_seed: form.random_seed,
+  const handleSubmit = async ({ values, errors }) => {
+    if (!errors) {
+      let data = await kbdocumentchangeparser({
+        parser_id: form.parser_id,
+        doc_id: form.doc_id,
+        parser_config: {
+          raptor: {
+            use_raptor: form.use_raptor,
+            prompt: form.prompt,
+            max_token: form.max_token,
+            threshold: form.threshold,
+            max_cluster: form.max_cluster,
+            random_seed: form.random_seed,
+          },
+          chunk_token_num: form.chunk_token_num,
+          pages: [],
         },
-        chunk_token_num: form.chunk_token_num,
-        pages: [
-
-        ]
+      });
+      if (data.code == 0) {
+        Message.success('閰嶇疆鎴愬姛');
+      } else {
+        Message.error('閰嶇疆澶辫触');
       }
-    })
-    if(data.code == 0){
-      Message.success('閰嶇疆鎴愬姛');
-    }else{
-      Message.error('閰嶇疆澶辫触');
+      visible.value = false;
     }
+  };
+
+  const handleClick = () => {
+    visible.value = true;
+  };
+  const handleCancel = () => {
     visible.value = false;
-  }
-}
+  };
 
-const handleClick = () => {
-  visible.value = true;
-};
-const handleCancel = () => {
-  visible.value = false;
-}
+  const contentClick = (done) => {
+    eidtDil.value.handleClick();
+  };
+  const handleOpened = (el) => {
+    // console.log('props',props.kbtenantInfo);
+    // console.log('props',props.item);
+    // console.log('props',props.kbdetail);
+    console.log(parser_ids, 'parser_ids');
+    // Object.assign(form,{
+    //   name: '',// 鐢ㄦ埛鍚�
+    //   nameJoin: '',// 鏄电О
+    //   post: '',// 宀椾綅
+    //   txt: '',// 澶囨敞
+    // });
+    // formRef.value.resetFields();
+    console.log(props.item.id);
+  };
 
-const contentClick = (done) => {
-  eidtDil.value.handleClick();
-}
-const handleOpened =(el) => {
-  // console.log('props',props.kbtenantInfo);
-  // console.log('props',props.item);
-  // console.log('props',props.kbdetail);
-  console.log(parser_ids, 'parser_ids');
-  // Object.assign(form,{
-  //   name: '',// 鐢ㄦ埛鍚�
-  //   nameJoin: '',// 鏄电О
-  //   post: '',// 宀椾綅
-  //   txt: '',// 澶囨敞
-  // });
-  // formRef.value.resetFields();
-  console.log(props.item.id);
-}
+  const onChangeRAPTOR = () => {};
 
-
-const onChangeRAPTOR = () => {
-
-};
-
-
-
-
-
-
-
-
-const indeterminate = ref(false)
-const checkedAll = ref(false)
-const data = ref([])
-const switchType = ref(false)
-const available_int = ref('')
-const onRadioChange = () => {
-  console.log(radio.value);
-
-
-
-};
-const handleChangeAll = (value) => {
-  indeterminate.value = false;
-  if (value) {
-    checkedAll.value = true;
-    data.value = ['1', '2', '3']
-  } else {
-    checkedAll.value = false;
-    data.value = []
-  }
-}
-
-const handleChange = (values) => {
-  if (values.length === 3) {
-    checkedAll.value = true
+  const indeterminate = ref(false);
+  const checkedAll = ref(false);
+  const data = ref([]);
+  const switchType = ref(false);
+  const available_int = ref('');
+  const onRadioChange = () => {
+    console.log(radio.value);
+  };
+  const handleChangeAll = (value) => {
     indeterminate.value = false;
-  } else if (values.length === 0) {
-    checkedAll.value = false
-    indeterminate.value = false;
-  } else {
-    checkedAll.value = false
-    indeterminate.value = true;
-  }
-}
+    if (value) {
+      checkedAll.value = true;
+      data.value = ['1', '2', '3'];
+    } else {
+      checkedAll.value = false;
+      data.value = [];
+    }
+  };
 
+  const handleChange = (values) => {
+    if (values.length === 3) {
+      checkedAll.value = true;
+      indeterminate.value = false;
+    } else if (values.length === 0) {
+      checkedAll.value = false;
+      indeterminate.value = false;
+    } else {
+      checkedAll.value = false;
+      indeterminate.value = true;
+    }
+  };
 
-const groupListContentClick = (value) => {
-  keyBg.value = value;
-}
+  const groupListContentClick = (value) => {
+    keyBg.value = value;
+  };
 
+  const onChangeavailable = () => {
+    console.log(available_int.value);
+  };
 
-const onChangeavailable = ()=>{
-  console.log(available_int.value);
-}
+  const handleChangeStatus = () => {
+    console.log(switchType.value);
+  };
 
-const handleChangeStatus = ()=>{
-  console.log(switchType.value);
-}
-
-onBeforeMount(()=>{
-
-})
-onMounted(()=>{
-
-
-})
+  onBeforeMount(() => {});
+  onMounted(() => {});
 </script>
 
 <style scoped lang="less">
-.parser{
-  width: 100%;
-  ::v-deep .arco-btn-outline:hover, .arco-btn-outline, .arco-btn-outline[type='button']{
-    color: #2a2a2b;
-    border: 1px solid #2a2a2b;
-  }
-  .button{
-    //color: #2a2a2b!important;
-  }
-}
-.groupMain{
-  width: 100%;
-  height: 500px;
-  overflow: auto;
-  display: flex;
-  justify-content: center;
-  .groupList{
-    display: flex;
-    padding: 24px;
-    border-radius: 8px;
-    //background: #eff8ff;
-    border: 1px solid #f0f0f0;
-    margin-bottom: 20px;
-    overflow: auto;
-    .groupList-content{
-      width: 700px;
-      //height: 100px;
-      overflow: auto;
-      box-sizing: border-box;
-      margin: 0;
-      padding: 0;
-      color: rgba(0, 0, 0, 0.88);
-      font-size: 14px;
-      font-family: Inter;
-      position: relative;
-
-
+  .parser {
+    width: 100%;
+    ::v-deep .arco-btn-outline:hover,
+    .arco-btn-outline,
+    .arco-btn-outline[type='button'] {
+      color: #2a2a2b;
+      border: 1px solid #2a2a2b;
+    }
+    .button {
+      //color: #2a2a2b!important;
     }
   }
-}
-</style>
\ No newline at end of file
+  .groupMain {
+    width: 100%;
+    height: 500px;
+    overflow: auto;
+    display: flex;
+    justify-content: center;
+    .groupList {
+      display: flex;
+      padding: 24px;
+      border-radius: 8px;
+      //background: #eff8ff;
+      border: 1px solid #f0f0f0;
+      margin-bottom: 20px;
+      overflow: auto;
+      .groupList-content {
+        width: 700px;
+        //height: 100px;
+        overflow: auto;
+        box-sizing: border-box;
+        margin: 0;
+        padding: 0;
+        color: rgba(0, 0, 0, 0.88);
+        font-size: 14px;
+        font-family: Inter;
+        position: relative;
+      }
+    }
+  }
+</style>

--
Gitblit v1.8.0