Quellcode durchsuchen

同步后台 修改config模块key vulue子段为paramKey paramValue

daxiongYang vor 7 Jahren
Ursprung
Commit
0e8e6dfa14
2 geänderte Dateien mit 16 neuen und 16 gelöschten Zeilen
  1. 11 11
      src/views/modules/sys/config-add-or-update.vue
  2. 5 5
      src/views/modules/sys/config.vue

+ 11 - 11
src/views/modules/sys/config-add-or-update.vue

4
    :close-on-click-modal="false"
4
    :close-on-click-modal="false"
5
    :visible.sync="visible">
5
    :visible.sync="visible">
6
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
6
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
7
      <el-form-item label="参数名" prop="key">
8
        <el-input v-model="dataForm.key" placeholder="参数名"></el-input>
7
      <el-form-item label="参数名" prop="paramKey">
8
        <el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
9
      </el-form-item>
9
      </el-form-item>
10
      <el-form-item label="参数值" prop="value">
11
        <el-input v-model="dataForm.value" placeholder="参数值"></el-input>
10
      <el-form-item label="参数值" prop="paramValue">
11
        <el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
12
      </el-form-item>
12
      </el-form-item>
13
      <el-form-item label="备注" prop="remark">
13
      <el-form-item label="备注" prop="remark">
14
        <el-input v-model="dataForm.remark" placeholder="备注"></el-input>
14
        <el-input v-model="dataForm.remark" placeholder="备注"></el-input>
28
        visible: false,
28
        visible: false,
29
        dataForm: {
29
        dataForm: {
30
          id: 0,
30
          id: 0,
31
          key: '',
32
          value: '',
31
          paramKey: '',
32
          paramValue: '',
33
          remark: ''
33
          remark: ''
34
        },
34
        },
35
        dataRule: {
35
        dataRule: {
36
          key: [
36
          paramKey: [
37
            { required: true, message: '参数名不能为空', trigger: 'blur' }
37
            { required: true, message: '参数名不能为空', trigger: 'blur' }
38
          ],
38
          ],
39
          value: [
39
          value: [
55
              params: this.$http.adornParams()
55
              params: this.$http.adornParams()
56
            }).then(({data}) => {
56
            }).then(({data}) => {
57
              if (data && data.code === 0) {
57
              if (data && data.code === 0) {
58
                this.dataForm.key = data.config.key
59
                this.dataForm.value = data.config.value
58
                this.dataForm.paramKey = data.config.paramKey
59
                this.dataForm.paramValue = data.config.paramValue
60
                this.dataForm.remark = data.config.remark
60
                this.dataForm.remark = data.config.remark
61
              }
61
              }
62
            })
62
            })
72
              method: 'post',
72
              method: 'post',
73
              data: this.$http.adornData({
73
              data: this.$http.adornData({
74
                'id': this.dataForm.id || undefined,
74
                'id': this.dataForm.id || undefined,
75
                'key': this.dataForm.key,
76
                'value': this.dataForm.value,
75
                'paramKey': this.dataForm.paramKey,
76
                'paramValue': this.dataForm.paramValue,
77
                'remark': this.dataForm.remark
77
                'remark': this.dataForm.remark
78
              })
78
              })
79
            }).then(({data}) => {
79
            }).then(({data}) => {

+ 5 - 5
src/views/modules/sys/config.vue

2
  <div class="mod-config">
2
  <div class="mod-config">
3
    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
3
    <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
4
      <el-form-item>
4
      <el-form-item>
5
        <el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
5
        <el-input v-model="dataForm.paramKey" placeholder="参数名" clearable></el-input>
6
      </el-form-item>
6
      </el-form-item>
7
      <el-form-item>
7
      <el-form-item>
8
        <el-button @click="getDataList()">查询</el-button>
8
        <el-button @click="getDataList()">查询</el-button>
30
        label="ID">
30
        label="ID">
31
      </el-table-column>
31
      </el-table-column>
32
      <el-table-column
32
      <el-table-column
33
        prop="key"
33
        prop="paramKey"
34
        header-align="center"
34
        header-align="center"
35
        align="center"
35
        align="center"
36
        label="参数名">
36
        label="参数名">
37
      </el-table-column>
37
      </el-table-column>
38
      <el-table-column
38
      <el-table-column
39
        prop="value"
39
        prop="paramValue"
40
        header-align="center"
40
        header-align="center"
41
        align="center"
41
        align="center"
42
        label="参数值">
42
        label="参数值">
79
    data () {
79
    data () {
80
      return {
80
      return {
81
        dataForm: {
81
        dataForm: {
82
          key: ''
82
          paramKey: ''
83
        },
83
        },
84
        dataList: [],
84
        dataList: [],
85
        pageIndex: 1,
85
        pageIndex: 1,
106
          params: this.$http.adornParams({
106
          params: this.$http.adornParams({
107
            'page': this.pageIndex,
107
            'page': this.pageIndex,
108
            'limit': this.pageSize,
108
            'limit': this.pageSize,
109
            'key': this.dataForm.key
109
            'paramKey': this.dataForm.paramKey
110
          })
110
          })
111
        }).then(({data}) => {
111
        }).then(({data}) => {
112
          if (data && data.code === 0) {
112
          if (data && data.code === 0) {