Commit e9579653 authored by 黄奎's avatar 黄奎

页面修改

parent 36f901a8
......@@ -4,7 +4,7 @@
<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">
<span v-if="subItem.SelePageName&&subitem.SelePageName!=''">{{subItem.SelePageName}}</span>
<span v-if="subItem.SelfPageName">{{subItem.SelfPageName}}</span>
<span v-else>{{subItem.PageName}} </span>
{{subItem.PageUrl}} <br />
<span v-if="subItem.IsParameter==1">
......@@ -33,9 +33,10 @@
//console.log(tab, event);
},
getList() {
this.apipost("/api/Tenant/MiniprogramPageListExt", {}, res => {
this.apipost("/api/Tenant/GetMiniprogramPageListExt", {}, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
console.log("this.data",this.dataList);
} else {
this.Info(res.data.message);
}
......@@ -44,7 +45,6 @@
},
mounted() {
this.getList();
console.log("1234123213")
}
};
......
......@@ -9,16 +9,19 @@
{{item.firstItem.PageName}}
</td>
<td>
<el-input v-model="item.firstItem.SelePageName" />
<el-input v-model="item.firstItem.SelfPageName" />
</td>
<td>
<span v-if="item.secondItem"> {{item.secondItem.PageName}}</span>
<span v-if="item.secondItem"> {{item.secondItem.PageName}}</span>
</td>
<td>
<el-input v-if="item.secondItem" v-model="item.secondItem.SelePageName" />
<el-input v-if="item.secondItem" v-model="item.secondItem.SelfPageName" />
</td>
</tr>
</tbody>
<tfoot>
<el-button size="small" type="primary" @click="submitForm()">保存</el-button>
</tfoot>
</table>
</template>
</div>
......@@ -38,7 +41,7 @@
getList() {
this.dataList = [];
this.apipost("/api/Tenant/MiniprogramPageListExt", {}, res => {
this.apipost("/api/Tenant/GetMiniprogramPageListExt", {}, res => {
if (res.data.resultCode == 1) {
var data = res.data.data;
var myArray = [];
......@@ -50,7 +53,6 @@
})
}
});
console.log("myArray", myArray);
if (myArray && myArray.length > 0) {
var totalpage = 0;
if (myArray.length % 2 == 1) {
......@@ -58,7 +60,6 @@
} 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)
......@@ -72,10 +73,8 @@
if (doubleIndex <= myArray.length) {
obj.secondItem = myArray[doubleIndex];
}
console.log("obj", obj);
this.dataList.push(obj)
}
console.log(" this.dataList", this.dataList)
}
}
} else {
......@@ -83,6 +82,38 @@
}
})
},
//保存标题
submitForm() {
var setArray = []; //新增修改的数组
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.firstItem) {
setArray.push({
Id: item.firstItem.Id,
SelfPageName: item.firstItem.SelfPageName,
});
}
if (item.secondItem) {
setArray.push({
Id: item.secondItem.Id,
SelfPageName: item.secondItem.SelfPageName,
});
}
})
}
var msg = {
setMsg: setArray,
};
this.apipost("/api/Tenant/SetMiniprogramPageTitle", msg, res => {
if (res.data.resultCode == 1) {
this.getList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
}
},
mounted() {
this.getList();
......
......@@ -381,9 +381,9 @@
},
created() {
this.currentUser = this.getLocalStorage();
this.$router.push({
path: 'zanIndex'
});
// this.$router.push({
// path: 'zanIndex'
// });
},
methods: {
......
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