|
@@ -2,21 +2,37 @@
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<!-- 筛选条件 -->
|
|
<!-- 筛选条件 -->
|
|
<div class="screen-container">
|
|
<div class="screen-container">
|
|
- <div class="top clearfix">
|
|
|
|
- <div class="title fl">条件筛选</div>
|
|
|
|
- </div>
|
|
|
|
- <el-form ref="screenForm" :model="screenForm" label-width="50px" size="small" label-position="left">
|
|
|
|
|
|
+ <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="标志" prop="readFlag">
|
|
|
|
- <el-select v-model="screenForm.readFlag" placeholder="全部标志" size="small">
|
|
|
|
- <el-option label="全部" value=""></el-option>
|
|
|
|
- <el-option label="未读" value="false"></el-option>
|
|
|
|
- <el-option label="已读" value="true"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-form-item label="通知类型" prop="type">
|
|
|
|
+ <el-input v-model="screenForm.type" placeholder="请输入通知类型"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6">
|
|
|
|
+ <el-form-item label="文件编码" prop="code">
|
|
|
|
+ <el-input v-model="screenForm.code" placeholder="请输入文件编码"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6">
|
|
|
|
+ <el-form-item label="文件标题" prop="title">
|
|
|
|
+ <el-input v-model="screenForm.title" placeholder="请输入文件标题"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6">
|
|
|
|
+ <el-form-item label="发布日期" prop="date">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="screenForm.date"
|
|
|
|
+ type="datetimerange"
|
|
|
|
+ range-separator="至"
|
|
|
|
+ style="width: 100%;"
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
+ end-placeholder="结束日期">
|
|
|
|
+ </el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :xs="24" :sm="12" :lg="18" class="tr">
|
|
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="24" class="tr">
|
|
<el-form-item label="">
|
|
<el-form-item label="">
|
|
<el-button size="small" @click="resetScreenForm">清空</el-button>
|
|
<el-button size="small" @click="resetScreenForm">清空</el-button>
|
|
<el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
<el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
@@ -29,39 +45,33 @@
|
|
<div class="mymain-container">
|
|
<div class="mymain-container">
|
|
<div class="btn-group clearfix">
|
|
<div class="btn-group clearfix">
|
|
<div class="fl">
|
|
<div class="fl">
|
|
- <el-button size="small" @click="changeReadFlag('ALL')">全部标为已读</el-button>
|
|
|
|
- <el-button size="small" @click="changeReadFlag('SEL')">标为已读消息</el-button>
|
|
|
|
|
|
+ <el-button class="fl" size="small" type="primary" icon="el-icon-plus" @click="openMainForm()">新增</el-button>
|
|
|
|
+ <el-button class="fl" size="small" type="danger" icon="el-icon-minus" @click="batchDelete()">批量删除</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<div class="table">
|
|
<div class="table">
|
|
- <el-table ref="noticeTable" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
|
- <el-table-column align="center" type="selection" width="40" :selectable="checkSelRow"></el-table-column>
|
|
|
|
- <el-table-column align="center" label="消息编号" prop="noticeId" min-width="180"></el-table-column>
|
|
|
|
- <el-table-column align="center" label="订单编号" prop="objId" min-width="180"></el-table-column>
|
|
|
|
- <el-table-column align="center" label="标题" prop="title" min-width="80"></el-table-column>
|
|
|
|
- <el-table-column align="center" label="消息类型" prop="type">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- {{ scope.row.type | NOTICE_CURRENT_TYPE_FILTER }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" label="消息内容" prop="content" min-width="200"></el-table-column>
|
|
|
|
- <el-table-column align="center" label="状态" class-name="status-col">
|
|
|
|
|
|
+ <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column align="center" label="操作" fixed="right" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-tag :type="scope.row.readFlag ? 'success' : 'danger'">{{ scope.row.readFlag ? '已读' : '未读'}}</el-tag>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" label="创建时间" prop="createTime" min-width="160"></el-table-column>
|
|
|
|
- <el-table-column align="center" label="操作" fixed="right" width="100">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <template v-if="checkBtnRole('status')">
|
|
|
|
- <el-button type="text" v-if="scope.row.type === 1" @click="goOrderDetail(scope.row)">查看记录</el-button>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-button type="text" @click="openDetail(scope.row.id)" v-if="checkBtnRole('edit')">浏览</el-button>
|
|
|
|
+ <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="deleteData(scope.row.noticeId)">
|
|
|
|
+ <el-button slot="reference" type="text">删除</el-button>
|
|
|
|
+ </el-popconfirm>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column align="center" type="selection" width="55"></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="通知类型" prop="type" min-width="120" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="文件编码" prop="code" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="文件标题" prop="title" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="接收人" prop="adminNickName" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="发送人" prop="issueNickName" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="发送人编号" prop="issueUserId" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="发布日期" prop="issueTime" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" label="创建时间" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <!-- <el-table-column align="center" label="已确认" prop="readFlag" min-width="140" show-overflow-tooltip></el-table-column> -->
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+
|
|
<div class="pagination clearfix">
|
|
<div class="pagination clearfix">
|
|
<div class="fr">
|
|
<div class="fr">
|
|
<el-pagination
|
|
<el-pagination
|
|
@@ -76,116 +86,483 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <!-- 新增 -->
|
|
|
|
+ <el-dialog title="新增" :visible.sync="mainFormDialog" :show-close="false" width="60%" :close-on-click-modal="false">
|
|
|
|
+ <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-position="right" label-width="90px">
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
|
+ <el-form-item label="通知类型" prop="type">
|
|
|
|
+ <el-input v-model="mainForm.type" placeholder="请输入通知类型"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
|
+ <el-form-item label="文件编号" prop="code">
|
|
|
|
+ <el-input v-model="mainForm.code" placeholder="请输入文件编号"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
|
+ <el-form-item label="文件标题" prop="title">
|
|
|
|
+ <el-input v-model="mainForm.title" placeholder="请输入文件标题"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
|
+ <el-form-item label="来源" prop="source">
|
|
|
|
+ <el-input v-model="mainForm.source" placeholder="请输入来源"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="24">
|
|
|
|
+ <el-form-item label="发布日期" prop="date">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="mainForm.date"
|
|
|
|
+ type="datetime"
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ placeholder="选择发布日期">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="24">
|
|
|
|
+ <el-form-item label="发布内容" prop="content">
|
|
|
|
+ <el-input type="textarea" v-model="mainForm.content" placeholder="请输入发布内容" :autosize="{ minRows: 4, maxRows: 8}"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="24" :sm="24" :lg="24">
|
|
|
|
+ <el-form-item label="接收人" prop="department">
|
|
|
|
+ <el-tree
|
|
|
|
+ :data="departmentList"
|
|
|
|
+ show-checkbox
|
|
|
|
+ node-key="adminWebsitId"
|
|
|
|
+ ref="tree"
|
|
|
|
+ highlight-current
|
|
|
|
+ :props="props">
|
|
|
|
+ </el-tree>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-form-item label="上传附件" prop="fileUrl">
|
|
|
|
+ <ImageUpload :fileList="fileList" :multiple="true" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ </el-form>
|
|
|
|
+
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="closeMainForm">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="submitMainForm">确 定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <!-- 已阅记录 -->
|
|
|
|
+ <el-dialog title="已阅记录" :visible.sync="recordDialog" :show-close="false" width="70%" :close-on-click-modal="false">
|
|
|
|
+ <div class="table" style="margin: 10px 0 20px;">
|
|
|
|
+ <el-table
|
|
|
|
+ v-loading="detailTable_listLoading"
|
|
|
|
+ :data="detailTable_dataList"
|
|
|
|
+ element-loading-text="Loading"
|
|
|
|
+ tooltip-effect="dark"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ max-height="270">
|
|
|
|
+ <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="title" label="标题" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="websitNumber" label="网点名称" min-width="140" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{scope.row.websitName}}({{scope.row.websitNumber}})
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="remark" label="备注" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column align="center" prop="createTime" label="下载时间" min-width="160"></el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="pagination clearfix">
|
|
|
|
+ <div class="fr">
|
|
|
|
+ <el-pagination
|
|
|
|
+ @current-change="detailTableCurrentChange"
|
|
|
|
+ :current-page="detailTable_currentPage"
|
|
|
|
+ :page-size="detailTable_pageSize"
|
|
|
|
+ background
|
|
|
|
+ layout="prev, pager, next"
|
|
|
|
+ :total="detailTable_listTotal">
|
|
|
|
+ </el-pagination>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="recordDialog = false">关 闭</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <!-- 详情 -->
|
|
|
|
+ <el-dialog title="浏览" :visible.sync="detailDialog" width="60%" :close-on-click-modal="false">
|
|
|
|
+ <div class="detail-container">
|
|
|
|
+ <div class="title">{{detailData.title}}</div>
|
|
|
|
+ <div class="text">发布人:{{detailData.issueNickName}}<el-divider direction="vertical"></el-divider>发布时间:{{detailData.issueTime}}</div>
|
|
|
|
+ <el-divider></el-divider>
|
|
|
|
+ <div class="content">{{detailData.content}}</div>
|
|
|
|
+ <el-divider v-if="detailData.files && detailData.files.length > 0"></el-divider>
|
|
|
|
+ <div class="file" v-if="detailData.files && detailData.files.length > 0">
|
|
|
|
+ <div>附件:</div>
|
|
|
|
+ <div class="file-list">
|
|
|
|
+ <div v-for="(item, index) in detailData.files" :key="index" class="item">
|
|
|
|
+ <el-image v-if="checkFileType(item.url) == 'image'" class="img" :src="imageURL + item.url" :preview-src-list="[imageURL + item.url]"></el-image>
|
|
|
|
+ <div v-else class="box2" @click="openLink(item.url)">
|
|
|
|
+ <img src="@/assets/common/word.png" v-if="checkFileType(item.url) == 'word'" />
|
|
|
|
+ <img src="@/assets/common/excel.png" v-if="checkFileType(item.url) == 'excel'" />
|
|
|
|
+ <img src="@/assets/common/ppt.png" v-if="checkFileType(item.url) == 'ppt'" />
|
|
|
|
+ <img src="@/assets/common/pdf.png" v-if="checkFileType(item.url) == 'pdf'" />
|
|
|
|
+ <div class="name ellipsis-3">{{ item.name }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="confirmCheck(detailData.id)" v-if="!detailData.readFlag">确认接收</el-button>
|
|
|
|
+ <el-button @click="detailDialog = false" v-if="detailData.readFlag">关 闭</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getNoticeList, changeAllReadFlag, changeReadFlag } from "@/api/notice";
|
|
|
|
|
|
+import { getList, getDownloadList, deleteData, addData, getDepartmentList, getDetail, confirmCheck } from '@/api/notice'
|
|
|
|
+import { getFileUrl } from '@/api/common';
|
|
|
|
+import ImageUpload from '@/components/Common/image-upload.vue'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: "index",
|
|
|
|
|
|
+ components: {
|
|
|
|
+ ImageUpload
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ imageURL: this.$imageUrl,
|
|
dataList: null, // 列表数据
|
|
dataList: null, // 列表数据
|
|
listLoading: true, // 列表加载loading
|
|
listLoading: true, // 列表加载loading
|
|
- screenForm: { // 筛选表单数据
|
|
|
|
- readFlag: '' //
|
|
|
|
- },
|
|
|
|
currentPage: 1, // 当前页码
|
|
currentPage: 1, // 当前页码
|
|
pageSize: 10, // 每页数量
|
|
pageSize: 10, // 每页数量
|
|
- listTotal: 0 // 列表总数
|
|
|
|
|
|
+ listTotal: 0, // 列表总数
|
|
|
|
+ screenForm: { // 筛选表单数据
|
|
|
|
+ type: '',
|
|
|
|
+ code: '',
|
|
|
|
+ title: '',
|
|
|
|
+ date: '',
|
|
|
|
+ },
|
|
|
|
+ mainForm: {
|
|
|
|
+ type: '',
|
|
|
|
+ code: '',
|
|
|
|
+ title: '',
|
|
|
|
+ source: '',
|
|
|
|
+ department: '',
|
|
|
|
+ date: '',
|
|
|
|
+ content: '',
|
|
|
|
+ },
|
|
|
|
+ mainFormRules: {
|
|
|
|
+ type: [
|
|
|
|
+ { required: true, message: '请输入通知类型', trigger: 'blur' }
|
|
|
|
+ ],
|
|
|
|
+ title: [
|
|
|
|
+ { required: true, message: '请输入文件标题', trigger: 'blur' }
|
|
|
|
+ ],
|
|
|
|
+ date: [
|
|
|
|
+ { required: true, message: '请选择发布日期', trigger: 'change' }
|
|
|
|
+ ],
|
|
|
|
+ content: [
|
|
|
|
+ { required: true, message: '请输入发布内容', trigger: 'blur' }
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ mainFormDialog: false,
|
|
|
|
+ fileList: [],
|
|
|
|
+
|
|
|
|
+ departmentList: [],
|
|
|
|
+ props: {
|
|
|
|
+ multiple: true,
|
|
|
|
+ value: 'adminWebsitId',
|
|
|
|
+ label: 'name',
|
|
|
|
+ children: 'children',
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ detailDialog: false, // 详情 - 弹窗
|
|
|
|
+ detailData: {},
|
|
|
|
+
|
|
|
|
+ multipleSelection: [],
|
|
|
|
+
|
|
|
|
+ recordDialog: false, // 已阅记录 - 弹窗
|
|
|
|
+ detailTable_dataList: null, // 已阅记录 - 列表数据
|
|
|
|
+ detailTable_listLoading: true, // 已阅记录 - 列表加载loading
|
|
|
|
+ detailTable_currentPage: 1, // 已阅记录 - 当前页码
|
|
|
|
+ detailTable_pageSize: 10, // 已阅记录 - 每页数量
|
|
|
|
+ detailTable_listTotal: 0, // 已阅记录 - 列表总数
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+
|
|
|
|
+ },
|
|
created() {
|
|
created() {
|
|
- this.getList()
|
|
|
|
|
|
+ this.getList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 查询按钮权限
|
|
// 查询按钮权限
|
|
checkBtnRole(value) {
|
|
checkBtnRole(value) {
|
|
- // let btnRole = this.$route.meta.roles;
|
|
|
|
- // if(!btnRole) {return true}
|
|
|
|
- // let index = btnRole.indexOf(value);
|
|
|
|
- // return index >= 0 ? true : false;
|
|
|
|
- return true
|
|
|
|
|
|
+ return true;
|
|
|
|
+ let btnRole = this.$route.meta.roles;
|
|
|
|
+ if(!btnRole) {return true}
|
|
|
|
+ let index = btnRole.indexOf(value);
|
|
|
|
+ return index >= 0 ? true : false;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 获取部门列表
|
|
|
|
+ getTree() {
|
|
|
|
+ getDepartmentList().then(res => {
|
|
|
|
+ this.departmentList = res.data;
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ // 获取列表
|
|
getList() {
|
|
getList() {
|
|
|
|
+ this.listLoading = true;
|
|
let params = {
|
|
let params = {
|
|
- readFlag: this.screenForm.readFlag,
|
|
|
|
pageNum: this.currentPage,
|
|
pageNum: this.currentPage,
|
|
- pageSize: this.pageSize
|
|
|
|
|
|
+ pageSize: this.pageSize,
|
|
|
|
+ type: this.screenForm.type,
|
|
|
|
+ code: this.screenForm.code,
|
|
|
|
+ title: this.screenForm.title,
|
|
|
|
+ startTime: this.screenForm.date ? this.screenForm.date[0] : '',
|
|
|
|
+ endTime: this.screenForm.date ? this.screenForm.date[1] : '',
|
|
}
|
|
}
|
|
-
|
|
|
|
- getNoticeList(params).then(res => {
|
|
|
|
- this.dataList = res.data.records
|
|
|
|
- this.listTotal = res.data.total
|
|
|
|
- this.listLoading = false
|
|
|
|
|
|
+ getList(params).then(res => {
|
|
|
|
+ this.listLoading = false;
|
|
|
|
+ this.dataList = res.data ? res.data.records : [];
|
|
|
|
+ this.listTotal = res.data ? res.data.total : 0;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 检查行能否选中
|
|
|
|
- checkSelRow(row) {
|
|
|
|
- return !row.readFlag
|
|
|
|
|
|
+
|
|
|
|
+ // 更改每页数量
|
|
|
|
+ handleSizeChange(val) {
|
|
|
|
+ this.pageSize = val;
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 更改当前页
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.currentPage = val;
|
|
|
|
+ this.getList();
|
|
},
|
|
},
|
|
|
|
+
|
|
// 提交筛选表单
|
|
// 提交筛选表单
|
|
submitScreenForm() {
|
|
submitScreenForm() {
|
|
- this.currentPage = 1
|
|
|
|
- this.getList()
|
|
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.getList();
|
|
},
|
|
},
|
|
|
|
+
|
|
// 重置筛选表单
|
|
// 重置筛选表单
|
|
resetScreenForm() {
|
|
resetScreenForm() {
|
|
- this.$refs.screenForm.resetFields()
|
|
|
|
- this.currentPage = 1
|
|
|
|
- this.getList()
|
|
|
|
|
|
+ this.$refs.screenForm.resetFields();
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.getList();
|
|
},
|
|
},
|
|
- // 更改每页数量
|
|
|
|
- handleSizeChange(val) {
|
|
|
|
- this.pageSize = val
|
|
|
|
- this.currentPage = 1
|
|
|
|
- this.getList()
|
|
|
|
|
|
+
|
|
|
|
+ // 表格选择
|
|
|
|
+ handleSelectionChange(val) {
|
|
|
|
+ this.multipleSelection = val;
|
|
},
|
|
},
|
|
- // 更改当前页
|
|
|
|
- handleCurrentChange(val) {
|
|
|
|
- this.currentPage = val
|
|
|
|
- this.getList()
|
|
|
|
- },
|
|
|
|
- changeReadFlag(type) {
|
|
|
|
- if (type === 'ALL') {
|
|
|
|
- changeAllReadFlag().then(() => {
|
|
|
|
- this.getList()
|
|
|
|
- this.$successMsg('全部标为已读成功')
|
|
|
|
|
|
+
|
|
|
|
+ // 批量删除
|
|
|
|
+ batchDelete() {
|
|
|
|
+ if(this.multipleSelection.length < 1) {
|
|
|
|
+ return this.$errorMsg('请选择信息');
|
|
|
|
+ }
|
|
|
|
+ this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let ids = [];
|
|
|
|
+ this.multipleSelection.forEach(item => {
|
|
|
|
+ ids.push(item.noticeId);
|
|
|
|
+ });
|
|
|
|
+ deleteData({noticeIds: ids.join(',')}).then(res => {
|
|
|
|
+ this.$successMsg('删除成功');
|
|
|
|
+ this.getList();
|
|
})
|
|
})
|
|
- } else {
|
|
|
|
- if (this.$refs['noticeTable'].selection.length > 0) {
|
|
|
|
- let noticeIds = []
|
|
|
|
- this.$refs['noticeTable'].selection.forEach(row => {
|
|
|
|
- noticeIds.push(row.noticeId)
|
|
|
|
- })
|
|
|
|
- changeReadFlag(noticeIds).then(() => {
|
|
|
|
- this.getList()
|
|
|
|
- this.$successMsg('标为已读成功')
|
|
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 操作 - 删除
|
|
|
|
+ deleteData(id) {
|
|
|
|
+ deleteData({noticeIds: id}).then(res => {
|
|
|
|
+ this.$successMsg('删除成功');
|
|
|
|
+ this.getList();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 详情 - 打开弹窗
|
|
|
|
+ openDetail(id) {
|
|
|
|
+ getDetail({id}).then(res => {
|
|
|
|
+ this.detailData = res.data;
|
|
|
|
+ this.detailDialog = true;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 检查文件类型
|
|
|
|
+ checkFileType(url) {
|
|
|
|
+ if(!url) return '';
|
|
|
|
+ const fileSuffix = url.substring(url.lastIndexOf(".") + 1);
|
|
|
|
+
|
|
|
|
+ if (['jpg', 'jpeg', 'png'].includes(fileSuffix)) {
|
|
|
|
+ return 'image';
|
|
|
|
+ }else if (['doc', 'docx', 'dot', 'wps', 'wpt'].includes(fileSuffix)) {
|
|
|
|
+ return 'word';
|
|
|
|
+ }else if(['xls', 'xlsx', 'xlt', 'et', 'ett'].includes(fileSuffix)) {
|
|
|
|
+ return 'excel';
|
|
|
|
+ }else if(['ppt', 'pptx', 'dps', 'dpt', 'pot', 'pps'].includes(fileSuffix)) {
|
|
|
|
+ return 'ppt';
|
|
|
|
+ }else if(['pdf'].includes(fileSuffix)) {
|
|
|
|
+ return 'pdf';
|
|
|
|
+ }else {
|
|
|
|
+ return '';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 打开链接
|
|
|
|
+ openLink(url) {
|
|
|
|
+ getFileUrl({key: url}).then(res => {
|
|
|
|
+ window.open(res.data);
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 确认查收
|
|
|
|
+ confirmCheck(id) {
|
|
|
|
+ confirmCheck({noticeIds: id}).then(res => {
|
|
|
|
+ this.$successMsg('查收成功');
|
|
|
|
+ this.detailDialog = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 已阅记录 - 获取列表
|
|
|
|
+ getDownloadList() {
|
|
|
|
+ getDownloadList({
|
|
|
|
+ pageNo: this.detailTable_currentPage,
|
|
|
|
+ pageSize: this.detailTable_pageSize,
|
|
|
|
+ id: this.recordId
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.detailTable_dataList = res.data.records;
|
|
|
|
+ this.detailTable_listTotal = res.data.total;
|
|
|
|
+ this.detailTable_listLoading = false;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 已阅记录 - 打开弹窗
|
|
|
|
+ openRecord(id) {
|
|
|
|
+ this.recordId = id;
|
|
|
|
+ this.recordDialog = true;
|
|
|
|
+ this.detailTable_currentPage = 1;
|
|
|
|
+ this.getDownloadList();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 已阅记录 - 更改列表当前页
|
|
|
|
+ detailTableCurrentChange(val) {
|
|
|
|
+ this.detailTable_currentPage = val;
|
|
|
|
+ this.getDownloadList();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 打开 表单
|
|
|
|
+ openMainForm() {
|
|
|
|
+ this.getTree();
|
|
|
|
+ this.mainFormDialog = true;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 关闭 表单
|
|
|
|
+ closeMainForm(){
|
|
|
|
+ this.mainFormDialog = false;
|
|
|
|
+ this.fileList = [];
|
|
|
|
+ this.$refs.mainForm.resetFields();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 提交 表单
|
|
|
|
+ async submitMainForm() {
|
|
|
|
+ this.$refs.mainForm.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ let params = {
|
|
|
|
+ type: this.mainForm.type,
|
|
|
|
+ code: this.mainForm.code,
|
|
|
|
+ title: this.mainForm.title,
|
|
|
|
+ source: this.mainForm.source,
|
|
|
|
+ issueTime: this.mainForm.date,
|
|
|
|
+ content: this.mainForm.content,
|
|
|
|
+ adminWebsitIds: this.$refs.tree.getCheckedKeys(),
|
|
|
|
+ files: this.fileList,
|
|
|
|
+ };
|
|
|
|
+ addData(params).then(res => {
|
|
|
|
+ this.closeMainForm();
|
|
|
|
+ this.getList();
|
|
|
|
+ this.mainFormDialog = false;
|
|
})
|
|
})
|
|
- } else {
|
|
|
|
- this.$errorMsg("请先选择消息!")
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
- goOrderDetail(row) {
|
|
|
|
- let noticeIds = []
|
|
|
|
- noticeIds.push(row.noticeId)
|
|
|
|
- changeReadFlag(noticeIds)
|
|
|
|
- let {href} = this.$router.resolve({path: `/order/detail?orderId=${row.objId}`});
|
|
|
|
- window.open(href, '_blank');
|
|
|
|
- // this.$router.push({
|
|
|
|
- // path: '/order/detail',
|
|
|
|
- // query: {
|
|
|
|
- // orderId: row.objId,
|
|
|
|
- // type: 'notice'
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
|
-
|
|
|
|
-</style>
|
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
+ .detail-container {
|
|
|
|
+ .title {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ color: #333333;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ }
|
|
|
|
+ .text {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: #999999;
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+ }
|
|
|
|
+ .content {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ color: #666666;
|
|
|
|
+ line-height: 20px;
|
|
|
|
+ }
|
|
|
|
+ .file {
|
|
|
|
+ .file-list {
|
|
|
|
+ display: flex;
|
|
|
|
+ .item {
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .img {
|
|
|
|
+ width: 80px;
|
|
|
|
+ height: 80px;
|
|
|
|
+ display: block;
|
|
|
|
+ border: 1px solid #e4e7ed;
|
|
|
|
+ }
|
|
|
|
+ .box2 {
|
|
|
|
+ flex: 1;
|
|
|
|
+ display: flex;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ align-items: center;
|
|
|
|
+ border: 1px solid #e4e7ed;
|
|
|
|
+ width: 240px;
|
|
|
|
+ height: 80px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ img {
|
|
|
|
+ width: 40px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ display: block;
|
|
|
|
+ }
|
|
|
|
+ .name {
|
|
|
|
+ flex: 1;
|
|
|
|
+ color: #222;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .el-divider--horizontal {
|
|
|
|
+ margin: 16px 0;
|
|
|
|
+ }
|
|
|
|
+</style>
|