diff --git a/src/store/modules/global.js b/src/store/modules/global.js index 3c4ac997..280f8654 100644 --- a/src/store/modules/global.js +++ b/src/store/modules/global.js @@ -128,7 +128,14 @@ const actions = { if (response.IsSuccess) { var noticeList = [] response.Result.forEach(el => { - noticeList.push({ Id: el.Id, Content: el.NoticeContent, NoticeTypeEnum: el.NoticeTypeEnum }) + noticeList.push({ + Id: el.Id, + Content: el.NoticeContent, + NoticeTypeEnum: el.NoticeTypeEnum, + PublishedTime: el.PublishedTime, + FileName: el.FileName, + Path: el.Path + }) }) commit('SET_NOTICE', noticeList) diff --git a/src/views/system/notice/components/from.vue b/src/views/system/notice/components/from.vue index 2e90fe43..69fef6b9 100644 --- a/src/views/system/notice/components/from.vue +++ b/src/views/system/notice/components/from.vue @@ -4,30 +4,38 @@ - - - - - - + + + 全选 + 清空 + + + + {{ item.UserTypeShortName }} + + + - @@ -35,13 +43,14 @@ - + - + item.Id) + }, + handleClearRoles() { + this.form.NoticeUserTypeIdList = [] + }, + handleEndDateChange(value) { + this.form.EndDate = this.normalizeEndDate(value) + }, + normalizeEndDate(value) { + if (!value) { + return value + } + const date = new Date(value) + if (Number.isNaN(date.getTime())) { + return value + } + if (date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() === 0) { + date.setHours(23, 59, 59, 0) + } + return date + }, handleRemoveFile() { this.form.FileName = null this.form.Path = null @@ -147,6 +188,7 @@ export default { this.fileList[0] = { name: this.form.FileName, path: this.form.FilePath, fullPath: this.form.FullFilePath } } this.$set(this.form, 'NoticeUserTypeIdList', this.form.NoticeUserTypeList.map(v => v.Id)) + this.form.EndDate = this.normalizeEndDate(this.form.EndDate) } else { this.form = formDataDefault() } @@ -177,3 +219,27 @@ export default { } } + diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 93582b12..71072b45 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -57,14 +57,21 @@ {{ $t('common:button:add') }} - + - + {{ $d.NoteLevel.find(v => {return v.raw.Code * 1 === scope.row.NoticeLevelEnum}) ? $d.NoteLevel.find(v => {return v.raw.Code * 1 === scope.row.NoticeLevelEnum}).label : '' }} - + {{ $d.NoteType.find(v => {return v.raw.Code * 1 === scope.row.NoticeTypeEnum}) ? $d.NoteType.find(v => {return v.raw.Code * 1 === scope.row.NoticeTypeEnum}).label : '' }} @@ -74,46 +81,47 @@ {{ scope.row.NoticeContent }} - + {{ $d.NoticeState.find(v => {return v.raw.Code * 1 === scope.row.ActualNoticeStateEnum}) ? $d.NoticeState.find(v => {return v.raw.Code * 1 === scope.row.ActualNoticeStateEnum}).label : '' }} - + {{ $d.NoticeApplicableTrial.find(v => {return v.raw.Code * 1 === scope.row.ApplicableProjectEnum}) ? $d.NoticeApplicableTrial.find(v => {return v.raw.Code * 1 === scope.row.ApplicableProjectEnum}).label : '' }} - + {{ scope.row.NoticeUserTypeList.map(v => v.UserTypeShortName).toString() }} - + {{ dict.type.NoticeMode.find(v => {return v.raw.Code * 1 === scope.row.NoticeModeEnum}) ? $d.NoticeMode.find(v => {return v.raw.Code * 1 === scope.row.NoticeModeEnum}).label : '' }} - + - {{ scope.row.StartDate }}-{{ scope.row.EndDate }} + {{ scope.row.StartDate }} - - - + - {{ scope.row.StartDate ? scope.row.StartDate: scope.row.CreateTime }} + {{ scope.row.EndDate }} - + + + + {{ scope.row.FileName }} - + { this.loading = false }) + }, + // 排序 + handleSortChange(column) { + if (column.order === 'ascending') { + this.searchData.Asc = true + } else { + this.searchData.Asc = false + } + this.searchData.SortField = column.prop + this.searchData.PageIndex = 1 + this.getList() } } } diff --git a/src/views/trials/components/NoticeDetailDialog.vue b/src/views/trials/components/NoticeDetailDialog.vue new file mode 100644 index 00000000..227fd5fb --- /dev/null +++ b/src/views/trials/components/NoticeDetailDialog.vue @@ -0,0 +1,178 @@ + + + + + {{ publishedTime }} + + + + {{ content || '-' }} + + + + {{ $t('trials:notice:table:appendix') }} + + + + {{ fileName}} + + + + + + + {{ $t('common:button:close') }} + + {{ $t('common:button:confirm') }} + + + + + + + + diff --git a/src/views/trials/trials-layout/components/noticeMarquee.vue b/src/views/trials/trials-layout/components/noticeMarquee.vue index 5591e295..85aeb771 100644 --- a/src/views/trials/trials-layout/components/noticeMarquee.vue +++ b/src/views/trials/trials-layout/components/noticeMarquee.vue @@ -7,16 +7,45 @@ {{ item.Content }} +