AdminNotifyConfig.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <el-row>
  3. <el-row class="movie-list">
  4. <el-col :md="18" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
  5. <el-card class="box-card">
  6. <div slot="header" class="clearfix">
  7. <span>邮件通知配置</span>
  8. </div>
  9. <div class="text item">
  10. <el-table
  11. :data="notifyConfigList"
  12. border
  13. style="width: 100%"
  14. >
  15. <el-table-column
  16. prop="id"
  17. label="ID"
  18. />
  19. <el-table-column
  20. prop="smtp"
  21. label="SMTP"
  22. />
  23. <el-table-column
  24. prop="username"
  25. label="帐号"
  26. />
  27. <el-table-column
  28. prop="password"
  29. label="密码"
  30. />
  31. <el-table-column
  32. prop="personal"
  33. label="发送人"
  34. />
  35. <el-table-column
  36. prop="defaultSender"
  37. label="是否默认"
  38. />
  39. <el-table-column
  40. fixed="right"
  41. label="操作"
  42. >
  43. <template slot-scope="scope">
  44. <el-button
  45. size="mini"
  46. @click="onApprove(scope.row)"
  47. >同意</el-button>
  48. <el-button
  49. size="mini"
  50. type="danger"
  51. @click="onDecline(scope.row)"
  52. >拒绝</el-button>
  53. </template>
  54. </el-table-column>
  55. </el-table>
  56. </div>
  57. </el-card>
  58. </el-col>
  59. </el-row>
  60. <el-dialog
  61. append-to-body
  62. :visible.sync="updateDialog"
  63. width="30%"
  64. center
  65. >
  66. <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; text-align: center">
  67. <el-form ref="form" :model="updateMobileForm" label-width="100px">
  68. <el-form-item label="密码">
  69. <el-input
  70. v-model="updateMobileForm.credential"
  71. type="password"
  72. placeholder="请输入密码"
  73. style="padding-right: 1px"
  74. clearable
  75. />
  76. </el-form-item>
  77. <el-form-item>
  78. <el-button
  79. type="primary"
  80. @click.native="updateUserEmail"
  81. >更新</el-button>
  82. <el-button
  83. type="primary"
  84. @click.native="updateDialog = false"
  85. >取消</el-button>
  86. </el-form-item>
  87. </el-form>
  88. </el-row>
  89. </el-dialog>
  90. </el-row>
  91. </template>
  92. <script>
  93. import { userMixin } from 'assets/js/mixin'
  94. import {
  95. getNotifyConfig
  96. } from '@/api/admin'
  97. export default {
  98. name: 'AdminNotifyConfig',
  99. mixins: [userMixin],
  100. data() {
  101. return {
  102. notifyConfigList: [],
  103. updateDialog: false,
  104. updateMobileForm: {
  105. principal: null,
  106. verifyCode: null,
  107. credential: null,
  108. captchaCode: null,
  109. channel: 1,
  110. plat: 2
  111. }
  112. }
  113. },
  114. created() {
  115. document.title = '站点配置'
  116. this.getData()
  117. },
  118. mounted() {
  119. },
  120. methods: {
  121. getData() {
  122. getNotifyConfig().then(resp => {
  123. if (resp.code === 0) {
  124. this.notifyConfigList = resp.data
  125. } else {
  126. this.$message.error(resp.msg)
  127. }
  128. })
  129. },
  130. // ****************************************************************************************************************
  131. onUpdate() {
  132. this.updateDialog = false
  133. },
  134. updateUserEmail() {
  135. this.$message.info(this.updateMobileForm)
  136. this.updateDialog = false
  137. },
  138. onApprove(row) {
  139. this.$message.info('同意充值 ' + row.chargeId)
  140. },
  141. onDecline(row) {
  142. this.$message.info('拒绝充值' + row.chargeId)
  143. }
  144. }
  145. }
  146. </script>
  147. <style>
  148. </style>