<template>
|
<div class="list">
|
<TableCustom :queryForm="form" :tableData="tableData" :total="total" :height="null">
|
<template #search>
|
<el-form :model="form" labelWidth="auto" inline>
|
<el-form-item label="所属实验编号:">
|
<el-input v-model="form.planCode" placeholder="请输入"></el-input>
|
</el-form-item>
|
<el-form-item label="创建人:">
|
<el-input v-model="form.creator" placeholder="请输入"></el-input>
|
</el-form-item>
|
<el-form-item label="创建时间:">
|
<el-date-picker
|
v-model="form.createTime"
|
type="daterange"
|
range-separator="至"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
value-format="yyyy-MM-dd"
|
></el-date-picker>
|
</el-form-item>
|
<el-form-item label="审批人:">
|
<el-input v-model="form.approver" placeholder="请输入"></el-input>
|
</el-form-item>
|
<el-form-item label="">
|
<el-button type="default" @click="resetForm">重置</el-button>
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
</el-form-item>
|
</el-form>
|
</template>
|
<template #setting>
|
<div class="tableTitle">
|
<div class="flex a-center">
|
<div class="title active">原始记录检测列表</div>
|
</div>
|
</div>
|
</template>
|
<template #table>
|
<el-table-column prop="projectPlan" label="所属项目课题方案"></el-table-column>
|
<el-table-column prop="experimentNo" label="实验编号"></el-table-column>
|
<el-table-column prop="experimentName" label="实验名称"></el-table-column>
|
<el-table-column prop="creator" label="创建人"></el-table-column>
|
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
<el-table-column prop="status" label="状态">
|
<template slot-scope="scope">
|
<el-tag :type="scope.row.status === '已填写' ? 'success' : 'warning'">
|
{{ scope.row.status }}
|
</el-tag>
|
</template>
|
</el-table-column>
|
<el-table-column label="操作" width="150">
|
<template slot-scope="scope">
|
<el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
|
<el-button type="text" @click="handleDetail(scope.row.id)">详情</el-button>
|
</template>
|
</el-table-column>
|
</template>
|
</TableCustom>
|
</div>
|
</template>
|
|
<script>
|
export default {
|
name: "OriginalRecordTest",
|
data() {
|
return {
|
form: {
|
planCode: "",
|
creator: "",
|
createTime: [],
|
approver: ""
|
},
|
tableData: [
|
{
|
id: '1',
|
projectPlan: 'DD250218-JL01',
|
experimentNo: '31423764',
|
experimentName: '化学成分分析实验',
|
creator: '张三',
|
createTime: '2025-1-8 17:56:11',
|
status: '未填写'
|
},
|
{
|
id: '2',
|
projectPlan: 'DD250218-JL02',
|
experimentNo: '31423765',
|
experimentName: '物理性能测试实验',
|
creator: '李四',
|
createTime: '2025-1-8 18:00:00',
|
status: '未填写'
|
},
|
{
|
id: '3',
|
projectPlan: 'DD250218-JL03',
|
experimentNo: '31423766',
|
experimentName: '材料强度测试',
|
creator: '王五',
|
createTime: '2025-1-8 18:30:00',
|
status: '已填写'
|
},
|
{
|
id: '4',
|
projectPlan: 'DD250218-JL04',
|
experimentNo: '31423767',
|
experimentName: '耐久性测试实验',
|
creator: '赵六',
|
createTime: '2025-1-8 19:00:00',
|
status: '已填写'
|
},
|
{
|
id: '5',
|
projectPlan: 'DD250218-JL05',
|
experimentNo: '31423768',
|
experimentName: '环境适应性测试',
|
creator: '孙七',
|
createTime: '2025-1-8 19:30:00',
|
status: '未填写'
|
}
|
],
|
total: 5
|
};
|
},
|
created() {
|
this.getTableData();
|
},
|
methods: {
|
resetForm() {
|
this.form = {
|
planCode: "",
|
creator: "",
|
createTime: [],
|
approver: ""
|
};
|
},
|
handleSearch() {
|
this.getTableData();
|
},
|
handleEdit(row) {
|
console.log("编辑数据:", row);
|
},
|
handleDetail(id) {
|
this.$router.push({
|
path: "/dataManagement/originalRecordTest/detail",
|
query: { id }
|
});
|
},
|
getTableData() {
|
// TODO: 调用接口获取数据
|
// this.tableData = [];
|
// this.total = 0;
|
}
|
}
|
};
|
</script>
|
|
<style scoped lang="less">
|
.list {
|
height: 100%;
|
}
|
.flex {
|
display: flex;
|
align-items: center;
|
}
|
.tableTitle {
|
display: flex;
|
padding-bottom: 20px;
|
justify-content: space-between;
|
align-items: center;
|
.title {
|
background: #fafafc;
|
border-radius: 8px 8px 0px 0px;
|
border: 1px solid #dcdfe6;
|
padding: 16px 29px;
|
font-weight: bold;
|
font-size: 18px;
|
color: #606266;
|
width: unset;
|
}
|
.active {
|
color: #049c9a;
|
background: #ffffff;
|
border-radius: 8px 8px 0px 0px;
|
border: 1px solid #049c9a;
|
}
|
}
|
</style>
|