2019-12-04 10:12:10 +08:00
|
|
|
<template>
|
|
|
|
|
<div>
|
2020-10-09 17:42:11 +08:00
|
|
|
<el-button size="small" style="float:right;margin-top:6px;margin-right:6px;" @click="saveXML">导出XML</el-button>
|
|
|
|
|
<el-button size="small" style="float:right;margin-top:6px;margin-right:6px;" @click="saveImg">导出图片</el-button>
|
|
|
|
|
<el-button size="small" style="float:right;margin-top:6px;margin-right:6px;" @click="save">保存流程</el-button>
|
2020-10-24 17:04:04 +08:00
|
|
|
<gva-wfd ref="wfd" :data="demoData" :height="600" :users="users" :authorities="authorities" :groups="groups" :categorys="categorys" :lang="lang" />
|
2019-12-04 10:12:10 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2020-10-09 16:11:46 +08:00
|
|
|
|
|
|
|
|
|
2020-10-24 17:04:04 +08:00
|
|
|
import gvaWfd from '@/components/gva-wfd'
|
|
|
|
|
import {getUserList} from '@/api/user'
|
|
|
|
|
import {getAuthorityList} from '@/api/authority'
|
2019-12-04 10:12:10 +08:00
|
|
|
export default {
|
2019-12-04 11:17:15 +08:00
|
|
|
name: 'Workflow',
|
2020-10-09 16:11:46 +08:00
|
|
|
components:{
|
2020-10-24 17:04:04 +08:00
|
|
|
gvaWfd
|
2020-10-09 16:11:46 +08:00
|
|
|
},
|
|
|
|
|
data () {
|
2019-12-04 10:12:10 +08:00
|
|
|
return {
|
2020-10-09 16:11:46 +08:00
|
|
|
lang: "zh",
|
|
|
|
|
demoData: {},
|
2020-10-24 17:04:04 +08:00
|
|
|
users: [],
|
|
|
|
|
authorities:[],
|
2020-10-09 17:42:11 +08:00
|
|
|
groups: [{id:'1',name:'组1'},{id:'2',name:'组2'},{id:'3',name:'组3'}],
|
2020-10-24 17:04:04 +08:00
|
|
|
categorys:[{id:'1',name:'分类1'},{id:'2',name:'分类2'},{id:'3',name:'分类3'},{id:'4',分组:'分组4'}]
|
2019-12-04 10:12:10 +08:00
|
|
|
}
|
|
|
|
|
},
|
2020-10-09 16:11:46 +08:00
|
|
|
methods:{
|
|
|
|
|
save(){
|
|
|
|
|
console.log(this.$refs['wfd'].graph.save())
|
2020-10-09 17:42:11 +08:00
|
|
|
},
|
|
|
|
|
saveXML(){
|
|
|
|
|
console.log(this.$refs['wfd'].graph.saveXML())
|
|
|
|
|
},
|
|
|
|
|
saveImg(){
|
|
|
|
|
console.log(this.$refs['wfd'].graph.saveImg())
|
2019-12-04 10:12:10 +08:00
|
|
|
}
|
2020-10-24 17:04:04 +08:00
|
|
|
},
|
|
|
|
|
async created(){
|
|
|
|
|
const userRes = await getUserList({page:1,pageSize:9999999})
|
|
|
|
|
if(userRes.code == 0){
|
|
|
|
|
userRes.data.list.map(item=>{
|
|
|
|
|
this.users.push({id:item.ID,name:item.nickName})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const authorityRes = await getAuthorityList({page:1,pageSize:9999999})
|
|
|
|
|
if(authorityRes.code == 0){
|
|
|
|
|
authorityRes.data.list.map(item=>{
|
|
|
|
|
this.authorities.push({id:item.authorityId,name:item.authorityName})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
2019-12-04 10:12:10 +08:00
|
|
|
}
|
2020-10-09 16:11:46 +08:00
|
|
|
</script>
|