From 96be59a64cc1d8fcaf1034e787717663c68df4a7 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期一, 26 五月 2025 10:39:58 +0800 Subject: [PATCH] 2025-5-26提交 --- src/views/simulation/testSimulation/testReport.vue | 162 +++++++++++++++++++++++++++++------------------------ 1 files changed, 88 insertions(+), 74 deletions(-) diff --git a/src/views/simulation/testSimulation/testReport.vue b/src/views/simulation/testSimulation/testReport.vue index 0f05b0d..740677e 100644 --- a/src/views/simulation/testSimulation/testReport.vue +++ b/src/views/simulation/testSimulation/testReport.vue @@ -1,21 +1,17 @@ <template> <div class="permission-manage"> <div class="titleBox"> - <div class="name"> + <div class="name"> <span>{{ name }}娴嬭瘯鎶ュ憡</span> </div> - <div class="back"><el-icon><ArrowLeftBold /></el-icon>杩斿洖</div> + <div class="back" @click="goBack"> + <el-icon><ArrowLeftBold /></el-icon>杩斿洖 + </div> </div> <div class="page-box"> <div class="search flex"> - <el-date-picker - v-model="testTime" - type="date" - placeholder="閫夋嫨鏃ユ湡" - /> <el-input v-model="searchValue" - placeholder="璇疯緭鍏ユ悳绱㈠叧閿瓧" class="searchInput" > @@ -26,105 +22,123 @@ </div> <div class="list"> <div> - <el-table :data="tableData" border :default-sort="{ prop: 'date', order: 'descending' }" style="width: 100%"> - <el-table-column prop="index" label="搴忓彿" width="60"/> + <el-table + :data="tableData" + border + :default-sort="{ prop: 'date', order: 'descending' }" + style="width: 100%" + > + <el-table-column prop="index" label="搴忓彿" width="60" /> <el-table-column prop="name" label="娴嬭瘯鍚嶇О" /> - <el-table-column prop="model" label="娴嬭瘯妯″瀷" /> - <el-table-column prop="time" label="娴嬭瘯鏃堕棿" sortable /> - <el-table-column prop="operator" label="娴嬭瘯浜�"/> - <el-table-column label="鎿嶄綔"> + <el-table-column prop="TestModel" label="娴嬭瘯妯″瀷" /> + <el-table-column prop="createDate" label="娴嬭瘯鏃堕棿" sortable /> + <!-- <el-table-column prop="operator" label="娴嬭瘯浜�" /> --> + <!-- <el-table-column label="鎿嶄綔"> <template #default="scope"> - <el-button - size="small" - @click="getDetail(scope.row)" - > + <el-button size="small" @click="getDetail(scope.row)"> 鏌ョ湅 </el-button> </template> - </el-table-column> + </el-table-column> --> </el-table> </div> - </div> - </div> </div> </template> <script setup lang="ts"> -import { ref, onMounted } from "vue"; -const name = ref('椋炶穬鍣ㄦ暣妯″瀷') -const testTime = ref() -const searchValue = ref() -const tableData = ref([]) - +import { ref, onMounted, inject } from "vue"; +const name = ref("椋炶穬鍣ㄦ暣妯″瀷"); +const testTime = ref(); +const searchValue = ref(); +const tableData = ref([]); +import { curStoreInfo } from "@/store/index"; +import { useRoute, useRouter } from "vue-router"; +const seleStore = curStoreInfo(); +const toolClass: any = inject("toolClass"); +const route = useRoute(); +const router = useRouter(); onMounted(() => { getReportData(); }); -const getReportData =()=>{ - let list=[ - { - index: 1, - name:'', - model:'', - time:'', - operator:'', - }, - { - index: 2, - name:'', - model:'', - time:'', - operator:'', - }, - { - index: 3, - name:'', - model:'', - time:'', - operator:'', - }, - ] - tableData.value = list -} +const goBack = () => { + router.push({ + path: "/simulation", + }); +}; -const getDetail =(row)=>{ - -} - +const getReportData = async () => { + const fields = { + TestModel: [], + TestName: [], + ModelRemarks: [], + }; + let searchFields = {}; + let modelQuery = {}; + if (searchValue.value && searchValue.value != "") { + searchFields = { + "TestName*": [searchValue.value], + }; + } + if (route.query?.id && route.query.id != "") { + modelQuery = { + "TestModel=": [route.query.id], + }; + } + const body = { + path: seleStore.testReportChannel.data.idPath, + type: "\\", + storeId: seleStore.storeInfo.storeId, + repositoryId: seleStore.storeInfo.repositoryId, + paging: { + Start: 0, + Size: 99, + }, + linkTypes: [], + fields: { ...fields, ...searchFields, ...modelQuery }, + filters: { + "SysType=": ["CmsItem"], + }, + }; + const queryTableData = await toolClass.getCmsItem(body); + console.log(queryTableData, "queryTableData"); + tableData.value = queryTableData.datas; +}; </script> <style lang="less" scoped> +.permission-manage { + background-color: #fff; + height: 100%; +} .testReport { padding: 20px; } -.titleBox{ - height:36px; +.titleBox { + height: 36px; line-height: 36px; - background:#409eff; position: relative; - .name{ - text-align:center; + .name { + text-align: center; } - .back{ - position:absolute; - left:10px; + .back { + position: absolute; + left: 10px; top: 0; display: flex; align-items: center; - color:#ffffff; } - } -.page-box{ +.page-box { padding: 20px; - .searchInput{ - width:220px; - margin-left:20px; + .searchInput { + width: 220px; + margin-left: 20px; } - .list{ - margin-top:20px; + .list { + margin-top: 20px; } } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.1