添加项目接口对接
parent
c7575b7048
commit
20cbde0348
|
@ -81,21 +81,18 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit-outline"
|
|
||||||
@click="openDialog('edit', scope.row)"
|
@click="openDialog('edit', scope.row)"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit-outline"
|
|
||||||
@click="delAE(scope.row)"
|
@click="delAE(scope.row)"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit-outline"
|
|
||||||
@click="test(scope.row)"
|
@click="test(scope.row)"
|
||||||
>测试</el-button
|
>测试</el-button
|
||||||
>
|
>
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
<span slot="title"
|
<span slot="title"
|
||||||
>{{ $t("trials:inspection:button:addTrials") }}({{
|
>{{ $t("trials:inspection:button:addTrials") }}({{
|
||||||
$t("trials:uploadDicomList:table:patientInfo")
|
$t("trials:uploadDicomList:table:patientInfo")
|
||||||
}}:T0001132,ZhangSan)</span
|
}}:{{ Patient.PatientIdStr }},{{ Patient.PatientName }})</span
|
||||||
>
|
>
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<el-form
|
<el-form
|
||||||
|
ref="submitMessageForm"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
:model="submitMessage"
|
:model="submitMessage"
|
||||||
class="demo-form-inline"
|
class="demo-form-inline"
|
||||||
|
@ -21,9 +22,23 @@
|
||||||
<!--受试者编号-->
|
<!--受试者编号-->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:crcQuestion:table:subjectId')"
|
:label="$t('trials:crcQuestion:table:subjectId')"
|
||||||
prop="subjectId"
|
prop="SubjectId"
|
||||||
>
|
>
|
||||||
<el-input v-model="submitMessage.subjectId"></el-input>
|
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,33 +46,45 @@
|
||||||
<p>{{ $t("trials:inspection:message:checkAddTrials") }}</p>
|
<p>{{ $t("trials:inspection:message:checkAddTrials") }}</p>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<el-form :inline="true" class="base-search-form">
|
<el-form :inline="true" class="base-search-form">
|
||||||
|
<!-- 项目类型 -->
|
||||||
|
<el-form-item
|
||||||
|
class="my_multiple"
|
||||||
|
:label="$t('trials:trials-list:form:trialType')"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.TrialType"
|
||||||
|
clearable
|
||||||
|
style="width: 140px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.TrialType"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<!-- 研究方案编号 -->
|
<!-- 研究方案编号 -->
|
||||||
<el-form-item :label="$t('trials:trials-list:table:researchNumber')">
|
<el-form-item :label="$t('trials:trials-list:table:researchNumber')">
|
||||||
<el-input v-model="searchData.SubjectInfo" style="width: 100px" />
|
<el-input
|
||||||
|
v-model="searchData.ResearchProgramNo"
|
||||||
|
style="width: 100px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 研究名称 -->
|
<!-- 研究名称 -->
|
||||||
<el-form-item :label="$t('trials:trials-list:table:researchName')">
|
<el-form-item :label="$t('trials:trials-list:table:researchName')">
|
||||||
<el-input v-model="searchData.SubjectInfo" style="width: 100px" />
|
<el-input
|
||||||
|
v-model="searchData.ExperimentName"
|
||||||
|
style="width: 100px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 申办方 -->
|
<!-- 申办方 -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
class="my_multiple"
|
class="my_multiple"
|
||||||
:label="$t('trials:trials-list:table:sponsor')"
|
:label="$t('trials:trials-list:table:sponsor')"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-input v-model="searchData.SponsorName" style="width: 100px" />
|
||||||
v-model="searchData.VisitPlanArray"
|
|
||||||
clearable
|
|
||||||
multiple
|
|
||||||
style="width: 140px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="(item, index) of sponsorList"
|
|
||||||
:key="index"
|
|
||||||
:label="item.VisitName"
|
|
||||||
:value="item.VisitNum"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- 查询 -->
|
<!-- 查询 -->
|
||||||
|
@ -78,7 +105,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button type="primary" @click="addTrials">
|
<el-button type="primary" @click="addTrials" :loading="btnLoading">
|
||||||
{{ $t("trials:addRP:button:confirmAddPR") }}
|
{{ $t("trials:addRP:button:confirmAddPR") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,19 +121,34 @@
|
||||||
height="100"
|
height="100"
|
||||||
@selection-change="handleSelectChange"
|
@selection-change="handleSelectChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" align="center" width="45" />
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
align="center"
|
||||||
|
width="45"
|
||||||
|
:selectable="
|
||||||
|
(row, index) =>
|
||||||
|
!tableSelectData.trialId || tableSelectData.trialId === row.trialId
|
||||||
|
"
|
||||||
|
/>
|
||||||
<!--项目类型-->
|
<!--项目类型-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="IsUrgent"
|
prop="TrialType"
|
||||||
:label="$t('trials:trials-list:form:trialType')"
|
:label="$t('trials:trials-list:form:trialType')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="140"
|
min-width="140"
|
||||||
></el-table-column>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{
|
||||||
|
$d.TrialType.filter((item) => item.value == scope.row.TrialType)[0]
|
||||||
|
.label
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!--研究方案号-->
|
<!--研究方案号-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="IsUrgent"
|
prop="ResearchProgramNo"
|
||||||
:label="$t('trials:trials-list:table:researchNumber')"
|
:label="$t('trials:trials-list:table:researchNumber')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="140"
|
min-width="140"
|
||||||
|
@ -114,7 +156,7 @@
|
||||||
<!--研究名称-->
|
<!--研究名称-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="IsUrgent"
|
prop="ExperimentName"
|
||||||
:label="$t('trials:trials-list:table:researchName')"
|
:label="$t('trials:trials-list:table:researchName')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="140"
|
min-width="140"
|
||||||
|
@ -122,7 +164,7 @@
|
||||||
<!--申办方-->
|
<!--申办方-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="IsUrgent"
|
prop="SponsorName"
|
||||||
:label="$t('trials:trials-list:table:sponsor')"
|
:label="$t('trials:trials-list:table:sponsor')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="140"
|
min-width="140"
|
||||||
|
@ -130,7 +172,7 @@
|
||||||
<!--状态-->
|
<!--状态-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="IsUrgent"
|
prop="TrialStatusStr"
|
||||||
:label="$t('trials:trials-list:table:status')"
|
:label="$t('trials:trials-list:table:status')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="140"
|
min-width="140"
|
||||||
|
@ -138,7 +180,7 @@
|
||||||
<!--创建日期-->
|
<!--创建日期-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
prop="IsUrgent"
|
prop="CreateTime"
|
||||||
:label="$t('trials:trials-list:table:createDate')"
|
:label="$t('trials:trials-list:table:createDate')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="140"
|
min-width="140"
|
||||||
|
@ -157,6 +199,11 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
|
import {
|
||||||
|
getPatientJoinTrialInitList,
|
||||||
|
getTrialSubejctSelectList,
|
||||||
|
addSubjectPatientBinding,
|
||||||
|
} from "@/api/inspection.js";
|
||||||
export default {
|
export default {
|
||||||
name: "addTrialsList",
|
name: "addTrialsList",
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
|
@ -165,47 +212,161 @@ export default {
|
||||||
require: true,
|
require: true,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
Patient: {
|
||||||
|
require: true,
|
||||||
|
default: () => {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 查询
|
// 查询
|
||||||
searchData: {},
|
searchData: {
|
||||||
sponsorList: [],
|
ExperimentName: null, // 项目名称
|
||||||
|
ResearchProgramNo: null, // 研究方案号
|
||||||
|
TrialType: null, // 项目类型
|
||||||
|
SponsorName: null, // 申办人
|
||||||
|
Asc: true,
|
||||||
|
SortField: null,
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 10,
|
||||||
|
},
|
||||||
// 可加入项目列表
|
// 可加入项目列表
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [{ key: 1, IsUrgent: "123" }],
|
list: [],
|
||||||
// 提交数据
|
// 提交数据
|
||||||
submitMessage: {},
|
btnLoading: false,
|
||||||
|
tableSelectData: {}, // 表格选中
|
||||||
|
submitMessage: {
|
||||||
|
SubjectId: null,
|
||||||
|
},
|
||||||
|
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",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
visible() {
|
||||||
|
if (this.visible) {
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tableSelectData.TrialId": {
|
||||||
|
handler() {
|
||||||
|
if (tableSelectData.TrialId) {
|
||||||
|
this.getTrialSubejctSelectList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取受试者列表
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 关闭弹框
|
// 关闭弹框
|
||||||
beforeCloseStudyDig() {
|
beforeCloseStudyDig() {
|
||||||
this.$emit("update:visible", false);
|
this.$emit("update:visible", false);
|
||||||
},
|
},
|
||||||
// 加入项目
|
// 加入项目
|
||||||
addTrials() {
|
async addTrials() {
|
||||||
|
if (this.btnLoading) return;
|
||||||
|
try {
|
||||||
|
let validate = await this.$refs.submitMessageForm.validate();
|
||||||
|
if (!validate) return;
|
||||||
|
if (!this.tableSelectData.TrialId)
|
||||||
|
return this.$message.warning(
|
||||||
|
this.$t("trials:inspection:message:notJionTrial")
|
||||||
|
);
|
||||||
|
let data = {
|
||||||
|
TrialId: this.tableSelectData.TrialId,
|
||||||
|
PatientIdList: [this.Patient.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) {
|
||||||
|
let obj = JSON.parse(JSON.stringify(this.tableSelectData));
|
||||||
this.$emit("update:visible", false);
|
this.$emit("update:visible", false);
|
||||||
this.$emit("handleOpenDialog", {}, "confirm");
|
this.$emit("handleOpenDialog", obj, "confirm");
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getList() {},
|
async getList() {
|
||||||
|
let data = {};
|
||||||
|
Object.keys(this.searchData).forEach((key) => {
|
||||||
|
data[key] = this.searchData[key];
|
||||||
|
});
|
||||||
|
console.log(this.Patient);
|
||||||
|
data.PatientId = this.Patient.PatientId;
|
||||||
|
try {
|
||||||
|
this.loading = true;
|
||||||
|
let res = await getPatientJoinTrialInitList(data);
|
||||||
|
this.loading = false;
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.list = res.Result.CurrentPageData;
|
||||||
|
this.total = res.Result.TotalCount;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {},
|
handleSearch() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
// 重置
|
// 重置
|
||||||
handleReset() {},
|
handleReset() {
|
||||||
|
Object.keys(this.searchData).forEach((key) => {
|
||||||
|
this.searchData[key] = null;
|
||||||
|
});
|
||||||
|
this.searchData.PageIndex = 1;
|
||||||
|
this.searchData.PageSize = 10;
|
||||||
|
this.searchData.Asc = true;
|
||||||
|
this.$refs.addTrialsList.clearSort();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
// 表格选择
|
// 表格选择
|
||||||
handleSelectChange() {},
|
handleSelectChange(selection) {
|
||||||
|
console.log(selection);
|
||||||
|
this.tableSelectData = selection[0];
|
||||||
|
if (!selection[0]) this.tableSelectData = {};
|
||||||
|
},
|
||||||
|
// 表格排序
|
||||||
|
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>
|
||||||
|
@ -240,4 +401,11 @@ export default {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .has-gutter {
|
||||||
|
.el-table-column--selection {
|
||||||
|
.el-checkbox {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -243,7 +243,7 @@ export default {
|
||||||
// 检查列表
|
// 检查列表
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [{ key: 1, VisitName: "123" }],
|
list: [],
|
||||||
// 选中的患者
|
// 选中的患者
|
||||||
selectPatient: {},
|
selectPatient: {},
|
||||||
// 研究项目列表
|
// 研究项目列表
|
||||||
|
|
Loading…
Reference in New Issue