|
3 | 3 | <!-- 左侧节点/放大缩小工具 菜单 --> |
4 | 4 | <div class="toolbarContainer"> |
5 | 5 | <div class="aside-button-group"> |
6 | | - <el-button-group style="margin:10px 0 "> |
7 | | - <el-tooltip class="item" effect="dark" content="放大" placement="bottom"> |
| 6 | + <el-button-group style="margin: 10px 0"> |
| 7 | + <el-tooltip |
| 8 | + class="item" |
| 9 | + effect="dark" |
| 10 | + content="放大" |
| 11 | + placement="bottom" |
| 12 | + > |
8 | 13 | <el-button icon="el-icon-zoom-in" @click="zoomIn"></el-button> |
9 | 14 | </el-tooltip> |
10 | | - <el-tooltip class="item" effect="dark" content="缩小" placement="bottom"> |
| 15 | + <el-tooltip |
| 16 | + class="item" |
| 17 | + effect="dark" |
| 18 | + content="缩小" |
| 19 | + placement="bottom" |
| 20 | + > |
11 | 21 | <el-button icon="el-icon-zoom-out" @click="zoomOut"></el-button> |
12 | 22 | </el-tooltip> |
13 | | - <el-tooltip class="item" effect="dark" content="等比缩放" placement="bottom"> |
14 | | - <el-button @click="autoSize" icon="iconfont icon-expandalt-fill"></el-button> |
| 23 | + <el-tooltip |
| 24 | + class="item" |
| 25 | + effect="dark" |
| 26 | + content="等比缩放" |
| 27 | + placement="bottom" |
| 28 | + > |
| 29 | + <el-button |
| 30 | + @click="autoSize" |
| 31 | + icon="iconfont icon-expandalt-fill" |
| 32 | + ></el-button> |
15 | 33 | </el-tooltip> |
16 | 34 | </el-button-group> |
17 | 35 | </div> |
|
27 | 45 | :key="item['index']" |
28 | 46 | ref="generalToolItems" |
29 | 47 | > |
30 | | - <span class="generalTooltitle">{{item['text']}}</span> |
| 48 | + <span class="generalTooltitle">{{ item["text"] }}</span> |
31 | 49 | </span> |
32 | 50 | </el-collapse-item> |
33 | 51 | <el-collapse-item name="2" class="custom-toolbar"> |
|
36 | 54 | <span |
37 | 55 | v-for="item in toolbarItems" |
38 | 56 | style |
39 | | - :class="{'rectangle-node':item['nodeType']==='rectangle'} " |
| 57 | + :class="{ 'rectangle-node': item['nodeType'] === 'rectangle' }" |
40 | 58 | class="custom-node" |
41 | 59 | :key="item['title']" |
42 | 60 | ref="toolItem" |
43 | 61 | > |
44 | 62 | <img style :src="item['icon']" /> |
45 | 63 | <br /> |
46 | | - <span class="node-title">{{item['title']}}</span> |
| 64 | + <span class="node-title">{{ item["title"] }}</span> |
47 | 65 | </span> |
48 | 66 | </el-collapse-item> |
49 | 67 | <!-- 箭头模板图标 --> |
|
73 | 91 | class="group-item" |
74 | 92 | ref="grouptoolItem" |
75 | 93 | > |
76 | | - <b>{{item.title}}</b> |
| 94 | + <b>{{ item.title }}</b> |
77 | 95 | </li> |
78 | 96 | </ul> |
79 | 97 | </el-collapse-item> |
|
84 | 102 | <el-col :span="4"> |
85 | 103 | <div |
86 | 104 | class="grid-content bg-purple" |
87 | | - style="color: rgb(64, 158, 255);font-weight: 800;font-size: 22px;margin-left: 44px;" |
88 | | - >Easy Editor</div> |
| 105 | + style=" |
| 106 | + color: rgb(64, 158, 255); |
| 107 | + font-weight: 800; |
| 108 | + font-size: 22px; |
| 109 | + margin-left: 44px; |
| 110 | + " |
| 111 | + > |
| 112 | + Easy Editor |
| 113 | + </div> |
89 | 114 | </el-col> |
90 | 115 | <el-col :span="12" class="tools-group"> |
91 | | - <el-tooltip class="item" effect="dark" content="组合" placement="bottom"> |
92 | | - <el-button type="text" icon="iconfont icon-zuhe" @click="enGroup"></el-button> |
| 116 | + <el-tooltip |
| 117 | + class="item" |
| 118 | + effect="dark" |
| 119 | + content="组合" |
| 120 | + placement="bottom" |
| 121 | + > |
| 122 | + <el-button |
| 123 | + type="text" |
| 124 | + icon="iconfont icon-zuhe" |
| 125 | + @click="enGroup" |
| 126 | + ></el-button> |
93 | 127 | </el-tooltip> |
94 | | - <el-tooltip class="item" effect="dark" content="导入xml文件" placement="bottom"> |
95 | | - <el-button type="text" icon="iconfont icon-fileplus-fill" @click="inPutXml"></el-button> |
| 128 | + <el-tooltip |
| 129 | + class="item" |
| 130 | + effect="dark" |
| 131 | + content="导入xml文件" |
| 132 | + placement="bottom" |
| 133 | + > |
| 134 | + <el-button |
| 135 | + type="text" |
| 136 | + icon="iconfont icon-fileplus-fill" |
| 137 | + @click="inPutXml" |
| 138 | + ></el-button> |
96 | 139 | </el-tooltip> |
97 | | - <el-tooltip class="item" effect="dark" content="导出xml文件" placement="bottom"> |
98 | | - <el-button type="text" icon="iconfont icon-xmloutput" @click="outPutXml"></el-button> |
| 140 | + <el-tooltip |
| 141 | + class="item" |
| 142 | + effect="dark" |
| 143 | + content="导出xml文件" |
| 144 | + placement="bottom" |
| 145 | + > |
| 146 | + <el-button |
| 147 | + type="text" |
| 148 | + icon="iconfont icon-xmloutput" |
| 149 | + @click="outPutXml" |
| 150 | + ></el-button> |
99 | 151 | </el-tooltip> |
100 | 152 | <el-tooltip |
101 | 153 | class="item" |
|
107 | 159 | <el-button |
108 | 160 | type="text" |
109 | 161 | icon="iconfont icon-dituleiwanggequ-copy" |
110 | | - @click="showBackground=false" |
| 162 | + @click="showBackground = false" |
111 | 163 | ></el-button> |
112 | 164 | </el-tooltip> |
113 | | - <el-tooltip v-else class="item" effect="dark" content="显示网格背景" placement="bottom"> |
| 165 | + <el-tooltip |
| 166 | + v-else |
| 167 | + class="item" |
| 168 | + effect="dark" |
| 169 | + content="显示网格背景" |
| 170 | + placement="bottom" |
| 171 | + > |
114 | 172 | <el-button |
115 | 173 | type="text" |
116 | 174 | icon="iconfont icon-fangxingweixuanzhong-copy" |
117 | | - @click="showBackground=true" |
| 175 | + @click="showBackground = true" |
118 | 176 | ></el-button> |
119 | 177 | </el-tooltip> |
120 | | - <el-tooltip class="item" effect="dark" content="导出为图片" placement="bottom"> |
121 | | - <el-button type="text" icon="iconfont icon-tupian" @click="showImage"></el-button> |
| 178 | + <el-tooltip |
| 179 | + class="item" |
| 180 | + effect="dark" |
| 181 | + content="导出为图片" |
| 182 | + placement="bottom" |
| 183 | + > |
| 184 | + <el-button |
| 185 | + type="text" |
| 186 | + icon="iconfont icon-tupian" |
| 187 | + @click="showImage" |
| 188 | + ></el-button> |
122 | 189 | </el-tooltip> |
123 | | - <el-tooltip class="item" effect="dark" content="树形布局" placement="bottom"> |
124 | | - <el-button type="text" icon="iconfont icon-Directory-tree"></el-button> |
| 190 | + <el-tooltip |
| 191 | + class="item" |
| 192 | + effect="dark" |
| 193 | + content="树形布局" |
| 194 | + placement="bottom" |
| 195 | + > |
| 196 | + <el-button |
| 197 | + type="text" |
| 198 | + icon="iconfont icon-Directory-tree" |
| 199 | + ></el-button> |
125 | 200 | </el-tooltip> |
126 | | - <el-tooltip class="item" effect="dark" content="撤销" placement="bottom"> |
127 | | - <el-button type="text" icon="iconfont icon-reply" @click="goBack"></el-button> |
| 201 | + <el-tooltip |
| 202 | + class="item" |
| 203 | + effect="dark" |
| 204 | + content="撤销" |
| 205 | + placement="bottom" |
| 206 | + > |
| 207 | + <el-button |
| 208 | + type="text" |
| 209 | + icon="iconfont icon-reply" |
| 210 | + @click="goBack" |
| 211 | + ></el-button> |
128 | 212 | </el-tooltip> |
129 | | - <el-tooltip class="item" effect="dark" content="前进" placement="bottom"> |
130 | | - <el-button type="text" icon="iconfont icon-share" @click="goForward"></el-button> |
| 213 | + <el-tooltip |
| 214 | + class="item" |
| 215 | + effect="dark" |
| 216 | + content="前进" |
| 217 | + placement="bottom" |
| 218 | + > |
| 219 | + <el-button |
| 220 | + type="text" |
| 221 | + icon="iconfont icon-share" |
| 222 | + @click="goForward" |
| 223 | + ></el-button> |
131 | 224 | </el-tooltip> |
132 | | - <el-tooltip class="item" effect="dark" content="删除" placement="bottom"> |
133 | | - <el-button type="text" icon="el-icon-delete-solid" @click="deleteNode"></el-button> |
| 225 | + <el-tooltip |
| 226 | + class="item" |
| 227 | + effect="dark" |
| 228 | + content="删除" |
| 229 | + placement="bottom" |
| 230 | + > |
| 231 | + <el-button |
| 232 | + type="text" |
| 233 | + icon="el-icon-delete-solid" |
| 234 | + @click="deleteNode" |
| 235 | + ></el-button> |
134 | 236 | </el-tooltip> |
135 | 237 | </el-col> |
136 | 238 | <el-col :span="8"> |
137 | 239 | <div |
138 | 240 | class="grid-content bg-purple" |
139 | | - style="display:flex;justify-content: flex-end;padding-right:20px" |
| 241 | + style="display: flex; justify-content: flex-end; padding-right: 20px" |
140 | 242 | > |
141 | | - <el-button round size="medium" @click="loadFlowCase(1)">化工流程案例</el-button> |
142 | | - <el-button round size="medium" @click="loadFlowCase(2)">组件管理案例</el-button> |
143 | | - <el-button round size="medium" @click="loadFlowCase(3)">Vue生命周期案例</el-button> |
| 243 | + <el-button round size="medium" @click="loadFlowCase(1)" |
| 244 | + >化工流程案例</el-button |
| 245 | + > |
| 246 | + <el-button round size="medium" @click="loadFlowCase(2)" |
| 247 | + >组件管理案例</el-button |
| 248 | + > |
| 249 | + <el-button round size="medium" @click="loadFlowCase(3)" |
| 250 | + >Vue生命周期案例</el-button |
| 251 | + > |
144 | 252 | </div> |
145 | 253 | </el-col> |
146 | 254 | </div> |
|
149 | 257 | class="graphContainer" |
150 | 258 | id="graphContainer" |
151 | 259 | ref="container" |
152 | | - :class="{'graphContainer-background':showBackground}" |
| 260 | + :class="{ 'graphContainer-background': showBackground }" |
153 | 261 | ></div> |
154 | 262 | <!-- 右侧栏 --> |
155 | 263 | <div class="right-bar"> |
|
177 | 285 | ref="styleSelect" |
178 | 286 | /> |
179 | 287 | <div class="json-viewer"> |
180 | | - <h4 style="text-align:center">Json数据结构</h4> |
181 | | - <json-viewer :value="jsonData" style="height:80%" copyable sort></json-viewer> |
| 288 | + <h4 style="text-align: center">Json数据结构</h4> |
| 289 | + <json-viewer |
| 290 | + :value="jsonData" |
| 291 | + style="height: 80%" |
| 292 | + copyable |
| 293 | + sort |
| 294 | + ></json-viewer> |
182 | 295 | </div> |
183 | 296 | </div> |
184 | 297 |
|
@@ -676,7 +789,7 @@ export default { |
676 | 789 | let groupObj = _.pick(addCell, ['id', 'title', 'parent', 'geometry']); |
677 | 790 | this.jsonData['cells']['groups'].push(groupObj); |
678 | 791 | } else { |
679 | | - let nodeObj = _.pick(addCell, ['id', , 'title', 'parent', 'geometry']); |
| 792 | + let nodeObj = _.pick(addCell, ['id', 'title', 'parent', 'geometry']); |
680 | 793 | this.jsonData['cells']['nodes'].push(nodeObj); |
681 | 794 | this.$message.info('添加了一个节点'); |
682 | 795 | } |
|
0 commit comments