Browse Source

配置修改,记得重新安装

asd26269546 1 year ago
parent
commit
d0362cb4e6
4 changed files with 33 additions and 24 deletions
  1. 1 0
      package.json
  2. 7 7
      src/components/byTable/demo.vue
  3. 1 1
      src/views/index.vue
  4. 24 16
      src/views/process/processConfig/vueFlow.vue

+ 1 - 0
package.json

@@ -20,6 +20,7 @@
     "@antv/x6-plugin-dnd": "^2.0.4",
     "@antv/x6-plugin-history": "^2.1.2",
     "@antv/x6-plugin-keyboard": "^2.2.0",
+    "@antv/x6-plugin-minimap": "^2.0.5",
     "@antv/x6-plugin-selection": "^2.1.5",
     "@antv/x6-plugin-snapline": "^2.1.6",
     "@antv/x6-plugin-stencil": "^2.0.2",

+ 7 - 7
src/components/byTable/demo.vue

@@ -38,14 +38,13 @@
 				<h4>高级检索</h4>
 			</template>
 			<template #default>
-				<div>
-				<el-radio v-model="radio1" label="Option 1" size="large"
-					>Option 1</el-radio
+				<byForm
+					:formConfig="formConfig"
+					:formOption="formOption"
+					v-model="formData"
 				>
-				<el-radio v-model="radio1" label="Option 2" size="large"
-					>Option 2</el-radio
-				>
-				</div>
+					<template #slot> 可自定义所需功能 </template>
+				</byForm>
 			</template>
 			<template #footer>
 				<div style="flex: auto">
@@ -346,6 +345,7 @@ const formConfig = computed(() => {
 				//如果接口回来为stringArray,可以把labelkey和labelval都设置为stringArray
 				labelKey: 'name',
 				labelVal: 'path',
+				method: 'post',
 			},
 			//所有组件的change事件监听
 			fn: (e) => {

+ 1 - 1
src/views/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="app-container home">
-		<byTableDemo></byTableDemo>
+		<!-- <byTableDemo></byTableDemo> -->
 		
 		
 	</div>

+ 24 - 16
src/views/process/processConfig/vueFlow.vue

@@ -3,6 +3,7 @@
 		<div id="container"></div>
 		<div id="stencil"></div>
 		<div id="graph-container"></div>
+		<div id="minimap"></div>
 	</div>
 	<el-button @click="submitAll" type="primary">保存</el-button>
 	<el-dialog
@@ -70,7 +71,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
 import startBtn from './startBtn.vue'
 import endBtn from './endBtn.vue'
 import handleBtn from './handleBtn.vue'
-
+import { MiniMap } from "@antv/x6-plugin-minimap";
 defineProps({
 	title: {
 		type: Object,
@@ -538,6 +539,11 @@ const antvInit = () => {
 			},
 		},
 	})
+	graph.use(
+		new MiniMap({
+			container: document.getElementById("minimap"),
+		})
+	);
 	const stencil = new Stencil({
 		title: '流程图',
 		target: graph,
@@ -767,21 +773,21 @@ const antvInit = () => {
 		component: endBtn,
 		ports: { ...ports },
 	})
-	const r1 = graph.createNode({
-		shape: 'start-btn',
-		label: '开始',
-		zIndex: 100,
-		attrs: {
-			body: {
-				rx: 20,
-				ry: 26,
-			},
-		},
-		data: {
-			title: 80,
-		},
+	// const r1 = graph.createNode({
+	// 	shape: 'start-btn',
+	// 	label: '开始',
+	// 	zIndex: 100,
+	// 	attrs: {
+	// 		body: {
+	// 			rx: 20,
+	// 			ry: 26,
+	// 		},
+	// 	},
+	// 	data: {
+	// 		title: 80,
+	// 	},
 	
-	})
+	// })
 	const r2 = graph.createNode({
 		shape: 'handle-btn',
 		label: '办理',
@@ -834,7 +840,9 @@ onMounted(() => {
 })
 </script>
 <style lang="scss">
-
+#minimap .x6-widget-minimap{
+	border:1px solid #dcdcdc;
+}
 .x6-widget-stencil-group-title {
 	display: none !important;
 }