mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 14:17:54 +08:00
优化底阿妈
This commit is contained in:
parent
1a133879a1
commit
7c5fbf48ba
43
public/components/property/questionValue/questionValue.html
Normal file
43
public/components/property/questionValue/questionValue.html
Normal file
@ -0,0 +1,43 @@
|
||||
<div id="questionValueModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="questionValueModelLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" id="questionValueModelLabel">问卷结果</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class=" row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="table-responsive" style="margin-top:15px">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选项内容</th>
|
||||
<th>选择人数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="value in questionValueInfo.values">
|
||||
<td>
|
||||
{{value.roomId}}
|
||||
</td>
|
||||
<td>
|
||||
{{value.floorNum}}号楼
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<vc:create namespace="questionValue" path="frame/paginationPlus"></vc:create>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
60
public/components/property/questionValue/questionValue.js
Normal file
60
public/components/property/questionValue/questionValue.js
Normal file
@ -0,0 +1,60 @@
|
||||
(function(vc){
|
||||
vc.extends({
|
||||
data:{
|
||||
questionValueInfo:{
|
||||
values:[],
|
||||
titleId:'',
|
||||
objType:'',
|
||||
objId:''
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('questionValue','openQuestionValueModel',function(_param){
|
||||
$that.questionValueInfo.titleId = _param.titleId;
|
||||
$that.questionValueInfo.objType = _param.objType;
|
||||
$that.questionValueInfo.objId = _param.objId;
|
||||
$('#questionValueModel').modal('show');
|
||||
vc.component._loadAllValueInfo(1,10);
|
||||
});
|
||||
vc.on('questionValue','paginationPlus', 'page_event', function (_currentPage) {
|
||||
vc.component._loadAllValueInfo(_currentPage, 15,vc.component.questionValueInfo._currentRoomNum);
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
_loadAllValueInfo:function(_page,_row,_roomNum){
|
||||
|
||||
var param = {
|
||||
params:{
|
||||
page:_page,
|
||||
row:_row,
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('questionValue',
|
||||
'listRoom',
|
||||
param,
|
||||
function(json){
|
||||
var _roomInfo = JSON.parse(json);
|
||||
vc.component.questionValueInfo.values = _roomInfo.rooms;
|
||||
vc.emit('questionValue','paginationPlus', 'init', {
|
||||
total: _roomInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
},function(){
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
questionValues:function(){
|
||||
vc.component._loadAllRoomInfo(1,15,vc.component.questionValueInfo._currentRoomNum);
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
})(window.vc);
|
||||
@ -79,6 +79,10 @@
|
||||
<td class="text-center">{{questionAnswerTitle.qaTitle}}</td>
|
||||
<td class="text-center">{{questionAnswerTitle.seq}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openQuestionValueModel(questionAnswerTitle)">结果</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditQuestionAnswerTitleModel(questionAnswerTitle)">修改</button>
|
||||
@ -111,5 +115,6 @@
|
||||
<vc:create path="property/addQuestionAnswerTitle" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="property/editQuestionAnswerTitle"></vc:create>
|
||||
<vc:create path="property/deleteQuestionAnswerTitle"></vc:create>
|
||||
<vc:create path="property/questionValue"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -101,6 +101,9 @@
|
||||
}else{
|
||||
return '简答';
|
||||
}
|
||||
},
|
||||
_openQuestionValueModel:function(_questionAnswerTitle){
|
||||
vc.emit('questionValue','openQuestionValueModel',_questionAnswerTitle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user