Commit fcb84d93 by 胡悦

修改菜单

1 parent 02f0193c
......@@ -53,7 +53,7 @@ export default {
/* text-align: center; */
color: #2c3e50;
height: 800px;
overflow-y: auto;
/* overflow-y: auto; */
}
/* .glsx-system-sub #nav {
......
......@@ -62,6 +62,7 @@
<el-radio-group
@change="radioChange($event,item.prop)"
v-model="ruleForm[item.prop]"
:disabled="item.disabled"
>
{{ruleForm[item.prop]}}
<el-radio
......
......@@ -20,9 +20,7 @@ const Constants = {
},
// 菜单类型
MENU_TYPE: {
1: '目录',
2: '菜单',
3: '按钮'
1: '目录'
},
MENU_OTYPE: {
2: '菜单',
......
......@@ -27,7 +27,7 @@
:size="btn_size"
icon="el-icon-plus"
@click="btnClick('create')"
>新增</el-button>
>新增目录</el-button>
</div>
<el-table
ref="menuTable"
......@@ -214,19 +214,19 @@ export default {
enableStatus: true
},
form: {
type: '2',
// type: '1',
parentName: '',
enableStatus: true
},
menuData: [
{ label: '菜单类型', prop: 'type', type: 'radio', children: this.$Constants.MENU_TYPE },
{ label: '上级菜单', prop: 'parentName', type: 'input', readonly: true, clickFunc: this.selectSuperior, hidden: false },
{ label: '菜单类型', prop: 'type', type: 'radio', children: this.$Constants.MENU_TYPE, disabled: false },
{ label: '上级菜单', prop: 'parentName', type: 'input', readonly: true, clickFunc: this.selectSuperior, hidden: true },
{ label: '菜单名称', prop: 'menuName', type: 'input' },
{ label: '权限标识', prop: 'permissionTag', type: 'input' },
{ label: '前端路由', prop: 'frontRoute', type: 'input' },
{ label: '显示排序', prop: 'orderNum', type: 'input' },
{ label: '显示状态', prop: 'enableStatus', type: 'switch' },
{ label: '图标', prop: 'icon', type: 'input' }
{ label: '图标', prop: 'icon', type: 'input', hidden: false }
],
menuRules: {
type: [{ required: true, message: '请选择菜单类型', trigger: 'blur' }],
......@@ -317,18 +317,35 @@ export default {
},
// 按钮事件
btnClick(pType, scope) {
console.log(pType, scope, scope.parentId == 0)
switch (pType) {
case 'create':
this.isOpen = true
this.menuDialogTitle = '新增菜单'
this.menuData[0].children = this.$Constants.MENU_TYPE
this.menuData.map(item => {
if (item.prop == 'parentName') {
item.hidden = true
} else if (item.prop == 'type') {
item.children = this.$Constants.MENU_TYPE
item.disabled = false
} else if (item.prop == 'icon') {
item.hidden = true
}
})
this.menuForm = _.cloneDeep(this.form)
this.handleClose()
break
case 'btnCreate':
this.isOpen = true
this.menuDialogTitle = '新增菜单'
this.menuData[0].children = this.$Constants.MENU_OTYPE
this.menuData.map(item => {
if (item.prop == 'type') {
item.children = this.$Constants.MENU_OTYPE
item.disabled = false
} else if (item.prop == 'icon') {
item.hidden = scope.parentId == 0
}
})
this.menuForm = _.cloneDeep(this.form)
this.menuForm.ppId = scope.id
console.log(this.menuForm)
......@@ -336,6 +353,13 @@ export default {
break
case 'edit':
this.menuDialogTitle = '编辑菜单'
this.menuData.map(item => {
if (item.prop == 'type') {
item.disabled = true
} else if (item.prop == 'icon') {
item.hidden = false
}
})
this.isOpen = false
this.editEvent(scope)
break
......
......@@ -36,23 +36,13 @@
:searchForm="searchDataForm"
:hasNum="false"
>
<!-- <span
slot="status"
slot-scope="scope"
>
<span
class="statusText"
:class="scope.scope.operStatus ? WORKLOGSTATUS[scope.scope.operStatus].split(',')[1] : ''"
>
{{scope.scope.operStatus ? WORKLOGSTATUS[scope.scope.operStatus].split(',')[0] : '--'}}
</span>
</span> -->
</basic-table>
</div>
</div>
</template>
<script>
import store from '@/store';
import { WORKLOG_API } from '@/config/config'
import { getWorkLogList, exportWorkLog } from 'services/worklog';
export default {
......@@ -127,7 +117,7 @@ export default {
exportTable() {
const params = this.$refs.worklogTable.page
this.$Common.exportExcel({
url: WORKLOG_API.WORKLOG_EXPORT,
url: store.state.baseURL + WORKLOG_API.WORKLOG_EXPORT,
data: params,
method: 'GET',
fileName: '操作日志.xlsx'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!