Commit 51c11123 authored by 黄奎's avatar 黄奎

页面修改

parent fb9f6201
......@@ -4,7 +4,8 @@
<el-tab-pane v-for="(item,index) in dataList" :label="item.PageTypeName" :name="item.PageTypeId+''" :key="index">
<template v-for="(subItem,subIndex) in item.SubMenuList">
<div :key="subIndex">
{{subItem.PageName}} <br />
<span v-if="subItem.SelePageName&&subitem.SelePageName!=''">{{subItem.SelePageName}}</span>
<span v-else>{{subItem.PageName}} </span>
{{subItem.PageUrl}} <br />
<span v-if="subItem.IsParameter==1">
<el-input v-model="subItem.ParameterValue"></el-input>
......@@ -43,6 +44,7 @@
},
mounted() {
this.getList();
console.log("1234123213")
}
};
......
<template>
<div class="mimititle">
<template>
<table>
<tbody v-for="(item,index) in dataList" :key="index">
<tr>
<td>
{{item.firstItem.PageName}}
</td>
<td>
<el-input v-model="item.firstItem.SelePageName" />
</td>
<td>
<span v-if="item.secondItem"> {{item.secondItem.PageName}}</span>
</td>
<td>
<el-input v-if="item.secondItem" v-model="item.secondItem.SelePageName" />
</td>
</tr>
</tbody>
</table>
</template>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
dataList: [],
};
},
created() {
},
methods: {
getList() {
this.dataList = [];
this.apipost("/api/Tenant/MiniprogramPageListExt", {}, res => {
if (res.data.resultCode == 1) {
var data = res.data.data;
var myArray = [];
if (data && data.length > 0) {
data.forEach(item => {
if (item.SubMenuList && item.SubMenuList.length > 0) {
item.SubMenuList.forEach(subItem => {
myArray.push(subItem);
})
}
});
console.log("myArray", myArray);
if (myArray && myArray.length > 0) {
var totalpage = 0;
if (myArray.length % 2 == 1) {
totalpage = parseInt(myArray.length / 2) + parseInt(1);
} else {
totalpage = parseInt(myArray.length / 2);
}
console.log("totalpage", totalpage)
for (var index = 0; index < totalpage; index++) {
var singleIndex = index * 2;
var doubleIndex = Number(index * 2) + Number(1)
var obj = {
firstItem: "",
secondItem: ""
};
if (singleIndex <= myArray.length) {
obj.firstItem = myArray[singleIndex];
}
if (doubleIndex <= myArray.length) {
obj.secondItem = myArray[doubleIndex];
}
console.log("obj", obj);
this.dataList.push(obj)
}
console.log(" this.dataList", this.dataList)
}
}
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.getList();
}
};
</script>
<style>
.navNavIconImg {
width: 80px;
height: 80px;
}
.navNavIconImg NavIconImg {
width: 100%;
height: 100%;
}
.mimititle .blue {
color: #409EFF;
}
.mimititle .content .searchInput {
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.mimititle .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.mimititle .content .searchInput {
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.mimititle .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
</style>
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