项目配置新增邮件模板添加查询条件
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-10-30 09:54:43 +08:00
parent 2a11d3f012
commit 4400d31bca
1 changed files with 116 additions and 54 deletions

View File

@ -3,16 +3,14 @@
<box-content v-loading="loading"> <box-content v-loading="loading">
<!-- 搜索框 --> <!-- 搜索框 -->
<div class="search"> <div class="search">
<el-form <el-form :inline="true" size="mini" class="base-search-form">
:inline="true"
size="mini"
class="base-search-form"
>
<!-- 审核问题 --> <!-- 审核问题 -->
<el-form-item :label="$t('trials:emailManageCfg:title:businessScenario')"> <el-form-item
:label="$t('trials:emailManageCfg:title:businessScenario')"
>
<el-select <el-select
v-model="searchData.BusinessScenarioEnum" v-model="searchData.BusinessScenarioEnum"
style="width:150px;" style="width: 150px"
> >
<el-option <el-option
v-for="item of $d.Email_BusinessScenario" v-for="item of $d.Email_BusinessScenario"
@ -20,11 +18,34 @@
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom:10px" :label="$t('trials:reviewTrack:table:criterionName')"> <el-form-item
<el-select v-model="searchData.CriterionTypeEnum" clearable style="width:120px;"> style="margin-bottom: 10px"
:label="$t('trials:emailManageCfg:table:BusinessModuleEnum')"
>
<el-select
v-model="searchData.BusinessModuleEnum"
clearable
style="width: 120px"
>
<el-option
v-for="item of $d.BusinessModule"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item
style="margin-bottom: 10px"
:label="$t('trials:reviewTrack:table:criterionName')"
>
<el-select
v-model="searchData.CriterionTypeEnum"
clearable
style="width: 120px"
>
<el-option <el-option
v-for="item of $d.CriterionType" v-for="item of $d.CriterionType"
:key="item.id" :key="item.id"
@ -34,21 +55,19 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" @click="handleSearch">{{
type="primary" $t('common:button:search')
@click="handleSearch" }}</el-button>
>{{ $t('common:button:search') }}</el-button> <el-button type="primary" @click="handleReset">{{
<el-button $t('common:button:reset')
type="primary" }}</el-button>
@click="handleReset"
>{{ $t('common:button:reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span style="margin-left:auto"> <span style="margin-left: auto">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
:disabled="selectArr.length<=0" :disabled="selectArr.length <= 0"
@click="handleSubmit" @click="handleSubmit"
> >
{{ $t('common:button:submit') }} {{ $t('common:button:submit') }}
@ -113,7 +132,7 @@
width="100" 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 <el-table-column
@ -124,7 +143,7 @@
width="130" 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>
<!-- 收件人 --> <!-- 收件人 -->
@ -135,7 +154,13 @@
width="100" 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>
<!-- 抄送人 --> <!-- 抄送人 -->
@ -146,7 +171,13 @@
width="100" 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 <el-table-column
@ -156,7 +187,7 @@
width="100" 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 <el-table-column
@ -175,7 +206,11 @@
width="100" width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.AttachCNPath" type="text" @click="handlePreview(scope.row.AttachCNPath)"> <el-button
v-if="scope.row.AttachCNPath"
type="text"
@click="handlePreview(scope.row.AttachCNPath)"
>
{{ scope.row.AttachNameCN }} {{ scope.row.AttachNameCN }}
</el-button> </el-button>
</template> </template>
@ -189,7 +224,11 @@
width="100" width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.AttachPath" type="text" @click="handlePreview(scope.row.AttachPath)"> <el-button
v-if="scope.row.AttachPath"
type="text"
@click="handlePreview(scope.row.AttachPath)"
>
{{ scope.row.AttachName }} {{ scope.row.AttachName }}
</el-button> </el-button>
</template> </template>
@ -206,7 +245,9 @@
<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>
<!-- 是否自动发送 --> <!-- 是否自动发送 -->
@ -221,7 +262,9 @@
<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
@ -235,7 +278,9 @@
<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>
<!-- 更新时间 --> <!-- 更新时间 -->
@ -255,11 +300,20 @@
width="160" width="160"
/> />
</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"
/>
</box-content> </box-content>
</template> </template>
<script> <script>
import { getSysEmailNoticeConfigList, batchAddSysEmailConfig } from '@/api/dictionary' import {
getSysEmailNoticeConfigList,
batchAddSysEmailConfig,
} from '@/api/dictionary'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
// import { addTrialDataFromSystem } from '@/api/trials' // import { addTrialDataFromSystem } from '@/api/trials'
import BoxContent from '@/components/BoxContent' import BoxContent from '@/components/BoxContent'
@ -268,7 +322,7 @@ const searchDataDefault = () => {
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
BusinessScenarioEnum: null, BusinessScenarioEnum: null,
CriterionTypeEnum: null CriterionTypeEnum: null,
} }
} }
export default { export default {
@ -279,20 +333,20 @@ export default {
type: String, type: String,
default() { default() {
return '' return ''
} },
}, },
currentCriterionType: { currentCriterionType: {
type: Number, type: Number,
default() { default() {
return 0 return 0
} },
}, },
isDistinguishCriteria: { isDistinguishCriteria: {
type: Boolean, type: Boolean,
default() { default() {
return false return false
} },
} },
}, },
data() { data() {
return { return {
@ -301,7 +355,7 @@ export default {
list: [], list: [],
loading: false, loading: false,
selectArr: [], selectArr: [],
total: 0 total: 0,
} }
}, },
mounted() { mounted() {
@ -314,11 +368,15 @@ export default {
this.searchData.TrialId = this.trialId this.searchData.TrialId = this.trialId
this.searchData.CurrentCriterionType = this.CurrentCriterionType this.searchData.CurrentCriterionType = this.CurrentCriterionType
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
getSysEmailNoticeConfigList(this.searchData).then(res => { getSysEmailNoticeConfigList(this.searchData)
this.loading = false .then((res) => {
this.list = res.Result.CurrentPageData this.loading = false
this.total = res.Result.TotalCount this.list = res.Result.CurrentPageData
}).catch(() => { this.loading = false }) this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false
})
}, },
handleSelectChange(val) { handleSelectChange(val) {
// console.log(val) // console.log(val)
@ -331,18 +389,22 @@ export default {
}, },
handleSubmit() { handleSubmit() {
this.loading = true this.loading = true
this.selectArr.map(v => { this.selectArr.map((v) => {
v.TrialId = this.trialId v.TrialId = this.trialId
return v return v
}) })
batchAddSysEmailConfig(this.selectArr).then(res => { batchAddSysEmailConfig(this.selectArr)
this.loading = false .then((res) => {
if (res.IsSuccess) { this.loading = false
this.$message.success(this.$t('common:message:savedSuccessfully')) if (res.IsSuccess) {
this.$emit('getList') this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$emit('close') this.$emit('getList')
} this.$emit('close')
}).catch(() => { this.loading = false }) }
})
.catch(() => {
this.loading = false
})
}, },
// //
handleSearch() { handleSearch() {
@ -360,7 +422,7 @@ export default {
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault()
this.getList() this.getList()
} },
} },
} }
</script> </script>