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

uat_us
caiyiling 2024-11-07 11:35:58 +08:00
commit cea867bdaf
17 changed files with 418 additions and 231 deletions

View File

@ -37,7 +37,12 @@
height="100"
style="width: 100%"
>
<el-table-column prop="Code" label="标签" width="300" show-overflow-tooltip>
<el-table-column
prop="Code"
label="标签"
width="300"
show-overflow-tooltip
>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="Description"-->
@ -54,7 +59,7 @@
v-model="scope.row.Value"
@input="
(e) => {
$set(scope.row, 'Value', e);
$set(scope.row, 'Value', e)
}
"
size="mini"
@ -67,7 +72,7 @@
v-model="scope.row.ValueCN"
@input="
(e) => {
$set(scope.row, 'ValueCN', e);
$set(scope.row, 'ValueCN', e)
}
"
size="mini"
@ -90,13 +95,13 @@
import {
batchAddOrUpdateFrontInternationalization,
getFrontInternationalizationList,
} from "@/api/dictionary/dictionary";
import { getTrialExtralConfig } from "@/api/trials";
import feedBack from "@/views/trials/trials-layout/components/feedBack";
import Vue from "vue";
import i18n from "./lang";
} from '@/api/dictionary/dictionary'
import { getTrialExtralConfig } from '@/api/trials'
import feedBack from '@/views/trials/trials-layout/components/feedBack'
import Vue from 'vue'
import i18n from './lang'
export default {
name: "App",
name: 'App',
components: { feedBack },
data() {
return {
@ -105,38 +110,43 @@ export default {
show: false,
key: null,
arr: [],
};
}
},
mounted() {
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
},
watch: {
"$route.query": {
async handler() {
if (
this.$route.query.trialId &&
this.$route.query.trialId !==
this.$store.state.trials.config.trialId &&
this.$store.state.trials.whiteList.indexOf(this.$route.path) === -1
) {
let res = await getTrialExtralConfig({
TrialId: this.$route.query.trialId,
});
if (res.IsSuccess) {
this.$store.dispatch("trials/setConfig", {
trialId: this.$route.query.trialId,
...res.Result,
});
}
}
},
immediate: true,
deep: true,
},
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist'
},
// watch: {
// '$route.query': {
// async handler() {
// if (!this.$route.query.trialId) {
// this.$store.dispatch('trials/setConfig', {})
// }
// if (
// this.$route.query.trialId &&
// this.$route.query.trialId !==
// this.$store.state.trials.config.trialId &&
// this.$store.state.trials.whiteList.indexOf(this.$route.path) === -1
// ) {
// let res = await getTrialExtralConfig({
// TrialId: this.$route.query.trialId,
// })
// console.log(222222222222)
// res.Result.aa = { : '', : 'aaa' }
// if (res.IsSuccess) {
// this.$store.dispatch('trials/setConfig', {
// trialId: this.$route.query.trialId,
// ...res.Result,
// })
// }
// }
// },
// immediate: true,
// deep: true,
// },
// },
methods: {
changeValue(target, attr, e) {
this.$set(target, attr, e);
this.$set(target, attr, e)
},
keyChange(v) {
if (this.key) {
@ -148,65 +158,65 @@ export default {
~v.Value.indexOf(this.key) ||
~v.ValueCN.indexOf(this.key)
)
);
)
} else {
this.tableData = Object.assign([], this.arr);
this.tableData = Object.assign([], this.arr)
}
},
handleSave() {
this.$confirm("确定修改当前页面国际化内容?").then(() => {
this.$confirm('确定修改当前页面国际化内容?').then(() => {
batchAddOrUpdateFrontInternationalization(this.tableData).then(
async (res) => {
var zhMessages = {},
enMessages = {};
var Internationalization = await getFrontInternationalizationList();
Vue.prototype.$tl = Internationalization.Result;
enMessages = {}
var Internationalization = await getFrontInternationalizationList()
Vue.prototype.$tl = Internationalization.Result
this.tableData.forEach((v) => {
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
// enMessages[v.Description + '_' + v.Code] = v.Value
zhMessages[v.Code] = v.ValueCN;
enMessages[v.Code] = v.Value;
});
i18n.mergeLocaleMessage("zh", zhMessages);
i18n.mergeLocaleMessage("en", enMessages);
this.drawer = false;
this.$message.success("国际化修改成功");
zhMessages[v.Code] = v.ValueCN
enMessages[v.Code] = v.Value
})
i18n.mergeLocaleMessage('zh', zhMessages)
i18n.mergeLocaleMessage('en', enMessages)
this.drawer = false
this.$message.success('国际化修改成功')
}
);
});
)
})
},
openI18n() {
this.tableData = [];
this.key = null;
this.drawer = true;
let arr = [];
this.tableData = []
this.key = null
this.drawer = true
let arr = []
let tableData = this.$tl.map((v) => {
let a = { ...v };
let a = { ...v }
// if (!a.Description) {
// a.Description = this.$route.path
// }
return a;
});
return a
})
tableData = tableData.filter((v) => {
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
return ~this.$path.indexOf(v.Code);
});
return ~this.$path.indexOf(v.Code)
})
this.$path.forEach((v) => {
let o = tableData.find((a) => {
return a.Code === v;
});
return a.Code === v
})
if (o) {
arr.push(o);
arr.push(o)
} else {
arr.push({
Code: v,
Description: null,
Value: null,
ValueCN: null,
});
})
}
});
this.arr = arr;
})
this.arr = arr
if (this.key) {
this.tableData = Object.assign(
[],
@ -216,15 +226,15 @@ export default {
~v.Value.indexOf(this.key) ||
~v.ValueCN.indexOf(this.key)
)
);
)
} else {
this.tableData = Object.assign([], this.arr);
this.tableData = Object.assign([], this.arr)
}
// console.log(JSON.stringify(this.$path))
// console.log(JSON.stringify(this.tableData))
},
},
};
}
</script>
<style lang="scss">
@ -249,7 +259,7 @@ input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type="number"] {
input[type='number'] {
-moz-appearance: textfield !important;
}
@ -275,7 +285,7 @@ textarea {
color: $light_gray;
text-align: center;
font-weight: bold;
font-family: "Times New Roman";
font-family: 'Times New Roman';
text-shadow: 1px 0.5px 1.5px #666;
}
.title-logo {

View File

@ -1061,4 +1061,12 @@ export function getSystemCalculateTableQuestions(params) {
method: 'post',
data: params
})
}
// 添加pd/入组默认邮件
export function batchAddEnrollOrPdEmailConfig(params) {
return request({
url: `/TrialEmailNoticeConfig/batchAddEnrollOrPdEmailConfig`,
method: 'post',
params
})
}

View File

@ -295,13 +295,18 @@ async function VueInit() {
}
Vue.prototype.$path = []
var t = function (key) {
// if (![Vue.prototype.toPath + '_' + key].includes(Vue.prototype.$path)) {
if (!~Vue.prototype.$path.indexOf(key)) {
// Vue.prototype.$path.push(Vue.prototype.toPath + '_' + key)
Vue.prototype.$path.push(key)
}
// return i18n.t(Vue.prototype.toPath + '_' + key)
return i18n.t(key)
let text = i18n.t(key)
if (store.state.trials.config.aa) {
Object.keys(store.state.trials.config.aa).forEach(key => {
let test = new RegExp(key)
text = text.replace(test, store.state.trials.config.aa[key])
})
}
// return i18n.t(key)
return text;
}
Vue.prototype.$t = t
_vm = new Vue({

View File

@ -7,6 +7,7 @@ import { getToken } from '@/utils/auth'
import Vue from 'vue'
import { OSSclient } from './utils/oss'
import WHITELIST from "./utils/whiteList"
import { getTrialExtralConfig } from '@/api/trials'
// import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false })
@ -88,6 +89,27 @@ router.beforeEach(async (to, from, next) => {
}
}
}
if (!to.query.trialId) {
store.dispatch('trials/setConfig', {})
}
if (
to.query.trialId &&
to.query.trialId !==
store.state.trials.config.trialId &&
store.state.trials.whiteList.indexOf(to.path) === -1
) {
let res = await getTrialExtralConfig({
TrialId: to.query.trialId,
})
res.Result.aa = { 阅片人: '采集人', 申办方: 'aaa' }
if (res.IsSuccess) {
store.dispatch('trials/setConfig', {
trialId: to.query.trialId,
...res.Result,
})
}
}
})
router.afterEach(() => {

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('')
}
},
//

View File

@ -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"

View File

@ -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()

View File

@ -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

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 {

View File

@ -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>

View File

@ -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')
}
}

View File

@ -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>

View File

@ -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')
},

View File

@ -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>

View File

@ -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')

View File

@ -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 = []

View File

@ -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(() => {