受试者页面添加图表查看入口
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-12-30 11:44:10 +08:00
parent 040814c3d6
commit 5216bf9f62
4 changed files with 379 additions and 185 deletions

View File

@ -4407,6 +4407,14 @@ export function getTrialEfficacyEvaluationStatList(data) {
data data
}) })
} }
// 受试者图表
export function getReportsChartSummary(data) {
return request({
url: `/ReadingImageTask/getReportsChartSummary`,
method: 'post',
data
})
}
// 靶段标注列表 // 靶段标注列表
export function getTrialSubjectVisitMarkList(data) { export function getTrialSubjectVisitMarkList(data) {
return request({ return request({

View File

@ -8,7 +8,6 @@
<script> <script>
import { getReportsChartData } from "@/api/reading" import { getReportsChartData } from "@/api/reading"
import moment from "moment"
let echarts = require('echarts/lib/echarts'); let echarts = require('echarts/lib/echarts');
// //

View File

@ -0,0 +1,289 @@
<template>
<div class="subjectChart" v-loading="loading">
<el-form :inline="true">
<!-- Site -->
<el-form-item :label="$t('subjectChart:table:subject')">
<span>{{ data.Code }}</span>
</el-form-item>
<el-form-item :label="$t('subjectChart:table:CriterionType')">
<el-select v-model="CriterionType" clearable filterable @change="handleChange">
<el-option v-for="(item) of trialCriterionList" :key="item.TrialReadingCriterionId"
:label="item.TrialReadingCriterionName" :value="item.CriterionType" />
</el-select>
</el-form-item>
</el-form>
<el-table :data="tableList" border style="width: 100%">
<el-table-column v-for="item in tableKey" :key="item.key" :prop="item.key" :label="item.title">
<template slot-scope="scope">
<span>{{ scope.row[item.key] }}</span>
</template>
</el-table-column>
</el-table>
<div class="chartBox">
<div class="R1box" v-if="R1ChartList.length > 0">
<div v-for="item in R1ChartList" :key="item.id">
<div class="title">{{ item.title }}</div>
<div v-for="d in item.list" :key="d.id" :ref="`chartContainer_${d.id}`" class="canvasBox"
:style="{ width: R2ChartList.length > 0 ? '490px' : '980px', height: '290px' }">
</div>
</div>
</div>
<div class="R2box" v-if="R2ChartList.length > 0">
<div v-for="item in R2ChartList" :key="item.id">
<div class="title">{{ item.title }}</div>
<div v-for="d in item.list" :key="d.id" :ref="`chartContainer_${d.id}`" class="canvasBox"
style="width: 490px; height: 290px;">
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {
getTrialCriterionList,
getReportsChartSummary
} from '@/api/trials'
let echarts = require('echarts/lib/echarts');
//
// require('echarts/lib/chart/bar');
require('echarts/lib/chart/line');
// require('echarts/lib/chart/pie');
// require('echarts/lib/chart/scatter');
//
require('echarts/lib/component/tooltip');
require('echarts/lib/component/title');
require('echarts/lib/component/legend');
require('echarts/lib/component/grid');
require('echarts/lib/component/dataZoom');
export default {
name: "SubjectChart",
props: {
data: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
loading: false,
trialCriterionList: [],
CriterionType: null,
tableKey: [],
tableList: [],
R1ChartList: [],
R2ChartList: []
}
},
mounted() {
this.getTrialCriterionList()
},
methods: {
handleChange() {
this.getList()
},
getTrialCriterionList() {
this.loading = true
getTrialCriterionList(this.$route.query.trialId, false).then(res => {
this.trialCriterionList = res.Result
if (this.trialCriterionList.length > 0) {
this.CriterionType = this.trialCriterionList[0].CriterionType
this.getList()
this.loading = false
}
}).catch(() => { this.loading = false })
},
async getList() {
try {
let data = {
SubjectId: this.data.Id,
CriterionType: this.CriterionType
}
this.loading = true
let res = await getReportsChartSummary(data)
this.loading = false
if (res.IsSuccess) {
let Evaluation = res.Result.Evaluation.Evaluation
let DictionaryCode = res.Result.Evaluation.DictionaryCode
this.tableKey = [
{
title: this.$t(`subjectChart:table:label:visit`),
key: 'visit'
}
]
Evaluation[0].forEach(key => {
let obj = {
title: key,
key
}
this.tableKey.push(obj)
})
this.tableList = []
if (Evaluation[1] && Evaluation[1].length > 0) {
let obj = {}
this.tableKey.forEach((item, index) => {
obj[item.key] = index === 0 ? 'R1' : DictionaryCode ? this.$fd(DictionaryCode, Evaluation[1][index - 1]) : Evaluation[1][index - 1]
})
this.tableList.push(obj)
}
if (Evaluation[2] && Evaluation[2].length > 0) {
let obj = {}
this.tableKey.forEach((item, index) => {
obj[item.key] = index === 0 ? 'R2' : DictionaryCode ? this.$fd(DictionaryCode, Evaluation[2][index - 1]) : Evaluation[2][index - 1]
})
this.tableList.push(obj)
}
let chartData = [...res.Result.TargetCharts, ...res.Result.QuestionCharts]
let R1ChartData = chartData.map(item => {
if (item.Arm === 1) return item
}).filter(item => item && item.VisitTaskNameList.length > 0)
let R2ChartData = chartData.map(item => {
if (item.Arm === 2) return item
}).filter(item => item && item.VisitTaskNameList.length > 0)
if (Array.isArray(R1ChartData)) {
this.R1ChartList = []
R1ChartData.forEach(item => {
let index = this.R1ChartList.findIndex(i => i.title === item.GroupName)
let o = {
id: this.$guid(),
series: [],
unit: this.$fd("ValueUnit", item.Unit),
visitName: item.VisitTaskNameList,
}
item.ChartDataList.forEach((i) => {
let arr = []
i.Value.forEach((d) => {
arr.push(d)
})
o.series.push({
name: i.Name,
data: arr,
type: 'line'
})
});
if (index < 0) {
let obj = {
title: item.GroupName,
list: [o],
id: this.$guid(),
}
this.R1ChartList.push(obj)
} else {
this.R1ChartList[index].list.push(o)
}
})
this.$nextTick(() => {
if (this.R1ChartList.length > 0) {
this.R1ChartList.forEach(item => {
if (item.list.length > 0) {
item.list.forEach(d => {
this.initChart(d)
})
}
})
}
})
}
if (Array.isArray(R2ChartData)) {
this.R2ChartList = []
R2ChartData.forEach(item => {
let index = this.R2ChartList.findIndex(i => i.title === item.GroupName)
let o = {
id: this.$guid(),
series: [],
unit: this.$fd("ValueUnit", item.Unit),
visitName: item.VisitTaskNameList,
}
item.ChartDataList.forEach((i) => {
let arr = []
i.Value.forEach((d) => {
arr.push(d)
})
o.series.push({
name: i.Name,
data: arr,
type: 'line'
})
});
if (index < 0) {
let obj = {
title: item.GroupName,
list: [o],
id: this.$guid(),
}
this.R2ChartList.push(obj)
} else {
this.R2ChartList[index].list.push(o)
}
})
this.$nextTick(() => {
if (this.R2ChartList.length > 0) {
this.R2ChartList.forEach(item => {
if (item.list.length > 0) {
item.list.forEach(d => {
this.initChart(d)
})
}
})
}
})
}
}
} catch (err) {
this.loading = false
console.log(err)
}
},
initChart(obj) {
let chart = echarts.init(this.$refs[`chartContainer_${obj.id}`][0]);
// ...
const option = {
// title: {
// text: obj.title,
// textStyle: {
// color: "#fff"
// }
// },
tooltip: {
trigger: 'axis',
},
xAxis: {
data: obj.visitName,
},
yAxis: {
name: obj.unit,
type: 'value',
},
series: obj.series
};
// 4. 使
chart.setOption(option);
},
}
}
</script>
<style lang="scss" scoped>
.chartBox {
display: flex;
width: 100%;
.R1box,
.R2box {
width: 100%;
.title {
margin-top: 10px;
}
.canvasBox {
margin: auto;
}
}
}
</style>

View File

@ -6,12 +6,8 @@
<!-- Site --> <!-- Site -->
<el-form-item :label="$t('trials:subject:table:site')"> <el-form-item :label="$t('trials:subject:table:site')">
<el-select v-model="searchData.TrialSiteId" clearable filterable style="width:130px;"> <el-select v-model="searchData.TrialSiteId" clearable filterable style="width:130px;">
<el-option <el-option v-for="(item, index) of siteOptions" :key="index" :label="item.TrialSiteCode"
v-for="(item,index) of siteOptions" :value="item.TrialSiteId" />
:key="index"
:label="item.TrialSiteCode"
:value="item.TrialSiteId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- Subject ID --> <!-- Subject ID -->
@ -21,7 +17,8 @@
<!-- Status --> <!-- Status -->
<el-form-item :label="$t('trials:subject:table:status')"> <el-form-item :label="$t('trials:subject:table:status')">
<el-select v-model="searchData.Status" clearable style="width:130px;"> <el-select v-model="searchData.Status" clearable style="width:130px;">
<el-option v-for="item of $d.Subject_Visit_Status" :key="item.value" :value="item.value" :label="item.label" /> <el-option v-for="item of $d.Subject_Visit_Status" :key="item.value" :value="item.value"
:label="item.label" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('trials:subject:table:isMissingImages')"> <el-form-item :label="$t('trials:subject:table:isMissingImages')">
@ -45,14 +42,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span style="margin-left:auto;"> <span style="margin-left:auto;">
<el-button <el-button v-if="visitPlanConfirmed" v-hasPermi="['trials:trials-panel:subject:new']" type="primary"
v-if="visitPlanConfirmed" icon="el-icon-plus" @click="handleAdd">
v-hasPermi="['trials:trials-panel:subject:new']"
type="primary"
icon="el-icon-plus"
@click="handleAdd"
>
{{ $t('common:button:new') }} {{ $t('common:button:new') }}
</el-button> </el-button>
</span> </span>
@ -61,226 +52,127 @@
<template slot="main-container"> <template slot="main-container">
<!-- 受试者列表 --> <!-- 受试者列表 -->
<el-table <el-table ref="subjectList" v-loading="loading" v-adaptive="{ bottomOffset: 60 }" :data="list" stripe height="100"
ref="subjectList" @sort-change="handleSortByColumn">
v-loading="loading"
v-adaptive="{bottomOffset:60}"
:data="list"
stripe
height="100"
@sort-change="handleSortByColumn"
>
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<!-- Site --> <!-- Site -->
<el-table-column <el-table-column prop="TrialSiteCode" :label="$t('trials:subject:table:site')" sortable="custom"
prop="TrialSiteCode" show-overflow-tooltip width="120" />
:label="$t('trials:subject:table:site')"
sortable="custom"
show-overflow-tooltip
width="120"
/>
<!-- Code --> <!-- Code -->
<el-table-column <el-table-column prop="Code" :label="$t('trials:subject:table:subjectId')" show-overflow-tooltip
prop="Code" sortable="custom" width="130" />
:label="$t('trials:subject:table:subjectId')"
show-overflow-tooltip
sortable="custom"
width="130"
/>
<!-- 第二编号 --> <!-- 第二编号 -->
<el-table-column <el-table-column v-if="otherInfo.IsSubjectSecondCodeView" prop="MedicalNo"
v-if="otherInfo.IsSubjectSecondCodeView" :label="$t('trials:subject:table:medicalNo')" show-overflow-tooltip sortable="custom" width="150" />
prop="MedicalNo"
:label="$t('trials:subject:table:medicalNo')"
show-overflow-tooltip
sortable="custom"
width="150"
/>
<!-- 访视基准日期 --> <!-- 访视基准日期 -->
<el-table-column <el-table-column prop="FirstGiveMedicineTime" :label="$t('trials:subject:table:firstGiveMedicineTime')"
prop="FirstGiveMedicineTime" sortable="custom" show-overflow-tooltip width="150">
:label="$t('trials:subject:table:firstGiveMedicineTime')"
sortable="custom"
show-overflow-tooltip
width="150"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.FirstGiveMedicineTime ? moment(scope.row.FirstGiveMedicineTime).format('YYYY-MM-DD') : '' }} {{ scope.row.FirstGiveMedicineTime ? moment(scope.row.FirstGiveMedicineTime).format('YYYY-MM-DD') : '' }}
</template> </template>
</el-table-column> </el-table-column>
<!-- Status --> <!-- Status -->
<el-table-column <el-table-column prop="Status" :label="$t('trials:subject:table:status')" show-overflow-tooltip
prop="Status" sortable="custom" width="120">
:label="$t('trials:subject:table:status')"
show-overflow-tooltip
sortable="custom"
width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.Status === 1" type="primary">{{ $fd('Subject_Visit_Status', scope.row.Status) }}</el-tag> <el-tag v-if="scope.row.Status === 1" type="primary">{{ $fd('Subject_Visit_Status', scope.row.Status)
<el-tag v-if="scope.row.Status === 2" type="danger">{{ $fd('Subject_Visit_Status', scope.row.Status) }}</el-tag> }}</el-tag>
<el-tag v-if="scope.row.Status === 3" type="danger">{{ $fd('Subject_Visit_Status', scope.row.Status) }}</el-tag> <el-tag v-if="scope.row.Status === 2" type="danger">{{ $fd('Subject_Visit_Status', scope.row.Status)
}}</el-tag>
<el-tag v-if="scope.row.Status === 3" type="danger">{{ $fd('Subject_Visit_Status', scope.row.Status)
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 总访视量 --> <!-- 总访视量 -->
<el-table-column <el-table-column prop="TotalVisitCount" :label="$t('trials:subject:table:totalVisitCount')"
prop="TotalVisitCount" show-overflow-tooltip min-width="120">
:label="$t('trials:subject:table:totalVisitCount')"
show-overflow-tooltip
min-width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button v-if="scope.row.TotalVisitCount > 0 && (hasCrcRoute || hasQCRoute)" type="text"
v-if="scope.row.TotalVisitCount > 0 && (hasCrcRoute || hasQCRoute)" @click="handleTotalVisitCount(scope.row.Code)">
type="text"
@click="handleTotalVisitCount(scope.row.Code)"
>
{{ scope.row.TotalVisitCount }} {{ scope.row.TotalVisitCount }}
</el-button> </el-button>
<span v-else> {{ scope.row.TotalVisitCount }}</span> <span v-else> {{ scope.row.TotalVisitCount }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 计划访视量 --> <!-- 计划访视量 -->
<el-table-column <el-table-column prop="InPlanVisitCount" :label="$t('trials:subject:table:inPlanVisitCount')"
prop="InPlanVisitCount" show-overflow-tooltip sortable="custom" min-width="140" />
:label="$t('trials:subject:table:inPlanVisitCount')"
show-overflow-tooltip
sortable="custom"
min-width="140"
/>
<!-- 计划外访视量 --> <!-- 计划外访视量 -->
<el-table-column <el-table-column prop="OutPlanVisitCount" :label="$t('trials:subject:table:outPlanVisitCount')"
prop="OutPlanVisitCount" show-overflow-tooltip sortable="custom" width="160" />
:label="$t('trials:subject:table:outPlanVisitCount')"
show-overflow-tooltip
sortable="custom"
width="160"
/>
<!-- 当前提交访视量 --> <!-- 当前提交访视量 -->
<el-table-column <el-table-column prop="TotalVisitSubmmitCount" :label="$t('trials:subject:table:totalVisitSubmmitCount')"
prop="TotalVisitSubmmitCount" show-overflow-tooltip min-width="130" />
:label="$t('trials:subject:table:totalVisitSubmmitCount')"
show-overflow-tooltip
min-width="130"
/>
<!-- 是否漏传 --> <!-- 是否漏传 -->
<el-table-column <el-table-column prop="IsMissingImages" :label="$t('trials:subject:table:isMissingImages')"
prop="IsMissingImages" show-overflow-tooltip sortable="custom" min-width="140">
:label="$t('trials:subject:table:isMissingImages')"
show-overflow-tooltip
sortable="custom"
min-width="140"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsMissingImages" type="danger">{{ $fd('YesOrNo', scope.row.IsMissingImages) }}</el-tag> <el-tag v-if="scope.row.IsMissingImages" type="danger">{{ $fd('YesOrNo', scope.row.IsMissingImages)
}}</el-tag>
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsMissingImages) }}</el-tag> <el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsMissingImages) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- 漏提交访视量 --> <!-- 漏提交访视量 -->
<el-table-column <el-table-column prop="MissingSubmmitCount" :label="$t('trials:subject:table:missingSubmmitCount')"
prop="MissingSubmmitCount" show-overflow-tooltip min-width="120" />
:label="$t('trials:subject:table:missingSubmmitCount')"
show-overflow-tooltip
min-width="120"
/>
<!-- 失访访视量 --> <!-- 失访访视量 -->
<el-table-column <el-table-column prop="LostVisitCount" :label="$t('trials:subject:table:lostVisitCount')" show-overflow-tooltip
prop="LostVisitCount" min-width="120" />
:label="$t('trials:subject:table:lostVisitCount')"
show-overflow-tooltip
min-width="120"
/>
<!-- 最新提交访视名称 --> <!-- 最新提交访视名称 -->
<el-table-column <el-table-column prop="LatestVisitName" :label="$t('trials:subject:table:latestVisitName')"
prop="LatestVisitName" show-overflow-tooltip sortable="custom" min-width="120" />
:label="$t('trials:subject:table:latestVisitName')"
show-overflow-tooltip
sortable="custom"
min-width="120"
/>
<el-table-column <el-table-column
v-if="hasPermi(['trials:trials-panel:subject:edit', 'trials:trials-panel:subject:status', 'trials:trials-panel:subject:delete'])" v-if="hasPermi(['trials:trials-panel:subject:edit', 'trials:trials-panel:subject:status', 'trials:trials-panel:subject:delete', 'trials:trials-panel:subject:chart', 'trials:trials-panel:subject:report'])"
:label="$t('common:action:action')" :label="$t('common:action:action')" width="240" fixed="right">
width="200"
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:subject:edit']" circle
v-hasPermi="['trials:trials-panel:subject:edit']" :title="$t('trials:subject:action:edit')" icon="el-icon-edit-outline" @click="handleEdit(scope.row)" />
circle
:title="$t('trials:subject:action:edit')"
icon="el-icon-edit-outline"
@click="handleEdit(scope.row)"
/>
<!-- 修改状态 --> <!-- 修改状态 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:subject:status']" circle
v-hasPermi="['trials:trials-panel:subject:status']" :title="$t('trials:subject:action:status')" icon="el-icon-edit" @click="handleEditStatus(scope.row)" />
circle
:title="$t('trials:subject:action:status')"
icon="el-icon-edit"
@click="handleEditStatus(scope.row)"
/>
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:subject:delete']" circle
v-hasPermi="['trials:trials-panel:subject:delete']" :title="$t('trials:subject:action:delete')" icon="el-icon-delete" :disabled="scope.row.StudyCount > 0"
circle @click="handleDelete(scope.row)" />
:title="$t('trials:subject:action:delete')"
icon="el-icon-delete"
:disabled="scope.row.StudyCount>0"
@click="handleDelete(scope.row)"
/>
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:subject:report']" icon="el-icon-message" circle
v-hasPermi="['trials:trials-panel:subject:report']" :title="$t('trials:subject:title:report')" @click="handleMessage(scope.row)" />
icon="el-icon-message" <!-- 图表 -->
circle <el-button v-hasPermi="['trials:trials-panel:subject:chart']" icon="el-icon-s-data" circle
:title="$t('trials:subject:title:report')" :title="$t('trials:subject:title:report')" @click="handleopenSubjectChart(scope.row)" />
@click="handleMessage(scope.row)"
/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" /> <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" />
</template> </template>
<!-- 新增/编辑 --> <!-- 新增/编辑 -->
<el-dialog <el-dialog v-if="editDialog.visible" :visible.sync="editDialog.visible" :close-on-click-modal="false"
v-if="editDialog.visible" :title="editDialog.title" width="700px" custom-class="base-dialog-wrapper">
:visible.sync="editDialog.visible"
:close-on-click-modal="false"
:title="editDialog.title"
width="700px"
custom-class="base-dialog-wrapper"
>
<SubjectsForm :data="rowData" :other-info="otherInfo" @close="closeEditDialog" @getList="getList" /> <SubjectsForm :data="rowData" :other-info="otherInfo" @close="closeEditDialog" @getList="getList" />
</el-dialog> </el-dialog>
<!-- 修改受试者状态 --> <!-- 修改受试者状态 -->
<el-dialog <el-dialog v-if="statusVisible" :visible.sync="statusVisible" :close-on-click-modal="false"
v-if="statusVisible" :title="$t('trials:subject:dialogTitle:editStatus')" width="700px" custom-class="base-dialog-wrapper">
:visible.sync="statusVisible"
:close-on-click-modal="false"
:title="$t('trials:subject:dialogTitle:editStatus')"
width="700px"
custom-class="base-dialog-wrapper"
>
<SubjectStatusForm :data="rowData" @closeDialog="closeStatusDialog" @getList="getList" /> <SubjectStatusForm :data="rowData" @closeDialog="closeStatusDialog" @getList="getList" />
</el-dialog> </el-dialog>
<!-- 修改受试者状态 --> <!-- 修改受试者状态 -->
<el-dialog <el-dialog v-if="MessageVisible" :visible.sync="MessageVisible" :close-on-click-modal="false"
v-if="MessageVisible" :title="$t('trials:subject:title:sendReport').replace('xxx', rowData.Code)" width="720px"
:visible.sync="MessageVisible" custom-class="base-dialog-wrapper">
:close-on-click-modal="false"
:title="$t('trials:subject:title:sendReport').replace('xxx',rowData.Code)"
width="720px"
custom-class="base-dialog-wrapper"
>
<MessageTable :data="rowData" @closeDialog="closeStatusDialog" @getList="getList" /> <MessageTable :data="rowData" @closeDialog="closeStatusDialog" @getList="getList" />
</el-dialog> </el-dialog>
<!-- 图表 -->
<el-dialog :visible.sync="chartVisible" :close-on-click-modal="false" :fullscreen="true"
custom-class="base-dialog-wrapper">
<SubjectChart v-if="chartVisible" :data="rowData" />
</el-dialog>
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
@ -291,6 +183,7 @@ import Pagination from '@/components/Pagination'
import SubjectsForm from './components/SubjectsForm' import SubjectsForm from './components/SubjectsForm'
import SubjectStatusForm from './components/SubjectStatusForm' import SubjectStatusForm from './components/SubjectStatusForm'
import MessageTable from './components/MessageTable' import MessageTable from './components/MessageTable'
import SubjectChart from './components/SubjectChart'
import moment from 'moment' import moment from 'moment'
import { changeURLStatic } from '@/utils/history.js' import { changeURLStatic } from '@/utils/history.js'
const searchDataDefault = () => { const searchDataDefault = () => {
@ -306,7 +199,7 @@ const searchDataDefault = () => {
} }
export default { export default {
name: 'SubjectList', name: 'SubjectList',
components: { BaseContainer, Pagination, SubjectsForm, SubjectStatusForm, MessageTable }, components: { BaseContainer, Pagination, SubjectsForm, SubjectStatusForm, MessageTable, SubjectChart },
data() { data() {
return { return {
moment, moment,
@ -325,7 +218,8 @@ export default {
statusVisible: false, statusVisible: false,
trialId: '', trialId: '',
hasCrcRoute: false, hasCrcRoute: false,
hasQCRoute: false hasQCRoute: false,
chartVisible: false
} }
}, },
watch: { watch: {
@ -353,6 +247,10 @@ export default {
this.rowData = { ...row } this.rowData = { ...row }
this.MessageVisible = true this.MessageVisible = true
}, },
handleopenSubjectChart(row) {
this.rowData = { ...row }
this.chartVisible = true
},
handleExport() { handleExport() {
getSubjectList_Export(this.searchData).then(res => { getSubjectList_Export(this.searchData).then(res => {
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })