after.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="app-container">
  3. <div class="tinymce-title"><span class="title-tip">*</span>售后无忧:</div>
  4. <tinymce v-model="afterSale" :height="300" />
  5. <div slot="footer" class="dialog-footer" style="float: right;padding:80px 0 80px 0;">
  6. <el-button type="primary" style="width:100px;" :loading="loadingbut" @click="onSubmite()">{{ loadingbuttext }}</el-button>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. import Tinymce from '@/components/Tinymce'
  12. import { getOrganizeInfo, updateOrganizeInfo } from '@/api/other'
  13. export default {
  14. components: {
  15. Tinymce
  16. },
  17. data() {
  18. return {
  19. isContent: false,
  20. afterSale: '',
  21. loadingbut: false,
  22. loadingbuttext: '提交'
  23. }
  24. },
  25. computed: {
  26. organizeID() {
  27. return this.$store.getters.organizeID
  28. }
  29. },
  30. created() {
  31. this.initData()
  32. },
  33. methods: {
  34. initData() {
  35. getOrganizeInfo({ id: this.organizeID }).then(response => {
  36. console.log(response)
  37. this.afterSale = response.data.afterSale
  38. })
  39. },
  40. onSubmite() {
  41. if (this.afterSale === '') {
  42. this.$message({ message: '内容不能为空', type: 'warning', center: true })
  43. return
  44. }
  45. this.loadingbut = true
  46. this.loadingbuttext = '提交中'
  47. updateOrganizeInfo({ id: this.organizeID, afterSale: this.afterSale }).then(response => {
  48. this.$message({ message: response.msg, type: 'success', center: true })
  49. this.loadingbut = false
  50. this.loadingbuttext = '提交'
  51. setTimeout(() => {
  52. this.initData()
  53. }, 1000)
  54. })
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. .tinymce-title{
  61. font-size: 14px;
  62. line-height: 20px;
  63. padding: 10px 0;
  64. text-align: left;
  65. font-weight: bold;
  66. }
  67. .title-tip{
  68. color: red;
  69. }
  70. </style>