修改标准无法选择的问题
This commit is contained in:
@@ -170,6 +170,8 @@ module.exports = {
|
|||||||
DataRules:'Data rules',
|
DataRules:'Data rules',
|
||||||
menuMnagementPage:'This is the menu management page',
|
menuMnagementPage:'This is the menu management page',
|
||||||
MenuName:'Menu name',
|
MenuName:'Menu name',
|
||||||
|
MenuEnName:'Menu En name',
|
||||||
|
enterMenuEnName:'Please enter menu En name',
|
||||||
MenuType:'Menu type',
|
MenuType:'Menu type',
|
||||||
menu:'menu',
|
menu:'menu',
|
||||||
ButtonsPermissions:'Buttons / permissions',
|
ButtonsPermissions:'Buttons / permissions',
|
||||||
|
|||||||
@@ -363,5 +363,6 @@ module.exports = {
|
|||||||
BatchCancel:'批量取消收藏',
|
BatchCancel:'批量取消收藏',
|
||||||
SubscriptionManagement:'订阅领域管理',
|
SubscriptionManagement:'订阅领域管理',
|
||||||
BatchCancellation:'批量取消',
|
BatchCancellation:'批量取消',
|
||||||
|
enterMenuEnName:'请输入菜单英文名称',
|
||||||
|
MenuEnName:'菜单英文名称',
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
let content = []
|
let content = []
|
||||||
this.content.forEach(res => {
|
this.content.forEach(res => {
|
||||||
content.push(res.name)
|
content.push(res.title)
|
||||||
})
|
})
|
||||||
this.$emit('input', content.join(','))
|
this.$emit('input', content.join(','))
|
||||||
this.visible = false
|
this.visible = false
|
||||||
@@ -152,15 +152,15 @@
|
|||||||
this.$emit('input', event.target.value)
|
this.$emit('input', event.target.value)
|
||||||
},
|
},
|
||||||
onSelectChange(value) {
|
onSelectChange(value) {
|
||||||
|
this.selectedRowKeys = value
|
||||||
this.content = []
|
this.content = []
|
||||||
value.forEach(val => {
|
value.forEach(val => {
|
||||||
this.data.forEach((res) => {
|
this.dataList.forEach((res) => {
|
||||||
if (res.key === val) {
|
if (res.id === val) {
|
||||||
this.content.push(res)
|
this.content.push(res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.selectedRowKeys = value
|
|
||||||
},
|
},
|
||||||
searchQuery() {
|
searchQuery() {
|
||||||
this.replacePage()
|
this.replacePage()
|
||||||
|
|||||||
@@ -87,7 +87,6 @@
|
|||||||
import JEllipsis from '@/components/jero/JEllipsis'
|
import JEllipsis from '@/components/jero/JEllipsis'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PermissionList',
|
name: 'PermissionList',
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
@@ -105,16 +104,19 @@
|
|||||||
title: this.$t('MenuName'),
|
title: this.$t('MenuName'),
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
key: 'name'
|
key: 'name'
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('MenuEnName'),
|
||||||
|
dataIndex: 'menuEn',
|
||||||
|
key: 'menuEn'
|
||||||
|
},
|
||||||
|
{
|
||||||
title: this.$t('MenuType'),
|
title: this.$t('MenuType'),
|
||||||
dataIndex: 'menuType',
|
dataIndex: 'menuType',
|
||||||
key: 'menuType',
|
key: 'menuType',
|
||||||
customRender: this.text
|
customRender: this.text
|
||||||
},/*{
|
},
|
||||||
title: '权限编码',
|
{
|
||||||
dataIndex: 'perms',
|
|
||||||
key: 'permissionCode',
|
|
||||||
},*/{
|
|
||||||
title: 'icon',
|
title: 'icon',
|
||||||
dataIndex: 'icon',
|
dataIndex: 'icon',
|
||||||
key: 'icon'
|
key: 'icon'
|
||||||
@@ -155,18 +157,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed: {
|
||||||
text:function(){
|
text: function() {
|
||||||
if (text == 0) {
|
if (text == 0) {
|
||||||
return this.$t('menu')
|
return this.$t('menu')
|
||||||
} else if (text == 1) {
|
} else if (text == 1) {
|
||||||
return this.$t('menu')
|
return this.$t('menu')
|
||||||
} else if (text == 2) {
|
} else if (text == 2) {
|
||||||
return this.$t('ButtonsPermissions')
|
return this.$t('ButtonsPermissions')
|
||||||
} else {
|
} else {
|
||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -184,14 +185,14 @@
|
|||||||
this.$refs.PermissionDataRuleList.edit(record)
|
this.$refs.PermissionDataRuleList.edit(record)
|
||||||
},
|
},
|
||||||
handleAddSub(record) {
|
handleAddSub(record) {
|
||||||
this.$refs.modalForm.title = this.$t('AddSubmenu');
|
this.$refs.modalForm.title = this.$t('AddSubmenu')
|
||||||
this.$refs.modalForm.localMenuType = 1;
|
this.$refs.modalForm.localMenuType = 1
|
||||||
this.$refs.modalForm.disableSubmit = false;
|
this.$refs.modalForm.disableSubmit = false
|
||||||
this.$refs.modalForm.edit({status:'1',permsType:'1',route:true,'parentId':record.id});
|
this.$refs.modalForm.edit({ status: '1', permsType: '1', route: true, 'parentId': record.id })
|
||||||
},
|
},
|
||||||
handleExpandedRowsChange(expandedRows) {
|
handleExpandedRowsChange(expandedRows) {
|
||||||
this.expandedRowKeys = expandedRows
|
this.expandedRowKeys = expandedRows
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -26,6 +26,14 @@
|
|||||||
<a-input :placeholder="$t('enterMenuName')" v-decorator="[ 'name', validatorRules.name]" :readOnly="disableSubmit"/>
|
<a-input :placeholder="$t('enterMenuName')" v-decorator="[ 'name', validatorRules.name]" :readOnly="disableSubmit"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
|
<a-form-item
|
||||||
|
:labelCol="labelCol"
|
||||||
|
:wrapperCol="wrapperCol"
|
||||||
|
:label="$t('MenuEnName')"
|
||||||
|
hasFeedback >
|
||||||
|
<a-input :placeholder="$t('enterMenuEnName')" v-decorator="[ 'menuEn', validatorRules.menuEn]" :readOnly="disableSubmit"/>
|
||||||
|
</a-form-item>
|
||||||
|
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
v-show="localMenuType!=0"
|
v-show="localMenuType!=0"
|
||||||
@@ -221,6 +229,7 @@
|
|||||||
validatorRules:function() {
|
validatorRules:function() {
|
||||||
return {
|
return {
|
||||||
name:{rules: [{ required: true, message: this.$t('enterMenuTitle') }]},
|
name:{rules: [{ required: true, message: this.$t('enterMenuTitle') }]},
|
||||||
|
menuEn:{rules: [{ required: true, message: this.$t('enterMenuEnName') }]},
|
||||||
component:{rules: [{ required: this.show, message: this.$t('enterFrontComponents') }]},
|
component:{rules: [{ required: this.show, message: this.$t('enterFrontComponents') }]},
|
||||||
url:{rules: [{ required: this.show, message: this.$t('enterMenuPath') }]},
|
url:{rules: [{ required: this.show, message: this.$t('enterMenuPath') }]},
|
||||||
permsType:{rules: [{ required: true, message: this.$t('enterAuthorizationPolicy') }]},
|
permsType:{rules: [{ required: true, message: this.$t('enterAuthorizationPolicy') }]},
|
||||||
@@ -290,7 +299,7 @@
|
|||||||
|
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.loadTree();
|
this.loadTree();
|
||||||
let fieldsVal = pick(this.model,'name','perms','permsType','component','redirect','url','sortNo','menuType','status');
|
let fieldsVal = pick(this.model,'name','menuEn','perms','permsType','component','redirect','url','sortNo','menuType','status');
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(fieldsVal)
|
this.form.setFieldsValue(fieldsVal)
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user