Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-sett committed Nov 8, 2023
1 parent 2148a6e commit 1614d34
Show file tree
Hide file tree
Showing 16 changed files with 24,002 additions and 81 deletions.
4 changes: 4 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ declare module 'vue' {
ElTimeline: typeof import('element-plus/es')['ElTimeline']
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
Footer: typeof import('./src/components/Footer/index.vue')['default']
Header: typeof import('./src/components/Header/index.vue')['default']
Message: typeof import('./src/components/Message/index.vue')['default']
Expand All @@ -49,4 +50,7 @@ declare module 'vue' {
Star: typeof import('./src/components/Common/Star.vue')['default']
Text: typeof import('./src/components/Message/Text.vue')['default']
}
export interface ComponentCustomProperties {
vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll']
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@types/markdown-it-link-attributes": "^3.0.1",
"@types/node": "^18.14.6",
"@vitejs/plugin-vue": "^4.2.3",
"@tailwindcss/line-clamp": "^0.4.0",
"autoprefixer": "^10.4.16",
"axios": "^1.3.4",
"eslint": "^8.35.0",
Expand Down
11 changes: 11 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23,543 changes: 23,543 additions & 0 deletions src/assets/json/openeuler.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/assets/md/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# openEuler-XiaoZhi-Eval

openEuler 小智智能问答机器人验证集
8 changes: 4 additions & 4 deletions src/components/Bot/BotBattle.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, created, onMounted, computed, onUnmounted } from "vue"
import { ref, onMounted, computed, onUnmounted } from "vue"
import { Refresh, CircleClose, Delete } from "@element-plus/icons-vue"
import { ThumbsUp, CloseOne, CommentOne, Comments } from "@icon-park/vue-next"
import { fetchBotList, fetchChatAPIProcess } from "@/api"
Expand Down Expand Up @@ -62,7 +62,7 @@ const updateChat = (obj: Chat, name: string) => {
const fetchChatAPIOnce = async (
model: string,
message,
message: string,
controller: { signal: any } | undefined
) => {
return await fetchChatAPIProcess({
Expand Down Expand Up @@ -104,8 +104,8 @@ const handleSubmit = async () => {
if (!prePrompt || prePrompt.trim() === "") return
loading.value = true
prompt.value = ""
const promiseList = []
const botList = []
const promiseList: any[] = []
const botList: any[] = []
controllerList = []
compareList.value.forEach((element) => {
Expand Down
1 change: 0 additions & 1 deletion src/components/Message/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const innerVisible = ref(false)
const buttonDisabled = computed(() => {
return !comments.value || comments.value.trim() === ""
})
console.log(props.botName)
const handleShowDialog = () => {
const { chatList } = chatStore.getChatByName(props.botName)
chatItem.value = chatList.find((item: any) => item.id === props.id)
Expand Down
4 changes: 2 additions & 2 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ const routes: RouteRecordRaw[] = [
{
path: "/model",
name: "model",
component: () => import("@/views/Model.vue"),
component: () => import("@/views/model/Model.vue"),
},
{
path: "/modelDetail",
name: "modelDetail",
component: () => import("@/views/ModelDetail.vue"),
component: () => import("@/views/model/ModelDetail.vue"),
},
{
path: "/evaluate",
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/compare/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface CompareStore {
CompareList: CompareList
}
export const useCompareStore = defineStore("compare-store", {
state: () => {
state: (): CompareStore => {
return {
CompareList: [],
}
Expand Down
4 changes: 2 additions & 2 deletions src/views/DataSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ const dataList = [
<el-button
@click="
router.push({
path: '/dataSetDetail',
path: '/dataSetMore',
// query: {
// name: encodeURIComponent(item.name),
// },
})
"
>
详情</el-button
View</el-button
>
</div>
</div>
Expand Down
195 changes: 195 additions & 0 deletions src/views/DataSetMore copy.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
<script setup lang="ts">
import { ref } from "vue"
import { useRoute, useRouter } from "vue-router"
import { Search, Close } from "@element-plus/icons-vue"
import { FileAdditionOne } from "@icon-park/vue-next"
import Header from "@/components/Header/index.vue"
import Footer from "@/components/Footer/index.vue"
import openeuler from "@/assets/json/openeuler.json"
console.log(openeuler)
interface MyMap {
[key: string]: { [key: string]: string }
}
const route = useRoute()
const router = useRouter()
const typeFitler = ref("全部")
const showSide = ref(false)
const typeOptions = [
{
value: "全部",
label: "全部",
},
{
value: "与我相关",
label: "与我相关",
},
{
value: "我创建的",
label: "我创建的",
},
]
const getAndPushElements = (start, count) => {
// 使用 slice 方法获取指定位置的元素子数组
const elements = openeuler.slice(start, start + count)
// targetArr.push(...elements)
return elements
}
let count = 10
const countList = ref(getAndPushElements(0, 20))
const select = ref(-1)
const selectItem = ref<any>(null)
const load = () => {
console.log(123)
countList.value.push(...getAndPushElements(count, 5))
count += 5
}
const handleSelectItem = (index) => {
if (select === index) {
select.value = -1
showSide.value = false
} else {
select.value = index
showSide.value = true
selectItem.value = openeuler[index]
}
}
interface Tree {
label: string
type?: string
children?: Tree[]
}
const handleNodeClick = (data: Tree) => {
console.log(data)
}
const data: Tree[] = [
{
label: "data",
type: "folder",
children: [
{
label: " json",
type: "folder",
children: [
{
label: "openeuler.json",
},
],
},
],
},
{
label: "README.md",
},
]
const defaultProps = {
children: "children",
label: "label",
}
</script>

<template>
<div class="w-full h-full overflow-hidden flex flex-col justify-between bg-[#fafafa]">
<Header />
<section
style="height: calc(100vh - 64px)"
class="flex-1 flex overflow-hidden flex-col bg-[#fafafa] w-full"
>
<div class="flex flex-1 w-full overflow-hidden">
<div class="bg-white h-full p-4 w-[300px] rounded overflow-hidden">
<el-tree
:highlight-current="true"
size="large"
:data="data"
:props="defaultProps"
@node-click="handleNodeClick"
>
<template #default="{ node, data }">
<div class="custom-tree-node flex items-center">
<el-icon class="mr-2">
<Folder v-if="data.type == 'folder'" />
<DocumentRemove v-else />
</el-icon>
<!-- <el-icon><DocumentRemove /></el-icon> -->
<span>{{ node.label }}</span>
</div>
</template>
</el-tree>
</div>
<div class="bg-white ml-2 flex-1 p-3 h-full">
<div class="">
<div class="flex justify-end">
<el-icon class="cursor-pointer" @click="showSide = false"><Close /></el-icon>
</div>
<div class="">
<!-- <ul
v-infinite-scroll="load"
:infinite-scroll-immediate="false"
class="infinite-list h-full"
>
<li
v-for="(i, index) in countList"
:key="index"
class="infinite-list-item cursor-pointer flex items-center w-full p-2"
:class="select === index && '!bg-[#e3f1ff]'"
@click="handleSelectItem(index)"
>
<div class="w-12 text-center mr-8 flex-shrink-0">{{ index + 1 }}</div>
<div class="flex-1">
<div>Q : {{ i.prompt }}</div>
<div class="overflow-hidden line-clamp-1">A : {{ i.answer }}</div>
</div>
</li>
</ul> -->
</div>
</div>
</div>
</div>
</section>
<!-- <Footer /> -->
</div>
</template>

<style>
.el-tabs__nav-wrap:after {
/* height: 0px; */
}
.el-textarea__inner {
padding: 8px;
}
.el-card__body {
padding: 8px 16px;
}
.infinite-list {
padding: 0;
margin: 0;
list-style: none;
overflow: auto;
}
.infinite-list-item:nth-of-type(even) {
background: #fafafa;
}
.infinite-list-item:hover {
background: #f3f9ff;
}
.infinite-list .infinite-list-item {
border-bottom: 1px solid #ebeef5;
height: 80px;
}
.infinite-list .infinite-list-item + .list-item {
margin-top: 10px;
}
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
color: #3a5bef;
}
</style>
Loading

0 comments on commit 1614d34

Please sign in to comment.