Commit cfedb887 authored by 黄奎's avatar 黄奎

新增参数

parent 1a77c191
<style>
.other_Style{
color:#409EFF;
.other_Style {
color: #409EFF;
}
</style>
<template>
<div class="chooseMenu">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item,index) in dataList" :label="item.PageTypeName" :name="item.PageTypeId+''" :key="index">
<div style="height:450px;overflow:scroll;line-height:normal;" v-if="item.PageTypeId!=6">
<div style="height:450px;overflow:scroll;line-height:normal;" v-if="item.PageTypeId==6">
<el-input placeholder="输入关键字进行过滤" style="width:99%;margin-bottom:10px;" v-model="filterText">
</el-input>
<el-tree :data="item.SubMenuList" node-key="PageId" ref="tree" :props="defaultProps" filter
:filter-node-method="filterNode" @check="handleCheck" :check-strictly="true" show-checkbox
:check-on-click-node="true">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="{'other_Style':data.SubMenuList&&data.SubMenuList.length>0}">{{ data.PageName }}</span>
</span>
</el-tree>
</div>
<!--商载通-->
<div style="height:450px;overflow:scroll;line-height:normal;" v-if="item.PageTypeId==8">
<!-- <el-input placeholder="输入关键字进行过滤" style="width:99%;margin-bottom:10px;" v-model="filterText">
</el-input> -->
<el-tree :data="item.SubMenuList" node-key="PageId" ref="ybszttree" :props="defaultProps" filter
:filter-node-method="filterNode" @check="handleSZTCheck" :check-strictly="true" show-checkbox
:check-on-click-node="true">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="{'other_Style':data.SubMenuList&&data.SubMenuList.length>0}">{{ data.PageName }}</span>
</span>
</el-tree>
</div>
<div style="height:450px;overflow:scroll" v-else>
<template v-for="(subItem,subIndex) in item.SubMenuList">
<div :key="subIndex" style="margin-bottom:10px;">
<el-checkbox v-model="subItem.IsChecked" :key="subIndex" @change="checkMenuChange(subItem)">
......@@ -17,16 +41,6 @@
</div>
</template>
</div>
<div style="height:450px;overflow:scroll" v-else>
<el-input placeholder="输入关键字进行过滤" style="width:99%;margin-bottom:10px;" v-model="filterText">
</el-input>
<el-tree :data="item.SubMenuList" node-key="PageId" ref="tree" :props="defaultProps" filter
:filter-node-method="filterNode" @check="handleCheck" :check-strictly="true" show-checkbox :check-on-click-node="true">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="{'other_Style':data.SubMenuList&&data.SubMenuList.length>0}">{{ data.PageName }}</span>
</span>
</el-tree>
</div>
</el-tab-pane>
</el-tabs>
</div>
......@@ -74,9 +88,23 @@
IsParameter: 0,
ParameterValue: "",
PageName: "",
new_link_url:''
new_link_url: ''
};
if (this.activeName != 6) {
if (this.activeName == 6) {
obj.PageUrl = this.checkedObj.PageUrl
obj.new_link_url = this.checkedObj.PageUrl
obj.IsParameter = this.checkedObj.IsParameter
obj.ParameterValue = this.checkedObj.ParameterValue
obj.PageName = this.checkedObj.PageName;
}
//宜宾商载通
if (this.activeName == 8) {
obj.PageUrl = this.checkedObj.PageUrl
obj.new_link_url = this.checkedObj.PageUrl
obj.IsParameter = this.checkedObj.IsParameter
obj.ParameterValue = this.checkedObj.ParameterValue
obj.PageName = this.checkedObj.PageName;
} else {
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.SubMenuList && item.SubMenuList.length > 0) {
......@@ -92,12 +120,6 @@
}
});
}
} else {
obj.PageUrl = this.checkedObj.PageUrl
obj.new_link_url = this.checkedObj.PageUrl
obj.IsParameter = this.checkedObj.IsParameter
obj.ParameterValue = this.checkedObj.ParameterValue
obj.PageName = this.checkedObj.PageName;
}
return obj;
},
......@@ -134,6 +156,14 @@
this.checkedObj = a;
}
},
//check单选
handleSZTCheck(a, b) {
//a为传递给 data 属性的数组中该节点所对应的对象;b为树目前的选中状态对象
if (b.checkedKeys.length > 0) {
this.$refs.ybszttree[0].setCheckedKeys([a.PageId]);
this.checkedObj = a;
}
},
},
mounted() {
this.getList();
......
......@@ -260,6 +260,7 @@
this.addMsg.IsShowNav = jsonData.IsShowNav;
this.addMsg.IsHome = jsonData.IsHome;
this.addMsg.DetailsList = jsonData.DetailsList;
this.addMsg.IsShowBottomTabBar=jsonData.IsShowBottomTabBar;
this.CustomIsShowAdd = false;
} else {
this.Info(res.data.message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment