Commit df963540 authored by zhengke's avatar zhengke

页面修改

parent a0a451bf
......@@ -30,13 +30,12 @@
},
methods: {
handleClick(tab, event) {
//console.log(tab, event);
},
getList() {
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);
}
......
<style>
.mimitBody{
padding:20px;
background-color: #fff;
margin:10px 0 20px 0;
display:table;
width:100%;
}
.mimitList{
margin-bottom:15px;
display: flex;
flex-direction: row;
}
.mimitBody .el-tag{
min-width: 120px;
padding-right: 50px;
}
.mimititle .el-button--small{
padding:9px 25px;
}
</style>
<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.SelfPageName" />
</td>
<td>
<span v-if="item.secondItem"> {{item.secondItem.PageName}}</span>
</td>
<td>
<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>
<div class="CommonHeader">页面标题设置</div>
<div class="mimitBody">
<template v-for="(item,index) in dataList">
<div class="el-col el-col-12 mimitList" :key="index">
<el-tag>{{item.firstItem.PageName}}</el-tag>
<el-input type="text" style="margin:0 20px;" v-model="item.firstItem.SelfPageName" size="small"></el-input>
</div>
<div class="el-col el-col-12 mimitList" :key="index+1000">
<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>
</div>
</template>
</div>
<el-button size="small" type="primary" @click="submitForm()">保存</el-button>
<el-button size="small" @click="resetInfo()">恢复默认</el-button>
</div>
</template>
<script>
export default {
......@@ -40,7 +52,6 @@
methods: {
getList() {
this.dataList = [];
this.apipost("/api/Tenant/GetMiniprogramPageListExt", {}, res => {
if (res.data.resultCode == 1) {
var data = res.data.data;
......@@ -85,7 +96,6 @@
//保存标题
submitForm() {
var setArray = []; //新增修改的数组
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.firstItem) {
......@@ -113,6 +123,20 @@
this.Info(res.data.message);
}
})
},
//恢复默认
resetInfo(){
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.firstItem) {
item.firstItem.SelfPageName=''
}
if (item.secondItem) {
item.secondItem.SelfPageName=''
}
})
}
}
},
mounted() {
......
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