一致性分析受试者分配添加字段
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"
stripe
height="100"
style="min-height: 400px;"
style="min-height: 400px"
@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
prop="TrialSiteCode"
@ -35,25 +40,44 @@
sortable="custom"
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-->
<!-- prop="IsReReadingOrBackInfluenceAnalysis"-->
<!-- :label="$t('trials:grouptConsistencyAnalysis:table:backImpact')"-->
<!-- min-width="160"-->
<!-- sortable="custom"-->
<!-- show-overflow-tooltip>-->
<!-- <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="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="IsReReadingOrBackInfluenceAnalysis"-->
<!-- :label="$t('trials:grouptConsistencyAnalysis:table:backImpact')"-->
<!-- min-width="160"-->
<!-- sortable="custom"-->
<!-- show-overflow-tooltip>-->
<!-- <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="primary">{{ $fd('YesOrNo', scope.row.IsReReadingOrBackInfluenceAnalysis) }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
</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 v-else>{{$t('trials:grouptConsistencyAnalysis:message:createRandom')}}</div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<div v-else>
{{ $t("trials:grouptConsistencyAnalysis:message:createRandom") }}
</div>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
<el-form-item>
<!-- 取消 -->
<el-button
@ -62,39 +86,59 @@
type="primary"
@click="close"
>
{{ $t('common:button:cancel') }}
{{ $t("common:button:cancel") }}
</el-button>
<!-- 生成 -->
<el-button size="small" type="primary" :loading="btnLoading" @click="save">
{{data.IsAutoAllocateGenerateTask ? $t('trials:grouptConsistencyAnalysis:button:createRandom') : $t('trials:grouptConsistencyAnalysis:button:create')}}
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="save"
>
{{
data.IsAutoAllocateGenerateTask
? $t("trials:grouptConsistencyAnalysis:button:createRandom")
: $t("trials:grouptConsistencyAnalysis:button:create")
}}
</el-button>
</el-form-item>
</div>
</el-form>
</template>
<script>
import { getDoctorSelfConsistentRuleSubjectList, confirmGenerateSelfConsistentTask, getDoctorConsistentRuleSubjectList, confirmGenerateConsistentTask } from '@/api/trials/reading'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import {
getDoctorSelfConsistentRuleSubjectList,
confirmGenerateSelfConsistentTask,
getDoctorConsistentRuleSubjectList,
confirmGenerateConsistentTask,
} from "@/api/trials/reading";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
const searchDataDefault = () => {
return {
PageIndex: 1,
PageSize: 20,
Asc: true,
SortField: '',
SortField: "",
TrialId: null,
TaskConsistentRuleId: null
}
}
TaskConsistentRuleId: null,
};
};
export default {
name: 'TrialsNotice',
name: "TrialsNotice",
components: { BaseContainer, Pagination },
props: {
data: {
type: Object,
default() {
return {}
}
return {};
},
},
OtherInfo: {
type: Object,
default() {
return {};
},
},
},
data() {
@ -105,71 +149,82 @@ export default {
loading: false,
trialId: this.$route.query.trialId,
SelectList: [],
btnLoading: false
}
btnLoading: false,
};
},
mounted() {
this.searchData.TaskConsistentRuleId = this.data.Id
this.searchData.DoctorUserId = this.data.AnalysisDoctorUser.UserId
this.getList()
this.searchData.TaskConsistentRuleId = this.data.Id;
this.searchData.DoctorUserId = this.data.AnalysisDoctorUser.UserId;
this.getList();
},
methods: {
selectable(row) {
if (row.IsHaveGeneratedTask) {
return false
return false;
} else {
return true
return true;
}
},
handleSelectChange(e) {
this.SelectList = e
this.SelectList = e;
},
save () {
if (this.SelectList.length === 0 && !this.data.IsAutoAllocateGenerateTask) {
save() {
if (
this.SelectList.length === 0 &&
!this.data.IsAutoAllocateGenerateTask
) {
// ''
this.$alert(this.$t('trials:grouptConsistencyAnalysis:message:msg1'))
return
this.$alert(this.$t("trials:grouptConsistencyAnalysis:message:msg1"));
return;
}
this.btnLoading = true
this.loading = true
this.btnLoading = true;
this.loading = true;
var params = {
TaskConsistentRuleId: this.searchData.TaskConsistentRuleId,
SubejctIdList: this.SelectList.map(v => v.SubjectId),
SubejctIdList: this.SelectList.map((v) => v.SubjectId),
DoctorUserId: this.searchData.DoctorUserId,
IsAutoAllocateGenerateTask: this.data.IsAutoAllocateGenerateTask
}
confirmGenerateSelfConsistentTask(params).then(res => {
this.loading = false
this.btnLoading = false
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$emit('getList')
this.close()
}).catch(() => {
this.loading = false
this.btnLoading = false
IsAutoAllocateGenerateTask: this.data.IsAutoAllocateGenerateTask,
};
confirmGenerateSelfConsistentTask(params)
.then((res) => {
this.loading = false;
this.btnLoading = false;
this.$message.success(this.$t("common:message:savedSuccessfully"));
this.$emit("getList");
this.close();
})
.catch(() => {
this.loading = false;
this.btnLoading = false;
});
},
getList() {
this.searchData.TrialId = this.$route.query.trialId
this.loading = true
getDoctorSelfConsistentRuleSubjectList(this.searchData).then(res => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => { this.loading = false })
this.searchData.TrialId = this.$route.query.trialId;
this.loading = true;
getDoctorSelfConsistentRuleSubjectList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
})
.catch(() => {
this.loading = false;
});
},
close() {
this.$emit("close");
},
close() { this.$emit('close') },
//
handleSortChange(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
if (column.order === "ascending") {
this.searchData.Asc = true;
} else {
this.searchData.Asc = false
this.searchData.Asc = false;
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
}
}
}
this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1;
this.getList();
},
},
};
</script>

View File

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

View File

@ -832,7 +832,12 @@
<el-button
circle
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="
$t(
'trials:grouptConsistencyAnalysis:button:RandomCreate'
@ -901,6 +906,7 @@
style="margin-top: 40px"
:IsSelfAnalysis="IsSelfAnalysis"
:changeNum="changeNum"
:other-info="OtherInfo"
@close="
() => {
ReaderRulesVisible2 = false;
@ -952,6 +958,7 @@
>
<DoctorConsistentRuleSubjectTable
:data="rowData"
:other-info="OtherInfo"
@close="
() => {
DoctorConsistentRuleSubjectTableVisible = false;