加入项目接口对接调试 第二版

main
wangxiaoshuang 2024-03-28 16:43:22 +08:00
parent 4924ad268c
commit 6c0423e659
8 changed files with 833 additions and 430 deletions

View File

@ -19,6 +19,15 @@ export function getPatientJoinTrialInitList(data) {
}) })
} }
// 检查->患者可加入项目列表(下拉选框)
export function getPatientJoinTrialInitSelectList(data) {
return request({
url: '/Patient/getPatientJoinTrialInitSelectList',
method: 'post',
data
})
}
// 检查->患者已加入项目列表 // 检查->患者已加入项目列表
export function getPatientJoinedTrialList(data) { export function getPatientJoinedTrialList(data) {
return request({ return request({
@ -62,4 +71,49 @@ export function getPatientStudyList(data) {
method: 'post', method: 'post',
data data
}) })
}
// 绑定访视->获取患者检查列表
export function getVisitPatientStudyList(data) {
return request({
url: '/Patient/getVisitPatientStudyList',
method: 'post',
data
})
}
// 绑定访视->获取已存在的访视
export function getSubjectVisitSelectList(data) {
return request({
url: '/Patient/getSubjectVisitSelectList',
method: 'post',
data
})
}
// 绑定访视->添加或更新访视
export function addOrUpdateSubjectVisit(data) {
return request({
url: '/Patient/addOrUpdateSubjectVisit',
method: 'post',
data
})
}
// 绑定访视->确认患者与访视关系
export function addSubjectPatientStudyBinding(data) {
return request({
url: '/Patient/addSubjectPatientStudyBinding',
method: 'post',
data
})
}
// 绑定访视->提交患者与访视关系
export function submitVisitStudyBinding(data) {
return request({
url: '/Patient/submitVisitStudyBinding',
method: 'post',
data
})
} }

View File

@ -12,79 +12,88 @@
}}{{ Patient.PatientIdStr }}{{ Patient.PatientName }}</span }}{{ Patient.PatientIdStr }}{{ Patient.PatientName }}</span
> >
<div class="top"> <div class="top">
<p class="line">{{ $t("trials:inspection:message:checkAddTrials") }}</p>
<el-form <el-form
ref="submitMessageForm" ref="submitMessageForm"
:inline="true" :inline="true"
:model="submitMessage" :model="submitMessage"
class="demo-form-inline" class="demo-form-inline"
:rules="rules" :rules="rules"
label-width="100px"
> >
<!--受试者编号--> <div>
<el-form-item <!--项目-->
:label="$t('trials:crcQuestion:table:subjectId')"
prop="SubjectId"
>
<el-select
v-model="submitMessage.SubjectId"
filterable
allow-create
default-first-option
clearable
>
<el-option
v-for="item in subjectIdList"
:key="item.SubejctId"
:label="item.SubjectCode"
:value="item.SubejctId"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="search">
<p>{{ $t("trials:inspection:message:checkAddTrials") }}</p>
<div class="form">
<el-form :inline="true" class="base-search-form">
<!-- 项目类型 -->
<el-form-item <el-form-item
class="my_multiple" :label="$t('trials:workbench:label:trialsStats')"
:label="$t('trials:trials-list:form:trialType')" prop="TrialId"
>
<trialsSelect
:options="trialList"
:data.sync="submitMessage"
:status="status"
/>
</el-form-item>
</div>
<div class="selectAndBtn">
<!--受试者编号-->
<el-form-item
:label="$t('trials:crcQuestion:table:subjectId')"
prop="SubjectId"
> >
<el-select <el-select
v-model="searchData.TrialType" v-model="submitMessage.SubjectId"
filterable
allow-create
default-first-option
clearable clearable
style="width: 140px" :disabled="status === 'visit' || !submitMessage.TrialId"
> >
<el-option <el-option
v-for="item of $d.TrialType" v-for="item in subjectIdList"
:key="item.id" :key="item.SubejctId"
:label="item.label" :label="item.SubjectCode"
:value="item.value" :value="item.SubejctId"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 研究方案编号 --> <div class="btnBox">
<el-form-item :label="$t('trials:trials-list:table:researchNumber')"> <!--确认添加按钮-->
<el-input <el-button
v-model="searchData.ResearchProgramNo" type="primary"
style="width: 100px" v-if="status === 'trial'"
/> @click="addTrials"
</el-form-item> :loading="btnLoading"
<!-- 研究名称 --> >
<el-form-item :label="$t('trials:trials-list:table:researchName')"> {{ $t("trials:addRP:button:confirmAddPR") }}
<el-input </el-button>
v-model="searchData.ExperimentName" <!--移除按钮-->
style="width: 100px" <el-button
/> type="primary"
</el-form-item> v-else
<!-- 申办方 --> @click="remove"
<el-form-item :loading="btnLoading"
class="my_multiple" >
:label="$t('trials:trials-list:table:sponsor')" {{ $t("common:button:remove") }}
> </el-button>
<el-input v-model="searchData.SponsorName" style="width: 100px" /> </div>
</div>
</el-form>
</div>
<div class="search">
<p class="line">{{ $t("trials:inspection:message:confirmVisit") }}</p>
<div class="form">
<el-form :inline="true" class="base-search-form">
<!-- 检查日期 -->
<el-form-item :label="$t('trials:uploadedDicoms:table:studyDate')">
<el-date-picker
v-model="dateValue"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
@ -105,89 +114,108 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button type="primary" @click="addTrials" :loading="btnLoading"> <div class="buttonBox" v-if="status === 'visit'">
{{ $t("trials:addRP:button:confirmAddPR") }} <!--确认-->
</el-button> <el-button
type="primary"
:loading="btnLoading2"
@click="confirm"
v-if="visitStatus === 'confirm'"
>
{{ $t("trials:seletctedReviews:timeline:confirmation") }}
</el-button>
<!--确认提交-->
<el-button
type="primary"
:loading="btnLoading2"
@click="confirmSubmit"
v-if="visitStatus === 'submit'"
>
{{ $t("trials:inspection:button:confirmAndSubmit") }}
</el-button>
</div>
</div> </div>
</div> </div>
<!--可加入项目列表--> <!--可加入项目列表-->
<!--:header-cell-style="{ background: '#f9f9f9' }"--> <!--:header-cell-style="{ background: '#f9f9f9' }"-->
<el-table <el-table
ref="addTrialsList" ref="confirmVisitList"
v-loading="loading" v-loading="loading"
v-adaptive="{ bottomOffset: 60 }" v-adaptive="{ bottomOffset: 60 }"
:data="list" :data="list"
stripe stripe
height="100" height="100"
@selection-change="handleSelectChange" @selection-change="handleSelectChange"
@sort-change="handleSortByColumn"
:default-sort="{ prop: 'StudyTime', order: 'descending' }"
> >
<el-table-column <el-table-column type="selection" align="center" width="45" />
type="selection" <el-table-column type="index" width="40" />
align="center" <!--检查描述-->
width="45"
:selectable="
(row, index) =>
!tableSelectData.TrialId || tableSelectData.TrialId === row.TrialId
"
/>
<!--项目类型-->
<el-table-column <el-table-column
align="center" align="center"
prop="TrialType" prop="Description"
:label="$t('trials:trials-list:form:trialType')" :label="$t('trials:inspection:table:studyDescription')"
show-overflow-tooltip show-overflow-tooltip
min-width="140" min-width="140"
></el-table-column>
<!--检查类型-->
<el-table-column
align="center"
prop="Modalities"
:label="$t('trials:audit:table:modality')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--序列数-->
<el-table-column
align="center"
prop="SeriesCount"
:label="$t('trials:audit:table:seriesCount')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--检查日期-->
<el-table-column
align="center"
prop="StudyTime"
:label="$t('trials:audit:table:studyDate')"
show-overflow-tooltip
min-width="140"
sortable="custom"
></el-table-column>
<!--操作-->
<el-table-column
:label="$t('common:action:action')"
width="300"
class-name="actionBox"
> >
<template slot-scope="scope" v-for="item of $d.TrialType"> <template slot-scope="scope">
<!-- <span>{{ <!--切换访视-->
$d.TrialType.filter((item) => item.value == scope.row.TrialType)[0] <el-select
.label v-model="scope.row.SubjectVisitId"
}}</span> --> placeholder="请选择"
<span :key="item.id" v-if="item.value === scope.row.TrialType">{{ @visible-change="selectChange"
item.label >
}}</span> <el-option
v-for="item in visitList"
:key="item.SubjectVisitId"
:label="item.VisitName"
:value="item.SubjectVisitId"
/>
<p class="addVisit" @click.stop="addVisit">
<i class="el-icon-plus" v-loading="addLoading"></i>
</p>
</el-select>
<!-- 详情 -->
<el-button
type="text"
@click.stop="detail(scope.row)"
class="detail"
>{{ $t("trials:trials-list:action:panel") }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<!--研究方案号-->
<el-table-column
align="center"
prop="ResearchProgramNo"
:label="$t('trials:trials-list:table:researchNumber')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--研究名称-->
<el-table-column
align="center"
prop="ExperimentName"
:label="$t('trials:trials-list:table:researchName')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--申办方-->
<el-table-column
align="center"
prop="SponsorName"
:label="$t('trials:trials-list:table:sponsor')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--状态-->
<el-table-column
align="center"
prop="TrialStatusStr"
:label="$t('trials:trials-list:table:status')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--创建日期-->
<el-table-column
align="center"
prop="CreateTime"
:label="$t('trials:trials-list:table:createDate')"
show-overflow-tooltip
min-width="140"
></el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
@ -202,14 +230,21 @@
</template> </template>
<script> <script>
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import trialsSelect from "./trials-select.vue";
import { import {
getPatientJoinTrialInitList, getPatientJoinTrialInitSelectList,
getTrialSubejctSelectList, getTrialSubejctSelectList,
addSubjectPatientBinding, addSubjectPatientBinding,
deleteSubjectPatientBinding,
getVisitPatientStudyList,
getSubjectVisitSelectList,
addOrUpdateSubjectVisit,
addSubjectPatientStudyBinding,
submitVisitStudyBinding,
} from "@/api/inspection.js"; } from "@/api/inspection.js";
export default { export default {
name: "addTrialsList", name: "addTrialsList",
components: { Pagination }, components: { Pagination, trialsSelect },
props: { props: {
visible: { visible: {
require: true, require: true,
@ -225,28 +260,46 @@ export default {
data() { data() {
return { return {
// //
dateValue: [],
searchData: { searchData: {
ExperimentName: null, // EarliestStudyTime: null,
ResearchProgramNo: null, // LatestStudyTime: null,
TrialType: null, // Asc: false,
SponsorName: null, // SortField: "StudyTime",
Asc: true,
SortField: null,
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
}, },
// // 访
total: 0, total: 0,
loading: false, loading: false,
list: [], list: [
// {
SeriesCount: 1,
},
{
SeriesCount: 1,
},
],
visitList: [],
visitRule: {},
addLoading: false,
//
status: "trial", // trial visit 访
trialList: [],
btnLoading: false, btnLoading: false,
tableSelectData: {}, //
submitMessage: { submitMessage: {
SubjectId: null, SubjectId: null,
TrialId: null,
}, },
subjectIdList: [], // subjectIdList: [], //
rules: { rules: {
TrialId: [
{
required: true,
message: this.$t("trials:inspection:message:checkAddTrials"),
trigger: "change",
},
],
SubjectId: [ SubjectId: [
{ {
required: true, required: true,
@ -255,21 +308,22 @@ export default {
}, },
], ],
}, },
// 访
tableSelectData: [], //
btnLoading2: false,
visitStatus: "confirm", // 访 confirm submit
}; };
}, },
created() {
this.getTrialList();
},
watch: { watch: {
visible() { "submitMessage.TrialId": {
if (this.visible) {
this.getList();
} else {
this.btnLoading = false;
this.submitMessage.SubjectId = null;
}
},
"tableSelectData.TrialId": {
handler() { handler() {
if (this.tableSelectData.TrialId) { if (this.submitMessage.TrialId) {
this.getTrialSubejctSelectList(this.tableSelectData.TrialId); this.getTrialSubejctSelectList(this.submitMessage.TrialId);
} else {
this.subjectIdList = [];
} }
}, },
}, },
@ -300,12 +354,8 @@ export default {
try { try {
let validate = await this.$refs.submitMessageForm.validate(); let validate = await this.$refs.submitMessageForm.validate();
if (!validate) return; if (!validate) return;
if (!this.tableSelectData.TrialId)
return this.$message.warning(
this.$t("trials:inspection:message:notJionTrial")
);
let data = { let data = {
TrialId: this.tableSelectData.TrialId, TrialId: this.submitMessage.TrialId,
PatientIdList: [this.Patient.PatientId], PatientIdList: [this.Patient.PatientId],
}; };
if (this.submitMessage.SubjectId.length === 36) { if (this.submitMessage.SubjectId.length === 36) {
@ -317,24 +367,115 @@ export default {
let res = await addSubjectPatientBinding(data); let res = await addSubjectPatientBinding(data);
this.btnLoading = false; this.btnLoading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
let obj = JSON.parse(JSON.stringify(this.tableSelectData)); this.$message.success(this.$t("common:message:addedSuccessfully"));
this.$emit("update:visible", false); this.status = "visit";
this.$emit("handleOpenDialog", obj, "confirm"); this.$emit("getList");
this.getList();
this.getSubjectVisitSelectList();
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err);
} }
}, },
//
async remove() {
try {
let confirm = await this.$confirm(
this.$t("trials:sitesList:message:removeSite"),
{
type: "warning",
distinguishCancelAndClose: true,
confirmButtonText: this.$t("common:button:confirm"),
cancelButtonText: this.$t("recompose:button:cancel"),
}
);
if (confirm !== "confirm") return;
let params = {
PatientId: this.Patient.PatientId,
SubjectId: this.submitMessage.SubjectId,
};
this.btnLoading = true;
let res = await deleteSubjectPatientBinding(params);
this.btnLoading = false;
if (res.IsSuccess) {
this.reset();
this.list = [];
this.status = "trial";
this.$message.success(this.$t("common:message:removedSuccessfully"));
this.$emit("getList");
}
} catch (err) {
console.log(err);
}
},
// 访
selectChange(flag) {
if (flag) {
this.getSubjectVisitSelectList();
}
},
// 访
async getSubjectVisitSelectList() {
let data = {
TrialId: this.submitMessage.TrialId,
SubjectId: this.submitMessage.SubjectId,
};
try {
let res = await getSubjectVisitSelectList(data);
if (res.IsSuccess) {
this.visitRule = res.OtherInfo;
this.visitList = res.Result.map((item) => {
item.SubjectVisitId = item.Id;
return item;
});
}
} catch (err) {
console.log(err);
}
},
// 访
async addVisit() {
let data = {
TrialId: this.submitMessage.TrialId,
SubjectId: this.submitMessage.SubjectId,
};
data.VisitNum = this.visitList.length;
data.VisitName =
this.visitRule.BlindFollowUpPrefix + " " + this.visitList.length;
try {
this.addLoading = true;
let res = await addOrUpdateSubjectVisit(data);
this.addLoading = false;
if (res.IsSuccess) {
this.getSubjectVisitSelectList();
}
} catch (err) {
this.addLoading = false;
console.log(err);
}
},
// //
async getList() { async getList() {
if (this.status === "trial")
return this.$message.warning(
this.$t("trials:inspection:message:checkAddTrials")
);
let data = {}; let data = {};
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.PatientId = this.Patient.PatientId;
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;
}
data.TrialId = this.submitMessage.TrialId;
try { try {
this.loading = true; this.loading = true;
let res = await getPatientJoinTrialInitList(data); let res = await getVisitPatientStudyList(data);
this.loading = false; this.loading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
this.list = res.Result.CurrentPageData; this.list = res.Result.CurrentPageData;
@ -344,26 +485,44 @@ export default {
console.log(err); console.log(err);
} }
}, },
//
async getTrialList() {
let data = {};
data.PatientId = this.Patient.PatientId;
try {
let res = await getPatientJoinTrialInitSelectList(data);
if (res.IsSuccess) {
this.trialList = res.Result;
}
} catch (err) {
console.log(err);
}
},
// //
handleSearch() { handleSearch() {
this.getList(); this.getList();
}, },
// //
handleReset() { handleReset() {
this.reset();
this.getList();
},
//
reset() {
Object.keys(this.searchData).forEach((key) => { Object.keys(this.searchData).forEach((key) => {
this.searchData[key] = null; this.searchData[key] = null;
}); });
this.searchData.PageIndex = 1; this.searchData.PageIndex = 1;
this.searchData.PageSize = 20; this.searchData.PageSize = 20;
this.searchData.Asc = true; this.searchData.Asc = false;
this.$refs.addTrialsList.clearSort(); this.SortField.Asc = "StudyTime";
this.getList(); this.dateValue = [];
this.$refs.confirmVisitList.clearSort();
}, },
// //
handleSelectChange(selection) { handleSelectChange(selection) {
console.log(selection); // console.log(selection);
this.tableSelectData = selection[0]; this.tableSelectData = selection;
if (!selection[0]) this.tableSelectData = {};
}, },
// //
handleSortByColumn(sort) { handleSortByColumn(sort) {
@ -373,6 +532,80 @@ export default {
if (!sort.order) this.searchData.SortField = null; if (!sort.order) this.searchData.SortField = null;
this.getList(); this.getList();
}, },
//
detail() {},
//
async confirm() {
let fd = await this.formatData();
if (!fd) return;
let arr = this.tableSelectData.map((item) => {
let obj = {
TrialId: this.submitMessage.TrialId,
SubjectId: this.submitMessage.SubjectId,
SubjectVisitId: item.SubjectVisitId,
ScpStudyId: item.SCPStudyId,
};
return obj;
});
try {
this.btnLoading2 = true;
let res = await addSubjectPatientStudyBinding(arr);
this.btnLoading2 = false;
if (res.IsSuccess) {
this.visitStatus = "submit";
this.$message.success(this.$t("common:message:savedSuccessfully"));
}
} catch (err) {
this.btnLoading2 = false;
console.log(err);
}
},
//
async confirmSubmit() {
let fd = await this.formatData();
if (!fd) return;
let data = {
TrialId: this.submitMessage.TrialId,
SubjectVisitId: [],
};
this.tableSelectData.forEach((item) => {
data.SubjectVisitId.push(item.SubjectVisitId);
});
try {
this.btnLoading2 = true;
let res = await submitVisitStudyBinding(data);
this.btnLoading2 = false;
if (res.IsSuccess) {
this.$message.success(
this.$t("trials:crcUpload:message:submittedSuccessfully")
);
}
} catch (err) {
this.btnLoading2 = false;
console.log(err);
}
},
//
formatData() {
if (this.tableSelectData.length <= 0) {
this.$message.warning(
this.$t("trials:inspection:formatData:notCheckStudy")
);
return false;
}
let index = this.tableSelectData.indexOf((item) => !item.SubjectVisitId);
if (~index) {
this.$message.warning(
this.$t("trials:inspection:formatData:notCheckVisit").replace(
"xx",
index + 1
)
);
return false;
}
return true;
},
}, },
}; };
</script> </script>
@ -382,24 +615,12 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap;
} }
.search { .search {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
p {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
&::after {
display: block;
content: "";
flex: 1;
height: 1px;
border-top: 1px solid #ddd;
}
}
.form { .form {
width: 100%; width: 100%;
display: flex; display: flex;
@ -407,11 +628,35 @@ export default {
justify-content: space-between; justify-content: space-between;
} }
} }
::v-deep .has-gutter { .line {
.el-table-column--selection { width: 100%;
.el-checkbox { display: flex;
display: none; 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;
}
.demo-form-inline {
width: 100%;
}
.detail {
margin-left: 10px;
}
.addVisit {
margin: 0;
line-height: 34px;
text-align: center;
cursor: pointer;
}
</style> </style>

View File

@ -1,216 +0,0 @@
<template>
<el-dialog
:visible.sync="visible"
:close-on-click-modal="false"
:fullscreen="true"
custom-class="upload-dialog"
:before-close="beforeCloseStudyDig"
>
<span slot="title"
>{{ $t("trials:inspection:message:confirmVisit") }}{{
$t("trials:trials-list:table:researchNumber")
}}T0001132ZhangSan</span
>
<div class="top">
<el-form :inline="true" :model="submitMessage" class="demo-form-inline">
<!--受试者编号-->
<el-form-item :label="$t('trials:crcQuestion:table:subjectId')">
<el-input v-model="submitMessage.subjectId" disabled></el-input>
</el-form-item>
<!--患者编号-->
<el-form-item :label="$t('trials:uploadDicomList:table:pId')">
<el-input v-model="submitMessage.subjectId" disabled></el-input>
</el-form-item>
<!--患者姓名-->
<el-form-item :label="$t('trials:uploadDicomList:table:patientName')">
<el-input v-model="submitMessage.subjectId" disabled></el-input>
</el-form-item>
</el-form>
</div>
<div class="search">
<el-form :inline="true" class="base-search-form">
<!-- 检查日期 -->
<el-form-item :label="$t('trials:uploadedDicoms:table:studyDate')">
<el-date-picker
v-model="searchData.date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t("common:button:search") }}
</el-button>
<!-- 重置 -->
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
</el-button>
</el-form-item>
</el-form>
<div class="buttonBox">
<!--确认-->
<el-button type="primary" @click="confirm">
{{ $t("trials:seletctedReviews:timeline:confirmation") }}
</el-button>
<!--确认提交-->
<el-button type="primary" @click="confirmSubmit">
{{ $t("trials:inspection:button:confirmAndSubmit") }}
</el-button>
</div>
</div>
<!--访视列表-->
<el-table
ref="confirmVisitList"
v-loading="loading"
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:inspection:table:studyDescription')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--检查类型-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:audit:table:modality')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--序列数-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:audit:table:seriesCount')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--检查日期-->
<el-table-column
align="center"
prop="IsUrgent"
:label="$t('trials:audit:table:studyDate')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--操作-->
<el-table-column
:label="$t('common:action:action')"
width="300"
class-name="actionBox"
>
<template slot-scope="scope">
<!--切换访视-->
<el-select v-model="scope.row.visit" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<!-- 详情 -->
<el-button
circle
icon="el-icon-info"
:title="$t('trials:trials-list:action:panel')"
@click.stop="detail(scope.row)"
/>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
</el-dialog>
</template>
<script>
import Pagination from "@/components/Pagination";
export default {
name: "confirmVisitList",
components: { Pagination },
props: {
visible: {
require: true,
default: false,
},
},
data() {
return {
//
searchData: {},
//
total: 0,
loading: false,
list: [{ key: 1, IsUrgent: "123" }],
//
submitMessage: {},
options: [],
};
},
methods: {
//
beforeCloseStudyDig() {
this.$emit("update:visible", false);
},
//
confirm() {},
//
confirmSubmit() {},
//
getList() {},
//
handleSearch() {},
//
handleReset() {},
//
handleSelectChange() {},
//
detail() {},
},
};
</script>
<style lang="scss" scoped>
.top {
padding-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
.search {
display: flex;
align-items: center;
justify-content: space-between;
}
.actionBox {
display: flex;
align-items: center;
justify-content: space-between;
::v-deep .el-select {
width: 80%;
}
}
</style>

View File

@ -18,9 +18,9 @@
}}{{ total }}</span }}{{ total }}</span
> >
</p> </p>
<el-button type="primary" @click="addTrials"> <!-- <el-button type="primary" @click="addTrials">
{{ $t("trials:inspection:button:addTrials") }} {{ $t("trials:inspection:button:addTrials") }}
</el-button> </el-button> -->
</div> </div>
<!--参与项目列表--> <!--参与项目列表-->
<el-table <el-table
@ -31,13 +31,7 @@
stripe stripe
height="100" height="100"
> >
<!--受试者编号--> <el-table-column type="index" width="40" />
<el-table-column
prop="Code"
:label="$t('trials:crcQuestion:table:subjectId')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--研究方案号--> <!--研究方案号-->
<el-table-column <el-table-column
prop="ResearchProgramNo" prop="ResearchProgramNo"
@ -66,6 +60,13 @@
show-overflow-tooltip show-overflow-tooltip
min-width="140" min-width="140"
></el-table-column> ></el-table-column>
<!--受试者编号-->
<el-table-column
prop="Code"
:label="$t('trials:crcQuestion:table:subjectId')"
show-overflow-tooltip
min-width="140"
></el-table-column>
<!--创建日期--> <!--创建日期-->
<el-table-column <el-table-column
prop="CreateTime" prop="CreateTime"
@ -119,12 +120,8 @@ export default {
}, },
}, },
}, },
watch: { created() {
visible() { this.getList();
if (this.visible) {
this.getList();
}
},
}, },
data() { data() {
return { return {
@ -154,7 +151,7 @@ export default {
let res = await getPatientJoinedTrialList(data); let res = await getPatientJoinedTrialList(data);
this.loading = false; this.loading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
this.list = res.Result.data; this.list = res.Result;
this.total = this.list.length; this.total = this.list.length;
} }
} catch (err) { } catch (err) {
@ -189,7 +186,7 @@ export default {
if (confirm !== "confirm") return; if (confirm !== "confirm") return;
let params = { let params = {
PatientId: this.Patient.PatientId, PatientId: this.Patient.PatientId,
SubjectId: item, SubjectId: item.SubjectId,
}; };
this.loading = true; this.loading = true;
let res = await deleteSubjectPatientBinding(params); let res = await deleteSubjectPatientBinding(params);
@ -197,6 +194,7 @@ export default {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList(); this.getList();
this.$message.success(this.$t("common:message:removedSuccessfully")); this.$message.success(this.$t("common:message:removedSuccessfully"));
this.$emit("getList");
} }
} catch (err) { } catch (err) {
console.log(err); console.log(err);

View File

@ -0,0 +1,306 @@
<template>
<el-popover
v-model="visible"
class="trials-select"
placement="top"
trigger="manual"
width="300"
>
<div class="trials-select-box">
<div
style="
position: absolute;
top: 0;
left: 0;
width: 300px;
background: #fff;
padding: 15px 15px 0;
"
>
<el-input
v-model="inputValue"
prefix-icon="el-icon-search"
clearable
@input="inputChange"
/>
<div
style="
display: flex;
justify-content: space-between;
align-items: center;
line-height: 36px;
padding: 0 5px;
"
>
<div
style="
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 80px;
"
>
{{ $t("trials:trials-list:table:researchNumber") }}
</div>
<div
style="
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 160px;
"
>
{{ $t("trials:trials-list:table:experimentName") }}
</div>
<div
style="
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 80px;
"
>
{{ $t("trials:trials-list:table:sponsor") }}
</div>
</div>
</div>
<el-tooltip
placement="left"
class="trials-select"
width="300"
trigger="hover"
:open-delay="500"
v-for="(item, index) of resultFilter"
:key="item.Id"
>
<div slot="content">
{{ $t("trials:trials-list:table:researchNumber") }}:
{{ item.ResearchProgramNo }}
<br />
{{ $t("trials:trials-list:table:experimentName") }}:
{{ item.ExperimentName }}
<br />
{{ $t("trials:trials-list:table:sponsor") }}:
{{ item.SponsorName }}
</div>
<div
class="options_item"
:class="{
selected: item.TrialId === data.TrialId,
selectedIndex: selectIndex === index,
}"
@click.stop="selectTrials(item, index)"
>
<div
style="
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 80px;
"
>
{{ item.ResearchProgramNo }}
</div>
<div
style="
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 160px;
"
>
{{ item.ExperimentName }}
</div>
<div
style="
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 80px;
"
>
{{ item.SponsorName }}
</div>
</div>
</el-tooltip>
</div>
<div
slot="reference"
:class="{ 'trials-select-reference': true, disabled: status === 'visit' }"
@click.stop="status === 'trial' ? (visible = !visible) : false"
>
<el-tooltip content="Top center" placement="top" style="width: 100%">
<div slot="content">
{{ $t("trials:trials-list:table:researchNumber") }}:
{{ data.ResearchProgramNo }}
<br />
{{ $t("trials:trials-list:table:experimentName") }}:
{{ data.ExperimentName }}
<br />
{{ $t("trials:trials-list:table:sponsor") }}:
{{ data.SponsorName }}
</div>
<span> {{ data.ResearchProgramNo }}</span>
</el-tooltip>
<span class="tip-span">
<span
class="el-icon-arrow-down tip-span"
:class="{ selected: visible }"
/>
</span>
</div>
</el-popover>
</template>
<script>
export default {
name: "trialsSelect",
props: {
options: {
require: true,
default: () => [],
},
data: {
require: true,
default: () => {},
},
status: {
require: true,
default: "trial",
},
},
data() {
return {
visible: false,
resultFilter: [],
inputValue: null,
selectIndex: null,
};
},
mounted() {
document.onkeydown = (e) => {
if (!this.visible) return;
//
let e1 =
e || event || window.event || arguments.callee.caller.arguments[0];
//:-37;-38-39;-40
//
if (e1 && e1.keyCode == 40) {
//
if (this.resultFilter.length - 1 === this.selectIndex) return;
this.selectIndex++;
} else if (e1 && e1.keyCode == 38) {
//
if (this.selectIndex === 0) return;
this.selectIndex--;
} else if (e1 && e1.keyCode == 13) {
this.selectTrials(
this.resultFilter[this.selectIndex],
this.selectIndex
);
}
document
.querySelector(".trials-select-box")
.scrollTo(
0,
document.querySelector(".options_item.selectedIndex").offsetTop - 200
);
};
},
watch: {
options: {
handler() {
this.resultFilter = this.options.filter(() => true);
},
deep: true,
immediate: true,
},
},
methods: {
selectTrials(item, index) {
this.selectIndex = index;
let obj = JSON.parse(JSON.stringify(this.data));
obj = Object.assign(obj, item);
this.$emit("update:data", obj);
this.visible = false;
},
inputChange(v) {
this.resultFilter = this.options.filter((o) => {
var reg = new RegExp(v, "ig");
return reg.test(o.ResearchProgramNo) || reg.test(o.Indication);
});
},
},
};
</script>
<style lang="scss" scoped>
.trials-select {
cursor: pointer;
.trials-select-reference {
height: 36px;
line-height: 36px;
border: 1px solid #dcdfe6;
border-radius: 4px;
padding: 0 15px;
padding-right: 30px;
width: 200px;
position: relative;
.tip-span {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
position: absolute;
top: 0;
right: 5px;
}
}
}
.disabled {
background-color: #f5f7fa;
cursor: not-allowed;
}
.trials-select-box {
width: 100%;
height: 400px;
overflow-y: auto;
padding-top: 76px;
}
.trials-select-box::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.trials-select-reference {
line-height: 40px;
height: 40px;
.el-icon-arrow-down {
transition: all 0.3s;
}
.el-icon-arrow-down.selected {
transform: rotate(180deg);
}
}
.options_item {
display: flex;
justify-content: space-between;
cursor: pointer;
line-height: 30px;
padding: 0 5px;
transition: all 0.3s;
&:hover {
background: #eee;
}
}
.options_item.selected {
color: #428bca;
background: #eee;
}
.options_item.selectedIndex {
background: #eee;
}
</style>

View File

@ -64,7 +64,10 @@
:data="list" :data="list"
stripe stripe
height="100" height="100"
@sort-change="handleSortByColumn"
:default-sort="{ prop: 'StudyTime', order: 'descending' }"
> >
<el-table-column type="index" width="40" />
<!--检查描述--> <!--检查描述-->
<el-table-column <el-table-column
align="center" align="center"
@ -96,6 +99,7 @@
:label="$t('trials:audit:table:studyDate')" :label="$t('trials:audit:table:studyDate')"
show-overflow-tooltip show-overflow-tooltip
min-width="140" min-width="140"
sortable="custom"
></el-table-column> ></el-table-column>
<!--操作--> <!--操作-->
<el-table-column :label="$t('common:action:action')" width="250"> <el-table-column :label="$t('common:action:action')" width="250">
@ -149,8 +153,8 @@ export default {
EarliestStudyTime: null, EarliestStudyTime: null,
LatestStudyTime: null, LatestStudyTime: null,
PatientId: null, PatientId: null,
Asc: true, Asc: false,
SortField: null, SortField: "StudyTime",
}, },
dateValue: [], dateValue: [],
// //
@ -158,12 +162,8 @@ export default {
list: [], list: [],
}; };
}, },
watch: { created() {
visible() { this.getList();
if (this.visible) {
this.getList();
}
},
}, },
methods: { methods: {
// //
@ -202,12 +202,17 @@ export default {
}, },
// //
handleReset() { handleReset() {
this.reset();
this.getList();
},
//
reset() {
Object.keys(this.searchData).forEach((key) => { Object.keys(this.searchData).forEach((key) => {
this.searchData[key] = null; this.searchData[key] = null;
}); });
this.searchData.Asc = true; this.searchData.Asc = false;
this.SortField.Asc = "StudyTime";
this.dateValue = []; this.dateValue = [];
this.getList();
}, },
// //
image(item) { image(item) {
@ -219,6 +224,14 @@ export default {
}, },
// //
report() {}, report() {},
//
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();
},
}, },
}; };
</script> </script>

View File

@ -73,7 +73,9 @@
stripe stripe
height="100" height="100"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
:default-sort="{ prop: 'LatestPushTime', order: 'descending' }"
> >
<el-table-column type="index" width="40" />
<!--患者ID--> <!--患者ID-->
<el-table-column <el-table-column
prop="PatientIdStr" prop="PatientIdStr"
@ -167,6 +169,7 @@
:label="$t('trials:inspection:table:latestReceiveTime')" :label="$t('trials:inspection:table:latestReceiveTime')"
show-overflow-tooltip show-overflow-tooltip
min-width="140" min-width="140"
sortable="custom"
></el-table-column> ></el-table-column>
<!--操作--> <!--操作-->
<el-table-column :label="$t('common:action:action')" width="250"> <el-table-column :label="$t('common:action:action')" width="250">
@ -192,20 +195,23 @@
<!--研究项目列表--> <!--研究项目列表-->
<researchTrialsList <researchTrialsList
v-if="researchTrialsVisible"
:visible.sync="researchTrialsVisible" :visible.sync="researchTrialsVisible"
:Patient="selectPatient" :Patient="selectPatient"
@getList="getList"
@handleOpenDialog="handleOpenDialog" @handleOpenDialog="handleOpenDialog"
/> />
<!--可加入项目列表--> <!--可加入项目列表-->
<addTrialsList <addTrialsList
v-if="addTrialsVisible"
:visible.sync="addTrialsVisible" :visible.sync="addTrialsVisible"
:Patient="selectPatient" :Patient="selectPatient"
@getList="getList"
@handleOpenDialog="handleOpenDialog" @handleOpenDialog="handleOpenDialog"
/> />
<!--确认访视列表-->
<confirmVisitList :visible.sync="confirmTrialsVisible" />
<!--查看检查列表--> <!--查看检查列表-->
<viewStudyList <viewStudyList
v-if="studyTrialsVisible"
:visible.sync="studyTrialsVisible" :visible.sync="studyTrialsVisible"
:Patient="selectPatient" :Patient="selectPatient"
/> />
@ -216,7 +222,6 @@ import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
import researchTrialsList from "./components/research-trials-list"; import researchTrialsList from "./components/research-trials-list";
import addTrialsList from "./components/add-trials-list"; import addTrialsList from "./components/add-trials-list";
import confirmVisitList from "./components/confirm-visit-list";
import viewStudyList from "./components/view-study-list"; import viewStudyList from "./components/view-study-list";
import { getPatientList } from "@/api/inspection.js"; import { getPatientList } from "@/api/inspection.js";
import { getDicomCalledAEList } from "@/api/dicomAE.js"; import { getDicomCalledAEList } from "@/api/dicomAE.js";
@ -227,7 +232,6 @@ export default {
Pagination, Pagination,
researchTrialsList, researchTrialsList,
addTrialsList, addTrialsList,
confirmVisitList,
viewStudyList, viewStudyList,
}, },
data() { data() {
@ -238,8 +242,8 @@ export default {
PatientName: null, PatientName: null,
CalledAEList: [], CalledAEList: [],
ExperimentName: null, ExperimentName: null,
Asc: true, Asc: false,
SortField: null, SortField: "LatestPushTime",
PageIndex: 1, PageIndex: 1,
PageSize: 10, PageSize: 10,
}, },
@ -254,8 +258,6 @@ export default {
researchTrialsVisible: false, researchTrialsVisible: false,
// //
addTrialsVisible: false, addTrialsVisible: false,
// 访
confirmTrialsVisible: false,
// //
studyTrialsVisible: false, studyTrialsVisible: false,
}; };
@ -306,7 +308,8 @@ export default {
this.searchData.PageIndex = 1; this.searchData.PageIndex = 1;
this.searchData.PageSize = 10; this.searchData.PageSize = 10;
this.searchData.CalledAEList = []; this.searchData.CalledAEList = [];
this.searchData.Asc = true; this.searchData.Asc = false;
this.SortField.Asc = "LatestPushTime";
this.$refs.inspectionList.clearSort(); this.$refs.inspectionList.clearSort();
this.getList(); this.getList();
}, },

View File

@ -274,7 +274,7 @@
@handleOpenDialog="handleOpenDialog" @handleOpenDialog="handleOpenDialog"
/> />
<!--确认访视--> <!--确认访视-->
<confirmVisitList :visible.sync="confirmTrialsVisible" /> <!-- <confirmVisitList :visible.sync="confirmTrialsVisible" /> -->
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
@ -291,7 +291,7 @@ import SubjectStatusForm from "./components/SubjectStatusForm";
import MessageTable from "./components/MessageTable"; import MessageTable from "./components/MessageTable";
import moment from "moment"; 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: "",