字典
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="dict_sort">
|
||||
<el-input-number
|
||||
v-model.number="form.dict_sort"
|
||||
v-model.number="form.dictSort"
|
||||
:min="0"
|
||||
:max="999"
|
||||
controls-position="right"
|
||||
@@ -74,7 +74,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="label" label="字典标签" align="center" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="value" label="字典值" align="center" width="60" />
|
||||
<el-table-column prop="dict_sort" label="排序" align="center" width="65" />
|
||||
<el-table-column prop="dictSort" label="排序" align="center" width="65" />
|
||||
<el-table-column prop="para1" label="参数1" align="center" width="65" />
|
||||
<el-table-column prop="para2" label="参数2" align="center" width="65" />
|
||||
<el-table-column prop="para3" label="参数3" align="center" width="65" />
|
||||
@@ -106,7 +106,7 @@ import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
||||
const defaultForm = { dict_id: null, code: null, name: null, label: null, value: null, dict_sort: null, dict_type: null, para1: null, para2: null, para3: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
const defaultForm = { dictId: null, name: null, label: null, value: null, dictSort: null, dictType: null, para1: null, para2: null, para3: null, createId: null, createName: null, createTime: null, updateId: null, updateName: null, updateTime: null }
|
||||
|
||||
export default {
|
||||
components: { pagination, rrOperation, udOperation },
|
||||
@@ -114,10 +114,10 @@ export default {
|
||||
return [
|
||||
CRUD({
|
||||
title: '字典详情',
|
||||
url: 'api/dictDetail',
|
||||
url: 'api/dict/dictDetail',
|
||||
query: { code: '' },
|
||||
idField: 'dict_id',
|
||||
sort: ['dict_sort,asc', 'dict_id,desc'],
|
||||
idField: 'dictId',
|
||||
sort: ['dictSort,asc', 'dictId,desc'],
|
||||
crudMethod: { ...crudDictDetail },
|
||||
optShow: {
|
||||
add: true,
|
||||
@@ -133,11 +133,11 @@ export default {
|
||||
presenter(),
|
||||
header(),
|
||||
form(function() {
|
||||
return Object.assign({ dict: { dict_id: this.dict_id }}, defaultForm)
|
||||
return Object.assign({ dict: { dictId: this.dictId }}, defaultForm)
|
||||
})],
|
||||
data() {
|
||||
return {
|
||||
dict_id: null,
|
||||
dictId: null,
|
||||
rules: {
|
||||
label: [
|
||||
{ required: true, message: '请输入字典标签', trigger: 'blur' }
|
||||
@@ -145,7 +145,7 @@ export default {
|
||||
value: [
|
||||
{ required: true, message: '请输入字典值', trigger: 'blur' }
|
||||
],
|
||||
dict_sort: [
|
||||
dictSort: [
|
||||
{ required: true, message: '请输入序号', trigger: 'blur', type: 'number' }
|
||||
]
|
||||
},
|
||||
|
||||
@@ -86,14 +86,14 @@ import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
||||
const defaultForm = { dict_id: null, code: null, name: null, label: null, value: null, dict_sort: null, dict_type: null, para1: null, para2: null, para3: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
const defaultForm = { dictId: null, code: null, name: null, label: null, value: null, dictSort: null, dictType: null, para1: null, para2: null, para3: null, createId: null, createName: null, createTime: null, updateId: null, updateName: null, updateTime: null }
|
||||
|
||||
export default {
|
||||
name: 'Dict',
|
||||
components: { crudOperation, pagination, rrOperation, udOperation, dictDetail },
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '字典', url: 'api/dict', idField: 'dict_id', crudMethod: { ...crudDict }})
|
||||
CRUD({ title: '字典', url: 'api/dict', idField: 'dictId', crudMethod: { ...crudDict }})
|
||||
]
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
handleCurrentChange(val) {
|
||||
if (val) {
|
||||
this.$refs.dictDetail.query.code = val.code
|
||||
this.$refs.dictDetail.form.dictCode = val.code
|
||||
this.$refs.dictDetail.form.code = val.code
|
||||
this.$refs.dictDetail.crud.toQuery()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user