hejianhao
2025-04-16 dab2d210ca06c1faa514c6388fbd5de1ab355360
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<template>
  <div class="status_add">
    <v-header title="公司简介"></v-header>
    <div class="edit">
      <el-input
        type="textarea"
        :rows="20"
        placeholder="请输入内容"
        v-model="os.introduction">
      </el-input>
<!--      <editor-bar-->
<!--        v-model="content"-->
<!--        :isClear="isClear"-->
<!--        @change="change"-->
<!--      ></editor-bar>-->
    </div>
    <div class="btn">
      <el-button type="primary" size="small" @click="sub"> 更新 </el-button>
    </div>
  </div>
</template>
 
<script>
import EditorBar from "com/wangEnduit/index"; //富文本组件
export default {
  components: { EditorBar },
  data() {
    return {
      os: {
        introduction: "",
      },
      isClear: false,
      content: "",
    };
  },
  methods: {
    sub() {
      let o = demo.copy(this.os);
      if (!o.introduction) {
        demo.toast("请输入内容");
        return 0;
      }
      this.$api.post("comProperty/update", o, (e) => {
        demo.toast("更新成功");
      });
    },
    //编辑富文本
    change(val) {
      this.os.introduction = val;
    },
    getDetail(propertyId = 48) {
      this.$api.get("comProperty/detail", { id: propertyId }, (e) => {
        this.os.id = e.id;
        this.content = this.os.introduction = e.introduction;
      });
    },
  },
  mounted() {
    let user = demo.$session.get("user") || {};
    this.getDetail(user.propertyId);
  },
};
</script>
<style lang='less' scoped>
.status_add {
  padding-top: 20px;
  overflow-y: auto;
  .edit,
  .zd,
  .btn {
    margin-bottom: 10px;
    padding: 0;
  }
  .sec:last-child {
    margin-bottom: 0;
  }
  article {
    max-width: 300px;
  }
  .article-maxwidth {
    .el-radio {
      margin-bottom: 10px;
    }
  }
}
</style>