项目管理->受试者相关接口调试对接

main
wangxiaoshuang 2024-04-02 17:15:15 +08:00
parent aaf9b99301
commit 983d57861c
14 changed files with 930 additions and 461 deletions

View File

@ -1,20 +0,0 @@
// 项目管理->详情->检查
import request from '@/utils/request'
// 检查列表->未提交
export function getPatientStudyBeforeConfirmList(data) {
return request({
url: '/Patient/getPatientStudyBeforeConfirmList',
method: 'post',
data
})
}
// 检查列表->已提交
export function getTrialPatientStudyList(data) {
return request({
url: '/Patient/getTrialPatientStudyList',
method: 'post',
data
})
}

View File

@ -0,0 +1,20 @@
// 项目管理->详情->检查
import request from '@/utils/request'
// 检查列表->未提交
export function getPatientStudyBeforeConfirmList(data) {
return request({
url: '/Patient/getPatientStudyBeforeConfirmList',
method: 'post',
data
})
}
// 检查列表->已提交
export function getTrialPatientStudyList(data) {
return request({
url: '/Patient/getTrialPatientStudyList',
method: 'post',
data
})
}

View File

@ -103,3 +103,20 @@ export function confirmBackCriteriaVisitTask(param) {
}) })
} }
// 受试者列表
export function getPatientSubejctList(param) {
return request({
url: `/Patient/getPatientSubejctList`,
method: 'post',
data: param
})
}
// 新增受试者->患者列表
export function getPatientInitList(param) {
return request({
url: `/Patient/getPatientInitList`,
method: 'post',
data: param
})
}

View File

@ -288,3 +288,19 @@ export function forwardSVDicomImage(param) {
}) })
} }
// 获取访视列表
export function getPatientSubejctVisitList(param) {
return request({
url: `/Patient/getPatientSubejctVisitList`,
method: 'post',
data: param
})
}
// 下载影像
export function getSubjectImageZipInfo(id) {
return request({
url: `/Patient/getSubjectImageZipInfo/${id}`,
method: 'get',
})
}

View File

@ -302,7 +302,7 @@
clearable clearable
style="width:100%;" style="width:100%;"
> >
<el-option v-for="item of $d.AttendedReviewerType" :value="item.value" :label="item.label" /> <el-option v-for="item of $d.AttendedReviewerType" :value="item.value" :label="item.label" :key="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>

View File

@ -80,7 +80,7 @@
</div> </div>
</el-form> </el-form>
</div> </div>
<confirmTrialsList <confirmVisitList
ref="confirmVisit" ref="confirmVisit"
:Patient="Patient" :Patient="Patient"
:submitMessage="submitMessage" :submitMessage="submitMessage"
@ -91,7 +91,7 @@
<script> <script>
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import trialsSelect from "./trials-select.vue"; import trialsSelect from "./trials-select.vue";
import confirmTrialsList from "./confirm-visit-list.vue"; import confirmVisitList from "./confirm-visit-list.vue";
import { import {
getPatientJoinTrialInitSelectList, getPatientJoinTrialInitSelectList,
getTrialSubejctSelectList, getTrialSubejctSelectList,
@ -100,7 +100,7 @@ import {
} from "@/api/inspection.js"; } from "@/api/inspection.js";
export default { export default {
name: "addTrialsList", name: "addTrialsList",
components: { Pagination, trialsSelect, confirmTrialsList }, components: { Pagination, trialsSelect, confirmVisitList },
props: { props: {
visible: { visible: {
required: true, required: true,

View File

@ -71,6 +71,22 @@
> >
<el-table-column type="selection" align="center" width="45" /> <el-table-column type="selection" align="center" width="45" />
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<!--患者编号-->
<el-table-column
align="center"
prop="PatientIdStr"
:label="$t('trials:uploadDicomList:table:pId')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--患者姓名-->
<el-table-column
align="center"
prop="PatientName"
:label="$t('trials:uploadDicomList:table:patientName')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--检查描述--> <!--检查描述-->
<el-table-column <el-table-column
align="center" align="center"
@ -270,7 +286,11 @@ export default {
Object.keys(this.searchData).forEach((key) => { Object.keys(this.searchData).forEach((key) => {
data[key] = this.searchData[key]; data[key] = this.searchData[key];
}); });
data.PatientId = this.Patient.PatientId; data.patientIdList = this.Patient.PatientId;
if (!Array.isArray(this.Patient.PatientId)) {
data.patientIdList = [this.Patient.PatientId];
}
if (this.dateValue[0] && this.dateValue[1]) { if (this.dateValue[0] && this.dateValue[1]) {
data.earliestStudyTime = this.dateValue[0].toISOString(); data.earliestStudyTime = this.dateValue[0].toISOString();
data.latestStudyTime = this.dateValue[1].toISOString(); data.latestStudyTime = this.dateValue[1].toISOString();

View File

@ -116,7 +116,7 @@
v-for="(item, index) in scope.row.CalledAEList" v-for="(item, index) in scope.row.CalledAEList"
:key="`CalledAEList${index}`" :key="`CalledAEList${index}`"
>{{ >{{
index === scope.row.CalledAEList.length - 1 ? item : `${item}` index === scope.row.CalledAEList.length - 1 ? item : `${item}, `
}}</span }}</span
> >
</template> </template>

View File

@ -116,7 +116,6 @@
prop="PatientList.PatientIdStr" prop="PatientList.PatientIdStr"
:label="$t('trials:uploadDicomList:table:pId')" :label="$t('trials:uploadDicomList:table:pId')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -132,10 +131,10 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 患者姓名 --> <!-- 姓名 -->
<el-table-column <el-table-column
prop="SubjectShortName" prop="SubjectShortName"
:label="$t('trials:uploadDicomList:table:patientName')" :label="$t('trials:researchStaff:table:Name')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
min-width="100" min-width="100"
@ -241,7 +240,7 @@ import editVisit from "./edit-visit";
import { import {
getPatientStudyBeforeConfirmList, getPatientStudyBeforeConfirmList,
getTrialPatientStudyList, getTrialPatientStudyList,
} from "@/api/study.js"; } from "@/api/trials/study.js";
let defaultSearchData = () => { let defaultSearchData = () => {
return { return {
SubjectCode: null, SubjectCode: null,

View File

@ -11,11 +11,20 @@
<!-- Status --> <!-- Status -->
<el-form-item :label="$t('trials:subject:table:status')" prop="Status"> <el-form-item :label="$t('trials:subject:table:status')" prop="Status">
<el-radio-group v-model="form.Status" :disabled="originalStatus === 2"> <el-radio-group v-model="form.Status" :disabled="originalStatus === 2">
<el-radio v-for="item of $d.Subject_Visit_Status" :label="item.value">{{item.label}}</el-radio> <el-radio
v-for="item of $d.Subject_Visit_Status"
:label="item.value"
:key="item.id"
>{{ item.label }}</el-radio
>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- Out Visit Date --> <!-- Out Visit Date -->
<el-form-item v-if="form.Status== 2" :label="$t('trials:subject:table:outVisitDate')" prop="VisitOverTime"> <el-form-item
v-if="form.Status == 2"
:label="$t('trials:subject:table:outVisitDate')"
prop="VisitOverTime"
>
<el-date-picker <el-date-picker
v-model="form.VisitOverTime" v-model="form.VisitOverTime"
type="date" type="date"
@ -25,12 +34,16 @@
/> />
</el-form-item> </el-form-item>
<!-- 末次访视 --> <!-- 末次访视 -->
<el-form-item v-if="form.Status===2" :label="$t('trials:subject:table:finalSubjectVisit')" prop="FinalSubjectVisitId"> <el-form-item
v-if="form.Status === 2"
:label="$t('trials:subject:table:finalSubjectVisit')"
prop="FinalSubjectVisitId"
>
<el-select <el-select
v-model="form.FinalSubjectVisitId" v-model="form.FinalSubjectVisitId"
clearable clearable
filterable filterable
style="width:100%" style="width: 100%"
:disabled="originalStatus === 2" :disabled="originalStatus === 2"
> >
<el-option <el-option
@ -42,12 +55,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 结束访视的原因 --> <!-- 结束访视的原因 -->
<el-form-item v-if="form.Status===2" :label="$t('trials:subject:table:outVisitReason')" prop="Reason"> <el-form-item
v-if="form.Status === 2"
:label="$t('trials:subject:table:outVisitReason')"
prop="Reason"
>
<el-input v-model="form.Reason" type="textarea" autosize /> <el-input v-model="form.Reason" type="textarea" autosize />
</el-form-item> </el-form-item>
</div> </div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;"> <div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item style="text-align:right;"> <el-form-item style="text-align: right">
<!-- 取消 --> <!-- 取消 -->
<el-button <el-button
:disabled="btnLoading" :disabled="btnLoading"
@ -55,96 +72,131 @@
type="primary" type="primary"
@click="handleCancel" @click="handleCancel"
> >
{{ $t('common:button:cancel') }} {{ $t("common:button:cancel") }}
</el-button> </el-button>
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave"> <el-button
{{ $t('common:button:save') }} size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>
{{ $t("common:button:save") }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
</template> </template>
<script> <script>
import { getSubjectVisitSelectOptions, updateSubjectStatus } from '@/api/trials' import {
getSubjectVisitSelectOptions,
updateSubjectStatus,
} from "@/api/trials";
export default { export default {
name: 'SubjectStatusForm', name: "SubjectStatusForm",
props: { props: {
data: { data: {
type: Object, type: Object,
default() { return {} } default() {
} return {};
},
},
}, },
data() { data() {
return { return {
form: { form: {
SubjectId: '', SubjectId: "",
Status: 1, Status: 1,
OutEnrollmentTime: '', OutEnrollmentTime: "",
Reason: '', Reason: "",
VisitOverTime: '', VisitOverTime: "",
FinalSubjectVisitId: '' FinalSubjectVisitId: "",
}, },
rules: { rules: {
OutEnrollmentTime: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }], OutEnrollmentTime: [
FinalSubjectVisitId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }], {
Reason: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500` }], required: true,
VisitOverTime: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }] message: this.$t("common:ruleMessage:select"),
trigger: ["blur"],
},
],
FinalSubjectVisitId: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur"],
},
],
Reason: [
{
max: 500,
message: `${this.$t("common:ruleMessage:maxLength")} 500`,
},
],
VisitOverTime: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur"],
},
],
}, },
pickerOption: { pickerOption: {
disabledDate: time => { disabledDate: (time) => {
return time.getTime() > Date.now() return time.getTime() > Date.now();
} },
}, },
subjectVisitOptions: [], subjectVisitOptions: [],
btnLoading: false, btnLoading: false,
loading: false, loading: false,
originalStatus: null, originalStatus: null,
trialId: '' trialId: "",
} };
}, },
mounted() { mounted() {
this.trialId = this.$route.query.trialId this.trialId = this.$route.query.trialId;
this.initForm() this.initForm();
}, },
methods: { methods: {
async initForm() { async initForm() {
this.loading = true this.loading = true;
const { Result } = await getSubjectVisitSelectOptions(this.data.Id) const { Result } = await getSubjectVisitSelectOptions(this.data.Id);
this.subjectVisitOptions = Result this.subjectVisitOptions = Result;
if (Object.keys(this.data).length > 0) { if (Object.keys(this.data).length > 0) {
for (const k in this.form) { for (const k in this.form) {
if (this.data.hasOwnProperty(k)) { if (this.data.hasOwnProperty(k)) {
this.form[k] = this.data[k] this.form[k] = this.data[k];
} }
} }
this.form.SubjectId = this.data.Id this.form.SubjectId = this.data.Id;
this.originalStatus = this.data.Status this.originalStatus = this.data.Status;
} }
this.form.TrialId = this.trialId this.form.TrialId = this.trialId;
this.loading = false this.loading = false;
}, },
handleSave() { handleSave() {
this.$refs.subjectStatusForm.validate(valid => { this.$refs.subjectStatusForm.validate((valid) => {
if (!valid) return if (!valid) return;
this.btnLoading = true this.btnLoading = true;
this.form.TrialId = this.trialId this.form.TrialId = this.trialId;
this.form.SiteId = this.data.SiteId this.form.SiteId = this.data.SiteId;
updateSubjectStatus(this.form).then(res => { updateSubjectStatus(this.form)
this.btnLoading = false .then((res) => {
this.$emit('getList') this.btnLoading = false;
// this.$message.success('Saved successfully!') this.$emit("getList");
this.$message.success(this.$t('common:message:savedSuccessfully')) // this.$message.success('Saved successfully!')
this.$emit('closeDialog') this.$message.success(this.$t("common:message:savedSuccessfully"));
}).catch(() => { this.$emit("closeDialog");
this.btnLoading = false })
}) .catch(() => {
}) this.btnLoading = false;
});
});
}, },
handleCancel() { handleCancel() {
this.$emit('closeDialog') this.$emit("closeDialog");
} },
} },
} };
</script> </script>

View File

@ -8,177 +8,116 @@
> >
<span slot="title" <span slot="title"
>{{ $t("trials:subject:title:addSubject") }}{{ >{{ $t("trials:subject:title:addSubject") }}{{
$t("trials:uploadDicomList:table:patientInfo") $t("trials:trials-list:table:researchNumber")
}}T0001132ZhangSan</span }}{{ researchProgramNo }}</span
> >
<div class="top"> <div class="top">
<p class="line">{{ $t("trials:inspection:subject:checkAddPatient") }}</p>
<el-form <el-form
:inline="true" :inline="true"
:model="submitMessage" :model="submitMessage"
class="demo-form-inline topForm" class="demo-form-inline topForm"
:rules="rules" :rules="rules"
ref="addSubjectForm"
> >
<!--受试者编号--> <div class="selectAndBtn">
<el-form-item <!--受试者编号-->
:label="$t('trials:crcQuestion:table:subjectId')"
prop="subjectId"
>
<el-input v-model="submitMessage.subjectId"></el-input>
</el-form-item>
<el-button type="primary" @click="addTrials">
{{ $t("trials:addRP:button:confirmAddPR") }}
</el-button>
</el-form>
</div>
<div class="search">
<p>{{ $t("trials:subject:messge:selectPatient") }}</p>
<div class="form">
<el-form :inline="true" class="base-search-form">
<!-- 患者编号 -->
<el-form-item :label="$t('trials:uploadDicomList:table:pId')">
<el-input v-model="searchData.SubjectInfo" style="width: 100px" />
</el-form-item>
<!-- 患者姓名 -->
<el-form-item :label="$t('trials:uploadDicomList:table:patientName')">
<el-input v-model="searchData.SubjectInfo" style="width: 100px" />
</el-form-item>
<!-- DICOM AE -->
<el-form-item <el-form-item
class="my_multiple" :label="$t('trials:crcQuestion:table:subjectId')"
:label="$t('trials:inspection:table:DICOMAE')" prop="SubjectId"
> >
<el-select <el-select
v-model="searchData.VisitPlanArray" v-model="submitMessage.SubjectId"
filterable
allow-create
default-first-option
clearable clearable
multiple :disabled="status === 'visit'"
style="width: 140px"
> >
<el-option <el-option
v-for="(item, index) of sponsorList" v-for="item in subjectIdList"
:key="index" :key="item.SubejctId"
:label="item.VisitName" :label="item.SubjectCode"
:value="item.VisitNum" :value="item.SubejctId"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 检查日期 --> <el-button
<el-form-item :label="$t('trials:uploadedDicoms:table:studyDate')"> type="primary"
<el-date-picker @click="save"
v-model="searchData.date" :loading="btnLoading"
type="daterange" v-if="status === 'trial'"
range-separator="至" >
start-placeholder="开始日期" {{ $t("trials:addRP:button:confirmAddPR") }}
end-placeholder="结束日期" </el-button>
> </div>
</el-date-picker> <!--患者-->
</el-form-item> <el-form-item :label="$t('trials:subject:messge:patient')">
<el-form-item> <div class="patientBox">
<!-- 查询 --> <p style="margin-right: 10px">
<span v-for="(item, index) in selectPatient" :key="item.PatientId"
>{{ item.PatientIdStr }}
<i
class="el-icon-delete-solid"
style="cursor: pointer"
@click.stop="delPatient(index)"
v-if="status === 'trial'"
></i>
</span>
</p>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" @click="patient_model.visible = true"
@click="handleSearch" v-if="status === 'trial'"
> >
{{ $t("common:button:search") }} {{ $t("common:button:add") }}
</el-button> </el-button>
<!-- 重置 --> </div>
<el-button </el-form-item>
type="primary" </el-form>
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
</el-button>
</el-form-item>
</el-form>
</div>
</div> </div>
<!--可加入项目列表--> <confirmVistList
<!--:header-cell-style="{ background: '#f9f9f9' }"--> ref="confirmVisit"
<el-table :Patient="Patient"
ref="addTrialsList" :submitMessage="submitMessage"
v-loading="loading" :status="status"
v-adaptive="{ bottomOffset: 60 }"
:data="list"
stripe
height="100"
@selection-change="handleSelectChange"
>
<el-table-column type="selection" align="center" width="45" />
<!--患者编号-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:uploadDicomList:table:pId')"
show-overflow-tooltip
></el-table-column>
<!--患者姓名-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:uploadDicomList:table:patientName')"
show-overflow-tooltip
></el-table-column>
<!--出生日期-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:inspection:table:birthdate')"
show-overflow-tooltip
></el-table-column>
<!--性别-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:subject:table:gender')"
show-overflow-tooltip
></el-table-column>
<!--检查时间-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:audit:table:studyDate')"
show-overflow-tooltip
></el-table-column>
<!--DiCOM AE-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:inspection:table:DICOMAE')"
show-overflow-tooltip
></el-table-column>
<!--检查数-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:studyList:table:count')"
show-overflow-tooltip
></el-table-column>
<!--最新接收时间-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:inspection:table:latestReceiveTime')"
show-overflow-tooltip
></el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/> />
<base-model v-if="patient_model.visible" :config="patient_model">
<template slot="dialog-body">
<SubjectPatientList
@addPatient="addPatient"
:visible.sync="patient_model.visible"
/>
</template>
</base-model>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import confirmVistList from "@/views/trials/trials-inspection/components/confirm-visit-list.vue";
import SubjectPatientList from "./patient-list.vue";
import BaseModel from "@/components/BaseModel";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import {
getTrialSubejctSelectList,
addSubjectPatientBinding,
} from "@/api/inspection.js";
const defaultSearchData = () => {
return {
PatientIdStr: null,
PatientName: null,
CalledAEList: [],
EarliestStudyTime: null,
LatestStudyTime: null,
Asc: false,
SortField: "LatestPushTime",
PageIndex: 1,
PageSize: 20,
};
};
export default { export default {
name: "addSubject", name: "addSubject",
components: { Pagination }, components: { Pagination, confirmVistList, SubjectPatientList, BaseModel },
props: { props: {
visible: { visible: {
require: true, require: true,
@ -187,44 +126,163 @@ export default {
}, },
data() { data() {
return { return {
researchProgramNo: null,
// //
searchData: {}, searchData: defaultSearchData(),
sponsorList: [],
// //
total: 0, total: 0,
loading: false, loading: false,
list: [{ key: 1, IsUrgent: "123" }], list: [],
// //
Patient: {},
status: "trial", // trial visit 访
patient_model: {
visible: false,
title: this.$t("trials:subject:messge:selectPatient"),
width: "1200px",
appendToBody: true,
},
btnLoading: false,
submitMessage: {}, submitMessage: {},
selectPatient: [],
tableSelectData: [],
subjectIdList: [],
rules: { rules: {
subjectId: [ SubjectId: [
{ {
required: true, required: true,
message: this.$t("common:ruleMessage:specify"), message: this.$t("trials:inscept:rules:selectOrInputSubject"),
trigger: "blur", trigger: "change",
}, },
], ],
}, },
}; };
}, },
created() {
this.researchProgramNo = this.$route.query.researchProgramNo;
this.getTrialSubejctSelectList(this.$route.query.trialId);
},
methods: { methods: {
//
delPatient(index) {
this.selectPatient.splice(index, 1);
},
addPatient(item) {
this.selectPatient = item;
},
// //
beforeCloseStudyDig() { beforeCloseStudyDig() {
this.$emit("update:visible", false); this.$emit("update:visible", false);
}, },
// //
addTrials() { async save() {
this.$emit("update:visible", false); try {
this.$emit("handleOpenDialog", {}, "confirm"); if (this.btnLoading) return;
let validate = await this.$refs.addSubjectForm.validate();
if (!validate) return;
if (this.selectPatient.length <= 0)
return this.$message.warning(
this.$t("trials:subject:formatData:notCheckPantient")
);
let data = {
TrialId: this.$route.query.trialId,
PatientIdList: this.selectPatient.map((item) => item.PatientId),
};
if (this.submitMessage.SubjectId.length === 36) {
data.SubjectId = this.submitMessage.SubjectId;
} else {
data.SubjectCode = this.submitMessage.SubjectId;
}
this.btnLoading = true;
let res = await addSubjectPatientBinding(data);
this.btnLoading = false;
if (res.IsSuccess) {
this.submitMessage.SubjectId = res.Result;
this.submitMessage.TrialId = data.TrialId;
this.Patient.PatientId = data.PatientIdList;
this.$message.success(this.$t("common:message:addedSuccessfully"));
this.$emit("getList");
this.status = "visit";
this.$nextTick(() => {
this.$refs.confirmVisit.getList();
this.$refs.confirmVisit.getSubjectVisitSelectList();
});
// this.$emit("update:visible", false);
}
} catch (err) {
this.btnLoading = false;
console.log(err);
}
// this.$emit("update:visible", false);
// this.$emit("handleOpenDialog", {}, "confirm");
},
//
async getTrialSubejctSelectList(id) {
let data = {
TrialId: id,
};
try {
let res = await getTrialSubejctSelectList(data);
if (res.IsSuccess) {
this.subjectIdList = res.Result;
}
} catch (err) {
console.log(err);
}
}, },
// //
getList() {}, async getList() {
let data = {};
Object.keys(this.searchData).forEach((key) => {
data[key] = this.searchData[key];
});
if (this.dateValue[0] && this.dateValue[1]) {
data.EarliestStudyTime = this.dateValue[0].toISOString();
data.LatestStudyTime = this.dateValue[1].toISOString();
} else {
data.EarliestStudyTime = null;
data.LatestStudyTime = null;
}
try {
this.loading = true;
let res = await getPatientInitList(data);
this.loading = false;
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
}
} catch (err) {
this.loading = false;
console.log(err);
}
},
// //
handleSearch() {}, handleSearch() {
this.getList();
},
// //
handleReset() {}, handleReset() {
this.reset();
this.getList();
},
//
reset() {
this.searchData = defaultSearchData();
this.dateValue = [];
this.$refs.addSubjectList.clearSort();
},
// //
handleSelectChange() {}, handleSelectChange(selection) {
this.tableSelectData = selection;
},
//
handleSortByColumn() {
this.searchData.SortField = sort.prop;
if (sort.order === "ascending") this.searchData.Asc = true;
if (sort.order === "descending") this.searchData.Asc = false;
if (!sort.order) this.searchData.SortField = null;
this.getList();
},
}, },
}; };
</script> </script>
@ -234,10 +292,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap;
.topForm { .topForm {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%; width: 100%;
} }
} }
@ -265,4 +321,33 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
} }
.line {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
&::after {
display: block;
content: "";
flex: 1;
height: 1px;
border-top: 1px solid #ddd;
}
}
.selectAndBtn {
width: 100%;
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.patientBox {
display: flex;
align-items: flex-start;
justify-content: space-between;
p {
flex: 1;
padding: 0;
margin: 0;
}
}
</style> </style>

View File

@ -0,0 +1,285 @@
<template>
<el-container class="participant-container">
<el-header style="height: 50px">
<div class="filter-container">
<!-- 患者ID/患者姓名 -->
<span>{{ $t("trials:uploadDicomList:table:pId") }}:</span>
<el-input
v-model="searchData.PatientIdStr"
size="mini"
class="mr"
clearable
/>
<span>{{ $t("trials:uploadDicomList:table:patientName") }}:</span>
<el-input
v-model="searchData.PatientName"
size="mini"
class="mr"
clearable
/>
<!-- DICOM AE -->
<span>{{ $t("trials:inspection:table:DICOMAE") }}:</span>
<el-select
v-model="searchData.CalledAEList"
clearable
multiple
class="mr"
>
<el-option
v-for="(item, index) of dicomAeList"
:key="index"
:label="item"
:value="item"
>
</el-option>
</el-select>
<!-- 查询 -->
<el-button
type="primary"
size="mini"
icon="el-icon-search"
@click="handleSearch"
>
{{ $t("common:button:search") }}
</el-button>
<!-- 重置 -->
<el-button
size="mini"
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
</el-button>
<el-button
type="primary"
size="mini"
style="margin-left: auto"
:disabled="tableSelectData.length === 0"
:loading="btnLoading"
icon="el-icon-plus"
@click="handleAssign"
>
{{ $t("common:button:add") }}
</el-button>
</div>
</el-header>
<el-main>
<div class="data-table">
<el-table
ref="subjectPatientList"
v-loading="loading"
:data="list"
stripe
height="400"
@selection-change="handleSelectChange"
@sort-change="handleSortByColumn"
:default-sort="{ prop: 'LatestPushTime', order: 'descending' }"
>
<el-table-column type="selection" align="center" width="45" />
<el-table-column type="index" width="40" />
<!--患者ID-->
<el-table-column
prop="PatientIdStr"
:label="$t('trials:uploadDicomList:table:pId')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--患者姓名-->
<el-table-column
prop="PatientName"
:label="$t('trials:uploadDicomList:table:patientName')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--出生日期-->
<el-table-column
prop="PatientBirthDate"
:label="$t('trials:inspection:table:birthdate')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--性别-->
<el-table-column
prop="PatientSex"
:label="$t('trials:trials-myinfo:form:gender')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--DICOM AE-->
<el-table-column
prop="CalledAEList"
:label="$t('trials:inspection:table:DICOMAE')"
show-overflow-tooltip
min-width="140"
>
<template slot-scope="scope">
<span
v-for="(item, index) in scope.row.CalledAEList"
:key="`CalledAEList${index}`"
>{{
index === scope.row.CalledAEList.length - 1
? item
: `${item}, `
}}</span
>
</template>
</el-table-column>
<!--最新接收时间-->
<el-table-column
prop="LatestPushTime"
:label="$t('trials:inspection:table:latestReceiveTime')"
show-overflow-tooltip
min-width="140"
sortable="custom"
></el-table-column>
</el-table>
</div>
</el-main>
<div class="pagination" style="text-align: right; margin-top: 5px">
<pagination
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
</div>
</el-container>
</template>
<script>
import Pagination from "@/components/Pagination";
import { getPatientInitList } from "@/api/trials/subject.js";
import { getDicomCalledAEList } from "@/api/dicomAE.js";
const defaultSearchData = () => {
return {
PatientIdStr: null,
PatientName: null,
CalledAEList: [],
ExperimentName: null,
Asc: false,
SortField: "LatestPushTime",
PageIndex: 1,
PageSize: 10,
};
};
export default {
name: "subjectPatientList",
components: { Pagination },
props: {
visible: {
required: true,
default: false,
},
},
data() {
return {
//
searchData: defaultSearchData(),
dicomAeList: [],
//
list: [],
total: 0,
loading: false,
//
tableSelectData: [],
btnLoading: false,
};
},
created() {
this.getList();
this.getDicomCalledAEList();
},
methods: {
//
handleAssign() {
this.$emit("addPatient", this.tableSelectData);
this.beforeCloseStudyDig();
},
//
async getList() {
let data = {};
Object.keys(this.searchData).forEach((key) => {
data[key] = this.searchData[key];
});
data.TrialId = this.$route.query.trialId;
try {
this.loading = true;
let res = await getPatientInitList(data);
this.loading = false;
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
}
} catch (err) {
this.loading = false;
console.log(err);
}
},
//
beforeCloseStudyDig() {
this.$emit("update:visible", false);
},
//
handleSelectChange(selection) {
// console.log(selection);
this.tableSelectData = selection;
},
//
handleSortByColumn(sort) {
this.searchData.SortField = sort.prop;
if (sort.order === "ascending") this.searchData.Asc = true;
if (sort.order === "descending") this.searchData.Asc = false;
if (!sort.order) this.searchData.SortField = null;
this.getList();
},
//
handleSearch() {
this.searchData.PageIndex = 1;
this.getList();
},
//
handleReset() {
this.searchData = defaultSearchData();
this.$refs.subjectPatientList.clearSort();
this.getList();
},
// dicomAE
async getDicomCalledAEList() {
try {
let res = await getDicomCalledAEList();
if (res.IsSuccess) {
this.dicomAeList = res.Result;
}
} catch (err) {
console.log(err);
}
},
},
};
</script>
<style lang="scss" scoped>
.participant-container {
height: 100%;
.el-header {
.filter-container {
display: flex;
align-items: center;
span {
font-size: 13px;
margin-right: 5px;
}
.mr {
margin-right: 5px;
width: 120px;
}
}
}
.el-main {
padding: 0px;
}
.el-footer {
padding: 0 20px;
}
}
</style>

View File

@ -5,20 +5,24 @@
<el-form :inline="true"> <el-form :inline="true">
<!-- 受试者编号 --> <!-- 受试者编号 -->
<el-form-item :label="$t('trials:crcQuestion:table:subjectId')"> <el-form-item :label="$t('trials:crcQuestion:table:subjectId')">
<el-input v-model="searchData.Code" style="width: 130px" /> <el-input v-model="searchData.Code" style="width: 130px" clearable />
</el-form-item> </el-form-item>
<!-- 患者编号 --> <!-- 患者编号 -->
<el-form-item :label="$t('trials:uploadDicomList:table:pId')"> <!-- <el-form-item :label="$t('trials:uploadDicomList:table:pId')">
<el-input v-model="searchData.Code" style="width: 130px" />
</el-form-item>
<!-- 患者姓名 -->
<el-form-item :label="$t('trials:uploadDicomList:table:patientName')">
<el-input v-model="searchData.Code" style="width: 130px" /> <el-input v-model="searchData.Code" style="width: 130px" />
</el-form-item> -->
<!-- 姓名 -->
<el-form-item :label="$t('trials:researchStaff:table:Name')">
<el-input
v-model="searchData.ShortName"
style="width: 130px"
clearable
/>
</el-form-item> </el-form-item>
<!-- 性别 --> <!-- 性别 -->
<el-form-item :label="$t('trials:trials-myinfo:form:gender')"> <el-form-item :label="$t('trials:trials-myinfo:form:gender')">
<el-select <el-select
v-model="searchData.SiteId" v-model="searchData.Sex"
clearable clearable
filterable filterable
style="width: 130px" style="width: 130px"
@ -87,7 +91,9 @@
stripe stripe
height="100" height="100"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
:default-sort="{ prop: 'CreateTime', order: 'descending' }"
> >
<el-table-column type="index" width="40" />
<!-- 受试者编号 --> <!-- 受试者编号 -->
<el-table-column <el-table-column
prop="Code" prop="Code"
@ -97,49 +103,61 @@
/> />
<!-- 患者编号 --> <!-- 患者编号 -->
<el-table-column <el-table-column
prop="Code" prop="PatientList.PatientIdStr"
:label="$t('trials:uploadDicomList:table:pId')" :label="$t('trials:uploadDicomList:table:pId')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" >
/> <template slot-scope="scope">
<!-- 患者姓名 --> <span
v-for="(item, index) in scope.row.PatientList"
:key="`${item.PatientId}${index}`"
>
{{
index === scope.row.PatientList.length - 1
? item.PatientIdStr
: `${item.PatientIdStr}, `
}}
</span>
</template>
</el-table-column>
<!-- 姓名 -->
<el-table-column <el-table-column
prop="Code" prop="ShortName"
:label="$t('trials:uploadDicomList:table:patientName')" :label="$t('trials:researchStaff:table:Name')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<!-- 性别 --> <!-- 性别 -->
<el-table-column <el-table-column
prop="Code" prop="Sex"
:label="$t('trials:trials-myinfo:form:gender')" :label="$t('trials:trials-myinfo:form:gender')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<!-- 出生日期 --> <!-- 出生日期 -->
<el-table-column <el-table-column
prop="Code" prop="BirthDate"
:label="$t('trials:inspection:table:birthdate')" :label="$t('trials:inspection:table:birthdate')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<!-- 年龄 --> <!-- 年龄 -->
<el-table-column <el-table-column
prop="Code" prop="Age"
:label="$t('trials:subject:table:age')" :label="$t('trials:subject:table:age')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<!-- 总访视量 --> <!-- 总访视量 -->
<el-table-column <el-table-column
prop="Code" prop="VisitCount"
:label="$t('trials:subject:table:totalVisitCount')" :label="$t('trials:subject:table:totalVisitCount')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<!-- 最新检查访视 --> <!-- 最新检查访视 -->
<el-table-column <el-table-column
prop="Code" prop="LatestVisitName"
:label="$t('trials:subject:table:latestStudiesVisitName')" :label="$t('trials:subject:table:latestStudiesVisitName')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
@ -162,7 +180,7 @@
</el-table-column> </el-table-column>
<!-- 创建日期 --> <!-- 创建日期 -->
<el-table-column <el-table-column
prop="Code" prop="CreateTime"
:label="$t('trials:trials-list:table:createDate')" :label="$t('trials:trials-list:table:createDate')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
@ -202,7 +220,7 @@
circle circle
:title="$t('trials:subject:action:delete')" :title="$t('trials:subject:action:delete')"
icon="el-icon-delete" icon="el-icon-delete"
:disabled="scope.row.StudyCount > 0" :disabled="scope.row.PatientList.length <= 0"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
/> />
</template> </template>
@ -251,55 +269,35 @@
@getList="getList" @getList="getList"
/> />
</el-dialog> </el-dialog>
<!-- 修改受试者状态 -->
<el-dialog
v-if="MessageVisible"
:visible.sync="MessageVisible"
: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"
/>
</el-dialog>
<!--添加受试者--> <!--添加受试者-->
<addSubject <addSubject
v-if="addSubjectTrialsVisible"
:visible.sync="addSubjectTrialsVisible" :visible.sync="addSubjectTrialsVisible"
@handleOpenDialog="handleOpenDialog" @handleOpenDialog="handleOpenDialog"
@getList="getList"
/> />
<!--确认访视-->
<!-- <confirmVisitList :visible.sync="confirmTrialsVisible" /> -->
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
import { import { getTrialSiteSelect, deleteSubject } from "@/api/trials";
getTrialSiteSelect, import { getPatientSubejctList } from "@/api/trials/subject";
getSubjectList,
deleteSubject,
} from "@/api/trials";
import { getSubjectList_Export } from "@/api/export"; import { getSubjectList_Export } from "@/api/export";
import BaseContainer from "@/components/BaseContainer"; import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination"; 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 moment from "moment";
import addSubject from "./components/add-subject.vue"; import addSubject from "./components/add-subject.vue";
// import confirmVisitList from "../../../trials-inspection/components/confirm-visit-list.vue"; // import confirmVisitList from "../../../trials-inspection/components/confirm-visit-list.vue";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
Code: "", Code: "",
Status: "", Status: "",
SiteId: "", Sex: "",
ShortName: "", ShortName: "",
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: false,
SortField: "CreateTime",
}; };
}; };
export default { export default {
@ -309,29 +307,19 @@ export default {
Pagination, Pagination,
SubjectsForm, SubjectsForm,
SubjectStatusForm, SubjectStatusForm,
MessageTable,
addSubject, addSubject,
confirmVisitList,
}, },
data() { data() {
return { return {
moment,
MessageVisible: false,
model_cfg: { visible: false, showClose: true, width: "700px", title: "" },
searchData: searchDataDefault(), searchData: searchDataDefault(),
loading: false, loading: false,
list: [], list: [],
total: 0, total: 0,
siteOptions: [],
visitPlanConfirmed: false,
rowData: {}, rowData: {},
userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
otherInfo: {}, otherInfo: {},
editDialog: { title: "", visible: false }, editDialog: { title: "", visible: false },
statusVisible: false, statusVisible: false,
trialId: "", trialId: "",
hasCrcRoute: false,
hasQCRoute: false,
// //
addSubjectTrialsVisible: false, addSubjectTrialsVisible: false,
// 访 // 访
@ -346,23 +334,10 @@ export default {
}, },
}, },
mounted() { mounted() {
const trialsRouter = this.$store.getters.routes.find((r) => {
return r.name === "Trials";
});
const trialsPanelRouter = trialsRouter.children.find((r) => {
return r.name === "TrialsPanel";
}).children;
this.hasCrcRoute = this.hasRoute("crc-upload", trialsPanelRouter);
this.hasQCRoute = this.hasRoute("qc-check", trialsPanelRouter);
this.trialId = this.$route.query.trialId; this.trialId = this.$route.query.trialId;
this.getSite();
this.getList(); this.getList();
}, },
methods: { methods: {
handleMessage(row) {
this.rowData = { ...row };
this.MessageVisible = true;
},
handleExport() { handleExport() {
getSubjectList_Export(this.searchData) getSubjectList_Export(this.searchData)
.then((res) => {}) .then((res) => {})
@ -371,20 +346,25 @@ export default {
}); });
}, },
// //
getList() { async getList() {
this.loading = true; let data = {};
this.searchData.TrialId = this.$route.query.trialId; Object.keys(this.searchData).forEach((key) => {
getSubjectList(this.searchData) data[key] = this.searchData[key];
.then((res) => { });
this.loading = false; data.TrialId = this.$route.query.trialId;
try {
this.loading = true;
let res = await getPatientSubejctList(data);
this.loading = false;
if (res.IsSuccess) {
this.list = res.Result.CurrentPageData; this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount; this.total = res.Result.TotalCount;
this.otherInfo = res.OtherInfo; this.otherInfo = res.OtherInfo;
this.visitPlanConfirmed = res.OtherInfo.VisitPlanConfirmed; }
}) } catch (err) {
.catch(() => { this.loading = false;
this.loading = false; console.log(err);
}); }
}, },
// //
// //
@ -424,20 +404,6 @@ export default {
}); });
}); });
}, },
//
handleAudit(row) {
const routeData = this.$router.resolve({
path: "/audit",
query: {
Id: row.TrialId,
Code: this.$route.query.trialCode,
SubName: row.Name,
SubId: row.Id,
Type: 2,
},
});
window.open(routeData.href, "_blank");
},
// //
handleSearch() { handleSearch() {
this.searchData.PageIndex = 1; this.searchData.PageIndex = 1;
@ -456,15 +422,9 @@ export default {
this.searchData.Asc = false; this.searchData.Asc = false;
} }
this.searchData.SortField = column.prop; this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1; // this.searchData.PageIndex = 1;
this.getList(); this.getList();
}, },
// site
getSite() {
getTrialSiteSelect(this.trialId).then((res) => {
this.siteOptions = res.Result;
});
},
// //
handleEditStatus(row) { handleEditStatus(row) {
this.rowData = { ...row }; this.rowData = { ...row };
@ -474,31 +434,6 @@ export default {
closeStatusDialog() { closeStatusDialog() {
this.statusVisible = false; this.statusVisible = false;
}, },
handleTotalVisitCount(subjectCode) {
if (this.hasCrcRoute) {
this.$router.push({
path: `/trials/trials-panel/visit/crc-upload?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&subjectCode=${subjectCode}`,
});
} else if (this.hasQCRoute) {
this.$router.push({
path: `/trials/trials-panel/visit/qc-check?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&subjectCode=${subjectCode}`,
});
}
},
hasRoute(name, routeList) {
for (let i = 0; i < routeList.length; i++) {
if (routeList[i].name === name) {
return true;
}
if (routeList[i].children) {
const flag = this.hasRoute(name, routeList[i].children);
if (flag) {
return flag;
}
}
}
return false;
},
}, },
}; };
</script> </script>

View File

@ -5,9 +5,14 @@
<el-form :inline="true"> <el-form :inline="true">
<!-- 中心编号 --> <!-- 中心编号 -->
<el-form-item :label="$t('trials:dicomForward:table:siteId')"> <el-form-item :label="$t('trials:dicomForward:table:siteId')">
<el-select v-model="searchData.SiteId" clearable filterable style="width:120px;"> <el-select
v-model="searchData.SiteId"
clearable
filterable
style="width: 120px"
>
<el-option <el-option
v-for="(item,index) of siteOptions" v-for="(item, index) of siteOptions"
:key="index" :key="index"
:label="item.TrialSiteCode" :label="item.TrialSiteCode"
:value="item.SiteId" :value="item.SiteId"
@ -16,13 +21,16 @@
</el-form-item> </el-form-item>
<!-- 受试者信息 --> <!-- 受试者信息 -->
<el-form-item :label="$t('trials:dicomForward:table:subjectId')"> <el-form-item :label="$t('trials:dicomForward:table:subjectId')">
<el-input v-model="searchData.SubjectInfo" style="width:100px;" /> <el-input v-model="searchData.SubjectInfo" style="width: 100px" />
</el-form-item> </el-form-item>
<!-- 访视名称 --> <!-- 访视名称 -->
<el-form-item class="my_multiple" :label="$t('trials:dicomForward:tableon:visitName')"> <el-form-item
class="my_multiple"
:label="$t('trials:dicomForward:tableon:visitName')"
>
<el-select <el-select
v-model="searchData.VisitPlanArray" v-model="searchData.VisitPlanArray"
style="width:140px" style="width: 140px"
clearable clearable
multiple multiple
> >
@ -34,31 +42,47 @@
> >
<span style="float: left">{{ item.VisitName }}</span> <span style="float: left">{{ item.VisitName }}</span>
</el-option> </el-option>
<el-option <el-option key="Other" label="Out of Plan" value="1.11" />
key="Other"
label="Out of Plan"
value="1.11"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 转发状态 --> <!-- 转发状态 -->
<el-form-item :label="$t('trials:dicomForward:table:forwardStatus')"> <el-form-item :label="$t('trials:dicomForward:table:forwardStatus')">
<el-select v-model="searchData.ForwardState" clearable style="width:120px"> <el-select
<el-option v-for="item of $d.ForwardStateEnum" v-if="item.value !== 0" :value="item.value" :label="item.label" /> v-model="searchData.ForwardState"
clearable
style="width: 120px"
>
<template v-for="item of $d.ForwardStateEnum">
<el-option
v-if="item.value !== 0"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }} {{ $t("common:button:search") }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset"> <el-button
{{ $t('common:button:reset') }} type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
</el-button> </el-button>
<!-- 批量转发 --> <!-- 批量转发 -->
<el-button :disabled="loading || selectArr.length === 0" type="primary" icon="el-icon-document-copy" @click="handleBulkForward"> <el-button
{{ $t('trials:dicomForward:action:forward') }} :disabled="loading || selectArr.length === 0"
type="primary"
icon="el-icon-document-copy"
@click="handleBulkForward"
>
{{ $t("trials:dicomForward:action:forward") }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -69,14 +93,19 @@
<el-table <el-table
ref="forwardList" ref="forwardList"
v-loading="loading" v-loading="loading"
v-adaptive="{bottomOffset:60}" v-adaptive="{ bottomOffset: 60 }"
:data="list" :data="list"
stripe stripe
height="100" height="100"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" align="left" width="45" :selectable="handleSelectTable" /> <el-table-column
type="selection"
align="left"
width="45"
:selectable="handleSelectTable"
/>
<!-- 中心编号 --> <!-- 中心编号 -->
<el-table-column <el-table-column
prop="TrialSiteCode" prop="TrialSiteCode"
@ -110,10 +139,20 @@
sortable="custom" sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.ForwardState*1 === 0">--</span> <span v-if="scope.row.ForwardState * 1 === 0">--</span>
<el-tag v-else-if="scope.row.ForwardState*1 === 14" type="warning">{{ $fd('ForwardStateEnum', scope.row.ForwardState*1) }}</el-tag> <el-tag
<el-tag v-else-if="scope.row.ForwardState*1 === 15">{{ $fd('ForwardStateEnum', scope.row.ForwardState*1) }}</el-tag> v-else-if="scope.row.ForwardState * 1 === 14"
<el-tag v-else-if="scope.row.ForwardState*1 === 16" type="danger">{{ $fd('ForwardStateEnum', scope.row.ForwardState*1) }}</el-tag> type="warning"
>{{ $fd("ForwardStateEnum", scope.row.ForwardState * 1) }}</el-tag
>
<el-tag v-else-if="scope.row.ForwardState * 1 === 15">{{
$fd("ForwardStateEnum", scope.row.ForwardState * 1)
}}</el-tag>
<el-tag
v-else-if="scope.row.ForwardState * 1 === 16"
type="danger"
>{{ $fd("ForwardStateEnum", scope.row.ForwardState * 1) }}</el-tag
>
</template> </template>
</el-table-column> </el-table-column>
<!-- 转发人 --> <!-- 转发人 -->
@ -148,32 +187,42 @@
:disabled="scope.row.ForwardState === 15" :disabled="scope.row.ForwardState === 15"
@click="handleForward(scope.row)" @click="handleForward(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>
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
import { getTrialSiteSelect, getTrialVisitStageSelect, getForwardList, forwardSVDicomImage } from '@/api/trials' import {
import BaseContainer from '@/components/BaseContainer' getTrialSiteSelect,
import Pagination from '@/components/Pagination' getTrialVisitStageSelect,
getForwardList,
forwardSVDicomImage,
} from "@/api/trials";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
SiteId: '', SiteId: "",
SubjectInfo: '', SubjectInfo: "",
VisitPlanArray: [], VisitPlanArray: [],
ForwardState: null, ForwardState: null,
PageIndex: 1, PageIndex: 1,
PageSize: 20 PageSize: 20,
} };
} };
export default { export default {
name: 'ForwardList', name: "ForwardList",
components: { BaseContainer, Pagination }, components: { BaseContainer, Pagination },
data() { data() {
return { return {
@ -181,109 +230,120 @@ export default {
total: 0, total: 0,
list: [], list: [],
loading: false, loading: false,
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1, userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
userId: zzSessionStorage.getItem('userId'), userId: zzSessionStorage.getItem("userId"),
siteOptions: [], siteOptions: [],
visitPlanOptions: [], visitPlanOptions: [],
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
selectArr: [] selectArr: [],
} };
}, },
mounted() { mounted() {
this.getList() this.getList();
this.getSite() this.getSite();
this.getVisitPlanOptions() this.getVisitPlanOptions();
}, },
methods: { methods: {
// qc // qc
getList() { getList() {
this.loading = true this.loading = true;
this.searchData.TrialId = this.trialId this.searchData.TrialId = this.trialId;
getForwardList(this.searchData).then(res => { getForwardList(this.searchData)
this.loading = false .then((res) => {
this.list = res.Result.CurrentPageData this.loading = false;
this.total = res.Result.TotalCount this.list = res.Result.CurrentPageData;
}).catch(() => { this.loading = false }) this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
}, },
// //
handleForward(row) { handleForward(row) {
this.$confirm(this.$t('trials:dicomForward:message:sureToForward'), { this.$confirm(this.$t("trials:dicomForward:message:sureToForward"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
this.forward([row.Id]) this.forward([row.Id]);
}).catch(() => {}) })
.catch(() => {});
}, },
// //
handleBulkForward() { handleBulkForward() {
this.$confirm(this.$t('trials:dicomForward:message:sureToForward'), { this.$confirm(this.$t("trials:dicomForward:message:sureToForward"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
this.forward(this.selectArr) this.forward(this.selectArr);
}).catch(() => {}) })
.catch(() => {});
}, },
// //
forward(arr) { forward(arr) {
this.loading = true this.loading = true;
forwardSVDicomImage(this.trialId, arr).then(res => { forwardSVDicomImage(this.trialId, arr)
this.loading = false .then((res) => {
this.$message.success(this.$t('trials:dicomForward:message:forwardSuccessfully')) this.loading = false;
this.getList() this.$message.success(
}).catch(() => { this.loading = false }) this.$t("trials:dicomForward:message:forwardSuccessfully")
);
this.getList();
})
.catch(() => {
this.loading = false;
});
}, },
// //
handleSelectionChange(val) { handleSelectionChange(val) {
const arr = [] const arr = [];
for (let index = 0; index < val.length; index++) { for (let index = 0; index < val.length; index++) {
arr.push(val[index].Id) arr.push(val[index].Id);
} }
this.selectArr = arr this.selectArr = arr;
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault();
this.getList() this.getList();
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.forwardList.clearSort() this.$refs.forwardList.clearSort();
}) });
}, },
// //
handleSearch() { handleSearch() {
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
// //
handleSortByColumn(column) { handleSortByColumn(column) {
if (column.order === 'ascending') { if (column.order === "ascending") {
this.searchData.Asc = true this.searchData.Asc = true;
} else { } else {
this.searchData.Asc = false this.searchData.Asc = false;
} }
this.searchData.SortField = column.prop this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
// CheckBox // CheckBox
handleSelectTable(row) { handleSelectTable(row) {
return row.ForwardState * 1 !== 15 return row.ForwardState * 1 !== 15;
}, },
// site // site
getSite() { getSite() {
getTrialSiteSelect(this.trialId).then(res => { getTrialSiteSelect(this.trialId).then((res) => {
this.siteOptions = res.Result this.siteOptions = res.Result;
}) });
}, },
// 访 // 访
getVisitPlanOptions() { getVisitPlanOptions() {
getTrialVisitStageSelect(this.trialId) getTrialVisitStageSelect(this.trialId).then((res) => {
.then((res) => { this.visitPlanOptions = res.Result;
this.visitPlanOptions = res.Result });
}) },
} },
} };
}
</script> </script>