部分问题修复
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2025-01-22 15:27:20 +08:00
parent 21c96300ad
commit 7b3fe42654
4 changed files with 75 additions and 35 deletions

View File

@ -71,6 +71,8 @@ export default {
<style lang="scss" scoped>
.notice-marquee_wrapper{
width: 100%;
display: flex;
align-items: center;
/deep/ .el-dialog__header{
padding: 10px;
}

View File

@ -17,7 +17,7 @@
<el-form-item :label="$t('trials:notice:table:notificationContent')">
<el-input
v-model="searchData.NoticeContent"
style="width:100px;"
style="width: 100px"
clearable
/>
</el-form-item>
@ -36,7 +36,11 @@
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }}
</el-button>
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
<el-button
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
@ -44,7 +48,7 @@
</template>
<template slot="main-container">
<el-table
v-adaptive="{bottomOffset:60}"
v-adaptive="{ bottomOffset: 60 }"
v-loading="loading"
:data="list"
stripe
@ -79,7 +83,15 @@
sortable="custom"
>
<template slot-scope="scope">
<el-tag :type="scope.row.ActualNoticeStateEnum === 0 ? 'info' : scope.row.ActualNoticeStateEnum === 1 ? 'success' : 'error'">
<el-tag
:type="
scope.row.ActualNoticeStateEnum === 0
? 'info'
: scope.row.ActualNoticeStateEnum === 1
? 'success'
: 'error'
"
>
{{ $fd('NoticeState', scope.row.ActualNoticeStateEnum) }}
</el-tag>
</template>
@ -113,7 +125,12 @@
sortable="custom"
>
<template slot-scope="scope">
<a :href="OSSclientConfig.basePath + scope.row.Path" target="_blank" style="color:#428bca">{{ scope.row.FileName }}</a>
<a
:href="OSSclientConfig.basePath + scope.row.Path"
target="_blank"
style="color: #428bca"
>{{ scope.row.FileName }}</a
>
</template>
</el-table-column>
<el-table-column
@ -124,11 +141,19 @@
sortable="custom"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.IsRead">{{ $fd('YesOrNo', scope.row.IsRead) }}</el-tag>
<el-tag v-else type="danger">{{ $fd('YesOrNo', scope.row.IsRead) }}</el-tag>
<el-tag v-if="scope.row.IsRead">{{
$fd('YesOrNo', scope.row.IsRead)
}}</el-tag>
<el-tag v-else type="danger">{{
$fd('YesOrNo', scope.row.IsRead)
}}</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('common:action:action')" min-width="100" fixed="right">
<el-table-column
:label="$t('common:action:action')"
min-width="100"
fixed="right"
>
<template slot-scope="scope">
<el-button
circle
@ -136,12 +161,17 @@
icon="el-icon-info"
@click="showDetail(scope.row)"
/>
</template>
</el-table-column>
</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"
/>
</template>
</BaseContainer>
</template>
@ -157,9 +187,10 @@ const searchDataDefault = () => {
ApplicableProjectEnum: null,
NoticeModeEnum: null,
NoticeStateEnum: null,
Asc: true,
Asc: false,
SortField: 'PublishedTime',
PageIndex: 1,
PageSize: 20
PageSize: 20,
}
}
export default {
@ -171,7 +202,7 @@ export default {
searchData: searchDataDefault(),
list: [],
total: 0,
loading: false
loading: false,
}
},
mounted() {
@ -180,17 +211,21 @@ export default {
methods: {
getList() {
this.loading = true
getUserSystemNoticeList(this.searchData).then(res => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
}).catch(() => { this.loading = false })
getUserSystemNoticeList(this.searchData)
.then((res) => {
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false
})
},
showDetail(row) {
var currentNoticeType = this.$fd('NoteType', row.NoticeTypeEnum)
if (row.IsRead || row.ActualNoticeStateEnum !== 1) {
this.$alert(row.NoticeContent, currentNoticeType, {
showConfirmButton: false
showConfirmButton: false,
})
} else {
const h = this.$createElement
@ -200,18 +235,22 @@ export default {
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
instance.confirmButtonLoading = true
setSystemNoticeHaveRead(row.Id).then(async res => {
if (res.IsSuccess) {
await this.$store.dispatch('global/getNoticeList')
this.getList()
}
instance.confirmButtonLoading = false
done()
}).catch(() => { instance.confirmButtonLoading = false })
setSystemNoticeHaveRead(row.Id)
.then(async (res) => {
if (res.IsSuccess) {
await this.$store.dispatch('global/getNoticeList')
this.getList()
}
instance.confirmButtonLoading = false
done()
})
.catch(() => {
instance.confirmButtonLoading = false
})
} else {
done()
}
}
},
})
}
},
@ -237,10 +276,9 @@ export default {
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
}
}
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -59,7 +59,7 @@
/>
<el-table-column
:label="$t('trials:sysDocBeSigned:table:uploadTime')"
prop="UpdateTime"
prop="CreateTime"
show-overflow-tooltip
sortable="custom"
/>
@ -168,7 +168,7 @@ const searchDataDefault = () => {
pageIndex: 1,
pageSize: 20,
asc: false,
sortField: 'UpdateTime',
sortField: 'CreateTime',
}
}
export default {

View File

@ -38,7 +38,7 @@
/>
<el-table-column
:label="$t('trials:sysDocBeSigned:table:uploadTime')"
prop="UpdateTime"
prop="CreateTime"
show-overflow-tooltip
sortable="custom"
/>
@ -130,7 +130,7 @@ const searchDataDefault = () => {
pageIndex: 1,
pageSize: 20,
asc: false,
sortField: 'UpdateTime'
sortField: 'CreateTime'
}
}
export default {