|
|
@@ -20,7 +20,7 @@
|
|
|
:tree-data="menuListTreeData"
|
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
allow-clear
|
|
|
- v-decorator="['parent_id', { rules: [{ required: true }] }]"
|
|
|
+ v-decorator="['parentId', { rules: [{ required: true }] }]"
|
|
|
></a-tree-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="菜单path" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="指向的页面path">
|
|
|
@@ -33,14 +33,14 @@
|
|
|
extra="如果为否,则为纯菜单项,仅做用于父级菜单使用"
|
|
|
>
|
|
|
<a-radio-group
|
|
|
- v-decorator="['is_page', { initialValue: 1, rules: [{ required: true }] }]"
|
|
|
+ v-decorator="['isPage', { initialValue: 1, rules: [{ required: true }] }]"
|
|
|
>
|
|
|
<a-radio :value="1">是</a-radio>
|
|
|
<a-radio :value="0">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="功能模块key" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
|
- <a-input v-decorator="['module_key']" />
|
|
|
+ <a-input v-decorator="['moduleKey']" />
|
|
|
</a-form-item>
|
|
|
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" extra="数字越小越靠前">
|
|
|
<a-input-number
|
|
|
@@ -114,7 +114,7 @@ export default {
|
|
|
async getMenuInfo (record) {
|
|
|
this.confirmLoading = true
|
|
|
// 当前菜单记录
|
|
|
- this.record = await Api.info({ menu_id: record.menu_id }).then(result => result.data.info)
|
|
|
+ this.record = await Api.info({ menuId: record.menuId }).then(result => result.data.info)
|
|
|
this.confirmLoading = false
|
|
|
},
|
|
|
|
|
|
@@ -123,7 +123,7 @@ export default {
|
|
|
*/
|
|
|
setFieldsValue () {
|
|
|
this.$nextTick(() => {
|
|
|
- this.form.setFieldsValue(pick(this.record, ['name', 'path', 'module_key', 'is_page', 'parent_id', 'sort']))
|
|
|
+ this.form.setFieldsValue(pick(this.record, ['name', 'path', 'moduleKey', 'isPage', 'parentId', 'sort']))
|
|
|
})
|
|
|
},
|
|
|
|
|
|
@@ -152,12 +152,12 @@ export default {
|
|
|
// 新的元素
|
|
|
const newItem = {
|
|
|
title: item.name,
|
|
|
- key: item.menu_id,
|
|
|
- value: item.menu_id
|
|
|
+ key: item.menuId,
|
|
|
+ value: item.menuId
|
|
|
}
|
|
|
// 禁用的菜单
|
|
|
if (
|
|
|
- [item.menu_id, item.parent_id].includes(this.record.menu_id) ||
|
|
|
+ [item.menuId, item.parentId].includes(this.record.menuId) ||
|
|
|
disabled === true
|
|
|
) {
|
|
|
newItem.disabled = true
|
|
|
@@ -200,7 +200,7 @@ export default {
|
|
|
* 提交到后端api
|
|
|
*/
|
|
|
onFormSubmit (values) {
|
|
|
- Api.edit({ menuId: this.record['menu_id'], form: values })
|
|
|
+ Api.edit({ menuId: this.record['menuId'], form: values })
|
|
|
.then((result) => {
|
|
|
// 显示成功
|
|
|
this.$message.success(result.message)
|