1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
| <template>
| <div class="list">
| <TableCustom :queryForm="form" :tableData="tableData" :total="total">
| <template #search>
| <el-form :model="form" labelWidth="auto" inline>
| <el-form-item label="所属项目课题方案:">
| <el-input v-model="form.planName" placeholder="请输入"></el-input>
| </el-form-item>
| <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.planCode" placeholder="请输入"></el-input>
| </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">
| 取样操作记录列表
| </div>
| </div>
| </div>
| </template>
| <template #table>
| <el-table-column
| prop="planName"
| 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="sampleNo"
| 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="sampleStatus"
| label="样品总数/待送达/待接收/已接收"
| ></el-table-column>
| <el-table-column label="操作" width="100">
| <template slot-scope="scope">
| <el-button type="text" @click="handleDetail(scope.row)">详情</el-button>
| </template>
| </el-table-column>
| </template>
| </TableCustom>
| <!-- 审批弹窗 -->
| <!-- <approval-dialog
| :visible.sync="approvalDialogVisible"
| :type="approvalDialogType"
| :data="currentApprovalData"
| @approve="handleApproveSubmit"
| @reject="handleRejectSubmit"
| /> -->
| </div>
| </template>
|
| <script>
| // import ApprovalDialog from './components/approvalDialog.vue'
|
| export default {
| name: "ProjectList",
| components: {
| // ApprovalDialog
| },
| data() {
| return {
| form: {
| planName: "",
| planCode: "",
| creator: "",
| createTime: [],
| approver: "",
| status: "",
| },
| tableData: [],
| total: 0,
| // 模拟数据
| mockListData: [
| {
| planCode: "PLAN-2024-001",
| planName: "2024年度实验室设备升级方案",
| stage: "规划阶段",
| creator: "张三",
| createTime: "2024-03-15",
| status: "pending",
| approver: "李四",
| approveTime: "2024-03-16",
| },
| {
| planCode: "PLAN-2024-002",
| planName: "实验室安全管理制度更新方案",
| stage: "实施阶段",
| creator: "王五",
| createTime: "2024-03-14",
| status: "approved",
| approver: "赵六",
| approveTime: "2024-03-15",
| },
| {
| planCode: "PLAN-2024-003",
| planName: "实验室人员培训计划",
| stage: "准备阶段",
| creator: "孙七",
| createTime: "2024-03-13",
| status: "rejected",
| approver: "周八",
| approveTime: "2024-03-14",
| },
| ],
| };
| },
| created() {
| this.getTableData();
| },
| methods: {
| resetForm() {
| this.form = {
| planName: "",
| planCode: "",
| creator: "",
| createTime: [],
| approver: "",
| status: "",
| };
| },
| handleSearch() {
| // 实现查询逻辑
| console.log("查询条件:", this.form);
| this.getTableData();
| },
| handleDetail(row) {
| this.$router.push({
| path: "/sampleManage/submission",
| query: {
| id: row.id,
| type: 'view'
| }
| });
| },
| getTableData() {
| // 获取列表数据
| this.tableData = this.mockListData;
| this.total = this.mockListData.length;
| },
| },
| };
| </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: #ffffff;
| border-radius: 8px 8px 0px 0px;
| border: 1px solid #049c9a;
| padding: 16px 29px;
| font-weight: bold;
| font-size: 18px;
| color: #049c9a;
| width: unset;
| }
| }
| </style>
|
|