mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
加入流程实例
This commit is contained in:
parent
f35d4fd026
commit
67858c82c4
46
public/components/property/addOaWorkflow/addOaWorkflow.html
Normal file
46
public/components/property/addOaWorkflow/addOaWorkflow.html
Normal file
@ -0,0 +1,46 @@
|
||||
<div id="addOaWorkflowModel" class="modal fade" tabindex="-1" 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 ">新建流程</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">流程名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addOaWorkflowInfo.flowName" type="text" placeholder="必填,请填写流程名称"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">流程类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addOaWorkflowInfo.flowType">
|
||||
<option selected disabled value="">必填,请选择流程类型</option>
|
||||
<option value="1001">普通流程</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model="addOaWorkflowInfo.describle" placeholder="选填,请填写备注"
|
||||
class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="saveOaWorkflowInfo()"><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
119
public/components/property/addOaWorkflow/addOaWorkflow.js
Normal file
119
public/components/property/addOaWorkflow/addOaWorkflow.js
Normal file
@ -0,0 +1,119 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data: {
|
||||
addOaWorkflowInfo: {
|
||||
flowId: '',
|
||||
flowName: '',
|
||||
flowType: '',
|
||||
describle: '',
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addOaWorkflow', 'openAddOaWorkflowModal', function () {
|
||||
$('#addOaWorkflowModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
addOaWorkflowValidate() {
|
||||
return vc.validate.validate({
|
||||
addOaWorkflowInfo: vc.component.addOaWorkflowInfo
|
||||
}, {
|
||||
'addOaWorkflowInfo.flowName': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "流程名称不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "64",
|
||||
errInfo: "流程名称超过64位"
|
||||
},
|
||||
],
|
||||
'addOaWorkflowInfo.flowType': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "流程类型不能为空"
|
||||
},
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "12",
|
||||
errInfo: "流程类型不能为空"
|
||||
},
|
||||
],
|
||||
'addOaWorkflowInfo.describle': [
|
||||
{
|
||||
limit: "maxLength",
|
||||
param: "200",
|
||||
errInfo: "备注内容不能超过200"
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
saveOaWorkflowInfo: function () {
|
||||
if (!vc.component.addOaWorkflowValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
vc.component.addOaWorkflowInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//不提交数据将数据 回调给侦听处理
|
||||
if (vc.notNull($props.callBackListener)) {
|
||||
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addOaWorkflowInfo);
|
||||
$('#addOaWorkflowModel').modal('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'oaWorkflow.saveOaWorkflow',
|
||||
JSON.stringify(vc.component.addOaWorkflowInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addOaWorkflowModel').modal('hide');
|
||||
vc.component.clearAddOaWorkflowInfo();
|
||||
vc.emit('oaWorkflowManage', 'listOaWorkflow', {});
|
||||
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
clearAddOaWorkflowInfo: function () {
|
||||
vc.component.addOaWorkflowInfo = {
|
||||
flowName: '',
|
||||
flowType: '',
|
||||
describle: '',
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -0,0 +1,60 @@
|
||||
<div id = "chooseOaWorkflowModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="chooseOaWorkflowModelLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" id="chooseOaWorkflowModelLabel">选择流程实例</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="row">
|
||||
|
||||
<div class="col-sm-7 m-b-xs">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<div class="input-group">
|
||||
<input placeholder="输入流程实例名称" type="text" v-model="chooseOaWorkflowInfo._currentOaWorkflowName" class="form-control form-control-sm">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-sm btn-primary" v-on:click="queryOaWorkflows()">查询</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive" style="margin-top:15px">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">工作流ID</th>
|
||||
<th class="text-center">流程名称</th>
|
||||
<th class="text-center">流程类型</th>
|
||||
<th class="text-center">备注</th>
|
||||
<th class="text-center">操作</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="oaWorkflow in chooseOaWorkflowInfo.oaWorkflows">
|
||||
<td class="text-center">{{oaWorkflow.flowId}}</td>
|
||||
<td class="text-center">{{oaWorkflow.flowName}}</td>
|
||||
<td class="text-center">{{oaWorkflow.flowType}}</td>
|
||||
<td class="text-center">{{oaWorkflow.describle}}</td>
|
||||
|
||||
<td>
|
||||
<button class="btn btn-primary btn-xs" v-on:click="chooseOaWorkflow(oaWorkflow)">选择</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,63 @@
|
||||
(function(vc){
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
emitChooseOaWorkflow:vc.propTypes.string,
|
||||
emitLoadData:vc.propTypes.string
|
||||
},
|
||||
data:{
|
||||
chooseOaWorkflowInfo:{
|
||||
oaWorkflows:[],
|
||||
_currentOaWorkflowName:'',
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('chooseOaWorkflow','openChooseOaWorkflowModel',function(_param){
|
||||
$('#chooseOaWorkflowModel').modal('show');
|
||||
vc.component._refreshChooseOaWorkflowInfo();
|
||||
vc.component._loadAllOaWorkflowInfo(1,10,'');
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
_loadAllOaWorkflowInfo:function(_page,_row,_name){
|
||||
var param = {
|
||||
params:{
|
||||
page:_page,
|
||||
row:_row,
|
||||
communityId:vc.getCurrentCommunity().communityId,
|
||||
name:_name
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('oaWorkflow.listOaWorkflows',
|
||||
param,
|
||||
function(json){
|
||||
var _oaWorkflowInfo = JSON.parse(json);
|
||||
vc.component.chooseOaWorkflowInfo.oaWorkflows = _oaWorkflowInfo.oaWorkflows;
|
||||
},function(){
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
chooseOaWorkflow:function(_oaWorkflow){
|
||||
if(_oaWorkflow.hasOwnProperty('name')){
|
||||
_oaWorkflow.oaWorkflowName = _oaWorkflow.name;
|
||||
}
|
||||
vc.emit($props.emitChooseOaWorkflow,'chooseOaWorkflow',_oaWorkflow);
|
||||
vc.emit($props.emitLoadData,'listOaWorkflowData',{
|
||||
oaWorkflowId:_oaWorkflow.oaWorkflowId
|
||||
});
|
||||
$('#chooseOaWorkflowModel').modal('hide');
|
||||
},
|
||||
queryOaWorkflows:function(){
|
||||
vc.component._loadAllOaWorkflowInfo(1,10,vc.component.chooseOaWorkflowInfo._currentOaWorkflowName);
|
||||
},
|
||||
_refreshChooseOaWorkflowInfo:function(){
|
||||
vc.component.chooseOaWorkflowInfo._currentOaWorkflowName = "";
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
})(window.vc);
|
||||
@ -0,0 +1,23 @@
|
||||
<div class="modal fade" id="deleteOaWorkflowModel" 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">请确认您的操作!</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>确定删除流程实例</th>
|
||||
</tr>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal"
|
||||
v-on:click="closeDeleteOaWorkflowModel()">点错了</button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="deleteOaWorkflow()">确认删除</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,52 @@
|
||||
(function (vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
deleteOaWorkflowInfo: {
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('deleteOaWorkflow', 'openDeleteOaWorkflowModal', function (_params) {
|
||||
|
||||
vc.component.deleteOaWorkflowInfo = _params;
|
||||
$('#deleteOaWorkflowModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
deleteOaWorkflow: function () {
|
||||
vc.component.deleteOaWorkflowInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'oaWorkflow.deleteOaWorkflow',
|
||||
JSON.stringify(vc.component.deleteOaWorkflowInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteOaWorkflowModel').modal('hide');
|
||||
vc.emit('oaWorkflowManage', 'listOaWorkflow', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.message(json);
|
||||
|
||||
});
|
||||
},
|
||||
closeDeleteOaWorkflowModel: function () {
|
||||
$('#deleteOaWorkflowModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
@ -0,0 +1,37 @@
|
||||
<div id="editOaWorkflowModel" class="modal fade" tabindex="-1" 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 ">修改流程</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">流程名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editOaWorkflowInfo.flowName" type="text" placeholder="必填,请填写流程名称"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">备注</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editOaWorkflowInfo.describle" type="text" placeholder="选填,请填写备注"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="editOaWorkflow()"><i class="fa fa-check"></i> 保存</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
110
public/components/property/editOaWorkflow/editOaWorkflow.js
Normal file
110
public/components/property/editOaWorkflow/editOaWorkflow.js
Normal file
@ -0,0 +1,110 @@
|
||||
(function(vc,vm){
|
||||
|
||||
vc.extends({
|
||||
data:{
|
||||
editOaWorkflowInfo:{
|
||||
flowId:'',
|
||||
flowName:'',
|
||||
flowType:'',
|
||||
describle:'',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('editOaWorkflow','openEditOaWorkflowModal',function(_params){
|
||||
vc.component.refreshEditOaWorkflowInfo();
|
||||
$('#editOaWorkflowModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editOaWorkflowInfo );
|
||||
vc.component.editOaWorkflowInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
editOaWorkflowValidate:function(){
|
||||
return vc.validate.validate({
|
||||
editOaWorkflowInfo:vc.component.editOaWorkflowInfo
|
||||
},{
|
||||
'editOaWorkflowInfo.flowName':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"流程名称不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"64",
|
||||
errInfo:"流程名称超过64位"
|
||||
},
|
||||
],
|
||||
'editOaWorkflowInfo.flowType':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"流程类型不能为空"
|
||||
},
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"12",
|
||||
errInfo:"流程类型不能为空"
|
||||
},
|
||||
],
|
||||
'editOaWorkflowInfo.describle':[
|
||||
{
|
||||
limit:"maxLength",
|
||||
param:"200",
|
||||
errInfo:"备注内容不能超过200"
|
||||
},
|
||||
],
|
||||
'editOaWorkflowInfo.flowId':[
|
||||
{
|
||||
limit:"required",
|
||||
param:"",
|
||||
errInfo:"工作流ID不能为空"
|
||||
}]
|
||||
|
||||
});
|
||||
},
|
||||
editOaWorkflow:function(){
|
||||
if(!vc.component.editOaWorkflowValidate()){
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return ;
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'oaWorkflow.updateOaWorkflow',
|
||||
JSON.stringify(vc.component.editOaWorkflowInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#editOaWorkflowModel').modal('hide');
|
||||
vc.emit('oaWorkflowManage','listOaWorkflow',{});
|
||||
return ;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
});
|
||||
},
|
||||
refreshEditOaWorkflowInfo:function(){
|
||||
vc.component.editOaWorkflowInfo= {
|
||||
flowId:'',
|
||||
flowName:'',
|
||||
flowType:'',
|
||||
describle:'',
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc,window.vc.component);
|
||||
@ -0,0 +1,50 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>流程实例信息</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" v-if="viewOaWorkflowInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;" v-on:click="_openSelectOaWorkflowInfoModel()">
|
||||
<i class="glyphicon glyphicon-search"></i> 选择流程实例</button>
|
||||
|
||||
<button type="button" v-if="viewOaWorkflowInfo.index != 2" class="btn btn-primary btn-sm" v-on:click="_openAddOaWorkflowInfoModel()">
|
||||
<i class="glyphicon glyphicon-plus"></i> 添加流程实例</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" >流程名称:</label>
|
||||
<label class="">{{viewOaWorkflowInfo.flowName}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" >流程类型:</label>
|
||||
<label class="">{{viewOaWorkflowInfo.flowType}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label" >备注:</label>
|
||||
<label class="">{{viewOaWorkflowInfo.describle}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="property/addOaWorkflow"
|
||||
callBackListener="viewOaWorkflowInfo"
|
||||
callBackFunction="chooseOaWorkflow"
|
||||
></vc:create>
|
||||
|
||||
|
||||
<vc:create path="property/chooseOaWorkflow"
|
||||
emitChooseOaWorkflow="viewOaWorkflowInfo"
|
||||
emitLoadData="viewOaWorkflowInfo"
|
||||
></vc:create>
|
||||
</div>
|
||||
@ -0,0 +1,50 @@
|
||||
/**
|
||||
流程实例 组件
|
||||
**/
|
||||
(function(vc){
|
||||
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener:vc.propTypes.string, //父组件名称
|
||||
callBackFunction:vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data:{
|
||||
viewOaWorkflowInfo:{
|
||||
index:0,
|
||||
flowComponent:'viewOaWorkflowInfo',
|
||||
flowName:'',
|
||||
flowType:'',
|
||||
describle:'',
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
//根据请求参数查询 查询 业主信息
|
||||
vc.component._loadOaWorkflowInfoData();
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('viewOaWorkflowInfo','chooseOaWorkflow',function(_app){
|
||||
vc.copyObject(_app, vc.component.viewOaWorkflowInfo);
|
||||
vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewOaWorkflowInfo);
|
||||
});
|
||||
|
||||
vc.on('viewOaWorkflowInfo', 'onIndex', function(_index){
|
||||
vc.component.viewOaWorkflowInfo.index = _index;
|
||||
});
|
||||
|
||||
},
|
||||
methods:{
|
||||
|
||||
_openSelectOaWorkflowInfoModel(){
|
||||
vc.emit('chooseOaWorkflow','openChooseOaWorkflowModel',{});
|
||||
},
|
||||
_openAddOaWorkflowInfoModel(){
|
||||
vc.emit('addOaWorkflow','openAddOaWorkflowModal',{});
|
||||
},
|
||||
_loadOaWorkflowInfoData:function(){
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
111
public/pages/property/oaWorkflowManage/oaWorkflowManage.html
Normal file
111
public/pages/property/oaWorkflowManage/oaWorkflowManage.html
Normal file
@ -0,0 +1,111 @@
|
||||
<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 class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入流程名称"
|
||||
v-model="oaWorkflowManageInfo.conditions.flowName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入描述"
|
||||
v-model="oaWorkflowManageInfo.conditions.describle" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select" v-model="oaWorkflowManageInfo.conditions.flowType">
|
||||
<option selected value="">请选择流程类型</option>
|
||||
<option value="1001">普通</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryOaWorkflowMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> 查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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;">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddOaWorkflowModal()">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
新建流程
|
||||
</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">工作流ID</th>
|
||||
<th class="text-center">流程名称</th>
|
||||
<th class="text-center">流程类型</th>
|
||||
<th class="text-center">模型ID</th>
|
||||
<th class="text-center">KEY</th>
|
||||
<th class="text-center">创建时间</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="oaWorkflow in oaWorkflowManageInfo.oaWorkflows">
|
||||
<td class="text-center">{{oaWorkflow.flowId}}</td>
|
||||
<td class="text-center">{{oaWorkflow.flowName}}</td>
|
||||
<td class="text-center">{{oaWorkflow.flowType}}</td>
|
||||
<td class="text-center">{{oaWorkflow.modelId}}</td>
|
||||
<td class="text-center">{{oaWorkflow.flowKey}}</td>
|
||||
<td class="text-center">{{oaWorkflow.createTime}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditOaWorkflowModel(oaWorkflow)">修改</button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteOaWorkflowModel(oaWorkflow)">删除</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="property/addOaWorkflow" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="property/editOaWorkflow"></vc:create>
|
||||
<vc:create path="property/deleteOaWorkflow"></vc:create>
|
||||
|
||||
</div>
|
||||
84
public/pages/property/oaWorkflowManage/oaWorkflowManage.js
Normal file
84
public/pages/property/oaWorkflowManage/oaWorkflowManage.js
Normal file
@ -0,0 +1,84 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
oaWorkflowManageInfo: {
|
||||
oaWorkflows: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
flowId: '',
|
||||
conditions: {
|
||||
flowName: '',
|
||||
describle: '',
|
||||
flowType: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('oaWorkflowManage', 'listOaWorkflow', function (_param) {
|
||||
vc.component._listOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listOaWorkflows(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listOaWorkflows: function (_page, _rows) {
|
||||
|
||||
vc.component.oaWorkflowManageInfo.conditions.page = _page;
|
||||
vc.component.oaWorkflowManageInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params: vc.component.oaWorkflowManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('oaWorkflow.listOaWorkflows',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _oaWorkflowManageInfo = JSON.parse(json);
|
||||
vc.component.oaWorkflowManageInfo.total = _oaWorkflowManageInfo.total;
|
||||
vc.component.oaWorkflowManageInfo.records = _oaWorkflowManageInfo.records;
|
||||
vc.component.oaWorkflowManageInfo.oaWorkflows = _oaWorkflowManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.oaWorkflowManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddOaWorkflowModal: function () {
|
||||
vc.emit('addOaWorkflow', 'openAddOaWorkflowModal', {});
|
||||
},
|
||||
_openEditOaWorkflowModel: function (_oaWorkflow) {
|
||||
vc.emit('editOaWorkflow', 'openEditOaWorkflowModal', _oaWorkflow);
|
||||
},
|
||||
_openDeleteOaWorkflowModel: function (_oaWorkflow) {
|
||||
vc.emit('deleteOaWorkflow', 'openDeleteOaWorkflowModal', _oaWorkflow);
|
||||
},
|
||||
_queryOaWorkflowMethod: function () {
|
||||
vc.component._listOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.oaWorkflowManageInfo.moreCondition) {
|
||||
vc.component.oaWorkflowManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.oaWorkflowManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user