DrawDesigns.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. <template>
  2. <div>
  3. <div class="bigBox">
  4. <div ref="container" class="container" v-loading="loading"></div>
  5. </div>
  6. <!-- 功能模态框 -->
  7. <AbilityModal v-if="abModal" :fun="fun" :funOne="funOne" :listMap="listMap" :abModal="abModal"
  8. :modelId="modelId" :iedType="iedType" :nodeid="nodeid" @abilityBack="abilityBack">
  9. </AbilityModal>
  10. <LineDouble v-if="ldModal" :ldModal="ldModal" :modelId="modelId" :startTarget="startTarget"
  11. :endTarget="endTarget" :numCase="numCase" :startText="startText" :endText="endText" :lineType="lineType"
  12. @lineBack="lineBack">
  13. </LineDouble>
  14. <GroupModelAdd v-if="groupType" :groupType="groupType" :groupNodeId="groupNodeId" :modelId="modelId"
  15. @groupBack="groupBack"></GroupModelAdd>
  16. </div>
  17. </template>
  18. <script>
  19. import { ref, onMounted, watch, onBeforeUnmount } from 'vue';
  20. import LogicFlow from "@logicflow/core";
  21. import { PolylineEdge, PolylineEdgeModel } from "@logicflow/core";
  22. import cid from '@/api/cid/cid'
  23. import { ElMessage } from 'element-plus';
  24. import { useRouter, useRoute } from 'vue-router';
  25. import AbilityModal from "../drawModal/AbilityModal.vue"
  26. import LineDouble from '../drawModal/LineDouble.vue';
  27. import GroupModelAdd from '../drawModal/GroupModelAdd.vue';
  28. import {
  29. DndPanel,
  30. SelectionSelect,
  31. Group,
  32. Menu,
  33. MiniMap,
  34. regeister,
  35. Snapshot,
  36. lfJson2Xml,
  37. lfXml2Json,
  38. RectResize,
  39. NodeResize,
  40. GroupNode,
  41. groupModel,
  42. } from "@logicflow/extension";
  43. import "@logicflow/core/dist/style/index.css";
  44. import "@logicflow/extension/lib/style/index.css";
  45. export default {
  46. props: {
  47. lineMenuColor: {
  48. type: String,
  49. required: true
  50. },
  51. fatX: {
  52. type: Number,
  53. required: true
  54. },
  55. fatY: {
  56. type: Number,
  57. required: true
  58. },
  59. nowLook: {
  60. type: null || Number,
  61. required: true
  62. },
  63. needObj: {
  64. type: Object,
  65. required: true
  66. },
  67. needId: {
  68. type: Number || String,
  69. required: true
  70. },
  71. needName: {
  72. type: String,
  73. required: true
  74. },
  75. coolObj: {
  76. type: Object,
  77. required: true
  78. },
  79. // 用于判断是sv还是goose
  80. svOrGoose: {
  81. type: Number,
  82. required: true,
  83. },
  84. searchModule: {
  85. type: Function,
  86. required: true
  87. },//父组件insideModule的方法
  88. cleanAll: {
  89. type: Function,
  90. required: true
  91. },//父组件insideModule的方法
  92. },
  93. setup(props, { emit }) {
  94. let router = useRouter()
  95. let route = useRoute()
  96. const container = ref();
  97. const lf = ref();
  98. let lineColor = ref('#255CE7')
  99. let copyColor = ref('')
  100. let delId = ref('')
  101. let nodeId = ref('')
  102. let copyId = ref('')
  103. let setX = ref(0)
  104. let setY = ref(0)
  105. let needMap = ref([])
  106. let coolId = ref('')
  107. let coolName = ref('')
  108. let copyObj = ref({})//整个模型属性
  109. let modelId = ref("")//模型id
  110. let abModal = ref(false)//功能模态框
  111. let iedType = ref("")//iedtype
  112. let ldModal = ref(false)//linemodel.vue开关
  113. let startTarget = ref({})//开始节点
  114. let endTarget = ref({})//结束节点
  115. let numCase = ref(1)//判断sv还是goose
  116. let startText = ref("")//开始节点名称
  117. let endText = ref("")//结束节点名称
  118. let lineType = ref("")//连接线
  119. let loading = ref(false)
  120. let nodeid = ref("")//节点的id
  121. let fun = ref()//储存父节点传来的函数
  122. let funOne = ref()//储存父节点传来的函数
  123. let groupType = ref(false)//GroupModelAdd.vue组件显示与否
  124. let groupNodeId = ref('') //当前设置ied_type的分组节点ID
  125. let modelIedTypes=ref([]) //当前模型已配置的装置类型
  126. watch(() => props.lineMenuColor, (newVal) => {
  127. copyColor.value = newVal
  128. })
  129. watch(() => props.fatX, (newVal) => {
  130. if (newVal == 0 || newVal == '') {
  131. setX.value = 0
  132. } else {
  133. setX.value = newVal
  134. }
  135. })
  136. watch(() => props.fatY, (newVal) => {
  137. if (newVal == 0 || newVal == '') {
  138. setY.value = 0
  139. } else {
  140. setY.value = newVal
  141. }
  142. })
  143. // watch(() => props.needObj, (newVal) => {
  144. // coolObj.value = newVal
  145. // })
  146. watch(() => props.needId, (newVal) => {
  147. coolId.value = newVal
  148. })
  149. watch(() => props.needName, (newVal) => {
  150. coolName.value = newVal
  151. })
  152. watch(() => props.coolObj, (newVal) => {
  153. if (route.query.modelid != '' && route.query.modelid != null && route.query.modelid != undefined) {
  154. return
  155. } else {
  156. loading.value = true//打开加载动画
  157. copyObj.value = newVal
  158. modelId.value = copyObj.value.id//模型id
  159. setTimeout(() => {
  160. cid.getModelInfo({ id: copyObj.value.id, pageno: 1, pagesize: 20 }).then(res => {
  161. modelIedTypes.value = res.data[0].ied_types!=null ? res.data[0].ied_types.split(","):[]
  162. if (res.data[0].relation_json == null || res.data[0].relation_json == '') return;
  163. const origiondata = JSON.parse(res.data[0].relation_json)
  164. lf.value.render(origiondata);//渲染模型图
  165. loading.value = false//关闭加载动画
  166. for (let index = 0; index < origiondata.edges.length; index++) {
  167. const element = origiondata.edges[index];
  168. if (element.properties != null && element.properties["issv"] === 'SV') {
  169. let lineStyle = lf.value.getEdgeModelById(element.id)//.getEdgeStyle();
  170. // console.log(lineStyle)
  171. lineStyle.setProperties({ svEdge: { stroke: 'orange' } })
  172. }
  173. }
  174. })
  175. }, 2000);
  176. }
  177. }, {
  178. deep: true
  179. })
  180. watch(() => props.svOrGoose, (newVal) => {
  181. numCase.value = newVal
  182. })
  183. function blue() {
  184. lf.value.setTheme({
  185. baseEdge: {
  186. stroke: '#255CE7',
  187. strokeWidth: 2,
  188. },
  189. });//设置连接线为蓝色
  190. }
  191. function orange() {
  192. lf.value.setTheme({
  193. svEdge: {
  194. stroke: 'orange',
  195. strokeWidth: 2,
  196. },
  197. });//设置连接线为橙色
  198. }
  199. function delLine() {
  200. if (delId.value!="") {
  201. lf.value.deleteEdge(delId.value)//删除选择的连接线
  202. }
  203. if (nodeId.value!="") {
  204. lf.value.deleteNode(nodeId.value)//删除节点
  205. }
  206. }
  207. function saveLine() {
  208. // lf.value.getSnapshot()//保存为图片
  209. //console.log(JSON.stringify(lf.value.getGraphData()))
  210. const xml = lfJson2Xml(lf.value.getGraphData());
  211. const data = JSON.stringify(lf.value.getGraphData())
  212. if (modelId.value != undefined && modelId.value != null && modelId.value != '') {
  213. cid.saveMap(
  214. {
  215. id: modelId.value - 0,
  216. relation_json: data,
  217. }
  218. ).then(res => {
  219. if (res.code == 0) {
  220. ElMessage({
  221. type: "success",
  222. message: "保存成功!",
  223. duration: 2000,
  224. })
  225. if(res.data!=null && res.data!=""){
  226. modelIedTypes.value = res.data.IedTypes!=null ?res.data.IedTypes.split(","):[]
  227. }
  228. } else {
  229. ElMessage({
  230. message: res.msg,
  231. type: "error"
  232. })
  233. }
  234. }).catch(res => {
  235. ElMessage({
  236. message: "操作失败:服务器发生异常",
  237. type: "error"
  238. })
  239. })
  240. } else {
  241. cid.saveMap(
  242. {
  243. id: copyObj.value.id - 0,
  244. relation_json: data,
  245. }
  246. ).then(res => {
  247. if (res.code == 0) {
  248. ElMessage({
  249. type: "success",
  250. message: "保存成功!",
  251. duration: 2000,
  252. })
  253. } else {
  254. ElMessage({
  255. message: res.msg,
  256. type: "error"
  257. })
  258. }
  259. })
  260. }
  261. }
  262. function cleanMap() {
  263. lf.value.clearData()
  264. }
  265. function textColor() {
  266. if (lineColor.value == "#255CE7") {
  267. lf.value.setTheme({
  268. svEdge: {
  269. stroke: "orange",
  270. strokeWidth: 2,
  271. },
  272. });
  273. lineColor.value = 'orange'
  274. } else {
  275. lf.value.setTheme({
  276. baseEdge: {
  277. stroke: "#255CE7",
  278. strokeWidth: 2,
  279. },
  280. });
  281. lineColor.value = '#255CE7'
  282. }
  283. }
  284. function momal() {
  285. lf.value.graphModel.moveNode2Coordinate(copyId.value, setX.value - 0, setY.value - 0, true);
  286. }
  287. function lastRender() {
  288. loading.value = true
  289. modelId.value = route.query.modelid
  290. cid.getModelInfo({ id: modelId.value - 0,is_sys:0, pageno: 1, pagesize: 20 }).then(res => {
  291. modelIedTypes.value = res.data[0].ied_types!=null ? res.data[0].ied_types.split(","):[]
  292. if (res.data[0].relation_json == null || res.data[0].relation_json == '') return;
  293. const origiondata = JSON.parse(res.data[0].relation_json)
  294. lf.value.render(origiondata);
  295. loading.value = false
  296. for (let index = 0; index < origiondata.edges.length; index++) {
  297. const element = origiondata.edges[index];
  298. if (element.properties != null && element.properties["issv"] === 'SV') {
  299. let lineStyle = lf.value.getEdgeModelById(element.id)
  300. lineStyle.setProperties({ svEdge: { stroke: 'orange' } })
  301. }
  302. }
  303. }, { immediate: true })
  304. }
  305. function listMap() {
  306. fun.value = props.searchModule
  307. funOne.value = props.cleanAll
  308. coolId.value = props.needId
  309. coolName.value = props.needName//模型名称
  310. copyObj.value = props.coolObj//需要的模型信息对象
  311. numCase.value = props.svOrGoose//判断sv或者goose类型
  312. copyColor.value = props.lineMenuColor//颜色
  313. setTimeout(() => {
  314. cid.getModelInfo({ id: copyObj.value.id ? copyObj.value.id : route.query.modelid - 0,is_sys:copyObj.value.id?1:2, pageno: 1, pagesize: 20 }).then(res => {
  315. emit("drawCor", res.data)
  316. const filteredArray = res.data[0].ied_type.filter(param => param !== null)
  317. let groups = {
  318. type: "my-group",
  319. label: "分组",
  320. id: "952",
  321. resizable: true,//手动调整大小
  322. foldable: true,//展开收起
  323. children: [],
  324. width: 5,
  325. height: 5,
  326. x: 0,
  327. y: 0,
  328. isShowAnchor: true,//锚点
  329. }
  330. needMap.value = filteredArray.map(item => {
  331. return {
  332. type: 'rect',
  333. text: item.name,
  334. label: item.name,
  335. icon: '',
  336. id: item.id,
  337. properties: {
  338. ied_type: item.code,
  339. id: item.id
  340. },
  341. }
  342. })
  343. needMap.value.push(groups)
  344. // lf.value.register(logicFlows)
  345. lf.value.extension.dndPanel.setPatternItems(needMap.value);
  346. console.log('执行了渲染.....', route.query);
  347. if (route.query.modelid != '' && route.query.modelid != null && route.query.modelid != undefined) {
  348. lastRender()
  349. }
  350. setTimeout(() => {
  351. loading.value = false
  352. }, 1000)
  353. })
  354. }, 1000);
  355. }
  356. onMounted(() => {
  357. lf.value = new LogicFlow({
  358. // 通过选项指定了渲染的容器和需要显示网格
  359. container: container.value,//需要显示画布的容器ref
  360. // grid: {
  361. // size: 10,
  362. // visible: false,
  363. // type: "mesh",
  364. // config: {
  365. // color: "#ababab",
  366. // thickness: 1,
  367. // },
  368. // },//网格,
  369. grid: true,
  370. plugins: [DndPanel, SelectionSelect, Group, GroupNode, Menu, MiniMap, Snapshot, RectResize, NodeResize],//全局加载的组件
  371. keyboard: {
  372. enabled: true
  373. },
  374. snapline: true,//辅助线
  375. edgeTextDraggable: true,//连接线文本可以拖拽
  376. })
  377. class SvEdge extends PolylineEdge { }
  378. // 节点Model
  379. class SvEdgeModel extends PolylineEdgeModel {
  380. getEdgeStyle() {
  381. const stl = super.getEdgeStyle()
  382. stl.stroke = 'orange'
  383. return stl
  384. }
  385. }
  386. class GooseEdge extends PolylineEdge { }
  387. // 节点Model
  388. class GooseEdgeModel extends PolylineEdgeModel {
  389. getEdgeStyle() {
  390. const stl = super.getEdgeStyle()
  391. stl.stroke = '#255CE7'
  392. return stl
  393. }
  394. }
  395. class MyGroup extends GroupNode.view {
  396. }
  397. class MyGroupModel extends GroupNode.model {
  398. initNodeData(data) {
  399. data.text = ""//{"value":"未命名组","x":10,"y":5,"editable":true}
  400. //data.id=(new Date().getTime())+"";
  401. super.initNodeData(data);
  402. this.width = 200;
  403. this.height = 150;
  404. this.foldedWidth = 100;
  405. this.foldedHeight = 100;
  406. }
  407. setAttributes() {
  408. this.resizable = true;
  409. this.foldable = false; //不允许收起来
  410. this.isShowAnchor = false;
  411. }
  412. getNodeStyle() {
  413. const stl = super.getNodeStyle()
  414. stl.strokeDasharray = '4 4'
  415. //stl.stroke="rgb(255,255,255)"
  416. return stl
  417. }
  418. getAnchorStyle(anchorInfo) {
  419. const style = super.getAnchorStyle(anchorInfo);
  420. style.stroke = "rgb(24, 125, 255)";
  421. style.r = 5;
  422. style.hover.r = 8;
  423. style.hover.fill = "rgb(24, 125, 255)";
  424. style.hover.stroke = "rgb(24, 125, 255)";
  425. return style;
  426. }
  427. getTextStyle() {
  428. const style = super.getTextStyle();
  429. style.fontSize = 12;
  430. style.color = "#666"
  431. style.textAlign = "left"
  432. return style;
  433. }
  434. }
  435. lf.value.register({
  436. type: "svEdge",
  437. view: SvEdge,
  438. model: SvEdgeModel,
  439. })
  440. lf.value.register({
  441. type: "baseEdge",
  442. view: GooseEdge,
  443. model: GooseEdgeModel,
  444. })
  445. lf.value.register({
  446. type: "my-group",
  447. model: MyGroupModel,
  448. view: MyGroup,
  449. });
  450. lf.value.setTheme({//设置画布
  451. rect: {
  452. fill: "#FFFFFF",
  453. stroke: "#255CE7",
  454. strokeWidth: 2,
  455. },//放置的元素
  456. snapline: {
  457. stroke: 'black', // 对齐线颜色
  458. strokeWidth: 1, // 对齐线宽度
  459. },
  460. edgeText: {
  461. textWidth: 100,
  462. overflowMode: "default",
  463. fontSize: 18,
  464. background: {
  465. fill: "#FFFFFF",
  466. },
  467. },//连接线w文字样式
  468. outline: {
  469. fill: "transparent",
  470. stroke: "#949494",
  471. strokeDasharray: "3,3",
  472. hover: {
  473. stroke: "#949494",
  474. },
  475. },
  476. anchor: {
  477. stroke: "#000000",
  478. fill: "#FFFFFF",
  479. r: 4,
  480. hover: {
  481. fill: "#949494",
  482. fillOpacity: 0.5,
  483. stroke: "#949494",
  484. r: 10,
  485. },
  486. },//锚点样式
  487. baseEdge: {
  488. stroke: "#255CE7",
  489. strokeWidth: 2,
  490. },//连接线颜色
  491. svEdge: {
  492. stroke: "orange",
  493. strokeWidth: 1,
  494. },//连接线颜色
  495. nodeText: {
  496. color: "#255CE7",
  497. overflowMode: "autoWrap",
  498. lineHeight: 1.2,
  499. fontSize: 12,
  500. },//节点内文字样式
  501. });
  502. lf.value.on("edge:add", function (data, e, position) {
  503. if (copyColor.value == '#255CE7') {
  504. blue()
  505. lf.value.changeEdgeType(data.data.id, "baseEdge")
  506. lf.value.setProperties(data.data.id, { 'issv': 'GOOSE' })
  507. }
  508. if (copyColor.value == 'orange') {
  509. orange()
  510. lf.value.changeEdgeType(data.data.id, "svEdge")
  511. lf.value.setProperties(data.data.id, { 'issv': 'SV' })
  512. }
  513. })
  514. lf.value.on('node:click', function (data, e, position) {//传送坐标轴参数到父组件
  515. copyId.value = data.data.id
  516. nodeId.value = data.data.id
  517. delId.value = "" //清除选择的连线ID
  518. setX.value = data.data.x
  519. setY.value = data.data.y
  520. emit("backxy", setX.value, setY.value)
  521. })
  522. // lf.value.on('anchor:drop', function (data, e, position) {//添加线上文字
  523. // if (numCase.value == 0) {
  524. // lf.value.graphModel.updateText(data.edgeModel.id, "SV");
  525. // } else if (numCase.value == 1) {
  526. // lf.value.graphModel.updateText(data.edgeModel.id, "GOOSE");
  527. // }
  528. // })
  529. lf.value.on('node:dbclick', function (data, e, position) {//双击打开弹窗
  530. if(!modelIedTypes.value.includes(data.data.properties.ied_type)){
  531. ElMessage({
  532. type: "info",
  533. message: "当前节点为新节点或装置编码发生更改,请先保存当前模型关系配置"
  534. })
  535. return
  536. }
  537. iedType.value = data.data.properties.ied_type
  538. nodeid.value = data.data.properties.id
  539. delId.value=""
  540. abModal.value = true
  541. })
  542. lf.value.on('edge:dbclick', function (data, e, position) {//双击连接线
  543. nodeId.value = "" //清除选择的节点Id
  544. let start = lf.value.getNodeModelById(data.data.sourceNodeId)//获取连线开始节点
  545. let end = lf.value.getNodeModelById(data.data.targetNodeId)//获取连线结尾节点
  546. if(!modelIedTypes.value.includes(start.properties.ied_type) ||!modelIedTypes.value.includes(end.properties.ied_type)){
  547. ElMessage({
  548. type: "info",
  549. message: "当前关系中存在新节点或装置编码发生更改,请先保存当前模型关系配置"
  550. })
  551. return
  552. }
  553. lineType.value = data.data.properties.issv
  554. startText.value = start.text.value//开始文本
  555. endText.value = end.text.value//结束文本
  556. startTarget.value = start.properties
  557. endTarget.value = end.properties
  558. ldModal.value = true
  559. })
  560. lf.value.on('node:mousemove', function (data, e) {//传递坐标轴参数到父组件
  561. setX.value = data.data.x
  562. setY.value = data.data.y
  563. emit("backxy", setX.value, setY.value)
  564. })
  565. // console.log(lf.value.graphModel,'sss');
  566. lf.value.on('edge:click', function (data, e, position) {//解决点击连接线问题
  567. delId.value = data.data.id
  568. nodeId.value = "" //清除选择的节点Id
  569. if (copyColor.value == '#255CE7') {
  570. blue()
  571. lf.value.changeEdgeType(data.data.id, "baseEdge")
  572. lf.value.setProperties(data.data.id, { 'issv': 'GOOSE' })
  573. }
  574. if (copyColor.value == 'orange') {
  575. orange()
  576. lf.value.changeEdgeType(data.data.id, "svEdge")
  577. lf.value.setProperties(data.data.id, { 'issv': 'SV' })
  578. }
  579. })
  580. //当将节点托入画布后触发事件
  581. lf.value.on('node:dnd-add', function (nodedata) {
  582. if (nodedata.data.type == 'my-group') {
  583. // 添加的是分组节点,需要打开一个窗口让用户设置该节点的ied_type并保存到properties中
  584. let ied_type = "TMP"
  585. const g = lf.value.getNodeModelById(nodedata.data.id);
  586. g.setProperties({
  587. ied_type: ied_type,
  588. id: '-99' //分组的装置类型id固定为-99
  589. });
  590. groupNodeId.value = nodedata.data.id
  591. groupType.value = true
  592. }
  593. })
  594. lf.value.on("node:resize", function (data) {
  595. //if(data.oldNodeSize.type!="my-group") return;
  596. })
  597. lf.value.render();
  598. listMap()
  599. })
  600. function abilityBack(data) {
  601. abModal.value = data
  602. }
  603. function lineBack(data) {
  604. ldModal.value = data
  605. }
  606. // GroupModelAdd.vue返回状态
  607. function groupBack(data) {
  608. groupType.value = data.show
  609. //设置窗口关闭时
  610. if (!data.show && data.ied_type != '') {
  611. //更新分组的装置类型编码属性ied_type
  612. const g = lf.value.getNodeModelById(data.groupNodeId);
  613. g.setProperties({
  614. ied_type: data.ied_type,
  615. });
  616. } else {
  617. //未设置装置编码,自动删除
  618. lf.value.deleteNode(data.groupNodeId)
  619. }
  620. }
  621. onBeforeUnmount(() => {
  622. // lf.value.remove()
  623. // coolObj.value = {}
  624. router.push("/home/setting")
  625. })
  626. return {
  627. container,
  628. lf,
  629. textColor,
  630. lineColor,
  631. blue,
  632. orange,
  633. delLine,
  634. saveLine,
  635. cleanMap,
  636. nodeId,
  637. copyColor,
  638. copyId,
  639. setX,
  640. setY,
  641. momal,
  642. needMap,
  643. coolId,
  644. coolName,
  645. copyObj,//模型整个数据
  646. modelId,//模型id
  647. abModal,//功能模态框
  648. iedType,//模型属性
  649. abilityBack,//abilitymodal.vue返回模态框开关状态
  650. ldModal,//lineDouble.vue模态框开关
  651. startTarget,//开始节点
  652. endTarget,//结束节点
  653. lineBack,//LineDouble.vue返回模态框开关状态
  654. numCase,//判断是sv还是goose,0为sv,1为goose
  655. startText,//开始节点名称
  656. endText,//结束节点名称
  657. lineType,//连接线
  658. lastRender,//路由跳转的渲染
  659. loading,
  660. nodeid,//节点的id
  661. fun,//储存父节点传来的函数
  662. listMap,//组件初始化
  663. funOne,//储存父节点传来的函数
  664. groupType,//GroupModelAdd.vue组件显示与否
  665. groupNodeId,
  666. groupBack,// GroupModelAdd.vue返回状态
  667. }
  668. },
  669. components: {
  670. AbilityModal,//功能模态框
  671. LineDouble,//连接线模态框
  672. GroupModelAdd,//分组专属模态框
  673. }
  674. }
  675. </script>
  676. <style scoped>
  677. .container {
  678. width: 100%;
  679. height: calc(100vh - 18rem);
  680. /* overflow: auto; */
  681. }
  682. :deep(.lf-element-text) {
  683. color: black;
  684. }
  685. /* :deep(.lf-dndpanel){
  686. w
  687. } */
  688. /* :deep(.lf-basic-shape) {
  689. width: 150px;
  690. height: 150px;
  691. } */
  692. </style>