Pārlūkot izejas kodu

CSS样式调不出来,直接改了按钮名字

chen xueyi 2 gadi atpakaļ
vecāks
revīzija
1bc9f86211

+ 4 - 4
src/components/HistoryList.vue

@@ -4,11 +4,11 @@
       <el-col :span="6" v-for="(item, index) in items"  :key="index">
         <el-card shadow="hover" :body-style="{ padding: '0' }"  v-if="item.tcFinalList.length!==0">
           <div class="item" style="font-size: medium; background-color:lightskyblue ">{{ item.docxName }}</div>
-          <div style="margin: 15px">
+          <div style="margin: auto">
             <div><div class="card-label">创建人</div><span>{{username}}</span></div>
             <div><div class="card-label">创建时间</div><span>{{ item.creatTime.substring(0,10) }}</span></div>
-            <div><div class="card-label">最新修改时间</div><span></span></div>
-            <div><div class="card-label">用例数量</div><span>{{ item.testCaseList.length }}</span></div>
+            <div><div class="card-label">最新修改时间</div><span>{{ JSON.parse(item.actionList)[JSON.parse(item.actionList).length-1].times }}</span></div>
+            <div><div class="card-label">用例数量</div><span>{{ JSON.parse(item.testCaseList).length }}</span></div>
           </div>
           <el-divider style="margin: 10px"></el-divider>
           <el-button  @click="gototcFinalList(item)"> 查看完整用例列表</el-button>
@@ -44,7 +44,7 @@ export default {
 
     onMounted(() => {
       console.log(useStore.taskList)
-      items.value = JSON.parse(sessionStorage.getItem('taskList'));
+      items.value = useStore.taskList;
       username.value = useStore.userInfo.username
       console.log(username)
     });

+ 2 - 2
src/components/TCFinalList.vue

@@ -187,7 +187,7 @@ function predictRes(row: any) {
 
 
 const exportTestCase = async () => {
-  const indexOfDot = useStore.DocxList[itemIndex.value].docxName.indexOf(".")
+  const indexOfDot = findById(itemIndex.value).docxName.indexOf(".")
   const wb = XLSX.utils.table_to_book(document.querySelector('#tableData'));//关联dom节点
   /* get binary string as output */
   const wbout = XLSX.write(wb, {
@@ -198,7 +198,7 @@ const exportTestCase = async () => {
   try {
     FileSaver.saveAs(new Blob([wbout], {
       type: 'application/octet-stream'
-    }), useStore.DocxList[itemIndex.value].docxName.substring(0,indexOfDot+1)+'xlsx')//自定义文件名
+    }), findById(itemIndex.value).docxName.substring(0,indexOfDot+1)+'xlsx')//自定义文件名
   } catch (e) {
     if (typeof console !== 'undefined') console.log(e, wbout);
   }

+ 14 - 7
src/components/TaskList.vue

@@ -2,18 +2,21 @@
   <div class="my-page">
     <el-row :gutter="20">
       <el-col :span="6" v-for="(item, index) in items" :key="index">
-        <el-card shadow="hover" :body-style="{ padding: '0' }" >
-          <div class="item" style="font-size: medium; background-color:lightskyblue ">{{ item.docxName }}</div>
-          <div style="margin: 15px">
+        <el-card shadow="hover" :body-style="{ padding: '0' }"  >
+
+          <div class="item" style="font-size: large; background-color:lightskyblue ">{{ item.docxName }}</div>
+          <div style="margin: auto">
             <div><div class="card-label">创建人</div><span>{{username}}</span></div>
             <div><div class="card-label">创建时间</div><span>{{ item.creatTime.substring(0,10) }}</span></div>
             <div><div class="card-label">最新修改时间</div><span></span></div>
-            <div><div class="card-label">用例数量</div><span>{{ item.testCaseList.length }}</span></div>
+            <div><div class="card-label">用例数量</div><span></span></div>
           </div>
           <el-divider style="margin: 10px"></el-divider>
           <el-button @click="gototestList(item)" style="">用例列表</el-button>
-          <el-button  @click="gototcFinalList(item)" :style="{'background-color': item.tcFinalList.length!==0?'white':'lightskyblue'}"> {{item.tcFinalList.length!==0?"已生成完整用例列表":"生成完整用例列表"}}</el-button>
+          <el-button  @click="gototcFinalList(item)" :style="{'background-color': item.tcFinalList.length!==0?'white':'lightskyblue'}"> {{item.tcFinalList.length!==0?"已归档":"生成完整用例列表"}}</el-button>
         </el-card>
+
+
       </el-col>
     </el-row>
   </div>
@@ -43,13 +46,15 @@ export default defineComponent({
     ]);
     const username = ref()
     const router = useRouter()
-    const hasFinalList = ref(true)
+
+    //{{JSON.parse(item.actionList)[0].times }}
 
     onMounted(() => {
       console.log(useStore.taskList)
       items.value = useStore.taskList;
       username.value = useStore.userInfo.username
       console.log(username)
+
     });
 
 
@@ -73,7 +78,7 @@ export default defineComponent({
       gototestList,
       username,
       gototcFinalList,
-      hasFinalList
+
     };
   }
 })
@@ -102,4 +107,6 @@ export default defineComponent({
   display: inline-block;
   margin-bottom: 5px;
 }
+
+
 </style>

+ 1 - 1
src/components/Upload.vue

@@ -121,7 +121,7 @@ const dealfilechange = async (event: Event) => {
                 data: data2,
               };
 
-              const action = [{description: "生成用例",time: dayjs().format('YYYY-MM-DD HH:mm:ss')}]
+              const action = [{description: "生成用例",times: dayjs().format('YYYY-MM-DD HH:mm:ss')}]
               axios(processConfig)
                    .then((response) => {
                      console.log(response.data.output)