Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-11-07 11:35:58 +08:00
17 changed files with 418 additions and 231 deletions
+25 -17
View File
@@ -456,10 +456,12 @@ export default {
},
// 输入框输入事件
setPassword(val) {
console.log(val)
if (this.isShowPassword) {
this.loginForm.password = val
} else {
let reg = /[0-9a-zA-Z]/g // 只允许输入字母和数字
let reg =
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-_.@^+\$!%#*?&\$~])[A-Za-z0-9-~_.@^+\$~!%#*?&]{8,32}$/g // 只允许输入字母和数字
let nDot = /[^●]/g // 非圆点字符
let index = -1 // 新输入的字符位置
let lastChar = void 0 // 新输入的字符
@@ -475,25 +477,31 @@ export default {
}
})
// 判断输入的字符是否符合规范,不符合的话去掉该字符
if (lastChar && !reg.test(lastChar)) {
coverArr.splice(index, 1)
this.pwdCover = coverArr.join('')
return
}
if (realLen < coverLen) {
// 新增字符
realArr.splice(index, 0, lastChar)
} else if (coverLen <= realLen && index !== -1) {
// 替换字符(选取一个或多个字符直接替换)
realArr.splice(index, realLen - (coverLen - 1), lastChar)
} else {
// 删除字符,因为 val 全是 ● ,没有办法匹配,不知道是从末尾还是中间删除的字符,删除了几个,不好对 password 处理,所以可以通过光标的位置和 val 的长度来判断
let pos = document.getElementById('pwd').selectionEnd // 获取光标位置
realArr.splice(pos, realLen - coverLen)
// if (lastChar && !reg.test(lastChar)) {
// coverArr.splice(index, 1)
// this.pwdCover = coverArr.join('')
// console.log(111111111111111, lastChar)
// // return
// }
if (coverLen - realLen <= 2) {
if (realLen < coverLen) {
// 新增字符
realArr.splice(index, 0, lastChar)
} else if (coverLen <= realLen && index !== -1) {
// 替换字符(选取一个或多个字符直接替换)
realArr.splice(index, realLen - (coverLen - 1), lastChar)
} else {
// 删除字符,因为 val 全是 ● ,没有办法匹配,不知道是从末尾还是中间删除的字符,删除了几个,不好对 password 处理,所以可以通过光标的位置和 val 的长度来判断
let pos = document.getElementById('pwd').selectionEnd // 获取光标位置
realArr.splice(pos, realLen - coverLen)
}
}
// 将 pwdCover 替换成 ●
this.pwdCover = val.replace(/\S/g, '●')
this.loginForm.password = realArr.join('')
let v = val.replace(/●/g, '')
this.loginForm.password =
coverLen - realLen >= 2 ? realArr.join('') + v : realArr.join('')
}
},
// 点击右侧小眼睛控制显示隐藏
@@ -30,7 +30,7 @@
{{ $t('curriculumVitae:curriculum:fileTitle:EN') }}
</div>
<template v-if="resumeListEN.length > 0">
<div class="file" v-for="item in resumeListEN" :key="item">
<div class="file" v-for="item in resumeListEN" :key="item.FileName">
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
<i
class="el-icon-download"
@@ -6,6 +6,7 @@
<template v-if="DATA.FirstName && DATA.LastName">
<div class="userInfo">
<span>{{ DATA.FirstName }}{{ DATA.LastName }}</span>
<span>{{ $fd('Sex', DATA.Sex) }}</span>
<span v-if="isEN">
{{
Array.isArray(DATA.TitleList) && DATA.TitleList.length > 0
@@ -494,11 +495,13 @@ export default {
openEdit() {
this.form = defaultForm()
Object.keys(this.form).forEach((key) => {
if (this.DATA[key]) {
if (this.DATA[key] || this.DATA[key] == 0) {
this.form[key] = this.DATA[key]
}
})
this.model_cfg.visible = true
console.log(this.form)
console.log(this.DATA)
},
handleCancle() {
this.form = defaultForm()
@@ -13,6 +13,7 @@
? reviewerData.BasicInfoView.BlindName
: reviewerData.BasicInfoView.BlindNameCN
}}</span>
<span>{{ $fd('Sex', reviewerData.BasicInfoView.Sex) }}</span>
<span v-if="isEN">
{{
Array.isArray(reviewerData.BasicInfoView.TitleList) &&
@@ -536,7 +537,7 @@
{{ $t('curriculumVitae:curriculum:fileTitle:EN') }}
</div>
<template v-if="true">
<div class="file" v-for="item in resumeListEN" :key="item">
<div class="file" v-for="item in resumeListEN" :key="item.FileName">
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
<i
class="el-icon-download"
@@ -701,6 +702,10 @@ export default {
type: String,
default: '',
},
trialId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
@@ -830,7 +835,7 @@ export default {
try {
let id = this.reviewerId
this.loading = true
let res = await getDetail(id)
let res = await getDetail(id, this.trialId)
this.loading = false
if (res.IsSuccess) {
this.reviewerData = res.Result
+7 -2
View File
@@ -15,7 +15,12 @@
<el-menu-item index="3">{{
$t('trials:trials-myinfo:menuTitle:loginLog')
}}</el-menu-item>
<div index="4" @click="handleSelect('4')" class="el-menu-item">
<div
index="4"
@click="handleSelect('4')"
class="el-menu-item"
v-if="hasPermi(['role:ir'])"
>
{{ $t('trials:trials-myinfo:menuTitle:resume') }}
</div>
</el-menu>
@@ -73,7 +78,7 @@ export default {
}
let id = await this.useUserIDGetDoctorID()
const routeData = this.$router.resolve({
path: `/curriculumVitae?id=${id}&&lang=${this.$i18n.locale}`,
path: `/curriculumVitae?Id=${id}&&lang=${this.$i18n.locale}`,
})
this.open = window.open(routeData.href, '_blank')
} else {
@@ -107,7 +107,7 @@
icon="el-icon-view"
circle
:title="$t('trials:spmEnroll:button:view')"
@click="lookResumeInfo(scope.row)"
@click="handleDetail(scope.row)"
/>
<!-- 同意 -->
<el-button
@@ -219,9 +219,11 @@ export default {
},
handleSelectTable(row) { return row.DoctorTrialState !== 8 },
handleDetail(row) {
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`,
})
window.open(href, '_blank')
}
},
}
}
</script>
@@ -27,7 +27,7 @@
>
<template slot-scope="scope">
<!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> -->
<span style="color: #428bca;cursor: pointer;" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span>
<span style="color: #428bca;cursor: pointer;" @click="go(`/trialsResume?doctorId=${scope.row.Id}&trialId=${$route.query.trialId}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span>
</template>
</el-table-column>
<!-- Name CN -->
@@ -160,7 +160,7 @@ export default {
},
handleSelectTable(row) { return row.DoctorTrialState !== 8 },
handleDetail(row) {
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}` })
window.open(href, '_blank')
}
}
@@ -1,13 +1,13 @@
<template>
<BaseContainer>
<template slot="search-container">
<div style="margin-left:auto;">
<div style="margin-left: auto">
<!-- Confirm -->
<el-button
v-if="hasPermi(['role:pm'])"
icon="el-icon-check"
type="primary"
:disabled="confirmIdArr.length==0"
:disabled="confirmIdArr.length == 0"
:loading="loading"
@click="handleConfirm"
>
@@ -18,7 +18,7 @@
<template slot="main-container">
<el-table
v-loading="listLoading"
v-adaptive="{bottomOffset:65}"
v-adaptive="{ bottomOffset: 65 }"
height="100"
:data="list"
class="table"
@@ -38,7 +38,15 @@
>
<template slot-scope="scope">
<!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> -->
<span style="color: #428bca;cursor: pointer;" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span>
<span
style="color: #428bca; cursor: pointer"
@click="
go(
`/trialsResume?doctorId=${scope.row.Id}&trialId=${$route.query.trialId}&token=${token}`
)
"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span
>
</template>
</el-table-column>
<!-- Name CN -->
@@ -64,9 +72,15 @@
min-width="120"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.DoctorTrialState === 10" type="primary">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 9" type="warning">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 8" type="danger">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 10" type="primary">{{
$fd('DoctorTrialState', scope.row.DoctorTrialState)
}}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 9" type="warning">{{
$fd('DoctorTrialState', scope.row.DoctorTrialState)
}}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 8" type="danger">{{
$fd('DoctorTrialState', scope.row.DoctorTrialState)
}}</el-tag>
</template>
</el-table-column>
<!-- Confirmor -->
@@ -87,7 +101,13 @@
</template>
</el-table-column> -->
</el-table>
<pagination class="page" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="listQuery.PageIndex"
:limit.sync="listQuery.PageSize"
@pagination="getList"
/>
</template>
</BaseContainer>
</template>
@@ -108,15 +128,17 @@ export default {
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: ''
SortField: '',
},
total: 0,
listLoading: false,
confirmIdArr: [],
token: store.getters.token
token: store.getters.token,
}
},
created() { this.initPage() },
created() {
this.initPage()
},
methods: {
go(path) {
window.open(path)
@@ -127,23 +149,27 @@ export default {
getList() {
this.listLoading = true
this.listQuery.TrialId = this.$route.query.trialId
getConfirmationReviewerList(this.listQuery).then(res => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
// eslint-disable-next-line handle-callback-err
}).catch(() => { this.listLoading = false })
getConfirmationReviewerList(this.listQuery)
.then((res) => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
// eslint-disable-next-line handle-callback-err
})
.catch(() => {
this.listLoading = false
})
},
handleConfirm() {
// Reviewer(s) Confirmed?
this.$confirm(this.$t('trials:seletctedReviews:message:msg2'), {
type: 'warning',
distinguishCancelAndClose: true
distinguishCancelAndClose: true,
})
.then(() => {
this.doctorConfirm(1)
})
.catch(action => {
.catch((action) => {
// if (action === 'cancel') {
// this.doctorConfirm(0)
// }
@@ -157,15 +183,17 @@ export default {
DoctorIdArray: this.confirmIdArr,
ConfirmState: state,
BaseUrl: `${location.protocol}//${location.host}/login`,
RouteUrl: `${location.protocol}//${location.host}/email-recompose`
RouteUrl: `${location.protocol}//${location.host}/email-recompose`,
}
confirmReviewer(params).then(res => {
this.loading = false
this.getList()
this.$message.success(this.$t('common:message:savedSuccessfully'))
}).catch(() => {
this.loading = false
})
confirmReviewer(params)
.then((res) => {
this.loading = false
this.getList()
this.$message.success(this.$t('common:message:savedSuccessfully'))
})
.catch(() => {
this.loading = false
})
},
handleSelectionChange(val) {
const arr = []
@@ -189,19 +217,23 @@ export default {
return 'selected'
}
},
handleSelectTable(row) { return row.DoctorTrialState !== 10 },
handleSelectTable(row) {
return row.DoctorTrialState !== 10
},
handleDetail(row) {
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`,
})
window.open(href, '_blank')
},
cellColor({ row, column, rowIndex, columnIndex }) {
if (row.DoctorTrialState === 10 && columnIndex === 5) {
return {
color: '#428bca'
color: '#428bca',
}
}
}
}
},
},
}
</script>
@@ -168,7 +168,9 @@
<span
style="color: #428bca; cursor: pointer"
@click="
go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)
go(
`/trialsResume?doctorId=${scope.row.Id}&trialId=${$route.query.trialId}&token=${token}`
)
"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span
>
@@ -581,7 +583,7 @@ export default {
},
handleDetail(row) {
const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}`,
path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`,
})
window.open(href, '_blank')
},
@@ -1,11 +1,11 @@
<template>
<BaseContainer>
<template slot="search-container">
<div style="margin-left:auto;">
<div style="margin-left: auto">
<!-- 提交 -->
<el-button
type="primary"
:disabled="submitIdArr.length==0"
:disabled="submitIdArr.length == 0"
icon="el-icon-check"
:loading="loading"
@click="handleSubmit"
@@ -28,7 +28,7 @@
<template slot="main-container">
<el-table
v-loading="listLoading"
v-adaptive="{bottomOffset:65}"
v-adaptive="{ bottomOffset: 65 }"
height="100"
:data="list"
class="table"
@@ -47,7 +47,15 @@
min-width="120"
>
<template slot-scope="scope">
<span style="color: #428bca;cursor: pointer;" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span>
<span
style="color: #428bca; cursor: pointer"
@click="
go(
`/trialsResume?doctorId=${scope.row.Id}&trialId=${$route.query.trialId}&token=${token}`
)
"
>{{ scope.row.LastName }} / {{ scope.row.FirstName }}</span
>
<!-- <el-button type="text" @click="go(`/trialsResume?doctorId=${scope.row.Id}&token=${token}`)">{{ scope.row.LastName }} / {{ scope.row.FirstName }}</el-button> -->
</template>
</el-table-column>
@@ -74,8 +82,12 @@
min-width="100"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.DoctorTrialState === 5" type="primary">{{ $fd('DoctorTrialState', scope.row.DoctorTrialState) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('DoctorTrialState', 16) }}</el-tag>
<el-tag v-if="scope.row.DoctorTrialState === 5" type="primary">{{
$fd('DoctorTrialState', scope.row.DoctorTrialState)
}}</el-tag>
<el-tag v-else type="danger">{{
$fd('DoctorTrialState', 16)
}}</el-tag>
</template>
</el-table-column>
<!-- Submitter -->
@@ -106,7 +118,13 @@
</template>
</el-table-column>
</el-table>
<pagination class="page" :total="total" :page.sync="listQuery.PageIndex" :limit.sync="listQuery.PageSize" @pagination="getList" />
<pagination
class="page"
:total="total"
:page.sync="listQuery.PageIndex"
:limit.sync="listQuery.PageSize"
@pagination="getList"
/>
<el-dialog
:title="$t('trials:seletctedReviews:title:language')"
@@ -120,8 +138,12 @@
<el-radio :label="1">中文</el-radio>
</el-radio-group>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{ $t('common:button:cancel') }}</el-button>
<el-button type="primary" @click="handleDownloadResumes">{{ $t('common:button:save') }}</el-button>
<el-button @click="dialogVisible = false">{{
$t('common:button:cancel')
}}</el-button>
<el-button type="primary" @click="handleDownloadResumes">{{
$t('common:button:save')
}}</el-button>
</span>
</el-dialog>
</template>
@@ -130,11 +152,15 @@
<script>
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import { getSubmissionOrApprovalReviewerList, submitReviewer, downloadResume } from '@/api/trials'
import {
getSubmissionOrApprovalReviewerList,
submitReviewer,
downloadResume,
} from '@/api/trials'
import { getTrialDoctorOfficialResume } from '@/api/reviewers'
import store from '@/store'
import axios from "axios";
import JSZip from "jszip";
import axios from 'axios'
import JSZip from 'jszip'
import { saveAs } from 'file-saver'
const enrollState = 1
export default {
@@ -149,7 +175,7 @@ export default {
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: ''
SortField: '',
},
loading: false,
total: 0,
@@ -158,10 +184,12 @@ export default {
dialogVisible: false,
language: 2,
token: store.getters.token,
selectTable: {}
selectTable: {},
}
},
created() { this.initPage() },
created() {
this.initPage()
},
methods: {
go(path) {
window.open(path)
@@ -172,35 +200,41 @@ export default {
getList() {
this.listLoading = true
this.listQuery.TrialId = this.$route.query.trialId
getSubmissionOrApprovalReviewerList(this.listQuery).then(res => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
// eslint-disable-next-line handle-callback-err
}).catch(() => { this.listLoading = false })
getSubmissionOrApprovalReviewerList(this.listQuery)
.then((res) => {
this.listLoading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
// eslint-disable-next-line handle-callback-err
})
.catch(() => {
this.listLoading = false
})
},
handleSubmit() {
// 是否确认提交?
this.$confirm(this.$t('trials:seletctedReviews:message:msg2'), {
type: 'warning'
type: 'warning',
}).then(() => {
this.loading = true
const trialId = this.$route.query.trialId
submitReviewer(trialId, this.submitIdArr, 1).then(res => {
this.loading = false
if (res.IsSuccess) {
this.getList()
// 保存成功
this.$message.success(this.$t('common:message:savedSuccessfully'))
if(res.Result.IsHaveSPMOrCPM){
this.$emit('nextStep', 'approval')
}else{
this.$emit('nextStep', 'confirmation')
submitReviewer(trialId, this.submitIdArr, 1)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
this.getList()
// 保存成功
this.$message.success(this.$t('common:message:savedSuccessfully'))
if (res.Result.IsHaveSPMOrCPM) {
this.$emit('nextStep', 'approval')
} else {
this.$emit('nextStep', 'confirmation')
}
}
}
}).catch(() => {
this.loading = false
})
})
.catch(() => {
this.loading = false
})
})
},
handleSelectionChange(val) {
@@ -225,9 +259,13 @@ export default {
return 'selected'
}
},
handleSelectTable(row) { return row.DoctorTrialState !== 5 },
handleSelectTable(row) {
return row.DoctorTrialState !== 5
},
handleDetail(row) {
const { href } = this.$router.resolve({ path: `/trialsResume?doctorId=${row.Id}` })
const { href } = this.$router.resolve({
path: `/trialsResume?doctorId=${row.Id}&trialId=${this.$route.query.trialId}`,
})
window.open(href, '_blank')
},
handleDownloadAll() {
@@ -243,68 +281,81 @@ export default {
return new Promise((resolve, reject) => {
axios(fileUrl, {
method: 'GET',
responseType: 'blob' // 返回的数据会被强制转为blob类型 ,转换成arraybuffer 也行
}).then((res) => {
console.log('res', res)
resolve(res)
}).catch(error => {
reject(error)
responseType: 'blob', // 返回的数据会被强制转为blob类型 ,转换成arraybuffer 也行
})
.then((res) => {
console.log('res', res)
resolve(res)
})
.catch((error) => {
reject(error)
})
})
},
async handleBatchDown(dataSource) {
return new Promise(resolve => {
return new Promise((resolve) => {
console.log('开始压缩')
const zip = new JSZip() // 创建实例对象
const promises = []
dataSource.FileList.forEach((item) => {
console.log(this.OSSclientConfig.basePath + item.Path)
const promise = this.getFileData(this.OSSclientConfig.basePath + item.Path).then((res) => {
const promise = this.getFileData(
this.OSSclientConfig.basePath + item.Path
).then((res) => {
const fileName = item.FileName + ''
// 创建文件用file(),创建文件夹用 floder()
zip.file(fileName, res.data, {binary: true})
zip.file(fileName, res.data, { binary: true })
})
promises.push(promise)
})
console.log(promises)
// 生成 zip 文件
Promise.all(promises).then(() => {
// 生成zip 文件
zip.generateAsync({
type: 'blob',
compression: 'DEFLATE', // STORE: 默认不压缩, DEFLATE:需要压缩
compressionOptions: {
level: 9 // 压缩等级 1~9 1 压缩速度最快, 9 最优压缩方式
}
}).then((res) => {
saveAs(res, dataSource.ReviewerCode + '_Sub.zip') // 使用FileSaver.saveAs保存文件,文件名可自定义
Promise.all(promises)
.then(() => {
// 生成zip 文件
zip
.generateAsync({
type: 'blob',
compression: 'DEFLATE', // STORE: 默认不压缩, DEFLATE:需要压缩
compressionOptions: {
level: 9, // 压缩等级 1~9 1 压缩速度最快, 9 最优压缩方式
},
})
.then((res) => {
saveAs(res, dataSource.ReviewerCode + '_Sub.zip') // 使用FileSaver.saveAs保存文件,文件名可自定义
resolve()
})
})
.catch((reason) => {
resolve()
})
}).catch(reason => {
resolve()
})
})
},
handleDownloadResumes() {
getTrialDoctorOfficialResume({
doctorIdList:this.selectTable.Id?[this.selectTable.Id]: this.list.map(v => {return v.Id}),
language: this.language
}).then(async res => {
this.selectTable = {};
this.dialogVisible = false
if (!res.Result || res.Result.length === 0) {
this.$alert(this.$t('trials:seletctedReviews:table:noResume'))
}else{
for (let i = 0; res.Result.length > i; i++) {
let item = res.Result[i]
await this.handleBatchDown(item)
}
}
}).catch(err=>{
this.dialogVisible = false;
this.selectTable= {};
doctorIdList: this.selectTable.Id
? [this.selectTable.Id]
: this.list.map((v) => {
return v.Id
}),
language: this.language,
})
.then(async (res) => {
this.selectTable = {}
this.dialogVisible = false
if (!res.Result || res.Result.length === 0) {
this.$alert(this.$t('trials:seletctedReviews:table:noResume'))
} else {
for (let i = 0; res.Result.length > i; i++) {
let item = res.Result[i]
await this.handleBatchDown(item)
}
}
})
.catch((err) => {
this.dialogVisible = false
this.selectTable = {}
})
// this.dialogVisible = false
// const arr = []
// for (let index = 0; index < this.list.length; index++) {
@@ -313,9 +364,13 @@ export default {
// this.downloadResume(arr)
},
downloadResume(arr) {
downloadResume(this.$route.query.trialId, this.language, arr).then(res => { window.open(res.Result) })
downloadResume(this.$route.query.trialId, this.language, arr).then(
(res) => {
window.open(res.Result)
}
)
},
handleDownload(row) {
handleDownload(row) {
this.selectTable = row
// 英文环境直接下载
if (process.env.NODE_ENV === 'usa') {
@@ -324,8 +379,8 @@ export default {
} else {
this.dialogVisible = true
}
}
}
},
},
}
</script>
@@ -1,7 +1,12 @@
<template>
<div class="app-container">
<!-- <resume-info v-if="isInit" /> -->
<preview :isEN="isEN" :reviewerId.sync="reviewerId" />
<preview
:isEN="isEN"
:isAll="isAll"
:reviewerId.sync="reviewerId"
:trialId.sync="trialId"
/>
</div>
</template>
<script>
@@ -18,15 +23,20 @@ export default {
return {
isInit: false,
reviewerId: '',
trialId: null,
}
},
created() {
this.reviewerId = this.$route.query.doctorId
this.trialId = this.$route.query.trialId
},
computed: {
isEN() {
return this.$i18n.locale !== 'zh'
},
isAll() {
return this.hasPermi(['role:pm', 'role:admin', 'role:apm', 'role:ir'])
},
},
mounted() {
const token = getQueryString('token')
@@ -93,7 +93,7 @@
type="primary"
@click="handleAdd"
class="el-icon-plus"
v-if="!isDistinguishCriteria"
v-if="!isDistinguishCriteria && isShow"
>{{ $t('trials:reviewTrack:button:addDefault') }}</el-button
>
</el-form-item>
@@ -353,6 +353,7 @@
import {
getSysEmailNoticeConfigList,
batchAddSysEmailConfig,
batchAddEnrollOrPdEmailConfig,
} from '@/api/dictionary'
import Pagination from '@/components/Pagination'
// import { addTrialDataFromSystem } from '@/api/trials'
@@ -389,6 +390,12 @@ export default {
return false
},
},
isShow: {
type: Boolean,
default() {
return false
},
},
},
data() {
return {
@@ -427,7 +434,21 @@ export default {
}
return ''
},
handleAdd() {},
async handleAdd() {
try {
let data = {
TrialId: this.$route.query.trialId,
}
let res = await batchAddEnrollOrPdEmailConfig(data)
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:addedSuccessfully'))
this.getList()
this.$emit('getList')
}
} catch (err) {
console.log(err)
}
},
handleSelectChange(val) {
// console.log(val)
// const arr = []
@@ -40,11 +40,7 @@
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
prop="ToUserTypeList"
>
<el-select
v-model="searchData.ToUserType"
clearable
class="mr"
>
<el-select v-model="searchData.ToUserType" clearable class="mr">
<el-option
v-for="item of $d.UserType"
:key="`ToUserTypeList${item.label}`"
@@ -57,11 +53,7 @@
:label="$t('trials:emailManageCfg:table:IsEnable')"
prop="IsEnable"
>
<el-select
v-model="searchData.IsEnable"
clearable
class="mr"
>
<el-select v-model="searchData.IsEnable" clearable class="mr">
<el-option
v-for="item of $d.YesOrNo"
:key="`ToUserTypeList${item.label}`"
@@ -367,6 +359,7 @@
<DefaultQS
@getList="getList"
:is-distinguish-criteria="isDistinguishCriteria"
:isShow="isBtnShow"
@close="addVisible = false"
/>
</div>
@@ -419,6 +412,7 @@ export default {
trialCriterionList: [],
criterionType: null,
addVisible: false,
isBtnShow: false,
}
},
watch: {
@@ -476,6 +470,11 @@ export default {
item.CopyUserTypeList
)
})
if (res.OtherInfo) {
this.isBtnShow =
res.OtherInfo.IsEnrollementQualificationConfirm ||
res.OtherInfo.IsPDProgressView
}
this.list = res.Result
})
.catch(() => {