main
han-l 2 years ago
parent e1f9f38b4d
commit b84d9abd0c

@ -21,6 +21,7 @@
<module name="CentralizedMonitoring" options="-parameters" />
<module name="NMGJTManager" options="-parameters" />
<module name="SSMPBack" options="-parameters" />
<module name="WS_SystemShow" options="-parameters" />
</option>
</component>
</project>

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/../NMGJTManager/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/../NMGJTManager/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/assets" charset="GBK" />
<file url="file://$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/assets" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/index.html" charset="GBK" />
<file url="file://$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/resource" charset="GBK" />
<file url="file://$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/tinymce" charset="GBK" />
<file url="file://$PROJECT_DIR$/../../TRKFTrafficSpace-WorkSpace/WS_SystemShow/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/../../TRKFTrafficSpace-WorkSpace/WS_SystemShow/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

@ -6,7 +6,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.15</version>
<relativePath/> <!-- lookup parent from repository -->
<relativePath/>
</parent>
<groupId>com.example</groupId>
<artifactId>CentralizedMonitoring</artifactId>

@ -37,6 +37,7 @@ public class CorsConfig implements WebMvcConfigurer {
.excludePathPatterns("/resource/**")
.excludePathPatterns("/assets/**")
.excludePathPatterns("/CarLineView/**")
.excludePathPatterns("/IpPortText/**")
.excludePathPatterns("/index**")
.excludePathPatterns("/WorkOrderCirculation/**")
;

@ -0,0 +1,90 @@
package com.nmgs.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nmgs.entity.IpPortText;
import com.nmgs.mapper.IpPortTextMapper;
import com.nmgs.util.PropertiesUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
*
* @author ruoyi
*/
@Controller
@RequestMapping("/IpPortText")
@CrossOrigin(origins = "*")
public class IpPortTextController {
@Resource
IpPortTextMapper ipPortTextMapper;
@PostMapping("/getPage")
@ResponseBody
public Object getPage(@RequestBody Map<String, Object> params, HttpServletRequest request) {
int pageNum = (int) params.get("pageNum");
int pageSize = (int) params.get("pageSize");
Page<IpPortText> page = new Page<>(pageNum, pageSize);
QueryWrapper<IpPortText> wrapper = new QueryWrapper<>();
if(params.containsKey("staNo")&&params.get("staNo")!=null&&!params.get("staNo").toString().trim().equals("")){
wrapper.eq("STANO",params.get("staNo"));
}
page = ipPortTextMapper.selectPage(page, wrapper);
return page;
}
@PostMapping("/selectInfo")
@ResponseBody
public Object selectInfo() {
Map<String, Object> params = new HashMap<>();
params.put("staNoList", ipPortTextMapper.getStaNoList(PropertiesUtil.getValue("UserStaNO")));
return params;
}
@PostMapping("/checkStaNo")
@ResponseBody
public Object checkStaNo(@RequestBody Map<String, Object> params) {
IpPortText staNo = ipPortTextMapper.selectById((int) params.get("staNo"));
return staNo == null;
}
@PostMapping("/saveData")
@ResponseBody
public Object saveData(@RequestBody IpPortText ipPortText) {
int a = 0;
if (ipPortText.getIsAdd()) {
a = ipPortTextMapper.insert(ipPortText);
} else {
a = ipPortTextMapper.updateById(ipPortText);
}
if (a > 0) {
try {
new PropertiesUtil().set("isReloadPortTask", "1");
} catch (IOException ignored) {
}
}
return a;
}
@PostMapping("/deleteByIds")
@ResponseBody
public Object deleteByIds(@RequestBody List<Integer> ids) {
int a = 0;
a = ipPortTextMapper.deleteBatchIds(ids);
if (a > 0) {
try {
new PropertiesUtil().set("isReloadPortTask", "1");
} catch (IOException ignored) {
}
}
return a;
}
}

@ -0,0 +1,28 @@
package com.nmgs.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Data
@TableName("IP_PORT_TYPE_TEXT")
public class IpPortText {
@TableId(value = "STANO")
private Long staNo;
@TableField(value = "IP")
private String ip;
@TableField("PORT")
private Long port;
@TableField("TEXT")
private String text;
@TableField("ISRUN")
private Long isRun;
@TableField(exist = false)
private Boolean isAdd;
}

@ -14,7 +14,7 @@
*
from USER_STA_TABLE
<where>
MANNO=${manNo}
MANNO=#{manNo}
</where>
)
</if>

@ -0,0 +1,14 @@
package com.nmgs.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nmgs.entity.IpPortText;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface IpPortTextMapper extends BaseMapper<IpPortText> {
List<Map<String,Object>> getStaNoList(@Param("STANO") String staNo);
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nmgs.mapper.IpPortTextMapper">
<select id="getStaNoList" resultType="java.util.Map">
SELECT *
FROM NAME_TABLE_DCOM
WHERE SUBCOMNO = #{STANO}
AND USERTYPE = 1
</select>
</mapper>

@ -126,7 +126,6 @@ public class PortInfoSocketAsyncService {
public Map<String, Map<String, HikariDataSource>> dbMap = new HashMap<>();
public Map<String, List<String>> staListMap = new HashMap<>();
@Async("CentralizedMonitoringThreadPool")
public void getUntitled(String manNo, Session session, String staNo, boolean isFirst, String socketId) {
LogUtil.WriteLog_Info("查询流水", "SocketUnitTask");
LogUtil.WriteLog_Info("threadTaskService.getRun()=" + threadTaskService.getRun(), "SocketUnitTask");

@ -65,20 +65,15 @@ public class LogUtil {
}
}
String fullFilePath = baseDir + fileDic + "/" + suffix + ".txt";
try (RandomAccessFile reader = new RandomAccessFile(new File(fullFilePath), "rw");
FileLock lock1 = reader.getChannel().lock()) {
FileLock ignored = reader.getChannel().lock()) {
reader.seek(reader.length());
reader.write(sb.toString().getBytes());
} catch (IOException e) {
e.printStackTrace();
System.out.println(e.getMessage());
}
} catch (Exception exception) {
exception.printStackTrace();
System.out.println(exception.getMessage());
}
}

@ -18,7 +18,7 @@ public class Main {
// String date=DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,DateUtils.dateTime(DateUtils.YYYYMMDDHHMMSS,str));
// System.out.println(date);
// Object stat = HTTPUtil.sendRequestGet("http://10.15.56.2:6000/get_portstat?portno="+51, Object.class);
Object stat = HTTPUtil.sendRequestGet("http://10.15.55.205:6000/GetData2?portno=" + 5 + "&watchno=2", Object.class);
Object stat = HTTPUtil.sendRequestGet("http://10.15.55.75:6000/GetData2?portno=" + 1 + "&watchno=2", Object.class);
// Object stat = HTTPUtil.sendRequestGet("http://10.15.57.141:6000/get_listall2?watchno=" + 2, Object.class);
System.out.println(stat);
// String url = "http://10.15.136.194:6000/get_listall2?watchno=2";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -5,8 +5,8 @@
<link rel="icon" href="/favicon.ico"/>
<title></title>
<script type="module" crossorigin src="./assets/index.e0b25201.js"></script>
<link rel="stylesheet" href="./assets/index.38f67042.css">
<script type="module" crossorigin src="./assets/index.3afe6177.js"></script>
<link rel="stylesheet" href="./assets/index.0e7489d9.css">
</head>
<body>
<div id="app">

@ -2,47 +2,31 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="3f61f33b-1398-438f-b18e-516860fc6663" name="更改" comment="">
<change afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/assets/index.38f67042.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/assets/index.e0b25201.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/.idea/encodings.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/config/FilterConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/config/FilterConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/config/ThreadPoolConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/config/ThreadPoolConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/controller/CarLineController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/controller/CarLineController.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/controller/IpPortTextController.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/entity/IpPortText.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/mapper/IpPortTextMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/mapper/IpPortTextMapper.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/CentralizedMonitoring/assets/index.0e7489d9.css" afterDir="false" />
<change afterPath="$PROJECT_DIR$/CentralizedMonitoring/assets/index.3afe6177.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/views/IpPortText/index.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/.idea/compiler.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/mapper/CarLineMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/mapper/CarLineMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/ApplicationStopImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/ApplicationStopImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/PortInfoSocketAsyncService.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/PortInfoSocketAsyncService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/ScheduleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/ScheduleService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/ThreadTaskService.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/service/ThreadTaskService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/util/FileUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/util/FileUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/util/JDBCUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/util/JDBCUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/util/LogUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/util/LogUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/util/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/java/com/nmgs/util/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/assets/index.38f67042.css" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/assets/index.e0b25201.js" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../CentralizedMonitoring/src/main/resources/static/View/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CentralizedMonitoring/assets/index.5af864a2.js" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CentralizedMonitoring/assets/index.38f67042.css" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/CentralizedMonitoring/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/CentralizedMonitoring/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/util/axios/axios.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/util/axios/axios.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/views/CarLine/CarLineView.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/CarLine/CarLineView.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/views/CarLine/components/PortInfo.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/CarLine/components/PortInfo.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/views/CarLine/components/TreeData.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/CarLine/components/TreeData.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/src/main/java/com/nmgs/controller/SysLoginController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/src/main/java/com/nmgs/controller/SysLoginController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/assets/index.47df6ef2.css" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/assets/index.4d464c4d.js" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/assets/mz.995cd290.ttf" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/assets/sjb.527b9def.ttf" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/src/main/resources/static/View/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/util/api/api.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/util/api/api.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/util/router/router.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/util/router/router.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/src/main/java/com/nmgs/controller/GtUserController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/src/main/java/com/nmgs/controller/GtUserController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager.war" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager.war" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager/WEB-INF/classes/com/nmgs/controller/SysLoginController.class" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager/WEB-INF/classes/com/nmgs/controller/SysLoginController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager/WEB-INF/classes/static/View/assets/index.4d464c4d.js" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager/WEB-INF/classes/static/View/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager/WEB-INF/classes/static/View/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/classes/com/nmgs/controller/SysLoginController.class" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/target/classes/com/nmgs/controller/SysLoginController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/classes/static/View/assets/index.4d464c4d.js" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/classes/static/View/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/target/classes/static/View/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManagerView/NMGJTManager/assets/index.4d464c4d.js" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManagerView/NMGJTManager/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManagerView/NMGJTManager/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManagerView/src/util/axios/axios.js" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManagerView/src/util/axios/axios.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManagerView/src/views/User/index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManagerView/src/views/User/index.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManagerView/src/views/login.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManagerView/src/views/login.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManagerView/src/views/menu/menuIndex.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManagerView/src/views/menu/menuIndex.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager/WEB-INF/classes/com/nmgs/controller/GtUserController.class" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/target/NMGJTManager/WEB-INF/classes/com/nmgs/controller/GtUserController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../NMGJTManager/target/classes/com/nmgs/controller/GtUserController.class" beforeDir="false" afterPath="$PROJECT_DIR$/../NMGJTManager/target/classes/com/nmgs/controller/GtUserController.class" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -81,7 +65,7 @@
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;last_opened_file_path&quot;: &quot;D:/JAVA/JAVAIDE/WorkSpace/CentralizedMonitoring/NMGJTManagerView&quot;,
&quot;last_opened_file_path&quot;: &quot;D:/JAVA/JAVAIDE/WorkSpace/CentralizedMonitoring/CentralizedMonitoringView/src/views/IpPortText&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;ts.external.directory.path&quot;: &quot;D:\\JAVA\\JAVAIDE\\IntelliJ IDEA 2022.2.2\\plugins\\JavaScriptLanguage\\jsLanguageServicesImpl\\external&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
@ -89,10 +73,11 @@
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\JAVA\JAVAIDE\WorkSpace\CentralizedMonitoring\CentralizedMonitoringView\src\views\IpPortText" />
<recent name="D:\JAVA\JAVAIDE\WorkSpace\CentralizedMonitoring\CentralizedMonitoringView\src\views" />
<recent name="D:\JAVA\JAVAIDE\WorkSpace\CentralizedMonitoring\CentralizedMonitoringView\src\views\Pages\WorkOrderCirculation" />
<recent name="D:\JAVA\JAVAIDE\WorkSpace\CentralizedMonitoring\CentralizedMonitoringView\public\resource\img" />
<recent name="D:\JAVA\JAVAIDE\WorkSpace\CentralizedMonitoring\CentralizedMonitoringView" />
<recent name="D:\JAVA\JAVAIDE\WorkSpace\CentralizedMonitoring\CentralizedMonitoringView\src\plugins" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="D:\JAVA\JAVAIDE\WorkSpace\CentralizedMonitoring\CentralizedMonitoringView\src\views\CarLine" />
@ -151,6 +136,10 @@
<workItem from="1701909716947" duration="61000" />
<workItem from="1701939370080" duration="600000" />
<workItem from="1701995475598" duration="141000" />
<workItem from="1701996661623" duration="594000" />
<workItem from="1702022031734" duration="52000" />
<workItem from="1702281013983" duration="4067000" />
<workItem from="1702450883129" duration="62000" />
</task>
<task id="LOCAL-00001" summary="变更">
<created>1699319109952</created>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -5,8 +5,8 @@
<link rel="icon" href="/favicon.ico"/>
<title></title>
<script type="module" crossorigin src="./assets/index.e0b25201.js"></script>
<link rel="stylesheet" href="./assets/index.38f67042.css">
<script type="module" crossorigin src="./assets/index.3afe6177.js"></script>
<link rel="stylesheet" href="./assets/index.0e7489d9.css">
</head>
<body>
<div id="app">

@ -4,3 +4,10 @@ const {get, post} = axios
export const getTreeData = data => post("/CentralizedMonitoring/CarLine/getTreeData", data)
export const selectPortLogs = data => post("/CentralizedMonitoring/CarLine/selectPortLogs", data)
export const getSelectInfo = data => post("/CentralizedMonitoring/CarLine/getSelectInfo", data)
export const getPage = data => post("/CentralizedMonitoring/IpPortText/getPage", data)
export const selectInfo = () => post("/CentralizedMonitoring/IpPortText/selectInfo", {})
export const saveData = data => post("/CentralizedMonitoring/IpPortText/saveData", data)
export const deleteByIds = data => post("/CentralizedMonitoring/IpPortText/deleteByIds", data)
export const checkStaNo = data => post("/CentralizedMonitoring/IpPortText/checkStaNo", data)

@ -1,7 +1,7 @@
import * as vueRouter from "vue-router";
import NotFound from '../../views/ErrorPage/404.vue';
import CarLineView from '../../views/CarLine/CarLineView.vue';
import test from '../../views/CarLine/test.vue';
import IpPortText from '../../views/IpPortText/index.vue';
import WorkOrderCirculation from '../../views/Pages/WorkOrderCirculation/WorkOrderCirculation.vue';
@ -11,8 +11,8 @@ const routes = [
component: CarLineView
},
{
path: '/CentralizedMonitoring/test',
component: test
path: '/CentralizedMonitoring/IpPortText',
component: IpPortText
},
{
path: '/CentralizedMonitoring/WorkOrderCirculation',

@ -0,0 +1,348 @@
<template>
<div class="intemShow">
<el-row style="width: 100%;height: 100%">
<el-col :span="24">
<div style="padding: 10px 0">
<el-select v-model="selectFrom.staNo" placeholder="请选择收费站"
style="width: 150px"
>
<el-option
v-for="item in staNoList"
:label="item.STANAME"
:value="item.STANO+''"
/>
</el-select>
<el-input style="width: 150px;margin-left: 0.5%" placeholder="请输入站点编号" v-model="selectFrom.staNo"
clearable></el-input>
<el-button type="primary" style="margin-left: 0.5%;margin-top: 0px" @click="network">
<el-icon style="vertical-align: middle;">
<search/>
</el-icon>
<span style="vertical-align: middle;"> 搜索 </span>
</el-button>
<el-button type="primary" style="margin-left: 0.5%;margin-top: 0px" @click="reNetwork">
<el-icon>
<Refresh/>
</el-icon>
<span style="vertical-align: middle;"> 重置 </span>
</el-button>
<el-button type="primary" style="margin-left: 0.5%;margin-top: 0px" @click="addItem"><span style="vertical-align: middle;"> 新增 </span>
<el-icon style="margin-left: 3px">
<plus/>
</el-icon>
</el-button>
<el-button type="danger" style="margin-left: 0.5%;margin-top: 0px" @click="deleteSelect(null)"><span style="vertical-align: middle;"> 删除 </span>
<el-icon style="margin-left: 3px">
<delete/>
</el-icon>
</el-button>
</div>
<el-table :data="tableData"
border
highlight-current-row="true"
style="width: 100%;"
:height=myHeight
v-loading="tableLoading"
@selection-change="handleSelectionChange"
>
<el-table-column resizable="false" fixed type="selection" width="50" align="center"></el-table-column>
<el-table-column fixed prop="staNo" label="站点编号" width="100"
align="center"></el-table-column>
<el-table-column prop="staName" label="站点名称" align="center"
:formatter="getName"></el-table-column>
<el-table-column prop="ip" label="IP"
align="center"></el-table-column>
<el-table-column prop="port" label="端口"
align="center"></el-table-column>
<el-table-column prop="text" label="备注"
align="center"></el-table-column>
<el-table-column prop="isRun" label="是否运行"
align="center" :formatter="getRun"></el-table-column>
<el-table-column :resizable="false" prop="right" label="操作" width="130" align="center">
<template v-slot="scope">
<el-button style="width: 45%;margin-left: 2%" @click="editThis(scope.row)" type="warning" size="default"
:icon="Edit">
</el-button>
<el-button style="width: 45%;margin-left: 2%" @click="deleteSelect(scope.row.staNo)" type="danger"
size="default" :icon="Delete">
</el-button>
</template>
</el-table-column>
</el-table>
<el-config-provider :locale="locale">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="selectFrom.pageNum"
:page-sizes="[ 10,15,30, 50, 100]"
:page-size="selectFrom.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="selectFrom.total">
</el-pagination>
</el-config-provider>
</el-col>
</el-row>
</div>
<el-dialog title="操作" v-model="dialogFormVisible" width="50%" top="0.5%" :close-on-click-modal=false
destroy-on-close
>
<el-form :model="inputForm" size="medium" :rules="rules" ref="form">
<el-row>
<el-col :span="12">
<el-form-item label="收费站" :label-width="formLabelWidth" prop="staNo">
<el-select v-model="inputForm.staNo" placeholder="请选择收费站"
style="width:100%"
:disabled="!inputForm.isAdd"
>
<el-option
v-for="item in staNoList"
:label="item.STANAME"
:value="item.STANO"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="IP" :label-width="formLabelWidth" prop="ip">
<el-input v-model="inputForm.ip" autocomplete="off" :disabled="keyInput"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="端口" :label-width="formLabelWidth" prop="port">
<el-input v-model="inputForm.port" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" :label-width="formLabelWidth" prop="text">
<el-input v-model="inputForm.text" autocomplete="off"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否运行" :label-width="formLabelWidth" prop="isRun">
<el-select v-model="inputForm.isRun" placeholder="请选择是否运行" style="width:100%">
<el-option
label="是"
:value="1"
/>
<el-option
label="否"
:value="0"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogFormVisible=false"> </el-button>
<el-button type="primary" @click="saveData('form')"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script lang="ts">
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import {ElMessage, ElMessageBox} from "element-plus";
import {
getPage,
selectInfo,
saveData,
deleteByIds,
checkStaNo
} from "../../util/api/api.js";
import moment from "moment";
import {Delete, Edit, Search, Share, Upload, Plus} from '@element-plus/icons-vue'
export default {
name: "index",
components: {
Search,
},
data() {
return {
Search,
Edit,
Delete,
selectFrom: {
pageNum: 1,
pageSize: 10,
total: 0,
staNo: '',
},
inputForm: {},
nowTime: '',
locale: zhCn,
tableData: [],
multipleSelection: [],
staNoList: [],
staNoMap: {},
myHeight: 500,
dialogFormVisible: false,
tableLoading: true,
formLabelWidth: '100px',
rules: {
ip: [{required: true, message: '请输入路段编码', trigger: 'blur'}],
port: [{required: true, message: '请输入路段名称', trigger: 'blur'}],
text: [{required: true, message: '请输入路段名称', trigger: 'blur'}],
isRun: [{required: true, message: '请输入路段名称', trigger: 'blur'}],
staNo: [{required: true, validator: this.toCheckStaNo, trigger: 'blur'}],
}
}
},
methods: {
toCheckStaNo(rule: any, value: any, callback: any) {
if (this.inputForm.isAdd) {
if (value == '' || value == null) {
callback(new Error('请选择收费站!'))
} else {
checkStaNo({staNo: value}).then(res => {
console.log(res)
if (res) {
callback()
} else {
callback(new Error('该配置已存在!'))
}
})
}
} else {
callback()
}
},
handleSelectionChange(row) { //
this.multipleSelection = row
},
handleSizeChange(val) { //
this.selectFrom.pageSize = val
this.network()
},
handleCurrentChange(val) { //
this.selectFrom.pageNum = val
this.network()
},
network() { //
this.tableLoading = true
selectInfo().then((res) => {
this.staNoList = res.staNoList
for (let i = 0; i < this.staNoList.length; i++) {
this.staNoMap[this.staNoList[i].STANO] = this.staNoList[i].STANAME;
}
})
getPage(this.selectFrom).then((res) => {
this.selectFrom.total = res.total
this.tableData = res.records
this.tableLoading = false
})
},
reNetwork() { //
this.tableLoading = true
this.selectFrom.staNo = '';
this.network();
},
getName(row, column) {
return this.staNoMap[row.staNo];
},
getRun(row, column) {
if (row[column.property] == 1) {
return '是';
} else {
return '否';
}
},
deleteSelect(id) { //
let ids = [];
if (id == null || id == '') {
ids = this.multipleSelection.map(v => v.staNo)
} else {
ids[0] = id
}
if (ids.length == 0) {
ElMessage({
showClose: true,
message: '请选择要删除的数据!',
type: 'warning',
})
return;
}
ElMessageBox.confirm(
'是否批量删除' + ids.length + '条数据?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
).then(() => {
deleteByIds(ids).then((res) => {
if (res) {
ElMessage({
message: ids.length + '条删除成功!',
type: 'success',
})
this.network()
} else {
ElMessage.error('删除失败!')
}
})
}).catch(() => {
ElMessage({
type: 'info',
message: '已取消!',
})
})
},
editThis(row) { //
this.inputForm = row
this.inputForm.isAdd = false;
this.dialogFormVisible = true
},
addItem() { //
this.inputForm = {}
this.inputForm.isAdd = true;
this.dialogFormVisible = true
},
saveData(resetForm) { //
this.$refs[resetForm].validate((valid) => {
if (valid) {
saveData(this.inputForm).then((res) => {
if (res) {
ElMessage({
message: '操作成功!',
type: 'success',
})
this.dialogFormVisible = false
this.network()
this.inputForm = {}
} else {
ElMessage.error('操作失败!请重新操作!')
}
})
}
})
},
},
mounted() {
this.myHeight = (document.documentElement.clientHeight) * 0.85;
this.network()
}
}
</script>
<style scoped>
.intemShow {
margin-left: 15px;
}
@media print {
.no-print {
display: none;
}
}
</style>

@ -88,6 +88,7 @@ public class GtUserController{
@RequestMapping(value = "/saveUser", method = RequestMethod.POST)
@ResponseBody
public Object saveUser(@RequestBody GTUser gTUser) {
gTUser.setLoginPwd(PassWordUtils.encrypt(gTUser.getLoginPwd()));
if (gTUser.getIsAdd()) {
return gTUserMapper.insert(gTUser) > 0;
} else {

Loading…
Cancel
Save