<template>
|
<div class="list">
|
<TableCustom :queryForm="queryForm" :tableData="tableData" :height='null' :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.teamName" placeholder="请输入" />
|
</el-form-item>
|
<el-form-item label="试验内容:">
|
<el-input v-model="form.trialContent" placeholder="请输入" />
|
</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>
|
<el-button v-if="roleType==2" @click="handleAssessment" class="el-icon-plus" type="primary">
|
新增临床试验</el-button>
|
</template>
|
<template #table>
|
<el-table-column prop="projectTeam" label="所属项目组" >
|
<template #default="{ row }">
|
<el-tag v-if="row.teamName" type="info">{{ row.teamName }}</el-tag>
|
</template>
|
</el-table-column>
|
<el-table-column prop="trialContent" label="临床试验内容" />
|
<el-table-column prop="trialTime" label="临床试验时间" />
|
<el-table-column prop="createBy" label="添加人" />
|
<el-table-column prop="evaluateScore" label="评定积分" />
|
<el-table-column prop="totalScore" label="累计分数" />
|
<el-table-column prop="createTime" label="评定时间" />
|
<el-table-column label="操作">
|
<template #default="{ row }">
|
<el-button type="text" @click="handleDetail(row)">详情</el-button>
|
</template>
|
</el-table-column>
|
</template>
|
</TableCustom>
|
|
<Detail :modelValue="assessmentVisible" :type="dialogType" :id="currentId" @close="closeDetail" />
|
</div>
|
</template>
|
|
<script>
|
import Detail from './components/detail.vue'
|
import { pageList, getDetailByUserId } from './service.js'
|
|
export default {
|
name: 'ClinicalTrial',
|
components: {
|
Detail
|
},
|
data() {
|
return {
|
form: {
|
teamName: '',
|
trialContent: ''
|
},
|
tableData: [],
|
queryForm: {
|
pageSize: 10,
|
pageNum: 1
|
},
|
total: 0,
|
assessmentVisible: false,
|
dialogType: '',
|
roleType: '',
|
currentId: '',
|
}
|
},
|
mounted() {
|
const userInfo = JSON.parse(sessionStorage.getItem('userInfo'));
|
this.roleType = userInfo?.roleType;
|
this.getList();
|
},
|
methods: {
|
handleCurrentChange(page) {
|
this.queryForm.pageNum = page
|
this.getList()
|
},
|
handleSizeChange(size) {
|
this.queryForm.pageSize = size
|
this.getList()
|
},
|
getList() {
|
const params = { ...this.form, ...this.queryForm }
|
pageList(params).then(res => {
|
if(res && res.data) {
|
this.tableData = res.data.records || [];
|
this.total = res.data.total || 0;
|
}
|
})
|
},
|
handleSearch() {
|
this.queryForm.pageNum = 1;
|
this.getList();
|
},
|
handleReset() {
|
this.form = { name: '', content: '' };
|
this.queryForm.pageNum = 1;
|
this.getList();
|
},
|
async openDialog(type, id = '') {
|
this.dialogType = type;
|
this.currentId = id;
|
this.assessmentVisible = true;
|
},
|
handleDetail(row) {
|
this.openDialog('detail', row.id);
|
},
|
handleAssessment() {
|
this.openDialog('add');
|
},
|
closeDetail() {
|
this.assessmentVisible = false;
|
this.getList();
|
},
|
},
|
watch: {
|
assessmentVisible(val) {
|
if (!val) {
|
this.dialogType = '';
|
}
|
}
|
}
|
}
|
</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);
|
}
|
</style>
|