修改标准无法选择的问题

This commit is contained in:
qq787203167
2022-02-28 17:46:22 +08:00
parent 8f1d4b9847
commit 31a2ee2527
5 changed files with 43 additions and 30 deletions
+2
View File
@@ -170,6 +170,8 @@ module.exports = {
DataRules:'Data rules',
menuMnagementPage:'This is the menu management page',
MenuName:'Menu name',
MenuEnName:'Menu En name',
enterMenuEnName:'Please enter menu En name',
MenuType:'Menu type',
menu:'menu',
ButtonsPermissions:'Buttons / permissions',
+2 -1
View File
@@ -363,5 +363,6 @@ module.exports = {
BatchCancel:'批量取消收藏',
SubscriptionManagement:'订阅领域管理',
BatchCancellation:'批量取消',
enterMenuEnName:'请输入菜单英文名称',
MenuEnName:'菜单英文名称',
}
@@ -143,7 +143,7 @@
handleSubmit() {
let content = []
this.content.forEach(res => {
content.push(res.name)
content.push(res.title)
})
this.$emit('input', content.join(','))
this.visible = false
@@ -152,15 +152,15 @@
this.$emit('input', event.target.value)
},
onSelectChange(value) {
this.selectedRowKeys = value
this.content = []
value.forEach(val => {
this.data.forEach((res) => {
if (res.key === val) {
this.dataList.forEach((res) => {
if (res.id === val) {
this.content.push(res)
}
})
})
this.selectedRowKeys = value
},
searchQuery() {
this.replacePage()
+25 -24
View File
@@ -87,7 +87,6 @@
import JEllipsis from '@/components/jero/JEllipsis'
export default {
name: 'PermissionList',
mixins: [JeroListMixin],
@@ -105,16 +104,19 @@
title: this.$t('MenuName'),
dataIndex: 'name',
key: 'name'
}, {
},
{
title: this.$t('MenuEnName'),
dataIndex: 'menuEn',
key: 'menuEn'
},
{
title: this.$t('MenuType'),
dataIndex: 'menuType',
key: 'menuType',
customRender: this.text
},/*{
title: '权限编码',
dataIndex: 'perms',
key: 'permissionCode',
},*/{
},
{
title: 'icon',
dataIndex: 'icon',
key: 'icon'
@@ -155,18 +157,17 @@
}
}
},
computed:{
text:function(){
if (text == 0) {
return this.$t('menu')
} else if (text == 1) {
return this.$t('menu')
} else if (text == 2) {
return this.$t('ButtonsPermissions')
} else {
return text
}
computed: {
text: function() {
if (text == 0) {
return this.$t('menu')
} else if (text == 1) {
return this.$t('menu')
} else if (text == 2) {
return this.$t('ButtonsPermissions')
} else {
return text
}
}
},
methods: {
@@ -184,14 +185,14 @@
this.$refs.PermissionDataRuleList.edit(record)
},
handleAddSub(record) {
this.$refs.modalForm.title = this.$t('AddSubmenu');
this.$refs.modalForm.localMenuType = 1;
this.$refs.modalForm.disableSubmit = false;
this.$refs.modalForm.edit({status:'1',permsType:'1',route:true,'parentId':record.id});
this.$refs.modalForm.title = this.$t('AddSubmenu')
this.$refs.modalForm.localMenuType = 1
this.$refs.modalForm.disableSubmit = false
this.$refs.modalForm.edit({ status: '1', permsType: '1', route: true, 'parentId': record.id })
},
handleExpandedRowsChange(expandedRows) {
this.expandedRowKeys = expandedRows
},
}
}
}
</script>
@@ -26,6 +26,14 @@
<a-input :placeholder="$t('enterMenuName')" v-decorator="[ 'name', validatorRules.name]" :readOnly="disableSubmit"/>
</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
v-show="localMenuType!=0"
@@ -221,6 +229,7 @@
validatorRules:function() {
return {
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') }]},
url:{rules: [{ required: this.show, message: this.$t('enterMenuPath') }]},
permsType:{rules: [{ required: true, message: this.$t('enterAuthorizationPolicy') }]},
@@ -290,7 +299,7 @@
this.visible = true;
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.form.setFieldsValue(fieldsVal)
});