YOU华代码

This commit is contained in:
java110 2021-11-12 19:32:39 +08:00
parent cbfe911dff
commit 92debdbc12
6 changed files with 259 additions and 1 deletions

View File

@ -0,0 +1,64 @@
<div v-for="(item,index) in commonReportTableInfo.components">
<div class="row" v-if="item.conditions && item.conditions.length>0">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>查询条件</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-3" v-for="(conditionItem,conditionIndex) in item.conditions">
<div class="form-group">
<input type="text" :placeholder="conditionItem.holdpace"
v-model="conditionItem.value" class=" form-control">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryReportTableMethod(item)">
<i class="fa fa-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>{{item.componentName}}</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center" v-for="(itemTh,indexTh) in item.th"> {{itemTh}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(itemData,indexData) in item.data" >
<td class="text-center" v-for="(itemTd,key) of itemData">
{{itemData[key]}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/paginationPlus" namespace="commonReportTable"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,109 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
commonReportTableInfo: {
components: [],
total: 0,
records: 1,
customId: ''
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('commonReportTable', 'witch', function (_value) {
$that.commonReportTableInfo.customId = _value.customId;
$that._listReportCustomTableComponent();
})
vc.on('commonReportTable', 'paginationPlus', 'page_event', function (_currentPage) {
vc.component._listOaWorkflowPools(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_queryReportTableMethod: function (data) {
},
_listReportCustomTableComponent: function () {
var param = {
params: {
page: 1,
row: 50,
customId: $that.commonReportTableInfo.customId,
componentType: '1001'
}
};
//发送get请求
vc.http.apiGet('/reportCustomComponentRel.listReportCustomComponentRel',
param,
function (json, res) {
let _reportCustomComponentRelManageInfo = JSON.parse(json);
$that.commonReportTableInfo.components = _reportCustomComponentRelManageInfo.data;
$that.commonReportTableInfo.components.forEach(item => {
$that._listReportCustomTableConditions(item);
$that._listReportCustomTableDatas(1, 15, item);
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_listReportCustomTableConditions: function (_component) {
let param = {
params: {
page: 1,
row: 50,
componentId: _component.componentId
}
};
//发送get请求
vc.http.apiGet('/reportCustomComponentCondition.listReportCustomComponentCondition',
param,
function (json, res) {
let _componentConditionManageInfo = JSON.parse(json);
_component.conditions = _componentConditionManageInfo.data;
$that.$forceUpdate();
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_listReportCustomTableDatas: function (_page, _row, _component) {
let param = {
params: {
page: _page,
row: _row,
componentId: _component.componentId
}
};
//发送get请求
vc.http.apiGet('/reportCustomComponent.listReportCustomComponentData',
param,
function (json, res) {
let _componentDataManageInfo = JSON.parse(json);
if (_componentDataManageInfo.code != 0) {
vc.toast(_componentDataManageInfo.msg);
return;
}
let _data = _componentDataManageInfo.data;
_component.th = _data.th;
_component.data = _data.td;
vc.emit('commonReportTable', 'pagination', 'init', {
total: _componentDataManageInfo.records,
currentPage: _page
});
$that.$forceUpdate();
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
}
}
});
})(window.vc);

View File

@ -5,6 +5,10 @@
<div class="ibox-title">
<h5>{{reportCustomComponentRelManageInfo.title}}组件</h5>
<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"
v-on:click="_openAddReportCustomComponentRelModal()">
<i class="glyphicon glyphicon-plus"></i>
@ -17,7 +21,7 @@
<thead>
<tr>
<th class="text-center">关系编号</th>
<th class="text-center">组件ID</th>
<th class="text-center">组件</th>
<th class="text-center">报表编号</th>
<th class="text-center">组件序号</th>
<th class="text-center">关联时间</th>

View File

@ -73,6 +73,9 @@
_queryReportCustomComponentRelMethod: function () {
vc.component._listReportCustomComponentRels(DEFAULT_PAGE, DEFAULT_ROWS);
},
_goBack: function () {
vc.goBack();
},
_moreCondition: function () {
if (vc.component.reportCustomComponentRelManageInfo.moreCondition) {
vc.component.reportCustomComponentRelManageInfo.moreCondition = false;

View File

@ -0,0 +1,19 @@
<div>
<div class="row">
<div class="col-md-2">
<div class="margin-xs-r bg-white treeview">
<ul class="list-group text-center">
<li class="list-group-item node-orgTree " v-for="(item,index) in commonReportInfo.reportCustoms"
:class="{'vc-node-selected':commonReportInfo.switchValue==item.customId}" @click="swatch(item)">
{{item.title}}
</li>
</ul>
</div>
</div>
<div class="col-md-10 ">
<div>
<vc:create path="property/commonReportTable"></vc:create>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,59 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 100;
vc.extends({
data: {
commonReportInfo: {
groupId: '',
switchValue: '',
reportCustoms: []
}
},
_initMethod: function () {
$that.commonReportInfo.groupId = vc.getParam('groupId');
$that._loadReportCustom();
},
_initEvent: function () {
vc.on('newOaWorkflow', 'listNewOaWorkflow', function (_param) {
vc.component._listNewOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('newOaWorkflow', 'switch', function (_switchValue) {
$that.swatch(_switchValue);
})
},
methods: {
swatch: function (_value) {
$that.commonReportInfo.switchValue = _value.customId;
vc.emit('commonReportTable', 'witch', {
customId: _value.customId
})
},
_loadReportCustom: function () {
let param = {
params: {
page: 1,
row: 50,
groupId: $that.commonReportInfo.groupId
}
};
//发送get请求
vc.http.apiGet('/reportCustom.listReportCustom',
param,
function (json, res) {
let _reportCustomManageInfo = JSON.parse(json);
$that.commonReportInfo.reportCustoms = _reportCustomManageInfo.data;
if (_reportCustomManageInfo.data.length > 0) {
$that.swatch(_reportCustomManageInfo.data[0]);
}
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
}
});
})(window.vc);