Browse Source

元数据增加路由参数

master
xueyinfei 3 weeks ago
parent
commit
c2cd76a3eb
  1. 25
      vue-fastapi-frontend/src/views/system/menu/index.vue

25
vue-fastapi-frontend/src/views/system/menu/index.vue

@ -391,22 +391,12 @@ const data = reactive({
const { queryParams, form, rules, linkParam } = toRefs(data);
function openLinkParamsDialog(tag,index){
linkParam.value = {
tagIndex : -1,
paramEnName: '',
paramCnName:'',
paramType: '',
desc:''
}
if (tag){
linkParam.value = {
tagIndex : index,
paramEnName: tag.paramEnName,
paramCnName: tag.paramCnName,
paramType: tag.paramType,
desc: tag.desc
}
tagIndex : index,
paramEnName: tag.paramEnName,
paramCnName: tag.paramCnName,
paramType: tag.paramType,
desc: tag.desc
}
linkParamsDialog.value = true
}
@ -416,12 +406,15 @@ function saveLinkParam(){
paramCnName:linkParam.value.paramCnName,
paramType: linkParam.value.paramType,
desc: linkParam.value.desc}
if (linkParam.value.tagIndex === -1){
console.log(linkParam.value.tagIndex)
if (typeof(linkParam.value.tagIndex) === 'undefined'){
console.log(222)
if (!form.value.linkParams){
form.value.linkParams = []
}
form.value.linkParams.push(obj)
}else{
console.log(111)
form.value.linkParams[linkParam.value.tagIndex] = obj
}
linkParamsDialog.value = false

Loading…
Cancel
Save