天波用户运营管理后台系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

158 lines
5.4KB

  1. <!--
  2. * @Date: 2022-08-08 10:09:50
  3. * @LastEditors: JinxChen
  4. * @LastEditTime: 2022-09-09 15:03:34
  5. * @FilePath: \TelpoUserManageAdmin\src\views\message-manage\main\mass-list\index.vue
  6. * @description: 群发列表
  7. -->
  8. <template>
  9. <div class="home-container">
  10. <!-- 顶部内容 -->
  11. <div class="top-container">
  12. <!-- 搜索 -->
  13. <el-input
  14. :placeholder="placeholder"
  15. v-model="searchParams.inputValue"
  16. class="search-input"
  17. />
  18. <el-button icon="el-icon-search" @click="onSearch" type="primary" class="search-btn">搜索</el-button>
  19. </div>
  20. <TTable :tableData="dataList" :columns="columns" @details="onDetails" @delete="onDelete" @update="onUpdate"></TTable>
  21. <!-- 分页 -->
  22. <pagination
  23. v-show="total > 0"
  24. ref="pages"
  25. :total="total"
  26. :page.sync="searchParams.page"
  27. :limit.sync="searchParams.limit"
  28. />
  29. <el-dialog
  30. title="发送明细"
  31. :visible.sync="isDetailsShow"
  32. center
  33. top="5vh"
  34. >
  35. <TTable :tableData="detailsDataList" :columns="detailsColumns"></TTable>
  36. <!-- 分页 -->
  37. <pagination
  38. v-show="detailsTotal > 0"
  39. ref="pages"
  40. :total="detailsTotal"
  41. :page.sync="detailsParams.page"
  42. :limit.sync="detailsParams.limit"
  43. />
  44. </el-dialog>
  45. </div>
  46. </template>
  47. <script>
  48. import TTable from "@/components/TTable/TTable";
  49. import Pagination from "@/components/Pagination";
  50. export default {
  51. name: "mass-list",
  52. components: { TTable, Pagination },
  53. data() {
  54. return {
  55. buttonList: [], // 头部按钮,例子: {name: '添加', type: 'primary', icon: 'el-icon-circle-plus', click: () => { this.AddDialog();}}
  56. searchParams: {
  57. inputValue: "",
  58. page: 1,
  59. limit: 10
  60. },
  61. placeholder: "可输入消息主题",
  62. dataList: [
  63. { messageThem: '财商学习更新通知', messageContent: '家长您好...', massGroup: '活跃粉丝组', createTime: '2022.09.09 17:35' },
  64. { messageThem: '财商学习更新通知', messageContent: '家长您好...', massGroup: '活跃粉丝组', createTime: '2022.09.09 17:35' },
  65. { messageThem: '财商学习更新通知', messageContent: '家长您好...', massGroup: '活跃粉丝组', createTime: '2022.09.09 17:35' },
  66. ],
  67. detailsDataList: [
  68. { sendUser: '张三', sendStatus: '成功', sendTime: '2022.09.09 17:35' },
  69. { sendUser: '李四', sendStatus: '成功', sendTime: '2022.09.09 17:35' },
  70. { sendUser: '王五', sendStatus: '失败', sendTime: '2022.09.09 17:35' },
  71. ],
  72. detailsColumns: [
  73. { prop: "sendUser", title: "发送对象", fixed: "left" },
  74. { prop: "sendStatus", title: "发送状态" },
  75. { prop: "sendTime", title: "发送时间" },
  76. ],
  77. columns: [
  78. { prop: "messageThem", title: "消息主题", fixed: "left" },
  79. { prop: "messageContent", title: "内容摘要(链接详情)" },
  80. { prop: "massGroup", title: "发送分组" },
  81. { prop: "createTime", title: "创建时间" },
  82. {
  83. action: true,
  84. title: "操作",
  85. fixed: "right",
  86. actions: [
  87. {
  88. fnName: "update",
  89. title: "修改",
  90. type: "primary",
  91. icon: "el-icon-edit",
  92. size: "small"
  93. },
  94. {
  95. fnName: "delete",
  96. title: "删除",
  97. type: "danger",
  98. icon: "el-icon-delete",
  99. size: "small"
  100. },
  101. {
  102. fnName: "details",
  103. title: "发送明细",
  104. type: "success",
  105. icon: "el-icon-tickets",
  106. size: "small"
  107. }
  108. /* { fnName: "delete", title: "删除", type: "danger" , icon: 'el-icon-delete', size: 'small'}, */
  109. ]
  110. }
  111. ],
  112. total: 1,
  113. isDetailsShow: false,
  114. detailsTotal: 1,
  115. detailsParams: {
  116. page: 1,
  117. limit: 10
  118. }
  119. };
  120. },
  121. mounted() {},
  122. created() {},
  123. methods: {
  124. onSearch() {},
  125. onUpdate() {
  126. },
  127. onDelete() {
  128. this.$confirm("是否删除?", {
  129. confirmButtonText: "确定",
  130. cancelButtonText: "取消",
  131. type: "warning"
  132. }).then(() => {
  133. // todo 删除
  134. }).catch(() => {})
  135. },
  136. onDetails() {
  137. //this.$router.push({name: 'send-details'});
  138. this.isDetailsShow = true;
  139. }
  140. }
  141. };
  142. </script>
  143. <style scoped lang="scss">
  144. .search-input {
  145. width: 350px;
  146. margin-left: 20px;
  147. }
  148. .search-btn {
  149. margin-left: 20px;
  150. width: 100px;
  151. }
  152. </style>