|
|
@ -13,7 +13,7 @@ |
|
|
|
<a-col :md="6" :sm="8"> |
|
|
|
<a-col :md="6" :sm="8"> |
|
|
|
<a-form-item label="流程分类"> |
|
|
|
<a-form-item label="流程分类"> |
|
|
|
<j-dict-select-tag type="list" v-model="queryParam.categoryId" dictCode="bpm_process_type" |
|
|
|
<j-dict-select-tag type="list" v-model="queryParam.categoryId" dictCode="bpm_process_type" |
|
|
|
placeholder="请选择物资类型" /> |
|
|
|
placeholder="请选择物资类型"/> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
<a-col :md="6" :sm="8" v-show="false"> |
|
|
|
<a-col :md="6" :sm="8" v-show="false"> |
|
|
@ -21,7 +21,7 @@ |
|
|
|
<a-switch checkedChildren="是" unCheckedChildren="否" defaultChecked v-model="queryParam.zx"/> |
|
|
|
<a-switch checkedChildren="是" unCheckedChildren="否" defaultChecked v-model="queryParam.zx"/> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
<!-- <a-col :md="6" :sm="10"> |
|
|
|
<!-- <a-col :md="6" :sm="10"> |
|
|
|
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
|
|
|
<a-range-picker |
|
|
|
<a-range-picker |
|
|
|
style="width: 210px" |
|
|
|
style="width: 210px" |
|
|
@ -35,13 +35,14 @@ |
|
|
|
</a-col>--> |
|
|
|
</a-col>--> |
|
|
|
|
|
|
|
|
|
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
|
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
|
|
|
<a-col :md="6" :sm="12" > |
|
|
|
<a-col :md="6" :sm="12"> |
|
|
|
<a-button type="primary" style="left: 10px" @click="searchQuery" icon="search">查询</a-button> |
|
|
|
<a-button type="primary" style="left: 10px" @click="searchQuery" icon="search">查询</a-button> |
|
|
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button> |
|
|
|
<a-button type="primary" @click="searchReset" icon="reload" |
|
|
|
|
|
|
|
style="margin-left: 8px;left: 10px">重置</a-button> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons"> |
|
|
|
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons"> |
|
|
|
<a-col :md="12" :sm="12" > |
|
|
|
<a-col :md="12" :sm="12"> |
|
|
|
<!-- <a-button type="primary" style="left: 10px" @click="createObj.visible=true" icon="search">创建流程模型</a-button>--> |
|
|
|
<!-- <a-button type="primary" style="left: 10px" @click="createObj.visible=true" icon="search">创建流程模型</a-button>--> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
</span> |
|
|
|
</span> |
|
|
@ -73,12 +74,17 @@ |
|
|
|
<span> {{filterDictText(dictOptions, text)}} </span> |
|
|
|
<span> {{filterDictText(dictOptions, text)}} </span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span slot="make" slot-scope="text, record"> |
|
|
|
<span slot="make" slot-scope="text, record"> |
|
|
|
<a href="javascript:void(0);" v-if="record.status!=1" @click="editStatus(1,record)" style="color: rgb(144,96,255);">启用</a> |
|
|
|
<a href="javascript:void(0);" v-if="record.status!=1" @click="editStatus(1,record)" |
|
|
|
<a href="javascript:void(0);" v-if="record.status==1" @click="editStatus(0,record)" style="color: #cb892d">禁用</a> |
|
|
|
style="color: rgb(144,96,255);">启用</a> |
|
|
|
<a-divider type="vertical" /> |
|
|
|
<a href="javascript:void(0);" v-if="record.status==1" @click="editStatus(0,record)" |
|
|
|
<a href="javascript:void(0);" @click="getNodeData(record)" >审批人员</a> |
|
|
|
style="color: #cb892d">禁用</a> |
|
|
|
<a-divider type="vertical" /> |
|
|
|
<span v-if="record.name=='预算计划采购流程' || record.name=='权限授权流程'"> |
|
|
|
<a href="javascript:void(0);" @click="edit(record)">配置表单</a> <a-divider type="vertical" /> |
|
|
|
<a-divider type="vertical"/> |
|
|
|
|
|
|
|
<a href="javascript:void(0);" @click="getNodeData(record)">审批人员</a> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-divider type="vertical"/> |
|
|
|
|
|
|
|
<a href="javascript:void(0);" @click="edit(record)">配置表单</a> <a-divider type="vertical"/> |
|
|
|
<a href="javascript:void(0);" style="color: red;" @click="remove(record)">删除</a> |
|
|
|
<a href="javascript:void(0);" style="color: red;" @click="remove(record)">删除</a> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</a-table> |
|
|
|
</a-table> |
|
|
@ -92,9 +98,10 @@ |
|
|
|
@cancel="editObj.visible = false" |
|
|
|
@cancel="editObj.visible = false" |
|
|
|
> |
|
|
|
> |
|
|
|
<a-form :form="editForm" v-if="editObj.visible"> |
|
|
|
<a-form :form="editForm" v-if="editObj.visible"> |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="流程分类" > |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="流程分类"> |
|
|
|
<component :is="LcDict" :trigger-change="true" v-decorator="[ 'categoryId', {initialValue:editObj.categoryId, rules: [{ required: true, message: '不能为空' }] },]" |
|
|
|
<component :is="LcDict" :trigger-change="true" |
|
|
|
placeholder="请选择流程分类" dictCode="bpm_process_type" ></component> |
|
|
|
v-decorator="[ 'categoryId', {initialValue:editObj.categoryId, rules: [{ required: true, message: '不能为空' }] },]" |
|
|
|
|
|
|
|
placeholder="请选择流程分类" dictCode="bpm_process_type"></component> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<!-- <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="流程类目(app使用)" > |
|
|
|
<!-- <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="流程类目(app使用)" > |
|
|
|
<j-tree-dict placeholder="请选择流程类目" parentCode="A01" |
|
|
|
<j-tree-dict placeholder="请选择流程类目" parentCode="A01" |
|
|
@ -102,8 +109,9 @@ |
|
|
|
> |
|
|
|
> |
|
|
|
</j-tree-dict> |
|
|
|
</j-tree-dict> |
|
|
|
</a-form-item>--> |
|
|
|
</a-form-item>--> |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="关联表单" > |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="关联表单"> |
|
|
|
<a-select @change="change_routeName" placeholder="请选择关联表单" :trigger-change="true" v-decorator="[ 'routeName', {initialValue:editObj.routeName, rules: [{ required: true, message: '不能为空' }] },]"> |
|
|
|
<a-select @change="change_routeName" placeholder="请选择关联表单" :trigger-change="true" |
|
|
|
|
|
|
|
v-decorator="[ 'routeName', {initialValue:editObj.routeName, rules: [{ required: true, message: '不能为空' }] },]"> |
|
|
|
<a-select-option value="">请选择</a-select-option> |
|
|
|
<a-select-option value="">请选择</a-select-option> |
|
|
|
<a-select-option v-for="(item, i) in allFormComponent" :key="item.routeName" :value="item.routeName"> |
|
|
|
<a-select-option v-for="(item, i) in allFormComponent" :key="item.routeName" :value="item.routeName"> |
|
|
|
<span style="display: inline-block;width: 100%" :title=" item.text"> |
|
|
|
<span style="display: inline-block;width: 100%" :title=" item.text"> |
|
|
@ -129,11 +137,12 @@ |
|
|
|
<!-- <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="角色授权" > |
|
|
|
<!-- <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="角色授权" > |
|
|
|
<j-select-role placeholder="不选择则所有人可用" v-decorator="[ 'roles', {initialValue:editObj.roles, rules: []}]"/> |
|
|
|
<j-select-role placeholder="不选择则所有人可用" v-decorator="[ 'roles', {initialValue:editObj.roles, rules: []}]"/> |
|
|
|
</a-form-item>--> |
|
|
|
</a-form-item>--> |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="排序" > |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="排序"> |
|
|
|
<a-input-number v-decorator="[ 'sort', {initialValue:editObj.sort, rules: []}]" placeholder="排序"/> |
|
|
|
<a-input-number v-decorator="[ 'sort', {initialValue:editObj.sort, rules: []}]" placeholder="排序"/> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="备注描述" > |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="备注描述"> |
|
|
|
<a-textarea v-decorator="[ 'description', {initialValue:editObj.description, rules: []}]" placeholder="备注描述" :autoSize="{ minRows: 3, maxRows: 5 }" /> |
|
|
|
<a-textarea v-decorator="[ 'description', {initialValue:editObj.description, rules: []}]" placeholder="备注描述" |
|
|
|
|
|
|
|
:autoSize="{ minRows: 3, maxRows: 5 }"/> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
</a-form> |
|
|
|
</a-form> |
|
|
|
</a-modal> |
|
|
|
</a-modal> |
|
|
@ -202,9 +211,10 @@ |
|
|
|
<!-- <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="选择角色" v-if="spryTypes.indexOf('0')>-1" > |
|
|
|
<!-- <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="选择角色" v-if="spryTypes.indexOf('0')>-1" > |
|
|
|
<j-select-role v-model="spry.roleIds"/> |
|
|
|
<j-select-role v-model="spry.roleIds"/> |
|
|
|
</a-form-item>--> |
|
|
|
</a-form-item>--> |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="选择人员" > |
|
|
|
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="选择人员"> |
|
|
|
<!-- 通过部门选择用户控件 --> |
|
|
|
<!-- 通过部门选择用户控件 --> |
|
|
|
<j-select-user-by-dep v-model="spry.userIds" :multi="false" @submitUsers="submitUsers"></j-select-user-by-dep> |
|
|
|
<j-select-user-by-dep v-model="spry.userIds" :multi="false" |
|
|
|
|
|
|
|
@submitUsers="submitUsers"></j-select-user-by-dep> |
|
|
|
</a-form-item> |
|
|
|
</a-form-item> |
|
|
|
<!-- <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="选择部门" v-if="spryTypes.indexOf('2')>-1" > |
|
|
|
<!-- <a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" label="选择部门" v-if="spryTypes.indexOf('2')>-1" > |
|
|
|
<j-select-depart v-model="spry.departmentIds" :multi="true"></j-select-depart> |
|
|
|
<j-select-depart v-model="spry.departmentIds" :multi="true"></j-select-depart> |
|
|
@ -222,7 +232,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
</a-row> |
|
|
|
</a-row> |
|
|
|
<div style="float:right;margin-top: -30px"> |
|
|
|
<div style="float:right;margin-top: -30px"> |
|
|
|
<a-button @click="sprySubmit" type="primary" html-type="submit" :disabled="editNode.type==0||editNode.type==2||confirmLoading"> |
|
|
|
<a-button @click="sprySubmit" type="primary" html-type="submit" |
|
|
|
|
|
|
|
:disabled="editNode.type==0||editNode.type==2||confirmLoading"> |
|
|
|
提交并保存 |
|
|
|
提交并保存 |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
|
|
|
|
|
|
|
@ -237,7 +248,7 @@ |
|
|
|
:visible="viewImage" :footer="null" |
|
|
|
:visible="viewImage" :footer="null" |
|
|
|
@cancel="viewImage = false" |
|
|
|
@cancel="viewImage = false" |
|
|
|
> |
|
|
|
> |
|
|
|
<div style="min-height: 400px;text-align: center" > |
|
|
|
<div style="min-height: 400px;text-align: center"> |
|
|
|
<img :src="diagramUrl" :alt="viewTitle"> |
|
|
|
<img :src="diagramUrl" :alt="viewTitle"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-modal> |
|
|
|
</a-modal> |
|
|
@ -251,47 +262,47 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import pick from "lodash.pick"; |
|
|
|
import pick from 'lodash.pick' |
|
|
|
import { filterObj } from '@/utils/util'; |
|
|
|
import { filterObj } from '@/utils/util' |
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
|
|
|
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin' |
|
|
|
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin' |
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis' |
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis' |
|
|
|
import { deleteAction, getAction,downFile } from '@/api/manage' |
|
|
|
import { deleteAction, getAction, downFile } from '@/api/manage' |
|
|
|
import JTreeSelect from '@/components/jeecg/JTreeSelect' |
|
|
|
import JTreeSelect from '@/components/jeecg/JTreeSelect' |
|
|
|
import JTreeDict from '@/components/jeecg/JTreeDict' |
|
|
|
import JTreeDict from '@/components/jeecg/JTreeDict' |
|
|
|
import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil' |
|
|
|
import { initDictOptions, filterDictText } from '@/components/dict/JDictSelectUtil' |
|
|
|
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep' |
|
|
|
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep' |
|
|
|
import JSelectRole from '@/components/jeecgbiz/JSelectRole' |
|
|
|
import JSelectRole from '@/components/jeecgbiz/JSelectRole' |
|
|
|
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart' |
|
|
|
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart' |
|
|
|
import JDictSelectTag from "@/components/dict/JDictSelectTag" |
|
|
|
import JDictSelectTag from '@/components/dict/JDictSelectTag' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "ProcessModelList", |
|
|
|
name: 'ProcessModelList', |
|
|
|
mixins:[activitiMixin,JeecgListMixin], |
|
|
|
mixins: [activitiMixin, JeecgListMixin], |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
JEllipsis,JSelectUserByDep,JSelectRole,JSelectDepart |
|
|
|
JEllipsis, JSelectUserByDep, JSelectRole, JSelectDepart |
|
|
|
,JTreeSelect,JTreeDict,JDictSelectTag |
|
|
|
, JTreeSelect, JTreeDict, JDictSelectTag |
|
|
|
}, |
|
|
|
}, |
|
|
|
created(){ |
|
|
|
created() { |
|
|
|
// this.initReportList(); |
|
|
|
// this.initReportList(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
data () { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
reportList:[], |
|
|
|
reportList: [], |
|
|
|
columns: [ |
|
|
|
columns: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '序号', width:50, |
|
|
|
title: '序号', width: 50, |
|
|
|
dataIndex: '', |
|
|
|
dataIndex: '', |
|
|
|
key:'rowIndex', |
|
|
|
key: 'rowIndex', |
|
|
|
align:"center", |
|
|
|
align: 'center', |
|
|
|
customRender:function (t,r,index) { |
|
|
|
customRender: function(t, r, index) { |
|
|
|
return parseInt(index)+1; |
|
|
|
return parseInt(index) + 1 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '流程名称', width:150, |
|
|
|
title: '流程名称', width: 150, |
|
|
|
align:"center", |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'name', |
|
|
|
dataIndex: 'name' |
|
|
|
}, |
|
|
|
}, |
|
|
|
/* { |
|
|
|
/* { |
|
|
|
title: '流程标识', width:150, |
|
|
|
title: '流程标识', width:150, |
|
|
@ -300,126 +311,126 @@ |
|
|
|
scopedSlots: { customRender: 'processKey' }, |
|
|
|
scopedSlots: { customRender: 'processKey' }, |
|
|
|
},*/ |
|
|
|
},*/ |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '所属分类', width:150, |
|
|
|
title: '所属分类', width: 150, |
|
|
|
dataIndex: 'categoryId', |
|
|
|
dataIndex: 'categoryId', |
|
|
|
scopedSlots: { customRender: 'categoryId' }, |
|
|
|
scopedSlots: { customRender: 'categoryId' }, |
|
|
|
align:"center", |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '流程图片', width:250, |
|
|
|
title: '流程图片', width: 250, |
|
|
|
dataIndex: 'diagramName', |
|
|
|
dataIndex: 'diagramName', |
|
|
|
scopedSlots: { customRender: 'diagramName' }, |
|
|
|
scopedSlots: { customRender: 'diagramName' }, |
|
|
|
align:"center", |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '表单路由', width:150, |
|
|
|
title: '表单路由', width: 150, |
|
|
|
dataIndex: 'routeName', |
|
|
|
dataIndex: 'routeName', |
|
|
|
align:"center", |
|
|
|
align: 'center', |
|
|
|
scopedSlots: { customRender: 'routeName' }, |
|
|
|
scopedSlots: { customRender: 'routeName' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '备注说明', width:150, |
|
|
|
title: '备注说明', width: 150, |
|
|
|
dataIndex: 'description', |
|
|
|
dataIndex: 'description', |
|
|
|
align:"center", |
|
|
|
align: 'center', |
|
|
|
scopedSlots: { customRender: 'description' }, |
|
|
|
scopedSlots: { customRender: 'description' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '部署时间', width:150, |
|
|
|
title: '部署时间', width: 150, |
|
|
|
dataIndex: 'createTime', |
|
|
|
dataIndex: 'createTime', |
|
|
|
align:"center", |
|
|
|
align: 'center' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '更新时间', width:150, |
|
|
|
title: '更新时间', width: 150, |
|
|
|
dataIndex: 'updateTime', |
|
|
|
dataIndex: 'updateTime', |
|
|
|
align:"center", |
|
|
|
align: 'center' |
|
|
|
// sorter:true |
|
|
|
// sorter:true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '操作',width:250, |
|
|
|
title: '操作', width: 250, |
|
|
|
dataIndex: '', |
|
|
|
dataIndex: '', |
|
|
|
scopedSlots: { customRender: 'make' }, |
|
|
|
scopedSlots: { customRender: 'make' }, |
|
|
|
align:"center", |
|
|
|
align: 'center' |
|
|
|
// fixed:'right' |
|
|
|
// fixed:'right' |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
|
viewImage:false, |
|
|
|
viewImage: false, |
|
|
|
viewTitle:"", |
|
|
|
viewTitle: '', |
|
|
|
diagramUrl:"", |
|
|
|
diagramUrl: '', |
|
|
|
/*编辑流程*/ |
|
|
|
/*编辑流程*/ |
|
|
|
editObj:{ |
|
|
|
editObj: { |
|
|
|
visible: false, |
|
|
|
visible: false |
|
|
|
}, |
|
|
|
}, |
|
|
|
editForm: this.$form.createForm(this), |
|
|
|
editForm: this.$form.createForm(this), |
|
|
|
|
|
|
|
|
|
|
|
description: '已部署模型', |
|
|
|
description: '已部署模型', |
|
|
|
// 查询条件 |
|
|
|
// 查询条件 |
|
|
|
queryParam: { |
|
|
|
queryParam: { |
|
|
|
createTimeRange:[], |
|
|
|
createTimeRange: [], |
|
|
|
keyWord:'', |
|
|
|
keyWord: '', |
|
|
|
zx:true, |
|
|
|
zx: true, |
|
|
|
categoryId:'' |
|
|
|
categoryId: '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
tabKey: "1", |
|
|
|
tabKey: '1', |
|
|
|
// 表头 |
|
|
|
// 表头 |
|
|
|
labelCol: { |
|
|
|
labelCol: { |
|
|
|
xs: { span: 4 }, |
|
|
|
xs: { span: 4 }, |
|
|
|
sm: { span: 4 }, |
|
|
|
sm: { span: 4 } |
|
|
|
}, |
|
|
|
}, |
|
|
|
wrapperCol: { |
|
|
|
wrapperCol: { |
|
|
|
xs: { span: 20 }, |
|
|
|
xs: { span: 20 }, |
|
|
|
sm: { span: 20 }, |
|
|
|
sm: { span: 20 } |
|
|
|
}, |
|
|
|
}, |
|
|
|
confirmLoading:false, |
|
|
|
confirmLoading: false, |
|
|
|
current:0, |
|
|
|
current: 0, |
|
|
|
nodeForm: this.$form.createForm(this), |
|
|
|
nodeForm: this.$form.createForm(this), |
|
|
|
dictOptions:[], |
|
|
|
dictOptions: [], |
|
|
|
nodeList:[], |
|
|
|
nodeList: [], |
|
|
|
editNode:{}, |
|
|
|
editNode: {}, |
|
|
|
showProcessNodeEdit:false, |
|
|
|
showProcessNodeEdit: false, |
|
|
|
dictNodeType:{ |
|
|
|
dictNodeType: { |
|
|
|
'0':'开始节点', |
|
|
|
'0': '开始节点', |
|
|
|
'1':'审批节点', |
|
|
|
'1': '审批节点', |
|
|
|
'2':'结束节点', |
|
|
|
'2': '结束节点' |
|
|
|
}, |
|
|
|
}, |
|
|
|
spryTypes:[], |
|
|
|
spryTypes: [], |
|
|
|
url: { |
|
|
|
url: { |
|
|
|
list: "/activiti_process/listData", |
|
|
|
list: '/activiti_process/listData', |
|
|
|
img: "/activiti/models/export", |
|
|
|
img: '/activiti/models/export', |
|
|
|
updateStatus: "/activiti_process/updateStatus", |
|
|
|
updateStatus: '/activiti_process/updateStatus', |
|
|
|
delByIds: "/activiti_process/delByIds", |
|
|
|
delByIds: '/activiti_process/delByIds', |
|
|
|
convertToModel: "/activiti_process/convertToModel", |
|
|
|
convertToModel: '/activiti_process/convertToModel', |
|
|
|
updateInfo: "/activiti_process/updateInfo", |
|
|
|
updateInfo: '/activiti_process/updateInfo', |
|
|
|
getProcessNode: "/activiti_process/getProcessNode", |
|
|
|
getProcessNode: '/activiti_process/getProcessNode', |
|
|
|
editNodeUser: "/activiti_process/editNodeUser", |
|
|
|
editNodeUser: '/activiti_process/editNodeUser' |
|
|
|
}, |
|
|
|
}, |
|
|
|
spry:{ |
|
|
|
spry: { |
|
|
|
//选中的用户 |
|
|
|
//选中的用户 |
|
|
|
userIds:'', |
|
|
|
userIds: '', |
|
|
|
roleIds:'', |
|
|
|
roleIds: '', |
|
|
|
departmentIds:'', |
|
|
|
departmentIds: '', |
|
|
|
departmentManageIds:'', |
|
|
|
departmentManageIds: '', |
|
|
|
formVariables:'', |
|
|
|
formVariables: '', |
|
|
|
chooseSponsor:false, |
|
|
|
chooseSponsor: false, |
|
|
|
chooseDepHeader:false, |
|
|
|
chooseDepHeader: false |
|
|
|
}, |
|
|
|
}, |
|
|
|
lcModa: { |
|
|
|
lcModa: { |
|
|
|
title:'流程表单预览', |
|
|
|
title: '流程表单预览', |
|
|
|
visible:false, |
|
|
|
visible: false, |
|
|
|
formComponent : null |
|
|
|
formComponent: null |
|
|
|
}, |
|
|
|
}, |
|
|
|
isClose:false, |
|
|
|
isClose: false, |
|
|
|
isIndex:0, |
|
|
|
isIndex: 0, |
|
|
|
lcTypeF:[], |
|
|
|
lcTypeF: [], |
|
|
|
dataList: [], |
|
|
|
dataList: [], |
|
|
|
updateRow: {} |
|
|
|
updateRow: {} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed:{ |
|
|
|
computed: { |
|
|
|
//可行性测试,根据文件路径动态加载组件 |
|
|
|
//可行性测试,根据文件路径动态加载组件 |
|
|
|
LcDict:function(){ |
|
|
|
LcDict: function() { |
|
|
|
var myComponent =() => import(`@/components/dict/JDictSelectTag`); |
|
|
|
var myComponent = () => import(`@/components/dict/JDictSelectTag`) |
|
|
|
return myComponent; |
|
|
|
return myComponent |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
/*initReportList(){ |
|
|
|
/*initReportList(){ |
|
|
@ -436,15 +447,15 @@ |
|
|
|
//初始化字典 - 流程分类 |
|
|
|
//初始化字典 - 流程分类 |
|
|
|
initDictOptions('bpm_process_type').then((res) => { |
|
|
|
initDictOptions('bpm_process_type').then((res) => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
var lcTypes = []; |
|
|
|
var lcTypes = [] |
|
|
|
this.dictOptions = res.result||[]; |
|
|
|
this.dictOptions = res.result || [] |
|
|
|
for (const dict of this.dictOptions) { |
|
|
|
for (const dict of this.dictOptions) { |
|
|
|
lcTypes.push({text:dict.text,value:dict.value}) |
|
|
|
lcTypes.push({ text: dict.text, value: dict.value }) |
|
|
|
} |
|
|
|
} |
|
|
|
this.lcTypeF = lcTypes; |
|
|
|
this.lcTypeF = lcTypes |
|
|
|
console.log(lcTypes) |
|
|
|
console.log(lcTypes) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
filterDictText(dictOptions, text) { |
|
|
|
filterDictText(dictOptions, text) { |
|
|
|
if (dictOptions instanceof Array) { |
|
|
|
if (dictOptions instanceof Array) { |
|
|
@ -458,297 +469,299 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
closeNode() { |
|
|
|
closeNode() { |
|
|
|
this.showProcessNodeEdit = false, |
|
|
|
this.showProcessNodeEdit = false, |
|
|
|
this.current=0, |
|
|
|
this.current = 0, |
|
|
|
this.spryTypes=[], |
|
|
|
this.spryTypes = [], |
|
|
|
this.spry={} |
|
|
|
this.spry = {} |
|
|
|
this.isIndex=0; |
|
|
|
this.isIndex = 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
/*编辑流程节点*/ |
|
|
|
/*编辑流程节点*/ |
|
|
|
|
|
|
|
|
|
|
|
change_steps(node,index){ |
|
|
|
change_steps(node, index) { |
|
|
|
this.isIndex=index+1; |
|
|
|
this.isIndex = index + 1 |
|
|
|
this.spryTypes = []; |
|
|
|
this.spryTypes = [] |
|
|
|
console.log('onChange:', node); |
|
|
|
console.log('onChange:', node) |
|
|
|
this.current = index; |
|
|
|
this.current = index |
|
|
|
this.editNode = node; |
|
|
|
this.editNode = node |
|
|
|
/* 0角色 1用户 2部门 3发起人 4发起人的部门负责人 5部门的部门负责人*/ |
|
|
|
/* 0角色 1用户 2部门 3发起人 4发起人的部门负责人 5部门的部门负责人*/ |
|
|
|
this.spry.chooseDepHeader = node.chooseDepHeader||false; |
|
|
|
this.spry.chooseDepHeader = node.chooseDepHeader || false |
|
|
|
if (this.spry.chooseDepHeader) this.spryTypes.push('4') ; |
|
|
|
if (this.spry.chooseDepHeader) this.spryTypes.push('4') |
|
|
|
this.spry.chooseSponsor = node.chooseSponsor||false; |
|
|
|
this.spry.chooseSponsor = node.chooseSponsor || false |
|
|
|
if (this.spry.chooseSponsor) this.spryTypes.push('3') ; |
|
|
|
if (this.spry.chooseSponsor) this.spryTypes.push('3') |
|
|
|
var userIds = []; |
|
|
|
var userIds = [] |
|
|
|
for (const user of node.users||[]) { |
|
|
|
for (const user of node.users || []) { |
|
|
|
userIds.push(user.username); |
|
|
|
userIds.push(user.username) |
|
|
|
} |
|
|
|
} |
|
|
|
this.spry.userIds = userIds.join(","); |
|
|
|
this.spry.userIds = userIds.join(',') |
|
|
|
if (userIds.length>0) this.spryTypes.push('1') ; |
|
|
|
if (userIds.length > 0) this.spryTypes.push('1') |
|
|
|
var roleIds = [] |
|
|
|
var roleIds = [] |
|
|
|
for (const role of node.roles||[]) { |
|
|
|
for (const role of node.roles || []) { |
|
|
|
roleIds.push(role.roleCode) |
|
|
|
roleIds.push(role.roleCode) |
|
|
|
} |
|
|
|
} |
|
|
|
this.spry.roleIds = roleIds.join(",") |
|
|
|
this.spry.roleIds = roleIds.join(',') |
|
|
|
if (roleIds.length>0) this.spryTypes.push('0') ; |
|
|
|
if (roleIds.length > 0) this.spryTypes.push('0') |
|
|
|
var departmentIds = [] |
|
|
|
var departmentIds = [] |
|
|
|
for (const department of node.departments||[]) { |
|
|
|
for (const department of node.departments || []) { |
|
|
|
departmentIds.push(department.id) |
|
|
|
departmentIds.push(department.id) |
|
|
|
} |
|
|
|
} |
|
|
|
this.spry.departmentIds = departmentIds.join(",") |
|
|
|
this.spry.departmentIds = departmentIds.join(',') |
|
|
|
if (departmentIds.length>0) this.spryTypes.push('2') ; |
|
|
|
if (departmentIds.length > 0) this.spryTypes.push('2') |
|
|
|
var departmentManageIds = [] |
|
|
|
var departmentManageIds = [] |
|
|
|
for (const departmentManage of node.departmentManages || []){ |
|
|
|
for (const departmentManage of node.departmentManages || []) { |
|
|
|
departmentManageIds.push(departmentManage.id); |
|
|
|
departmentManageIds.push(departmentManage.id) |
|
|
|
} |
|
|
|
} |
|
|
|
this.spry.departmentManageIds = departmentManageIds.join(",") |
|
|
|
this.spry.departmentManageIds = departmentManageIds.join(',') |
|
|
|
if (departmentManageIds.length>0) this.spryTypes.push('5') ; |
|
|
|
if (departmentManageIds.length > 0) this.spryTypes.push('5') |
|
|
|
console.log("回显this.spry",this.spry) |
|
|
|
console.log('回显this.spry', this.spry) |
|
|
|
|
|
|
|
|
|
|
|
this.spry.formVariables = node.formVariables||''; |
|
|
|
this.spry.formVariables = node.formVariables || '' |
|
|
|
if (this.spry.formVariables) this.spryTypes.push('6'); |
|
|
|
if (this.spry.formVariables) this.spryTypes.push('6') |
|
|
|
}, |
|
|
|
}, |
|
|
|
spryType(types){ |
|
|
|
spryType(types) { |
|
|
|
/* alert(types)*/ |
|
|
|
/* alert(types)*/ |
|
|
|
/* 0角色 1用户 2部门 3发起人 4发起人的部门负责人 5部门负责人*/ |
|
|
|
/* 0角色 1用户 2部门 3发起人 4发起人的部门负责人 5部门负责人*/ |
|
|
|
// this.spryTypes = types; |
|
|
|
// this.spryTypes = types; |
|
|
|
alert(this.spryTypes.indexOf('0')) |
|
|
|
alert(this.spryTypes.indexOf('0')) |
|
|
|
if (this.spryTypes.indexOf('0')==-1) this.spry.roleIds = ''; |
|
|
|
if (this.spryTypes.indexOf('0') == -1) this.spry.roleIds = '' |
|
|
|
if (this.spryTypes.indexOf('1')==-1) this.spry.userIds = ''; |
|
|
|
if (this.spryTypes.indexOf('1') == -1) this.spry.userIds = '' |
|
|
|
if (this.spryTypes.indexOf('2')==-1) this.spry.departmentIds = ''; |
|
|
|
if (this.spryTypes.indexOf('2') == -1) this.spry.departmentIds = '' |
|
|
|
if (this.spryTypes.indexOf('5')==-1) this.spry.departmentManageIds = ''; |
|
|
|
if (this.spryTypes.indexOf('5') == -1) this.spry.departmentManageIds = '' |
|
|
|
if (this.spryTypes.indexOf('6')==-1) this.spry.formVariable = ''; |
|
|
|
if (this.spryTypes.indexOf('6') == -1) this.spry.formVariable = '' |
|
|
|
//是否选中发起人 |
|
|
|
//是否选中发起人 |
|
|
|
this.spry.chooseSponsor = this.spryTypes.indexOf('3')>-1 ; |
|
|
|
this.spry.chooseSponsor = this.spryTypes.indexOf('3') > -1 |
|
|
|
//是否选中发起人的部门领导 |
|
|
|
//是否选中发起人的部门领导 |
|
|
|
this.spry.chooseDepHeader = this.spryTypes.indexOf('4')>-1 ; |
|
|
|
this.spry.chooseDepHeader = this.spryTypes.indexOf('4') > -1 |
|
|
|
|
|
|
|
|
|
|
|
console.log("this.spry",this.spry) |
|
|
|
console.log('this.spry', this.spry) |
|
|
|
}, |
|
|
|
}, |
|
|
|
submitUsers(val){ |
|
|
|
submitUsers(val) { |
|
|
|
this.spry.userIds=val; |
|
|
|
this.spry.userIds = val |
|
|
|
|
|
|
|
|
|
|
|
var _this = this; |
|
|
|
var _this = this |
|
|
|
if (!this.spry.userIds){ |
|
|
|
if (!this.spry.userIds) { |
|
|
|
_this.$message.error("必须选择审批人!"); |
|
|
|
_this.$message.error('必须选择审批人!') |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// _this.confirmLoading = true; |
|
|
|
// _this.confirmLoading = true; |
|
|
|
this.spry.nodeId = this.editNode.id; |
|
|
|
this.spry.nodeId = this.editNode.id |
|
|
|
this.spry.procDefId = this.editNode.procDefId; |
|
|
|
this.spry.procDefId = this.editNode.procDefId |
|
|
|
this.spry.userIds=val; |
|
|
|
this.spry.userIds = val |
|
|
|
if (!this.spry.roleIds){ |
|
|
|
if (!this.spry.roleIds) { |
|
|
|
this.spry.roleIds="" |
|
|
|
this.spry.roleIds = '' |
|
|
|
this.spry.departmentIds="" |
|
|
|
this.spry.departmentIds = '' |
|
|
|
this.spry.departmentManageIds="" |
|
|
|
this.spry.departmentManageIds = '' |
|
|
|
this.spry.formVariables="" |
|
|
|
this.spry.formVariables = '' |
|
|
|
} |
|
|
|
} |
|
|
|
this.postFormAction(_this.url.editNodeUser,this.spry).then(res => { |
|
|
|
this.postFormAction(_this.url.editNodeUser, this.spry).then(res => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
/*保存成功后回显数据*/ |
|
|
|
/*保存成功后回显数据*/ |
|
|
|
_this.getNodeData(_this.updateRow); |
|
|
|
_this.getNodeData(_this.updateRow) |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
_this.$message.error(res.message); |
|
|
|
_this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//提交并保存 |
|
|
|
//提交并保存 |
|
|
|
sprySubmit() { |
|
|
|
sprySubmit() { |
|
|
|
console.log(this.nodeList,this.isIndex,"---------------->") |
|
|
|
console.log(this.nodeList, this.isIndex, '---------------->') |
|
|
|
if(this.nodeList.length==this.isIndex){ |
|
|
|
if (this.nodeList.length == this.isIndex) { |
|
|
|
if (!this.spry.userIds){ |
|
|
|
if (!this.spry.userIds) { |
|
|
|
this.$message.error("审核人员能为空!"); |
|
|
|
this.$message.error('审核人员能为空!') |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.$message.success("操作成功"); |
|
|
|
this.$message.success('操作成功') |
|
|
|
this.closeNode(); |
|
|
|
this.closeNode() |
|
|
|
this.loadData(1); |
|
|
|
this.loadData(1) |
|
|
|
|
|
|
|
|
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.$message.error("请完成最后审核人员设置后保存!"); |
|
|
|
this.$message.error('请完成最后审核人员设置后保存!') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
/*节点设置*/ |
|
|
|
/*节点设置*/ |
|
|
|
getNodeData(row){ |
|
|
|
getNodeData(row) { |
|
|
|
let _this = this; |
|
|
|
let _this = this |
|
|
|
_this.updateRow = row; |
|
|
|
_this.updateRow = row |
|
|
|
_this.postFormAction(_this.url.getProcessNode,{ |
|
|
|
_this.postFormAction(_this.url.getProcessNode, { |
|
|
|
id:row.id |
|
|
|
id: row.id |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
// 转换null为"" |
|
|
|
// 转换null为"" |
|
|
|
|
|
|
|
|
|
|
|
console.log("res.result",res.result); |
|
|
|
console.log('res.result', res.result) |
|
|
|
let arry=[]; |
|
|
|
let arry = [] |
|
|
|
for (let i = 0; i < res.result.length; i++) { |
|
|
|
for (let i = 0; i < res.result.length; i++) { |
|
|
|
if (i!=0&&i!=res.result.length-1){ |
|
|
|
if (i != 0 && i != res.result.length - 1) { |
|
|
|
arry.push(res.result[i]) |
|
|
|
arry.push(res.result[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
_this.nodeList=arry; |
|
|
|
_this.nodeList = arry |
|
|
|
if (arry.length==this.isIndex){ |
|
|
|
if (arry.length == this.isIndex) { |
|
|
|
console.log(this.isIndex,"我想要的") |
|
|
|
console.log(this.isIndex, '我想要的') |
|
|
|
} |
|
|
|
} |
|
|
|
if (arry.length>0){ |
|
|
|
if (arry.length > 0) { |
|
|
|
console.log(_this.nodeList[0]) |
|
|
|
console.log(_this.nodeList[0]) |
|
|
|
if(!this.nodeList.length==this.isIndex){ |
|
|
|
if (!this.nodeList.length == this.isIndex) { |
|
|
|
if (_this.nodeList[0].users[0]){ |
|
|
|
if (_this.nodeList[0].users[0]) { |
|
|
|
console.log(_this.nodeList[0].users[0]) |
|
|
|
console.log(_this.nodeList[0].users[0]) |
|
|
|
this.spry.userIds=_this.nodeList[0].users[0].username; |
|
|
|
this.spry.userIds = _this.nodeList[0].users[0].username |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
_this.editNode = _this.nodeList[_this.current]; |
|
|
|
_this.editNode = _this.nodeList[_this.current] |
|
|
|
console.log(_this.current,_this.editNode) |
|
|
|
console.log(_this.current, _this.editNode) |
|
|
|
_this.showProcessNodeEdit = true; |
|
|
|
_this.showProcessNodeEdit = true |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
_this.$message.error(res.message); |
|
|
|
_this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
/*编辑流程信息*/ |
|
|
|
/*编辑流程信息*/ |
|
|
|
edit(row){ |
|
|
|
edit(row) { |
|
|
|
this.editObj = Object.assign(this.editObj, row) |
|
|
|
this.editObj = Object.assign(this.editObj, row) |
|
|
|
this.editObj.visible = true; |
|
|
|
this.editObj.visible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
editObjOk(){ |
|
|
|
editObjOk() { |
|
|
|
var _this = this; |
|
|
|
var _this = this |
|
|
|
this.editForm.validateFields((err, values) => { |
|
|
|
this.editForm.validateFields((err, values) => { |
|
|
|
if (!err) { |
|
|
|
if (!err) { |
|
|
|
let formData = Object.assign(this.editObj, values) |
|
|
|
let formData = Object.assign(this.editObj, values) |
|
|
|
console.log("formData",formData) |
|
|
|
console.log('formData', formData) |
|
|
|
this.confirmLoading = true; |
|
|
|
this.confirmLoading = true |
|
|
|
this.postFormAction(this.url.updateInfo,formData).then(res => { |
|
|
|
this.postFormAction(this.url.updateInfo, formData).then(res => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
_this.$message.success("操作成功"); |
|
|
|
_this.$message.success('操作成功') |
|
|
|
_this.loadData(); |
|
|
|
_this.loadData() |
|
|
|
_this.editObj.visible = false; |
|
|
|
_this.editObj.visible = false |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
_this.$message.error(res.message); |
|
|
|
_this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}).finally(() => _this.confirmLoading = false);; |
|
|
|
}).finally(() => _this.confirmLoading = false) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
change_routeName(){ |
|
|
|
change_routeName() { |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$nextTick(() => { |
|
|
|
let routeName = this.editForm.getFieldValue('routeName'); |
|
|
|
let routeName = this.editForm.getFieldValue('routeName') |
|
|
|
console.log("routeName",routeName) |
|
|
|
console.log('routeName', routeName) |
|
|
|
var route = this.getFormComponent(routeName); |
|
|
|
var route = this.getFormComponent(routeName) |
|
|
|
this.editObj.businessTable = route.businessTable; |
|
|
|
this.editObj.businessTable = route.businessTable |
|
|
|
this.editObj.routeName = route.routeName; |
|
|
|
this.editObj.routeName = route.routeName |
|
|
|
console.log("this.editObj",this.editObj) |
|
|
|
console.log('this.editObj', this.editObj) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
viewForm(routeName) { |
|
|
|
viewForm(routeName) { |
|
|
|
if (!routeName) routeName = this.editObj.routeName; |
|
|
|
if (!routeName) routeName = this.editObj.routeName |
|
|
|
if (!routeName) { |
|
|
|
if (!routeName) { |
|
|
|
this.$message.warning( |
|
|
|
this.$message.warning( |
|
|
|
"请先选择表单!" |
|
|
|
'请先选择表单!' |
|
|
|
); |
|
|
|
) |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
let formComponent = this.getFormComponent(routeName); |
|
|
|
let formComponent = this.getFormComponent(routeName) |
|
|
|
console.log(formComponent) |
|
|
|
console.log(formComponent) |
|
|
|
this.lcModa.formComponent = formComponent.component; |
|
|
|
this.lcModa.formComponent = formComponent.component |
|
|
|
this.lcModa.title = '流程表单预览:'+formComponent.text; |
|
|
|
this.lcModa.title = '流程表单预览:' + formComponent.text |
|
|
|
this.lcModa.pictureId='11'; |
|
|
|
this.lcModa.pictureId = '11' |
|
|
|
|
|
|
|
|
|
|
|
this.lcModa.visible = true; |
|
|
|
this.lcModa.visible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
convertToModel(row){ |
|
|
|
convertToModel(row) { |
|
|
|
let that = this; |
|
|
|
let that = this |
|
|
|
this.$confirm({ |
|
|
|
this.$confirm({ |
|
|
|
title: "确认转化", |
|
|
|
title: '确认转化', |
|
|
|
content: "您确认要转化流程 " + row.name + " 为模型?", |
|
|
|
content: '您确认要转化流程 ' + row.name + ' 为模型?', |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
onOk: () => { |
|
|
|
onOk: () => { |
|
|
|
that.postFormAction(`${that.url.convertToModel}`,{id:row.id}).then(res => { |
|
|
|
that.postFormAction(`${that.url.convertToModel}`, { id: row.id }).then(res => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
setTimeout(function() { |
|
|
|
setTimeout(function() { |
|
|
|
that.$message.success("转化成功"); |
|
|
|
that.$message.success('转化成功') |
|
|
|
}, 300); |
|
|
|
}, 300) |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
that.$message.error(res.message); |
|
|
|
that.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
remove(row) { |
|
|
|
remove(row) { |
|
|
|
var _this = this; |
|
|
|
var _this = this |
|
|
|
_this.$confirm({ |
|
|
|
_this.$confirm({ |
|
|
|
title: "确认删除", |
|
|
|
title: '确认删除', |
|
|
|
content: "您确认要删除流程 " + row.name + " ?", |
|
|
|
content: '您确认要删除流程 ' + row.name + ' ?', |
|
|
|
loading: true, |
|
|
|
loading: true, |
|
|
|
onOk: () => { |
|
|
|
onOk: () => { |
|
|
|
_this.postFormAction(_this.url.delByIds,{ids:row.id}).then(res => { |
|
|
|
_this.postFormAction(_this.url.delByIds, { ids: row.id }).then(res => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
_this.$message.success("操作成功"); |
|
|
|
_this.$message.success('操作成功') |
|
|
|
_this.loadData(); |
|
|
|
_this.loadData() |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
_this.$message.error(res.message); |
|
|
|
_this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
editStatus(status, row) { |
|
|
|
editStatus(status, row) { |
|
|
|
var _this = this; |
|
|
|
var _this = this |
|
|
|
let operation = ""; |
|
|
|
let operation = '' |
|
|
|
if (status == 0) { |
|
|
|
if (status == 0) { |
|
|
|
operation = "不启用"; |
|
|
|
operation = '不启用' |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
operation = "启用"; |
|
|
|
operation = '启用' |
|
|
|
} |
|
|
|
} |
|
|
|
this.$confirm({ |
|
|
|
this.$confirm({ |
|
|
|
title: "确认" + operation+"?", |
|
|
|
title: '确认' + operation + '?', |
|
|
|
content: `您确认要${operation}流程${row.name}?`, |
|
|
|
content: `您确认要${operation}流程${row.name}?`, |
|
|
|
onOk() { |
|
|
|
onOk() { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
status: status, |
|
|
|
status: status, |
|
|
|
id: row.id |
|
|
|
id: row.id |
|
|
|
}; |
|
|
|
} |
|
|
|
_this.postFormAction(_this.url.updateStatus,params).then(res => { |
|
|
|
_this.postFormAction(_this.url.updateStatus, params).then(res => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
_this.$message.success("操作成功"); |
|
|
|
_this.$message.success('操作成功') |
|
|
|
_this.loadData(); |
|
|
|
_this.loadData() |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
_this.$message.error(res.message); |
|
|
|
_this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
, |
|
|
|
, |
|
|
|
onCancel() {}, |
|
|
|
onCancel() { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
/*查看流程图片*/ |
|
|
|
/*查看流程图片*/ |
|
|
|
showResource(row) { |
|
|
|
showResource(row) { |
|
|
|
this.viewTitle = "流程图片预览(" + row.diagramName + ")"; |
|
|
|
this.viewTitle = '流程图片预览(' + row.diagramName + ')' |
|
|
|
this.diagramUrl = `${window._CONFIG['domianURL']}${this.url.img}?id=${row.id}`; |
|
|
|
this.diagramUrl = `${window._CONFIG['domianURL']}${this.url.img}?id=${row.id}` |
|
|
|
this.viewImage = true; |
|
|
|
this.viewImage = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
/*删除模型*/ |
|
|
|
/*删除模型*/ |
|
|
|
deletelc(y,row) { |
|
|
|
deletelc(y, row) { |
|
|
|
console.log(y,row); |
|
|
|
console.log(y, row) |
|
|
|
if (y){ |
|
|
|
if (y) { |
|
|
|
getAction(this.url.delete+row.id).then((res) => { |
|
|
|
getAction(this.url.delete + row.id).then((res) => { |
|
|
|
if (res.success){ |
|
|
|
if (res.success) { |
|
|
|
this.$message.success(res.message); |
|
|
|
this.$message.success(res.message) |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.$message.error(res.message); |
|
|
|
this.$message.error(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
this.loadData(); |
|
|
|
this.loadData() |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleTableChange(pagination, filters, sorter) { |
|
|
|
handleTableChange(pagination, filters, sorter) { |
|
|
|
//分页、排序、筛选变化时触发 |
|
|
|
//分页、排序、筛选变化时触发 |
|
|
|
//TODO 筛选 |
|
|
|
//TODO 筛选 |
|
|
|
if (Object.keys(sorter).length > 0) { |
|
|
|
if (Object.keys(sorter).length > 0) { |
|
|
|
this.isorter.column = sorter.field; |
|
|
|
this.isorter.column = sorter.field |
|
|
|
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
|
|
|
this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc' |
|
|
|
} |
|
|
|
} |
|
|
|
this.ipagination = pagination; |
|
|
|
this.ipagination = pagination |
|
|
|
console.log(pagination,filters,sorter) |
|
|
|
console.log(pagination, filters, sorter) |
|
|
|
/*if (Object.keys(filters).length>0&&this.dataList.length>0){ |
|
|
|
/*if (Object.keys(filters).length>0&&this.dataList.length>0){ |
|
|
|
for (const filterField in filters) { |
|
|
|
for (const filterField in filters) { |
|
|
|
let fiterVals = filters[filterField]||[]; |
|
|
|
let fiterVals = filters[filterField]||[]; |
|
|
@ -759,67 +772,69 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
loadData(arg) { |
|
|
|
loadData(arg) { |
|
|
|
|
|
|
|
|
|
|
|
if(!this.url.list){ |
|
|
|
if (!this.url.list) { |
|
|
|
this.$message.error("请设置url.list属性!") |
|
|
|
this.$message.error('请设置url.list属性!') |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
//加载数据 若传入参数1则加载第一页的内容 |
|
|
|
//加载数据 若传入参数1则加载第一页的内容 |
|
|
|
if (arg === 1) { |
|
|
|
if (arg === 1) { |
|
|
|
this.ipagination.current = 1; |
|
|
|
this.ipagination.current = 1 |
|
|
|
} |
|
|
|
} |
|
|
|
var params = this.getQueryParams();//查询条件 |
|
|
|
var params = this.getQueryParams()//查询条件 |
|
|
|
this.loading = true; |
|
|
|
this.loading = true |
|
|
|
getAction(this.url.list, params).then((res) => { |
|
|
|
getAction(this.url.list, params).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
let records = res.result||[]; |
|
|
|
let records = res.result || [] |
|
|
|
this.dataSource = records; |
|
|
|
this.dataSource = records |
|
|
|
this.dataList = records; |
|
|
|
this.dataList = records |
|
|
|
this.ipagination.total = records.length; |
|
|
|
this.ipagination.total = records.length |
|
|
|
} |
|
|
|
} |
|
|
|
if(res.code===510){ |
|
|
|
if (res.code === 510) { |
|
|
|
this.$message.warning(res.message) |
|
|
|
this.$message.warning(res.message) |
|
|
|
} |
|
|
|
} |
|
|
|
this.loading = false; |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getQueryParams(){ |
|
|
|
getQueryParams() { |
|
|
|
var param = Object.assign({}, this.queryParam,this.isorter); |
|
|
|
var param = Object.assign({}, this.queryParam, this.isorter) |
|
|
|
delete param.createTimeRange; // 时间参数不传递后台 |
|
|
|
delete param.createTimeRange // 时间参数不传递后台 |
|
|
|
return filterObj(param); |
|
|
|
return filterObj(param) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 重置 |
|
|
|
// 重置 |
|
|
|
searchReset(){ |
|
|
|
searchReset() { |
|
|
|
var that = this; |
|
|
|
var that = this |
|
|
|
var logType = that.queryParam.logType; |
|
|
|
var logType = that.queryParam.logType |
|
|
|
that.queryParam = {}; //清空查询区域参数 |
|
|
|
that.queryParam = {} //清空查询区域参数 |
|
|
|
that.queryParam.logType = logType; |
|
|
|
that.queryParam.logType = logType |
|
|
|
that.queryParam.zx=true; |
|
|
|
that.queryParam.zx = true |
|
|
|
that.loadData(this.ipagination.current); |
|
|
|
that.loadData(this.ipagination.current) |
|
|
|
}, |
|
|
|
}, |
|
|
|
onDateChange: function (value, dateString) { |
|
|
|
onDateChange: function(value, dateString) { |
|
|
|
console.log(dateString[0],dateString[1]); |
|
|
|
console.log(dateString[0], dateString[1]) |
|
|
|
this.queryParam.createTime_begin=dateString[0]; |
|
|
|
this.queryParam.createTime_begin = dateString[0] |
|
|
|
this.queryParam.createTime_end=dateString[1]; |
|
|
|
this.queryParam.createTime_end = dateString[1] |
|
|
|
}, |
|
|
|
}, |
|
|
|
onDateOk(value) { |
|
|
|
onDateOk(value) { |
|
|
|
console.log(value); |
|
|
|
console.log(value) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
filter_categoryId(v,r) { |
|
|
|
filter_categoryId(v, r) { |
|
|
|
// console.log(v,r) |
|
|
|
// console.log(v,r) |
|
|
|
return r.categoryId == v; |
|
|
|
return r.categoryId == v |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
<style scoped> |
|
|
|
@import '~@assets/less/common.less'; |
|
|
|
@import '~@assets/less/common.less'; |
|
|
|
.nodespan{ |
|
|
|
|
|
|
|
|
|
|
|
.nodespan { |
|
|
|
color: #999; |
|
|
|
color: #999; |
|
|
|
} |
|
|
|
} |
|
|
|
.ant-checkbox-wrapper + .ant-checkbox-wrapper{ |
|
|
|
|
|
|
|
|
|
|
|
.ant-checkbox-wrapper + .ant-checkbox-wrapper { |
|
|
|
margin-left: 0; |
|
|
|
margin-left: 0; |
|
|
|
margin-right: 8px; |
|
|
|
margin-right: 8px; |
|
|
|
} |
|
|
|
} |
|
|
|