@@ -92,7 +94,8 @@ export default {
nodeSize: {
width: '',
heigh: ''
- }
+ },
+ nodeObj: {} // 给子组件传递信息 -- 下拉框实时更新信息
}
},
mounted() {
@@ -144,29 +147,6 @@ export default {
registerCustomElement(lf)
lf.setDefaultEdgeType('pro-polyline')
- // 为菜单追加选项(必须在 lf.render() 之前设置)
- lf.extension.menu.addMenuConfig({
- nodeMenu: [
- {
- text: '绑定设备号',
- callback(node) {
- console.log(lf.graphModel.getNodeModelById(node.id))
- lf.graphModel.getNodeModelById(node.id).draggable = false
- }
- },
- {
- text: '属性',
- callback(node) {
- alert(`
- 节点ID:${node.id}
- 节点类型:${node.type}
- 节点坐标:(x: ${node.x}, y: ${node.y})`
- )
- }
- }
- ],
- edgeMenu: []
- })
lf.render(data)
this.lf = lf
this.lf.on('selection:selected,node:click,blank:click,edge:click', () => { // 选择/点击事件
@@ -187,6 +167,8 @@ export default {
console.log('选中的节点', nodes)
// const graphModel = this.lf.graphModel
// console.log(graphModel)
+ // 只传第一个,以第一个为显示是否绑定设备等信息,其余显示正常不用处理
+ this.nodeObj = nodes[0]
nodes.forEach(node => {
if (node.type === 'html-node') {
this.showChoice = true
diff --git a/acs/nladmin-ui/src/views/system/logicflow/editor/components/DiagramToolbar.vue b/acs/nladmin-ui/src/views/system/logicflow/editor/components/DiagramToolbar.vue
index 42d0f98..3b2394b 100644
--- a/acs/nladmin-ui/src/views/system/logicflow/editor/components/DiagramToolbar.vue
+++ b/acs/nladmin-ui/src/views/system/logicflow/editor/components/DiagramToolbar.vue
@@ -24,40 +24,64 @@
- 锁定
+
+
+
- 解锁
+
+
+
- 垂直居中
+
+
+
- 水平居中
+
+
+
- 向左对齐
+
+
+
- 向右对齐
+
+
+
- 向上对齐
+
+
+
- 向下对齐
+
+
+
- 水平分布
+
+
+
- 垂直分布
+
+
+
- 清空画布
+
+
+
- 保存
+
+
+
diff --git a/acs/nladmin-ui/src/views/system/logicflow/editor/components/PropertyPanel.vue b/acs/nladmin-ui/src/views/system/logicflow/editor/components/PropertyPanel.vue
index b59e078..d97dc0d 100644
--- a/acs/nladmin-ui/src/views/system/logicflow/editor/components/PropertyPanel.vue
+++ b/acs/nladmin-ui/src/views/system/logicflow/editor/components/PropertyPanel.vue
@@ -34,6 +34,56 @@
+
+ 设备绑定
+
+
+ {{ item.device_code }}
+ {{ item.device_name }}
+
+
+
+
+ 旋转角度
+
+ 度
+
+
+ 设备选择
+
+
+
+
线条样式
@@ -133,37 +183,6 @@
置为顶部
置为底部
-
- 设备绑定
-
-
-
- 旋转角度
-
- 度
-
-
- 设备选择
-
-
-
-
@@ -172,6 +191,7 @@
import { Sketch } from 'vue-color'
import { shortStyles, borderStyles, fontFamilies } from '../constant'
import crudStageImage from '@/api/logicflow/stageImage'
+import crudDevice from '@/api/acs/device/device'
export default {
components: {
@@ -180,7 +200,8 @@ export default {
props: {
elementsStyle: Object,
onlyEdge: Boolean, // 是否是只设置边的属性,当只设置边的属性时,隐藏快捷样式和背景色设置
- showChoice: Boolean
+ showChoice: Boolean,
+ node: Object // 父组件传来的对象
},
data() {
return {
@@ -209,7 +230,8 @@ export default {
fontWeight: '', // 文本加粗
lineHeightOptions: Array(5).fill(1).map((_, i) => _ + i * 0.5),
// imageUrl: '',
- imageUrlOptions: []
+ imageUrlOptions: [],
+ deviceCodeOptions: []
}
},
watch: {
@@ -218,10 +240,16 @@ export default {
this.style = { ...this.style, ...val }
},
immediate: true
+ },
+ node(newVal, oldVal) {
+ // newVal是新值,oldVal是旧值
+ this.node = newVal
+ this.cleanParam()
}
},
created() {
this.initStageIconList()
+ this.initDevicesList()
},
methods: {
initStageIconList() { // 初始化图标数据
@@ -232,6 +260,12 @@ export default {
this.imageUrlOptions = data
})
},
+ initDevicesList() {
+ crudDevice.selectDeviceList().then(res => {
+ console.log('devices:', res)
+ this.deviceCodeOptions = res
+ })
+ },
setStyle(item) {
this.$emit('setStyle', item)
},
@@ -319,6 +353,17 @@ export default {
this.$emit('setStyle', {
device: val
})
+ },
+ cleanParam() { // 判断来清空下拉框
+ if (this.node.properties.device === undefined) {
+ this.style.device = ''
+ }
+ if (this.node.properties.imageUrl === undefined) {
+ this.style.imageUrl = ''
+ }
+ if (this.node.properties.transform === undefined) {
+ this.style.transform = 0
+ }
}
}
}
diff --git a/acs/nladmin-ui/src/views/system/monitor/device/index.vue b/acs/nladmin-ui/src/views/system/monitor/device/index.vue
index 904947a..017d665 100644
--- a/acs/nladmin-ui/src/views/system/monitor/device/index.vue
+++ b/acs/nladmin-ui/src/views/system/monitor/device/index.vue
@@ -20,7 +20,7 @@ export default {
name: 'MonitorDevice',
data() {
return {
- stageParam: 'test', // 舞台参数
+ stageParam: 'YY', // 舞台参数
dialogDeviceMsgVisible: false,
device_code: null,
tops: '20vh',
diff --git a/lms/nladmin-system/src/main/java/org/nl/modules/security/rest/MobileAuthorizationController.java b/lms/nladmin-system/src/main/java/org/nl/modules/security/rest/MobileAuthorizationController.java
index c21b4eb..c61d1d0 100644
--- a/lms/nladmin-system/src/main/java/org/nl/modules/security/rest/MobileAuthorizationController.java
+++ b/lms/nladmin-system/src/main/java/org/nl/modules/security/rest/MobileAuthorizationController.java
@@ -37,7 +37,7 @@ import java.util.Map;
*/
@Slf4j
@RestController
-@RequestMapping("/mobile/auth")
+@RequestMapping("/api/pda")
@RequiredArgsConstructor
@Api(tags = "手持:系统授权接口")
public class MobileAuthorizationController {
diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/rest/HandLoginController.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/rest/HandLoginController.java
deleted file mode 100644
index 05d5ebf..0000000
--- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/rest/HandLoginController.java
+++ /dev/null
@@ -1,136 +0,0 @@
-//
-//package org.nl.wms.pda.login.rest;
-//
-//
-//import cn.hutool.core.map.MapUtil;
-//import cn.hutool.core.util.StrUtil;
-//import com.alibaba.fastjson.JSONObject;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import lombok.RequiredArgsConstructor;
-//import lombok.extern.slf4j.Slf4j;
-//import org.apache.tomcat.util.net.openssl.ciphers.Authentication;
-//import org.nl.modules.common.config.RsaProperties;
-//import org.nl.modules.common.exception.BadRequestException;
-//import org.nl.modules.common.utils.RsaUtils;
-//import org.nl.modules.common.utils.SecurityUtils;
-//import org.nl.modules.logging.annotation.Log;
-//import org.nl.modules.security.service.OnlineUserService;
-//
-//import org.nl.modules.system.service.UserService;
-//import org.nl.modules.system.service.dto.UserDto;
-//
-//import org.nl.wms.pda.login.service.HandLoginService;
-//import org.springframework.http.HttpStatus;
-//import org.springframework.http.ResponseEntity;
-//
-//import org.springframework.web.bind.annotation.PostMapping;
-//import org.springframework.web.bind.annotation.RequestBody;
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.web.bind.annotation.RestController;
-//
-//import javax.servlet.http.HttpServletRequest;
-//import java.util.Map;
-//
-///**
-// * @author ldjun
-// * @date 2021-07-26
-// **/
-//@RestController
-//@RequiredArgsConstructor
-//@Api(tags = "手持登陆")
-//@RequestMapping("api/pda")
-//@Slf4j
-//public class HandLoginController {
-// private final HandLoginService handLoginService;
-// private final UserService userService;
-// private final OnlineUserService onlineUserService;
-//
-// @PostMapping("/handlogin")
-// @Log("手持登陆验证")
-// @ApiOperation("手持登陆验证")
-// public ResponseEntity