notifyLog.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <template>
  2. <div class="app-container">
  3. <!-- 搜索工作栏 -->
  4. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="150px">
  5. <el-form-item label="模板编码" prop="templateCode">
  6. <el-input v-model="queryParams.templateCode" placeholder="请输入模板编码" clearable @keyup.enter.native="handleQuery"/>
  7. </el-form-item>
  8. <el-form-item label="模板标题" prop="title">
  9. <el-input v-model="queryParams.title" placeholder="请输入模板标题" clearable @keyup.enter.native="handleQuery"/>
  10. </el-form-item>
  11. <el-form-item label="发送时间" prop="sendTime">
  12. <el-date-picker v-model="queryParams.sendTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
  13. range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
  14. </el-form-item>
  15. <el-form-item>
  16. <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  17. <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  18. </el-form-item>
  19. </el-form>
  20. <!-- 操作工具栏 -->
  21. <!-- <el-row :gutter="10" class="mb8">
  22. <el-col :span="1.5">
  23. <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
  24. v-hasPermi="['system:notify-log:export']">导出</el-button>
  25. </el-col>
  26. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  27. </el-row> -->
  28. <!-- 列表 -->
  29. <el-table v-loading="loading" :data="list">
  30. <el-table-column label="模板编码" align="center" prop="templateCode" />
  31. <el-table-column label="模板标题" align="center" prop="title" />
  32. <el-table-column label="模板内容" align="center" prop="content" width="300" />
  33. <el-table-column label="阅读状态" align="center" prop="readStatus">
  34. <template slot-scope="scope">
  35. <dict-tag :type="DICT_TYPE.SYSTEM_NOTIFY_READ_STATUS" :value="scope.row.readStatus"/>
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="接收人" align="center" prop="receiveUserName" />
  39. <el-table-column label="发送时间" align="center" prop="sendTime" width="180">
  40. <template slot-scope="scope">
  41. <span>{{ parseTime(scope.row.sendTime) }}</span>
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="阅读时间" align="center" prop="createTime" width="180">
  45. <template slot-scope="scope">
  46. <span>{{ parseTime(scope.row.readTime) }}</span>
  47. </template>
  48. </el-table-column>
  49. </el-table>
  50. <!-- 分页组件 -->
  51. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
  52. @pagination="getList"/>
  53. </div>
  54. </template>
  55. <script>
  56. import { getNotifyLogPage} from "@/api/system/notify/notifyLog";
  57. export default {
  58. name: "notifyLog",
  59. data() {
  60. return {
  61. // 遮罩层
  62. loading: true,
  63. // 导出遮罩层
  64. exportLoading: false,
  65. // 显示搜索条件
  66. showSearch: true,
  67. // 总条数
  68. total: 0,
  69. // 我的站内信列表
  70. list: [],
  71. // 弹出层标题
  72. title: "",
  73. // 是否显示弹出层
  74. open: false,
  75. // 查询参数
  76. queryParams: {
  77. pageNo: 1,
  78. pageSize: 10,
  79. templateCode: null,
  80. title: null,
  81. sendTime: []
  82. },
  83. };
  84. },
  85. created() {
  86. this.getList();
  87. },
  88. methods: {
  89. /** 查询列表 */
  90. getList() {
  91. this.loading = true;
  92. // 执行查询
  93. getNotifyLogPage(this.queryParams).then(response => {
  94. this.list = response.data.list;
  95. this.total = response.data.total;
  96. this.loading = false;
  97. });
  98. },
  99. /** 搜索按钮操作 */
  100. handleQuery() {
  101. this.queryParams.pageNo = 1;
  102. this.getList();
  103. },
  104. /** 重置按钮操作 */
  105. resetQuery() {
  106. this.resetForm("queryForm");
  107. this.handleQuery();
  108. },
  109. }
  110. }
  111. </script>
  112. <style>
  113. </style>