邮件管理
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
04d6972462
commit
3138bbcb3b
|
@ -42,6 +42,7 @@
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"path-to-regexp": "2.4.0",
|
"path-to-regexp": "2.4.0",
|
||||||
"pdfobject": "^2.2.8",
|
"pdfobject": "^2.2.8",
|
||||||
|
"prismjs": "^1.30.0",
|
||||||
"popper.js": "^1.16.1",
|
"popper.js": "^1.16.1",
|
||||||
"sass-loader": "^8.0.0",
|
"sass-loader": "^8.0.0",
|
||||||
"screenfull": "^4.2.0",
|
"screenfull": "^4.2.0",
|
||||||
|
@ -54,6 +55,7 @@
|
||||||
"vue-contextmenujs": "^1.3.13",
|
"vue-contextmenujs": "^1.3.13",
|
||||||
"vue-count-to": "^1.0.13",
|
"vue-count-to": "^1.0.13",
|
||||||
"vue-i18n": "^8.7.0",
|
"vue-i18n": "^8.7.0",
|
||||||
|
"vue-prism-editor": "^1.3.0",
|
||||||
"vue-pdf": "^4.3.0",
|
"vue-pdf": "^4.3.0",
|
||||||
"vue-puzzle-vcode": "^1.1.10",
|
"vue-puzzle-vcode": "^1.1.10",
|
||||||
"vue-router": "3.0.6",
|
"vue-router": "3.0.6",
|
||||||
|
|
|
@ -59,7 +59,9 @@
|
||||||
<el-form-item label="文件名" prop="Name">
|
<el-form-item label="文件名" prop="Name">
|
||||||
<el-input v-model="form.Name" />
|
<el-input v-model="form.Name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="阅片标准: " prop="CriterionTypeEnum">
|
<el-form-item
|
||||||
|
:label="$t('trials:auditRecord:table:criterion')"
|
||||||
|
prop="CriterionTypeEnum">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.CriterionTypeEnum"
|
v-model="form.CriterionTypeEnum"
|
||||||
style="width:100%;"
|
style="width:100%;"
|
||||||
|
@ -77,7 +79,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.Id !== ''" label="是否废除: ">
|
<el-form-item v-if="form.Id !== ''" label="是否废除: ">
|
||||||
<el-radio-group v-model="form.IsDeleted">
|
<el-radio-group v-model="form.IsDeleted">
|
||||||
<el-radio v-for="item of $d.YesOrNo" :label="item.value">{{ item.label }}</el-radio>
|
<el-radio v-for="item of $d.YesOrNo" :key="`IsDeleted${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述">
|
<el-form-item label="描述">
|
||||||
|
@ -206,7 +208,7 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$emit('closeDialog')
|
this.$emit('closeDialog')
|
||||||
this.$emit('getList')
|
this.$emit('getList')
|
||||||
this.$message.success('保存成功!')
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="CriterionTypeEnum"
|
prop="CriterionTypeEnum"
|
||||||
label="阅片标准"
|
:label="$t('trials:auditRecord:table:criterion')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,218 +1,247 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form
|
<el-form ref="emailForm" v-loading="loading" :model="form" label-width="180px" size="small" :rules="rules">
|
||||||
ref="emailForm"
|
|
||||||
v-loading="loading"
|
|
||||||
:model="form"
|
|
||||||
label-width="180px"
|
|
||||||
size="small"
|
|
||||||
:rules="rules"
|
|
||||||
>
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
<!-- Code -->
|
||||||
<el-form-item label="Code: " prop="Code">
|
<el-form-item label="Code: " prop="Code">
|
||||||
<el-input style="width: 300px" v-model="form.Code" />
|
<el-input style="width: 300px" v-model="form.Code" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="邮件主题(CN)" prop="EmailTopicCN">
|
<!-- 邮件主题(CN) -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:table:EmailTopicCN')" prop="EmailTopicCN">
|
||||||
<el-input style="width: 300px" v-model="form.EmailTopicCN" />
|
<el-input style="width: 300px" v-model="form.EmailTopicCN" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="邮件主题(EN)" prop="EmailTopic">
|
<!-- 邮件主题(EN) -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:table:EmailTopic')" prop="EmailTopic">
|
||||||
<el-input style="width: 300px" v-model="form.EmailTopic" />
|
<el-input style="width: 300px" v-model="form.EmailTopic" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="业务层级" prop="BusinessLevelEnum">
|
<!-- 邮件延时发送s数 -->
|
||||||
|
<el-form-item :label="$t('dictionary:email:label:emailDelaySeconds')" prop="EmailDelaySeconds">
|
||||||
|
<el-input v-model.number="form.EmailDelaySeconds" style="width: 300px" type="number" clearable>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<!-- 业务层级 -->
|
||||||
|
<el-form-item :label="$t('dictionary:email:label:businessLevel')" prop="BusinessLevelEnum">
|
||||||
<el-select v-model="form.BusinessLevelEnum" clearable class="mr">
|
<el-select v-model="form.BusinessLevelEnum" clearable class="mr">
|
||||||
<el-option
|
<el-option v-for="item of $d.BusinessLevel" :key="`BusinessLevel${item.label}`" :label="item.label"
|
||||||
v-for="item of $d.BusinessLevel"
|
:value="item.value" />
|
||||||
:key="`BusinessLevel${item.label}`"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="业务模块" prop="BusinessModuleEnum">
|
<!-- 业务模块 -->
|
||||||
|
<el-form-item :label="$t('dictionary:email:label:businessModule')" prop="BusinessModuleEnum">
|
||||||
<el-select v-model="form.BusinessModuleEnum" clearable class="mr">
|
<el-select v-model="form.BusinessModuleEnum" clearable class="mr">
|
||||||
<el-option
|
<el-option v-for="item of $d.BusinessModule" :key="`BusinessModule${item.label}`" :label="item.label"
|
||||||
v-for="item of $d.BusinessModule"
|
:value="item.value" />
|
||||||
:key="`BusinessModule${item.label}`"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="业务场景" prop="BusinessScenarioEnum">
|
<!-- 业务场景 -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')" prop="BusinessScenarioEnum">
|
||||||
<el-select v-model="form.BusinessScenarioEnum" clearable class="mr">
|
<el-select v-model="form.BusinessScenarioEnum" clearable class="mr">
|
||||||
<el-option
|
<el-option v-for="item of $d.Email_BusinessScenario" :key="`BusinessScenarioEnum${item.label}`"
|
||||||
v-for="item of $d.Email_BusinessScenario"
|
:label="item.label" :value="item.value" />
|
||||||
:key="`BusinessScenarioEnum${item.label}`"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="收件人" prop="ToUserTypeList">
|
<!-- 收件人 -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:title:toUserTypeList')" 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 v-for="item of $d.UserType" :key="`ToUserTypeList${item.label}`" :label="item.label"
|
||||||
v-for="item of $d.UserType"
|
:value="item.value" />
|
||||||
:key="`ToUserTypeList${item.label}`"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="抄送人" prop="CopyUserTypeList">
|
<!-- 抄送人 -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:title:copyUserTypeList')" 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 v-for="item of $d.UserType" :key="`CopyUserTypeList${item.label}`" :label="item.label"
|
||||||
v-for="item of $d.UserType"
|
:value="item.value" />
|
||||||
:key="`CopyUserTypeList${item.label}`"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="加急状态" prop="EmailUrgentEnum">
|
<!-- 加急状态 -->
|
||||||
<el-select v-model="form.EmailUrgentEnum" @change="(v) => {v === 1 ? form.EmailCron = null : null}" clearable class="mr">
|
<el-form-item :label="$t('dictionary:email:label:IsUrgent')" prop="EmailUrgentEnum">
|
||||||
<el-option
|
<el-select v-model="form.EmailUrgentEnum" @change="
|
||||||
v-for="item of $d.EmailUrgent"
|
(v) => {
|
||||||
:key="`EmailUrgent${item.label}`"
|
v === 1 ? (form.EmailCron = null) : null
|
||||||
:label="item.label"
|
}
|
||||||
:value="item.value"
|
" clearable class="mr">
|
||||||
/>
|
<el-option v-for="item of $d.EmailUrgent" :key="`EmailUrgent${item.label}`" :label="item.label"
|
||||||
|
:value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="发送周期和时间" v-if="form.EmailUrgentEnum !== 1" prop="EmailCron">
|
<!-- 发送周期和时间 -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:table:EmailCron')" 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>
|
<!-- 生成 cron -->
|
||||||
|
<el-button type="primary" @click="showDialog"> {{ $t('dictionary:email:button:cron') }} </el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否需要回执" prop="IsReturnRequired">
|
<!-- 是否需要回执 -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:title:isReturnRequired')" prop="IsReturnRequired">
|
||||||
<el-radio-group v-model="form.IsReturnRequired">
|
<el-radio-group v-model="form.IsReturnRequired">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsReturnRequired${item.value}`">{{
|
||||||
<el-radio :label="false">否</el-radio>
|
item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否自动发送" prop="IsAutoSend">
|
<!-- 是否自动发送 -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:table:IsAutoSend')" prop="IsAutoSend">
|
||||||
<el-radio-group v-model="form.IsAutoSend">
|
<el-radio-group v-model="form.IsAutoSend">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsAutoSend${item.value}`">{{ item.label
|
||||||
<el-radio :label="false">否</el-radio>
|
}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="systemLevel">
|
||||||
|
<!-- 是否区分标准 -->
|
||||||
|
<el-form-item :label="$t('dictionary:email:button:isDistinguishCriteria')" prop="IsDistinguishCriteria">
|
||||||
|
<el-radio-group v-model="form.IsDistinguishCriteria" @change="
|
||||||
|
() => {
|
||||||
|
form.CriterionTypeEnum = null
|
||||||
|
}
|
||||||
|
">
|
||||||
|
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsDistinguishCriteria${item.value}`">{{
|
||||||
|
item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
|
<el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="form.IsDistinguishCriteria"
|
||||||
<el-radio-group v-model="form.IsDistinguishCriteria" @change="() => {form.CriterionTypeEnum = null}">
|
prop="CriterionTypeList">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-select v-model="form.CriterionTypeList" clearable class="mr" multiple>
|
||||||
<el-radio :label="false">否</el-radio>
|
<el-option v-for="item of $d.CriterionType" :key="`CriterionType${item.label}`" :label="item.label"
|
||||||
</el-radio-group>
|
:value="item.value" />
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="阅片标准" v-if="form.IsDistinguishCriteria" prop="CriterionTypeEnum">
|
|
||||||
<el-select v-model="form.CriterionTypeEnum" clearable class="mr">
|
|
||||||
<el-option
|
|
||||||
v-for="item of $d.CriterionType"
|
|
||||||
:key="`CriterionType${item.label}`"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否启用" prop="IsEnable">
|
<!-- 是否启用 -->
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:table:IsEnable')" prop="IsEnable">
|
||||||
<el-radio-group v-model="form.IsEnable">
|
<el-radio-group v-model="form.IsEnable">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio v-for="item of $d.YesOrNo" :label="item.value" :key="`IsEnable${item.value}`">{{ item.label
|
||||||
<el-radio :label="false">否</el-radio>
|
}}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="附件(CN)" prop="IsEnable">
|
<!-- 附件(CN) -->
|
||||||
<el-upload
|
<el-form-item :label="$t('trials:emailManageCfg:table:fileListCN')" prop="IsEnable">
|
||||||
class="upload-demo"
|
<el-upload class="upload-demo" action :before-upload="beforeUploadCN" :http-request="handleUploadFileCN"
|
||||||
action
|
:on-preview="handlePreviewCN" :on-remove="handleRemoveFileCN" :show-file-list="true" :limit="1"
|
||||||
:before-upload="beforeUploadCN"
|
:file-list="fileListCN">
|
||||||
:http-request="handleUploadFileCN"
|
<el-button size="small" type="primary" :disabled="fileListCN.length > 0">{{ $t('common:button:upload')
|
||||||
:on-preview="handlePreviewCN"
|
}}</el-button>
|
||||||
:on-remove="handleRemoveFileCN"
|
|
||||||
:show-file-list="true"
|
|
||||||
:limit="1"
|
|
||||||
:file-list="fileListCN"
|
|
||||||
>
|
|
||||||
<el-button size="small" type="primary" :disabled="fileListCN.length > 0">点击上传</el-button>
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="附件(EN)" prop="IsEnable">
|
<!-- 附件(EN) -->
|
||||||
<el-upload
|
<el-form-item :label="$t('trials:emailManageCfg:table:fileListEN')" prop="IsEnable">
|
||||||
class="upload-demo"
|
<el-upload class="upload-demo" action :before-upload="beforeUploadEN" :http-request="handleUploadFileEN"
|
||||||
action
|
:on-preview="handlePreviewEN" :on-remove="handleRemoveFileEN" :show-file-list="true" :limit="1"
|
||||||
:before-upload="beforeUploadEN"
|
:file-list="fileListEN">
|
||||||
:http-request="handleUploadFileEN"
|
<el-button size="small" type="primary" :disabled="fileListEN.length > 0">{{ $t('common:button:upload')
|
||||||
:on-preview="handlePreviewEN"
|
}}</el-button>
|
||||||
:on-remove="handleRemoveFileEN"
|
|
||||||
:show-file-list="true"
|
|
||||||
:limit="1"
|
|
||||||
:file-list="fileListEN"
|
|
||||||
>
|
|
||||||
<el-button size="small" type="primary" :disabled="fileListEN.length > 0">点击上传</el-button>
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="邮件内容模版(CN)" prop="EmailHtmlContentCN">
|
<!-- 邮件内容模版(CN) -->
|
||||||
<el-input
|
<el-form-item :label="$t('dictionary:email:label:emailHtmlContentCN')" prop="EmailHtmlContentCN"
|
||||||
v-model="form.EmailHtmlContentCN"
|
style="position: relative">
|
||||||
type="textarea"
|
<div class="html_temp">
|
||||||
:autosize="{ minRows: 8, maxRows: 8}"
|
<prism-editor class="my-editor" v-model="form.EmailHtmlContentCN" :highlight="highlighter" :line-numbers="true"
|
||||||
/>
|
style="width: 50%;max-height: 500px;"></prism-editor>
|
||||||
|
<div v-html="form.EmailHtmlContentCN" style="width: 50%;"></div>
|
||||||
|
</div>
|
||||||
|
<!-- <el-input v-model="form.EmailHtmlContentCN" type="textarea" :autosize="{ minRows: 8, maxRows: 8 }" />
|
||||||
|
<el-button :disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent" type="text"
|
||||||
|
@click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
|
||||||
|
style="position: absolute; left: -50px; top: 30px">
|
||||||
|
{{ $t('common:button:preview') }}
|
||||||
|
</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮件内容模版(EN)" prop="EmailHtmlContent">
|
<!-- 邮件内容模版(EN) -->
|
||||||
<el-input
|
<el-form-item :label="$t('dictionary:email:label:emailHtmlContent')" prop="EmailHtmlContent"
|
||||||
v-model="form.EmailHtmlContent"
|
style="position: relative">
|
||||||
type="textarea"
|
<div class="html_temp">
|
||||||
:autosize="{ minRows: 8, maxRows: 8}"
|
<prism-editor class="my-editor" v-model="form.EmailHtmlContent" :highlight="highlighter" :line-numbers="true"
|
||||||
/>
|
style="width: 50%;max-height: 500px;"></prism-editor>
|
||||||
|
<div v-html="form.EmailHtmlContent" style="width: 50%;"></div>
|
||||||
|
</div>
|
||||||
|
<!-- <el-input v-model="form.EmailHtmlContent" type="textarea" :autosize="{ minRows: 8, maxRows: 8 }" />
|
||||||
|
<el-button :disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent" type="text"
|
||||||
|
@click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
|
||||||
|
style="position: absolute; left: -50px; top: 30px">
|
||||||
|
{{ $t('common:button:preview') }}
|
||||||
|
</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px; padding-bottom: 10px">
|
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px; padding-bottom: 10px">
|
||||||
<el-form-item style="text-align:right;">
|
<el-form-item style="text-align: right">
|
||||||
<el-button size="small" type="primary" @click="handleSave">Save</el-button>
|
<el-button size="small" type="primary" @click="handleSave">
|
||||||
|
{{ $t('common:button:save') }}
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog append-to-body title="生成 cron" :visible.sync="showCron">
|
<!-- 生成 cron -->
|
||||||
<vcrontab :hideComponent="['year']" @hide="showCron=false" @fill="crontabFill" :expression="expression"></vcrontab>
|
<el-dialog append-to-body :title="$t('dictionary:email:button:cron')" :visible.sync="showCron">
|
||||||
|
<vcrontab :hideComponent="['year']" @hide="showCron = false" @fill="crontabFill" :expression="expression">
|
||||||
|
</vcrontab>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary'
|
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary'
|
||||||
|
import vcrontab from 'vcrontab'
|
||||||
|
|
||||||
|
import { PrismEditor } from 'vue-prism-editor';
|
||||||
|
import 'vue-prism-editor/dist/prismeditor.min.css';
|
||||||
|
import { highlight, languages } from 'prismjs/components/prism-core';
|
||||||
|
import 'prismjs/components/prism-clike';
|
||||||
|
import 'prismjs/components/prism-javascript';
|
||||||
|
import 'prismjs/themes/prism.css';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() { return {} }
|
default() {
|
||||||
}
|
return {}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
systemLevel: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0
|
||||||
|
},
|
||||||
|
},
|
||||||
|
isDistinguishCriteria: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: { vcrontab, PrismEditor },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
expression: '',
|
expression: '',
|
||||||
|
@ -240,37 +269,73 @@ export default {
|
||||||
IsUrgent: true,
|
IsUrgent: true,
|
||||||
IsEnable: true,
|
IsEnable: true,
|
||||||
IsAutoSend: true,
|
IsAutoSend: true,
|
||||||
CriterionTypeEnum: null
|
CriterionTypeEnum: null,
|
||||||
|
EmailDelaySeconds: null,
|
||||||
|
CriterionTypeList: []
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
Code: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
Code: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }],
|
||||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
BusinessScenarioEnum: [
|
||||||
EmailTopicCN: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||||
EmailTopic: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
],
|
||||||
BusinessLevelEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
EmailTopicCN: [
|
||||||
ToUserTypeList: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||||
EmailCron: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
],
|
||||||
EmailUrgentEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
EmailTopic: [
|
||||||
EmailHtmlContentCN: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||||
EmailHtmlContent: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
],
|
||||||
CriterionTypeEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
BusinessLevelEnum: [
|
||||||
|
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||||
|
],
|
||||||
|
// ToUserTypeList: [
|
||||||
|
// { required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
|
// ],
|
||||||
|
// EmailCron: [
|
||||||
|
// { required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
|
// ],
|
||||||
|
EmailUrgentEnum: [
|
||||||
|
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||||
|
],
|
||||||
|
EmailHtmlContentCN: [
|
||||||
|
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||||
|
],
|
||||||
|
EmailHtmlContent: [
|
||||||
|
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||||
|
],
|
||||||
|
CriterionTypeList: [
|
||||||
|
{ required: true, type: 'array', message: this.$t('common:ruleMessage:select'), trigger: ['blur'] },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
scenarioOption: [],
|
scenarioOption: [],
|
||||||
fileListCN: [],
|
fileListCN: [],
|
||||||
fileListEN: [],
|
fileListEN: [],
|
||||||
loading: false
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initForm()
|
this.initForm()
|
||||||
|
if (this.systemLevel) {
|
||||||
|
if (this.systemLevel === 1) {
|
||||||
|
this.form.ToUserTypeList = []
|
||||||
|
}
|
||||||
|
this.form.CopyUserTypeList = []
|
||||||
|
this.form.EmailUrgentEnum = 3
|
||||||
|
this.form.IsReturnRequired = false
|
||||||
|
this.form.IsDistinguishCriteria = false
|
||||||
|
} else {
|
||||||
|
this.form.IsDistinguishCriteria = this.isDistinguishCriteria
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
highlighter(code) {
|
||||||
|
return highlight(code, languages.js);
|
||||||
|
},
|
||||||
showDialog() {
|
showDialog() {
|
||||||
this.expression = this.form.EmailCron;//传入的 cron 表达式,可以反解析到 UI 上
|
this.expression = this.form.EmailCron //传入的 cron 表达式,可以反解析到 UI 上
|
||||||
this.showCron = true;
|
this.showCron = true
|
||||||
},
|
},
|
||||||
crontabFill(value) {
|
crontabFill(value) {
|
||||||
this.form.EmailCron = value;
|
this.form.EmailCron = value
|
||||||
},
|
},
|
||||||
handleRemoveFileCN() {
|
handleRemoveFileCN() {
|
||||||
this.form.AttachNameCN = null
|
this.form.AttachNameCN = null
|
||||||
|
@ -279,7 +344,7 @@ export default {
|
||||||
},
|
},
|
||||||
beforeUploadCN() {
|
beforeUploadCN() {
|
||||||
if (this.fileListCN.length > 0) {
|
if (this.fileListCN.length > 0) {
|
||||||
this.$alert('最多只能传一个附件')
|
this.$alert(this.$t('trials:emailManageCfg:message:msg1'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -293,10 +358,15 @@ export default {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('file', param.file)
|
formData.append('file', param.file)
|
||||||
this.form.AttachNameCN = param.file.name
|
this.form.AttachNameCN = param.file.name
|
||||||
Upload(formData, 3).then(res => {
|
Upload(formData, 3).then((res) => {
|
||||||
this.form.AttachCNPath = res.Result.FilePath
|
this.form.AttachCNPath = res.Result.FilePath
|
||||||
this.btnLoading = false
|
this.btnLoading = false
|
||||||
this.fileListCN.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
this.fileListCN.push({
|
||||||
|
name: param.file.name,
|
||||||
|
path: res.Result.FilePath,
|
||||||
|
fullPath: res.Result.FullFilePath,
|
||||||
|
url: res.Result.FilePath,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleUploadFileEN(param) {
|
handleUploadFileEN(param) {
|
||||||
|
@ -304,10 +374,15 @@ export default {
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('file', param.file)
|
formData.append('file', param.file)
|
||||||
this.form.AttachName = param.file.name
|
this.form.AttachName = param.file.name
|
||||||
Upload(formData, 3).then(res => {
|
Upload(formData, 3).then((res) => {
|
||||||
this.form.AttachPath = res.Result.FilePath
|
this.form.AttachPath = res.Result.FilePath
|
||||||
this.btnLoading = false
|
this.btnLoading = false
|
||||||
this.fileListEN.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
this.fileListEN.push({
|
||||||
|
name: param.file.name,
|
||||||
|
path: res.Result.FilePath,
|
||||||
|
fullPath: res.Result.FullFilePath,
|
||||||
|
url: res.Result.FilePath,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleRemoveFileEN() {
|
handleRemoveFileEN() {
|
||||||
|
@ -317,7 +392,7 @@ export default {
|
||||||
},
|
},
|
||||||
beforeUploadEN() {
|
beforeUploadEN() {
|
||||||
if (this.fileListEN.length > 0) {
|
if (this.fileListEN.length > 0) {
|
||||||
this.$alert('最多只能传一个附件')
|
this.$alert(this.$t('trials:emailManageCfg:message:msg1'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -334,31 +409,57 @@ export default {
|
||||||
this.form[k] = this.data[k]
|
this.form[k] = this.data[k]
|
||||||
}
|
}
|
||||||
if (k === 'AttachPath' && this.form[k]) {
|
if (k === 'AttachPath' && this.form[k]) {
|
||||||
this.fileListEN.push({ name: this.data.AttachName, path: this.data.AttachPath, fullPath: this.data.AttachPath, url: this.data.AttachPath })
|
this.fileListEN.push({
|
||||||
|
name: this.data.AttachName,
|
||||||
|
path: this.data.AttachPath,
|
||||||
|
fullPath: this.data.AttachPath,
|
||||||
|
url: this.data.AttachPath,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if (k === 'AttachCNPath' && this.form[k]) {
|
if (k === 'AttachCNPath' && this.form[k]) {
|
||||||
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
|
||||||
},
|
},
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.emailForm.validate(valid => {
|
this.$refs.emailForm.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
this.loading = true
|
this.loading = true
|
||||||
addOrUpdateEmailNoticeConfigList(this.form).then(res => {
|
this.form.systemLevel = this.systemLevel
|
||||||
|
addOrUpdateEmailNoticeConfigList(this.form)
|
||||||
|
.then((res) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$emit('closeDialog')
|
this.$emit('closeDialog')
|
||||||
this.$emit('getList')
|
this.$emit('getList')
|
||||||
this.$message.success('Saved successfully')
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
}
|
// 预览模板
|
||||||
|
PreviewHTML(html, htmlEn) {
|
||||||
|
this.$emit('PreviewHTML', html, htmlEn)
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.html_temp {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.my-editor {
|
||||||
|
border: 1px solid #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -1,172 +1,160 @@
|
||||||
<template>
|
<template>
|
||||||
<box-content>
|
<box-content>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<el-form :inline="true" size="mini" class="base-search-form">
|
<el-form :inline="true" class="base-search-form">
|
||||||
<el-form-item label="是否需要回执:">
|
<!-- 是否需要回执 -->
|
||||||
<el-select v-model="searchData.IsReturnRequired" clearable style="width:100px;">
|
<el-form-item :label="$t('trials:emailManageCfg:title:isReturnRequired')" v-if="!systemLevel">
|
||||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
<el-select v-model="searchData.IsReturnRequired" clearable style="width: 100px">
|
||||||
|
<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-select v-model="searchData.IsUrgent" clearable style="width:100px;">
|
<el-form-item :label="$t('dictionary:email:label:IsUrgent')" v-if="!systemLevel">
|
||||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
<el-select v-model="searchData.IsUrgent" clearable style="width: 100px">
|
||||||
|
<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-select v-model="searchData.IsEnable" clearable style="width:100px;">
|
<el-form-item :label="$t('trials:emailManageCfg:table:IsEnable')" v-if="!systemLevel">
|
||||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
<el-select v-model="searchData.IsEnable" clearable style="width: 100px">
|
||||||
|
<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="阅片标准:" v-if="isDistinguishCriteria">
|
<el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="isDistinguishCriteria && !systemLevel">
|
||||||
<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-form-item>
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:form:BusinessModule')">
|
||||||
|
<el-select v-model="searchData.BusinessModuleEnum" clearable style="width: 100px">
|
||||||
|
<el-option v-for="item of $d.BusinessModule" :value="item.value" :label="item.label" :key="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:form:BusinessScenario')">
|
||||||
|
<el-select v-model="searchData.BusinessScenarioEnum" clearable style="width: 100px">
|
||||||
|
<el-option v-for="item of $d.Email_BusinessScenario" :value="item.value" :label="item.label"
|
||||||
|
:key="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:form:ToUserType')">
|
||||||
|
<el-select v-model="searchData.ToUserType" clearable style="width: 100px">
|
||||||
|
<el-option v-for="item of UserTypeList" :value="item.value" :label="item.label" :key="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:form:EmailUrgent')" v-if="systemLevel === 1">
|
||||||
|
<el-select v-model="searchData.EmailUrgentEnum" clearable style="width: 100px">
|
||||||
|
<el-option v-for="item of $d.EmailUrgent" :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>
|
||||||
<el-button type="primary" @click="handleSearch">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||||
<el-button type="primary" @click="handleReset">重置</el-button>
|
{{ $t('common:button:search') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||||
|
{{ $t('common:button:reset') }}
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
<el-form-item>
|
||||||
<span style="margin-left:auto;">
|
<el-button type="primary" @click="handleExport">
|
||||||
|
{{ $t('common:button:export') }}
|
||||||
|
</el-button>
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
>
|
||||||
场景配置
|
场景配置
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<el-button
|
<el-button type="primary" @click="handleAdd">
|
||||||
type="primary"
|
{{ $t('common:button:new') }}
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
>
|
|
||||||
新增
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
<el-button type="primary" @click="openDrawer" :disabled="multipleSelection.length <= 0">
|
||||||
|
{{ $t('trials:emailManageCfg:button:batchAudit') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!-- 受试者列表 -->
|
<!-- 受试者列表 -->
|
||||||
<el-table
|
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 45 }" :data="list" stripe height="100" style="width: 100%"
|
||||||
v-loading="loading"
|
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
|
||||||
v-adaptive="{bottomOffset:45}"
|
<!-- <el-table-column type="index" width="40" /> -->
|
||||||
:data="list"
|
<el-table-column type="selection" width="55">
|
||||||
stripe
|
</el-table-column>
|
||||||
height="100"
|
|
||||||
style="width:100%"
|
|
||||||
@sort-change="handleSortByColumn"
|
|
||||||
>
|
|
||||||
<el-table-column type="index" width="40" />
|
|
||||||
<!-- Code -->
|
<!-- Code -->
|
||||||
<el-table-column
|
<el-table-column prop="Code" :label="$t('trials:emailManageCfg:title:code')" sortable="custom"
|
||||||
prop="Code"
|
show-overflow-tooltip min-width="100" />
|
||||||
:label="$t('trials:emailManageCfg:title:code')"
|
<el-table-column v-if="isDistinguishCriteria" prop="TrialReadingCriterionId"
|
||||||
sortable="custom"
|
:label="$t('trials:reviewTrack:table:criterionName')" show-overflow-tooltip sortable="custom" min-width="120">
|
||||||
show-overflow-tooltip
|
|
||||||
width="100"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
v-if="isDistinguishCriteria"
|
|
||||||
prop="TrialReadingCriterionId"
|
|
||||||
:label="$t('trials:reviewTrack:table:criterionName')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
sortable="custom"
|
|
||||||
width="120"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.TrialCriterionName }}
|
{{scope.row.CriterionTypeList ? scope.row.CriterionTypeList.map(item => $fd('CriterionType', item)).join(', ')
|
||||||
|
: ''}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- 邮件主题(中文) -->
|
||||||
prop="EmailTopicCN"
|
<el-table-column prop="EmailTopicCN" :label="$t('trials:emailManageCfg:table:EmailTopicCN')" sortable="custom"
|
||||||
label="邮件主题(中文)"
|
show-overflow-tooltip min-width="160" />
|
||||||
sortable="custom"
|
<!-- 邮件主题(英文) -->
|
||||||
show-overflow-tooltip
|
<el-table-column prop="EmailTopic" :label="$t('trials:emailManageCfg:table:EmailTopic')" sortable="custom"
|
||||||
width="160"
|
show-overflow-tooltip min-width="160" />
|
||||||
/>
|
<!-- 业务层级 -->
|
||||||
<el-table-column
|
<el-table-column prop="BusinessLevelEnum" :label="$t('dictionary:email:label:businessLevel')" sortable="custom"
|
||||||
prop="EmailTopic"
|
show-overflow-tooltip min-width="150">
|
||||||
label="邮件主题(英文)"
|
|
||||||
sortable="custom"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="160"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="BusinessLevelEnum"
|
|
||||||
label="业务层级"
|
|
||||||
sortable="custom"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="100">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('BusinessLevel', scope.row.BusinessLevelEnum) }}
|
{{ $fd('BusinessLevel', scope.row.BusinessLevelEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- 业务模块 -->
|
||||||
prop="BusinessModuleEnum"
|
<el-table-column prop="BusinessModuleEnum" :label="$t('dictionary:email:label:businessModule')" sortable="custom"
|
||||||
label="业务模块"
|
show-overflow-tooltip min-width="160">
|
||||||
sortable="custom"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="100">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('BusinessModule', scope.row.BusinessModuleEnum) }}
|
{{ $fd('BusinessModule', scope.row.BusinessModuleEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- 业务场景 -->
|
||||||
prop="BusinessScenarioEnum"
|
<el-table-column prop="BusinessScenarioEnum" :label="$t('trials:emailManageCfg:table:BusinessScenarioEnum')"
|
||||||
label="业务场景"
|
sortable="custom" show-overflow-tooltip min-width="130">
|
||||||
sortable="custom"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="130"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('Email_BusinessScenario', scope.row.BusinessScenarioEnum) }}
|
{{ $fd('Email_BusinessScenario', scope.row.BusinessScenarioEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 收件人 -->
|
<!-- 收件人v-if="systemLevel !== 1" -->
|
||||||
<el-table-column
|
<el-table-column prop="ToUserTypeList" :label="$t('trials:emailManageCfg:title:toUserTypeList')"
|
||||||
prop="ToUserTypeList"
|
show-overflow-tooltip min-width="100">
|
||||||
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="100"
|
|
||||||
>
|
|
||||||
<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(
|
||||||
|
'、'
|
||||||
|
)
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 抄送人 -->
|
<!-- 抄送人v-if="!systemLevel" -->
|
||||||
<el-table-column
|
<el-table-column prop="CopyUserTypeList" :label="$t('trials:emailManageCfg:title:copyUserTypeList')"
|
||||||
prop="CopyUserTypeList"
|
show-overflow-tooltip min-width="100">
|
||||||
:label="$t('trials:emailManageCfg:title:copyUserTypeList')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="100"
|
|
||||||
>
|
|
||||||
<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(
|
||||||
|
'、'
|
||||||
|
)
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- 加急状态 -->
|
||||||
prop="EmailUrgentEnum"
|
<el-table-column prop="EmailUrgentEnum" :label="$t('dictionary:email:label:IsUrgent')" sortable="custom"
|
||||||
label="加急状态"
|
show-overflow-tooltip min-width="110">
|
||||||
sortable="custom"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="100"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('EmailUrgent', scope.row.EmailUrgentEnum) }}
|
{{ $fd('EmailUrgent', scope.row.EmailUrgentEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- 发送周期和时间 -->
|
||||||
prop="EmailCron"
|
<el-table-column prop="EmailCron" :label="$t('trials:emailManageCfg:table:EmailCron')" sortable="custom"
|
||||||
label="发送周期和时间"
|
show-overflow-tooltip min-width="180" />
|
||||||
sortable="custom"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="160"
|
|
||||||
/>
|
|
||||||
<!-- 附件 -->
|
<!-- 附件 -->
|
||||||
<el-table-column
|
<el-table-column prop="FileName" :label="$t('trials:emailManageCfg:title:fileName')" show-overflow-tooltip
|
||||||
prop="FileName"
|
min-width="100" v-if="!systemLevel">
|
||||||
:label="$t('trials:emailManageCfg:title:fileName')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
width="100"
|
|
||||||
>
|
|
||||||
<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)">
|
||||||
{{ scope.row.FileName }}
|
{{ scope.row.FileName }}
|
||||||
|
@ -174,115 +162,171 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 是否需要回执 -->
|
<!-- 是否需要回执 -->
|
||||||
<el-table-column
|
<el-table-column prop="IsReturnRequired" :label="$t('trials:emailManageCfg:title:isReturnRequired')"
|
||||||
prop="IsReturnRequired"
|
show-overflow-tooltip sortable="custom" min-width="160" v-if="!systemLevel">
|
||||||
:label="$t('trials:emailManageCfg:title:isReturnRequired')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
sortable="custom"
|
|
||||||
width="140"
|
|
||||||
>
|
|
||||||
<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">
|
||||||
{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}
|
{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}</el-tag>
|
<el-tag v-else type="primary">{{
|
||||||
|
$fd('YesOrNo', scope.row.IsReturnRequired)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 是否自动发送 -->
|
<!-- 是否自动发送 -->
|
||||||
<el-table-column
|
<el-table-column prop="IsAutoSend" :label="$t('trials:emailManageCfg:title:isAutoSend')" show-overflow-tooltip
|
||||||
prop="IsAutoSend"
|
sortable="custom" min-width="160" v-if="!systemLevel">
|
||||||
:label="$t('trials:emailManageCfg:title:isAutoSend')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
sortable="custom"
|
|
||||||
width="160"
|
|
||||||
>
|
|
||||||
<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">
|
||||||
{{ $fd('YesOrNo', scope.row.IsAutoSend) }}
|
{{ $fd('YesOrNo', scope.row.IsAutoSend) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsAutoSend) }}</el-tag>
|
<el-tag v-else type="primary">{{
|
||||||
|
$fd('YesOrNo', scope.row.IsAutoSend)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="IsEnable" :label="$t('trials:emailManageCfg:table:IsEnable')" show-overflow-tooltip
|
||||||
prop="IsEnable"
|
sortable="custom" min-width="160" v-if="!systemLevel">
|
||||||
:label="$t('trials:emailManageCfg:table:IsEnable')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
sortable="custom"
|
|
||||||
width="160"
|
|
||||||
>
|
|
||||||
<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">
|
||||||
{{ $fd('YesOrNo', scope.row.IsEnable) }}
|
{{ $fd('YesOrNo', scope.row.IsEnable) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsEnable) }}</el-tag>
|
<el-tag v-else type="primary">{{
|
||||||
|
$fd('YesOrNo', scope.row.IsEnable)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 更新时间 -->
|
<!-- 更新时间 -->
|
||||||
<el-table-column
|
<el-table-column prop="UpdateTime" :label="$t('trials:emailManageCfg:title:updateTime')" show-overflow-tooltip
|
||||||
prop="UpdateTime"
|
sortable="custom" min-width="160" />
|
||||||
:label="$t('trials:emailManageCfg:title:updateTime')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
sortable="custom"
|
|
||||||
width="160"
|
|
||||||
/>
|
|
||||||
<!-- 创建时间 -->
|
<!-- 创建时间 -->
|
||||||
<el-table-column
|
<el-table-column prop="CreateTime" :label="$t('trials:emailManageCfg:title:createTime')" show-overflow-tooltip
|
||||||
prop="CreateTime"
|
sortable="custom" min-width="160" />
|
||||||
:label="$t('trials:emailManageCfg:title:createTime')"
|
<el-table-column :label="$t('common:action:action')" min-width="180" fixed="right">
|
||||||
show-overflow-tooltip
|
|
||||||
sortable="custom"
|
|
||||||
width="160"
|
|
||||||
/>
|
|
||||||
<el-table-column label="Action" width="140" fixed="right">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button type="text" @click="handleEdit(scope.row)">
|
||||||
type="text"
|
{{ $t('common:button:edit') }}
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
>
|
|
||||||
编辑
|
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button type="text" @click="handleDelete(scope.row)">
|
||||||
|
{{ $t('common:button:delete') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button type="text" @click="
|
||||||
|
preview(scope.row.EmailHtmlContentCN, scope.row.EmailHtmlContent)
|
||||||
|
">{{ $t('common:button:preview') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||||
|
@pagination="getList" />
|
||||||
<!-- 搜索框 -->
|
<!-- 搜索框 -->
|
||||||
<!-- 修改受试者状态 -->
|
<!-- 修改受试者状态 -->
|
||||||
<el-dialog
|
<el-dialog v-if="editVisible" :visible.sync="editVisible" :close-on-click-modal="false" :title="title" width="700px"
|
||||||
v-if="editVisible"
|
fullscreen custom-class="base-dialog-wrapper">
|
||||||
:visible.sync="editVisible"
|
<EmailForm :data="rowData" :system-level="systemLevel" :isDistinguishCriteria="isDistinguishCriteria"
|
||||||
:close-on-click-modal="false"
|
@closeDialog="closeDialog" @getList="getList" @PreviewHTML="preview" />
|
||||||
:title="title"
|
|
||||||
width="700px"
|
|
||||||
fullscreen
|
|
||||||
custom-class="base-dialog-wrapper"
|
|
||||||
>
|
|
||||||
<EmailForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 修改受试者状态 -->
|
<!-- 修改受试者状态 -->
|
||||||
<el-dialog
|
<el-dialog v-if="attachmentVisible" :visible.sync="attachmentVisible" :close-on-click-modal="false"
|
||||||
v-if="attachmentVisible"
|
:title="$t('trials:emailManageCfg:title:fileName')" width="80%" custom-class="base-dialog-wrapper" append-to-body>
|
||||||
:visible.sync="attachmentVisible"
|
<AttachmentList :business-scenario-enum="rowData.BusinessScenarioEnum"
|
||||||
:close-on-click-modal="false"
|
:is-distinguish-criteria="rowData.IsDistinguishCriteria" @getList="getList" />
|
||||||
title="附件"
|
|
||||||
width="80%"
|
|
||||||
custom-class="base-dialog-wrapper"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<AttachmentList
|
|
||||||
:business-scenario-enum="rowData.BusinessScenarioEnum"
|
|
||||||
:is-distinguish-criteria="rowData.IsDistinguishCriteria"
|
|
||||||
@getList="getList"
|
|
||||||
/>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 预览模板 -->
|
||||||
|
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :close-on-click-modal="false"
|
||||||
|
:title="$t('common:button:preview')" fullscreen custom-class="base-dialog-wrapper">
|
||||||
|
<div style="
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-around;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
">
|
||||||
|
<div style="min-width: 50%">
|
||||||
|
<!-- 邮件内容模版(CN) -->
|
||||||
|
<h3>{{ $t('dictionary:email:title:title1') }}</h3>
|
||||||
|
<div v-html="previewHTML"></div>
|
||||||
|
</div>
|
||||||
|
<div style="min-width: 50%">
|
||||||
|
<!-- 邮件内容模版(EN) -->
|
||||||
|
<h3>{{ $t('dictionary:email:title:title2') }}</h3>
|
||||||
|
<div v-html="previewHTMLEN"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-drawer :title="$t('trials:emailManageCfg:title:audit')" :visible.sync="drawer" direction="rtl" size="80%">
|
||||||
|
<!-- <div style="width: 800px">
|
||||||
|
<el-form label-width="100px" @submit.native.prevent size="small" :inline="true" class="demo-form-inline">
|
||||||
|
<el-form-item :label="$t('il8n:search:keyword')">
|
||||||
|
<el-input v-model="key" @input="keyChange" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('il8n:search:state')">
|
||||||
|
<el-select v-model="State" clearable filterable @change="handleStateChange">
|
||||||
|
<el-option v-for="item of $d.InternationalizationKeyState"
|
||||||
|
:key="'InternationalizationKeyState' + item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div> -->
|
||||||
|
<el-table :data="tableData" v-adaptive="{ bottomOffset: 50 }" height="100" style="width: 100%"
|
||||||
|
@sort-change="handleSortByColumnDrawer">
|
||||||
|
<!-- Code -->
|
||||||
|
<el-table-column prop="Code" :label="$t('trials:emailManageCfg:title:code')" sortable="custom"
|
||||||
|
show-overflow-tooltip min-width="100" />
|
||||||
|
<el-table-column v-if="isDistinguishCriteria" prop="TrialReadingCriterionId"
|
||||||
|
:label="$t('trials:reviewTrack:table:criterionName')" show-overflow-tooltip sortable="custom" min-width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 邮件主题(中文) -->
|
||||||
|
<el-table-column prop="EmailTopicCN" :label="$t('trials:emailManageCfg:table:EmailTopicCN')" sortable="custom"
|
||||||
|
show-overflow-tooltip min-width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.EmailTopicCN" @input="
|
||||||
|
(e) => {
|
||||||
|
$set(scope.row, 'EmailTopicCN', e)
|
||||||
|
}
|
||||||
|
" size="mini"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 邮件主题(英文) -->
|
||||||
|
<el-table-column prop="EmailTopic" :label="$t('trials:emailManageCfg:table:EmailTopic')" sortable="custom"
|
||||||
|
show-overflow-tooltip min-width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.EmailTopic" @input="
|
||||||
|
(e) => {
|
||||||
|
$set(scope.row, 'EmailTopic', e)
|
||||||
|
}
|
||||||
|
" size="mini"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 业务层级 -->
|
||||||
|
<el-table-column prop="BusinessLevelEnum" :label="$t('dictionary:email:label:businessLevel')" sortable="custom"
|
||||||
|
show-overflow-tooltip min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('BusinessLevel', scope.row.BusinessLevelEnum) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
|
||||||
|
<el-button size="mini" @click="drawer = false">{{ $t('common:button:cancel') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button size="mini" type="primary" @click="handleSave">{{
|
||||||
|
$t('common:button:save')
|
||||||
|
}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getEmailNoticeConfigList, deleteEmailNoticeConfig } from '@/api/dictionary'
|
import {
|
||||||
|
getEmailNoticeConfigList,
|
||||||
|
deleteEmailNoticeConfig,
|
||||||
|
batchUpdateEmail
|
||||||
|
} from '@/api/dictionary'
|
||||||
|
import { GetEmailNoticeConfigList_Export } from '@/api/export'
|
||||||
import BoxContent from '@/components/BoxContent'
|
import BoxContent from '@/components/BoxContent'
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
import EmailForm from './EmailForm'
|
import EmailForm from './EmailForm'
|
||||||
|
@ -293,8 +337,14 @@ const searchDataDefault = () => {
|
||||||
IsUrgent: '',
|
IsUrgent: '',
|
||||||
IsEnable: '',
|
IsEnable: '',
|
||||||
CriterionTypeEnum: null,
|
CriterionTypeEnum: null,
|
||||||
|
BusinessModuleEnum: null,
|
||||||
|
BusinessScenarioEnum: null,
|
||||||
|
EmailUrgentEnum: null,
|
||||||
|
ToUserType: null,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
|
SortField: 'Code',
|
||||||
|
Asc: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
@ -305,8 +355,14 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
return false
|
return false
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
systemLevel: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -318,47 +374,111 @@ export default {
|
||||||
rowData: {},
|
rowData: {},
|
||||||
title: '',
|
title: '',
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
attachmentVisible: false
|
attachmentVisible: false,
|
||||||
|
previewVisible: false,
|
||||||
|
previewHTML: null,
|
||||||
|
previewHTMLEN: null,
|
||||||
|
multipleSelection: [],
|
||||||
|
drawer: false,
|
||||||
|
tableData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
UserTypeList() {
|
||||||
|
if (this.systemLevel === 1) {
|
||||||
|
return this.$d.UserType
|
||||||
|
} else {
|
||||||
|
return this.$d.UserType.filter(
|
||||||
|
(item) => ![7, 31, 32, 21, 26, 27].includes(item.value)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async handleSave() {
|
||||||
|
try {
|
||||||
|
let arr = []
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
let obj = {
|
||||||
|
EmailTopic: item.EmailTopic,
|
||||||
|
EmailTopicCN: item.EmailTopicCN,
|
||||||
|
Id: item.Id
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
})
|
||||||
|
this.drawer = false
|
||||||
|
let res = await batchUpdateEmail(arr)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$message.success(this.$t('trials:emailManageCfg:message:auditSuccess'))
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 排序
|
||||||
|
handleSortByColumnDrawer(column) {
|
||||||
|
if (column.order === 'ascending') {
|
||||||
|
this.tableData.sort((a, b) =>
|
||||||
|
a[column.prop].localeCompare(b[column.prop])
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
this.tableData.sort((a, b) =>
|
||||||
|
b[column.prop].localeCompare(a[column.prop])
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openDrawer() {
|
||||||
|
this.tableData = []
|
||||||
|
this.multipleSelection.forEach(item => {
|
||||||
|
let obj = Object.assign({}, item)
|
||||||
|
this.tableData.push(obj)
|
||||||
|
})
|
||||||
|
this.drawer = true
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val;
|
||||||
|
},
|
||||||
// 获取受试者列表
|
// 获取受试者列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
|
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
|
||||||
getEmailNoticeConfigList(this.searchData).then(res => {
|
this.searchData.systemLevel = this.systemLevel
|
||||||
|
getEmailNoticeConfigList(this.searchData)
|
||||||
|
.then((res) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.list = res.Result.CurrentPageData
|
this.list = res.Result.CurrentPageData
|
||||||
this.total = res.Result.TotalCount
|
this.total = res.Result.TotalCount
|
||||||
}).catch(() => { this.loading = false })
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.rowData = {}
|
this.rowData = {}
|
||||||
this.title = '新增'
|
this.title = this.$t('common:button:new')
|
||||||
this.editVisible = true
|
this.editVisible = true
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.rowData = { ...row }
|
this.rowData = { ...row }
|
||||||
this.title = '编辑'
|
this.title = this.$t('common:button:edit')
|
||||||
this.editVisible = true
|
this.editVisible = true
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true,
|
||||||
})
|
}).then(() => {
|
||||||
.then(() => {
|
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||||
deleteEmailNoticeConfig(row.Id)
|
|
||||||
.then(res => {
|
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.$message.success('删除成功!')
|
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -391,7 +511,24 @@ export default {
|
||||||
// 关闭新增、编辑框
|
// 关闭新增、编辑框
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.editVisible = false
|
this.editVisible = false
|
||||||
}
|
},
|
||||||
}
|
preview(html, htmlEN) {
|
||||||
|
this.previewHTML = html
|
||||||
|
this.previewHTMLEN = htmlEN
|
||||||
|
this.previewVisible = true
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
handleExport() {
|
||||||
|
// this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
|
||||||
|
// this.searchData.systemLevel = this.systemLevel
|
||||||
|
// return GetEmailNoticeConfigList_Export(this.searchData)
|
||||||
|
return GetEmailNoticeConfigList_Export(this.searchData)
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.box-body .search .base-search-form .el-form-item {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -2,24 +2,48 @@
|
||||||
<box-content>
|
<box-content>
|
||||||
<el-tabs v-model="activeTab" type="border-card">
|
<el-tabs v-model="activeTab" type="border-card">
|
||||||
<!-- 通用 -->
|
<!-- 通用 -->
|
||||||
<el-tab-pane
|
<el-tab-pane :label="$t('trials:emailManageCfg:title:commom')" name="0">
|
||||||
:label="$t('trials:emailManageCfg:title:commom')"
|
<EmailList
|
||||||
name="0"
|
v-if="activeTab === '0'"
|
||||||
>
|
:is-distinguish-criteria="false"
|
||||||
<EmailList v-if="activeTab === '0'" :is-distinguish-criteria="false"></EmailList>
|
:system-level="0"
|
||||||
|
></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"
|
||||||
|
:system-level="0"
|
||||||
|
></EmailList>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<!-- 系统相关 -->
|
||||||
|
<el-tab-pane :label="$t('trials:emailManageCfg:title:system')" name="2">
|
||||||
|
<EmailList
|
||||||
|
v-if="activeTab === '2'"
|
||||||
|
:is-distinguish-criteria="false"
|
||||||
|
:system-level="1"
|
||||||
|
></EmailList>
|
||||||
|
</el-tab-pane>
|
||||||
|
<!-- 系统相关-分角色 -->
|
||||||
|
<!-- <el-tab-pane :label="$t('trials:emailManageCfg:title:systemDisRole')" name="3">
|
||||||
|
<EmailList
|
||||||
|
v-if="activeTab === '3'"
|
||||||
|
:is-distinguish-criteria="false"
|
||||||
|
:system-level="2"
|
||||||
|
></EmailList>
|
||||||
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getEmailNoticeConfigList, deleteEmailNoticeConfig } from '@/api/dictionary'
|
import {
|
||||||
|
getEmailNoticeConfigList,
|
||||||
|
deleteEmailNoticeConfig,
|
||||||
|
} from '@/api/dictionary'
|
||||||
import BoxContent from '@/components/BoxContent'
|
import BoxContent from '@/components/BoxContent'
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
import EmailList from './components/EmailList'
|
import EmailList from './components/EmailList'
|
||||||
|
@ -29,7 +53,7 @@ const searchDataDefault = () => {
|
||||||
IsUrgent: '',
|
IsUrgent: '',
|
||||||
IsEnable: '',
|
IsEnable: '',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
@ -45,7 +69,7 @@ export default {
|
||||||
rowData: {},
|
rowData: {},
|
||||||
title: '',
|
title: '',
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
attachmentVisible: false
|
attachmentVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -55,11 +79,15 @@ export default {
|
||||||
// 获取受试者列表
|
// 获取受试者列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
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
|
||||||
this.total = res.Result.TotalCount
|
this.total = res.Result.TotalCount
|
||||||
}).catch(() => { this.loading = false })
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
@ -77,11 +105,9 @@ export default {
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true,
|
||||||
})
|
}).then(() => {
|
||||||
.then(() => {
|
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||||
deleteEmailNoticeConfig(row.Id)
|
|
||||||
.then(res => {
|
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.$message.success('删除成功!')
|
this.$message.success('删除成功!')
|
||||||
|
@ -117,7 +143,7 @@ export default {
|
||||||
// 关闭新增、编辑框
|
// 关闭新增、编辑框
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.editVisible = false
|
this.editVisible = false
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue