mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-13 21:27:19 +08:00
fix bugs
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 395 KiB After Width: | Height: | Size: 185 KiB |
@@ -7,6 +7,8 @@ import com.zl.mjga.dto.PageResponseDto;
|
||||
import com.zl.mjga.dto.ai.LlmQueryDto;
|
||||
import com.zl.mjga.dto.ai.LlmVm;
|
||||
import com.zl.mjga.repository.LlmRepository;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
@@ -35,7 +37,7 @@ public class LlmService {
|
||||
List<AiLlmConfig> aiLlmConfigs = llmRepository.fetchByEnable(enable);
|
||||
return aiLlmConfigs.stream()
|
||||
.filter(aiLlmConfig -> LlmTypeEnum.CHAT.equals(aiLlmConfig.getType()))
|
||||
.max((o1, o2) -> o2.getPriority().compareTo(o1.getPriority()));
|
||||
.max(Comparator.comparingInt(AiLlmConfig::getPriority));
|
||||
}
|
||||
|
||||
public PageResponseDto<List<LlmVm>> pageQueryLlm(
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
<div class="col-span-2">
|
||||
<label for="priority" class="block mb-2 text-sm font-medium autocomplete text-gray-900 ">优先级</label>
|
||||
<input type="text" id="priority" autocomplete="new-password" v-model="formData.priority"
|
||||
<input type="number" id="priority" autocomplete="new-password" v-model="formData.priority"
|
||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"
|
||||
required />
|
||||
</div>
|
||||
@@ -80,13 +80,11 @@
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import useAlertStore from "@/composables/store/useAlertStore";
|
||||
import { initFlowbite } from "flowbite";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { z } from "zod";
|
||||
import type { components } from "../api/types/schema";
|
||||
|
||||
const alertStore = useAlertStore();
|
||||
const { llm, onSubmit } = defineProps<{
|
||||
llm?: components["schemas"]["LlmVm"];
|
||||
closeModal: () => void;
|
||||
|
||||
@@ -13,9 +13,9 @@ export const useSort = () => {
|
||||
};
|
||||
|
||||
const sortBy = computed(() => {
|
||||
return sortFields.value
|
||||
.map((item) => `${item.field}:${item.order}`)
|
||||
.join(",");
|
||||
return sortFields.value.length
|
||||
? sortFields.value.map((item) => `${item.field}:${item.order}`).join(",")
|
||||
: undefined;
|
||||
});
|
||||
|
||||
const handleSort = async (field: string) => {
|
||||
|
||||
Reference in New Issue
Block a user