diff --git a/src/api/reviewers.js b/src/api/reviewers.js
index 9e6ed318..d840a2ca 100644
--- a/src/api/reviewers.js
+++ b/src/api/reviewers.js
@@ -334,4 +334,12 @@ export function doctorSendEmail(param) {
method: 'post',
data: param
})
+}
+// 获取医生是否休假
+export function getIsVacation(param) {
+ return request({
+ url: `/Vacation/getIsVacation`,
+ method: 'post',
+ data: param
+ })
}
\ No newline at end of file
diff --git a/src/views/reviewers/components/Agreements.vue b/src/views/reviewers/components/Agreements.vue
index 34501ae9..9a206336 100644
--- a/src/views/reviewers/components/Agreements.vue
+++ b/src/views/reviewers/components/Agreements.vue
@@ -257,6 +257,7 @@
:on-remove="handleRemoveFile2"
:show-file-list="true"
:limit="1"
+ accept=".pdf"
:file-list="fileList"
>
{{ $t('common:button:upload') }}
+ {{ $t('system:tip:file:pdf') }}
@@ -368,6 +370,7 @@ export default {
],
},
fileList: [],
+ accept: '.pdf',
}
},
watch: {
@@ -414,41 +417,66 @@ export default {
this.form.FilePath = null
this.fileList = []
},
- beforeUpload() {
+ beforeUpload(row) {
if (this.fileList.length > 0) {
this.$alert('最多只能传一个附件')
return
}
+ if (!this.checkFileSuffix(row.name)) {
+ this.$message.warning(`Must be in .pdf format`)
+ return false
+ }
},
handlePreview3(row) {
+ return this.$preview({
+ path: row.FilePath,
+ type: 'pdf',
+ title: row.FileName,
+ })
if (row.FilePath) {
window.open(this.OSSclientConfig.basePath + row.FilePath, '_blank')
}
},
handlePreview2(row, r2) {
+ return this.$preview({
+ path: row.fullPath,
+ type: 'pdf',
+ title: row.FileName,
+ })
if (row.fullPath) {
window.open(this.OSSclientConfig.basePath + row.fullPath, '_blank')
}
},
- async handleUploadFile(param) {
- this.btnLoading = true
- var fileName = param.file.name
- let file = await this.fileToBlob(param.file)
- let res = await this.OSSclient.put(
- `/SystemData/reviewer/${
- this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'
- }/${this.doctorId}/${fileName}`,
- file
+ checkFileSuffix(fileName) {
+ var index = fileName.lastIndexOf('.')
+ var suffix = fileName.substring(index + 1, fileName.length)
+ return (
+ this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
)
- this.form.FileName = param.file.name
- this.form.FilePath = this.$getObjectName(res.url)
- this.fileList[0] = {
- name: this.$getObjectName(res.url),
- path: this.$getObjectName(res.url),
- fullPath: this.$getObjectName(res.url),
- url: res.url,
+ },
+ async handleUploadFile(param) {
+ try {
+ this.btnLoading = true
+ var fileName = param.file.name
+ let file = await this.fileToBlob(param.file)
+ let res = await this.OSSclient.put(
+ `/SystemData/reviewer/${
+ this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'
+ }/${this.doctorId}/${fileName}`,
+ file
+ )
+ this.form.FileName = param.file.name
+ this.form.FilePath = this.$getObjectName(res.url)
+ this.fileList[0] = {
+ name: this.$getObjectName(res.url),
+ path: this.$getObjectName(res.url),
+ fullPath: this.$getObjectName(res.url),
+ url: res.url,
+ }
+ this.btnLoading = false
+ } catch (err) {
+ console.log(err)
}
- this.btnLoading = false
},
handleCancle() {
this.model_cfg.visible = false
@@ -499,6 +527,12 @@ export default {
})
},
handlePreview(row) {
+ console.log(row)
+ return this.$preview({
+ path: row.FullPath,
+ type: 'pdf',
+ title: row.FileName,
+ })
if (row.FullPath) {
window.open(this.OSSclientConfig.basePath + row.FullPath, '_blank')
}
diff --git a/src/views/reviewers/components/EducationTraining.vue b/src/views/reviewers/components/EducationTraining.vue
index c88adcfb..4b69dd96 100644
--- a/src/views/reviewers/components/EducationTraining.vue
+++ b/src/views/reviewers/components/EducationTraining.vue
@@ -59,7 +59,7 @@
>
{{
- scope.row.MajorCN
+ !isEN
? `${scope.row.Major} / ${scope.row.MajorCN}`
: scope.row.Major
}}
@@ -73,7 +73,7 @@
>
{{
- scope.row.OrganizationCN
+ !isEN
? `${scope.row.Organization} / ${scope.row.OrganizationCN}`
: scope.row.Organization
}}
@@ -87,9 +87,7 @@
>
{{
- scope.row.CityCN
- ? `${scope.row.City} / ${scope.row.CityCN}`
- : scope.row.City
+ !isEN ? `${scope.row.City} / ${scope.row.CityCN}` : scope.row.City
}}
@@ -101,7 +99,7 @@
>
{{
- scope.row.ProvinceCN
+ !isEN
? `${scope.row.Province} / ${scope.row.ProvinceCN}`
: scope.row.Province
}}
@@ -115,7 +113,7 @@
>
{{
- scope.row.CountryCN
+ !isEN
? `${scope.row.Country} / ${scope.row.CountryCN}`
: scope.row.Country
}}
@@ -191,7 +189,7 @@
{{
- scope.row.TrainingCN
+ !isEN
? `${scope.row.Training} / ${scope.row.TrainingCN}`
: scope.row.Training
}}
@@ -205,7 +203,7 @@
>
{{
- scope.row.MajorCN
+ !isEN
? `${scope.row.Major} / ${scope.row.MajorCN}`
: scope.row.Major
}}
@@ -219,7 +217,7 @@
>
{{
- scope.row.HospitalCN
+ !isEN
? `${scope.row.Hospital} / ${scope.row.HospitalCN}`
: scope.row.Hospital
}}
@@ -233,7 +231,7 @@
>
{{
- scope.row.SchoolCN
+ !isEN
? `${scope.row.School} / ${scope.row.SchoolCN}`
: scope.row.School
}}
@@ -247,9 +245,7 @@
>
{{
- scope.row.CityCN
- ? `${scope.row.City} / ${scope.row.CityCN}`
- : scope.row.City
+ !isEN ? `${scope.row.City} / ${scope.row.CityCN}` : scope.row.City
}}
@@ -261,7 +257,7 @@
>
{{
- scope.row.ProvinceCN
+ !isEN
? `${scope.row.Province} / ${scope.row.ProvinceCN}`
: scope.row.Province
}}
@@ -275,7 +271,7 @@
>
{{
- scope.row.CountryCN
+ !isEN
? `${scope.row.Country} / ${scope.row.CountryCN}`
: scope.row.Country
}}
@@ -922,6 +918,9 @@ export default {
},
computed: {
...mapGetters(['hospitalList']),
+ isEN() {
+ return this.$i18n.locale !== 'zh'
+ },
},
mounted() {
this.initPage()
diff --git a/src/views/reviewers/components/Pay.vue b/src/views/reviewers/components/Pay.vue
index 0168ae98..d63ee6eb 100644
--- a/src/views/reviewers/components/Pay.vue
+++ b/src/views/reviewers/components/Pay.vue
@@ -96,7 +96,50 @@ export default {
IdCard: '',
BankPhoneNum: '',
},
- rules: {},
+ rules: {
+ BankNum: [
+ {
+ validator: (rule, value, callback) => {
+ let reg = new RegExp(/^[A-Za-z0-9]+$/, 'ig')
+ if (value && !reg.test(value)) {
+ callback(new Error(this.$t('common:ruleMessage:pattern')))
+ } else {
+ callback()
+ }
+ },
+ trigger: 'blur',
+ },
+ ],
+ IdCard: [
+ {
+ validator: (rule, value, callback) => {
+ let reg = new RegExp(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/, 'ig')
+ if (value && !reg.test(value)) {
+ callback(new Error(this.$t('common:ruleMessage:pattern')))
+ } else {
+ callback()
+ }
+ },
+ trigger: 'blur',
+ },
+ ],
+ BankPhoneNum: [
+ {
+ validator: (rule, value, callback) => {
+ let reg = new RegExp(
+ /^1(3[0-9]|4[01456879]|5[0-3,5-9]|6[2567]|7[0-8]|8[0-9]|9[0-3,5-9])d{8}$/,
+ 'ig'
+ )
+ if (value && !reg.test(value)) {
+ callback(new Error(this.$t('common:ruleMessage:pattern')))
+ } else {
+ callback()
+ }
+ },
+ trigger: 'blur',
+ },
+ ],
+ },
}
},
mounted() {
diff --git a/src/views/reviewers/components/Setting.vue b/src/views/reviewers/components/Setting.vue
index 4899a195..bd8234c2 100644
--- a/src/views/reviewers/components/Setting.vue
+++ b/src/views/reviewers/components/Setting.vue
@@ -113,7 +113,7 @@
{{
- checkForm.InHoliday
+ InHoliday
}}
{{
$t('system:Setting:Planned Vacation')
@@ -217,6 +217,7 @@ import {
getVacationList,
addOrUpdateVacation,
deleteVacation,
+ getIsVacation,
} from '@/api/reviewers'
import { fmtDate } from '@/utils/formatter'
export default {
@@ -259,6 +260,7 @@ export default {
pageSize: 5,
totalItems: 0,
loading2: false,
+ InHoliday: '',
}
},
watch: {
@@ -270,8 +272,23 @@ export default {
},
mounted() {
this.initForm()
+ this.getIsVacation()
},
methods: {
+ // 获取是否休假
+ async getIsVacation() {
+ try {
+ let data = {
+ DoctorId: this.doctorId,
+ }
+ let res = await getIsVacation(data)
+ if (res.IsSuccess) {
+ this.InHoliday = res.Result.IsVacation ? 'Yes' : 'No'
+ }
+ } catch (err) {
+ console.log(err)
+ }
+ },
initForm() {
if (!this.doctorId) return
getAuditState(this.doctorId).then((res) => {
@@ -381,7 +398,7 @@ export default {
.catch((action) => {})
},
closeDialog() {
- this.initForm()
+ this.getIsVacation()
},
handleChange() {
if (
diff --git a/src/views/reviewers/components/TrialExperience.vue b/src/views/reviewers/components/TrialExperience.vue
index d681165f..f3701d58 100644
--- a/src/views/reviewers/components/TrialExperience.vue
+++ b/src/views/reviewers/components/TrialExperience.vue
@@ -406,10 +406,21 @@ export default {
},
computed: {
IndicationOptions() {
+ console.log(
+ this.$d.IndicationType,
+ this.clinicalTrialForm.IndicationTypeId
+ )
if (!this.clinicalTrialForm.IndicationTypeId) return []
- let indicationGrouping = this.$d.IndicationType.filter(
+ let indicationGroupingArr = this.$d.IndicationType.filter(
(item) => item.id === this.clinicalTrialForm.IndicationTypeId
- )[0].raw.ChildGroup
+ )
+ let indicationGrouping = null
+ if (
+ Array.isArray(indicationGroupingArr) &&
+ indicationGroupingArr.length > 0
+ ) {
+ indicationGrouping = indicationGroupingArr[0].raw.ChildGroup
+ }
let arr =
this.$d.Indication.filter(
(item) => indicationGrouping === item.raw.ChildGroup
diff --git a/src/views/reviewers/curriculumVitae/components/file/agreement.vue b/src/views/reviewers/curriculumVitae/components/file/agreement.vue
index 3e0fad57..bd97602d 100644
--- a/src/views/reviewers/curriculumVitae/components/file/agreement.vue
+++ b/src/views/reviewers/curriculumVitae/components/file/agreement.vue
@@ -107,6 +107,7 @@
:on-remove="handleRemoveFile2"
:show-file-list="true"
:limit="1"
+ :accept="accept"
:file-list="fileList"
>
{{ $t('common:button:upload') }}
+ {{ $t('system:tip:file:pdf') }}
@@ -226,6 +228,7 @@ export default {
],
},
fileList: [],
+ accept: '.pdf',
}
},
watch: {
@@ -285,19 +288,40 @@ export default {
this.form.FilePath = null
this.fileList = []
},
- beforeUpload() {
+ beforeUpload(row) {
if (this.fileList.length > 0) {
// this.$alert('最多只能传一个附件')
this.$alert(this.$t('upload:rule:maxFile1'))
return
}
+ if (!this.checkFileSuffix(row.name)) {
+ this.$message.warning(`Must be in .pdf format`)
+ return false
+ }
+ },
+ checkFileSuffix(fileName) {
+ var index = fileName.lastIndexOf('.')
+ var suffix = fileName.substring(index + 1, fileName.length)
+ return (
+ this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
+ )
},
handlePreview3(row) {
+ return this.$preview({
+ path: row.FilePath,
+ type: 'pdf',
+ title: row.FileName,
+ })
if (row.FilePath) {
window.open(this.OSSclientConfig.basePath + row.FilePath, '_blank')
}
},
handlePreview2(row, r2) {
+ return this.$preview({
+ path: row.FullPath,
+ type: 'pdf',
+ title: row.FileName,
+ })
if (row.fullPath) {
window.open(this.OSSclientConfig.basePath + row.fullPath, '_blank')
}
diff --git a/src/views/reviewers/curriculumVitae/components/info/clinicalTrials.vue b/src/views/reviewers/curriculumVitae/components/info/clinicalTrials.vue
index fd809c46..d5a2220c 100644
--- a/src/views/reviewers/curriculumVitae/components/info/clinicalTrials.vue
+++ b/src/views/reviewers/curriculumVitae/components/info/clinicalTrials.vue
@@ -649,9 +649,16 @@ export default {
computed: {
IndicationOptions() {
if (!this.form.IndicationTypeId) return []
- let indicationGrouping = this.$d.IndicationType.filter(
+ let indicationGroupingArr = this.$d.IndicationType.filter(
(item) => item.id === this.form.IndicationTypeId
- )[0].raw.ChildGroup
+ )
+ let indicationGrouping = null
+ if (
+ Array.isArray(indicationGroupingArr) &&
+ indicationGroupingArr.length > 0
+ ) {
+ indicationGrouping = indicationGroupingArr[0].raw.ChildGroup
+ }
let arr =
this.$d.Indication.filter(
(item) => indicationGrouping === item.raw.ChildGroup
diff --git a/src/views/reviewers/curriculumVitae/components/info/holiday.vue b/src/views/reviewers/curriculumVitae/components/info/holiday.vue
index d62d5575..53d7744b 100644
--- a/src/views/reviewers/curriculumVitae/components/info/holiday.vue
+++ b/src/views/reviewers/curriculumVitae/components/info/holiday.vue
@@ -71,8 +71,6 @@