mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
c996939a3a
commit
ec336dd97c
@ -42,7 +42,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(itemData,indexData) in item.data" >
|
<tr v-for="(itemData,indexData) in item.data">
|
||||||
<td class="text-center" v-for="(tmpItemTh,key) in item.th">
|
<td class="text-center" v-for="(tmpItemTh,key) in item.th">
|
||||||
{{itemData[tmpItemTh]}}</td>
|
{{itemData[tmpItemTh]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -55,10 +55,19 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
<div class="row padding-left" v-if="item.footer">
|
||||||
|
<span class="col-md-2" v-for="(tmpItemTh,key) of item.footer">
|
||||||
|
<div class="row">{{key}}: {{tmpItemTh}}</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 text-center">
|
||||||
<vc:create path="frame/paginationPlus" namespace="commonReportTable"></vc:create>
|
<vc:create path="frame/paginationPlus" namespace="commonReportTable"></vc:create>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -33,6 +33,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
$that._listReportCustomTableDatas(1, 15, item, _condition);
|
$that._listReportCustomTableDatas(1, 15, item, _condition);
|
||||||
|
$that._listReportCustomTableFooter(1, 15, item, _condition);
|
||||||
},
|
},
|
||||||
_listReportCustomTableComponent: function () {
|
_listReportCustomTableComponent: function () {
|
||||||
var param = {
|
var param = {
|
||||||
@ -52,6 +53,7 @@
|
|||||||
$that.commonReportTableInfo.components.forEach(item => {
|
$that.commonReportTableInfo.components.forEach(item => {
|
||||||
$that._listReportCustomTableConditions(item);
|
$that._listReportCustomTableConditions(item);
|
||||||
$that._listReportCustomTableDatas(1, 15, item);
|
$that._listReportCustomTableDatas(1, 15, item);
|
||||||
|
$that._listReportCustomTableFooter(1, 15, item);
|
||||||
});
|
});
|
||||||
}, function (errInfo, error) {
|
}, function (errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
@ -126,6 +128,45 @@
|
|||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
_listReportCustomTableFooter: function (_page, _row, _component, _conditions) {
|
||||||
|
let _community = vc.getCurrentCommunity();
|
||||||
|
let _communityId = '';
|
||||||
|
if (_community) {
|
||||||
|
_communityId = _community.communityId
|
||||||
|
}
|
||||||
|
if (_conditions) {
|
||||||
|
_conditions.page = _page;
|
||||||
|
_conditions.row = _row;
|
||||||
|
_conditions.componentId = _component.componentId;
|
||||||
|
_conditions.communityId = _communityId
|
||||||
|
} else {
|
||||||
|
_conditions = {
|
||||||
|
page: _page,
|
||||||
|
row: _row,
|
||||||
|
componentId: _component.componentId,
|
||||||
|
communityId: _communityId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let param = {
|
||||||
|
params: _conditions
|
||||||
|
};
|
||||||
|
|
||||||
|
//发送get请求
|
||||||
|
vc.http.apiGet('/reportCustomComponent.listReportCustomComponentDataFooter',
|
||||||
|
param,
|
||||||
|
function (json, res) {
|
||||||
|
let _componentDataManageInfo = JSON.parse(json);
|
||||||
|
if (_componentDataManageInfo.code != 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let _data = _componentDataManageInfo.data;
|
||||||
|
_component.footer = _data;
|
||||||
|
$that.$forceUpdate();
|
||||||
|
}, function (errInfo, error) {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -5,6 +5,10 @@
|
|||||||
<div class="ibox-title">
|
<div class="ibox-title">
|
||||||
<h5>{{reportCustomComponentFooterManageInfo.componentName}}统计</h5>
|
<h5>{{reportCustomComponentFooterManageInfo.componentName}}统计</h5>
|
||||||
<div class="ibox-tools" style="top:10px;">
|
<div class="ibox-tools" style="top:10px;">
|
||||||
|
<button type="button" class="btn btn-white btn-sm"
|
||||||
|
v-on:click="_goBack()">
|
||||||
|
返回
|
||||||
|
</button>
|
||||||
<button type="button" class="btn btn-primary btn-sm"
|
<button type="button" class="btn btn-primary btn-sm"
|
||||||
v-on:click="_openAddReportCustomComponentFooterModal()">
|
v-on:click="_openAddReportCustomComponentFooterModal()">
|
||||||
<i class="glyphicon glyphicon-plus"></i>
|
<i class="glyphicon glyphicon-plus"></i>
|
||||||
|
|||||||
@ -74,6 +74,9 @@
|
|||||||
_queryReportCustomComponentFooterMethod: function () {
|
_queryReportCustomComponentFooterMethod: function () {
|
||||||
vc.component._listReportCustomComponentFooters(DEFAULT_PAGE, DEFAULT_ROWS);
|
vc.component._listReportCustomComponentFooters(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
},
|
},
|
||||||
|
_goBack:function(){
|
||||||
|
vc.goBack();
|
||||||
|
},
|
||||||
_moreCondition: function () {
|
_moreCondition: function () {
|
||||||
if (vc.component.reportCustomComponentFooterManageInfo.moreCondition) {
|
if (vc.component.reportCustomComponentFooterManageInfo.moreCondition) {
|
||||||
vc.component.reportCustomComponentFooterManageInfo.moreCondition = false;
|
vc.component.reportCustomComponentFooterManageInfo.moreCondition = false;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user