vue2-client 1.2.5 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +89 -89
  3. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +2 -2
  4. package/src/config/CreateQueryConfig.js +40 -0
  5. package/src/config/default/setting.config.js +1 -0
  6. package/src/pages/login/Login.vue +8 -4
  7. package/src/pages/system/ticket/index.vue +427 -0
  8. package/src/pages/system/ticket/submitTicketSuccess.vue +249 -0
  9. package/src/router/async/config.async.js +1 -0
  10. package/src/router/async/router.map.js +2 -2
  11. package/src/services/api/EmployeeDetailsViewApi.js +0 -4
  12. package/src/utils/util.js +34 -4
  13. package/vue.config.js +0 -10
  14. package/src/pages/system/applyInstallView/Core.vue +0 -570
  15. package/src/pages/system/applyInstallView/LFComponents/AddPanel.vue +0 -52
  16. package/src/pages/system/applyInstallView/LFComponents/Control.vue +0 -78
  17. package/src/pages/system/applyInstallView/LFComponents/DataDialog.vue +0 -24
  18. package/src/pages/system/applyInstallView/LFComponents/NodePanel.vue +0 -103
  19. package/src/pages/system/applyInstallView/PropertySetting/Base.vue +0 -124
  20. package/src/pages/system/applyInstallView/PropertySetting/CommonProperty.vue +0 -104
  21. package/src/pages/system/applyInstallView/PropertySetting/PropertyDialog.vue +0 -43
  22. package/src/pages/system/applyInstallView/background/base.png +0 -0
  23. package/src/pages/system/applyInstallView/background/click.png +0 -0
  24. package/src/pages/system/applyInstallView/background/download.png +0 -0
  25. package/src/pages/system/applyInstallView/background/end.png +0 -0
  26. package/src/pages/system/applyInstallView/background/push.png +0 -0
  27. package/src/pages/system/applyInstallView/background/start.png +0 -0
  28. package/src/pages/system/applyInstallView/background/step.png +0 -0
  29. package/src/pages/system/applyInstallView/background/time.png +0 -0
  30. package/src/pages/system/applyInstallView/config.js +0 -22
  31. package/src/pages/system/applyInstallView/data.json +0 -1284
  32. package/src/pages/system/applyInstallView/index.vue +0 -34
  33. package/src/pages/system/applyInstallView/registerNode/Connect.vue +0 -43
  34. package/src/pages/system/applyInstallView/registerNode/index.js +0 -16
  35. package/src/pages/system/applyInstallView/registerNode/registerBackEdge.js +0 -44
  36. package/src/pages/system/applyInstallView/registerNode/registerBase.js +0 -139
  37. package/src/pages/system/applyInstallView/registerNode/registerConnect.js +0 -60
  38. package/src/pages/system/applyInstallView/registerNode/registerDownload.js +0 -92
  39. package/src/pages/system/applyInstallView/registerNode/registerEnd.js +0 -110
  40. package/src/pages/system/applyInstallView/registerNode/registerPolyline.js +0 -14
  41. package/src/pages/system/applyInstallView/registerNode/registerPush.js +0 -127
  42. package/src/pages/system/applyInstallView/registerNode/registerStart.js +0 -105
  43. package/src/pages/system/applyInstallView/registerNode/registerStep.js +0 -209
  44. package/src/pages/system/applyInstallView/registerNode/registerTask.js +0 -29
@@ -1,34 +0,0 @@
1
- <template>
2
- <div>
3
- <Core></Core>
4
- </div>
5
- </template>
6
- <script>
7
-
8
- import Core from '@vue2-client/pages/system/applyInstallView/Core'
9
-
10
- export default {
11
- name: 'Test',
12
- data () {
13
- return {
14
- isShowOne: false,
15
- isShowTwo: false
16
- }
17
- },
18
- components: {
19
- Core
20
- },
21
- methods: {
22
- goto () {
23
- this.isShowTwo = false
24
- this.isShowOne = true
25
- },
26
- goto2 () {
27
- this.isShowTwo = true
28
- this.isShowOne = false
29
- }
30
- }
31
- }
32
- </script>
33
- <style scoped>
34
- </style>
@@ -1,43 +0,0 @@
1
- <template>
2
- <div class="connect">
3
- <p>{{ name }}</p>
4
- <p>您好,请问需要买保险吗?</p>
5
- <div class="button-list">
6
- <button @mousedown.stop="done(1)">有保险了</button>
7
- <button @mousedown.stop="done(2)">不需要</button>
8
- <button @mousedown.stop="done(3)">需要</button>
9
- <button @mousedown.stop="done(4)">特殊</button>
10
- </div>
11
- </div>
12
- </template>
13
-
14
- <script>
15
- export default {
16
- props: {
17
- name: String
18
- },
19
- methods: {
20
- done (type) {
21
- this.$emit('select-button', type)
22
- }
23
- }
24
- }
25
- </script>
26
-
27
- <style scoped>
28
- .connect {
29
- width: 100%;
30
- height: 100%;
31
- background: #FFF;
32
- border: 1px solid #9a9a9b;
33
- box-sizing: border-box;
34
- padding: 10px;
35
- }
36
- .connect p {
37
- margin: 0;
38
- }
39
- .button-list {
40
- position: absolute;
41
- bottom: 10px;
42
- }
43
- </style>
@@ -1,16 +0,0 @@
1
-
2
- // svg png 图片资源来自阿里字体库
3
- // [阿里字体库](https://www.iconfont.cn/collections/index?spm=a313x.7781069.1998910419.4)
4
- // svg图标建议使用自己创建的
5
- import registerStart from './registerStart'
6
- import registerBase from './registerBase'
7
- import registerEnd from './registerEnd'
8
- import registerPush from './registerPush'
9
- import registerStep from './registerStep'
10
- import registerDownload from './registerDownload'
11
- import registerPolyline from './registerPolyline'
12
- import registerTask from './registerTask'
13
- import registerConnect from './registerConnect'
14
-
15
- import registerBackEdge from './registerBackEdge'
16
- export { registerBackEdge, registerStart, registerBase, registerEnd, registerPush, registerStep, registerDownload, registerPolyline, registerTask, registerConnect }
@@ -1,44 +0,0 @@
1
- export default function registerBackEdge (lf) {
2
- lf.register('backEdge', ({ PolylineEdge, PolylineEdgeModel }) => {
3
- class SequenceModel extends PolylineEdgeModel {
4
- setAttributes () {
5
- this.offset = 20
6
- }
7
-
8
- getAnimation () {
9
- const animation = super.getAnimation()
10
- animation.stroke = 'blue'
11
- return animation
12
- }
13
-
14
- getEdgeStyle () {
15
- const style = super.getEdgeStyle()
16
- const { properties } = this
17
- if (properties.isActived) {
18
- style.strokeDasharray = '4 4'
19
- }
20
- style.stroke = 'orange'
21
- return style
22
- }
23
-
24
- getTextStyle () {
25
- const style = super.getTextStyle()
26
- style.color = '#3451F1'
27
- style.fontSize = 30
28
- style.background.fill = '#F2F131'
29
- return style
30
- }
31
-
32
- getOutlineStyle () {
33
- const style = super.getOutlineStyle()
34
- style.stroke = 'red'
35
- style.hover.stroke = 'red'
36
- return style
37
- }
38
- }
39
- return {
40
- view: PolylineEdge,
41
- model: SequenceModel
42
- }
43
- })
44
- }
@@ -1,139 +0,0 @@
1
- export default function registerBase (lf, clickPlus, mouseDownPlus, showPropView) {
2
- lf.register('base', ({ PolygonNode, PolygonNodeModel, h }) => {
3
- class Node extends PolygonNode {
4
- getIconShape () {
5
- const { model } = this.props
6
- const { stroke } = model.getNodeStyle()
7
- return h(
8
- 'svg',
9
- {
10
- x: 20,
11
- y: 18,
12
- width: 30,
13
- height: 30,
14
- viewBox: '0 0 1024 1024'
15
- },
16
- h(
17
- 'path',
18
- {
19
- fill: stroke,
20
- d: 'M511.02 884.57l413.96-239-413.96-239.01L97.05 645.57z'
21
- }
22
- ),
23
- h(
24
- 'path',
25
- {
26
- fill: stroke,
27
- d: 'M513.08 617.44l413.97-239.01-413.97-239-413.96 239z'
28
- }
29
- ),
30
- h(
31
- 'path',
32
- {
33
- fill: '#3D4265',
34
- d: 'M694.67 512.6L513.08 617.44 329.43 511.4l181.59-104.84z'
35
- }
36
- )
37
- )
38
- }
39
- getShape () {
40
- const { model } = this.props
41
- const { width, height, x, y, points } = model
42
- const { fill, fillOpacity, strokeWidth, stroke, strokeOpacity } = model.getNodeStyle()
43
- const transform = `matrix(1 0 0 1 ${x - width / 2} ${y - height / 2})`
44
- const pointsPath = points.map(point => point.join(',')).join(' ')
45
- return h(
46
- 'g',
47
- {
48
- transform
49
- },
50
- [
51
- h(
52
- 'polygon',
53
- {
54
- points: pointsPath,
55
- fill,
56
- stroke,
57
- strokeWidth,
58
- strokeOpacity,
59
- fillOpacity
60
- }
61
- ),
62
- this.getIconShape()
63
- ]
64
- )
65
- }
66
- }
67
- class Model extends PolygonNodeModel {
68
- constructor (data, graphModel) {
69
- data.text = {
70
- value: (data.text && data.text.value) || '',
71
- x: data.x,
72
- y: data.y + 50
73
- }
74
- super(data, graphModel)
75
- // 右键菜单自由配置,也可以通过边的properties或者其他属性条件更换不同菜单
76
- this.menu = [
77
- {
78
- className: 'lf-menu-delete',
79
- text: '删除',
80
- callback (node) {
81
- // const comfirm = window.confirm('你确定要删除吗?')
82
- lf.deleteNode(node.id)
83
- }
84
- },
85
- {
86
- text: '编辑文本',
87
- className: 'lf-menu-item',
88
- callback (node) {
89
- lf.editText(node.id)
90
- }
91
- },
92
- {
93
- text: '编辑属性',
94
- className: 'lf-menu-item',
95
- callback (node) {
96
- showPropView(node)
97
- }
98
- },
99
- {
100
- text: '复制',
101
- className: 'lf-menu-item',
102
- callback (node) {
103
- lf.cloneNode(node.id)
104
- }
105
- }
106
- ]
107
- }
108
- initNodeData (data) {
109
- super.initNodeData(data)
110
- const lenght = 35
111
- this.points = [
112
- [lenght, 0],
113
- [lenght * 2, lenght],
114
- [lenght, lenght * 2],
115
- [0, lenght]
116
- ]
117
- }
118
- // 自定义锚点样式
119
- getAnchorStyle () {
120
- const style = super.getAnchorStyle()
121
- style.hover.r = 8
122
- style.hover.fill = 'rgb(24, 125, 255)'
123
- style.hover.stroke = 'rgb(24, 125, 255)'
124
- return style
125
- }
126
- // 自定义节点样式
127
- getNodeStyle () {
128
- const style = super.getNodeStyle()
129
- style.stroke = '#386BF3'
130
- style.strokeWidth = 3
131
- return style
132
- }
133
- }
134
- return {
135
- view: Node,
136
- model: Model
137
- }
138
- })
139
- }
@@ -1,60 +0,0 @@
1
- import Vue from 'vue'
2
- import Connect from './Connect.vue'
3
-
4
- export default function registerConnect (lf) {
5
- lf.register('connect', ({ HtmlNode, HtmlNodeModel }) => {
6
- class ConnectNode extends HtmlNode {
7
- shouldUpdate () {
8
- const { properties } = this.props.model
9
- if (this.currrentProperties && this.currrentProperties !== '{}' && this.currrentProperties === JSON.stringify(properties)) return false
10
- this.currrentProperties = JSON.stringify(properties)
11
- return true
12
- }
13
- setHtml (rootEl) {
14
- // todo: 和react不一样,还没有找到合适的利用vue内置的diff算法来计算节点是否需要更新。
15
- if (!this.shouldUpdate()) return
16
- const { properties } = this.props.model
17
- const el = document.createElement('div')
18
- rootEl.innerHTML = ''
19
- rootEl.appendChild(el)
20
- const Profile = Vue.extend({
21
- render: function (h) {
22
- return h(Connect, {
23
- props: {
24
- name: properties.name
25
- },
26
- on: {
27
- 'select-button': (type) => {
28
- console.log('select-button', type)
29
- }
30
- }
31
- })
32
- }
33
- })
34
- new Profile().$mount(el)
35
- }
36
- }
37
- class ConnectNodeModel extends HtmlNodeModel {
38
- initNodeData (data) {
39
- if (data.text) {
40
- data.text.editable = false
41
- }
42
- super.initNodeData(data)
43
- const width = 300
44
- const height = 150
45
- this.width = width
46
- this.height = height
47
- this.anchorsOffset = [
48
- [width / 2, 0],
49
- [0, height / 2],
50
- [-width / 2, 0],
51
- [0, -height / 2]
52
- ]
53
- }
54
- }
55
- return {
56
- view: ConnectNode,
57
- model: ConnectNodeModel
58
- }
59
- })
60
- }
@@ -1,92 +0,0 @@
1
- const NODE_COLOR = '#9932CC'
2
- export default function registerDownload (lf) {
3
- lf.register('download', ({ PolygonNode, PolygonNodeModel, h }) => {
4
- class Node extends PolygonNode {
5
- getIconShape () {
6
- return h(
7
- 'svg',
8
- {
9
- x: 14,
10
- y: 13,
11
- width: 23,
12
- height: 23,
13
- viewBox: '0 0 1024 1024'
14
- },
15
- h(
16
- 'path',
17
- {
18
- fill: NODE_COLOR,
19
- d: 'M831.513034 319.863005h-95.945189c-17.662265 0-31.980365 14.3181-31.980365 31.980365 0 17.662265 14.3181 31.980365 31.980365 31.980366h64.218604c17.520025 0 31.722492 14.202467 31.722492 31.722492V863.786065c0 17.520025-14.202467 31.722492-31.722492 31.722492H159.66442c-17.520025 0-31.722492-14.202467-31.722493-31.722492V415.546228c0-17.520025 14.202467-31.722492 31.722493-31.722492h64.218603c17.662265 0 31.980365-14.3181 31.980366-31.980366 0-17.662265-14.3181-31.980365-31.980366-31.980365H127.937834c-35.322483 0-63.956637 28.634154-63.956637 63.956637v511.693008c0 35.322483 28.634154 63.956637 63.956637 63.956638h703.5752c35.322483 0 63.956637-28.634154 63.956638-63.956638V383.819642c0-35.32146-28.634154-63.956637-63.956638-63.956637z'
20
- }
21
- ),
22
- h(
23
- 'path',
24
- {
25
- fill: NODE_COLOR,
26
- d: 'M310.382073 521.036817c-12.388145-12.388145-32.473599-12.388145-44.862767 0l-0.364297 0.364297c-12.388145 12.388145-12.388145 32.473599 0 44.862767l190.186573 190.186574c5.818519 6.813173 14.465456 11.137665 24.126491 11.137664h0.515746c9.662057 0 18.307971-4.324492 24.12649-11.137664L694.296883 566.263881c12.388145-12.388145 12.388145-32.473599 0-44.862767l-0.364297-0.364297c-12.388145-12.388145-32.473599-12.388145-44.862767 0L511.706311 658.400325V95.743598c0-17.520025-14.202467-31.722492-31.722492-31.722492h-0.515746c-17.520025 0-31.722492 14.202467-31.722493 31.722492v562.656727L310.382073 521.036817z'
27
- }
28
- )
29
- )
30
- }
31
- getShape () {
32
- const { model } = this.props
33
- const { width, height, x, y, points } = model
34
- const {
35
- fill,
36
- fillOpacity,
37
- strokeWidth,
38
- stroke,
39
- strokeOpacity
40
- } = model.getNodeStyle()
41
- const transform = `matrix(1 0 0 1 ${x - width / 2} ${y - height / 2})`
42
- const pointsPath = points.map(point => point.join(',')).join(' ')
43
- return h(
44
- 'g',
45
- {
46
- transform
47
- },
48
- [
49
- h(
50
- 'polygon',
51
- {
52
- points: pointsPath,
53
- fill,
54
- stroke,
55
- strokeWidth,
56
- strokeOpacity,
57
- fillOpacity
58
- }
59
- ),
60
- this.getIconShape()
61
- ]
62
- )
63
- }
64
- }
65
- class Model extends PolygonNodeModel {
66
- constructor (data, graphModel) {
67
- data.text = {
68
- value: (data.text && data.text.value) || '',
69
- x: data.x,
70
- y: data.y + 50
71
- }
72
- super(data, graphModel)
73
- const lenght = 25
74
- this.points = [
75
- [lenght, 0],
76
- [lenght * 2, lenght],
77
- [lenght, lenght * 2],
78
- [0, lenght]
79
- ]
80
- }
81
- getNodeStyle () {
82
- const style = super.getNodeStyle()
83
- style.stroke = NODE_COLOR
84
- return style
85
- }
86
- }
87
- return {
88
- view: Node,
89
- model: Model
90
- }
91
- })
92
- }
@@ -1,110 +0,0 @@
1
- export default function registerEnd (lf) {
2
- lf.register('end', ({ CircleNode, CircleNodeModel, h }) => {
3
- class EndNode extends CircleNode {
4
- getIconShape () {
5
- const { model } = this.props
6
- const { stroke } = model.getNodeStyle()
7
- const {
8
- x,
9
- y,
10
- width,
11
- height
12
- } = model
13
- return h(
14
- 'svg',
15
- {
16
- x: x - width / 2 + 8,
17
- y: y - height / 2 + 7,
18
- width: 25,
19
- height: 25,
20
- viewBox: '0 0 1024 1024'
21
- },
22
- h(
23
- 'path',
24
- {
25
- fill: stroke,
26
- d: 'M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z'
27
- }
28
- ),
29
- h(
30
- 'path',
31
- {
32
- fill: '#FFFFFF',
33
- d: 'M282.482759 282.482759h459.034482v459.034482H282.482759z'
34
- }
35
- )
36
- )
37
- }
38
- getShape () {
39
- const { model } = this.props
40
- const { x, y, r } = model
41
- const { fill, stroke, strokeWidth } = model.getNodeStyle()
42
- return h(
43
- 'g',
44
- {
45
- },
46
- [
47
- h(
48
- 'circle',
49
- {
50
- cx: x,
51
- cy: y,
52
- r,
53
- fill,
54
- stroke,
55
- strokeWidth
56
- }
57
- ),
58
- this.getIconShape()
59
- ]
60
- )
61
- }
62
- }
63
- class EndModel extends CircleNodeModel {
64
- // 自定义节点形状属性
65
- initNodeData (data) {
66
- data.text = {
67
- value: (data.text && data.text.value) || '',
68
- x: data.x,
69
- y: data.y + 35
70
- }
71
- super.initNodeData(data)
72
- this.r = 20
73
- }
74
- // 自定义节点样式属性
75
- getNodeStyle () {
76
- const style = super.getNodeStyle()
77
- style.stroke = '#D75A4A'
78
- style.strokeWidth = 3
79
- return style
80
- }
81
- // 自定义锚点样式
82
- getAnchorStyle () {
83
- const style = super.getAnchorStyle()
84
- style.hover.r = 8
85
- style.hover.fill = 'rgb(24, 125, 255)'
86
- style.hover.stroke = 'rgb(24, 125, 255)'
87
- return style
88
- }
89
- // 自定义节点outline
90
- getOutlineStyle () {
91
- const style = super.getOutlineStyle()
92
- style.stroke = '#88f'
93
- return style
94
- }
95
- getConnectedSourceRules () {
96
- const rules = super.getConnectedSourceRules()
97
- const notAsTarget = {
98
- message: '终止节点不能作为连线的起点',
99
- validate: () => false
100
- }
101
- rules.push(notAsTarget)
102
- return rules
103
- }
104
- }
105
- return {
106
- view: EndNode,
107
- model: EndModel
108
- }
109
- })
110
- }
@@ -1,14 +0,0 @@
1
- export default function registerPolyline (lf) {
2
- lf.register('polyline', ({ PolylineEdge, PolylineEdgeModel }) => {
3
- class ConnnectionModel extends PolylineEdgeModel {
4
- // eslint-disable-next-line no-useless-constructor
5
- constructor (data, graphModel) {
6
- super(data, graphModel)
7
- }
8
- }
9
- return {
10
- view: PolylineEdge,
11
- model: ConnnectionModel
12
- }
13
- })
14
- }
@@ -1,127 +0,0 @@
1
- export default function registerPush (lf, clickPlus, mouseDownPlus) {
2
- lf.register('push', ({ PolygonNode, PolygonNodeModel, h }) => {
3
- class Node extends PolygonNode {
4
- getIconShape () {
5
- const { model } = this.props
6
- const { stroke } = model.getNodeStyle()
7
- return h(
8
- 'svg',
9
- {
10
- x: 20,
11
- y: 18,
12
- width: 30,
13
- height: 30,
14
- viewBox: '0 0 1024 1024'
15
- },
16
- h(
17
- 'path',
18
- {
19
- fill: stroke,
20
- d: 'M866.461538 39.384615H393.846154c-43.323077 0-78.769231 35.446154-78.769231 78.769231v1.969231c0 13.784615 7.876923 27.569231 19.692308 35.446154 5.907692 3.938462 80.738462 78.769231 80.738461 78.769231 5.907692 5.907692 15.753846 0 15.753846-7.876924 0-15.753846 13.784615-31.507692 29.538462-31.507692h334.769231c15.753846 0 31.507692 15.753846 31.507692 31.507692v531.692308c0 15.753846-15.753846 27.569231-31.507692 27.569231h-334.769231c-15.753846 0-27.569231-11.815385-27.569231-27.569231v-1.969231c0-7.876923-9.846154-11.815385-15.753846-5.907692 0 0-74.830769 74.830769-82.707692 78.769231-11.815385 7.876923-19.692308 19.692308-19.692308 35.446154v39.384615c0 43.323077 33.476923 78.769231 76.8 78.769231h472.615385c43.323077 0 80.738462-35.446154 80.738461-78.769231V118.153846c0-43.323077-35.446154-78.769231-78.769231-78.769231zM630.153846 945.230769c-33.476923 0-59.076923-25.6-59.076923-59.076923s25.6-59.076923 59.076923-59.076923 59.076923 25.6 59.076923 59.076923-25.6 59.076923-59.076923 59.076923z m-86.646154-474.584615L297.353846 224.492308c-11.815385-11.815385-29.538462-11.815385-41.353846 0l-41.353846 41.353846c-11.815385 11.815385-11.815385 29.538462 0 41.353846l90.584615 90.584615c11.815385 11.815385 3.938462 33.476923-13.784615 33.476923H29.538462c-15.753846 1.969231-29.538462 15.753846-29.538462 31.507693v59.076923c0 15.753846 13.784615 29.538462 29.538462 29.538461h259.938461c17.723077 0 25.6 21.661538 13.784615 33.476923l-90.584615 90.584616c-11.815385 11.815385-11.815385 29.538462 0 41.353846l41.353846 41.353846c11.815385 11.815385 29.538462 11.815385 41.353846 0L543.507692 512c9.846154-9.846154 9.846154-29.538462 0-41.353846z'
21
- }
22
- )
23
- )
24
- }
25
- getPulsShape () {
26
- const { model } = this.props
27
- // 判断当前节点是否子节点
28
- const graphData = lf.getGraphData()
29
- const edges = graphData.edges
30
- let hasChildNode = false
31
- edges.some(item => {
32
- if (item.sourceNodeId === model.id) {
33
- hasChildNode = true
34
- return true
35
- }
36
- })
37
- if (hasChildNode) {
38
- return
39
- }
40
- return h(
41
- 'svg',
42
- {
43
- x: 70,
44
- y: 20,
45
- width: 30,
46
- height: 30,
47
- viewBox: '0 0 1024 1024',
48
- class: 'time-plus',
49
- onClick: (e) => clickPlus(e, model),
50
- onMousedown: (e) => mouseDownPlus(e, model),
51
- onMouseUp: (e) => mouseDownPlus(e, model)
52
- },
53
- h(
54
- 'path',
55
- {
56
- fill: '#f17611',
57
- d: 'M512 512m-448 0a448 448 0 1 0 896 0 448 448 0 1 0-896 0Z'
58
- }
59
- ),
60
- h(
61
- 'path',
62
- {
63
- fill: '#ffffff',
64
- d: 'M448 298.666667h128v426.666666h-128z'
65
- }
66
- ),
67
- h(
68
- 'path',
69
- {
70
- fill: '#ffffff',
71
- d: 'M298.666667 448h426.666666v128H298.666667z'
72
- }
73
- )
74
- )
75
- }
76
- getShape () {
77
- const { model } = this.props
78
- const { width, height, x, y, points } = model
79
- const { fill, fillOpacity, strokeWidth, stroke, strokeOpacity } = model.getNodeStyle()
80
- const transform = `matrix(1 0 0 1 ${x - width / 2} ${y - height / 2})`
81
- const pointsPath = points.map(point => point.join(',')).join(' ')
82
- return h(
83
- 'g',
84
- {
85
- transform
86
- },
87
- [
88
- h(
89
- 'polygon',
90
- {
91
- points: pointsPath,
92
- fill,
93
- stroke,
94
- strokeWidth,
95
- strokeOpacity,
96
- fillOpacity
97
- }
98
- ),
99
- this.getIconShape(),
100
- this.getPulsShape()
101
- ]
102
- )
103
- }
104
- }
105
- class Model extends PolygonNodeModel {
106
- constructor (data, graphModel) {
107
- data.text = {
108
- value: (data.text && data.text.value) || '',
109
- x: data.x,
110
- y: data.y + 50
111
- }
112
- super(data, graphModel)
113
- const lenght = 35
114
- this.points = [
115
- [lenght, 0],
116
- [lenght * 2, lenght],
117
- [lenght, lenght * 2],
118
- [0, lenght]
119
- ]
120
- }
121
- }
122
- return {
123
- view: Node,
124
- model: Model
125
- }
126
- })
127
- }