mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
97 lines
4.8 KiB
JavaScript
97 lines
4.8 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 10;
|
|
vc.extends({
|
|
data: {
|
|
reportCustomComponentManageInfo: {
|
|
reportCustomComponents: [],
|
|
total: 0,
|
|
records: 1,
|
|
moreCondition: false,
|
|
componentId: '',
|
|
conditions: {
|
|
componentId: '',
|
|
name: '',
|
|
componentType: ''
|
|
}
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
vc.component._listReportCustomComponents(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('reportCustomComponentManage', 'listReportCustomComponent', function (_param) {
|
|
vc.component._listReportCustomComponents(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
});
|
|
vc.on('pagination', 'page_event', function (_currentPage) {
|
|
vc.component._listReportCustomComponents(_currentPage, DEFAULT_ROWS);
|
|
});
|
|
},
|
|
methods: {
|
|
_listReportCustomComponents: function (_page, _rows) {
|
|
vc.component.reportCustomComponentManageInfo.conditions.page = _page;
|
|
vc.component.reportCustomComponentManageInfo.conditions.row = _rows;
|
|
var param = {
|
|
params: vc.component.reportCustomComponentManageInfo.conditions
|
|
};
|
|
param.params.componentId = param.params.componentId.trim();
|
|
param.params.componentType = param.params.componentType.trim();
|
|
param.params.name = param.params.name.trim();
|
|
//发送get请求
|
|
vc.http.apiGet('/reportCustomComponent.listReportCustomComponent',
|
|
param,
|
|
function (json, res) {
|
|
var _reportCustomComponentManageInfo = JSON.parse(json);
|
|
vc.component.reportCustomComponentManageInfo.total = _reportCustomComponentManageInfo.total;
|
|
vc.component.reportCustomComponentManageInfo.records = _reportCustomComponentManageInfo.records;
|
|
vc.component.reportCustomComponentManageInfo.reportCustomComponents = _reportCustomComponentManageInfo.data;
|
|
vc.emit('pagination', 'init', {
|
|
total: vc.component.reportCustomComponentManageInfo.records,
|
|
dataCount: vc.component.reportCustomComponentManageInfo.total,
|
|
currentPage: _page
|
|
});
|
|
},
|
|
function (errInfo, error) {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
_openAddReportCustomComponentModal: function () {
|
|
vc.emit('addReportCustomComponent', 'openAddReportCustomComponentModal', {});
|
|
},
|
|
_openEditReportCustomComponentModel: function (_reportCustomComponent) {
|
|
vc.emit('editReportCustomComponent', 'openEditReportCustomComponentModal', _reportCustomComponent);
|
|
},
|
|
_openDeleteReportCustomComponentModel: function (_reportCustomComponent) {
|
|
vc.emit('deleteReportCustomComponent', 'openDeleteReportCustomComponentModal', _reportCustomComponent);
|
|
},
|
|
//查询
|
|
_queryReportCustomComponentMethod: function () {
|
|
vc.component._listReportCustomComponents(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
//重置
|
|
_resetReportCustomComponentMethod: function () {
|
|
vc.component.reportCustomComponentManageInfo.conditions.componentId = "";
|
|
vc.component.reportCustomComponentManageInfo.conditions.name = "";
|
|
vc.component.reportCustomComponentManageInfo.conditions.componentType = "";
|
|
vc.component._listReportCustomComponents(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
_openComponentCondition: function (_reportCustomComponent) {
|
|
vc.jumpToPage('/#/pages/dev/componentConditionManage?componentId=' + _reportCustomComponent.componentId + "&componentName=" + _reportCustomComponent.name);
|
|
},
|
|
_openComponentFooter: function (_reportCustomComponent) {
|
|
vc.jumpToPage('/#/pages/dev/reportCustomComponentFooterManage?componentId=' + _reportCustomComponent.componentId + "&componentName=" + _reportCustomComponent.name);
|
|
},
|
|
_moreCondition: function () {
|
|
if (vc.component.reportCustomComponentManageInfo.moreCondition) {
|
|
vc.component.reportCustomComponentManageInfo.moreCondition = false;
|
|
} else {
|
|
vc.component.reportCustomComponentManageInfo.moreCondition = true;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
})(window.vc); |