Эх сурвалжийг харах

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

lxf 1 жил өмнө
parent
commit
4b43691234

+ 5 - 2
src/components/headerBar/header-bar.vue

@@ -135,11 +135,13 @@
         </div>
       </ul>
       <div class="fr">
-        <el-badge :value="12" class="badge">
+        <!-- :value="12" -->
+        <el-badge style="cursor: pointer;" class="badge" @click="noticeTableModal = true">
           <el-icon :size="20">
             <BellFilled />
           </el-icon>
         </el-badge>
+        <notice v-model='noticeTableModal'></notice>
         <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
           <div class="dropdown-box">
             {{ userData }}
@@ -168,6 +170,7 @@ import Cookies from "js-cookie";
 import { ElMessageBox, ElNotification, ElMessage } from "element-plus";
 import useUserStore from "@/store/modules/user";
 import "@/components/headerBar/header.scss";
+import notice from "@/components/notice/index";
 const router = useRouter();
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
@@ -177,7 +180,7 @@ const isChildMenu = ref(false);
 const autoListChidrenNum = ref(0);
 const isEidtType = ref(false);
 const leftBanerType = ref(2);
-
+const noticeTableModal = ref(false);
 const userData = ref(Cookies.get("nickName") || "");
 const commonsRouterList = ref([]);
 const activeLeftData = ref({});

+ 40 - 29
src/components/notice/index.vue

@@ -43,17 +43,17 @@
 		</el-dialog>
 		<div
 			class="notice-table-warp"
-			:class="noticeTableModal ? 'notice-table-warp-open' : ''"
-			@click.stop="noticeTableModal = false"
+			:class="modelValue ? 'notice-table-warp-open' : ''"
+			@click.stop="closeNoticeTableModal"
 		>
 			<div class="notice-table" @click.stop>
 				<div class="tabs">
 					<ul>
-						<li style="padding-left: 0; border: none">
-							全部(99
+						<li style="padding-left: 0; border: none" @click="tableTagType = 1" :class="tableTagType == 1 ? 'active' : ''">
+							全部(0
 						</li>
-						<li class="active">待办(99)</li>
-						<li>通知(99)</li>
+						<li  @click="tableTagType = 2" :class="tableTagType == 2 ? 'active' : ''">待办(0)</li>
+						<li  @click="tableTagType = 3" :class="tableTagType == 3 ? 'active' : ''">通知(0)</li>
 					</ul>
 					<div class="more">查看更多&gt;</div>
 				</div>
@@ -69,8 +69,8 @@
 					</el-table-column>
 				</el-table>
 				<div class="notice-btn-box" style="margin-top: 20px">
-					<el-button plain>点击清空</el-button>
-					<el-button type="primary">全部已读</el-button>
+					<el-button plain disabled>点击清空</el-button>
+					<el-button type="primary" disabled>全部已读</el-button>
 				</div>
 			</div>
 		</div>
@@ -81,28 +81,39 @@ import { ElMessageBox, ElNotification } from 'element-plus'
 import {
   getToken
 } from '@/utils/auth'
-let noticeTableModal = ref(false)
+
+defineProps({
+  modelValue: {
+    type: Object,
+    default: false,
+  },
+});
+const emit = defineEmits(["update:modelValue"]);
+const closeNoticeTableModal = () => {
+	emit("update:modelValue", false);
+};
+const tableTagType = ref(1)
 let noticeData = ref([
-	{
-		date: '2016-05-02',
-		name: '王小虎',
-		address: '上海市普陀区金沙江路 1518 弄',
-	},
-	{
-		date: '2016-05-04',
-		name: '王小虎',
-		address: '上海市普陀区金沙江路 1517 弄',
-	},
-	{
-		date: '2016-05-01',
-		name: '王小虎',
-		address: '上海市普陀区金沙江路 1519 弄',
-	},
-	{
-		date: '2016-05-03',
-		name: '王小虎',
-		address: '上海市普陀区金沙江路 1516 弄',
-	},
+	// {
+	// 	date: '2016-05-02',
+	// 	name: '王小虎',
+	// 	address: '上海市普陀区金沙江路 1518 弄',
+	// },
+	// {
+	// 	date: '2016-05-04',
+	// 	name: '王小虎',
+	// 	address: '上海市普陀区金沙江路 1517 弄',
+	// },
+	// {
+	// 	date: '2016-05-01',
+	// 	name: '王小虎',
+	// 	address: '上海市普陀区金沙江路 1519 弄',
+	// },
+	// {
+	// 	date: '2016-05-03',
+	// 	name: '王小虎',
+	// 	address: '上海市普陀区金沙江路 1516 弄',
+	// },
 ])
 const index = ref(1)
 const data = ref([

+ 2 - 2
src/layout/index.vue

@@ -21,14 +21,14 @@
       </div>
       <app-main />
       <settings ref="settingRef" />
-      <notice></notice>
+      
     </div>
   </div>
 </template>
 
 <script setup>
 import { useWindowSize } from "@vueuse/core";
-import notice from "@/components/notice/index";
+
 import Sidebar from "./components/Sidebar/index.vue";
 import { AppMain, Navbar, Settings, TagsView } from "./components";
 import defaultSettings from "@/settings";

+ 0 - 1
src/views/process/processConfig/handleBtn.vue

@@ -15,7 +15,6 @@
     let title = ref('')
     let getNode = inject('getNode')
     const node = getNode()
-    console.log(node)
     node.on('change:data', ({current}) => {
         title.value = current.title
     })

+ 1 - 1
src/views/process/processConfig/index.vue

@@ -388,7 +388,7 @@ const getDtl = (row) => {
 	router.push({
 		path: 'processChart',
 		query: {
-			id: row.flowInfoId,
+			id: row.id,
 			flowInfoId:row.flowInfoId,
 			tenantId:row.tenantId
 		},

+ 0 - 1
src/views/process/processConfig/startBtn.vue

@@ -12,7 +12,6 @@
     let title = ref('')
     let getNode = inject('getNode')
     const node = getNode()
-    console.log(node)
     node.on('change:data', ({current}) => {
         title.value = current.title
     })

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

@@ -55,6 +55,8 @@ import {
 	computed,
 	nextTick,
 	getCurrentInstance,
+	onDeactivated,
+	onActivated
 } from 'vue'
 import byForm from '@/components/byForm/index'
 import { Graph, Shape } from '@antv/x6'
@@ -134,7 +136,6 @@ const formConfig = computed(() => {
 			required: true,
 			itemWidth: 30,
 			fn: (e) => {
-				console.log(e)
 				gethandleObjectList(e)
 			},
 			//1用户 2部门负责人 3部门总监 4岗位 5角色
@@ -243,7 +244,6 @@ const submitForm = () => {
 	byform.value.handleSubmit((valid) => {
 		
 		flowDefinitionNodeObj.value[formData.data.id] = formData.data
-		console.log(flowDefinitionNodeObj.value)
 		dialogVisible.value = false
 		formData.data.cell.setData({
 			title: formData.data.nodeName,
@@ -269,12 +269,10 @@ const submitAll = () => {
 	}
 	submitFormData.titleTemplate = proxy.title
 	const nodeList = graph.toJSON().cells
-	console.log(nodeList)
+	submitFormData.nodeObject = JSON.stringify(nodeList)
 	const isStart = false
 	for (let i = 0; i < nodeList.length; i++) {
 		const element = nodeList[i]
-		console.log(element)
-		console.log(flowDefinitionNodeObj)
 		//是办理节点
 		if (element.shape != "start-btn" && element.shape != 'edge' && element.shape != 'end-btn'  ) {
 			
@@ -322,7 +320,6 @@ const submitAll = () => {
 		}
 	}
 	addVersion()
-	console.log(flowDefinitionNodeObj.value)
 }
 
 //选取一个随机不重复的正整数id
@@ -339,7 +336,6 @@ const addVersion = () => {
 	const idObg = {}
 	for (let i = 0; i < submitFormData.flowDefinitionNodeList.length; i++) {
 		const element = submitFormData.flowDefinitionNodeList[i]
-		console.log(element)
 		if (element.parentId == null && element.nodeName == '结束') {
 			ElMessage({
 				message: '有结束节点未连线,请配置',
@@ -370,15 +366,12 @@ const addVersion = () => {
 			element.nodeButtonSet = element.nodeButtonSet.join(',')
 		}
 	}
-	console.log(submitFormData)
 
 	proxy.post('/flowDefinition/addVersion', submitFormData).then((res) => {
-		console.log(res)
 		ElMessage({
 			message: '保存成功',
 			type: 'success',
 		})
-		console.log(router)
 		useTagsViewStore().delView(router.currentRoute.value);
 		history.go(-1)
 
@@ -470,7 +463,6 @@ const recursive = (data) => {
 }
 
 const pushRoom = (port: any) => {
-	console.log(port)
 	if (port.node.shape == 'end-btn') {
 		flowDefinitionNodeObj.value[port.node.id] = {
 			nodeName: '结束',
@@ -633,7 +625,6 @@ const antvInit = () => {
 				cancelButtonText: "取消",
 				type: "warning",
 			}).then(() => {
-				console.log(cell)
 				graph.removeNode(cell.id)
 				// delete flowDefinitionNodeObj.value[id]
 			});
@@ -837,20 +828,26 @@ const antvInit = () => {
 	
 }
 const getFlowInfo =	(()=>{
-	proxy.post('/flowDefinition/getDetails', {id:submitFormData.flowInfoId}).then((res) => {
-		console.log(res)
+	proxy.post('/flowDefinition/getDetails', {id:submitFormData.id}).then((res) => {
 		
 	})
 })
 const router = useRouter()
+onActivated(() => {
+})
+onDeactivated(() => {
 
+	//清空minimap子元素
+	window.document.getElementById('minimap').innerHTML = ''
+})
 onMounted(() => {
 	antvInit()
 	//获取url router参数
-	submitFormData.flowInfoId = router.currentRoute.value.query.id 
+	submitFormData.flowInfoId = router.currentRoute.value.query.flowInfoId 
+	submitFormData.id = router.currentRoute.value.query.id
 	submitFormData.tenantId = router.currentRoute.value.query.tenantId
 	if(submitFormData.flowInfoId) {
-		//getFlowInfo()
+		getFlowInfo()
 	}
 })
 </script>