zydx-plus 1.35.596 → 1.35.598
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.
- package/package.json +1 -1
- package/src/components/buttonGroup/src/buttonGroup.vue +15 -3
- package/src/components/data_table/src/table_head.vue +3 -3
- package/src/components/dragPopup/src/dragPopup.vue +2 -1
- package/src/components/dragPopup2/src/dragPopup.vue +2 -1
- package/src/components/editor/src/editor.vue +3 -1
- package/src/components/editor2/src/editor.vue +155 -133
- package/src/components/flip/src/annotationLayer.css +1 -0
- package/src/components/flip/src/flip.vue +25 -14
- package/src/components/flip/src/icon.css +1478 -0
- package/src/components/flip/src/textLayer.css +1 -0
- package/src/components/mind/src/mind.vue +614 -587
- package/src/components/read/src/read.vue +45 -1
- package/src/components/select/src/select.vue +3 -3
- package/src/components/tipBox/index.js +2 -2
- package/src/components/tipBox/src/main.vue +5 -1
- package/src/index.js +1 -1
|
@@ -1,113 +1,115 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
<div class="mind" :class="{'full-screen':!fullShow}" :ref="id">
|
|
3
|
+
<div class="mind-table">
|
|
4
|
+
<div class="table-left" v-if="!readOnly">
|
|
5
|
+
<button :disabled="mindShow" @click="addNode">添加节点</button>
|
|
6
|
+
<button :disabled="mindShow" @click="brotherNode">兄弟节点</button>
|
|
7
|
+
<button :disabled="mindShow" @click="delNode">删除节点</button>
|
|
8
|
+
<button :disabled="mindShow" @click="associativeLine">关联线</button>
|
|
9
|
+
<button :disabled="mindShow" @click="nodeStyle">节点样式</button>
|
|
10
|
+
<button @click="structure">结构切换</button>
|
|
11
|
+
<button :disabled="retShow" @click="ret">上一步</button>
|
|
12
|
+
<button :disabled="forwardShow" @click="forward">下一步</button>
|
|
13
|
+
<button v-if="protectShow" @click="preservation">保存</button>
|
|
14
|
+
<button @click="fullTap" v-if="fullShow">全屏</button>
|
|
15
|
+
<button @click="fullDel" v-else>退出</button>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div :id="id" class="mindMapContainer"></div>
|
|
19
|
+
<div class="node-style" :ref="id+'e'" :class="{'node-s': trans, 'node-h': !trans}">
|
|
20
|
+
<div class="style-li">
|
|
21
|
+
<img @click="nodeStyle"
|
|
22
|
+
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADTFJREFUeF7t3VmspEUVB/A/r5oYH+TFBF/UFwcSjcsD4oOJaNQXjBERXMBdwRFhcEMdkUWRGVHGfQOVRVEU3AVBdBhGNlcWFRAFFBTcd0UxxVTP3NvTfbu66vxr/Xcy4WG+OlV16vzu+b6+Pc0e0EsZUAbmZmAP5UYZUAbmZ0BAVB3KwBoZEBCVhzIgIKoBZSAuA+ogcXnTqEEyICCDHLS2GZcBAYnLm0YNkgEBGeSgtc24DAhIXN40apAMCMggB61txmXAEshDAewL4B4AWwHcHrckjVIGgjMwqTk34HIANwePDLzQAshbATwTwN5Tc24HcBqATweuRZcpA6EZOBLAi2bU3LUAzgFwUmigRdelAHkMgAsAPHjBJA7I8QCuX7QY/b0ysCADjwBwIoADFlznoOxjkc0UIPcusYDrABwoJEtkTJdOZ8DhOBfAusDUXArgiYHXzr0sFsixAE5YcnIhWTJhunxnBpbFMRm4HsCWlDzGAHkQgLsiJxWSyMQNPCwWxyRlewK4OzZ/MUAeD+Cy2AkBCElC8gYbmorDpWs/ANti8xYD5IUAPhY7oR8nJIkJHGC4BQ6XJvdu18dj8xUD5GgAm2InXDFOSAyS2GkIKxwuPRsAbI7NUwyQ/QFcGDvh1DghMUpkR2Escbi0PBnARbH5iQGyF4BbYyecMU5IDJPZeChrHC4dDwFwW2xeYo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NSwyQQwGcHjuhOodR5voOY4nkMABnxKYrBsgGAKfETrhinDqHQRI7DmGF5BgAm2LzFAPkqQDct+ClvIQjJXvjjLVA8jQA7qtNo14xQB4G4Mao2XYMEo6E5A04NBXJwwHcFJu3GCBurqsBPDpiUuGISJqG3Pe7sY0RedgGYL+IcTuHxAI5GMBZS04sHEsmTJevykAMkn0BbE/JYywQN6f75runB04uHIGJ0mVrZmAZJEcBODU1nylA3NxPAbAZwLo5C3H/61/3jpf7r17KgEUGDvC3W4+cE+wKAIcDuMZislQgbg0PAHAQgCf4P+7z+BcDuATAORaLVAxlYCoDD/QfRpzUnPvrrf7PmQDMvhneAohOTxnoNgMC0u3RamMWGRAQiywqRrcZEJBuj1Ybs8iAgFhkUTG6zYCAdHu02phFBgTEIouK0W0GBKTbo9XGLDIgIBZZVIxuMyAg3R6tNmaRAQGxyKJidJsBAen2aLUxiwwIiEUWFaPbDAhIt0erjVlkQEAssqgY3WZAQLo9Wm3MIgP/B7mSJva6gFwqAAAAAElFTkSuQmCC"
|
|
23
|
+
alt=""/>
|
|
24
|
+
<div class="style-title">文字</div>
|
|
25
|
+
<div class="style-list">
|
|
26
|
+
<div class="node-left zIndex2">
|
|
27
|
+
<span>字号</span>
|
|
28
|
+
<Select :options="optionSize" v-model:value="sizeValue"></Select>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="node-left padd zIndex2">
|
|
31
|
+
<span>行高</span>
|
|
32
|
+
<Select :options="optionRow" v-model:value="rowValue"></Select>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="node-but">
|
|
36
|
+
<button @click="colorTap($event,'color')">颜色</button>
|
|
37
|
+
<button :style="{'background-color': (boldAct)? '#549688': '#fff','color': (boldAct)? '#fff': '#333'}"
|
|
38
|
+
@click="bolds">粗体
|
|
39
|
+
</button>
|
|
40
|
+
<button :style="{'background-color': (italicAct)? '#549688': '#fff','color': (italicAct)? '#fff': '#333'}"
|
|
41
|
+
@click="italics">斜体
|
|
42
|
+
</button>
|
|
43
|
+
<button :style="{'background-color': (scribeAct)? '#549688': '#fff','color': (scribeAct)? '#fff': '#333'}"
|
|
44
|
+
@click="scribes">划线
|
|
45
|
+
</button>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="style-li">
|
|
49
|
+
<div class="style-title">边框</div>
|
|
50
|
+
<div class="style-list">
|
|
51
|
+
<div class="node-left">
|
|
52
|
+
<span>颜色</span>
|
|
53
|
+
<div @click="colorTap($event,'borderColor')" class="backColor"></div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="node-left padd zIndex3">
|
|
56
|
+
<span>样式</span>
|
|
57
|
+
<Select :options="optionLine" v-model:value="styleValue"></Select>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="style-list">
|
|
61
|
+
<div class="node-left zIndex3">
|
|
62
|
+
<span>宽度</span>
|
|
63
|
+
<Select :options="optionWidth" v-model:value="widthValue"></Select>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="node-left padd zIndex4">
|
|
66
|
+
<span>圆角</span>
|
|
67
|
+
<Select :options="optionWidth" v-model:value="filletValue"></Select>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="style-li">
|
|
72
|
+
<div class="style-title">背景</div>
|
|
73
|
+
<div class="style-list">
|
|
74
|
+
<div class="node-left">
|
|
75
|
+
<span>颜色</span>
|
|
76
|
+
<div @click="colorTap($event,'fillColor')" class="backColor"></div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="style-li">
|
|
81
|
+
<div class="style-title">线条</div>
|
|
82
|
+
<div class="style-list">
|
|
83
|
+
<div class="node-left zIndex">
|
|
84
|
+
<span>宽度</span>
|
|
85
|
+
<Select :options="optionWidth" v-model:value="lineValue"></Select>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="node-left padd zIndex">
|
|
88
|
+
<span>样式</span>
|
|
89
|
+
<Select :options="optionLine" v-model:value="lineStyleValue"></Select>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="style-list">
|
|
93
|
+
<div class="node-left">
|
|
94
|
+
<span>颜色</span>
|
|
95
|
+
<div @click="colorTap($event,'lineColor')" class="backColor"></div>
|
|
96
|
+
</div>
|
|
17
97
|
</div>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<Select :options="optionSize" v-model:value="sizeValue"></Select>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="node-left padd zIndex2">
|
|
29
|
-
<span>行高</span>
|
|
30
|
-
<Select :options="optionRow" v-model:value="rowValue"></Select>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="node-but">
|
|
34
|
-
<button @click="colorTap($event,'color')">颜色</button>
|
|
35
|
-
<button :style="{'background-color': (boldAct)? '#549688': '#fff','color': (boldAct)? '#fff': '#333'}"
|
|
36
|
-
@click="bolds">粗体
|
|
37
|
-
</button>
|
|
38
|
-
<button :style="{'background-color': (italicAct)? '#549688': '#fff','color': (italicAct)? '#fff': '#333'}"
|
|
39
|
-
@click="italics">斜体
|
|
40
|
-
</button>
|
|
41
|
-
<button :style="{'background-color': (scribeAct)? '#549688': '#fff','color': (scribeAct)? '#fff': '#333'}"
|
|
42
|
-
@click="scribes">划线
|
|
43
|
-
</button>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
<div class="style-li">
|
|
47
|
-
<div class="style-title">边框</div>
|
|
48
|
-
<div class="style-list">
|
|
49
|
-
<div class="node-left">
|
|
50
|
-
<span>颜色</span>
|
|
51
|
-
<div @click="colorTap($event,'borderColor')" class="backColor"></div>
|
|
52
|
-
</div>
|
|
53
|
-
<div class="node-left padd zIndex3">
|
|
54
|
-
<span>样式</span>
|
|
55
|
-
<Select :options="optionLine" v-model:value="styleValue"></Select>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="style-list">
|
|
59
|
-
<div class="node-left zIndex3">
|
|
60
|
-
<span>宽度</span>
|
|
61
|
-
<Select :options="optionWidth" v-model:value="widthValue"></Select>
|
|
62
|
-
</div>
|
|
63
|
-
<div class="node-left padd zIndex4">
|
|
64
|
-
<span>圆角</span>
|
|
65
|
-
<Select :options="optionWidth" v-model:value="filletValue"></Select>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="style-li">
|
|
70
|
-
<div class="style-title">背景</div>
|
|
71
|
-
<div class="style-list">
|
|
72
|
-
<div class="node-left">
|
|
73
|
-
<span>颜色</span>
|
|
74
|
-
<div @click="colorTap($event,'fillColor')" class="backColor"></div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
<div class="style-li">
|
|
79
|
-
<div class="style-title">线条</div>
|
|
80
|
-
<div class="style-list">
|
|
81
|
-
<div class="node-left zIndex">
|
|
82
|
-
<span>宽度</span>
|
|
83
|
-
<Select :options="optionWidth" v-model:value="lineValue"></Select>
|
|
84
|
-
</div>
|
|
85
|
-
<div class="node-left padd zIndex">
|
|
86
|
-
<span>样式</span>
|
|
87
|
-
<Select :options="optionLine" v-model:value="lineStyleValue"></Select>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
<div class="style-list">
|
|
91
|
-
<div class="node-left">
|
|
92
|
-
<span>颜色</span>
|
|
93
|
-
<div @click="colorTap($event,'lineColor')" class="backColor"></div>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
<div class="style-li">
|
|
98
|
-
<div class="style-title">形状</div>
|
|
99
|
-
<div class="style-list">
|
|
100
|
-
<div class="node-left">
|
|
101
|
-
<span>形状</span>
|
|
102
|
-
<Select :options="optionShape" v-model:value="shapeValue"></Select>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
<div class="back-col" :style="{top: top + 'px'}" v-if="colorShow">
|
|
107
|
-
<Coloring @submit="submit" @empty="empty" @rgba="rgba" :color="color"></Coloring>
|
|
108
|
-
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div class="style-li">
|
|
100
|
+
<div class="style-title">形状</div>
|
|
101
|
+
<div class="style-list">
|
|
102
|
+
<div class="node-left">
|
|
103
|
+
<span>形状</span>
|
|
104
|
+
<Select :options="optionShape" v-model:value="shapeValue"></Select>
|
|
105
|
+
</div>
|
|
109
106
|
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="back-col" :style="{top: top + 'px'}" v-if="colorShow">
|
|
109
|
+
<Coloring @submit="submit" @empty="empty" @rgba="rgba" :color="color"></Coloring>
|
|
110
|
+
</div>
|
|
110
111
|
</div>
|
|
112
|
+
</div>
|
|
111
113
|
</template>
|
|
112
114
|
|
|
113
115
|
<script>
|
|
@@ -116,385 +118,405 @@ import Coloring from '../../coloring/src/coloring.vue'
|
|
|
116
118
|
import MindMap from "simple-mind-map";
|
|
117
119
|
import TouchEvent from 'simple-mind-map/src/plugins/TouchEvent.js'
|
|
118
120
|
import AssociativeLine from 'simple-mind-map/src/plugins/AssociativeLine.js'
|
|
121
|
+
import Export from 'simple-mind-map/src/plugins/Export.js'
|
|
122
|
+
|
|
119
123
|
MindMap.usePlugin(AssociativeLine)
|
|
120
124
|
MindMap.usePlugin(TouchEvent)
|
|
125
|
+
MindMap.usePlugin(Export)
|
|
121
126
|
|
|
122
127
|
export default {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
128
|
+
components: {Select, Coloring},
|
|
129
|
+
name: "zydx-mind",
|
|
130
|
+
data() {
|
|
131
|
+
return {
|
|
132
|
+
id: null,
|
|
133
|
+
mindMap: null,
|
|
134
|
+
mindShow: false,
|
|
135
|
+
retShow: false,
|
|
136
|
+
forwardShow: false,
|
|
137
|
+
optionSize: [
|
|
138
|
+
{label: "12", value: '12'},
|
|
139
|
+
{label: "14", value: '14'},
|
|
140
|
+
{label: "16", value: '16'},
|
|
141
|
+
{label: "18", value: '18'},
|
|
142
|
+
{label: "20", value: '20'},
|
|
143
|
+
{label: "24", value: '24'},
|
|
144
|
+
{label: "26", value: '26'},
|
|
145
|
+
{label: "28", value: '28'},
|
|
146
|
+
{label: "30", value: '30'}
|
|
147
|
+
],
|
|
148
|
+
sizeValue: '18',
|
|
149
|
+
optionRow: [
|
|
150
|
+
{label: "1", value: '1'},
|
|
151
|
+
{label: "1.5", value: '1.5'},
|
|
152
|
+
{label: "2", value: '2'},
|
|
153
|
+
{label: "2.5", value: '2.5'},
|
|
154
|
+
{label: "3", value: '3'}
|
|
155
|
+
],
|
|
156
|
+
rowValue: '1.5',
|
|
157
|
+
optionWidth: [
|
|
158
|
+
{label: "0", value: 0},
|
|
159
|
+
{label: "1", value: 1},
|
|
160
|
+
{label: "2", value: 2},
|
|
161
|
+
{label: "3", value: 3},
|
|
162
|
+
{label: "4", value: 4},
|
|
163
|
+
{label: "5", value: 5},
|
|
164
|
+
{label: "6", value: 6},
|
|
165
|
+
{label: "7", value: 7},
|
|
166
|
+
{label: "8", value: 8},
|
|
167
|
+
{label: "9", value: 9},
|
|
168
|
+
{label: "10", value: 10},
|
|
169
|
+
],
|
|
170
|
+
widthValue: 1,
|
|
171
|
+
filletValue: '5',
|
|
172
|
+
lineValue: '1',
|
|
173
|
+
optionLine: [
|
|
174
|
+
{label: "实线", value: 'none'},
|
|
175
|
+
{label: "虚线", value: '5,5'},
|
|
176
|
+
{label: "点线", value: '1,5'}
|
|
177
|
+
],
|
|
178
|
+
lineStyleValue: 'none',
|
|
179
|
+
styleValue: 'none',
|
|
180
|
+
optionShape: [
|
|
181
|
+
{label: "矩形", value: 'rectangle'},
|
|
182
|
+
{label: "菱形", value: 'diamond'},
|
|
183
|
+
{label: "平行四边形", value: 'parallelogram'},
|
|
184
|
+
{label: "圆角矩形", value: 'roundedRectangle'},
|
|
185
|
+
{label: "八角形", value: 'octagonalRectangle'},
|
|
186
|
+
{label: "外三角矩形", value: 'outerTriangularRectangle'},
|
|
187
|
+
{label: "内三角矩形", value: 'innerTriangularRectangle'},
|
|
188
|
+
{label: "椭圆", value: 'ellipse'},
|
|
189
|
+
{label: "圆", value: 'circle'},
|
|
190
|
+
],
|
|
191
|
+
shapeValue: 'rectangle',
|
|
192
|
+
trans: false,
|
|
193
|
+
colorShow: false,
|
|
194
|
+
top: 0,
|
|
195
|
+
colorData: {},
|
|
196
|
+
activeNodes: null,
|
|
197
|
+
color: 'rgba(84,150,136,1)',
|
|
198
|
+
boldAct: false,
|
|
199
|
+
italicAct: false,
|
|
200
|
+
scribeAct: false,
|
|
201
|
+
defaultData: {
|
|
202
|
+
"data": {
|
|
203
|
+
"text": "根节点"
|
|
204
|
+
},
|
|
205
|
+
"children": []
|
|
206
|
+
},
|
|
207
|
+
fullShow: true,
|
|
208
|
+
layoutList: '',
|
|
209
|
+
updateInit: false,
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
props: {
|
|
213
|
+
data: { // 数据
|
|
214
|
+
type: Object,
|
|
215
|
+
default: {
|
|
216
|
+
"data": {
|
|
217
|
+
"text": "根节点"
|
|
218
|
+
},
|
|
219
|
+
"children": []
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
readOnly: { // 只读
|
|
223
|
+
type: Boolean,
|
|
224
|
+
default: false
|
|
225
|
+
},
|
|
226
|
+
protectShow: {
|
|
227
|
+
type: Boolean,
|
|
228
|
+
default: true
|
|
229
|
+
},
|
|
230
|
+
updateStatus: {
|
|
231
|
+
type: Boolean,
|
|
232
|
+
default: false
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
beforeUnmount() {
|
|
236
|
+
this.mindMap.destroy()
|
|
237
|
+
this.mindMap = null
|
|
238
|
+
},
|
|
239
|
+
watch: {
|
|
240
|
+
readOnly: {
|
|
241
|
+
handler: function (val, oldVal) {
|
|
242
|
+
this.mindMap?.setMode(val ? 'readonly' : 'edit')
|
|
243
|
+
},
|
|
244
|
+
deep: true,
|
|
245
|
+
immediate: true
|
|
246
|
+
},
|
|
247
|
+
data: {
|
|
248
|
+
handler: function (val) {
|
|
249
|
+
if (this.updateInit) return
|
|
250
|
+
if (this.updateStatus) this.updateInit = true
|
|
251
|
+
if (Object.keys(val).length === 0) {
|
|
252
|
+
this.mindMap?.setData(this.defaultData)
|
|
253
|
+
} else {
|
|
254
|
+
this.mindMap?.setData(this.msgFun(val))
|
|
255
|
+
this.mindMap?.setLayout(val.layoutList || 'logicalStructure')
|
|
205
256
|
}
|
|
257
|
+
},
|
|
258
|
+
immediate: true
|
|
206
259
|
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
260
|
+
sizeValue(e) { // 字号
|
|
261
|
+
this.activeNodes.forEach(node => {
|
|
262
|
+
node.setStyle('fontSize', e)
|
|
263
|
+
})
|
|
264
|
+
},
|
|
265
|
+
rowValue(e) { // 行高
|
|
266
|
+
this.activeNodes.forEach(node => {
|
|
267
|
+
node.setStyle('lineHeight', e)
|
|
268
|
+
})
|
|
269
|
+
},
|
|
270
|
+
styleValue(e) { // 粗斜体
|
|
271
|
+
this.activeNodes.forEach(node => {
|
|
272
|
+
node.setStyle('borderDasharray', e)
|
|
273
|
+
})
|
|
274
|
+
},
|
|
275
|
+
widthValue(e) { // 线宽
|
|
276
|
+
this.activeNodes.forEach(node => {
|
|
277
|
+
node.setStyle('borderWidth', e)
|
|
278
|
+
})
|
|
279
|
+
},
|
|
280
|
+
filletValue(e) { // 圆角
|
|
281
|
+
this.activeNodes.forEach(node => {
|
|
282
|
+
node.setStyle('borderRadius', e)
|
|
283
|
+
})
|
|
284
|
+
},
|
|
285
|
+
shapeValue(e) { // 形状
|
|
286
|
+
this.activeNodes.forEach(node => {
|
|
287
|
+
node.setStyle('shape', e)
|
|
288
|
+
})
|
|
289
|
+
},
|
|
290
|
+
lineValue(e) { // 线宽
|
|
291
|
+
this.activeNodes.forEach(node => {
|
|
292
|
+
node.setStyle('lineWidth', e)
|
|
293
|
+
})
|
|
294
|
+
},
|
|
295
|
+
lineStyleValue(e) { // 线宽
|
|
296
|
+
this.activeNodes.forEach(node => {
|
|
297
|
+
node.setStyle('lineDasharray', e)
|
|
298
|
+
})
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
mounted() {
|
|
302
|
+
this.id = this.randomId()
|
|
303
|
+
setTimeout(() => {
|
|
304
|
+
this.init()
|
|
305
|
+
}, 0)
|
|
306
|
+
window.onresize = () => {
|
|
307
|
+
if (!document.fullscreenElement) {
|
|
308
|
+
this.fullShow = true
|
|
228
309
|
}
|
|
310
|
+
this.mindMap.resize()
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
methods: {
|
|
314
|
+
randomId() {
|
|
315
|
+
const id = Math.random().toString(36).substr(2)
|
|
316
|
+
return id.replace(/[0-9]/g, '')
|
|
229
317
|
},
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
immediate: true
|
|
250
|
-
},
|
|
251
|
-
sizeValue(e) { // 字号
|
|
252
|
-
this.activeNodes.forEach(node => {
|
|
253
|
-
node.setStyle('fontSize', e)
|
|
254
|
-
})
|
|
255
|
-
},
|
|
256
|
-
rowValue(e) { // 行高
|
|
257
|
-
this.activeNodes.forEach(node => {
|
|
258
|
-
node.setStyle('lineHeight', e)
|
|
259
|
-
})
|
|
260
|
-
},
|
|
261
|
-
styleValue(e) { // 粗斜体
|
|
262
|
-
this.activeNodes.forEach(node => {
|
|
263
|
-
node.setStyle('borderDasharray', e)
|
|
264
|
-
})
|
|
265
|
-
},
|
|
266
|
-
widthValue(e) { // 线宽
|
|
267
|
-
this.activeNodes.forEach(node => {
|
|
268
|
-
node.setStyle('borderWidth', e)
|
|
269
|
-
})
|
|
270
|
-
},
|
|
271
|
-
filletValue(e) { // 圆角
|
|
272
|
-
this.activeNodes.forEach(node => {
|
|
273
|
-
node.setStyle('borderRadius', e)
|
|
274
|
-
})
|
|
275
|
-
},
|
|
276
|
-
shapeValue(e) { // 形状
|
|
277
|
-
this.activeNodes.forEach(node => {
|
|
278
|
-
node.setStyle('shape', e)
|
|
279
|
-
})
|
|
280
|
-
},
|
|
281
|
-
lineValue(e) { // 线宽
|
|
282
|
-
this.activeNodes.forEach(node => {
|
|
283
|
-
node.setStyle('lineWidth', e)
|
|
284
|
-
})
|
|
285
|
-
},
|
|
286
|
-
lineStyleValue(e) { // 线宽
|
|
287
|
-
this.activeNodes.forEach(node => {
|
|
288
|
-
node.setStyle('lineDasharray', e)
|
|
289
|
-
})
|
|
290
|
-
},
|
|
318
|
+
fullScreen(element) {
|
|
319
|
+
if (element.requestFullScreen) {
|
|
320
|
+
element.requestFullScreen()
|
|
321
|
+
} else if (element.webkitRequestFullScreen) {
|
|
322
|
+
element.webkitRequestFullScreen()
|
|
323
|
+
} else if (element.mozRequestFullScreen) {
|
|
324
|
+
element.mozRequestFullScreen()
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
cancelFullscreen() {
|
|
328
|
+
if (document.exitFullscreen) {
|
|
329
|
+
document.exitFullscreen();
|
|
330
|
+
} else if (document.msExitFullscreen) {
|
|
331
|
+
document.msExitFullscreen();
|
|
332
|
+
} else if (document.mozCancelFullScreen) {
|
|
333
|
+
document.mozCancelFullScreen();
|
|
334
|
+
} else if (document.webkitExitFullscreen) {
|
|
335
|
+
document.webkitExitFullscreen();
|
|
336
|
+
}
|
|
291
337
|
},
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
338
|
+
fullDel() {
|
|
339
|
+
this.fullShow = true
|
|
340
|
+
this.mindMap.view.setTransformData({
|
|
341
|
+
state: {scale: 1, x: 0, y: 0, sx: 0, sy: 0},
|
|
342
|
+
transform: {
|
|
343
|
+
a: 1,
|
|
344
|
+
b: 0,
|
|
345
|
+
c: 0,
|
|
346
|
+
d: 1,
|
|
347
|
+
e: 0,
|
|
348
|
+
f: 0,
|
|
349
|
+
originX: 0,
|
|
350
|
+
originY: 0,
|
|
351
|
+
rotate: 0,
|
|
352
|
+
scaleX: 1,
|
|
353
|
+
scaleY: 1,
|
|
354
|
+
shear: 0,
|
|
355
|
+
translateX: 0,
|
|
356
|
+
translateY: 0
|
|
302
357
|
}
|
|
358
|
+
})
|
|
359
|
+
this.cancelFullscreen()
|
|
303
360
|
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
msg: that.mindMap.getData(),
|
|
436
|
-
layoutList: this.layoutList
|
|
437
|
-
},
|
|
438
|
-
url: ''
|
|
439
|
-
})
|
|
440
|
-
// that.mindMap.doExport.png().then((data) => {
|
|
441
|
-
// that.$emit('preservation', {
|
|
442
|
-
// data: that.mindMap.getData(),
|
|
443
|
-
// url: data
|
|
444
|
-
// })
|
|
445
|
-
// })
|
|
446
|
-
},
|
|
447
|
-
getContent() {
|
|
448
|
-
let that = this
|
|
449
|
-
return new Promise((rl,rs) => {
|
|
450
|
-
rl({
|
|
451
|
-
data: that.mindMap.getData(),
|
|
452
|
-
url: ''
|
|
453
|
-
})
|
|
454
|
-
// that.mindMap.export('png', false, '123213', true).then(r => {
|
|
455
|
-
// rl({
|
|
456
|
-
// data: that.mindMap.getData(),
|
|
457
|
-
// url: r
|
|
458
|
-
// })
|
|
459
|
-
// })
|
|
460
|
-
})
|
|
461
|
-
},
|
|
462
|
-
nodeStyle() {
|
|
463
|
-
this.$refs[`${this.id}e`].style.display = 'block'
|
|
464
|
-
this.$refs[this.id].style.overflow = 'hidden'
|
|
465
|
-
this.trans = !this.trans
|
|
466
|
-
setTimeout(() => {
|
|
467
|
-
this.$refs[this.id].style.overflow = 'visible'
|
|
468
|
-
if (!this.trans) {
|
|
469
|
-
this.$refs[`${this.id}e`].style.display = 'none'
|
|
470
|
-
}
|
|
471
|
-
}, 250)
|
|
472
|
-
},
|
|
473
|
-
// 关联线
|
|
474
|
-
associativeLine() {
|
|
475
|
-
this.mindMap.associativeLine.createLineFromActiveNode()
|
|
476
|
-
},
|
|
477
|
-
// 前进
|
|
478
|
-
forward() {
|
|
479
|
-
this.mindMap.execCommand('FORWARD')
|
|
480
|
-
},
|
|
481
|
-
// 返回
|
|
482
|
-
ret() {
|
|
483
|
-
this.mindMap.execCommand('BACK')
|
|
484
|
-
},
|
|
485
|
-
// 添加节点
|
|
486
|
-
addNode() {
|
|
487
|
-
this.mindMap.execCommand('INSERT_CHILD_NODE')
|
|
488
|
-
},
|
|
489
|
-
// 删除节点
|
|
490
|
-
delNode() {
|
|
491
|
-
this.mindMap.execCommand('REMOVE_NODE')
|
|
492
|
-
},
|
|
493
|
-
// 兄弟节点
|
|
494
|
-
brotherNode() {
|
|
495
|
-
this.mindMap.execCommand('INSERT_NODE')
|
|
361
|
+
// 全屏
|
|
362
|
+
fullTap() {
|
|
363
|
+
this.fullShow = false
|
|
364
|
+
this.fullScreen(document.body)
|
|
365
|
+
},
|
|
366
|
+
msgFun(e) {
|
|
367
|
+
if (e.msg) {
|
|
368
|
+
return Object.keys(e.msg).length === 0 ? this.defaultData : e.msg
|
|
369
|
+
} else {
|
|
370
|
+
return Object.keys(e).length === 0 ? this.defaultData : e
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
// 初始化
|
|
374
|
+
init() {
|
|
375
|
+
const that = this
|
|
376
|
+
this.mindMap = new MindMap({
|
|
377
|
+
el: document.getElementById(that.id),
|
|
378
|
+
enableFreeDrag: false, // 是否开启自由拖拽
|
|
379
|
+
enableNodeTransitionMove: false, // 是否开启节点过渡动画
|
|
380
|
+
layout: that.data.layoutList || 'logicalStructure', // 节点布局方式
|
|
381
|
+
maxHistoryCount: 100, // 最大历史记录数
|
|
382
|
+
maxNodeCacheCount: 100, // 最大节点缓存数
|
|
383
|
+
data: that.msgFun(that.data)
|
|
384
|
+
});
|
|
385
|
+
this.mindMap.setMode(this.readOnly ? 'readonly' : 'edit')
|
|
386
|
+
this.mindMap.on('node_active', (node) => {
|
|
387
|
+
this.mindShow = node === null;
|
|
388
|
+
})
|
|
389
|
+
this.mindMap.on('back_forward', (index, len) => {
|
|
390
|
+
this.retShow = index <= 0;
|
|
391
|
+
this.forwardShow = index >= len - 1
|
|
392
|
+
})
|
|
393
|
+
this.mindMap.on('node_active', (node, activeNodeList) => {
|
|
394
|
+
console.log('activeNodeList', activeNodeList)
|
|
395
|
+
this.activeNodes = activeNodeList
|
|
396
|
+
})
|
|
397
|
+
this.mindMap.on('data_change', (data) => {
|
|
398
|
+
this.$emit('dataChange', {
|
|
399
|
+
data: data,
|
|
400
|
+
url: ''
|
|
401
|
+
})
|
|
402
|
+
})
|
|
403
|
+
},
|
|
404
|
+
scribes() {
|
|
405
|
+
this.scribeAct = !this.scribeAct
|
|
406
|
+
this.activeNodes.forEach(node => {
|
|
407
|
+
node.setStyle('textDecoration', (!this.scribeAct) ? 'none' : 'underline')
|
|
408
|
+
})
|
|
409
|
+
},
|
|
410
|
+
italics() {
|
|
411
|
+
this.italicAct = !this.italicAct
|
|
412
|
+
this.activeNodes.forEach(node => {
|
|
413
|
+
node.setStyle('fontStyle', (!this.italicAct) ? 'normal' : 'italic')
|
|
414
|
+
})
|
|
415
|
+
},
|
|
416
|
+
bolds() {
|
|
417
|
+
this.boldAct = !this.boldAct
|
|
418
|
+
this.activeNodes.forEach(node => {
|
|
419
|
+
node.setStyle('fontWeight', (!this.boldAct) ? 'normal' : 'bold')
|
|
420
|
+
})
|
|
421
|
+
},
|
|
422
|
+
rgba(e) {
|
|
423
|
+
this.colorData.data.target.style.backgroundColor = e.rgba
|
|
424
|
+
},
|
|
425
|
+
submit(e) {
|
|
426
|
+
this.activeNodes.forEach(node => {
|
|
427
|
+
node.setStyle(this.colorData.index, e.rgba)
|
|
428
|
+
})
|
|
429
|
+
this.colorData.data.target.style.backgroundColor = e.rgba
|
|
430
|
+
this.colorShow = false
|
|
431
|
+
},
|
|
432
|
+
empty() {
|
|
433
|
+
this.colorShow = false
|
|
434
|
+
},
|
|
435
|
+
colorTap(e, i) {
|
|
436
|
+
this.colorData = {index: i, data: e}
|
|
437
|
+
let parent = this.colorData.data.target.parentNode.offsetTop + 32
|
|
438
|
+
if (parent > 330) parent = 300
|
|
439
|
+
this.colorShow = !this.colorShow
|
|
440
|
+
this.top = parent
|
|
441
|
+
},
|
|
442
|
+
structure() {
|
|
443
|
+
this.layoutList = 'logicalStructure'
|
|
444
|
+
const layout = this.mindMap.getLayout()
|
|
445
|
+
if (layout === 'mindMap') {
|
|
446
|
+
this.layoutList = 'organizationStructure'
|
|
447
|
+
} else if (layout === 'organizationStructure') {
|
|
448
|
+
this.layoutList = 'logicalStructure'
|
|
449
|
+
} else {
|
|
450
|
+
this.layoutList = 'mindMap'
|
|
451
|
+
}
|
|
452
|
+
this.mindMap.setLayout(this.layoutList)
|
|
453
|
+
},
|
|
454
|
+
// 保存
|
|
455
|
+
preservation() {
|
|
456
|
+
let that = this
|
|
457
|
+
that.$emit('preservation', {
|
|
458
|
+
data: {
|
|
459
|
+
msg: that.mindMap.getData(),
|
|
460
|
+
layoutList: this.layoutList
|
|
461
|
+
},
|
|
462
|
+
url: ''
|
|
463
|
+
})
|
|
464
|
+
// that.mindMap.doExport.png().then((data) => {
|
|
465
|
+
// that.$emit('preservation', {
|
|
466
|
+
// data: that.mindMap.getData(),
|
|
467
|
+
// url: data
|
|
468
|
+
// })
|
|
469
|
+
// })
|
|
470
|
+
},
|
|
471
|
+
getContent() {
|
|
472
|
+
let that = this
|
|
473
|
+
return new Promise((rl, rs) => {
|
|
474
|
+
rl({
|
|
475
|
+
data: that.mindMap.getData(),
|
|
476
|
+
url: ''
|
|
477
|
+
})
|
|
478
|
+
})
|
|
479
|
+
},
|
|
480
|
+
getImage(v) {
|
|
481
|
+
const name = v? v : 'mind'
|
|
482
|
+
this.mindMap.export('png', true, name, true, false, null, true)
|
|
483
|
+
},
|
|
484
|
+
nodeStyle() {
|
|
485
|
+
this.$refs[`${this.id}e`].style.display = 'block'
|
|
486
|
+
this.$refs[this.id].style.overflow = 'hidden'
|
|
487
|
+
this.trans = !this.trans
|
|
488
|
+
setTimeout(() => {
|
|
489
|
+
this.$refs[this.id].style.overflow = 'visible'
|
|
490
|
+
if (!this.trans) {
|
|
491
|
+
this.$refs[`${this.id}e`].style.display = 'none'
|
|
496
492
|
}
|
|
493
|
+
}, 250)
|
|
494
|
+
},
|
|
495
|
+
// 关联线
|
|
496
|
+
associativeLine() {
|
|
497
|
+
this.mindMap.associativeLine.createLineFromActiveNode()
|
|
498
|
+
},
|
|
499
|
+
// 前进
|
|
500
|
+
forward() {
|
|
501
|
+
this.mindMap.execCommand('FORWARD')
|
|
502
|
+
},
|
|
503
|
+
// 返回
|
|
504
|
+
ret() {
|
|
505
|
+
this.mindMap.execCommand('BACK')
|
|
506
|
+
},
|
|
507
|
+
// 添加节点
|
|
508
|
+
addNode() {
|
|
509
|
+
this.mindMap.execCommand('INSERT_CHILD_NODE')
|
|
510
|
+
},
|
|
511
|
+
// 删除节点
|
|
512
|
+
delNode() {
|
|
513
|
+
this.mindMap.execCommand('REMOVE_NODE')
|
|
514
|
+
},
|
|
515
|
+
// 兄弟节点
|
|
516
|
+
brotherNode() {
|
|
517
|
+
this.mindMap.execCommand('INSERT_NODE')
|
|
497
518
|
}
|
|
519
|
+
}
|
|
498
520
|
}
|
|
499
521
|
</script>
|
|
500
522
|
|
|
@@ -502,197 +524,202 @@ export default {
|
|
|
502
524
|
:deep(.custom-select-options li) {
|
|
503
525
|
padding: 0 10px !important;
|
|
504
526
|
}
|
|
527
|
+
|
|
505
528
|
.table-left {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
529
|
+
margin-right: 5px;
|
|
530
|
+
display: flex;
|
|
531
|
+
width: 100%;
|
|
509
532
|
}
|
|
510
533
|
|
|
511
534
|
.node-s {
|
|
512
|
-
|
|
513
|
-
|
|
535
|
+
animation: nodeShow 0.3s;
|
|
536
|
+
display: block;
|
|
514
537
|
}
|
|
515
538
|
|
|
516
539
|
.node-h {
|
|
517
|
-
|
|
540
|
+
animation: nodeHide 0.3s;
|
|
518
541
|
}
|
|
519
542
|
|
|
520
543
|
@keyframes nodeHide {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
544
|
+
0% {
|
|
545
|
+
opacity: 1;
|
|
546
|
+
transform: translateX(0);
|
|
547
|
+
}
|
|
548
|
+
100% {
|
|
549
|
+
opacity: 0;
|
|
550
|
+
transform: translateX(110%);
|
|
551
|
+
}
|
|
529
552
|
}
|
|
530
553
|
|
|
531
554
|
@keyframes nodeShow {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
555
|
+
0% {
|
|
556
|
+
opacity: 0;
|
|
557
|
+
transform: translateX(110%);
|
|
558
|
+
}
|
|
559
|
+
10% {
|
|
560
|
+
opacity: 1;
|
|
561
|
+
transform: translateX(100%);
|
|
562
|
+
}
|
|
563
|
+
100% {
|
|
564
|
+
opacity: 1;
|
|
565
|
+
transform: translateX(0);
|
|
566
|
+
}
|
|
544
567
|
}
|
|
545
568
|
|
|
546
569
|
.zIndex {
|
|
547
|
-
|
|
548
|
-
|
|
570
|
+
position: relative;
|
|
571
|
+
z-index: 30;
|
|
549
572
|
}
|
|
550
573
|
|
|
551
574
|
.zIndex2 {
|
|
552
|
-
|
|
553
|
-
|
|
575
|
+
position: relative;
|
|
576
|
+
z-index: 33;
|
|
554
577
|
}
|
|
555
578
|
|
|
556
579
|
.zIndex3 {
|
|
557
|
-
|
|
558
|
-
|
|
580
|
+
position: relative;
|
|
581
|
+
z-index: 32;
|
|
559
582
|
}
|
|
560
583
|
|
|
561
584
|
.zIndex4 {
|
|
562
|
-
|
|
563
|
-
|
|
585
|
+
position: relative;
|
|
586
|
+
z-index: 31;
|
|
564
587
|
}
|
|
565
588
|
|
|
566
589
|
.backColor {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
590
|
+
width: 93px;
|
|
591
|
+
height: 30px;
|
|
592
|
+
border: 1px solid #ccc;
|
|
593
|
+
border-radius: 3px;
|
|
594
|
+
margin-left: -40px;
|
|
595
|
+
box-shadow: 0 1px 0 1px rgb(0 0 0 / 4%);
|
|
596
|
+
cursor: pointer;
|
|
597
|
+
background-color: #549688;
|
|
575
598
|
}
|
|
576
599
|
|
|
577
600
|
.back-col {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
601
|
+
position: absolute;
|
|
602
|
+
top: 0;
|
|
603
|
+
left: 60px;
|
|
604
|
+
z-index: 40;
|
|
582
605
|
}
|
|
583
606
|
|
|
584
607
|
.node-but {
|
|
585
|
-
|
|
586
|
-
|
|
608
|
+
display: flex;
|
|
609
|
+
padding: 5px 0;
|
|
587
610
|
}
|
|
588
611
|
|
|
589
612
|
.node-but button {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
613
|
+
flex: 1;
|
|
614
|
+
margin-right: 5px;
|
|
615
|
+
background-color: #fff;
|
|
616
|
+
border: 1px solid #ccc;
|
|
617
|
+
border-radius: 3px;
|
|
618
|
+
padding: 5px 10px;
|
|
619
|
+
cursor: pointer;
|
|
620
|
+
font-size: 12px;
|
|
598
621
|
}
|
|
599
622
|
|
|
600
623
|
.node-but button:last-child {
|
|
601
|
-
|
|
624
|
+
margin: 0;
|
|
602
625
|
}
|
|
603
626
|
|
|
604
627
|
.style-title {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
628
|
+
font-size: 16px;
|
|
629
|
+
font-weight: bold;
|
|
630
|
+
padding: 5px 0 10px 0;
|
|
608
631
|
}
|
|
609
632
|
|
|
610
633
|
.mind {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
634
|
+
width: 100%;
|
|
635
|
+
height: 100%;
|
|
636
|
+
position: relative;
|
|
614
637
|
}
|
|
615
638
|
|
|
616
|
-
.table {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
639
|
+
.mind-table {
|
|
640
|
+
background-color: #fff;
|
|
641
|
+
border-radius: 5px;
|
|
642
|
+
box-shadow: rgba(0, 0, 0, 0.06) 0 2px 16px 0;
|
|
643
|
+
z-index: 10;
|
|
621
644
|
}
|
|
622
|
-
|
|
623
|
-
|
|
645
|
+
|
|
646
|
+
.style-li {
|
|
647
|
+
position: relative;
|
|
624
648
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
649
|
+
|
|
650
|
+
.style-li img {
|
|
651
|
+
position: absolute;
|
|
652
|
+
top: 0;
|
|
653
|
+
right: 0;
|
|
654
|
+
z-index: 1;
|
|
655
|
+
width: 15px;
|
|
656
|
+
height: 15px;
|
|
657
|
+
cursor: pointer;
|
|
633
658
|
}
|
|
659
|
+
|
|
634
660
|
.style-list {
|
|
635
|
-
|
|
636
|
-
|
|
661
|
+
display: flex;
|
|
662
|
+
padding: 5px 0;
|
|
637
663
|
}
|
|
638
664
|
|
|
639
665
|
.node-left {
|
|
640
|
-
|
|
641
|
-
|
|
666
|
+
display: flex;
|
|
667
|
+
padding-right: 10px;
|
|
642
668
|
}
|
|
643
669
|
|
|
644
670
|
.node-left > span {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
671
|
+
display: inline-block;
|
|
672
|
+
width: 80px;
|
|
673
|
+
line-height: 32px;
|
|
674
|
+
padding-right: 10px;
|
|
675
|
+
box-sizing: border-box;
|
|
650
676
|
}
|
|
651
677
|
|
|
652
678
|
.padd {
|
|
653
|
-
|
|
679
|
+
padding-right: 0;
|
|
654
680
|
}
|
|
655
681
|
|
|
656
682
|
.node-style {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
683
|
+
position: absolute;
|
|
684
|
+
right: 0;
|
|
685
|
+
top: 50%;
|
|
686
|
+
background-color: #fff;
|
|
687
|
+
border-bottom-left-radius: 5px;
|
|
688
|
+
border-top-left-radius: 5px;
|
|
689
|
+
padding: 20px;
|
|
690
|
+
box-shadow: rgba(0, 0, 0, 0.06) 0 2px 16px 0;
|
|
691
|
+
z-index: 11;
|
|
692
|
+
width: 320px;
|
|
693
|
+
height: 550px;
|
|
694
|
+
margin-top: -270px;
|
|
695
|
+
display: none;
|
|
670
696
|
}
|
|
671
697
|
|
|
672
|
-
.table button {
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
698
|
+
.mind-table button {
|
|
699
|
+
background-color: #fff;
|
|
700
|
+
border: 1px solid #ccc;
|
|
701
|
+
cursor: pointer;
|
|
702
|
+
font-size: 14px;
|
|
703
|
+
height: 30px;
|
|
704
|
+
line-height: 30px;
|
|
705
|
+
flex: 1;
|
|
680
706
|
}
|
|
681
707
|
|
|
682
|
-
.table button:last-child {
|
|
683
|
-
|
|
708
|
+
.mind-table button:last-child {
|
|
709
|
+
margin-right: 0;
|
|
684
710
|
}
|
|
685
711
|
|
|
686
712
|
.mindMapContainer {
|
|
687
|
-
|
|
688
|
-
|
|
713
|
+
width: 100%;
|
|
714
|
+
height: 100%;
|
|
689
715
|
}
|
|
690
|
-
|
|
716
|
+
|
|
717
|
+
:deep(.custom-select) {
|
|
691
718
|
width: 94px;
|
|
692
719
|
margin-left: -40px;
|
|
693
720
|
}
|
|
694
721
|
|
|
695
|
-
.full-screen{
|
|
722
|
+
.full-screen {
|
|
696
723
|
background: #fff;
|
|
697
724
|
width: 100vw;
|
|
698
725
|
height: 100vh;
|