Blame view

ant-design-vue-jeecg/src/views/system/config/ParameterConfigurationList.vue 5.43 KB
肖超群 authored
1
2
3
4
5
6
7
<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
谭毅彬 authored
8
9
            <a-form-item :label="$t('parameter.name')">
              <j-input :placeholder="$t('parameter.inputName')" v-model="queryParam.name"></j-input>
肖超群 authored
10
11
12
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
谭毅彬 authored
13
14
            <a-form-item :label="$t('parameter.code')">
              <j-input :placeholder="$t('parameter.inputCode')" v-model="queryParam.code"></j-input>
肖超群 authored
15
16
            </a-form-item>
          </a-col>
17
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
谭毅彬 authored
18
19
            <a-form-item :label="$t('parameter.value')">
              <j-input :placeholder="$t('parameter.inputValue')" v-model="queryParam.value"></j-input>
20
21
            </a-form-item>
          </a-col>
肖超群 authored
22
23
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
24
25
              <a-button type="primary" @click="searchQuery" icon="search">{{$t('button.search')}}</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('button.reset')}}</a-button>
肖超群 authored
26
27
28
29
30
31
32
33
34
35
36
37
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
38
        :scroll="{ x: true }"
肖超群 authored
39
40
41
42
43
44
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
45
        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
肖超群 authored
46
        class="j-table-force-nowrap"
47
48
        @change="handleTableChange"
      >
肖超群 authored
49
        <span slot="action" slot-scope="text, record">
谭毅彬 authored
50
          <a v-has="'parameterConfiguration:edit'" @click="handleEdit(record)">{{ $t('button.edit') }}<a-divider type="vertical"/></a>
51
          <a @click="handleDetail(record)">{{$t('button.details')}}</a>
肖超群 authored
52
53
54
55
56
57
58
59
60
        </span>
      </a-table>
    </div>

    <parameter-configuration-modal ref="modalForm" @ok="modalFormOk"></parameter-configuration-modal>
  </a-card>
</template>

<script>
肖超群 authored
61
import '@/assets/less/TableExpand.less'
62
63
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
肖超群 authored
64
import ParameterConfigurationModal from './modules/ParameterConfigurationModal'
肖超群 authored
65
肖超群 authored
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
export default {
  name: 'ParameterConfigurationList',
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    ParameterConfigurationModal
  },
  data() {
    return {
      description: '参数配置管理页面',
      // 表头
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
82
83
84
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
肖超群 authored
85
86
          }
        },
肖超群 authored
87
        {
谭毅彬 authored
88
          title: this.$t('parameter.name'),
89
          align: 'center',
肖超群 authored
90
91
92
          dataIndex: 'name'
        },
        {
谭毅彬 authored
93
          title: this.$t('parameter.code'),
94
          align: 'center',
肖超群 authored
95
96
97
          dataIndex: 'code'
        },
        {
谭毅彬 authored
98
          title: this.$t('parameter.value'),
99
          align: 'center',
肖超群 authored
100
101
102
          dataIndex: 'value'
        },
        {
谭毅彬 authored
103
          title: this.$t('system.remark'),
104
          align: 'center',
肖超群 authored
105
106
107
          dataIndex: 'remark'
        },
        {
谭毅彬 authored
108
          title: this.$t('system.createTime'),
109
          align: 'center',
肖超群 authored
110
111
112
          dataIndex: 'createTime'
        },
        {
谭毅彬 authored
113
          title: this.$t('system.updateTime'),
114
          align: 'center',
肖超群 authored
115
116
117
          dataIndex: 'updateTime'
        },
        {
谭毅彬 authored
118
          title: this.$t('system.options'),
肖超群 authored
119
          dataIndex: 'action',
120
121
          align: 'center',
          fixed: 'right',
肖超群 authored
122
          width: 147,
123
          scopedSlots: { customRender: 'action' }
肖超群 authored
124
125
126
        }
      ],
      url: {
127
128
129
130
131
        list: '/config/parameterConfiguration/list',
        delete: '/config/parameterConfiguration/delete',
        deleteBatch: '/config/parameterConfiguration/deleteBatch',
        exportXlsUrl: '/config/parameterConfiguration/exportXls',
        importExcelUrl: 'config/parameterConfiguration/importExcel'
肖超群 authored
132
133
      },
      dictOptions: {},
134
      superFieldList: []
肖超群 authored
135
136
137
    }
  },
  created() {
138
    this.getSuperFieldList()
肖超群 authored
139
140
  },
  computed: {
141
142
143
    importExcelUrl: function() {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    }
肖超群 authored
144
145
  },
  methods: {
146
    initDictConfig() {},
肖超群 authored
147
    getSuperFieldList() {
148
149
150
151
152
153
154
155
156
      let fieldList = []
      fieldList.push({ type: 'string', value: 'name', text: '参数名称', dictCode: '' })
      fieldList.push({ type: 'string', value: 'code', text: '参数键名', dictCode: '' })
      fieldList.push({ type: 'string', value: 'value', text: '参数键值', dictCode: '' })
      fieldList.push({ type: 'string', value: 'remark', text: '备注', dictCode: '' })
      fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' })
      fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' })
      fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' })
      fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' })
肖超群 authored
157
      this.superFieldList = fieldList
肖超群 authored
158
159
    }
  }
肖超群 authored
160
}
肖超群 authored
161
162
</script>
<style scoped>
肖超群 authored
163
@import '~@assets/less/common.less';
肖超群 authored
164
</style>