mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 14:17:54 +08:00
staff self
This commit is contained in:
parent
b1e10b30b6
commit
68890e6ef4
@ -61,6 +61,8 @@
|
||||
<th class="text-center">问卷名称</th>
|
||||
<th class="text-center">开始时间</th>
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">得分</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -71,9 +73,13 @@
|
||||
<td class="text-center">{{questionAnswer.qaName}}</td>
|
||||
<td class="text-center">{{questionAnswer.startTime}}</td>
|
||||
<td class="text-center">{{questionAnswer.endTime}}</td>
|
||||
<td class="text-center">{{_getStateName(questionAnswer.state)}}</td>
|
||||
<td class="text-center">{{questionAnswer.score}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
<button class="btn-white btn btn-xs" v-if="questionAnswer.state == '1201'"
|
||||
>已答题</button>
|
||||
<button class="btn-white btn btn-xs" v-else
|
||||
v-on:click="_toQuestionAnswerTitle(questionAnswer)">答题</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
qaType: '',
|
||||
qaName: '',
|
||||
qaId: '',
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
communityId:vc.getCurrentCommunity().communityId,
|
||||
roleCd:'staff'
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -42,7 +43,7 @@
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/questionAnswer/queryQuestionAnswer',
|
||||
vc.http.apiGet('/userQuestionAnswer/queryUserQuestionAnswer',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _myQuestionAnswerManageInfo = JSON.parse(json);
|
||||
@ -59,7 +60,10 @@
|
||||
);
|
||||
},
|
||||
_toQuestionAnswerTitle:function(_questionAnswer){
|
||||
vc.jumpToPage('/admin.html#/pages/property/questionAnswerTitleManage?qaId='+_questionAnswer.qaId+"&objType="+_questionAnswer.objType+"&objId="+_questionAnswer.objId)
|
||||
vc.jumpToPage('/admin.html#/pages/property/userQuestionAnswerManage?qaId='+_questionAnswer.qaId+"&objType="+_questionAnswer.objType+"&objId="+_questionAnswer.objId)
|
||||
},
|
||||
_queryQuestionAnswerMethod: function () {
|
||||
vc.component._listQuestionAnswers(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.myQuestionAnswerManageInfo.moreCondition) {
|
||||
@ -67,6 +71,15 @@
|
||||
} else {
|
||||
vc.component.myQuestionAnswerManageInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_getStateName:function(_state){
|
||||
if(_state == '1201'){
|
||||
return '待领导评价';
|
||||
}else if(_state == '1202'){
|
||||
return '完成';
|
||||
}
|
||||
|
||||
return '待答题'
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<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 v-for="(item,index) in userQuestionAnswerManageInfo.questionAnswerTitles">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-12 col-form-label">{{index+1}}、{{item.qaTitle}}</label>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-12" v-if="item.titleType == '3003'">
|
||||
<textarea v-model="item.valueContent" placeholder="必填,请填写"
|
||||
class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-12" v-else-if="item.titleType == '1001'">
|
||||
<div class="checkbox custom-control-inline"
|
||||
v-for="(valueItem,valueIndex) in item.questionAnswerTitleValues">
|
||||
<label><input type="radio" :name="item.qaTitle" v-model="item.valueContent"
|
||||
:value="valueItem.valueId">
|
||||
<span
|
||||
class="margin-right-xs margin-left-xs">{{String.fromCharCode(valueIndex+65)}}</span>
|
||||
{{valueItem.qaValue}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12" v-else>
|
||||
<div class="checkbox custom-control-inline"
|
||||
v-for="(valueItem,valueIndex) in item.questionAnswerTitleValues">
|
||||
<label>
|
||||
<input type="checkbox" v-model="item.valueContent" :value="valueItem.valueId">
|
||||
<span
|
||||
class="margin-right-xs margin-left-xs">{{String.fromCharCode(valueIndex+65)}}</span>
|
||||
{{valueItem.qaValue}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="_saveUserQuestionAnswer()"><i
|
||||
class="fa fa-check"></i> 提交
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" v-on:click="_goBack()">返回
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,114 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
userQuestionAnswerManageInfo: {
|
||||
questionAnswerTitles: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
qaId: '',
|
||||
objType: '',
|
||||
objId: '',
|
||||
answerType: '1002'
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
let _that = $that.userQuestionAnswerManageInfo;
|
||||
let _qaId = vc.getParam('qaId');
|
||||
_that.qaId = _qaId;
|
||||
_that.objType = vc.getParam('objType');
|
||||
_that.objId = vc.getParam('objId');
|
||||
vc.component._listQuestionAnswerTitles(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
},
|
||||
methods: {
|
||||
_listQuestionAnswerTitles: function (_page, _rows) {
|
||||
let _that = $that.userQuestionAnswerManageInfo;
|
||||
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 100,
|
||||
qaId: _that.qaId,
|
||||
objType: _that.objType,
|
||||
objId: _that.objId
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/questionAnswer/queryQuestionAnswerTitle',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _userQuestionAnswerManageInfo = JSON.parse(json);
|
||||
_that.questionAnswerTitles = _userQuestionAnswerManageInfo.data;
|
||||
_that.questionAnswerTitles.forEach(item => {
|
||||
|
||||
if (item.titleType == '3003') {
|
||||
item.valueContent = '';
|
||||
} else {
|
||||
item.valueContent = [];
|
||||
}
|
||||
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_toQuestionAnswerTitle: function (_questionAnswer) {
|
||||
vc.jumpToPage('/admin.html#/pages/property/questionAnswerTitleManage?qaId=' + _questionAnswer.qaId + "&objType=" + _questionAnswer.objType + "&objId=" + _questionAnswer.objId)
|
||||
},
|
||||
_queryQuestionAnswerMethod: function () {
|
||||
vc.component._listQuestionAnswers(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.userQuestionAnswerManageInfo.moreCondition) {
|
||||
vc.component.userQuestionAnswerManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.userQuestionAnswerManageInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_getStateName: function (_state) {
|
||||
if (_state == '1201') {
|
||||
return '待领导评价';
|
||||
} else if (_state == '1202') {
|
||||
return '完成';
|
||||
}
|
||||
|
||||
return '待答题'
|
||||
},
|
||||
_goBack: function () {
|
||||
vc.goBack();
|
||||
},
|
||||
_saveUserQuestionAnswer: function () {
|
||||
vc.http.apiPost(
|
||||
'/userQuestionAnswer/saveUserQuestionAnswerValue',
|
||||
JSON.stringify(vc.component.userQuestionAnswerManageInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let data = JSON.parse(json);
|
||||
if (data.code != 0) {
|
||||
vc.toast(data.msg);
|
||||
return;
|
||||
}
|
||||
$that._goBack();
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user