mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-04-10 07:57:32 +00: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.LlmQueryDto;
|
||||||
import com.zl.mjga.dto.ai.LlmVm;
|
import com.zl.mjga.dto.ai.LlmVm;
|
||||||
import com.zl.mjga.repository.LlmRepository;
|
import com.zl.mjga.repository.LlmRepository;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -35,7 +37,7 @@ public class LlmService {
|
|||||||
List<AiLlmConfig> aiLlmConfigs = llmRepository.fetchByEnable(enable);
|
List<AiLlmConfig> aiLlmConfigs = llmRepository.fetchByEnable(enable);
|
||||||
return aiLlmConfigs.stream()
|
return aiLlmConfigs.stream()
|
||||||
.filter(aiLlmConfig -> LlmTypeEnum.CHAT.equals(aiLlmConfig.getType()))
|
.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(
|
public PageResponseDto<List<LlmVm>> pageQueryLlm(
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-span-2">
|
<div class="col-span-2">
|
||||||
<label for="priority" class="block mb-2 text-sm font-medium autocomplete text-gray-900 ">优先级</label>
|
<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"
|
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 />
|
required />
|
||||||
</div>
|
</div>
|
||||||
@@ -80,13 +80,11 @@
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import useAlertStore from "@/composables/store/useAlertStore";
|
|
||||||
import { initFlowbite } from "flowbite";
|
import { initFlowbite } from "flowbite";
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import type { components } from "../api/types/schema";
|
import type { components } from "../api/types/schema";
|
||||||
|
|
||||||
const alertStore = useAlertStore();
|
|
||||||
const { llm, onSubmit } = defineProps<{
|
const { llm, onSubmit } = defineProps<{
|
||||||
llm?: components["schemas"]["LlmVm"];
|
llm?: components["schemas"]["LlmVm"];
|
||||||
closeModal: () => void;
|
closeModal: () => void;
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ export const useSort = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const sortBy = computed(() => {
|
const sortBy = computed(() => {
|
||||||
return sortFields.value
|
return sortFields.value.length
|
||||||
.map((item) => `${item.field}:${item.order}`)
|
? sortFields.value.map((item) => `${item.field}:${item.order}`).join(",")
|
||||||
.join(",");
|
: undefined;
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleSort = async (field: string) => {
|
const handleSort = async (field: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user