|
@@ -64,7 +64,7 @@
|
|
|
<el-option v-for="item in options" :key="item.id" :label="item.processName" :value="item.id" />
|
|
|
</el-select>
|
|
|
|
|
|
- <el-link :underline="false"
|
|
|
+ <el-link :underline="false" @click="openViewEv"
|
|
|
><el-icon class="el-icon--right"><View /></el-icon> 预览子流程</el-link
|
|
|
>
|
|
|
</div>
|
|
@@ -225,6 +225,17 @@ export default {
|
|
|
async getProcessDetail(id) {
|
|
|
const { processId, processName } = await process.processDetailApi(id)
|
|
|
this.options = [{ id: processId, processName }]
|
|
|
+ },
|
|
|
+ openViewEv() {
|
|
|
+ const id = this.form.subProcessValue
|
|
|
+ if (!id) {
|
|
|
+ ElMessage.error('您还没有选择需要预览的子流程')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const { origin, hash } = window.location
|
|
|
+ const hashFlag = hash.indexOf('#') !== -1 // 路由是hash模式
|
|
|
+ const jumpRouterUrl = `${origin}/${hashFlag ? '#' : ''}/flow_create/child?id=${id}`
|
|
|
+ window.open(jumpRouterUrl)
|
|
|
}
|
|
|
},
|
|
|
computed: {
|