<template>
|
<div class="permission-manage">
|
<div class="titleBox">
|
<div class="name">
|
<span>{{ name }}测试报告</span>
|
</div>
|
<div class="back" @click="goBack">
|
<el-icon><ArrowLeftBold /></el-icon>返回
|
</div>
|
</div>
|
<div class="page-box">
|
<div class="search flex">
|
<el-input
|
v-model="searchValue"
|
placeholder="请输入搜索关键字"
|
class="searchInput"
|
>
|
<template #suffix>
|
<el-icon class="el-input__icon"><search /></el-icon>
|
</template>
|
</el-input>
|
</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-column prop="name" 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>
|
</template>
|
</el-table-column> -->
|
</el-table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script setup lang="ts">
|
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 goBack = () => {
|
router.push({
|
path: "/simulation",
|
});
|
};
|
|
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;
|
line-height: 36px;
|
position: relative;
|
.name {
|
text-align: center;
|
}
|
.back {
|
position: absolute;
|
left: 10px;
|
top: 0;
|
display: flex;
|
align-items: center;
|
}
|
}
|
.page-box {
|
padding: 20px;
|
.searchInput {
|
width: 220px;
|
margin-left: 20px;
|
}
|
.list {
|
margin-top: 20px;
|
}
|
}
|
</style>
|