mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
优化疫情管控
This commit is contained in:
parent
62536c6423
commit
d0bcc34d5c
@ -0,0 +1,61 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<select class="custom-select"
|
||||
v-model="userQuestionAnswerManageInfo.settingId" @change="_listQuestionAnswerTitles()">
|
||||
<option selected value="">请选择登记项目</option>
|
||||
<option v-for="(item,index) in userQuestionAnswerManageInfo.reportInfoSettings" :key="index"
|
||||
:value="item.settingId">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
<div class="ibox-tools" style="top:10px;"></div>
|
||||
</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.title}}</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.reportInfoSettingTitleValueDtos">
|
||||
<label><input type="radio" :name="item.title" 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.reportInfoSettingTitleValueDtos">
|
||||
<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,136 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
userQuestionAnswerManageInfo: {
|
||||
questionAnswerTitles: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
reportInfoSettings: [],
|
||||
settingId:''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that._listReportInfoSettings(1,50);
|
||||
/**let _that = $that.userQuestionAnswerManageInfo;
|
||||
let _qaId = vc.getParam('qaId');
|
||||
_that.qaId = _qaId;
|
||||
_that.objType = vc.getParam('objType');
|
||||
_that.objId = vc.getParam('objId');
|
||||
_that.answerType = vc.getParam('answerType');
|
||||
_that.userQaId = vc.getParam('userQaId');
|
||||
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,
|
||||
settingId: _that.settingId,
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/reportInfoSettingTitle/querySettingTitle',
|
||||
param,
|
||||
function (json, res) {
|
||||
_that.questionAnswerTitles=[];
|
||||
let _userQuestionAnswerManageInfo = JSON.parse(json);
|
||||
_that.questionAnswerTitles = _userQuestionAnswerManageInfo.data;
|
||||
console.log(_that.questionAnswerTitles);
|
||||
_that.questionAnswerTitles.forEach(item => {
|
||||
|
||||
if (item.titleType == '3003') {
|
||||
item.valueContent = '';
|
||||
} else {
|
||||
item.valueContent = [];
|
||||
}
|
||||
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_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.userQuestionAnswerManageInfo.total = _reportInfoSettingManageInfo.total;
|
||||
vc.component.userQuestionAnswerManageInfo.records = _reportInfoSettingManageInfo.records;
|
||||
vc.component.userQuestionAnswerManageInfo.reportInfoSettings = _reportInfoSettingManageInfo.data;
|
||||
}, 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);
|
||||
@ -55,7 +55,13 @@
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>疫情上报</h5>
|
||||
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_toQuestionAnswerTitle()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
疫情登记
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
|
||||
@ -80,6 +80,16 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_toQuestionAnswerTitle: function (_questionAnswer) {
|
||||
/**let now = new Date().getTime();
|
||||
let start = new Date(_questionAnswer.startTime.replace(/-/g,'/')).getTime();
|
||||
let end = new Date(_questionAnswer.endTime.replace(/-/g,'/')).getTime();
|
||||
if(now < start || now > end){
|
||||
vc.toast('不在开放时段内!');
|
||||
return;
|
||||
}**/
|
||||
vc.jumpToPage('/admin.html#/pages/property/reportInfoAnswerManage')
|
||||
},
|
||||
_queryReportInfoAnswerValueMethod: function(){
|
||||
vc.component._listQuestionAnswerTitles(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user