diff --git a/src/views/dictionary/template/email/components/EmailForm.vue b/src/views/dictionary/template/email/components/EmailForm.vue index 826fe320..f3e4d80d 100644 --- a/src/views/dictionary/template/email/components/EmailForm.vue +++ b/src/views/dictionary/template/email/components/EmailForm.vue @@ -70,7 +70,7 @@ - + + + {{ $t('common:button:export') }} + - + @@ -43,107 +43,107 @@ import { getEmailNoticeConfigList, deleteEmailNoticeConfig, -} from "@/api/dictionary"; -import BoxContent from "@/components/BoxContent"; -import Pagination from "@/components/Pagination"; -import EmailList from "./components/EmailList"; +} from '@/api/dictionary' +import BoxContent from '@/components/BoxContent' +import Pagination from '@/components/Pagination' +import EmailList from './components/EmailList' const searchDataDefault = () => { return { - IsReturnRequired: "", - IsUrgent: "", - IsEnable: "", + IsReturnRequired: '', + IsUrgent: '', + IsEnable: '', PageIndex: 1, PageSize: 20, - }; -}; + } +} export default { - name: "EmailListIndex", + name: 'EmailListIndex', components: { BoxContent, Pagination, EmailList }, data() { return { - activeTab: "0", + activeTab: '0', searchData: searchDataDefault(), loading: false, list: [], total: 0, rowData: {}, - title: "", + title: '', editVisible: false, attachmentVisible: false, - }; + } }, mounted() { - this.getList(); + this.getList() }, methods: { // 获取受试者列表 getList() { - this.loading = true; + this.loading = true getEmailNoticeConfigList(this.searchData) .then((res) => { - this.loading = false; - this.list = res.Result.CurrentPageData; - this.total = res.Result.TotalCount; + this.loading = false + this.list = res.Result.CurrentPageData + this.total = res.Result.TotalCount }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, // 新增 handleAdd() { - this.rowData = {}; - this.title = "新增"; - this.editVisible = true; + this.rowData = {} + this.title = '新增' + this.editVisible = true }, // 编辑 handleEdit(row) { - this.rowData = { ...row }; - this.title = "编辑"; - this.editVisible = true; + this.rowData = { ...row } + this.title = '编辑' + this.editVisible = true }, // 删除 handleDelete(row) { - this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), { - type: "warning", + this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), { + type: 'warning', distinguishCancelAndClose: true, }).then(() => { deleteEmailNoticeConfig(row.Id).then((res) => { if (res.IsSuccess) { - this.getList(); - this.$message.success("删除成功!"); + this.getList() + this.$message.success('删除成功!') } - }); - }); + }) + }) }, handleDetail(row) { - this.rowData = { ...row }; - this.attachmentVisible = true; + this.rowData = { ...row } + this.attachmentVisible = true }, // 查询 handleSearch() { - this.searchData.PageIndex = 1; - this.getList(); + this.searchData.PageIndex = 1 + this.getList() }, // 重置 handleReset() { - this.searchData = searchDataDefault(); - this.getList(); + this.searchData = searchDataDefault() + this.getList() }, // 排序 handleSortByColumn(column) { - if (column.order === "ascending") { - this.searchData.Asc = true; + if (column.order === 'ascending') { + this.searchData.Asc = true } else { - this.searchData.Asc = false; + this.searchData.Asc = false } - this.searchData.SortField = column.prop; - this.searchData.PageIndex = 1; - this.getList(); + this.searchData.SortField = column.prop + this.searchData.PageIndex = 1 + this.getList() }, // 关闭新增、编辑框 closeDialog() { - this.editVisible = false; + this.editVisible = false }, }, -}; +}