update 动态消息

This commit is contained in:
赵霄
2023-09-26 15:43:23 +08:00
parent c199be378a
commit 6e8362a6c5
4 changed files with 31 additions and 15 deletions
+22 -6
View File
@@ -1,7 +1,7 @@
<template>
<div>
<template v-if="fileList && fileList.length > 0">
<div class="file" v-for="file in fileList" :key="file.id">
<div class="file" :class="{'operate-right': operateFixedRight}" v-for="file in fileList" :key="file.id">
<div class="file-info">
<a-icon type="link" />
<div class="file-name" @click="handlePreview(file)">{{ file.fileName }}</div>
@@ -40,6 +40,12 @@ export default {
type: String,
required: false,
default: null
},
// 操作按钮固定在右侧
operateFixedRight: {
type: Boolean,
required: false,
default: true
}
},
watch: {
@@ -116,10 +122,23 @@ export default {
</script>
<style scoped lang="less">
.operate-right {
justify-content: space-between;
.file-info {
flex: 1;
width: 0;
}
.file-name {
flex: 1;
width: 0;
}
}
.file {
display: flex;
align-items: center;
justify-content: space-between;
}
.file:last-child {
@@ -131,8 +150,7 @@ export default {
align-items: center;
color: @primary-color;
cursor: pointer;
flex: 1;
width: 0;
max-width: calc(100% - 97px);
}
.file-info > .anticon {
@@ -142,8 +160,6 @@ export default {
.file-name {
white-space: nowrap;
overflow: hidden;
flex: 1;
width: 0;
text-overflow: ellipsis;
}
@@ -27,7 +27,7 @@
<div class="container">
<div class="container-title">{{ $t('standardRegulationLibrary.dynamicMessage.dynamicDetails') }}</div>
<div v-html="detailData.dynamicDetails"></div>
<file-echo :file-ids="detailData.dataText" class="file-box"/>
<file-echo :file-ids="detailData.dataText" :operate-fixed-right="false" class="file-box" />
</div>
</div>
@@ -49,9 +49,9 @@
<!--取消-->
<a-button type="primary" ghost :loading="loading">{{ $t('cancel') }}</a-button>
<!--保存-->
<a-button type="primary" :loading="loading" @click="handleSave">{{ $t('preservation') }}</a-button>
<a-button type="primary" :loading="loading" @click="handleSave" v-has="'dynamicMessage:save'">{{ $t('preservation') }}</a-button>
<!--发布-->
<a-button type="primary" :loading="loading" @click="handlePublish">{{ $t('release') }}</a-button>
<a-button type="primary" :loading="loading" @click="handlePublish" v-has="'dynamicMessage:release'">{{ $t('release') }}</a-button>
</div>
</internal-detail-page>
</template>
@@ -6,13 +6,13 @@
<!--标题-->
<a-col :md="6" :sm="12">
<a-form-item :label="$t('title')">
<j-input :placeholder="$t('pleaseEnter') + $t('title')" v-model="queryParam.projectName"></j-input>
<a-input :placeholder="$t('pleaseEnter') + $t('title')" v-model="queryParam.dynamicHeading" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchReset" icon="reload" ghost>{{ $t('reset') }}</a-button>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'dynamicMessage:search'">
{{ $t('query') }}
</a-button>
</span>
@@ -22,7 +22,7 @@
</div>
<div class="table-operator">
<!--新增-->
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'split:sarFileSplitItems:add'">{{ $t('newlyAdded') }}</a-button>
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'dynamicMessage:add'">{{ $t('newlyAdded') }}</a-button>
</div>
<div>
<j-table
@@ -83,7 +83,7 @@ export default {
{
text: this.$t('edit'),
clickEvent: 'handleEdit',
has: '',
has: 'dynamicMessage:edit',
// 管理员可以编辑/删除所有,编辑人能修改/删除自己发布的,其他用户只能收藏/查看和分享
show: (record) => {
return this.isAdmin || record.writer === this.userInfo.id
@@ -93,13 +93,13 @@ export default {
{
text: this.$t('share'),
clickEvent: 'handleShare',
has: ''
has: 'dynamicMessage:share'
},
// 删除
{
text: this.$t('delete'),
clickEvent: 'handleDelete',
has: ''
has: 'dynamicMessage:delete'
}
],
columns: [