ll
liukangdong
2024-09-29 f6ac139bf416f98c3a3d28f6b1d80e4598bd648f
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
<template>
    <div class="main_app">
    <el-form
      :model="form"
      :rules="rules"
      label-suffix=":"
      ref="ruleForm"
      label-width="140px"
    >
      <!-- <el-form-item label="市公司审批人">
        <el-select v-model="param.aa" class="w400" placeholder="请选择,多选">
          <el-option></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="市公司日作业量">
        <el-input v-model="param.bbb" class="w400" placeholder="请输入"></el-input>
        <span>万支</span>
      </el-form-item>-->
      <el-form-item label="物流车预约指南" required label-width="180px">
        <RichEditor  :richData="form.bookTips" :styleEditor="styleEditor" @getWangedditor="getWangedditor" :readonly="false"/>
      </el-form-item>
      <el-form-item label="物流车园区导览图" required  label-width="180px">
        <RichEditor  :richData="form.tipsImg" :styleEditor="styleEditor" @getWangedditor="getWangedditor1" :readonly="false"/>
      </el-form-item>
      <el-form-item>
          <el-button type="primary" @click="submit">保存配置项</el-button>
      </el-form-item>
 
    </el-form>
  </div>
</template>
 
<script>
import RichEditor from '@/components/common/RichEditor'
import { getPlatformConfigDTO, updatePlatformConfig } from '@/api/system/common'
export default {
  components: {
    RichEditor: RichEditor
  },
  data () {
    return {
      styleEditor:'border: 1px solid #ccc;display: inline-block;',
      form: {
        bookTips: '',
        tipsImg: ''
      },
      rules: {}
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getWangedditor(val){
      this.form.bookTips =val
    },
    getWangedditor1(val){
      this.form.tipsImg =val
    },
    getData: function () {
      getPlatformConfigDTO({})
        .then(res => {
          this.form.tipsImg = res.tipsImg
          this.form.bookTips = res.bookTips
        })
    },
    submit () {
      updatePlatformConfig({
        tipsImg: this.form.tipsImg,
        bookTips: this.form.bookTips
      }).then(res => {
        this.$message.success('保存成功')
        this.getData()
      })
    }
 
  }
}
</script>
 
<style>
</style>