Skip to content

Commit 1614d34

Browse files
committed
1
1 parent 2148a6e commit 1614d34

File tree

16 files changed

+24002
-81
lines changed

16 files changed

+24002
-81
lines changed

components.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ declare module 'vue' {
3939
ElTimeline: typeof import('element-plus/es')['ElTimeline']
4040
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
4141
ElTooltip: typeof import('element-plus/es')['ElTooltip']
42+
ElTree: typeof import('element-plus/es')['ElTree']
4243
Footer: typeof import('./src/components/Footer/index.vue')['default']
4344
Header: typeof import('./src/components/Header/index.vue')['default']
4445
Message: typeof import('./src/components/Message/index.vue')['default']
@@ -49,4 +50,7 @@ declare module 'vue' {
4950
Star: typeof import('./src/components/Common/Star.vue')['default']
5051
Text: typeof import('./src/components/Message/Text.vue')['default']
5152
}
53+
export interface ComponentCustomProperties {
54+
vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll']
55+
}
5256
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@types/markdown-it-link-attributes": "^3.0.1",
3131
"@types/node": "^18.14.6",
3232
"@vitejs/plugin-vue": "^4.2.3",
33+
"@tailwindcss/line-clamp": "^0.4.0",
3334
"autoprefixer": "^10.4.16",
3435
"axios": "^1.3.4",
3536
"eslint": "^8.35.0",

pnpm-lock.yaml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/json/openeuler.json

Lines changed: 23543 additions & 0 deletions
Large diffs are not rendered by default.

src/assets/md/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# openEuler-XiaoZhi-Eval
2+
3+
openEuler 小智智能问答机器人验证集

src/components/Bot/BotBattle.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { ref, created, onMounted, computed, onUnmounted } from "vue"
2+
import { ref, onMounted, computed, onUnmounted } from "vue"
33
import { Refresh, CircleClose, Delete } from "@element-plus/icons-vue"
44
import { ThumbsUp, CloseOne, CommentOne, Comments } from "@icon-park/vue-next"
55
import { fetchBotList, fetchChatAPIProcess } from "@/api"
@@ -62,7 +62,7 @@ const updateChat = (obj: Chat, name: string) => {
6262
6363
const fetchChatAPIOnce = async (
6464
model: string,
65-
message,
65+
message: string,
6666
controller: { signal: any } | undefined
6767
) => {
6868
return await fetchChatAPIProcess({
@@ -104,8 +104,8 @@ const handleSubmit = async () => {
104104
if (!prePrompt || prePrompt.trim() === "") return
105105
loading.value = true
106106
prompt.value = ""
107-
const promiseList = []
108-
const botList = []
107+
const promiseList: any[] = []
108+
const botList: any[] = []
109109
controllerList = []
110110
111111
compareList.value.forEach((element) => {

src/components/Message/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const innerVisible = ref(false)
3636
const buttonDisabled = computed(() => {
3737
return !comments.value || comments.value.trim() === ""
3838
})
39-
console.log(props.botName)
4039
const handleShowDialog = () => {
4140
const { chatList } = chatStore.getChatByName(props.botName)
4241
chatItem.value = chatList.find((item: any) => item.id === props.id)

src/router/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ const routes: RouteRecordRaw[] = [
1616
{
1717
path: "/model",
1818
name: "model",
19-
component: () => import("@/views/Model.vue"),
19+
component: () => import("@/views/model/Model.vue"),
2020
},
2121
{
2222
path: "/modelDetail",
2323
name: "modelDetail",
24-
component: () => import("@/views/ModelDetail.vue"),
24+
component: () => import("@/views/model/ModelDetail.vue"),
2525
},
2626
{
2727
path: "/evaluate",

src/store/modules/compare/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface CompareStore {
55
CompareList: CompareList
66
}
77
export const useCompareStore = defineStore("compare-store", {
8-
state: () => {
8+
state: (): CompareStore => {
99
return {
1010
CompareList: [],
1111
}

src/views/DataSet.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ const dataList = [
144144
<el-button
145145
@click="
146146
router.push({
147-
path: '/dataSetDetail',
147+
path: '/dataSetMore',
148148
// query: {
149149
// name: encodeURIComponent(item.name),
150150
// },
151151
})
152152
"
153153
>
154-
详情</el-button
154+
View</el-button
155155
>
156156
</div>
157157
</div>

src/views/DataSetMore copy.vue

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<script setup lang="ts">
2+
import { ref } from "vue"
3+
import { useRoute, useRouter } from "vue-router"
4+
import { Search, Close } from "@element-plus/icons-vue"
5+
import { FileAdditionOne } from "@icon-park/vue-next"
6+
import Header from "@/components/Header/index.vue"
7+
import Footer from "@/components/Footer/index.vue"
8+
import openeuler from "@/assets/json/openeuler.json"
9+
console.log(openeuler)
10+
11+
interface MyMap {
12+
[key: string]: { [key: string]: string }
13+
}
14+
15+
const route = useRoute()
16+
const router = useRouter()
17+
18+
const typeFitler = ref("全部")
19+
const showSide = ref(false)
20+
21+
const typeOptions = [
22+
{
23+
value: "全部",
24+
label: "全部",
25+
},
26+
{
27+
value: "与我相关",
28+
label: "与我相关",
29+
},
30+
{
31+
value: "我创建的",
32+
label: "我创建的",
33+
},
34+
]
35+
36+
const getAndPushElements = (start, count) => {
37+
// 使用 slice 方法获取指定位置的元素子数组
38+
const elements = openeuler.slice(start, start + count)
39+
// targetArr.push(...elements)
40+
return elements
41+
}
42+
43+
let count = 10
44+
const countList = ref(getAndPushElements(0, 20))
45+
const select = ref(-1)
46+
const selectItem = ref<any>(null)
47+
48+
const load = () => {
49+
console.log(123)
50+
countList.value.push(...getAndPushElements(count, 5))
51+
count += 5
52+
}
53+
const handleSelectItem = (index) => {
54+
if (select === index) {
55+
select.value = -1
56+
showSide.value = false
57+
} else {
58+
select.value = index
59+
showSide.value = true
60+
selectItem.value = openeuler[index]
61+
}
62+
}
63+
64+
interface Tree {
65+
label: string
66+
type?: string
67+
children?: Tree[]
68+
}
69+
70+
const handleNodeClick = (data: Tree) => {
71+
console.log(data)
72+
}
73+
74+
const data: Tree[] = [
75+
{
76+
label: "data",
77+
type: "folder",
78+
children: [
79+
{
80+
label: " json",
81+
type: "folder",
82+
children: [
83+
{
84+
label: "openeuler.json",
85+
},
86+
],
87+
},
88+
],
89+
},
90+
{
91+
label: "README.md",
92+
},
93+
]
94+
95+
const defaultProps = {
96+
children: "children",
97+
label: "label",
98+
}
99+
</script>
100+
101+
<template>
102+
<div class="w-full h-full overflow-hidden flex flex-col justify-between bg-[#fafafa]">
103+
<Header />
104+
<section
105+
style="height: calc(100vh - 64px)"
106+
class="flex-1 flex overflow-hidden flex-col bg-[#fafafa] w-full"
107+
>
108+
<div class="flex flex-1 w-full overflow-hidden">
109+
<div class="bg-white h-full p-4 w-[300px] rounded overflow-hidden">
110+
<el-tree
111+
:highlight-current="true"
112+
size="large"
113+
:data="data"
114+
:props="defaultProps"
115+
@node-click="handleNodeClick"
116+
>
117+
<template #default="{ node, data }">
118+
<div class="custom-tree-node flex items-center">
119+
<el-icon class="mr-2">
120+
<Folder v-if="data.type == 'folder'" />
121+
<DocumentRemove v-else />
122+
</el-icon>
123+
<!-- <el-icon><DocumentRemove /></el-icon> -->
124+
<span>{{ node.label }}</span>
125+
</div>
126+
</template>
127+
</el-tree>
128+
</div>
129+
<div class="bg-white ml-2 flex-1 p-3 h-full">
130+
<div class="">
131+
<div class="flex justify-end">
132+
<el-icon class="cursor-pointer" @click="showSide = false"><Close /></el-icon>
133+
</div>
134+
<div class="">
135+
<!-- <ul
136+
v-infinite-scroll="load"
137+
:infinite-scroll-immediate="false"
138+
class="infinite-list h-full"
139+
>
140+
<li
141+
v-for="(i, index) in countList"
142+
:key="index"
143+
class="infinite-list-item cursor-pointer flex items-center w-full p-2"
144+
:class="select === index && '!bg-[#e3f1ff]'"
145+
@click="handleSelectItem(index)"
146+
>
147+
<div class="w-12 text-center mr-8 flex-shrink-0">{{ index + 1 }}</div>
148+
<div class="flex-1">
149+
<div>Q : {{ i.prompt }}</div>
150+
<div class="overflow-hidden line-clamp-1">A : {{ i.answer }}</div>
151+
</div>
152+
</li>
153+
</ul> -->
154+
</div>
155+
</div>
156+
</div>
157+
</div>
158+
</section>
159+
<!-- <Footer /> -->
160+
</div>
161+
</template>
162+
163+
<style>
164+
.el-tabs__nav-wrap:after {
165+
/* height: 0px; */
166+
}
167+
.el-textarea__inner {
168+
padding: 8px;
169+
}
170+
.el-card__body {
171+
padding: 8px 16px;
172+
}
173+
.infinite-list {
174+
padding: 0;
175+
margin: 0;
176+
list-style: none;
177+
overflow: auto;
178+
}
179+
.infinite-list-item:nth-of-type(even) {
180+
background: #fafafa;
181+
}
182+
.infinite-list-item:hover {
183+
background: #f3f9ff;
184+
}
185+
.infinite-list .infinite-list-item {
186+
border-bottom: 1px solid #ebeef5;
187+
height: 80px;
188+
}
189+
.infinite-list .infinite-list-item + .list-item {
190+
margin-top: 10px;
191+
}
192+
.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
193+
color: #3a5bef;
194+
}
195+
</style>

0 commit comments

Comments
 (0)