From b8baa1b5d8d0f291fccb149eb18e438c61fb70e9 Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Mon, 4 Nov 2024 17:15:25 +0800
Subject: [PATCH] 1
---
src/api/reviewers.js | 6 +-
src/views/reviewers/components/Summarize.vue | 8 +-
.../email-manage/components/DefaultQS.vue | 56 ++++-
.../email-manage/components/EmailList.vue | 220 ++++++++++++------
4 files changed, 217 insertions(+), 73 deletions(-)
diff --git a/src/api/reviewers.js b/src/api/reviewers.js
index 8fa8a272..d27a575b 100644
--- a/src/api/reviewers.js
+++ b/src/api/reviewers.js
@@ -237,13 +237,11 @@ export function downloadByAttachmentId(doctorId, attachmentIds) {
})
}
-export function getDetail(doctorId) {
+export function getDetail(data) {
return request({
url: `/doctor/getDetail`,
method: 'post',
- data: {
- DoctorId: doctorId
- }
+ data
})
}
diff --git a/src/views/reviewers/components/Summarize.vue b/src/views/reviewers/components/Summarize.vue
index 559cb658..1d028780 100644
--- a/src/views/reviewers/components/Summarize.vue
+++ b/src/views/reviewers/components/Summarize.vue
@@ -108,8 +108,14 @@ export default {
try {
let id = this.$route.query.Id || this.reviewerId
if (!id) return false
+ let data = {
+ DoctorId: id,
+ }
+ if (this.$route.query.trialId) {
+ data.TrialId = this.$route.query.trialId
+ }
this.loading = true
- let res = await getDetail(id)
+ let res = await getDetail(data)
this.loading = false
if (res.IsSuccess) {
Object.keys(this.form).forEach((key) => {
diff --git a/src/views/trials/trials-panel/setting/email-manage/components/DefaultQS.vue b/src/views/trials/trials-panel/setting/email-manage/components/DefaultQS.vue
index 98035af1..8cd663c3 100644
--- a/src/views/trials/trials-panel/setting/email-manage/components/DefaultQS.vue
+++ b/src/views/trials/trials-panel/setting/email-manage/components/DefaultQS.vue
@@ -38,6 +38,7 @@
@@ -54,6 +55,33 @@
/>
+
+
+
+
+
+
+
+
+
+
{{
$t('common:button:search')
@@ -61,6 +89,13 @@
{{
$t('common:button:reset')
}}
+ {{ $t('trials:reviewTrack:button:addDefault') }}
@@ -90,14 +125,15 @@
/>
-
+ /> -->
+ >
+
+ {{ getEmailCron(scope.row.EmailCron) }}
+
+
{
PageSize: 20,
BusinessScenarioEnum: null,
CriterionTypeEnum: null,
+ ToUserTypeList: null,
+ EmailUrgentEnum: null,
}
}
export default {
@@ -378,6 +420,14 @@ export default {
this.loading = false
})
},
+ getEmailCron(str) {
+ let a = str.split(' ')
+ if (a[3].indexOf('/') > -1) {
+ return a[3].split('/')[1]
+ }
+ return ''
+ },
+ handleAdd() {},
handleSelectChange(val) {
// console.log(val)
// const arr = []
diff --git a/src/views/trials/trials-panel/setting/email-manage/components/EmailList.vue b/src/views/trials/trials-panel/setting/email-manage/components/EmailList.vue
index e6cc80d7..27e81973 100644
--- a/src/views/trials/trials-panel/setting/email-manage/components/EmailList.vue
+++ b/src/views/trials/trials-panel/setting/email-manage/components/EmailList.vue
@@ -3,10 +3,12 @@
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -28,7 +76,11 @@
{{ $t('common:button:search') }}
-
+
{{ $t('common:button:reset') }}
-
+ /> -->
+ min-width="100"
+ >
- {{ $fd('BusinessModule',scope.row.BusinessModuleEnum) }}
+ {{ $fd('BusinessModule', scope.row.BusinessModuleEnum) }}
- {{ $fd('Email_BusinessScenario',scope.row.BusinessScenarioEnum) }}
+ {{ $fd('Email_BusinessScenario', scope.row.BusinessScenarioEnum) }}
@@ -118,7 +171,11 @@
min-width="100"
>
- {{ scope.row.ToUserTypeNameList.length>0?scope.row.ToUserTypeNameList.join('、'):'' }}
+ {{
+ scope.row.ToUserTypeNameList.length > 0
+ ? scope.row.ToUserTypeNameList.join('、')
+ : ''
+ }}
@@ -129,7 +186,11 @@
min-width="100"
>
- {{ scope.row.CopyUserTypeNameList.length>0?scope.row.CopyUserTypeNameList.join('、'):'' }}
+ {{
+ scope.row.CopyUserTypeNameList.length > 0
+ ? scope.row.CopyUserTypeNameList.join('、')
+ : ''
+ }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
- {{ scope.row.AttachNameCN }}
+ {{ scope.row.AttachNameCN }}
{{ scope.row.AttachName }}
-->
- {{ scope.row.AttachName }}
+ {{ scope.row.AttachName }}
@@ -217,7 +288,9 @@
{{ $fd('YesOrNo', scope.row.IsEnable) }}
- {{ $fd('YesOrNo', scope.row.IsEnable) }}
+ {{
+ $fd('YesOrNo', scope.row.IsEnable)
+ }}
@@ -237,7 +310,12 @@
min-width="100"
/>
-
+
-
+
@@ -303,7 +385,9 @@ const searchDataDefault = () => {
return {
BusinessScenarioEnum: null,
CriterionTypeEnum: null,
- TrialReadingCriterionId: null
+ TrialReadingCriterionId: null,
+ ToUserTypeList: null,
+ IsEnable: null,
}
}
export default {
@@ -314,14 +398,14 @@ export default {
type: Boolean,
default() {
return false
- }
+ },
},
isEdit: {
type: Boolean,
default() {
return false
- }
- }
+ },
+ },
},
data() {
return {
@@ -334,7 +418,7 @@ export default {
trialId: '',
trialCriterionList: [],
criterionType: null,
- addVisible: false
+ addVisible: false,
}
},
watch: {
@@ -342,7 +426,7 @@ export default {
this.$nextTick(() => {
this.$refs.emailList.doLayout()
})
- }
+ },
},
mounted() {
this.trialId = this.$route.query.trialId
@@ -355,7 +439,7 @@ export default {
},
deleteTrialEmailNoticeConfig(row) {
this.$confirm(this.$t('trials:emailManageCfg:message:msg2')).then(() => {
- deleteTrialEmailNoticeConfig(row.Id).then(res => {
+ deleteTrialEmailNoticeConfig(row.Id).then((res) => {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getList()
})
@@ -363,58 +447,64 @@ export default {
},
getTrialCriterionList() {
this.loading = true
- getTrialCriterionList(this.trialId).then(res => {
- this.trialCriterionList = res.Result
- // this.activeTab = this.trialCriterionList[0].TrialReadingCriterionId
- this.loading = false
- }).catch(() => {
- this.loading = false
- })
+ getTrialCriterionList(this.trialId)
+ .then((res) => {
+ this.trialCriterionList = res.Result
+ // this.activeTab = this.trialCriterionList[0].TrialReadingCriterionId
+ this.loading = false
+ })
+ .catch(() => {
+ this.loading = false
+ })
},
getList() {
this.loading = true
this.searchData.TrialId = this.trialId
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
- getTrialEmailNoticeConfigList(this.searchData).then(res => {
- this.loading = false
- res.Result.forEach(item => {
- // item.FromUsers = this.getUsersByType(item.TrialEmailNoticeUserList, 1)
- // item.FromUserList = this.getUserList(item.TrialEmailNoticeUserList, 1)
- // item.ToUsers = this.getUsersByType(item.TrialEmailNoticeUserList, 2)
- // item.ToUserList = this.getUserList(item.TrialEmailNoticeUserList, 2)
- // item.CopyUsers = this.getUsersByType(item.TrialEmailNoticeUserList, 3)
- // item.CopyUserList = this.getUserList(item.TrialEmailNoticeUserList, 3)
- item.ToUserTypeNameList = this.getUserTypeName(item.ToUserTypeList)
- item.CopyUserTypeNameList = this.getUserTypeName(item.CopyUserTypeList)
+ getTrialEmailNoticeConfigList(this.searchData)
+ .then((res) => {
+ this.loading = false
+ res.Result.forEach((item) => {
+ // item.FromUsers = this.getUsersByType(item.TrialEmailNoticeUserList, 1)
+ // item.FromUserList = this.getUserList(item.TrialEmailNoticeUserList, 1)
+ // item.ToUsers = this.getUsersByType(item.TrialEmailNoticeUserList, 2)
+ // item.ToUserList = this.getUserList(item.TrialEmailNoticeUserList, 2)
+ // item.CopyUsers = this.getUsersByType(item.TrialEmailNoticeUserList, 3)
+ // item.CopyUserList = this.getUserList(item.TrialEmailNoticeUserList, 3)
+ item.ToUserTypeNameList = this.getUserTypeName(item.ToUserTypeList)
+ item.CopyUserTypeNameList = this.getUserTypeName(
+ item.CopyUserTypeList
+ )
+ })
+ this.list = res.Result
+ })
+ .catch(() => {
+ this.loading = false
})
- this.list = res.Result
- }).catch(() => {
- this.loading = false
- })
},
getUserTypeName(userTypeList) {
- var userTypes = userTypeList.map(i => this.$fd('UserType', i))
+ var userTypes = userTypeList.map((i) => this.$fd('UserType', i))
return userTypes
},
getUserList(userList, type) {
- return userList.filter(i => i.EmailUserType === type)
+ return userList.filter((i) => i.EmailUserType === type)
},
getUsersByType(userList, type) {
- var users = userList.filter(i => i.EmailUserType === type)
- var usersName = users.map(obj => {
+ var users = userList.filter((i) => i.EmailUserType === type)
+ var usersName = users.map((obj) => {
return obj.RealName
})
return usersName.join('、')
},
// 新增
handleAdd() {
- this.editDialog.title = this.$t('common:button:new')// '新增'
+ this.editDialog.title = this.$t('common:button:new') // '新增'
this.currentRow = { CriterionTypeEnum: this.criterionType }
this.editDialog.visible = true
},
// 编辑
handleEdit(row) {
- this.editDialog.title = this.$t('common:button:edit')// '编辑'
+ this.editDialog.title = this.$t('common:button:edit') // '编辑'
this.currentRow = { ...row }
this.editDialog.visible = true
},
@@ -444,7 +534,7 @@ export default {
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
- }
- }
+ },
+ },
}