Files
scrq-hd/.svn/pristine/20/202397eb5b1e8b3a1c5aa260321970b8dc378ca4.svn-base
2025-07-03 10:34:04 +08:00

89 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<!-- 流程-activiti modeler 页面 -->
<div class="full-screen">
<div class="main-section flex-column" v-if="isFrameShow">
<iframe class="iframe" ref="activit" width="100%" height="100%" :src="src" style="border:none"></iframe>
</div>
<span style="text-align:center;" v-else>
<i class="el-icon-loading"></i>
正在加载中 请稍等
</span>
</div>
</template>
<script>
import { listUser } from "@/api/system/user";
import {getToken} from '@/utils/auth';//登陆人的token
import { listRole } from "@/api/system/role";
import flowModel from '../../../../api/tableConfig/flowModel';
export default{
data(){
return{
isFrameShow:false,
userList:[], //传给子页面的用户列表
roleList:[]//传给子页面的角色列表
};
},
computed:{
src(){
return "./../../../../../modeler.html?modelId=" + this.$store.state.flowModel.id//this.$store.modelId;//activiti主html路径
},
apiUrl(){
//被public里的app-cfg.js调用
return [process.env.VUE_APP_BASE_API] + "/basic/activiti6/modeler";//后台部署的api服务
},
token(){
//被public里的modeler.html里的open方法调用
return getToken();//token
}
},
methods:{
goto(){
console.log('goto')
this.$message.success("保存模型成功");
this.$emit("closeSubPage")
// this.$router.push({name:"/sys/activiti"})
}
},
async created(){
let resp=await listUser()
let resp2=await listRole()
console.log(resp2,'1808')
this.userList=resp.rows.map
(
o=>{
return {id:o.userId,name:o.userName}
}
)
this.roleList=resp2.rows.map
(
o=>{
return {id:o.roleId,name:o.roleName}
}
)
console.log(this.userList,this.roleList,'09181333')
//if(resp.data && resp.data.code && resp.data.code==200) this.userList=resp.data
// listUser({}).then(resp)
// {
// if (resp.code == 200) {
// let demo = resp.rows;
// console.log(demo,'demo')
// }
// }
// console.log('地址')
console.log([process.env.VUE_APP_BASE_API] + "/basic/activiti6/modeler/model",'浒苔地址')
window.getMyVue = this;//全局存入当前vue实例供activiti调用
this.isFrameShow=true
}
}
</script>
<style lang="scss" scoped>
.iframe {
width: 100%;
height: calc(100vh - 150px);
}
</style>