diff --git a/acs/nladmin-ui/src/assets/icons/svg/clear.svg b/acs/nladmin-ui/src/assets/icons/svg/clear.svg new file mode 100644 index 0000000..add284f --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/clear.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/acs/nladmin-ui/src/assets/icons/svg/downAlign.svg b/acs/nladmin-ui/src/assets/icons/svg/downAlign.svg new file mode 100644 index 0000000..d02dce2 --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/downAlign.svg @@ -0,0 +1,2 @@ + diff --git a/acs/nladmin-ui/src/assets/icons/svg/horizontalAlign.svg b/acs/nladmin-ui/src/assets/icons/svg/horizontalAlign.svg new file mode 100644 index 0000000..ed79e1a --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/horizontalAlign.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/acs/nladmin-ui/src/assets/icons/svg/horizontalDistribution.svg b/acs/nladmin-ui/src/assets/icons/svg/horizontalDistribution.svg new file mode 100644 index 0000000..b4af40e --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/horizontalDistribution.svg @@ -0,0 +1,2 @@ + diff --git a/acs/nladmin-ui/src/assets/icons/svg/leftAlign.svg b/acs/nladmin-ui/src/assets/icons/svg/leftAlign.svg new file mode 100644 index 0000000..b373ac3 --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/leftAlign.svg @@ -0,0 +1,2 @@ + diff --git a/acs/nladmin-ui/src/assets/icons/svg/rightAlign.svg b/acs/nladmin-ui/src/assets/icons/svg/rightAlign.svg new file mode 100644 index 0000000..b0670ba --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/rightAlign.svg @@ -0,0 +1,2 @@ + diff --git a/acs/nladmin-ui/src/assets/icons/svg/save.svg b/acs/nladmin-ui/src/assets/icons/svg/save.svg new file mode 100644 index 0000000..e9e05e3 --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/save.svg @@ -0,0 +1,2 @@ + diff --git a/acs/nladmin-ui/src/assets/icons/svg/upAlign.svg b/acs/nladmin-ui/src/assets/icons/svg/upAlign.svg new file mode 100644 index 0000000..29645dd --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/upAlign.svg @@ -0,0 +1,2 @@ + diff --git a/acs/nladmin-ui/src/assets/icons/svg/verticalAlign.svg b/acs/nladmin-ui/src/assets/icons/svg/verticalAlign.svg new file mode 100644 index 0000000..a3646a0 --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/verticalAlign.svg @@ -0,0 +1,2 @@ + diff --git a/acs/nladmin-ui/src/assets/icons/svg/verticalDistribution.svg b/acs/nladmin-ui/src/assets/icons/svg/verticalDistribution.svg new file mode 100644 index 0000000..e628a9e --- /dev/null +++ b/acs/nladmin-ui/src/assets/icons/svg/verticalDistribution.svg @@ -0,0 +1,2 @@ + diff --git a/acs/nladmin-ui/src/views/system/logicflow/editor/components/Diagram.vue b/acs/nladmin-ui/src/views/system/logicflow/editor/components/Diagram.vue index fbd00de..5dd9d57 100644 --- a/acs/nladmin-ui/src/views/system/logicflow/editor/components/Diagram.vue +++ b/acs/nladmin-ui/src/views/system/logicflow/editor/components/Diagram.vue @@ -1,6 +1,7 @@ @@ -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 handlogin(@RequestBody Map whereJson, HttpServletRequest request) { -// JSONObject resultJson = new JSONObject(); -// MapUtil.getStr(whereJson, "user"); -// String user = MapUtil.getStr(whereJson, "user"); -// String password = MapUtil.getStr(whereJson, "password"); -// String nick_name = ""; -// if (StrUtil.isEmpty(user)) { -// throw new BadRequestException("用户不能为空"); -// -// } -// if (StrUtil.isEmpty("device_id")) { -// resultJson.put("code", "0"); -// resultJson.put("desc", "设备不能为空"); -// // return resultJson; -// } -// if (StrUtil.isEmpty(password)) { -// throw new BadRequestException("密码不能为空!"); -// } -// boolean is_match = false; -// Long account_id = 0L; -// try { -// String pwd = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, password); -// UserDto userDto = userService.findByName(user); -// account_id = userDto.getId(); -// nick_name =userDto.getNickName(); -// is_match = passwordEncoder.matches(pwd, userDto.getPassword()); -// -// } catch (Exception e) { -// e.printStackTrace(); -// } -// -// if (is_match) { -// resultJson.put("code", "1"); -// resultJson.put("desc", "登陆成功"); -// } else { -// resultJson.put("code", "0"); -// resultJson.put("desc", "登陆失败!"); -// } -// UserDetails userDetails = userDetailsService.loadUserByUsername(user); -// Authentication authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); -// SecurityContextHolder.getContext().setAuthentication(authentication); -// String token = tokenProvider.createToken(authentication); -// final JwtUserDto jwtUserDto = (JwtUserDto) authentication.getPrincipal(); -// // 保存在线信息 -// onlineUserService.save(jwtUserDto, token, request); -// -// JSONObject jo = new JSONObject(); -// jo.put("user_name", user); -// jo.put("nick_name", nick_name); -// jo.put("token", properties.getTokenStartWith() + token); -// jo.put("account_id", account_id.toString()); -// resultJson.put("result", jo); -// -// return new ResponseEntity<>(resultJson, HttpStatus.OK); -// } -// -// @PostMapping("/authority") -// @Log("手持登陆查询权限") -// @ApiOperation("手持登陆查询权限") -// public ResponseEntity queryAuthority(@RequestBody Map whereJson) { -// return new ResponseEntity<>(handLoginService.queryAuthority(whereJson), HttpStatus.OK); -// } -// -// @ApiOperation("修改密码") -// @Log("手持修改密码") -// @PostMapping(value = "/updatePass") -// public ResponseEntity updatePass(@RequestBody Map whereJson) throws Exception { -// String RfoldPass = MapUtil.getStr(whereJson, "RfoldPass"); -// String RfnewPass = MapUtil.getStr(whereJson, "RfnewPass"); -// String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, RfoldPass); -// String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, RfnewPass); -// UserDto user = userService.findByName(SecurityUtils.getCurrentUsername()); -// if (!passwordEncoder.matches(oldPass, user.getPassword())) { -// throw new BadRequestException("修改失败,旧密码错误"); -// } -// if (passwordEncoder.matches(newPass, user.getPassword())) { -// throw new BadRequestException("新密码不能与旧密码相同"); -// } -// userService.updatePass(user.getUsername(), passwordEncoder.encode(newPass)); -// JSONObject returnjo = new JSONObject(); -// returnjo.put("code", "1"); -// returnjo.put("desc", "修改密码成功!"); -// return new ResponseEntity<>(returnjo, HttpStatus.OK); -// } -//} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/service/HandLoginService.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/service/HandLoginService.java deleted file mode 100644 index 9097b81..0000000 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/service/HandLoginService.java +++ /dev/null @@ -1,22 +0,0 @@ -//package org.nl.wms.pda.login.service; -// -//import java.util.Map; -// -//public interface HandLoginService { -// /** -// * 手持登陆 -// * -// * @param jsonObject 条件 -// * @return Map -// */ -// Map handleLogin(Map jsonObject); -// -// /** -// * 手持登陆查询权限 -// * -// * @param jsonObject 条件 -// * @return Map -// */ -// Map queryAuthority(Map jsonObject); -// -//} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/service/impl/HandLoginServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/service/impl/HandLoginServiceImpl.java deleted file mode 100644 index d8a0797..0000000 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/service/impl/HandLoginServiceImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -//package org.nl.wms.pda.login.service.impl; -// -//import cn.hutool.core.util.StrUtil; -//import com.alibaba.fastjson.JSONArray; -//import com.alibaba.fastjson.JSONObject; -//import lombok.RequiredArgsConstructor; -//import lombok.SneakyThrows; -//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.utils.SecurityUtils; -//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.modules.wql.WQL; -//import org.nl.utils.RsaUtils; -// -//import org.nl.wms.pda.login.service.HandLoginService; -// -// -// -// -//import org.springframework.stereotype.Service; -// -//import java.util.Map; -// -//@Service -//@RequiredArgsConstructor -//@Slf4j -//public class HandLoginServiceImpl implements HandLoginService { -// -// private final UserService userService; -// -// private final OnlineUserService onlineUserService; -// -// @SneakyThrows -// @Override -// public Map handleLogin(Map jsonObject) { -// JSONObject resultJson = new JSONObject(); -// String user = jsonObject.get("user"); -// String password = jsonObject.get("password"); -// boolean is_match = false; -// Long account_id = 0L; -// try { -// String pwd = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, password); -// UserDto userDto = userService.findByName(user); -// account_id = userDto.getId(); -// is_match = passwordEncoder.matches(pwd, userDto.getPassword()); -// -// } catch (Exception e) { -// e.printStackTrace(); -// } -// -// if (is_match) { -// resultJson.put("code", "1"); -// resultJson.put("desc", "登陆成功"); -// } else { -// resultJson.put("code", "0"); -// resultJson.put("desc", "登陆失败!"); -// } -// UserDetails userDetails = userDetailsService.loadUserByUsername(user); -// Authentication authentication = new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); -// SecurityContextHolder.getContext().setAuthentication(authentication); -// String token = tokenProvider.createToken(authentication); -// final JwtUserDto jwtUserDto = (JwtUserDto) authentication.getPrincipal(); -// // 保存在线信息 -// onlineUserService.save(jwtUserDto, token, null); -// JSONObject jo = new JSONObject(); -// jo.put("user_name", user); -// jo.put("token", properties.getTokenStartWith() + token); -// jo.put("account_id", account_id.toString()); -// resultJson.put("result", jo); -// return resultJson; -// -// } -// -// @Override -// public Map queryAuthority(Map jsonObject) { -// String accountId = String.valueOf(SecurityUtils.getCurrentUserId()); -// JSONObject returnjo = new JSONObject(); -// if (StrUtil.isEmpty(accountId)) { -// returnjo.put("code", "0"); -// returnjo.put("desc", "用户id不能为空!"); -// returnjo.put("result", new JSONArray()); -// } -// //查询一级 -// JSONObject result = WQL.getWO("QPADSTSETSERVICE").addParam("flag", "4").addParam("accountId", accountId).addParam("component", "0").process().uniqueResult(0); -// -// //查询二级 -// //JSONArray SecondResults = WQL.getWO("QPADSTSETSERVICE").addParam("flag", "4").addParam("accountId", accountId).addParam("component", "1").process().getResultJSONArray(0); -// //查询三级 -// /* JSONArray roleTree = new JSONArray(); -// for (int i = 0; i < SecondResults.size(); i++) { -// JSONObject row = SecondResults.getJSONObject(i); -// String menu_id = row.getString("menu_id"); -// JSONArray ThirdResults = WQL.getWO("QPADSTSETSERVICE").addParam("flag", "4").addParam("accountId", accountId).addParam("component", "2").addParam("pid", menu_id).process().getResultJSONArray(0); -// row.put("sonTree", ThirdResults); -// roleTree.add(row); -// }*/ -// JSONArray ThirdResults = WQL.getWO("QPADSTSETSERVICE").addParam("flag", "4").addParam("accountId", accountId).addParam("component", "2").process().getResultJSONArray(0); -// -// result.put("sonTree", ThirdResults); -// -// returnjo.put("code", "1"); -// returnjo.put("desc", "查询成功!"); -// returnjo.put("result", result); -// return returnjo; -// } -//} diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/test.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/test.java new file mode 100644 index 0000000..6ff556d --- /dev/null +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/login/test.java @@ -0,0 +1,9 @@ +package org.nl.wms.pda.login; + +/** + * @author: lyd + * @description: + * @Date: 2022/10/22 + */ +public class test { +} diff --git a/lms/nladmin-ui/src/views/loki/view/index.vue b/lms/nladmin-ui/src/views/loki/view/index.vue index 0725879..6c83bcc 100644 --- a/lms/nladmin-ui/src/views/loki/view/index.vue +++ b/lms/nladmin-ui/src/views/loki/view/index.vue @@ -325,6 +325,7 @@ export default { } var ansi_up = new AnsiUp() logOperation.getLogData(queryParam).then(res => { + console.log(res) this.showEmpty = false if (res.data.result.length === 1) { const log = res.data.result[0].values