|
@@ -12,12 +12,12 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="文件名称">
|
|
|
- <a-input id="noticeManagementList-fileName" v-model.trim="queryParam.fileName" allowClear placeholder="请输入标题"/>
|
|
|
+ <a-input id="noticeManagementList-fileName" v-model.trim="queryParam.fileName" allowClear placeholder="请输入文件名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="状态">
|
|
|
- <v-select code="EXPORT_TASK_STATE" id="noticeManagementList-taskState" v-model="queryParam.taskState" allowClear placeholder="请选择发布状态"></v-select>
|
|
|
+ <v-select code="EXPORT_TASK_STATE" id="noticeManagementList-taskState" v-model="queryParam.taskState" allowClear placeholder="请选择状态"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
@@ -28,9 +28,9 @@
|
|
|
</a-form>
|
|
|
</div>
|
|
|
<!-- 总计 -->
|
|
|
- <!-- <a-alert type="info" style="margin-bottom:10px">
|
|
|
- <div slot="message">合计:<strong>{{ total || 0 }}</strong>条</div>
|
|
|
- </a-alert> -->
|
|
|
+ <a-alert type="info" style="margin-bottom:10px">
|
|
|
+ <div slot="message">注意:所有文件只保留7天,超过7天后,状态变为过期,不能下载</div>
|
|
|
+ </a-alert>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
|
class="sTable fixPagination"
|
|
@@ -41,31 +41,12 @@
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:scroll="{ y: tableHeight }"
|
|
|
- :defaultLoadData="false"
|
|
|
+ :defaultLoadData="true"
|
|
|
bordered>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-info"
|
|
|
- v-if="record.taskState=='0'"
|
|
|
- @click="handleEdit(record)"
|
|
|
- id="noticeManagementList-edit-btn">编辑</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-success"
|
|
|
- v-if="record.taskState=='1'"
|
|
|
- @click="handleDetail(record)"
|
|
|
- id="noticeManagementList-detail-btn">详情</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-error"
|
|
|
- v-if="record.taskState=='0'"
|
|
|
- @click="handleDel(record)"
|
|
|
- id="noticeManagementList-del-btn">删除</a-button>
|
|
|
+ <a :href="record.fileUrl" style="padding: 5px 0 0 23px;display: block;" v-if="record.taskState=='SUCCESS'">下载文件</a>
|
|
|
+ <span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -90,14 +71,11 @@ export default {
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
columns: [
|
|
|
- { fileName: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
- { fileName: '创建时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { fileName: '类别', dataIndex: 'typeDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { fileName: '标题', dataIndex: 'fileName', align: 'center', width: '25%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { fileName: '可见性', dataIndex: 'toAppNameDictValue', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { fileName: '发布时间', dataIndex: 'releaseDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { fileName: '发布状态', dataIndex: 'taskStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { fileName: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
|
+ { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '文件名称', dataIndex: 'fileName', align: 'center', width: '40%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '状态', dataIndex: 'taskStateDictValue', align: 'center', width: '20%', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -110,9 +88,6 @@ export default {
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
- data.list[i].typeDictValue = data.list[i].type == 'notity' ? '公告' : data.list[i].type == 'news_company' ? '企业新闻' : data.list[i].type == 'news_trade' ? '行业咨询' : '--'
|
|
|
- data.list[i].taskStateDictValue = data.list[i].taskState == 1 ? '已发布' : data.list[i].taskState == 0 ? '未发布' : '--'
|
|
|
- data.list[i].toAppNameDictValue = data.list[i].toAppName == '1,2' ? '所有' : data.list[i].toAppName == '2' ? '经销商' : data.list[i].toAppName == '1' ? '总部' : '--'
|
|
|
}
|
|
|
this.total = data.count || 0
|
|
|
this.disabled = false
|