申办方、cro项目中新增

uat_us
wangxiaoshuang 2024-05-31 17:45:33 +08:00
parent 7e7e374e38
commit 6737d33dcb
2 changed files with 451 additions and 193 deletions

View File

@ -353,12 +353,14 @@ async function VueInit() {
return
}
_vm.$store.dispatch('user/logout').then(res => {
window.location.href = `/login`
})
// window.location.href = `/login`
router.push("/login")
}).then(()=>{
_vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
type: 'warning',
})
})
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'

View File

@ -12,29 +12,58 @@
>
<el-row>
<!-- 项目编号 -->
<el-form-item v-if="trialForm.Id!== ''" :label="$t('trials:trials-list:form:trialId')" prop="TrialCode">
<el-form-item
v-if="trialForm.Id !== ''"
:label="$t('trials:trials-list:form:trialId')"
prop="TrialCode"
>
<el-input v-model="trialForm.TrialCode" />
</el-form-item>
<!-- 项目类型 -->
<el-form-item :label="$t('trials:trials-list:form:trialType')" prop="TrialType">
<el-radio-group v-model="trialForm.TrialType " :disabled="trialForm.Id!== ''">
<el-radio v-for="item of $d.TrialType" :disabled="isTestUser && (item.value === 1 || item.value === 2)" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
<el-form-item
:label="$t('trials:trials-list:form:trialType')"
prop="TrialType"
>
<el-radio-group
v-model="trialForm.TrialType"
:disabled="trialForm.Id !== ''"
>
<el-radio
v-for="item of $d.TrialType"
:disabled="isTestUser && (item.value === 1 || item.value === 2)"
:key="item.id"
:label="item.value"
>{{ item.label }}</el-radio
>
</el-radio-group>
</el-form-item>
</el-row>
<el-row>
<!-- 试验名称 -->
<el-form-item :label="$t('trials:trials-list:form:experimentName')" prop="ExperimentName">
<el-input v-model="trialForm.ExperimentName" type="textarea" :autosize="{ minRows: 1, maxRows: 4}" />
<el-form-item
:label="$t('trials:trials-list:form:experimentName')"
prop="ExperimentName"
>
<el-input
v-model="trialForm.ExperimentName"
type="textarea"
:autosize="{ minRows: 1, maxRows: 4 }"
/>
</el-form-item>
<!-- 研究方案号 -->
<el-form-item :label="$t('trials:trials-list:form:researchNumber')" prop="ResearchProgramNo">
<el-form-item
:label="$t('trials:trials-list:form:researchNumber')"
prop="ResearchProgramNo"
>
<el-input v-model="trialForm.ResearchProgramNo" />
</el-form-item>
</el-row>
<el-row>
<!-- 主研单位 -->
<el-form-item :label="$t('trials:trials-list:form:researchUnit')" prop="MainResearchUnit">
<el-form-item
:label="$t('trials:trials-list:form:researchUnit')"
prop="MainResearchUnit"
>
<el-input v-model="trialForm.MainResearchUnit" />
</el-form-item>
<!-- 负责人PI -->
@ -45,9 +74,18 @@
<el-row>
<!-- 申办方 -->
<el-form-item :label="$t('trials:trials-list:form:sponsor')">
<el-select v-model="trialForm.SponsorId">
<el-select
v-model="trialForm.SponsorId"
filterable
allow-create
default-first-option
@change="(value) => handleSelectChange(value, 'sponsor')"
@visible-change="
(flag) => handleSelectVisibbleChange(flag, 'sponsor')
"
>
<el-option
v-for="(item) in sponsorList"
v-for="item in sponsorList"
:key="item.Id"
:label="item.SponsorName"
:value="item.Id"
@ -56,9 +94,18 @@
</el-form-item>
<!-- CRO -->
<el-form-item :label="$t('trials:trials-list:form:cro')">
<el-select v-model="trialForm.CROId">
<el-select
v-model="trialForm.CROId"
filterable
allow-create
default-first-option
@change="(value) => handleSelectChange(value, 'cro')"
@visible-change="
(flag) => handleSelectVisibbleChange(flag, 'sponsor')
"
>
<el-option
v-for="(item) of croList"
v-for="item of croList"
:key="item.Id"
:label="item.CROName"
:value="item.Id"
@ -68,7 +115,10 @@
</el-row>
<el-row>
<!-- DeclarationType -->
<el-form-item :label="$t('trials:trials-list:form:declarationType')" prop="DeclarationTypeEnumList">
<el-form-item
:label="$t('trials:trials-list:form:declarationType')"
prop="DeclarationTypeEnumList"
>
<el-select
v-model="trialForm.DeclarationTypeEnumList"
size="small"
@ -77,7 +127,12 @@
@change="handleDeclarationTypeChange"
style="width: 100%"
>
<el-option v-for="item of $d.DeclarationType" :key="item.value" :value="item.value" :label="item.label" />
<el-option
v-for="item of $d.DeclarationType"
:key="item.value"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<!-- Phase -->
@ -100,8 +155,14 @@
</el-row>
<el-row>
<!-- 适应症类型 IndicationType -->
<el-form-item :label="$t('trials:trials-list:form:indicationType')" prop="IndicationTypeId">
<el-select v-model="trialForm.IndicationTypeId" @change="handleIndicationTypeChange">
<el-form-item
:label="$t('trials:trials-list:form:indicationType')"
prop="IndicationTypeId"
>
<el-select
v-model="trialForm.IndicationTypeId"
@change="handleIndicationTypeChange"
>
<!-- <el-option
v-for="item of dictionaryList.IndicationType"
:key="item.Id"
@ -117,9 +178,16 @@
</el-select>
</el-form-item>
<!-- Indication -->
<el-form-item :label="$t('trials:trials-list:form:indication')" prop="IndicationEnum">
<el-form-item
:label="$t('trials:trials-list:form:indication')"
prop="IndicationEnum"
>
<!-- <el-input v-model="trialForm.Indication" />-->
<el-select :disabled="!trialForm.IndicationTypeId" v-if="![37, 38, 39].includes(trialForm.IndicationEnum)" v-model="trialForm.IndicationEnum">
<el-select
:disabled="!trialForm.IndicationTypeId"
v-if="![37, 38, 39].includes(trialForm.IndicationEnum)"
v-model="trialForm.IndicationEnum"
>
<el-option
v-for="item of $d.Indication"
v-show="indicationGrouping === item.raw.ChildGroup"
@ -130,7 +198,11 @@
</el-select>
<el-row v-if="[37, 38, 39].includes(trialForm.IndicationEnum)">
<el-col :span="12">
<el-select :disabled="!trialForm.IndicationTypeId" v-model="trialForm.IndicationEnum" style="width: 100%;margin-right: 10px;">
<el-select
:disabled="!trialForm.IndicationTypeId"
v-model="trialForm.IndicationEnum"
style="width: 100%; margin-right: 10px"
>
<el-option
v-for="item of $d.Indication"
v-show="indicationGrouping === item.raw.ChildGroup"
@ -141,7 +213,10 @@
</el-select>
</el-col>
<el-col :span="12">
<el-input :disabled="!trialForm.IndicationTypeId" v-model="trialForm.Indication" />
<el-input
:disabled="!trialForm.IndicationTypeId"
v-model="trialForm.Indication"
/>
</el-col>
</el-row>
</el-form-item>
@ -166,9 +241,12 @@
</el-form-item>
<!-- Sites -->
<el-form-item :label="$t('trials:trials-list:form:siteCount')">
<el-input-number v-model="trialForm.PlanSiteCount" controls-position="right" :min="0" />
<el-input-number
v-model="trialForm.PlanSiteCount"
controls-position="right"
:min="0"
/>
</el-form-item>
</el-row>
<el-row>
<!-- Expected Patients Num -->
@ -193,14 +271,19 @@
<el-row>
<!-- Visits -->
<el-form-item :label="$t('trials:trials-list:form:visitCount')">
<el-input-number v-model="trialForm.PlanVisitCount" controls-position="right" :min="0" />
<el-input-number
v-model="trialForm.PlanVisitCount"
controls-position="right"
:min="0"
/>
</el-form-item>
</el-row>
<el-row>
<!-- Expedited -->
<el-form-item :label="$t('trials:trials-list:form:expedited')" prop="Expedited">
<el-form-item
:label="$t('trials:trials-list:form:expedited')"
prop="Expedited"
>
<el-select v-model="trialForm.Expedited">
<el-option
v-for="item in expeditedOption"
@ -211,15 +294,21 @@
</el-select>
</el-form-item>
<!-- Turnaround Time -->
<el-form-item :label="$t('trials:trials-list:form:projectCycle')" prop="ProjectCycle">
<el-form-item
:label="$t('trials:trials-list:form:projectCycle')"
prop="ProjectCycle"
>
<el-input v-model="trialForm.ProjectCycle" />
</el-form-item>
</el-row>
<el-row>
<!-- Total Reviewers -->
<el-form-item :label="$t('trials:trials-list:form:totalReviewers')">
<el-input-number v-model="trialForm.TotalReviewers" controls-position="right" :min="0" />
<el-input-number
v-model="trialForm.TotalReviewers"
controls-position="right"
:min="0"
/>
</el-form-item>
<!-- Type of Reviewers -->
<el-form-item :label="$t('trials:trials-list:form:typeofReviewers')">
@ -229,7 +318,12 @@
multiple
clearable
>
<el-option v-for="item of $d.AttendedReviewerType" :key="item.value" :value="item.value" :label="item.label" />
<el-option
v-for="item of $d.AttendedReviewerType"
:key="item.value"
:value="item.value"
:label="item.label"
/>
</el-select>
<!-- <el-row v-if="trialForm.AttendedReviewerTypeEnumList.includes(2)">-->
<!-- <el-col :span="12">-->
@ -252,83 +346,68 @@
<el-row style="margin-left: 190px">
<el-form-item label="">
<el-button type="primary" :disabled="btnLoading" @click="handleCancel">
{{ $t('trials:trials-list:form:cancel') }}
{{ $t("trials:trials-list:form:cancel") }}
</el-button>
<el-button type="primary" :loading="btnLoading" @click="handleSave">
{{ $t('trials:trials-list:form:save') }}
{{ $t("trials:trials-list:form:save") }}
</el-button>
</el-form-item>
</el-row>
</el-form>
</template>
<script>
import store from '@/store'
import { mapGetters, mapState } from 'vuex'
import { getTrialInfo, addOrUpdateTrial } from '@/api/trials'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import store from "@/store";
import { mapState } from "vuex";
import { getTrialInfo, addOrUpdateTrial } from "@/api/trials";
import { getBasicDataSelects } from "@/api/dictionary/dictionary";
import { addOrUpdateSponsor, addOrUpdateCro } from "@/api/dictionary";
import { getAllSponsorList, getAllCROList } from "@/api/global";
export default {
name: 'TrialForm',
name: "TrialForm",
props: {
trialId: {
type: String,
default: ''
}
default: "",
},
},
data() {
const comfirmIndication = (rule, value, callback) => {
if ([37, 38, 39].includes(value)) {
if (!this.trialForm.Indication) {
return callback(new Error(this.$t('common:ruleMessage:specify')))
return callback(new Error(this.$t("common:ruleMessage:specify")));
}
}
callback()
}
// const comfirmDeclarationType = (rule, value, callback) => {
// console.log(value)
// if (value.includes(-1)) {
// if (!this.trialForm.DeclarationTypeOther) {
// return callback(new Error(this.$t('common:ruleMessage:specify')))
// }
// }
// callback()
// }
// const comfirmAttendedReviewerType = (rule, value, callback) => {
// if (value.includes(2)) {
// if (!this.trialForm.AttendedReviewerTypeOther) {
// return callback(new Error(this.$t('common:ruleMessage:specify')))
// }
// }
// callback()
// }
callback();
};
return {
trialForm: {
Id: '',
TrialCode: '',
Id: "",
TrialCode: "",
TrialType: null,
SponsorId: '',
SponsorId: "",
// CriterionIds: [],
CROId: '',
ReviewModeId: '',
CROId: "",
ReviewModeId: "",
ReviewTypeIds: [],
// 0
Expedited: '',
Expedited: "",
ModalityIds: [],
Note: '',
ExpectedPatients: '',
TimePointsPerPatient: '',
ProjectCycle: '',
TotalReviewers: '',
DeclarationTypeId: '',
IndicationTypeId: '',
PhaseId: '',
AttendedReviewerType: '',
Note: "",
ExpectedPatients: "",
TimePointsPerPatient: "",
ProjectCycle: "",
TotalReviewers: "",
DeclarationTypeId: "",
IndicationTypeId: "",
PhaseId: "",
AttendedReviewerType: "",
IsLocked: false,
ResearchProgramNo: '',
ExperimentName: '',
MainResearchUnit: '',
HeadPI: '',
ResearchProgramNo: "",
ExperimentName: "",
MainResearchUnit: "",
HeadPI: "",
PlanSiteCount: null,
PlanVisitCount: null,
IndicationEnum: null,
@ -336,48 +415,113 @@ export default {
AttendedReviewerTypeEnumList: [],
DeclarationTypeEnumList: [],
DeclarationTypeOther: null,
AttendedReviewerTypeOther: null
AttendedReviewerTypeOther: null,
},
indicationGrouping: null,
trialFormRules: {
TrialCode: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ max: 10, message: `${this.$t('common:ruleMessage:maxLength')} 10` }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{ max: 10, message: `${this.$t("common:ruleMessage:maxLength")} 10` },
],
TrialType: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
],
ResearchProgramNo: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ max: 100, message: `${this.$t('common:ruleMessage:maxLength')} 100` }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{
max: 100,
message: `${this.$t("common:ruleMessage:maxLength")} 100`,
},
],
ExperimentName: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500` }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{
max: 500,
message: `${this.$t("common:ruleMessage:maxLength")} 500`,
},
],
IndicationEnum: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ validator: comfirmIndication, trigger: 'blur' }
{
required: true,
message: this.$t("common:ruleMessage:specify"),
trigger: "blur",
},
{ validator: comfirmIndication, trigger: "blur" },
],
ProjectCycle: [
{ max: 50, message: `${this.$t("common:ruleMessage:maxLength")} 50` },
],
ProjectCycle: [{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }],
ReviewModeId: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
Expedited: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
Note: [
{
max: 500,
message: `${this.$t("common:ruleMessage:maxLength")} 500`,
},
],
Note: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500` }],
ModalityIds: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
PhaseId: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
IndicationTypeId: [
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
PhaseId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
IndicationTypeId: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }],
DeclarationTypeEnumList: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
ReviewTypeIds: [
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur', 'change'] }
]
{
required: true,
message: this.$t("common:ruleMessage:select"),
trigger: ["blur", "change"],
},
],
},
btnLoading: false,
isLock: false,
@ -386,132 +530,244 @@ export default {
declarationNum: null,
indicationNum: null,
phaseNum: null,
dictionaryList: {}
}
dictionaryList: {},
sponsorList: [],
croList: [],
};
},
computed: {
...mapGetters(['sponsorList', 'croList']),
...mapState('user', ['isTestUser'])
...mapState("user", ["isTestUser"]),
},
mounted() {
this.initPage()
console.log(this.isTestUser, 'isTestUser')
this.initPage();
console.log(this.isTestUser, "isTestUser");
},
methods: {
// CRO
handleSelectVisibbleChange(flag, key) {
if (flag) {
if (key === "sponsor") {
this.getAllSponsorList();
}
if (key === "cro") {
this.getAllCROList();
}
}
},
// CRO
async handleSelectChange(value, key) {
let arr = key == "sponsor" ? this.sponsorList : this.croList;
let has = arr.some((item) => item.Id === value);
if (!has) {
let res = null;
try {
if (key === "sponsor") {
let data = {
CroName: value,
CroNameCN: value,
IsTrialLevel: true,
};
res = await addOrUpdateSponsor(data);
}
if (key === "cro") {
let data = {
SponsorName: value,
SponsorNameCN: value,
IsTrialLevel: true,
};
res = await addOrUpdateCro(data);
}
if (res.IsSuccess) {
let obj = {
Id: res.Result,
CROName: value,
SponsorName: value,
};
arr.unshift(obj);
this.$nextTick(() => {
if (key === "sponsor") {
this.trialForm.SponsorId = res.Result;
}
if (key === "cro") {
this.trialForm.CROId = res.Result;
}
});
}
} catch (err) {
console.log(err);
if (key === "sponsor") {
this.trialForm.SponsorId = null;
}
if (key === "cro") {
this.trialForm.CROId = null;
}
}
}
},
async getAllSponsorList() {
try {
let res = await getAllSponsorList();
if (res.IsSuccess) {
this.sponsorList = res.Result;
}
} catch (err) {
console.log(err);
}
},
async getAllCROList() {
try {
let res = await getAllCROList();
if (res.IsSuccess) {
this.croList = res.Result;
}
} catch (err) {
console.log(err);
}
},
initForm() {
this.loading = true
getTrialInfo(this.trialId).then(res => {
this.loading = false
this.loading = true;
getTrialInfo(this.trialId)
.then((res) => {
this.loading = false;
if (res.IsSuccess) {
for (var item in this.trialForm) {
res.Result[item] === '00000000-0000-0000-0000-000000000000' ? '' : this.$set(this.trialForm, item, res.Result[item])
if (item === 'IndicationTypeId') {
this.indicationGrouping = this.$d.IndicationType.filter(v => v.id === res.Result[item])[0].raw.ChildGroup
res.Result[item] === "00000000-0000-0000-0000-000000000000"
? ""
: this.$set(this.trialForm, item, res.Result[item]);
if (item === "IndicationTypeId") {
this.indicationGrouping = this.$d.IndicationType.filter(
(v) => v.id === res.Result[item]
)[0].raw.ChildGroup;
}
}
}
}).catch(() => { this.loading = false })
})
.catch(() => {
this.loading = false;
});
},
handleSave() {
this.$refs.trialForm.validate(valid => {
this.$refs.trialForm.validate((valid) => {
if (valid) {
this.btnLoading = true
this.btnLoading = true;
if (!this.trialForm.Id) {
this.trialForm.TrialCode = `${this.declarationNum}${this.indicationNum}${this.phaseNum}`
console.log(this.trialForm.TrialCode)
this.trialForm.TrialCode = `${this.declarationNum}${this.indicationNum}${this.phaseNum}`;
console.log(this.trialForm.TrialCode);
}
var params = JSON.parse(JSON.stringify(this.trialForm))
console.log(params)
addOrUpdateTrial(params).then(res => {
this.btnLoading = false
var params = JSON.parse(JSON.stringify(this.trialForm));
console.log(params);
addOrUpdateTrial(params)
.then((res) => {
this.btnLoading = false;
if (!this.trialForm.Id) {
this.trialForm.Id = res.Result
this.$message.success(this.$t('trials:trials-list:message:addedSuccessfully'))
this.trialForm.Id = res.Result;
this.$message.success(
this.$t("trials:trials-list:message:addedSuccessfully")
);
} else {
this.$message.success(this.$t('trials:trials-list:message:updatedSuccessfully'))
this.$message.success(
this.$t("trials:trials-list:message:updatedSuccessfully")
);
}
this.$emit('getList')
this.$emit('closeDialog')
}).catch(() => {
this.btnLoading = false
this.$emit("getList");
this.$emit("closeDialog");
})
.catch(() => {
this.btnLoading = false;
});
}
})
});
},
handleCancel() {
this.$emit('closeDialog')
this.$emit("closeDialog");
// this.$refs['trialForm'].resetFields()
},
handleDeclarationTypeChange(val) {
console.log(val)
console.log(val);
if (val.length === 1) {
// this.declarationNum = this.dictionaryList.DeclarationType.filter(item => item.Idd === val)[0].ShowOrder
this.declarationNum = this.$d.DeclarationType.filter(item => item.value === val[0])[0].raw.ShowOrder
this.declarationNum = this.$d.DeclarationType.filter(
(item) => item.value === val[0]
)[0].raw.ShowOrder;
if (this.trialForm.Id) {
const ids = [...this.trialForm.TrialCode]
ids[2] = this.declarationNum
this.trialForm.TrialCode = ids.join('')
const ids = [...this.trialForm.TrialCode];
ids[2] = this.declarationNum;
this.trialForm.TrialCode = ids.join("");
}
} else {
this.declarationNum = 'X'
this.declarationNum = "X";
if (this.trialForm.Id) {
const ids = [...this.trialForm.TrialCode]
ids[2] = this.declarationNum
this.trialForm.TrialCode = ids.join('')
const ids = [...this.trialForm.TrialCode];
ids[2] = this.declarationNum;
this.trialForm.TrialCode = ids.join("");
}
}
},
handleIndicationTypeChange(val) {
this.indicationGrouping = null
this.indicationGrouping = null;
if (val) {
// this.indicationNum = this.dictionaryList.IndicationType.filter(item => item.Id === val)[0].ShowOrder
this.indicationNum = this.$d.IndicationType.filter(item => item.id === val)[0].raw.ShowOrder
this.indicationNum = this.$d.IndicationType.filter(
(item) => item.id === val
)[0].raw.ShowOrder;
if (this.trialForm.Id) {
const ids = [...this.trialForm.TrialCode]
ids[3] = this.indicationNum
this.trialForm.TrialCode = ids.join('')
const ids = [...this.trialForm.TrialCode];
ids[3] = this.indicationNum;
this.trialForm.TrialCode = ids.join("");
}
this.indicationGrouping = this.$d.IndicationType.filter(item => item.id === val)[0].raw.ChildGroup
this.indicationGrouping = this.$d.IndicationType.filter(
(item) => item.id === val
)[0].raw.ChildGroup;
}
this.trialForm.Indication = null
this.trialForm.Indication = null;
},
handlePhaseChange(val) {
if (val) {
// const phase = this.dictionaryList['Trial_Phase']
// this.phaseNum = phase.filter(item => item.Id === val)[0].ShowOrder
this.phaseNum = this.$d.Trial_Phase.filter(item => item.id === val)[0].raw.ShowOrder
this.phaseNum = this.$d.Trial_Phase.filter(
(item) => item.id === val
)[0].raw.ShowOrder;
if (this.trialForm.Id) {
const ids = [...this.trialForm.TrialCode]
ids[4] = this.phaseNum
this.trialForm.TrialCode = ids.join('')
const ids = [...this.trialForm.TrialCode];
ids[4] = this.phaseNum;
this.trialForm.TrialCode = ids.join("");
}
}
},
handleExpectedPatientsChange(val) {
this.trialForm.PlanVisitCount = val * this.trialForm.TimePointsPerPatient
this.trialForm.PlanVisitCount = val * this.trialForm.TimePointsPerPatient;
},
handleTpPerPatientChange(val) {
this.trialForm.PlanVisitCount = val * this.trialForm.ExpectedPatients
this.trialForm.PlanVisitCount = val * this.trialForm.ExpectedPatients;
},
async initPage() {
this.loading = true
await this.getDicData()
await store.dispatch('global/getSponsorList')
await store.dispatch('global/getCROList')
this.loading = true;
await this.getDicData();
await this.getAllSponsorList();
await this.getAllCROList();
if (this.trialId) {
this.trialForm.Id = this.trialId
this.initForm()
this.trialForm.Id = this.trialId;
this.initForm();
}
this.loading = false
this.loading = false;
},
getDicData() {
getBasicDataSelects(['DeclarationType', 'IndicationType', 'Modality', 'ReviewMode', 'ReviewType', 'Trial_Phase']).then(res => {
this.dictionaryList = { ...res.Result }
})
}
}
}
getBasicDataSelects([
"DeclarationType",
"IndicationType",
"Modality",
"ReviewMode",
"ReviewType",
"Trial_Phase",
]).then((res) => {
this.dictionaryList = { ...res.Result };
});
},
},
};
</script>
<style>
.trial-Form .el-input,