邮件管理新增系统相关

uat_us
DESKTOP-6C3NK6N\WXS 2024-07-26 10:58:30 +08:00
parent 8cf5a1a524
commit cd3f36756d
4 changed files with 116 additions and 43 deletions

View File

@ -59,7 +59,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="收件人" prop="ToUserTypeList"> <el-form-item label="收件人" prop="ToUserTypeList">
<el-select v-model="form.ToUserTypeList" clearable multiple class="mr"> <el-select v-model="form.ToUserTypeList" clearable multiple class="mr">
<el-option <el-option
@ -71,7 +71,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="抄送人" prop="CopyUserTypeList"> <el-form-item label="抄送人" prop="CopyUserTypeList">
<el-select v-model="form.CopyUserTypeList" clearable multiple class="mr"> <el-select v-model="form.CopyUserTypeList" clearable multiple class="mr">
<el-option <el-option
@ -83,7 +83,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="加急状态" prop="EmailUrgentEnum"> <el-form-item label="加急状态" prop="EmailUrgentEnum">
<el-select v-model="form.EmailUrgentEnum" @change="(v) => {v === 1 ? form.EmailCron = null : null}" clearable class="mr"> <el-select v-model="form.EmailUrgentEnum" @change="(v) => {v === 1 ? form.EmailCron = null : null}" clearable class="mr">
<el-option <el-option
@ -95,13 +95,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="发送周期和时间" v-if="form.EmailUrgentEnum !== 1" prop="EmailCron"> <el-form-item label="发送周期和时间" v-if="form.EmailUrgentEnum !== 1" prop="EmailCron">
<el-input style="width: 300px" readonly v-model="form.EmailCron" /> <el-input style="width: 300px" readonly v-model="form.EmailCron" />
<el-button type="primary" @click="showDialog"> cron</el-button> <el-button type="primary" @click="showDialog"> cron</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="是否需要回执" prop="IsReturnRequired"> <el-form-item label="是否需要回执" prop="IsReturnRequired">
<el-radio-group v-model="form.IsReturnRequired"> <el-radio-group v-model="form.IsReturnRequired">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@ -109,7 +109,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="是否自动发送" prop="IsAutoSend"> <el-form-item label="是否自动发送" prop="IsAutoSend">
<el-radio-group v-model="form.IsAutoSend"> <el-radio-group v-model="form.IsAutoSend">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@ -117,7 +117,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria"> <el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
<el-radio-group v-model="form.IsDistinguishCriteria" @change="() => {form.CriterionTypeEnum = null}"> <el-radio-group v-model="form.IsDistinguishCriteria" @change="() => {form.CriterionTypeEnum = null}">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@ -125,7 +125,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item <el-form-item
:label="$t('trials:auditRecord:table:criterion')" :label="$t('trials:auditRecord:table:criterion')"
v-if="form.IsDistinguishCriteria" prop="CriterionTypeEnum"> v-if="form.IsDistinguishCriteria" prop="CriterionTypeEnum">
@ -139,7 +139,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="是否启用" prop="IsEnable"> <el-form-item label="是否启用" prop="IsEnable">
<el-radio-group v-model="form.IsEnable"> <el-radio-group v-model="form.IsEnable">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@ -147,7 +147,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="附件CN" prop="IsEnable"> <el-form-item label="附件CN" prop="IsEnable">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
@ -164,7 +164,7 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if='!IsSystemLevel'>
<el-form-item label="附件EN" prop="IsEnable"> <el-form-item label="附件EN" prop="IsEnable">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
@ -213,6 +213,12 @@ export default {
data: { data: {
type: Object, type: Object,
default() { return {} } default() { return {} }
},
IsSystemLevel:{
type: Boolean,
default() {
return false
}
} }
}, },
data() { data() {
@ -264,7 +270,13 @@ export default {
} }
}, },
mounted() { mounted() {
this.initForm() this.initForm();
if(this.IsSystemLevel){
this.form.ToUserTypeList = [];
this.form.CopyUserTypeList = [];
this.form.EmailUrgentEnum = '3';
this.form.IsReturnRequired = false;
}
}, },
methods: { methods: {
showDialog() { showDialog() {
@ -342,7 +354,6 @@ export default {
this.fileListCN.push({ name: this.data.AttachNameCN, path: this.data.AttachCNPath, fullPath: this.data.AttachCNPath, url: this.data.AttachCNPath }) this.fileListCN.push({ name: this.data.AttachNameCN, path: this.data.AttachCNPath, fullPath: this.data.AttachCNPath, url: this.data.AttachCNPath })
} }
} }
console.log(this.fileListEN, this.fileListCN)
this.loading = false this.loading = false
}, },
@ -351,6 +362,7 @@ export default {
this.$refs.emailForm.validate(valid => { this.$refs.emailForm.validate(valid => {
if (!valid) return if (!valid) return
this.loading = true this.loading = true
this.form.IsSystemLevel = this.IsSystemLevel;
addOrUpdateEmailNoticeConfigList(this.form).then(res => { addOrUpdateEmailNoticeConfigList(this.form).then(res => {
this.loading = false this.loading = false
this.$emit('closeDialog') this.$emit('closeDialog')

View File

@ -1,25 +1,25 @@
<template> <template>
<box-content> <box-content>
<div class="search"> <div class="search">
<el-form :inline="true" size="mini" class="base-search-form"> <el-form v-if="!IsSystemLevel" :inline="true" size="mini" class="base-search-form">
<el-form-item label="是否需要回执:"> <el-form-item label="是否需要回执:">
<el-select v-model="searchData.IsReturnRequired" clearable style="width:100px;"> <el-select v-model="searchData.IsReturnRequired" clearable style="width:100px;">
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" /> <el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" :key="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否加急:"> <el-form-item label="是否加急:">
<el-select v-model="searchData.IsUrgent" clearable style="width:100px;"> <el-select v-model="searchData.IsUrgent" clearable style="width:100px;">
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" /> <el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" :key="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否启用:"> <el-form-item label="是否启用:">
<el-select v-model="searchData.IsEnable" clearable style="width:100px;"> <el-select v-model="searchData.IsEnable" clearable style="width:100px;">
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" /> <el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" :key="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="isDistinguishCriteria"> <el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="isDistinguishCriteria">
<el-select v-model="searchData.CriterionTypeEnum" clearable style="width:100px;"> <el-select v-model="searchData.CriterionTypeEnum" clearable style="width:100px;">
<el-option v-for="item of $d.CriterionType" :value="item.value" :label="item.label" /> <el-option v-for="item of $d.CriterionType" :value="item.value" :label="item.label" :key="item.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -61,7 +61,7 @@
:label="$t('trials:emailManageCfg:title:code')" :label="$t('trials:emailManageCfg:title:code')"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
width="100" min-width="100"
/> />
<el-table-column <el-table-column
v-if="isDistinguishCriteria" v-if="isDistinguishCriteria"
@ -69,7 +69,7 @@
:label="$t('trials:reviewTrack:table:criterionName')" :label="$t('trials:reviewTrack:table:criterionName')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
width="120" min-width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }} {{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
@ -80,21 +80,21 @@
label="邮件主题(中文)" label="邮件主题(中文)"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
width="160" min-width="160"
/> />
<el-table-column <el-table-column
prop="EmailTopic" prop="EmailTopic"
label="邮件主题(英文)" label="邮件主题(英文)"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
width="160" min-width="160"
/> />
<el-table-column <el-table-column
prop="BusinessLevelEnum" prop="BusinessLevelEnum"
label="业务层级" label="业务层级"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
width="100"> min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('BusinessLevel',scope.row.BusinessLevelEnum) }} {{ $fd('BusinessLevel',scope.row.BusinessLevelEnum) }}
</template> </template>
@ -104,7 +104,7 @@
label="业务模块" label="业务模块"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
width="100"> min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('BusinessModule',scope.row.BusinessModuleEnum) }} {{ $fd('BusinessModule',scope.row.BusinessModuleEnum) }}
</template> </template>
@ -114,7 +114,7 @@
label="业务场景" label="业务场景"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
width="130" min-width="130"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('Email_BusinessScenario',scope.row.BusinessScenarioEnum) }} {{ $fd('Email_BusinessScenario',scope.row.BusinessScenarioEnum) }}
@ -125,7 +125,8 @@
prop="ToUserTypeList" prop="ToUserTypeList"
:label="$t('trials:emailManageCfg:title:toUserTypeList')" :label="$t('trials:emailManageCfg:title:toUserTypeList')"
show-overflow-tooltip show-overflow-tooltip
width="100" min-width="100"
v-if="!IsSystemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.ToUserTypeList.length > 0?scope.row.ToUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }} {{ scope.row.ToUserTypeList.length > 0?scope.row.ToUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }}
@ -136,7 +137,8 @@
prop="CopyUserTypeList" prop="CopyUserTypeList"
:label="$t('trials:emailManageCfg:title:copyUserTypeList')" :label="$t('trials:emailManageCfg:title:copyUserTypeList')"
show-overflow-tooltip show-overflow-tooltip
width="100" min-width="100"
v-if="!IsSystemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.CopyUserTypeList.length > 0?scope.row.CopyUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }} {{ scope.row.CopyUserTypeList.length > 0?scope.row.CopyUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }}
@ -147,7 +149,8 @@
label="加急状态" label="加急状态"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
width="100" min-width="100"
v-if="!IsSystemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('EmailUrgent',scope.row.EmailUrgentEnum) }} {{ $fd('EmailUrgent',scope.row.EmailUrgentEnum) }}
@ -158,14 +161,16 @@
label="发送周期和时间" label="发送周期和时间"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
width="160" min-width="160"
v-if="!IsSystemLevel"
/> />
<!-- 附件 --> <!-- 附件 -->
<el-table-column <el-table-column
prop="FileName" prop="FileName"
:label="$t('trials:emailManageCfg:title:fileName')" :label="$t('trials:emailManageCfg:title:fileName')"
show-overflow-tooltip show-overflow-tooltip
width="100" min-width="100"
v-if="!IsSystemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.FilePath" type="text" @click="handlePreview(scope.row.FilePath)"> <el-button v-if="scope.row.FilePath" type="text" @click="handlePreview(scope.row.FilePath)">
@ -179,7 +184,8 @@
:label="$t('trials:emailManageCfg:title:isReturnRequired')" :label="$t('trials:emailManageCfg:title:isReturnRequired')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
width="140" min-width="140"
v-if="!IsSystemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsReturnRequired" type="danger"> <el-tag v-if="scope.row.IsReturnRequired" type="danger">
@ -194,7 +200,8 @@
:label="$t('trials:emailManageCfg:title:isAutoSend')" :label="$t('trials:emailManageCfg:title:isAutoSend')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
width="160" min-width="160"
v-if="!IsSystemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsAutoSend" type="danger"> <el-tag v-if="scope.row.IsAutoSend" type="danger">
@ -208,7 +215,8 @@
:label="$t('trials:emailManageCfg:table:IsEnable')" :label="$t('trials:emailManageCfg:table:IsEnable')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
width="160" min-width="160"
v-if="!IsSystemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsEnable" type="danger"> <el-tag v-if="scope.row.IsEnable" type="danger">
@ -223,7 +231,7 @@
:label="$t('trials:emailManageCfg:title:updateTime')" :label="$t('trials:emailManageCfg:title:updateTime')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
width="160" min-width="160"
/> />
<!-- 创建时间 --> <!-- 创建时间 -->
<el-table-column <el-table-column
@ -231,9 +239,9 @@
:label="$t('trials:emailManageCfg:title:createTime')" :label="$t('trials:emailManageCfg:title:createTime')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
width="160" min-width="160"
/> />
<el-table-column label="Action" width="140" fixed="right"> <el-table-column label="Action" min-width="140" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@ -260,7 +268,7 @@
fullscreen fullscreen
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<EmailForm :data="rowData" @closeDialog="closeDialog" @getList="getList" /> <EmailForm :data="rowData" :is-system-level="IsSystemLevel" @closeDialog="closeDialog" @getList="getList" />
</el-dialog> </el-dialog>
<!-- 修改受试者状态 --> <!-- 修改受试者状态 -->
@ -306,6 +314,12 @@ export default {
default() { default() {
return false return false
} }
},
IsSystemLevel:{
type: Boolean,
default() {
return false
}
} }
}, },
data() { data() {
@ -328,7 +342,8 @@ export default {
// //
getList() { getList() {
this.loading = true this.loading = true
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria;
this.searchData.IsSystemLevel = this.IsSystemLevel;
getEmailNoticeConfigList(this.searchData).then(res => { getEmailNoticeConfigList(this.searchData).then(res => {
this.loading = false this.loading = false
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData

View File

@ -6,14 +6,21 @@
:label="$t('trials:emailManageCfg:title:commom')" :label="$t('trials:emailManageCfg:title:commom')"
name="0" name="0"
> >
<EmailList v-if="activeTab === '0'" :is-distinguish-criteria="false"></EmailList> <EmailList v-if="activeTab === '0'" :is-distinguish-criteria="false" :is-system-level="false"></EmailList>
</el-tab-pane> </el-tab-pane>
<!-- 标准相关 --> <!-- 标准相关 -->
<el-tab-pane <el-tab-pane
:label="$t('trials:emailManageCfg:title:criterions')" :label="$t('trials:emailManageCfg:title:criterions')"
name="1" name="1"
> >
<EmailList v-if="activeTab === '1'" :is-distinguish-criteria="true"></EmailList> <EmailList v-if="activeTab === '1'" :is-distinguish-criteria="true" :is-system-level="false"></EmailList>
</el-tab-pane>
<!-- 标准相关 -->
<el-tab-pane
:label="$t('trials:emailManageCfg:title:system')"
name="2"
>
<EmailList v-if="activeTab === '2'" :is-distinguish-criteria="false" :is-system-level="true"></EmailList>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</box-content> </box-content>

View File

@ -1,5 +1,8 @@
<template> <template>
<div class="feedBack" @click.stop="open"> <div
:class="{ feedBack: true, 'feedBack-in': show, 'feedBack-out': !show }"
@click.stop="open"
>
<i class="el-icon-chat-dot-square icon"></i> <i class="el-icon-chat-dot-square icon"></i>
<transition name="fade"> <transition name="fade">
<div class="checkBox" v-show="visible" @click.stop="false"> <div class="checkBox" v-show="visible" @click.stop="false">
@ -15,11 +18,21 @@ export default {
data() { data() {
return { return {
visible: false, visible: false,
show: false,
}; };
}, },
mounted() {
document.getElementsByTagName("body")[0].addEventListener("click", () => {
this.visible = false;
this.show = false;
});
},
methods: { methods: {
open() { open() {
this.visible = !this.visible; if (this.show) {
this.visible = !this.visible;
}
this.show = true;
}, },
}, },
}; };
@ -28,7 +41,7 @@ export default {
.feedBack { .feedBack {
position: fixed; position: fixed;
bottom: 50px; bottom: 50px;
right: 50px; right: -25px;
z-index: 100000; z-index: 100000;
width: 50px; width: 50px;
height: 50px; height: 50px;
@ -80,4 +93,30 @@ export default {
.fade-enter-to { .fade-enter-to {
opacity: 1; opacity: 1;
} }
.feedBack-out {
animation-duration: 0.5s;
animation-name: btn-in-out;
animation-fill-mode: both;
}
.feedBack-in {
animation-duration: 0.5s;
animation-name: btn-out-in;
animation-fill-mode: both;
}
@keyframes btn-out-in {
0% {
right: -25px;
}
100% {
right: 25px;
}
}
@keyframes btn-in-out {
0% {
right: 25px;
}
100% {
right: -25px;
}
}
</style> </style>