mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
add examine
This commit is contained in:
parent
610d293912
commit
7d60affa8f
@ -0,0 +1,56 @@
|
||||
<div id="addExamineProjectModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span><vc:i18n name="添加" namespace="addExamineProject"></vc:i18n></span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='项目名称' namespace='addExamineProject'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addExamineProjectInfo.name" type="text" :placeholder="vc.i18n('必填,请填写项目名称','addExamineProject')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='岗位' namespace='addExamineProject'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addExamineProjectInfo.postCd">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择岗位','addExamineProject')}}</option>
|
||||
<option value="9999">{{vc.i18n('通用岗位','addExamineProject')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='比重' namespace='addExamineProject'></vc:i18n></span></label>
|
||||
<div class="col-sm-8">
|
||||
<input v-model="addExamineProjectInfo.weight" type="text" :placeholder="vc.i18n('必填,请填写比重','addExamineProject')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label">%</label>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name='状态' namespace='addExamineProject'></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addExamineProjectInfo.state">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择状态','addExamineProject')}}</option>
|
||||
<option value="Y">{{vc.i18n('启用','addExamineProject')}}</option>
|
||||
<option value="N">{{vc.i18n('停用','addExamineProject')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveExamineProjectInfo()"><i class="fa fa-check"></i>
|
||||
<span><vc:i18n name="保存"></vc:i18n></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">
|
||||
<span><vc:i18n name="取消"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
139
public/components/examine/addExamineProject/addExamineProject.js
Normal file
139
public/components/examine/addExamineProject/addExamineProject.js
Normal file
@ -0,0 +1,139 @@
|
||||
(function(vc){
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener:vc.propTypes.string, //父组件名称
|
||||
callBackFunction:vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data:{
|
||||
addExamineProjectInfo:{
|
||||
projectId:'',
|
||||
name:'',
|
||||
postCd:'',
|
||||
weight:'',
|
||||
state:'',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('addExamineProject','openAddExamineProjectModal',function(){
|
||||
$('#addExamineProjectModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
addExamineProjectValidate(){
|
||||
return vc.validate.validate({
|
||||
addExamineProjectInfo:vc.component.addExamineProjectInfo
|
||||
},{
|
||||
'addExamineProjectInfo.name':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"项目名称不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"64",
|
||||
errInfo:"项目名称不能超过64"
|
||||
},
|
||||
],
|
||||
'addExamineProjectInfo.postCd':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"岗位不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"30",
|
||||
errInfo:"岗位编号不能超过30"
|
||||
},
|
||||
],
|
||||
'addExamineProjectInfo.weight':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"比重不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"12",
|
||||
errInfo:"比重不能超过12"
|
||||
},
|
||||
],
|
||||
'addExamineProjectInfo.state':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"状态不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"12",
|
||||
errInfo:"状态不能超过12"
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
saveExamineProjectInfo:function(){
|
||||
if(!vc.component.addExamineProjectValidate()){
|
||||
vc.toast(vc.validate.errInfo);
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
vc.component.addExamineProjectInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//不提交数据将数据 回调给侦听处理
|
||||
if(vc.notNull($props.callBackListener)){
|
||||
vc.emit($props.callBackListener,$props.callBackFunction,vc.component.addExamineProjectInfo);
|
||||
$('#addExamineProjectModel').modal('hide');
|
||||
return ;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'examineProject.saveExamineProject',
|
||||
JSON.stringify(vc.component.addExamineProjectInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addExamineProjectModel').modal('hide');
|
||||
vc.component.clearAddExamineProjectInfo();
|
||||
vc.emit('examineProjectManage','listExamineProject',{});
|
||||
|
||||
return ;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
|
||||
},
|
||||
function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
clearAddExamineProjectInfo:function(){
|
||||
vc.component.addExamineProjectInfo = {
|
||||
name:'',
|
||||
postCd:'',
|
||||
weight:'',
|
||||
state:'',
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -0,0 +1,19 @@
|
||||
<div class="modal fade" id="deleteExamineProjectModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel"> <span><vc:i18n name="请确认您的操作!"></vc:i18n></span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<tr align="center"><th><span><vc:i18n name="确定删除考核项目" namespace="deleteExamineProject"></vc:i18n></span></th></tr>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteExamineProjectModel()"><span><vc:i18n name="点错了"></vc:i18n></span></button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="deleteExamineProject()"><span><vc:i18n name="确认删除!"></vc:i18n></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,52 @@
|
||||
(function(vc,vm){
|
||||
|
||||
vc.extends({
|
||||
data:{
|
||||
deleteExamineProjectInfo:{
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('deleteExamineProject','openDeleteExamineProjectModal',function(_params){
|
||||
|
||||
vc.component.deleteExamineProjectInfo = _params;
|
||||
$('#deleteExamineProjectModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
deleteExamineProject:function(){
|
||||
vc.component.deleteExamineProjectInfo.communityId=vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'examineProject.deleteExamineProject',
|
||||
JSON.stringify(vc.component.deleteExamineProjectInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteExamineProjectModel').modal('hide');
|
||||
vc.emit('examineProjectManage','listExamineProject',{});
|
||||
return ;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
vc.message(json);
|
||||
|
||||
});
|
||||
},
|
||||
closeDeleteExamineProjectModel:function(){
|
||||
$('#deleteExamineProjectModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc,window.vc.component);
|
||||
@ -0,0 +1,52 @@
|
||||
<div id="editExamineProjectModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span><vc:i18n name="修改考核项目" namespace="editExamineProject"></vc:i18n></span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<span><vc:i18n name='项目名称' namespace='editExamineProject'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editExamineProjectInfo.name" type="text" :placeholder="vc.i18n('必填,请填写项目名称','editExamineProject')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<span><vc:i18n name='岗位' namespace='editExamineProject'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editExamineProjectInfo.postCd">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择岗位' ,'editExamineProject')}}</option>
|
||||
<option value="9999">{{vc.i18n('通用岗位' ,'editExamineProject')}} </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<span><vc:i18n name='比重' namespace='editExamineProject'></vc:i18n></span> </label>
|
||||
<div class="col-sm-8">
|
||||
<input v-model="editExamineProjectInfo.weight" type="text" :placeholder="vc.i18n('必填,请填写比重','editExamineProject')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label">%</label>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<span><vc:i18n name='状态' namespace='editExamineProject'></vc:i18n></span> </label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editExamineProjectInfo.state">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择状态' ,'editExamineProject')}}</option>
|
||||
<option value="Y">{{vc.i18n('启用' ,'editExamineProject')}} </option>
|
||||
<option value="N">{{vc.i18n('停用' ,'editExamineProject')}} </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="editExamineProject()"><i class="fa fa-check"></i> <span><vc:i18n name="保存"></vc:i18n></span></button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal"><span><vc:i18n name="取消"></vc:i18n></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,123 @@
|
||||
(function(vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
editExamineProjectInfo: {
|
||||
projectId: '',
|
||||
name: '',
|
||||
postCd: '',
|
||||
weight: '',
|
||||
state: '',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function() {
|
||||
|
||||
},
|
||||
_initEvent: function() {
|
||||
vc.on('editExamineProject', 'openEditExamineProjectModal', function(_params) {
|
||||
vc.component.refreshEditExamineProjectInfo();
|
||||
$('#editExamineProjectModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editExamineProjectInfo);
|
||||
vc.component.editExamineProjectInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
editExamineProjectValidate: function() {
|
||||
return vc.validate.validate({
|
||||
editExamineProjectInfo: vc.component.editExamineProjectInfo
|
||||
}, {
|
||||
'editExamineProjectInfo.name': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "项目名称不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "64",
|
||||
errInfo: "项目名称不能超过64"
|
||||
},
|
||||
],
|
||||
'editExamineProjectInfo.postCd': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "岗位不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "30",
|
||||
errInfo: "岗位编号不能超过30"
|
||||
},
|
||||
],
|
||||
'editExamineProjectInfo.weight': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "比重不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "12",
|
||||
errInfo: "比重不能超过12"
|
||||
},
|
||||
],
|
||||
'editExamineProjectInfo.state': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "状态不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "12",
|
||||
errInfo: "状态不能超过12"
|
||||
},
|
||||
],
|
||||
'editExamineProjectInfo.projectId': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "编号不能为空"
|
||||
}]
|
||||
|
||||
});
|
||||
},
|
||||
editExamineProject: function() {
|
||||
if (!vc.component.editExamineProjectValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/examine.updateExamineProject',
|
||||
JSON.stringify(vc.component.editExamineProjectInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#editExamineProjectModel').modal('hide');
|
||||
vc.emit('examineProjectManage', 'listExamineProject', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
});
|
||||
},
|
||||
refreshEditExamineProjectInfo: function() {
|
||||
vc.component.editExamineProjectInfo = {
|
||||
projectId: '',
|
||||
name: '',
|
||||
postCd: '',
|
||||
weight: '',
|
||||
state: '',
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -0,0 +1,99 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5><span><vc:i18n name="查询条件"></vc:i18n></span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择项目名称','examineProjectManage')" v-model="examineProjectManageInfo.conditions.name" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择岗位','examineProjectManage')" v-model="examineProjectManageInfo.conditions.post" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select" v-model="examineProjectManageInfo.conditions.state">
|
||||
<option selected disabled value="">{{vc.i18n('请选择状态','examineProjectManage')}}</option>
|
||||
<option value="Y">{{vc.i18n('启用','examineProjectManage')}}</option>
|
||||
<option value="N">{{vc.i18n('停用','examineProjectManage')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryExamineProjectMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span><vc:i18n name="查询"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5><span><vc:i18n name="考核项目" namespace="examineProjectManage"></vc:i18n></span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddExamineProjectModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
<span><vc:i18n name="添加" namespace="examineProjectManage"></vc:i18n></span>
|
||||
</button>
|
||||
</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"><span><vc:i18n name='项目名称' namespace='examineProjectManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='岗位' namespace='examineProjectManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='比重' namespace='examineProjectManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='状态' namespace='examineProjectManage'></vc:i18n></span></th>
|
||||
<th class="text-center"><span><vc:i18n name='操作'></vc:i18n></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="examineProject in examineProjectManageInfo.examineProjects">
|
||||
<td class="text-center">{{examineProject.name}}</td>
|
||||
<td class="text-center">{{examineProject.post}}</td>
|
||||
<td class="text-center">{{examineProject.weight}}</td>
|
||||
<td class="text-center">{{examineProject.state == 'Y'?'启用':'停用'}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openEditExamineProjectModel(examineProject)"><span><vc:i18n name='修改'></vc:i18n></span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openDeleteExamineProjectModel(examineProject)"><span><vc:i18n name='删除'></vc:i18n></span></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="examine/addExamineProject" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="examine/editExamineProject"></vc:create>
|
||||
<vc:create path="examine/deleteExamineProject"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -0,0 +1,86 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function(vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
examineProjectManageInfo: {
|
||||
examineProjects: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
projectId: '',
|
||||
conditions: {
|
||||
name: '',
|
||||
post: '',
|
||||
state: '',
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function() {
|
||||
vc.component._listExamineProjects(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function() {
|
||||
|
||||
vc.on('examineProjectManage', 'listExamineProject', function(_param) {
|
||||
vc.component._listExamineProjects(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
vc.component._listExamineProjects(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listExamineProjects: function(_page, _rows) {
|
||||
|
||||
vc.component.examineProjectManageInfo.conditions.page = _page;
|
||||
vc.component.examineProjectManageInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: vc.component.examineProjectManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/examine.listExamineProject',
|
||||
param,
|
||||
function(json, res) {
|
||||
var _examineProjectManageInfo = JSON.parse(json);
|
||||
vc.component.examineProjectManageInfo.total = _examineProjectManageInfo.total;
|
||||
vc.component.examineProjectManageInfo.records = _examineProjectManageInfo.records;
|
||||
vc.component.examineProjectManageInfo.examineProjects = _examineProjectManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.examineProjectManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddExamineProjectModal: function() {
|
||||
vc.emit('addExamineProject', 'openAddExamineProjectModal', {});
|
||||
},
|
||||
_openEditExamineProjectModel: function(_examineProject) {
|
||||
vc.emit('editExamineProject', 'openEditExamineProjectModal', _examineProject);
|
||||
},
|
||||
_openDeleteExamineProjectModel: function(_examineProject) {
|
||||
vc.emit('deleteExamineProject', 'openDeleteExamineProjectModal', _examineProject);
|
||||
},
|
||||
_queryExamineProjectMethod: function() {
|
||||
vc.component._listExamineProjects(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function() {
|
||||
if (vc.component.examineProjectManageInfo.moreCondition) {
|
||||
vc.component.examineProjectManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.examineProjectManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user