From 8abc9481eafeb715b39a4f4f8d6f628a642e6b53 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 19 三月 2025 17:38:18 +0800
Subject: [PATCH] 优化AGV和输送线、产线对接逻辑
---
项目代码/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue | 183 +++++++++++++++++++++++++++++----------------
1 files changed, 119 insertions(+), 64 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue"
index 65b1c8e..4eee23d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue"
@@ -1,14 +1,32 @@
<template>
<div class="menu-container">
<!-- <el-input/> -->
- <vol-box :width="940" :mask="true" :height="500" title="鍥炬爣鍒楄〃" v-model="model">
+ <vol-box
+ :width="940"
+ :mask="true"
+ :height="500"
+ title="鍥炬爣鍒楄〃"
+ v-model="model"
+ >
<Icons :onSelect="onSelect"></Icons>
<template #footer>
- <el-button type="primary" size="mini" @click="model = false">纭� 璁�</el-button>
+ <el-button type="primary" size="mini" @click="model = false"
+ >纭� 璁�</el-button
+ >
</template>
</vol-box>
- <vol-box :width="600" :mask="true" :height="270" title="鍏朵粬鏉冮檺" v-model="actionModel">
- <vol-form ref="actionForm" :formRules="actionOptions" :formFields="actionFields">
+ <vol-box
+ :width="600"
+ :mask="true"
+ :height="270"
+ title="鍏朵粬鏉冮檺"
+ v-model="actionModel"
+ >
+ <vol-form
+ ref="actionForm"
+ :formRules="actionOptions"
+ :formFields="actionFields"
+ >
<template #header>
<div>
<el-alert show-icon type="success">
@@ -20,7 +38,9 @@
</template>
</vol-form>
<template #footer>
- <el-button type="primary" size="mini" @click="otherAction">纭� 璁�</el-button>
+ <el-button type="primary" size="mini" @click="otherAction"
+ >纭� 璁�</el-button
+ >
</template>
</vol-box>
@@ -28,12 +48,21 @@
<div class="menu-left">
<div class="m-title"><i class="el-icon-warning-outline"></i>鑿滃崟鍒楄〃</div>
<el-scrollbar style="height: 100%; width: 200px">
- <VolMenu :onSelect="getTreeItem" :list="tree" :isCollapse="false"></VolMenu>
+ <VolMenu
+ :onSelect="getTreeItem"
+ :list="tree"
+ :isCollapse="false"
+ ></VolMenu>
</el-scrollbar>
</div>
<div class="menu-right">
<el-scrollbar style="height: 100%">
- <el-alert title="鑿滃崟閰嶇疆璇存槑" type="warning" :closable="false" show-icon>
+ <el-alert
+ title="鑿滃崟閰嶇疆璇存槑"
+ type="warning"
+ :closable="false"
+ show-icon
+ >
<div>
1銆佸鏋滄槸鐢ㄤ唬鐮佺敓鍣ㄧ敓鎴愮殑Vue椤甸潰,Url涓篤ue椤圭洰涓璼rc->router->viewGrid.js瀵瑰簲琛ㄥ悕鐨刾ath灞炴��
</div>
@@ -42,31 +71,56 @@
</div>
</el-alert>
<div style="padding: 0px 30px 0 20px">
- <vol-form class="form-content" ref="form" :formRules="options" :formFields="fields">
+ <vol-form
+ class="form-content"
+ ref="form"
+ :formRules="options"
+ :formFields="fields"
+ >
</vol-form>
<div>
<div class="auth-group">
<label style="width: 100px">鏉冮檺鎸夐挳锛�</label>
<div class="ck">
<el-checkbox-group v-model="actions">
- <el-checkbox v-for="(item, index) in action" :key="index" :label="item.value">{{ item.text + "(" +
- item.value + ")" }}</el-checkbox>
+ <el-checkbox
+ v-for="(item, index) in action"
+ :key="index"
+ :label="item.value"
+ >{{ item.text + "(" + item.value + ")" }}</el-checkbox
+ >
</el-checkbox-group>
</div>
</div>
</div>
<div style="padding-left: 100px">
- <el-button @click="handleCheckAll" size="mini" type="success" plain><i class="el-icon-check"></i>鍏�
- 閫�</el-button>
- <el-button @click="actionModel = true" size="mini" type="primary" plain><i
- class="el-icon-plus"></i>鍏朵粬鏉冮檺</el-button>
+ <el-button @click="handleCheckAll" size="mini" type="success" plain
+ ><i class="el-icon-check"></i>鍏� 閫�</el-button
+ >
+ <el-button
+ @click="actionModel = true"
+ size="mini"
+ type="primary"
+ plain
+ ><i class="el-icon-plus"></i>鍏朵粬鏉冮檺</el-button
+ >
</div>
<div class="m-btn">
- <el-button type="primary" @click="save"><i class="el-icon-check"></i>淇濆瓨</el-button>
- <el-button type="success" @click="add"><i class="el-icon-plus"></i>鏂板缓</el-button>
- <el-button type="warning" @click="addChild"><i class="el-icon-plus"></i>娣诲姞瀛愮骇</el-button>
- <el-button type="primary" plain @click="addBrother"><i class="el-icon-circle-plus"></i> 娣诲姞鍚岀骇</el-button>
- <el-button type="warning" plain @click="delMenu"><i class="el-icon-delete"></i> 鍒犻櫎鑿滃崟</el-button>
+ <el-button type="primary" @click="save"
+ ><i class="el-icon-check"></i>淇濆瓨</el-button
+ >
+ <el-button type="success" @click="add"
+ ><i class="el-icon-plus"></i>鏂板缓</el-button
+ >
+ <el-button type="warning" @click="addChild"
+ ><i class="el-icon-plus"></i>娣诲姞瀛愮骇</el-button
+ >
+ <el-button type="primary" plain @click="addBrother"
+ ><i class="el-icon-circle-plus"></i> 娣诲姞鍚岀骇</el-button
+ >
+ <el-button type="warning" plain @click="delMenu"
+ ><i class="el-icon-delete"></i> 鍒犻櫎鑿滃崟</el-button
+ >
</div>
</div>
</el-scrollbar>
@@ -176,7 +230,11 @@
tigger = true;
let menuId = this.fields.menuId;
this.http
- .post("/api/menu/delMenu?menuId=" + menuId, {}, "姝e湪鍒犻櫎鏁版嵁....")
+ .post(
+ "/api/Sys_Menu/delMenu?menuId=" + menuId,
+ {},
+ "姝e湪鍒犻櫎鏁版嵁...."
+ )
.then((x) => {
if (!x.status) return this.$Message.error(x.message);
this.$refs.form.reset();
@@ -202,7 +260,7 @@
} else {
this.fields.auth = "";
}
- this.http.post("/api/menu/save", this.fields, true).then((x) => {
+ this.http.post("/api/Sys_Menu/save", this.fields, true).then((x) => {
if (!x.status) {
this.$Message.error(x.message);
return;
@@ -227,6 +285,7 @@
orderNo: this.fields.orderNo,
parentId: this.fields.parentId,
});
+ console.log(this.tree);
});
});
},
@@ -245,8 +304,9 @@
onOpenChange(node) {
if (node.length == 0) return;
this.getTreeItem(node[node.length > 1 ? node.length - 1 : 0]);
- }
+ },
},
+ created() {},
setup() {
const tree = ref([]);
const actionValues = ref([]);
@@ -257,21 +317,19 @@
{ text: "缂栬緫", value: "Update" },
{ text: "瀵煎叆", value: "Import" },
{ text: "瀵煎嚭", value: "Export" },
- { text: "涓婁紶", value: "Upload" },
- { text: "瀹℃牳", value: "Audit" },
+ // { text: "涓婁紶", value: "Upload" },
+ // { text: "瀹℃牳", value: "Audit" },
]);
const actions = ref([]);
actionValues.value = action.value.map((x) => {
return x.value;
});
const initTree = () => {
- http.post("/api/menu/getMenu", {}, true).then((x) => {
- x.forEach(item => {
- item.icon = 'el-icon-menu';
- if (item.menuType == 1 && !item.parentId) {
- // item.name="(app)"+item.name;
- }
- })
+ http.post("/api/Sys_Menu/getMenu", {}, true).then((x) => {
+ x.forEach((item) => {
+ item.icon = "el-icon-menu";
+ });
+
tree.value = x;
});
};
@@ -292,10 +350,7 @@
icon: "",
orderNo: "",
enable: 1,
- menuType: null,
- createDate: "",
- creator: "",
- modifyDate: "",
+ menuType: 0,
});
const actionFields = ref({
@@ -379,16 +434,14 @@
],
},
{
- // 2022.03.26澧炵Щ鍔ㄧ鍔犺彍鍗曠被鍨�
title: "鑿滃崟绫诲瀷",
field: "menuType",
required: true,
type: "select",
colSize: 4,
data: [
- { key: 1, value: "WCS鑿滃崟" },
- { key: 0, value: "WMS鑿滃崟" },
- { key: 99, value: "鍏辩敤" }
+ { key: 0, value: "PC绔彍鍗�" },
+ { key: 1, value: "绉诲姩绔彍鍗�" },
],
},
{
@@ -425,33 +478,35 @@
]);
const refForm = ref();
const getTreeItem = (node) => {
- http.post("api/menu/getTreeItem?menuId=" + node, {}, true).then((x) => {
- try {
- fields.value.icon = x.icon;
- if (x.auth) {
- x.auth = JSON.parse(x.auth);
- action.value.splice(8, action.value.length);
+ http
+ .post("api/Sys_Menu/getTreeItem?menuId=" + node, {}, true)
+ .then((x) => {
+ try {
+ fields.value.icon = x.icon;
+ if (x.auth) {
+ x.auth = JSON.parse(x.auth);
+ action.value.splice(8, action.value.length);
- actions.value = x.auth.map((element) => {
- if (actionValues.value.indexOf(element.value) == -1) {
- action.value.push(element);
- }
- return element.value;
- });
- } else {
- action.value.splice(8, action.value.length);
+ actions.value = x.auth.map((element) => {
+ if (actionValues.value.indexOf(element.value) == -1) {
+ action.value.push(element);
+ }
+ return element.value;
+ });
+ } else {
+ action.value.splice(8, action.value.length);
+ x.auth = [];
+ fields.value.icon = "";
+ actions.value = [];
+ }
+ } catch (error) {
+ console.log("鑿滃崟鍔熻兘鏉冮檺杞崲鎴怞SON澶辫触:" + x.auth);
x.auth = [];
- fields.value.icon = "";
+ // this.icon = "";
actions.value = [];
}
- } catch (error) {
- console.log("鑿滃崟鍔熻兘鏉冮檺杞崲鎴怞SON澶辫触:" + x.auth);
- x.auth = [];
- // this.icon = "";
- actions.value = [];
- }
- refForm.value.reset(x);
- });
+ refForm.value.reset(x);
+ });
};
return {
tree,
@@ -467,7 +522,7 @@
actionOptions,
options,
form: refForm,
- getTreeItem
+ getTreeItem,
};
},
data() {
@@ -520,7 +575,7 @@
margin-top: 1px;
}
- >div {
+ > div {
float: left;
}
}
--
Gitblit v1.9.3