系统生成的菜单和按钮不允许删除
This commit is contained in:
parent
6eeb79261a
commit
06c988be91
|
@ -106,7 +106,7 @@ const permission = {
|
||||||
name: 'masterDataEdit',
|
name: 'masterDataEdit',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: '基本信息',
|
title: '',
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -116,7 +116,7 @@ const permission = {
|
||||||
name: 'dataOrigin',
|
name: 'dataOrigin',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: '数据源',
|
title: '',
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -126,7 +126,7 @@ const permission = {
|
||||||
name: 'displayInfo',
|
name: 'displayInfo',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: '显示信息',
|
title: '',
|
||||||
hidden: true
|
hidden: true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ const permission = {
|
||||||
name: 'authorily',
|
name: 'authorily',
|
||||||
component: () => import('@/views/masterDataOptions/authority'),
|
component: () => import('@/views/masterDataOptions/authority'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '配置权限',
|
title: '',
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -145,7 +145,7 @@ const permission = {
|
||||||
name: 'distribute',
|
name: 'distribute',
|
||||||
component: () => import('@/views/masterDataOptions/distribute'),
|
component: () => import('@/views/masterDataOptions/distribute'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '分发设置',
|
title: '',
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@
|
||||||
:ruleForm="stepOneForm"
|
:ruleForm="stepOneForm"
|
||||||
:isFunBtn="false"
|
:isFunBtn="false"
|
||||||
@onSubmit="onSubmitHandle"
|
@onSubmit="onSubmitHandle"
|
||||||
|
@onChangeRadio="stepOneChangeRadio"
|
||||||
></baseNewForm>
|
></baseNewForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -616,6 +617,7 @@ export default {
|
||||||
stepZeroForm: {
|
stepZeroForm: {
|
||||||
needLogin: '1',
|
needLogin: '1',
|
||||||
enableAccessEntry: ['2']
|
enableAccessEntry: ['2']
|
||||||
|
|
||||||
}, //步骤1表(数据)
|
}, //步骤1表(数据)
|
||||||
stepOneformRow: [
|
stepOneformRow: [
|
||||||
{
|
{
|
||||||
|
@ -685,13 +687,38 @@ export default {
|
||||||
message: 'TPS'
|
message: 'TPS'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'radio',
|
||||||
|
title: '是否扩展API',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'extensionApi',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '是',
|
||||||
|
id: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '否',
|
||||||
|
id: '2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],//步骤2表
|
],//步骤2表
|
||||||
stepOneForm: {
|
stepOneForm: {
|
||||||
requestCoding: '1',
|
requestCoding: '1',
|
||||||
timeoutPeriod: 10000,
|
timeoutPeriod: 10000,
|
||||||
currentLimiting: 100,
|
currentLimiting: 100,
|
||||||
requestMethod: '1'
|
requestMethod: '1',
|
||||||
|
extensionApi: '1'
|
||||||
}, //步骤2表(数据)
|
}, //步骤2表(数据)
|
||||||
stepThreeRadio: 1, //没用了(穿透配置)
|
stepThreeRadio: 1, //没用了(穿透配置)
|
||||||
stepThreeRadioOptions: [
|
stepThreeRadioOptions: [
|
||||||
|
@ -1121,6 +1148,231 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//当步骤二中的是否拓展api改变时如果为1则内部名称和方法名称需必填
|
||||||
|
stepOneChangeRadio(val, index, indexRow, row) {
|
||||||
|
console.log(row)
|
||||||
|
if (row.id === 'extensionApi') {
|
||||||
|
if (val == 1) {
|
||||||
|
this.stepOneformRow = [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
title: '目标地址',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'destinationAddress',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '请求编码',
|
||||||
|
id: 'requestCoding',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '请求方法',
|
||||||
|
id: 'requestMethod',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'num',
|
||||||
|
title: '超出时间',
|
||||||
|
id: 'timeoutPeriod',
|
||||||
|
row: 24,
|
||||||
|
min: 1,
|
||||||
|
max: 600000,
|
||||||
|
maxlength: 50,
|
||||||
|
required: true,
|
||||||
|
message: 'ms'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'num',
|
||||||
|
title: '限流',
|
||||||
|
maxlength: 50,
|
||||||
|
id: 'currentLimiting',
|
||||||
|
min: 1,
|
||||||
|
row: 24,
|
||||||
|
max: 1000,
|
||||||
|
required: true,
|
||||||
|
message: 'TPS'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'radio',
|
||||||
|
title: '是否扩展API',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'extensionApi',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '是',
|
||||||
|
id: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '否',
|
||||||
|
id: '2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
title: '内部bean名称',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'beanName',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
title: '方法名称',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'funName',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
this.stepOneformRow = [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
title: '目标地址',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'destinationAddress',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '请求编码',
|
||||||
|
id: 'requestCoding',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '请求方法',
|
||||||
|
id: 'requestMethod',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'num',
|
||||||
|
title: '超出时间',
|
||||||
|
id: 'timeoutPeriod',
|
||||||
|
row: 24,
|
||||||
|
min: 1,
|
||||||
|
max: 600000,
|
||||||
|
maxlength: 50,
|
||||||
|
required: true,
|
||||||
|
message: 'ms'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'num',
|
||||||
|
title: '限流',
|
||||||
|
maxlength: 50,
|
||||||
|
id: 'currentLimiting',
|
||||||
|
min: 1,
|
||||||
|
row: 24,
|
||||||
|
max: 1000,
|
||||||
|
required: true,
|
||||||
|
message: 'TPS'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'radio',
|
||||||
|
title: '是否扩展API',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'extensionApi',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '是',
|
||||||
|
id: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '否',
|
||||||
|
id: '2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 选项卡点击事件
|
// 选项卡点击事件
|
||||||
handleSelect(key, keyPath) {
|
handleSelect(key, keyPath) {
|
||||||
this.activeIndex = key
|
this.activeIndex = key
|
||||||
|
@ -1323,8 +1575,231 @@ export default {
|
||||||
obj1['requestMethod'] = res.attribute.requestMethod
|
obj1['requestMethod'] = res.attribute.requestMethod
|
||||||
obj1['timeoutPeriod'] = res.attribute.timeoutPeriod
|
obj1['timeoutPeriod'] = res.attribute.timeoutPeriod
|
||||||
obj1['currentLimiting'] = res.attribute.currentLimiting
|
obj1['currentLimiting'] = res.attribute.currentLimiting
|
||||||
|
obj1['extensionApi'] = res.attribute.extensionApi
|
||||||
|
obj1['funName'] = res.attribute.funName
|
||||||
|
obj1['beanName'] = res.attribute.beanName
|
||||||
this.stepZeroForm = obj0
|
this.stepZeroForm = obj0
|
||||||
this.stepOneForm = obj1
|
this.stepOneForm = obj1
|
||||||
|
//这里和stepOneChangeRadio方法一个道理 需要判断是否必填
|
||||||
|
if (this.stepOneForm.extensionApi == 1) {
|
||||||
|
this.stepOneformRow = [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
title: '目标地址',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'destinationAddress',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '请求编码',
|
||||||
|
id: 'requestCoding',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '请求方法',
|
||||||
|
id: 'requestMethod',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'num',
|
||||||
|
title: '超出时间',
|
||||||
|
id: 'timeoutPeriod',
|
||||||
|
row: 24,
|
||||||
|
min: 1,
|
||||||
|
max: 600000,
|
||||||
|
maxlength: 50,
|
||||||
|
required: true,
|
||||||
|
message: 'ms'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'num',
|
||||||
|
title: '限流',
|
||||||
|
maxlength: 50,
|
||||||
|
id: 'currentLimiting',
|
||||||
|
min: 1,
|
||||||
|
row: 24,
|
||||||
|
max: 1000,
|
||||||
|
required: true,
|
||||||
|
message: 'TPS'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'radio',
|
||||||
|
title: '是否扩展API',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'extensionApi',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '是',
|
||||||
|
id: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '否',
|
||||||
|
id: '2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
title: '内部bean名称',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'beanName',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
title: '方法名称',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'funName',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
this.stepOneformRow = [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
title: '目标地址',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'destinationAddress',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '请求编码',
|
||||||
|
id: 'requestCoding',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
title: '请求方法',
|
||||||
|
id: 'requestMethod',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'num',
|
||||||
|
title: '超出时间',
|
||||||
|
id: 'timeoutPeriod',
|
||||||
|
row: 24,
|
||||||
|
min: 1,
|
||||||
|
max: 600000,
|
||||||
|
maxlength: 50,
|
||||||
|
required: true,
|
||||||
|
message: 'ms'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'num',
|
||||||
|
title: '限流',
|
||||||
|
maxlength: 50,
|
||||||
|
id: 'currentLimiting',
|
||||||
|
min: 1,
|
||||||
|
row: 24,
|
||||||
|
max: 1000,
|
||||||
|
required: true,
|
||||||
|
message: 'TPS'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
type: 'radio',
|
||||||
|
title: '是否扩展API',
|
||||||
|
maxlength: 200,
|
||||||
|
id: 'extensionApi',
|
||||||
|
pattern: '',
|
||||||
|
message: 'URL或协议不合法',
|
||||||
|
row: 24,
|
||||||
|
required: true,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '是',
|
||||||
|
id: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '否',
|
||||||
|
id: '2'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
this.$set(this.returnedForm, 'returnSuccessField', res.attribute.returnSuccessField)
|
this.$set(this.returnedForm, 'returnSuccessField', res.attribute.returnSuccessField)
|
||||||
this.$set(this.returnedForm, 'returnSuccessValue', res.attribute.returnSuccessValue)
|
this.$set(this.returnedForm, 'returnSuccessValue', res.attribute.returnSuccessValue)
|
||||||
this.$set(this.returnedForm, 'returnMsg', res.attribute.returnMsg)
|
this.$set(this.returnedForm, 'returnMsg', res.attribute.returnMsg)
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseTable from '@/components/base/baseTable'
|
import baseTable from '@/components/base/baseTable'
|
||||||
import baseLayout from "@/components/base/baseNewLayout"
|
import baseLayout from '@/components/base/baseNewLayout'
|
||||||
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
||||||
import baseForm from '@/components/base/baseNewForm/index.vue'
|
import baseForm from '@/components/base/baseNewForm/index.vue'
|
||||||
|
@ -106,7 +106,9 @@ export default {
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
menuId: '',
|
menuId: '',
|
||||||
pageNum: 1
|
pageNum: 1
|
||||||
}
|
},
|
||||||
|
radioRow: {},//当前选中行
|
||||||
|
clickTreeRow: {}//当前选中树
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -132,6 +134,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 树状图点击事件
|
// 树状图点击事件
|
||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
|
this.clickTreeRow = data
|
||||||
this.pageModel.menuId = data.id
|
this.pageModel.menuId = data.id
|
||||||
this.pageModel.pageNum = 1
|
this.pageModel.pageNum = 1
|
||||||
this.RefreshTable()
|
this.RefreshTable()
|
||||||
|
@ -155,6 +158,7 @@ export default {
|
||||||
radioChange(val) {
|
radioChange(val) {
|
||||||
this.radioIndex = val.index
|
this.radioIndex = val.index
|
||||||
this.radioID = val.id
|
this.radioID = val.id
|
||||||
|
this.radioRow = val
|
||||||
},
|
},
|
||||||
async getTableData() {
|
async getTableData() {
|
||||||
this.tabLoading = true
|
this.tabLoading = true
|
||||||
|
@ -222,6 +226,10 @@ export default {
|
||||||
this.$vmNews('请选择一条数据')
|
this.$vmNews('请选择一条数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(this.clickTreeRow.formId){
|
||||||
|
this.$vmNews("系统自动生成的按钮无法删除")
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$confirm('确定删除吗?', '提示', {
|
this.$confirm('确定删除吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|
|
@ -8,17 +8,20 @@
|
||||||
<div slot="main" flex style="height:100%">
|
<div slot="main" flex style="height:100%">
|
||||||
<div style="width: 100%;border-right:1px solid #dfe6ec;height:100%;overflow: auto;">
|
<div style="width: 100%;border-right:1px solid #dfe6ec;height:100%;overflow: auto;">
|
||||||
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :expandAll="true"
|
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :expandAll="true"
|
||||||
:showCheckbox="false" :menuData="menuData" @handleNodeClick="formClick">
|
:showCheckbox="false" :menuData="menuData" @handleNodeClick="formClick"
|
||||||
|
>
|
||||||
</base-tree>
|
</base-tree>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
<base-layout title="菜单树编辑区" :defaultButtonSwitch="false" :buttonList="buttonList" @onFuncBtn="getFuncBtn"
|
<base-layout title="菜单树编辑区" :defaultButtonSwitch="false" :buttonList="buttonList" @onFuncBtn="getFuncBtn"
|
||||||
style="flex:1;">
|
style="flex:1;"
|
||||||
|
>
|
||||||
<div slot="main" style="padding:0 12px;height:300px">
|
<div slot="main" style="padding:0 12px;height:300px">
|
||||||
<base-form ref="customForm" :formRow="formRow" :isFunBtn="isFunBtn" @elDialogClick="elDialogClick"
|
<base-form ref="customForm" :formRow="formRow" :isFunBtn="isFunBtn" @elDialogClick="elDialogClick"
|
||||||
:formdata="ruleForm" @onSubmit="getSubmit">
|
:formdata="ruleForm" @onSubmit="getSubmit"
|
||||||
|
>
|
||||||
</base-form>
|
</base-form>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
|
@ -29,15 +32,15 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import baseLayout from "@/components/base/baseNewLayout"
|
import baseLayout from '@/components/base/baseNewLayout'
|
||||||
import baseForm from "@/components/base/baseNewForm/index.vue"
|
import baseForm from '@/components/base/baseNewForm/index.vue'
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue"
|
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
||||||
import baseTreeclick from "@/components/base/baseTreeClick/index.vue"
|
import baseTreeclick from '@/components/base/baseTreeClick/index.vue'
|
||||||
import baseDialog from "@/components/base/BaseNewDialog"
|
import baseDialog from '@/components/base/BaseNewDialog'
|
||||||
import baseOrganization from "@/components/base/baseOrganization"
|
import baseOrganization from '@/components/base/baseOrganization'
|
||||||
import configData from "./configData";
|
import configData from './configData'
|
||||||
import {
|
import {
|
||||||
GetOrganTree,
|
GetOrganTree
|
||||||
} from '@/api/apis/organization'
|
} from '@/api/apis/organization'
|
||||||
import {
|
import {
|
||||||
GetMenuTree,
|
GetMenuTree,
|
||||||
|
@ -46,6 +49,7 @@ import {
|
||||||
MenuDelData
|
MenuDelData
|
||||||
} from '@/api/apis/menuManage'
|
} from '@/api/apis/menuManage'
|
||||||
import { authApi } from '@/api/apis/auth'
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
baseLayout,
|
baseLayout,
|
||||||
|
@ -75,7 +79,7 @@ export default {
|
||||||
menuName: '删除节点',
|
menuName: '删除节点',
|
||||||
icon: 'el-icon-delete',
|
icon: 'el-icon-delete',
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
delId: '',
|
delId: '',
|
||||||
menuData: [],
|
menuData: [],
|
||||||
|
@ -83,6 +87,7 @@ export default {
|
||||||
rules: {},
|
rules: {},
|
||||||
formRow: configData.formRow,
|
formRow: configData.formRow,
|
||||||
isFunBtn: true,
|
isFunBtn: true,
|
||||||
|
clickTree: {}//当前点击树
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -109,8 +114,8 @@ export default {
|
||||||
|
|
||||||
if (btnEven.menuName == '新增根节点') {
|
if (btnEven.menuName == '新增根节点') {
|
||||||
let newRuleForm = {
|
let newRuleForm = {
|
||||||
parentMenuName: "",
|
parentMenuName: '',
|
||||||
parentMenuId: 0,
|
parentMenuId: 0
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.customForm.resetForm('ruleForm')
|
this.$refs.customForm.resetForm('ruleForm')
|
||||||
|
@ -133,7 +138,10 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (btnEven.menuName == '删除节点') {
|
if (btnEven.menuName == '删除节点') {
|
||||||
|
if(this.clickTree.formId){
|
||||||
|
this.$vmNews("系统自动生成的菜单不允许删除")
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$confirm('确认删除该菜单吗?', '提示', {
|
this.$confirm('确认删除该菜单吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
@ -144,8 +152,8 @@ export default {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消删除'
|
message: '已取消删除'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async menuDel() {
|
async menuDel() {
|
||||||
|
@ -180,9 +188,9 @@ export default {
|
||||||
}
|
}
|
||||||
let res
|
let res
|
||||||
if (params.id) {
|
if (params.id) {
|
||||||
res = await authApi("sysMenuConfigService","","updateEntity","",params)
|
res = await authApi('sysMenuConfigService', '', 'updateEntity', '', params)
|
||||||
} else {
|
} else {
|
||||||
res = await authApi("sysMenuConfigService","","saveEntity","",params)
|
res = await authApi('sysMenuConfigService', '', 'saveEntity', '', params)
|
||||||
}
|
}
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.$vmNews('保存成功', 'success')
|
this.$vmNews('保存成功', 'success')
|
||||||
|
@ -204,7 +212,7 @@ export default {
|
||||||
this.$refs.baseOrganization.dialogVisible = true
|
this.$refs.baseOrganization.dialogVisible = true
|
||||||
},
|
},
|
||||||
handleConfirmClick(val) {
|
handleConfirmClick(val) {
|
||||||
console.log(val, "val");
|
console.log(val, 'val')
|
||||||
this.ruleForm.parentMenuName = val.label
|
this.ruleForm.parentMenuName = val.label
|
||||||
this.ruleForm.parentMenuId = val.id
|
this.ruleForm.parentMenuId = val.id
|
||||||
this.$refs.customForm.incomingParameters(this.ruleForm)
|
this.$refs.customForm.incomingParameters(this.ruleForm)
|
||||||
|
@ -212,9 +220,10 @@ export default {
|
||||||
},
|
},
|
||||||
formClick(data) {
|
formClick(data) {
|
||||||
this.delId = data.id
|
this.delId = data.id
|
||||||
|
this.clickTree = data
|
||||||
this.getDetail(data.id)
|
this.getDetail(data.id)
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue