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
<template>
    <div class="ag-edit-box">
      <v-header title="协议名称"></v-header>
      <div>
       <editor-bar v-model="html" :isClear="isClear" @change="change"></editor-bar>
      </div>
      <div class="but">
        <el-button @click="sub" size="small" type="primary">确认</el-button>
        <el-button @click="back" size="small" >取消</el-button>
      </div>
    </div>
</template>
<script>
import EditorBar from 'com/wangEnduit/index' //富文本组件
    export default {
        components: {EditorBar},
        data() {
            return {
              item:{},
              cont:'',
              html:'',
              isClear: false,
              detail:""
            }
        },
        created() {
          console.log(this.$route.params.item)
          if(this.$route.params.item){
            this.item = this.$route.params.item
            this.html = this.item.content
          }else{
            this.back()
          }
        },
        mounted() {
 
        },
        methods: {
          change(val) {
            this.html = val
          },
          back(){
            this.$router.back()
          },
          sub(){
            if(!this.html){
              return  demo.toast('请输入协议内容')
            }
            let data = {
              content:this.html,
              id:this.item.id
            }
            this.$api.put('systemmanagement/agreement',data,e=>{
              this.back()
            })
          }
        },
        watch: {},
        computed: {}
    }
 
</script>
<style scoped lang="less">
  .ag-edit-box{
    overflow: scroll;
    .but{
      display: flex;
      padding-top: 20px;
    }
  }
</style>