1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
| <template>
| <node title="发起人" :is-root="true" :content="content"
| @selected="$emit('selected')" @insertNode="type => $emit('insertNode', type)"
| placeholder="所有人" :header-bgc="headerBgc" header-icon="el-icon-user-solid"/>
| </template>
|
| <script>
| import Node from './Node.vue'
|
| export default {
| name: "RootNode",
| components: {Node},
| props:{
| config:{
| type: Object,
| default: () => {
| return {}
| }
| }
| },
| computed:{
| content(){
| if (this.config.props.assignedUser.length > 0){
| let texts = []
| this.config.props.assignedUser.forEach(org => texts.push(org.writer_name))
| return String(texts).replaceAll(',', '、')
| } else {
| return '所有人'
| }
| },
| // flowText(){
| // const config = this.config
| // console.log("flowText-config",config);
| // if(config.approvalArr!==undefined){
| // return "发起时间:"+config.approvalArr.filter(ite=>ite.node_id===config.id)[0].approval_time;
| // }
| // return ''
| // },
| headerBgc() {
| if (this.$store.state.diagramMode === 'viewer') {
| return this.config.props.headerBgc
| } else {
| return '#576a95'
| }
| },
| },
| data() {
| return {
| }
| },
| methods: {}
| }
| </script>
|
| <style scoped>
|
| </style>
|
|