<template>
|
<div class="list">
|
<TableCustom :queryForm="queryForm" :tableData="tableData" :total="total" @currentChange="handleCurrentChange"
|
@sizeChange="handleSizeChange">
|
<template #search>
|
<el-form :model="form" label-width="140px" inline>
|
<el-form-item label="所属项目课题方案:">
|
<el-input v-model="form.projectName" placeholder="请输入" />
|
</el-form-item>
|
<el-form-item label="实验编号:">
|
<el-input v-model="form.experimentNo" placeholder="请输入" />
|
</el-form-item>
|
<el-form-item label="实验名称:">
|
<el-input v-model="form.experimentName" placeholder="请输入" />
|
</el-form-item>
|
<el-form-item label="评定时间:">
|
<el-date-picker v-model="form.dateRange" type="daterange" range-separator="至" start-placeholder="开始日期"
|
end-placeholder="结束日期">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item class="search-btn-box">
|
<el-button @click="handleReset">重置</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>
|
<el-button @click="handleAdd" class="el-icon-plus" type="primary">
|
新增实验员工作评定</el-button>
|
</div>
|
</template>
|
<template #table>
|
<el-table-column prop="teamName" label="所属项目课题方案" />
|
<el-table-column prop="experimentCode" label="实验编号" />
|
<el-table-column prop="experimentName" label="实验名称" />
|
<el-table-column prop="chemistName" label="被评定实验员" />
|
<el-table-column prop="chemistIntegral" label="评定分数" />
|
<el-table-column prop="evaluateTime" label="评定时间" />
|
<el-table-column label="操作" width="180">
|
<template #default="{ row }">
|
<el-button type="text" style="color: #1890ff" @click="handleDetail(row)">详情</el-button>
|
<el-button type="text" style="color: #1890ff" @click="handleEdit(row)">编辑</el-button>
|
<el-button type="text" style="color: #1890ff" @click="handleDelete(row)">删除</el-button>
|
</template>
|
</el-table-column>
|
</template>
|
</TableCustom>
|
</div>
|
</template>
|
|
<script>
|
import { chemistEvaluateList } from './service'
|
export default {
|
name: 'TesterWorkerEvaluate',
|
data() {
|
return {
|
currentType: 'list', // 当前显示类型:list-列表,draft-草稿箱
|
form: {
|
projectName: '',
|
experimentNo: '',
|
experimentName: '',
|
dateRange: []
|
},
|
tableData: [],
|
queryForm: {
|
pageSize: 10,
|
pageNum: 1
|
},
|
total: 0,
|
loading: false
|
}
|
},
|
methods: {
|
async getList() {
|
this.loading = true
|
const params = {
|
...this.queryForm,
|
projectName: this.form.projectName,
|
experimentNo: this.form.experimentNo,
|
experimentName: this.form.experimentName,
|
startTime: this.form.dateRange && this.form.dateRange[0] ? this.form.dateRange[0] : '',
|
endTime: this.form.dateRange && this.form.dateRange[1] ? this.form.dateRange[1] : ''
|
}
|
try {
|
const res = await chemistEvaluateList(params)
|
this.tableData = (res.data?.records || []).map(item => {
|
let score = '';
|
try {
|
const json = typeof item.resultEvaluateJson === 'string'
|
? JSON.parse(item.resultEvaluateJson)
|
: item.resultEvaluateJson;
|
score = json?.score || '';
|
} catch (e) {}
|
return { ...item, score };
|
})
|
this.total = res.data?.total || 0
|
} finally {
|
this.loading = false
|
}
|
},
|
handleSearch() {
|
this.queryForm.pageNum = 1
|
this.getList()
|
},
|
handleReset() {
|
this.form = {
|
projectName: '',
|
experimentNo: '',
|
experimentName: '',
|
dateRange: []
|
}
|
this.queryForm.pageNum = 1
|
this.getList()
|
},
|
|
handleCurrentChange(page) {
|
this.queryForm.pageNum = page
|
this.getList()
|
},
|
handleSizeChange(size) {
|
this.queryForm.pageSize = size
|
this.getList()
|
},
|
handleAdd() {
|
this.$router.push({
|
path: '/deliveryAssessment/addTesterWorkerEvaluate'
|
})
|
},
|
handleDetail(row) {
|
// 详情逻辑后续补充
|
},
|
handleEdit(row) {
|
// 编辑逻辑后续补充
|
},
|
handleDelete(row) {
|
// 删除逻辑后续补充
|
}
|
|
},
|
mounted() {
|
this.getList()
|
}
|
}
|
</script>
|
|
<style scoped lang="less">
|
.list {
|
height: 100%;
|
}
|
|
.top-box-integral {
|
display: flex;
|
justify-content: space-between;
|
flex-wrap: wrap;
|
gap: 28px;
|
|
&-card {
|
flex: 1;
|
background: #E8FAF6;
|
box-shadow: 0px 10px 10px 0px rgba(0, 0, 0, 0.06);
|
border-radius: 10px;
|
padding: 21px 20px;
|
|
&-title {
|
font-family: 'SourceHanSansCN-Medium';
|
font-size: 14px;
|
color: rgba(0, 0, 0, 0.8);
|
}
|
|
&-num {
|
font-family: 'SF Compact Display Black';
|
text-align: center;
|
font-weight: 900;
|
font-size: 50px;
|
color: #049C9A;
|
line-height: 60px;
|
}
|
}
|
}
|
|
.tip-warring {
|
margin-top: 20px;
|
color: rgba(255, 73, 85, 1);
|
}
|
|
.table-title {
|
width: 220px;
|
height: 50px;
|
background: #FFFFFF;
|
border-radius: 8px 8px 0px 0px;
|
border: 1px solid #049C9A;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
font-family: SourceHanSansCN, SourceHanSansCN;
|
font-weight: bold;
|
font-size: 18px;
|
color: #049C9A;
|
line-height: 27px;
|
}
|
|
.expand-box {
|
padding: 20px;
|
background: linear-gradient(180deg, #049C9A 0%, #0ACBCA 100%);
|
border-radius: 20px;
|
|
&-title {
|
font-weight: 500;
|
font-size: 16px;
|
color: #FFFFFF;
|
line-height: 24px;
|
margin-bottom: 20px;
|
}
|
}
|
|
.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;
|
cursor: pointer;
|
}
|
|
.drafts {
|
padding: 16px 65px;
|
background: #fafafc;
|
border-radius: 8px 8px 0px 0px;
|
border: 1px solid #dcdfe6;
|
font-weight: 400;
|
font-size: 18px;
|
color: #606266;
|
margin-left: 16px;
|
cursor: pointer;
|
}
|
|
.active {
|
color: #049c9a;
|
background: #ffffff;
|
border-radius: 8px 8px 0px 0px;
|
border: 1px solid #049c9a;
|
}
|
}
|
</style>
|