|
|
|
|
@ -1,22 +1,10 @@ |
|
|
|
|
<template> |
|
|
|
|
<nf-container v-if="moduleLoadInit"> |
|
|
|
|
<nf-crud |
|
|
|
|
:option="option" |
|
|
|
|
:table-loading="loading" |
|
|
|
|
:data="data" |
|
|
|
|
v-model:page="page" |
|
|
|
|
:permission="permissionList" |
|
|
|
|
v-model="form" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="onLoad(page, query)" |
|
|
|
|
@tree-node-click="nodeClick" |
|
|
|
|
@tree-node-load="findObject(option.column, 'category').dicData = $event" |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
> |
|
|
|
|
<nf-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" :permission="permissionList" |
|
|
|
|
v-model="form" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
|
|
|
|
@current-change="currentChange" @size-change="sizeChange" @refresh-change="onLoad(page, query)" |
|
|
|
|
@tree-node-click="nodeClick" @tree-node-load="findObject(option.column, 'category').dicData = $event" |
|
|
|
|
@on-load="onLoad"> |
|
|
|
|
<template #menu-left v-if="isDev"> |
|
|
|
|
<el-tag type="warning" effect="dark" size="default"> |
|
|
|
|
<i class="el-icon-warning"></i> |
|
|
|
|
@ -47,23 +35,12 @@ |
|
|
|
|
</template> |
|
|
|
|
</nf-crud> |
|
|
|
|
<!-- 发起弹框 --> |
|
|
|
|
<el-dialog |
|
|
|
|
v-model="sendvisble" |
|
|
|
|
append-to-body |
|
|
|
|
destroy-on-close |
|
|
|
|
title="发起" |
|
|
|
|
width="70%" |
|
|
|
|
class="nf-dialog" |
|
|
|
|
> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog |
|
|
|
|
v-model="bpmnVisible" |
|
|
|
|
append-to-body |
|
|
|
|
destroy-on-close |
|
|
|
|
title="流程图" |
|
|
|
|
width="70%" |
|
|
|
|
class="nf-dialog" |
|
|
|
|
> |
|
|
|
|
<el-dialog v-model="sendvisble" v-if="sendvisble" append-to-body destroy-on-close title="发起" width="70%" |
|
|
|
|
class="nf-dialog"> |
|
|
|
|
<nf-form-start ref="form-start" :props="startProps" /> |
|
|
|
|
<component :is="currentComponent" v-bind="currentProps"></component> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog v-model="bpmnVisible" append-to-body destroy-on-close title="流程图" width="70%" class="nf-dialog"> |
|
|
|
|
<nf-design ref="bpmn" style="height: 60vh" :options="bpmnOption"></nf-design> |
|
|
|
|
</el-dialog> |
|
|
|
|
</nf-container> |
|
|
|
|
@ -71,11 +48,13 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { processList as getList, getXmlByProcessDefId } from '../../api/process/process'; |
|
|
|
|
|
|
|
|
|
import NfFormStart from '../../components/nf-form-start/index.vue'; |
|
|
|
|
import exForm from '../../mixins/ex-form'; |
|
|
|
|
import { fromBase64 } from 'js-base64'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
mixins: [exForm], |
|
|
|
|
components: { NfFormStart }, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
form: {}, |
|
|
|
|
@ -86,6 +65,11 @@ export default { |
|
|
|
|
currentPage: 1, |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
startProps: { |
|
|
|
|
processDefId: '', |
|
|
|
|
processDefKey: '', |
|
|
|
|
params: {}, |
|
|
|
|
}, |
|
|
|
|
selectionList: [], |
|
|
|
|
option: { |
|
|
|
|
treeOption: { |
|
|
|
|
@ -163,7 +147,8 @@ export default { |
|
|
|
|
data: [], |
|
|
|
|
bpmnVisible: false, |
|
|
|
|
bpmnOption: {}, |
|
|
|
|
sendvisble:false,//发起 |
|
|
|
|
sendvisble: false,//发起 |
|
|
|
|
currentComponent: null, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
@ -187,6 +172,38 @@ export default { |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
dynamicDialog(row) { |
|
|
|
|
this.sendvisble = true |
|
|
|
|
console.log(8888, row) |
|
|
|
|
if (row.name == '内置') { |
|
|
|
|
this.startProps = { |
|
|
|
|
processDefId: row.id, |
|
|
|
|
processDefKey: row.key, |
|
|
|
|
processId: row.id, |
|
|
|
|
} |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
|
|
|
|
this.$refs['form-start'].show(); |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
let url = row.formKey.substring(6) |
|
|
|
|
import(`../external/${url}/start.vue`).then(module => { |
|
|
|
|
this.currentComponent = module.default |
|
|
|
|
this.currentProps = { |
|
|
|
|
processDefId: row.id, |
|
|
|
|
processDefKey: row.key, |
|
|
|
|
processId: row.id, |
|
|
|
|
} |
|
|
|
|
// 现在你可以使用module.default作为你的组件 |
|
|
|
|
// this.$mount(module.default); // 或者其他方式挂载到DOM |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
handleFlow(row) { |
|
|
|
|
getXmlByProcessDefId({ processDefId: row.id }).then(res => { |
|
|
|
|
const xml = res.data.data; |
|
|
|
|
|