|
|
@@ -1,112 +1,158 @@
|
|
|
<script setup lang="ts">
|
|
|
+import { ref } from "vue";
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
|
|
|
-import { ref } from 'vue'
|
|
|
-
|
|
|
-const input = ref("")
|
|
|
+const input = ref("");
|
|
|
|
|
|
type TestCase = {
|
|
|
id: number;
|
|
|
title: string;
|
|
|
description: string;
|
|
|
-}
|
|
|
-const testCase = ref<TestCase[]>([])
|
|
|
+};
|
|
|
+const testCase = ref<TestCase[]>([]);
|
|
|
testCase.value = [
|
|
|
- {
|
|
|
- 'id':1,
|
|
|
- 'title':'这是标题这是标题这是标题这是标题这是标题这是标题',
|
|
|
- 'description':'娇地方废物放假哦对司机发票的撒娇阿佛i额欸娇地方废物放假哦对司机发票的撒娇阿佛i额欸娇地方废物放假哦对司机发票的撒娇阿佛i额欸娇地方废物放假哦对司机发票的撒娇阿佛i额欸'
|
|
|
- },
|
|
|
- {
|
|
|
- 'id':1,
|
|
|
- 'title':'这是标题',
|
|
|
- 'description':'这是描述'
|
|
|
- },
|
|
|
- {
|
|
|
- 'id':1,
|
|
|
- 'title':'这是标题',
|
|
|
- 'description':'这是描述'
|
|
|
- }
|
|
|
-]
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ title: "这是标题这是标题这是标题这是标题这是标题这是标题",
|
|
|
+ description:
|
|
|
+ "娇地方废物放假哦对司机发票的撒娇阿佛i额欸娇地方废物放假哦对司机发票的撒娇阿佛i额欸娇地方废物放假哦对司机发票的撒娇阿佛i额欸娇地方废物放假哦对司机发票的撒娇阿佛i额欸",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ title: "这是标题",
|
|
|
+ description: "这是描述",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ title: "这是标题",
|
|
|
+ description: "这是描述",
|
|
|
+ },
|
|
|
+];
|
|
|
|
|
|
+const handleImproveButton = (p: { row: any }) => {
|
|
|
+ console.log(p.row);
|
|
|
+};
|
|
|
|
|
|
-const handleImproveButton = (p: { row: any; })=>{
|
|
|
- console.log(p.row)
|
|
|
-}
|
|
|
+const router = useRouter();
|
|
|
+const gotoNextPage = () => {
|
|
|
+ router.push('/tcFinalList');
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div class="root">
|
|
|
- <el-card class="card">
|
|
|
- <el-scrollbar class="scrollbar">
|
|
|
- <el-row class = "titleTagRow">
|
|
|
- <el-tag class="titleTag"
|
|
|
- type='primary'
|
|
|
- effect="light"
|
|
|
- size="large"
|
|
|
- round
|
|
|
- >当前用例列表</el-tag>
|
|
|
- </el-row>
|
|
|
- <el-col class="container">
|
|
|
- <el-table :data="testCase" style="width: 100%" border>
|
|
|
- <el-table-column label="编号" prop="id" width="60"/>
|
|
|
- <el-table-column label="用例标题" prop="title" min-width="200" />
|
|
|
- <el-table-column show-overflow-tooltip label="用例描述" prop="description" min-width="150"/>
|
|
|
- <el-table-column width="60"> <template #default="scope"> <el-button type="primary" link size="small" @click="handleImproveButton(scope)"
|
|
|
- >细化</el-button
|
|
|
+ <el-container>
|
|
|
+ <el-main>
|
|
|
+ <div class="root">
|
|
|
+ <el-card class="card">
|
|
|
+ <el-scrollbar class="scrollbar">
|
|
|
+ <el-row class="titleTagRow">
|
|
|
+ <el-tag
|
|
|
+ class="titleTag"
|
|
|
+ type="primary"
|
|
|
+ effect="light"
|
|
|
+ size="large"
|
|
|
+ round
|
|
|
+ >当前用例列表</el-tag
|
|
|
+ >
|
|
|
+ </el-row>
|
|
|
+ <el-col class="container">
|
|
|
+ <el-table :data="testCase" style="width: 100%" border>
|
|
|
+ <el-table-column label="编号" prop="id" width="60" />
|
|
|
+ <el-table-column
|
|
|
+ label="用例标题"
|
|
|
+ prop="title"
|
|
|
+ min-width="200"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ show-overflow-tooltip
|
|
|
+ label="用例描述"
|
|
|
+ prop="description"
|
|
|
+ min-width="150"
|
|
|
+ />
|
|
|
+ <el-table-column width="60">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ size="small"
|
|
|
+ @click="handleImproveButton(scope)"
|
|
|
+ >细化</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="60">
|
|
|
+ <el-button type="primary" link size="small" @click=""
|
|
|
+ >删除</el-button
|
|
|
+ ></el-table-column
|
|
|
+ >
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-scrollbar>
|
|
|
+ <el-input placeholder="请输入" v-model="input" clearable>
|
|
|
+ <template slot="append"><el-button></el-button></template>
|
|
|
+ </el-input>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ </el-main>
|
|
|
+ <el-footer>
|
|
|
+ <div class="button-container">
|
|
|
+ <el-button type="primary" class="custom-button" @click="gotoNextPage"
|
|
|
+ >下一步</el-button
|
|
|
>
|
|
|
- </template> </el-table-column>
|
|
|
- <el-table-column width="60"> <el-button type="primary" link size="small" @click=""
|
|
|
- >删除</el-button
|
|
|
- ></el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-col>
|
|
|
- </el-scrollbar>
|
|
|
- <el-input placeholder="请输入" v-model="input" clearable>
|
|
|
- <template slot="append"><el-button ></el-button></template>
|
|
|
- </el-input>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
+ </div>
|
|
|
+ </el-footer>
|
|
|
+ </el-container>
|
|
|
</template>
|
|
|
|
|
|
<style scoped>
|
|
|
+.button-container {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end; /* 让按钮之间的空间均匀分布 */
|
|
|
+}
|
|
|
|
|
|
-.titleTag{
|
|
|
- height: 2em;
|
|
|
- width: 8em;
|
|
|
- font-size: large;
|
|
|
+.custom-button {
|
|
|
+ width: 100px; /* 设置按钮的宽度为相同的固定值 */
|
|
|
}
|
|
|
-.container{
|
|
|
+
|
|
|
+.titleTag {
|
|
|
+ height: 2em;
|
|
|
+ width: 8em;
|
|
|
+ font-size: large;
|
|
|
+}
|
|
|
+.container {
|
|
|
width: 60vw;
|
|
|
padding: 1em 3em;
|
|
|
}
|
|
|
-.rowContainer{
|
|
|
+.rowContainer {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
margin: 1em 0;
|
|
|
}
|
|
|
.root {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
}
|
|
|
|
|
|
-.robotMessage{
|
|
|
- display: flex; flex-direction: row-reverse; align-items: flex-start;
|
|
|
+.robotMessage {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row-reverse;
|
|
|
+ align-items: flex-start;
|
|
|
}
|
|
|
-.customerMessage{
|
|
|
- display: flex; flex-direction: row; align-items: flex-start;
|
|
|
+.customerMessage {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: flex-start;
|
|
|
}
|
|
|
-.textArea{
|
|
|
+.textArea {
|
|
|
display: inline-block;
|
|
|
width: 300px;
|
|
|
}
|
|
|
|
|
|
-.card{
|
|
|
+.card {
|
|
|
margin: auto;
|
|
|
}
|
|
|
-.scrollbar{
|
|
|
- height:400px;
|
|
|
+.scrollbar {
|
|
|
+ height: 400px;
|
|
|
width: fit-content;
|
|
|
}
|
|
|
</style>
|