Merge branch 'main' into uat_us
commit
24303b208d
|
@ -327,7 +327,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let lang = zzSessionStorage.getItem('lang') || 'zh'
|
let lang = zzSessionStorage.getItem('lang') || 'zh'
|
||||||
zzSessionStorage.clear()
|
// zzSessionStorage.clear()
|
||||||
this.loginType = this.$route.query.loginType
|
this.loginType = this.$route.query.loginType
|
||||||
this.location = this.$route.query.location
|
this.location = this.$route.query.location
|
||||||
zzSessionStorage.setItem('loginType', this.loginType)
|
zzSessionStorage.setItem('loginType', this.loginType)
|
||||||
|
@ -414,6 +414,8 @@ export default {
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
} else if (res.IsMFA) {
|
} else if (res.IsMFA) {
|
||||||
|
zzSessionStorage.removeItem('userId')
|
||||||
|
zzSessionStorage.removeItem('identityUserId')
|
||||||
this.$MFA({
|
this.$MFA({
|
||||||
UserId: res.BasicInfo.IdentityUserId,
|
UserId: res.BasicInfo.IdentityUserId,
|
||||||
EMail: res.BasicInfo.EMail,
|
EMail: res.BasicInfo.EMail,
|
||||||
|
|
|
@ -83,7 +83,18 @@
|
||||||
:label="$t('trials:site:table:subjects')"
|
:label="$t('trials:site:table:subjects')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.SubjectCount > 0 && hasSubjectRoute"
|
||||||
|
type="text"
|
||||||
|
@click="jumpToSubjectList(scope.row.TrialSiteId)"
|
||||||
|
>
|
||||||
|
{{ scope.row.SubjectCount }}
|
||||||
|
</el-button>
|
||||||
|
<span v-else> {{ scope.row.SubjectCount }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- Visits -->
|
<!-- Visits -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="VisitCount"
|
prop="VisitCount"
|
||||||
|
@ -91,7 +102,18 @@
|
||||||
:label="$t('trials:site:table:visits')"
|
:label="$t('trials:site:table:visits')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.VisitCount > 0 && hasVisitRoute"
|
||||||
|
type="text"
|
||||||
|
@click="jumpToVisitList(scope.row.TrialSiteId)"
|
||||||
|
>
|
||||||
|
{{ scope.row.VisitCount }}
|
||||||
|
</el-button>
|
||||||
|
<span v-else> {{ scope.row.VisitCount }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- Staff -->
|
<!-- Staff -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="UserCount"
|
prop="UserCount"
|
||||||
|
@ -220,11 +242,16 @@ export default {
|
||||||
userListLoading: '',
|
userListLoading: '',
|
||||||
userList: [],
|
userList: [],
|
||||||
trialId: '',
|
trialId: '',
|
||||||
|
hasSubjectRoute: false,
|
||||||
|
hasVisitRoute: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.trialId = this.$route.query.trialId
|
this.trialId = this.$route.query.trialId
|
||||||
|
const trialsRouter = this.$store.getters.routes.find(r => { return r.name === 'Trials' })
|
||||||
|
const trialsPanelRouter = trialsRouter.children.find(r => { return r.name === 'TrialsPanel' }).children
|
||||||
|
this.hasSubjectRoute = this.hasRoute('subject-list', trialsPanelRouter)
|
||||||
|
this.hasVisitRoute = this.hasRoute('crc-upload', trialsPanelRouter)
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -273,6 +300,26 @@ export default {
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
jumpToSubjectList(trialSiteId) {
|
||||||
|
this.$router.push({ path: `/trials/trials-panel/subject/subject-list?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&trialSiteId=${trialSiteId}` })
|
||||||
|
},
|
||||||
|
jumpToVisitList(trialSiteId) {
|
||||||
|
this.$router.push({ path: `/trials/trials-panel/visit/crc-upload?trialId=${this.$route.query.trialId}&trialCode=${this.$route.query.trialCode}&researchProgramNo=${this.$route.query.researchProgramNo}&trialSiteId=${trialSiteId}` })
|
||||||
|
},
|
||||||
|
hasRoute(name, routeList) {
|
||||||
|
for (let i = 0; i < routeList.length; i++) {
|
||||||
|
if (routeList[i].name === name) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (routeList[i].children) {
|
||||||
|
const flag = this.hasRoute(name, routeList[i].children)
|
||||||
|
if (flag) {
|
||||||
|
return flag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -291,6 +291,7 @@ import SubjectsForm from './components/SubjectsForm'
|
||||||
import SubjectStatusForm from './components/SubjectStatusForm'
|
import SubjectStatusForm from './components/SubjectStatusForm'
|
||||||
import MessageTable from './components/MessageTable'
|
import MessageTable from './components/MessageTable'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { changeURLStatic } from '@/utils/history.js'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
Code: '',
|
Code: '',
|
||||||
|
@ -339,6 +340,10 @@ export default {
|
||||||
this.hasCrcRoute = this.hasRoute('crc-upload', trialsPanelRouter)
|
this.hasCrcRoute = this.hasRoute('crc-upload', trialsPanelRouter)
|
||||||
this.hasQCRoute = this.hasRoute('qc-check', trialsPanelRouter)
|
this.hasQCRoute = this.hasRoute('qc-check', trialsPanelRouter)
|
||||||
this.trialId = this.$route.query.trialId
|
this.trialId = this.$route.query.trialId
|
||||||
|
if (this.$route.query.trialSiteId) {
|
||||||
|
this.searchData.TrialSiteId = this.$route.query.trialSiteId
|
||||||
|
changeURLStatic('trialSiteId', '')
|
||||||
|
}
|
||||||
this.getSite()
|
this.getSite()
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
|
@ -1680,8 +1680,13 @@ export default {
|
||||||
this.getSite()
|
this.getSite()
|
||||||
if (this.$route.query.subjectCode) {
|
if (this.$route.query.subjectCode) {
|
||||||
this.searchData.SubjectInfo = this.$route.query.subjectCode
|
this.searchData.SubjectInfo = this.$route.query.subjectCode
|
||||||
}
|
|
||||||
changeURLStatic('subjectCode', '')
|
changeURLStatic('subjectCode', '')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.$route.query.trialSiteId) {
|
||||||
|
this.searchData.TrialSiteId = this.$route.query.trialSiteId
|
||||||
|
changeURLStatic('trialSiteId', '')
|
||||||
|
}
|
||||||
this.TrialCode = this.$route.query.trialCode
|
this.TrialCode = this.$route.query.trialCode
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getVisitPlanOptions()
|
this.getVisitPlanOptions()
|
||||||
|
|
Loading…
Reference in New Issue