5 Commits c7aaff06ec ... 9d574571bc

Autor SHA1 Mensaje Fecha
  dukai 9d574571bc Merge branch 'master' of http://182.92.174.150:3000/dukai/CZO_Boss hace 3 años
  dukai f00d1b0d63 Merge branch 'master' of http://182.92.174.150:3000/dukai/CZO_Boss hace 3 años
  dukai 60da7e1d6b Merge branch 'master' of http://182.92.174.150:3000/dukai/CZO_Boss hace 3 años
  dukai 2ba6b3980c dd hace 3 años
  dukai 8d0e38da40 dd hace 3 años

+ 10 - 8
src/components/shortcutMenu/index.vue

@@ -34,15 +34,17 @@ export default {
 	mounted() {
 		this.$nextTick(() => {
 			EventBus.$on('addShortcutMenu', obj => {
-				let param = {
-					menuId: obj.menuId,
-					userId: this.userId
+				const existence = this.shortcutMenuList.some((item) => obj.menuId == item.menuId)
+				if (existence) {
+					this.$msg({ type: 'warning', message: '该菜单已存在' })
+				} else {
+					let param = {menuId: obj.menuId, userId: this.userId}
+					addUserShortcutMenu(param).then(res => {
+						if (res.code === 200) {
+							this.getUserShortcutMenuList()
+						}
+					})
 				}
-				addUserShortcutMenu(param).then(res => {
-					if (res.code === 200) {
-						this.getUserShortcutMenuList()
-					}
-				})
 			})
 		})
 	},

+ 3 - 1
src/layout/components/Sidebar.vue

@@ -40,6 +40,7 @@ export default {
 			this.$router.replace('/index')
 		},
 		toMainMenu(item) {
+			console.log(item)
 			if (this.$route.query.id == item.menuId) {
 				return
 			}
@@ -49,7 +50,8 @@ export default {
 				path: '/mainMenu',
 				query: {
 					id: item.menuId,
-					title: item.menuName
+					title: item.menuName,
+					isDocument: item.isDocument
 				}
 			})
 		}

+ 16 - 12
src/views/system/menu/mainMenu.vue

@@ -5,12 +5,11 @@
 				<img class="img" src="@/assets/images/wd.png" width="29" height="25" />
 				<span class="title">{{ title }}</span>
 			</div>
-			<div class="GeneralSelectDiv1">
+			<div class="GeneralSelectDiv1" v-show="isDocument == 0">
 				<div class="item bg_tool">工具/发送区</div>
 				<div class="item bg_statistics">统计/分析区</div>
 				<div class="item bg_set">设置/编辑区</div>
 			</div>
-			<!-- <div class="clearboth"></div> -->
 		</div>
 		<div class="conent">
 			<div class="area border_sending">
@@ -50,18 +49,29 @@ export default {
 			type: undefined,
 			//当前菜单路由id
 			routeId: undefined,
-			sendingList: [], // 工具/发送区列表
-			analysisList: [], // 统计/分析区列表
-			editList: [] // 设置/编辑区列表
+			// 判断是否为文档
+			isDocument: 0,
 		}
 	},
-	computed: {},
+	computed: {
+		sendingList() {
+			return this.docList.filter((item) => item.menuCategory == 0)
+		},
+		analysisList() {
+			return this.docList.filter((item) => item.menuCategory == 1)
+		},
+		editList() {
+			return this.docList.filter((item) => item.menuCategory == 2)
+		},
+	},
 	watch: {
 		// 监听路由跳转
 		$route: {
 			handler: function (route) {
 				this.routeId = route.query.id
 				this.title = route.query.title
+				this.isDocument = route.query.isDocument
+				console.log(this.isDocument)
 				this.init(this.routeId)
 			},
 			//一进页面就执行
@@ -76,12 +86,6 @@ export default {
 				const routes = this.$store.state.permission.routes
 				this.$nextTick(() => {
 					this.docList = routes.filter((item, index, c) => item.parentId == routeId)
-					// 工具/发送区列表
-					this.sendingList = this.docList.filter((item, index, c) => item.menuCategory == 0)
-					// 统计/分析区列表
-					this.analysisList = this.docList.filter((item, index, c) => item.menuCategory == 1)
-					// 设置/编辑区列表
-					this.editList = this.docList.filter((item, index, c) => item.menuCategory == 2)
 				})
 			}
 		},

+ 1 - 1
vue.config.js

@@ -21,7 +21,7 @@ module.exports = {
 		open: true,
 		proxy: {
 			[process.env.VUE_APP_BASE_API]: {
-				target: `http://192.168.1.105:8080`,
+				target: `http://192.168.1.21:8080`,
 				changeOrigin: true,
 				pathRewrite: {
 					['^' + process.env.VUE_APP_BASE_API]: ''