一致性分析受试者分配添加字段
continuous-integration/drone/push Build is running Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-08-15 14:18:31 +08:00
parent 8ad3eee2c2
commit 4d97b9992c
3 changed files with 270 additions and 152 deletions

View File

@ -7,10 +7,15 @@
:data="list" :data="list"
stripe stripe
height="100" height="100"
style="min-height: 400px;" style="min-height: 400px"
@selection-change="handleSelectChange" @selection-change="handleSelectChange"
> >
<el-table-column :selectable="selectable" type="selection" align="left" width="45" /> <el-table-column
:selectable="selectable"
type="selection"
align="left"
width="45"
/>
<!-- 中心编号 --> <!-- 中心编号 -->
<el-table-column <el-table-column
prop="TrialSiteCode" prop="TrialSiteCode"
@ -35,25 +40,44 @@
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<!-- 原截至访视 -->
<el-table-column
prop="FirstGlobalVisitName"
:label="
$t('trials:grouptConsistencyAnalysis:table:firstGlobalVisitName')
"
min-width="160"
sortable="custom"
show-overflow-tooltip
v-if="OtherInfo.IsGenerateGlobalTask && OtherInfo.IsHaveReadingPeriod"
/>
<!-- 是否受到退回影响 --> <!-- 是否受到退回影响 -->
<!-- <el-table-column--> <!-- <el-table-column-->
<!-- prop="IsReReadingOrBackInfluenceAnalysis"--> <!-- prop="IsReReadingOrBackInfluenceAnalysis"-->
<!-- :label="$t('trials:grouptConsistencyAnalysis:table:backImpact')"--> <!-- :label="$t('trials:grouptConsistencyAnalysis:table:backImpact')"-->
<!-- min-width="160"--> <!-- min-width="160"-->
<!-- sortable="custom"--> <!-- sortable="custom"-->
<!-- show-overflow-tooltip>--> <!-- show-overflow-tooltip>-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-tag v-if="!scope.row.IsReReadingOrBackInfluenceAnalysis" type="danger">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>--> <!-- <el-tag v-if="!scope.row.IsReReadingOrBackInfluenceAnalysis" type="danger">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>-->
<!-- <el-tag v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" type="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>--> <!-- <el-tag v-if="scope.row.IsReReadingOrBackInfluenceAnalysis" type="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>-->
<!-- </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"
/>
</div> </div>
<div v-else>{{$t('trials:grouptConsistencyAnalysis:message:createRandom')}}</div> <div v-else>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;"> {{ $t("trials:grouptConsistencyAnalysis:message:createRandom") }}
</div>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item> <el-form-item>
<!-- 取消 --> <!-- 取消 -->
<el-button <el-button
@ -62,39 +86,59 @@
type="primary" type="primary"
@click="close" @click="close"
> >
{{ $t('common:button:cancel') }} {{ $t("common:button:cancel") }}
</el-button> </el-button>
<!-- 生成 --> <!-- 生成 -->
<el-button size="small" type="primary" :loading="btnLoading" @click="save"> <el-button
{{data.IsAutoAllocateGenerateTask ? $t('trials:grouptConsistencyAnalysis:button:createRandom') : $t('trials:grouptConsistencyAnalysis:button:create')}} size="small"
type="primary"
:loading="btnLoading"
@click="save"
>
{{
data.IsAutoAllocateGenerateTask
? $t("trials:grouptConsistencyAnalysis:button:createRandom")
: $t("trials:grouptConsistencyAnalysis:button:create")
}}
</el-button> </el-button>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
</template> </template>
<script> <script>
import { getDoctorSelfConsistentRuleSubjectList, confirmGenerateSelfConsistentTask, getDoctorConsistentRuleSubjectList, confirmGenerateConsistentTask } from '@/api/trials/reading' import {
import BaseContainer from '@/components/BaseContainer' getDoctorSelfConsistentRuleSubjectList,
import Pagination from '@/components/Pagination' confirmGenerateSelfConsistentTask,
getDoctorConsistentRuleSubjectList,
confirmGenerateConsistentTask,
} from "@/api/trials/reading";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: true, Asc: true,
SortField: '', SortField: "",
TrialId: null, TrialId: null,
TaskConsistentRuleId: null TaskConsistentRuleId: null,
} };
} };
export default { export default {
name: 'TrialsNotice', name: "TrialsNotice",
components: { BaseContainer, Pagination }, components: { BaseContainer, Pagination },
props: { props: {
data: { data: {
type: Object, type: Object,
default() { default() {
return {} return {};
} },
},
OtherInfo: {
type: Object,
default() {
return {};
},
}, },
}, },
data() { data() {
@ -105,71 +149,82 @@ export default {
loading: false, loading: false,
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
SelectList: [], SelectList: [],
btnLoading: false btnLoading: false,
} };
}, },
mounted() { mounted() {
this.searchData.TaskConsistentRuleId = this.data.Id this.searchData.TaskConsistentRuleId = this.data.Id;
this.searchData.DoctorUserId = this.data.AnalysisDoctorUser.UserId this.searchData.DoctorUserId = this.data.AnalysisDoctorUser.UserId;
this.getList() this.getList();
}, },
methods: { methods: {
selectable(row) { selectable(row) {
if (row.IsHaveGeneratedTask) { if (row.IsHaveGeneratedTask) {
return false return false;
} else { } else {
return true return true;
} }
}, },
handleSelectChange(e) { handleSelectChange(e) {
this.SelectList = e this.SelectList = e;
}, },
save () { save() {
if (this.SelectList.length === 0 && !this.data.IsAutoAllocateGenerateTask) { if (
this.SelectList.length === 0 &&
!this.data.IsAutoAllocateGenerateTask
) {
// '' // ''
this.$alert(this.$t('trials:grouptConsistencyAnalysis:message:msg1')) this.$alert(this.$t("trials:grouptConsistencyAnalysis:message:msg1"));
return return;
} }
this.btnLoading = true this.btnLoading = true;
this.loading = true this.loading = true;
var params = { var params = {
TaskConsistentRuleId: this.searchData.TaskConsistentRuleId, TaskConsistentRuleId: this.searchData.TaskConsistentRuleId,
SubejctIdList: this.SelectList.map(v => v.SubjectId), SubejctIdList: this.SelectList.map((v) => v.SubjectId),
DoctorUserId: this.searchData.DoctorUserId, DoctorUserId: this.searchData.DoctorUserId,
IsAutoAllocateGenerateTask: this.data.IsAutoAllocateGenerateTask IsAutoAllocateGenerateTask: this.data.IsAutoAllocateGenerateTask,
} };
confirmGenerateSelfConsistentTask(params).then(res => { confirmGenerateSelfConsistentTask(params)
this.loading = false .then((res) => {
this.btnLoading = false this.loading = false;
this.$message.success(this.$t('common:message:savedSuccessfully')) this.btnLoading = false;
this.$emit('getList') this.$message.success(this.$t("common:message:savedSuccessfully"));
this.close() this.$emit("getList");
}).catch(() => { this.close();
this.loading = false })
this.btnLoading = false .catch(() => {
}) this.loading = false;
this.btnLoading = false;
});
}, },
getList() { getList() {
this.searchData.TrialId = this.$route.query.trialId this.searchData.TrialId = this.$route.query.trialId;
this.loading = true this.loading = true;
getDoctorSelfConsistentRuleSubjectList(this.searchData).then(res => { getDoctorSelfConsistentRuleSubjectList(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;
});
},
close() {
this.$emit("close");
}, },
close() { this.$emit('close') },
// //
handleSortChange(column) { handleSortChange(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();
} },
} },
} };
</script> </script>

View File

@ -7,10 +7,15 @@
:data="list" :data="list"
stripe stripe
height="100" height="100"
style="min-height: 400px;" style="min-height: 400px"
@selection-change="handleSelectChange" @selection-change="handleSelectChange"
> >
<el-table-column :selectable="selectable" type="selection" align="left" width="45" /> <el-table-column
:selectable="selectable"
type="selection"
align="left"
width="45"
/>
<!-- 中心编号 --> <!-- 中心编号 -->
<el-table-column <el-table-column
prop="TrialSiteCode" prop="TrialSiteCode"
@ -36,7 +41,11 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.DoctorUserList.map(v => {return `${v.UserName} (${v.FullName})`}).join(', ')}} {{
scope.row.DoctorUserList.map((v) => {
return `${v.UserName} (${v.FullName})`;
}).join(", ")
}}
</template> </template>
</el-table-column> </el-table-column>
<!-- 符合规则访视数 --> <!-- 符合规则访视数 -->
@ -47,13 +56,30 @@
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
/> />
<!-- 原截至访视 -->
<el-table-column
prop="FirstGlobalVisitName"
:label="
$t('trials:grouptConsistencyAnalysis:table:firstGlobalVisitName')
"
min-width="160"
sortable="custom"
show-overflow-tooltip
v-if="OtherInfo.IsGenerateGlobalTask && OtherInfo.IsHaveReadingPeriod"
/>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<div style="text-align: right"> <div style="text-align: right">
<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"
/>
</div> </div>
</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> <el-form-item>
<!-- 取消 --> <!-- 取消 -->
<el-button <el-button
@ -62,64 +88,86 @@
type="primary" type="primary"
@click="close" @click="close"
> >
{{ $t('common:button:cancel') }} {{ $t("common:button:cancel") }}
</el-button> </el-button>
<el-button size="small" type="primary" :disabled="!IsAllowAutoAllocate" :loading="btnLoading" @click="save(true)"> <el-button
{{$t('trials:grouptConsistencyAnalysis:button:RandomCreate')}} size="small"
type="primary"
:disabled="!IsAllowAutoAllocate"
:loading="btnLoading"
@click="save(true)"
>
{{ $t("trials:grouptConsistencyAnalysis:button:RandomCreate") }}
</el-button> </el-button>
<!-- 生成 --> <!-- 生成 -->
<el-button size="small" type="primary" :loading="btnLoading" @click="save(false)"> <el-button
{{$t('trials:grouptConsistencyAnalysis:button:create')}} size="small"
type="primary"
:loading="btnLoading"
@click="save(false)"
>
{{ $t("trials:grouptConsistencyAnalysis:button:create") }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
</template> </template>
<script> <script>
import { getGroupConsistentRuleSubjectList, confirmGenerateGroupConsistentTask, getDoctorConsistentRuleSubjectList, confirmGenerateConsistentTask } from '@/api/trials/reading' import {
import BaseContainer from '@/components/BaseContainer' getGroupConsistentRuleSubjectList,
import Pagination from '@/components/Pagination' confirmGenerateGroupConsistentTask,
getDoctorConsistentRuleSubjectList,
confirmGenerateConsistentTask,
} from "@/api/trials/reading";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: true, Asc: true,
SortField: '', SortField: "",
TrialId: null, TrialId: null,
TaskConsistentRuleId: null TaskConsistentRuleId: null,
} };
} };
export default { export default {
name: 'TrialsNotice', name: "TrialsNotice",
components: { BaseContainer, Pagination }, components: { BaseContainer, Pagination },
props: { props: {
changeNum: { changeNum: {
type: Number, type: Number,
default() { default() {
return 0 return 0;
} },
}, },
IsSelfAnalysis: { IsSelfAnalysis: {
type: Boolean, type: Boolean,
default() { default() {
return false return false;
} },
}, },
TrialReadingCriterionId:{ TrialReadingCriterionId: {
type:String, type: String,
required:true required: true,
}, },
data: { data: {
type: Object, type: Object,
default() { default() {
return {} return {};
} },
},
OtherInfo: {
type: Object,
default() {
return {};
},
}, },
}, },
watch: { watch: {
changeNum(v) { changeNum(v) {
this.getList() this.getList();
} },
}, },
data() { data() {
return { return {
@ -130,77 +178,85 @@ export default {
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
SelectList: [], SelectList: [],
btnLoading: false, btnLoading: false,
IsAllowAutoAllocate: true IsAllowAutoAllocate: true,
} };
}, },
mounted() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
selectable(row) { selectable(row) {
if (row.IsHaveGeneratedTask) { if (row.IsHaveGeneratedTask) {
return false return false;
} else { } else {
return true return true;
} }
}, },
handleSelectChange(e) { handleSelectChange(e) {
this.SelectList = e this.SelectList = e;
}, },
save (IsAutoAllocateGenerateTask) { save(IsAutoAllocateGenerateTask) {
if (this.SelectList.length === 0) { if (this.SelectList.length === 0) {
// '' // ''
this.$alert(this.$t('trials:grouptConsistencyAnalysis:message:msg1')) this.$alert(this.$t("trials:grouptConsistencyAnalysis:message:msg1"));
return return;
} }
this.btnLoading = true this.btnLoading = true;
this.loading = true this.loading = true;
var params = { var params = {
TrialId: this.$route.query.trialId, TrialId: this.$route.query.trialId,
SubejctIdList: this.SelectList.map(v => v.SubjectId), SubejctIdList: this.SelectList.map((v) => v.SubjectId),
IsAutoAllocateGenerateTask: IsAutoAllocateGenerateTask, IsAutoAllocateGenerateTask: IsAutoAllocateGenerateTask,
TrialReadingCriterionId: this.TrialReadingCriterionId TrialReadingCriterionId: this.TrialReadingCriterionId,
} };
confirmGenerateGroupConsistentTask(params).then(res => { confirmGenerateGroupConsistentTask(params)
this.loading = false .then((res) => {
this.btnLoading = false this.loading = false;
// '' this.btnLoading = false;
this.$message.success(this.$t('common:message:savedSuccessfully')) // ''
this.close() this.$message.success(this.$t("common:message:savedSuccessfully"));
this.$emit('getList') this.close();
}).catch(() => { this.$emit("getList");
this.loading = false })
this.btnLoading = false .catch(() => {
}) this.loading = false;
this.btnLoading = false;
});
}, },
getList() { getList() {
this.searchData.TrialId = this.$route.query.trialId this.searchData.TrialId = this.$route.query.trialId;
this.loading = true this.loading = true;
this.searchData.TrialReadingCriterionId = this.TrialReadingCriterionId this.searchData.TrialReadingCriterionId = this.TrialReadingCriterionId;
getGroupConsistentRuleSubjectList(this.searchData).then(res => { getGroupConsistentRuleSubjectList(this.searchData)
if (res.OtherInfo.Rule) { .then((res) => {
this.$emit('setReaderRulesFormVisible', false) if (res.OtherInfo.Rule) {
} else { this.$emit("setReaderRulesFormVisible", false);
this.$emit('setReaderRulesFormVisible', true) } else {
} this.$emit("setReaderRulesFormVisible", true);
this.IsAllowAutoAllocate = res.OtherInfo.IsAllowAutoAllocate }
this.loading = false this.IsAllowAutoAllocate = res.OtherInfo.IsAllowAutoAllocate;
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;
});
},
close() {
this.$emit("close");
}, },
close() { this.$emit('close') },
// //
handleSortChange(column) { handleSortChange(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();
} },
} },
} };
</script> </script>

View File

@ -832,7 +832,12 @@
<el-button <el-button
circle circle
icon="el-icon-connection" icon="el-icon-connection"
:disabled="scope.row.GeneratedSubjectCount > 0 || scope.row.CanGeneratedSubejctCount === 0 || Number(scope.row.PlanSubjectCount)*2 >= scope.row.CanGeneratedSubejctCount" :disabled="
scope.row.GeneratedSubjectCount > 0 ||
scope.row.CanGeneratedSubejctCount === 0 ||
Number(scope.row.PlanSubjectCount) * 2 >=
scope.row.CanGeneratedSubejctCount
"
:title=" :title="
$t( $t(
'trials:grouptConsistencyAnalysis:button:RandomCreate' 'trials:grouptConsistencyAnalysis:button:RandomCreate'
@ -901,6 +906,7 @@
style="margin-top: 40px" style="margin-top: 40px"
:IsSelfAnalysis="IsSelfAnalysis" :IsSelfAnalysis="IsSelfAnalysis"
:changeNum="changeNum" :changeNum="changeNum"
:other-info="OtherInfo"
@close=" @close="
() => { () => {
ReaderRulesVisible2 = false; ReaderRulesVisible2 = false;
@ -952,6 +958,7 @@
> >
<DoctorConsistentRuleSubjectTable <DoctorConsistentRuleSubjectTable
:data="rowData" :data="rowData"
:other-info="OtherInfo"
@close=" @close="
() => { () => {
DoctorConsistentRuleSubjectTableVisible = false; DoctorConsistentRuleSubjectTableVisible = false;