mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
e7aca776f3
commit
aa6c5108af
@ -11,13 +11,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
_initMethod: function () {
|
_initMethod: function () {
|
||||||
|
$that.newOaWorkflowInfo.switchValue = vc.getParam('switchValue');
|
||||||
|
if ($that.newOaWorkflowInfo.switchValue) {
|
||||||
|
$that.swatch($that.newOaWorkflowInfo.switchValue);
|
||||||
|
return;
|
||||||
|
}
|
||||||
$that.swatch('newOaWorkflowPool');
|
$that.swatch('newOaWorkflowPool');
|
||||||
},
|
},
|
||||||
_initEvent: function () {
|
_initEvent: function () {
|
||||||
vc.on('newOaWorkflow', 'listNewOaWorkflow', function (_param) {
|
vc.on('newOaWorkflow', 'listNewOaWorkflow', function (_param) {
|
||||||
vc.component._listNewOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
|
vc.component._listNewOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
});
|
});
|
||||||
vc.on('newOaWorkflow','switch',function(_switchValue){
|
vc.on('newOaWorkflow', 'switch', function (_switchValue) {
|
||||||
$that.swatch(_switchValue);
|
$that.swatch(_switchValue);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -11,45 +11,51 @@
|
|||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<a class="col-form-label" style="text-decoration:underline;"
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
@click="_toGo('/admin.html#/pages/property/repairDispatchManage')">报修待办(0)</a>
|
@click="_toGo('/admin.html#/pages/property/repairDispatchManage')">报修待办({{newOaWorkflowDoingInfo.repair}})</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<a class="col-form-label" style="text-decoration:underline;"
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
@click="_toGo('/admin.html#/pages/common/myAuditComplaints')">投诉待办(0)</a>
|
@click="_toGo('/admin.html#/pages/common/myAuditComplaints')">投诉待办({{newOaWorkflowDoingInfo.complaint}})</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<a class="col-form-label" style="text-decoration:underline;"
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
@click="_toGo('/admin.html#/pages/admin/myAuditOrders')">采购待办(0)</a>
|
@click="_toGo('/admin.html#/pages/admin/myAuditOrders')">采购待办({{newOaWorkflowDoingInfo.purchase}})</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<a class="col-form-label" style="text-decoration:underline;"
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
@click="_toGo('/admin.html#/pages/admin/myItemOutAuditOrders')">物品领用待办(0)</a>
|
@click="_toGo('/admin.html#/pages/admin/myItemOutAuditOrders')">物品领用待办({{newOaWorkflowDoingInfo.collection}})</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<a class="col-form-label" style="text-decoration:underline;"
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
@click="_toGo('/admin.html#/pages/admin/contractApplyAuditOrders')">合同起草待办(0)</a>
|
@click="_toGo('/admin.html#/pages/admin/contractApplyAuditOrders')">合同起草待办({{newOaWorkflowDoingInfo.contractApply}})</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<a class="col-form-label" style="text-decoration:underline;"
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
@click="_toGo('/admin.html#/pages/admin/contractChangeAuditOrders')">合同变更待办(0)</a>
|
@click="_toGo('/admin.html#/pages/admin/contractChangeAuditOrders')">合同变更待办({{newOaWorkflowDoingInfo.contractChange}})</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row margin-top">
|
<div class="row ">
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2 margin-top">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<a class="col-form-label" style="text-decoration:underline;"
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
@click="_toGo('/admin.html#/pages/admin/allocationStorehouseAuditOrders')">调拨待办(0)</a>
|
@click="_toGo('/admin.html#/pages/admin/allocationStorehouseAuditOrders')">调拨待办({{newOaWorkflowDoingInfo.allocation}})</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-2 margin-top" v-for="(item,index) in newOaWorkflowDoingInfo.newOaWorkflows">
|
||||||
|
<div class="form-group text-center">
|
||||||
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
|
@click="_toGoA(item)">{{item.flowName}}待办(0)</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -104,13 +110,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row margin-top">
|
<div class="row ">
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2 margin-top">
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<a class="col-form-label" style="text-decoration:underline;"
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
@click="_toGo('/admin.html#/pages/admin/allocationStorehouseHistoryAuditOrders')">物品调拨已办</a>
|
@click="_toGo('/admin.html#/pages/admin/allocationStorehouseHistoryAuditOrders')">物品调拨已办</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-2 margin-top" v-for="(item,index) in newOaWorkflowDoingInfo.newOaWorkflows">
|
||||||
|
<div class="form-group text-center">
|
||||||
|
<a class="col-form-label" style="text-decoration:underline;"
|
||||||
|
@click="_toGoB(item)">{{item.flowName}}已办</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,42 +6,78 @@
|
|||||||
var DEFAULT_ROWS = 100;
|
var DEFAULT_ROWS = 100;
|
||||||
vc.extends({
|
vc.extends({
|
||||||
data: {
|
data: {
|
||||||
newOaWorkflowManageInfo: {
|
newOaWorkflowDoingInfo: {
|
||||||
newOaWorkflows: [],
|
newOaWorkflows: [],
|
||||||
conditions: {
|
conditions: {
|
||||||
state: 'C'
|
state: 'C'
|
||||||
}
|
},
|
||||||
|
repair: 0,
|
||||||
|
complaint: 0,
|
||||||
|
purchase: 0,
|
||||||
|
collection: 0,
|
||||||
|
contractApply: 0,
|
||||||
|
contractChange: 0,
|
||||||
|
allocation: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_initMethod: function () {
|
_initMethod: function () {
|
||||||
vc.component._listNewOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
|
vc.component._listNewOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||||
|
$that._loadUndoInfo();
|
||||||
},
|
},
|
||||||
_initEvent: function () {
|
_initEvent: function () {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
_toGo: function (_url) {
|
||||||
|
vc.jumpToPage(_url);
|
||||||
|
},
|
||||||
|
_toGoA: function (item) {
|
||||||
|
vc.jumpToPage('/form.html#/pages/property/newOaWorkflow?flowId=' + item.flowId + "&switchValue=newOaWorkflowUndo");
|
||||||
|
},
|
||||||
|
_toGoB: function (item) {
|
||||||
|
vc.jumpToPage('/form.html#/pages/property/newOaWorkflow?flowId=' + item.flowId + "&switchValue=newOaWorkflowFinish");
|
||||||
|
},
|
||||||
_listNewOaWorkflows: function (_page, _rows) {
|
_listNewOaWorkflows: function (_page, _rows) {
|
||||||
|
|
||||||
vc.component.newOaWorkflowManageInfo.conditions.page = _page;
|
|
||||||
vc.component.newOaWorkflowManageInfo.conditions.row = _rows;
|
|
||||||
var param = {
|
var param = {
|
||||||
params: vc.component.newOaWorkflowManageInfo.conditions
|
params: {
|
||||||
|
state: 'C',
|
||||||
|
page: 1,
|
||||||
|
row: 100
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//发送get请求
|
//发送get请求
|
||||||
vc.http.apiGet('/oaWorkflow/queryOaWorkflow',
|
vc.http.apiGet('/oaWorkflow/queryOaWorkflow',
|
||||||
param,
|
param,
|
||||||
function (json, res) {
|
function (json, res) {
|
||||||
var _newOaWorkflowManageInfo = JSON.parse(json);
|
var _newOaWorkflowDoingInfo = JSON.parse(json);
|
||||||
$that.newOaWorkflowManageInfo.newOaWorkflows = _newOaWorkflowManageInfo.data;
|
$that.newOaWorkflowDoingInfo.newOaWorkflows = _newOaWorkflowDoingInfo.data;
|
||||||
}, function (errInfo, error) {
|
}, function (errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
_toGo:function(_url){
|
_loadUndoInfo: function () {
|
||||||
vc.jumpToPage(_url);
|
var param = {
|
||||||
|
params: {
|
||||||
|
communityId: vc.getCurrentCommunity().communityId,
|
||||||
|
page: 1,
|
||||||
|
row: 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
vc.http.get(
|
||||||
|
'undo',
|
||||||
|
'list',
|
||||||
|
param,
|
||||||
|
function (json, res) {
|
||||||
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||||
|
let _json = JSON.parse(json).data;
|
||||||
|
vc.copyObject(_json,$that.newOaWorkflowDoingInfo);
|
||||||
|
},
|
||||||
|
function (errInfo, error) {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
})(window.vc);
|
})(window.vc);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user