Commit 10a10f36 authored by 黄媛媛's avatar 黄媛媛
parents e3cc6715 a8fbc07a
<style> <style>
.mimipage .el-tabs__header{ .mimipage .el-tabs__header {
padding: 0 20px; padding: 0 20px;
height: 56px; height: 56px;
line-height: 56px; line-height: 56px;
background-color: #fff; background-color: #fff;
margin-bottom:15px; margin-bottom: 15px;
} }
.mimipage .panelDiv{
.mimipage .panelDiv {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.mimipage .panel_item{
.mimipage .panel_item {
background-color: #fff; background-color: #fff;
width: 33%; width: 33%;
min-height: 185px; min-height: 185px;
...@@ -19,7 +21,8 @@ ...@@ -19,7 +21,8 @@
padding: 20px; padding: 20px;
margin-right: 0.33%; margin-right: 0.33%;
} }
.mimipage .panel_name{
.mimipage .panel_name {
background-color: #F4F4F5; background-color: #F4F4F5;
color: #909399; color: #909399;
width: auto; width: auto;
...@@ -33,9 +36,11 @@ ...@@ -33,9 +36,11 @@
border: 1px solid #E0E0E3; border: 1px solid #E0E0E3;
margin-bottom: 5px; margin-bottom: 5px;
} }
.mimipage .el-form-item{
margin-bottom:0; .mimipage .el-form-item {
margin-bottom: 0;
} }
</style> </style>
<template> <template>
<div class="mimipage"> <div class="mimipage">
...@@ -78,7 +83,9 @@ ...@@ -78,7 +83,9 @@
}, },
getList() { getList() {
this.apipost("/api/Tenant/GetMiniprogramPageListExt", {}, res => { this.apipost("/api/Tenant/GetMiniprogramPageListExt", {
IsHiddenGoods: 1
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data; this.dataList = res.data.data;
} else { } else {
...@@ -91,4 +98,5 @@ ...@@ -91,4 +98,5 @@
this.getList(); this.getList();
} }
}; };
</script> </script>
<style> <style>
.mimititle .mimitBody{ .mimititle .mimitBody {
padding:20px; padding: 20px;
background-color: #fff; background-color: #fff;
margin:10px 0 20px 0; margin: 10px 0 20px 0;
display:table; display: table;
width:100%; width: 100%;
} }
.mimititle .mimitList{
margin-bottom:15px; .mimititle .mimitList {
margin-bottom: 15px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.mimititle .mimitBody .el-tag{
.mimititle .mimitBody .el-tag {
min-width: 120px; min-width: 120px;
padding-right: 50px; padding-right: 50px;
} }
.mimititle .el-button--small{
padding:9px 25px; .mimititle .el-button--small {
padding: 9px 25px;
} }
</style> </style>
<template> <template>
<div class="mimititle"> <div class="mimititle">
...@@ -30,7 +34,8 @@ ...@@ -30,7 +34,8 @@
</div> </div>
<div class="el-col el-col-12 mimitList" :key="index+1000"> <div class="el-col el-col-12 mimitList" :key="index+1000">
<el-tag v-if="item.secondItem">{{item.secondItem.PageName}}</el-tag> <el-tag v-if="item.secondItem">{{item.secondItem.PageName}}</el-tag>
<el-input v-if="item.secondItem" v-model="item.secondItem.SelfPageName" type="text" style="margin:0 20px;" size="small"></el-input> <el-input v-if="item.secondItem" v-model="item.secondItem.SelfPageName" type="text" style="margin:0 20px;"
size="small"></el-input>
</div> </div>
</template> </template>
</div> </div>
...@@ -52,7 +57,9 @@ ...@@ -52,7 +57,9 @@
methods: { methods: {
getList() { getList() {
this.dataList = []; this.dataList = [];
this.apipost("/api/Tenant/GetMiniprogramPageListExt", {}, res => { this.apipost("/api/Tenant/GetMiniprogramPageListExt", {
IsHiddenGoods: 1
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
var data = res.data.data; var data = res.data.data;
var myArray = []; var myArray = [];
...@@ -126,14 +133,14 @@ ...@@ -126,14 +133,14 @@
}, },
//恢复默认 //恢复默认
resetInfo(){ resetInfo() {
if (this.dataList && this.dataList.length > 0) { if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => { this.dataList.forEach(item => {
if (item.firstItem) { if (item.firstItem) {
item.firstItem.SelfPageName='' item.firstItem.SelfPageName = ''
} }
if (item.secondItem) { if (item.secondItem) {
item.secondItem.SelfPageName='' item.secondItem.SelfPageName = ''
} }
}) })
} }
...@@ -143,4 +150,5 @@ ...@@ -143,4 +150,5 @@
this.getList(); this.getList();
} }
}; };
</script> </script>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="chooseMenu"> <div class="chooseMenu">
<el-tabs v-model="activeName" @tab-click="handleClick"> <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"> <el-tab-pane v-for="(item,index) in dataList" :label="item.PageTypeName" :name="item.PageTypeId+''" :key="index">
<div style="height:450px;overflow:scroll"> <div style="height:450px;overflow:scroll;line-height:normal;" v-if="item.PageTypeId!=6">
<template v-for="(subItem,subIndex) in item.SubMenuList"> <template v-for="(subItem,subIndex) in item.SubMenuList">
<div :key="subIndex" style="margin-bottom:10px;"> <div :key="subIndex" style="margin-bottom:10px;">
<el-checkbox v-model="subItem.IsChecked" :key="subIndex" @change="checkMenuChange(subItem)"> <el-checkbox v-model="subItem.IsChecked" :key="subIndex" @change="checkMenuChange(subItem)">
...@@ -12,6 +12,14 @@ ...@@ -12,6 +12,14 @@
</div> </div>
</template> </template>
</div> </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>
</el-tree>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -21,10 +29,21 @@ ...@@ -21,10 +29,21 @@
data() { data() {
return { return {
dataList: [], dataList: [],
activeName: "1" activeName: "1",
filterText: '',
defaultProps: {
children: 'SubMenuList',
label: 'PageName'
},
checkedObj:{}
}; };
}, },
created() {}, created() {},
watch: {
filterText(val) {
this.$refs.tree[0].filter(val.trim());
}
},
methods: { methods: {
//复选框选择 //复选框选择
checkMenuChange(subItem) { checkMenuChange(subItem) {
...@@ -35,6 +54,8 @@ ...@@ -35,6 +54,8 @@
subItem.IsChecked = false; subItem.IsChecked = false;
}) })
} }
//清空商品选择
// this.$refs.tree[0].setCheckedKeys([]);
}); });
} }
subItem.IsChecked = !subItem.IsChecked; subItem.IsChecked = !subItem.IsChecked;
...@@ -47,6 +68,7 @@ ...@@ -47,6 +68,7 @@
ParameterValue: "", ParameterValue: "",
PageName: "" PageName: ""
}; };
if(this.activeName!=6){
if (this.dataList && this.dataList.length > 0) { if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => { this.dataList.forEach(item => {
if (item.SubMenuList && item.SubMenuList.length > 0) { if (item.SubMenuList && item.SubMenuList.length > 0) {
...@@ -61,6 +83,12 @@ ...@@ -61,6 +83,12 @@
} }
}); });
} }
}else{
obj.PageUrl=this.checkedObj.PageUrl
obj.IsParameter=this.checkedObj.IsParameter
obj.ParameterValue=this.checkedObj.ParameterValue
obj.PageName=this.checkedObj.PageName;
}
return obj; return obj;
}, },
handleClick(tab, event) {}, handleClick(tab, event) {},
...@@ -84,6 +112,18 @@ ...@@ -84,6 +112,18 @@
} }
}) })
}, },
filterNode(value, data) {
if (!value) return true;
return data.PageName.indexOf(value) !== -1;
},
//check单选
handleCheck (a, b) {
//a为传递给 data 属性的数组中该节点所对应的对象;b为树目前的选中状态对象
if (b.checkedKeys.length > 0) {
this.$refs.tree[0].setCheckedKeys([a.PageId]);
this.checkedObj=a;
}
},
}, },
mounted() { mounted() {
this.getList(); this.getList();
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<div style="flex-wrap: wrap;" flex="dir:left"> <div style="flex-wrap: wrap;" flex="dir:left">
<div flex="dir:top cross:center" class="user-item" v-for="(item,index) in UserList" :label="item.Id" :key="index"> <div flex="dir:top cross:center" class="user-item" v-for="(item,index) in UserList" :label="item.Id" :key="index">
<img :src="item.Photo" alt="" class="avatar"> <img :src="item.Photo" alt="" class="avatar">
<div class="username">{{item.AliasName}}</div> <div class="username">{{item.Name}}</div>
<button type="button" class="el-button close el-button--danger is-circle" @click="delUserList(index)"><i class="el-icon-close"></i></button> <button type="button" class="el-button close el-button--danger is-circle" @click="delUserList(index)"><i class="el-icon-close"></i></button>
</div> </div>
</div> </div>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<!--选择用户--> <!--选择用户-->
<el-dialog title="选择用户" :visible.sync="category" width="612px"> <el-dialog title="选择用户" :visible.sync="category" width="612px">
<div class="el-input el-input--small el-input-group el-input-group--append"> <div class="el-input el-input--small el-input-group el-input-group--append">
<input type="text" autocomplete="off" placeholder="输入用户ID、昵称搜索" class="el-input__inner" v-model="msg_t.AliasName"> <input type="text" autocomplete="off" placeholder="输入用户ID、昵称搜索" class="el-input__inner" v-model="msg_t.Name">
<div class="el-input-group__append"><button type="button" class="el-button el-button--default" @click="search"><!----><!----><span>搜索</span></button></div> <div class="el-input-group__append"><button type="button" class="el-button el-button--default" @click="search"><!----><!----><span>搜索</span></button></div>
</div> </div>
<el-table <el-table
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="AliasName" prop="Name"
label="昵称" label="昵称"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
msg_t:{ msg_t:{
pageIndex:1, pageIndex:1,
pageSize:10, pageSize:10,
AliasName:'' Name:''
}, },
count:0, count:0,
loading:false, loading:false,
......
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