优化代码

This commit is contained in:
1098226878 2021-08-09 14:24:38 +08:00
parent 784eae59b5
commit faa4b2e708
2 changed files with 31 additions and 5 deletions

View File

@ -16,11 +16,14 @@
v-model="reportInfoAnswerValueManageInfo.conditions.userName" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请输入项目名称"
v-model="reportInfoAnswerValueManageInfo.conditions.repName" class=" form-control">
</div>
<div class="col-sm-4">
<select class="custom-select"
v-model="reportInfoAnswerValueManageInfo.conditions.repName">
<option selected value="">请输入项目名称</option>
<option v-for="(item,index) in reportInfoAnswerValueManageInfo.reportInfoSettings" :key="index"
:value="item.name">{{item.name}}
</option>
</select>
</div>
<div class="col-sm-4">
<div class="form-group">

View File

@ -9,6 +9,7 @@
reportInfoAnswerValueManageInfo: {
values: [],
total: 0,
reportInfoSettings:[],
records: 1,
moreCondition: false,
titleId: '',
@ -24,6 +25,7 @@
},
_initMethod: function () {
vc.component._listQuestionAnswerTitles(DEFAULT_PAGE, DEFAULT_ROWS);
vc.component._listReportInfoSettings(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('pagination', 'page_event', function (_currentPage) {
@ -57,6 +59,27 @@
}
);
},
_listReportInfoSettings: function (_page, _rows) {
var param = {
params: {
page: _page,
row: _rows,
communityId:vc.getCurrentCommunity().communityId
}
};
vc.http.apiGet('/reportInfoSetting/queryReportInfoSetting',
param,
function (json, res) {
var _reportInfoSettingManageInfo = JSON.parse(json);
vc.component.reportInfoAnswerValueManageInfo.total = _reportInfoSettingManageInfo.total;
vc.component.reportInfoAnswerValueManageInfo.records = _reportInfoSettingManageInfo.records;
vc.component.reportInfoAnswerValueManageInfo.reportInfoSettings = _reportInfoSettingManageInfo.data;
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_queryReportInfoAnswerValueMethod: function(){
vc.component._listQuestionAnswerTitles(DEFAULT_PAGE, DEFAULT_ROWS);
},