askin 2 years ago
parent
commit
03f42f8126

+ 1 - 0
sources/server/vrv/run/application.pid

@@ -0,0 +1 @@
+16084

+ 0 - 649
sources/server/vrv/vrv-core-api/src/main/resources/DeviceParamKeyMap.json

@@ -1,649 +0,0 @@
-{
-  "p1": {
-    "label": "温度1_读取",
-    "key": "WD_1",
-    "type": "double"
-  },
-  "p2": {
-    "label": "湿度1_读取",
-    "key": "SD_1",
-    "type": "double"
-  },
-  "p3": {
-    "label": "温度_设定",
-    "key": "WD_SD",
-    "type": "double"
-  },
-  "p4": {
-    "label": "湿度_设定",
-    "key": "SD_SD",
-    "type": "double"
-  },
-  "p5": {
-    "label": "温度1_修正",
-    "key": "WD1_XZ",
-    "type": "double"
-  },
-  "p6": {
-    "label": "湿度2_修正",
-    "key": "SD1_XZ",
-    "type": "double"
-  },
-  "p7": {
-    "label": "制冷回路增益P",
-    "key": "ZL_P",
-    "type": "double"
-  },
-  "p8": {
-    "label": "制冷积分时间",
-    "key": "ZL_I",
-    "type": "double"
-  },
-  "p9": {
-    "label": "除湿回路增益P",
-    "key": "CS_P",
-    "type": "double"
-  },
-  "p10": {
-    "label": "除湿积分时间",
-    "key": "CS_I",
-    "type": "double"
-  },
-  "p11": {
-    "label": "加热回路增益P",
-    "key": "JR_P",
-    "type": "double"
-  },
-  "p12": {
-    "label": "加热积分时间",
-    "key": "JR_I",
-    "type": "double"
-  },
-  "p13": {
-    "label": "加湿回路增益P",
-    "key": "JS_P",
-    "type": "double"
-  },
-  "p14": {
-    "label": "加湿积分时间",
-    "key": "JS_I",
-    "type": "double"
-  },
-  "p15": {
-    "label": "热水温度手动开度",
-    "key": "RSF_SDKD",
-    "type": "double"
-  },
-  "p16": {
-    "label": "冷水温度手动开度",
-    "key": "LSF_SDKD",
-    "type": "double"
-  },
-  "p17": {
-    "label": "加湿阀手动开度",
-    "key": "JSF_SDKD",
-    "type": "double"
-  },
-  "p18": {
-    "label": "冷水阀",
-    "key": "LSF",
-    "type": "double"
-  },
-  "p19": {
-    "label": "热水阀",
-    "key": "RSF",
-    "type": "double"
-  },
-  "p20": {
-    "label": "加湿阀",
-    "key": "JSF",
-    "type": "double"
-  },
-  "p21": {
-    "label": "含湿量设定值",
-    "key": "HSL_SD",
-    "type": "double"
-  },
-  "p22": {
-    "label": "含湿量实际值",
-    "key": "HSL",
-    "type": "double"
-  },
-  "p23": {
-    "label": "缺风延时报警",
-    "key": "QF_YSBJ",
-    "type": "double"
-  },
-  "p24": {
-    "label": "机组延时停止",
-    "key": "JZ_YSTZ",
-    "type": "long"
-  },
-  "p25": {
-    "label": "送风机延时启动时间",
-    "key": "SFJ_YSQD",
-    "type": "long"
-  },
-  "p26": {
-    "label": "排风机延时启动时间",
-    "key": "PFJ_YSQD",
-    "type": "long"
-  },
-  "p27": {
-    "label": "时间表_启动_星期",
-    "key": "QD_XQ",
-    "type": "long"
-  },
-  "p28": {
-    "label": "时间表_启动_时",
-    "key": "QD_S",
-    "type": "long"
-  },
-  "p29": {
-    "label": "时间表_启动_分",
-    "key": "QD_F",
-    "type": "long"
-  },
-  "p30": {
-    "label": "时间表_启动_秒",
-    "key": "QD_S",
-    "type": "long"
-  },
-  "p31": {
-    "label": "时间表_停止_星期",
-    "key": "TZ_XQ",
-    "type": "long"
-  },
-  "p32": {
-    "label": "时间表_停止_时",
-    "key": "TZ_S",
-    "type": "long"
-  },
-  "p33": {
-    "label": "时间表_停止_分",
-    "key": "TZ_F",
-    "type": "long"
-  },
-  "p34": {
-    "label": "时间表_停止_秒",
-    "key": "TZ_S",
-    "type": "long"
-  },
-  "p35": {
-    "label": "主用或备用模式选择",
-    "key": "MS_XZ",
-    "type": "boolean"
-  },
-  "p36": {
-    "label": "机组选择",
-    "key": "JZ_XZ",
-    "type": "boolean"
-  },
-  "p37": {
-    "label": "设备开关机",
-    "key": "JZ_KGJ",
-    "type": "boolean"
-  },
-  "p38": {
-    "label": "定时模式",
-    "key": "DS_QT",
-    "type": "boolean"
-  },
-  "p39": {
-    "label": "故障复位",
-    "key": "GZ_FW",
-    "type": "boolean"
-  },
-  "p40": {
-    "label": "送风阀手自动选择",
-    "key": "SFF_SZXZ",
-    "type": "boolean"
-  },
-  "p41": {
-    "label": "送风阀手动",
-    "key": "SFF_SDQD",
-    "type": "boolean"
-  },
-  "p42": {
-    "label": "排风阀手自动选择",
-    "key": "PFF_SZXZ",
-    "type": "boolean"
-  },
-  "p43": {
-    "label": "排风阀手动",
-    "key": "PFF_SDQD",
-    "type": "boolean"
-  },
-  "p44": {
-    "label": "送风机手自动选择",
-    "key": "SFJ_SZXZ",
-    "type": "boolean"
-  },
-  "p45": {
-    "label": "送风机手动",
-    "key": "SFJ_SDQD",
-    "type": "boolean"
-  },
-  "p46": {
-    "label": "排风机手自动选择",
-    "key": "PFJ_SZXZ",
-    "type": "boolean"
-  },
-  "p47": {
-    "label": "排风机手动",
-    "key": "PFJ_SDQD",
-    "type": "boolean"
-  },
-  "p48": {
-    "label": "风冷主机手自动选择",
-    "key": "FLZJ_SZXZ",
-    "type": "boolean"
-  },
-  "p49": {
-    "label": "风冷主机手动",
-    "key": "FLZJ_SDQD",
-    "type": "boolean"
-  },
-  "p50": {
-    "label": "一级电加热手自动选择",
-    "key": "YJDJR_SZXZ",
-    "type": "boolean"
-  },
-  "p51": {
-    "label": "一级电加热手动",
-    "key": "YJDJR_SDQD",
-    "type": "boolean"
-  },
-  "p52": {
-    "label": "二级电加热手自动选择",
-    "key": "EJDJR_SZXZ",
-    "type": "boolean"
-  },
-  "p53": {
-    "label": "二级电加热手动",
-    "key": "EJDJR_SDQD",
-    "type": "boolean"
-  },
-  "p54": {
-    "label": "三级电加热手自动选择",
-    "key": "SJDJR_SZXZ",
-    "type": "boolean"
-  },
-  "p55": {
-    "label": "三级电加热手动",
-    "key": "SJDJR_SDQD",
-    "type": "boolean"
-  },
-  "p56": {
-    "label": "热水阀PID手自动选择",
-    "key": "RSF_SZXZ",
-    "type": "boolean"
-  },
-  "p57": {
-    "label": "冷水阀PID手自动选择",
-    "key": "LSF_SZXZ",
-    "type": "boolean"
-  },
-  "p58": {
-    "label": "电加湿PID手自动选择",
-    "key": "JSF_SZXZ",
-    "type": "boolean"
-  },
-  "p59": {
-    "label": "恢复出厂设定",
-    "key": "HH_CC",
-    "type": "boolean"
-  },
-  "p60": {
-    "label": "降温除湿优先选择",
-    "key": "WS_YXXZ",
-    "type": "boolean"
-  },
-  "p61": {
-    "label": "季节选择",
-    "key": "DX_XZ",
-    "type": "boolean"
-  },
-  "p62": {
-    "label": "温度高报警",
-    "key": "WD_GBJ",
-    "type": "boolean"
-  },
-  "p63": {
-    "label": "温度低报警",
-    "key": "WD_DBJ",
-    "type": "boolean"
-  },
-  "p64": {
-    "label": "湿度高报警",
-    "key": "SD_GBJ",
-    "type": "boolean"
-  },
-  "p65": {
-    "label": "湿度低报警",
-    "key": "SD_DBJ",
-    "type": "boolean"
-  },
-  "p66": {
-    "label": "初效故障报警",
-    "key": "LWDS_CX",
-    "type": "boolean"
-  },
-  "p67": {
-    "label": "中效故障报警",
-    "key": "LWDS_ZX",
-    "type": "boolean"
-  },
-  "p68": {
-    "label": "送风机故障",
-    "key": "SFJ_GZ",
-    "type": "boolean"
-  },
-  "p69": {
-    "label": "排风机故障",
-    "key": "PFJ_GZ",
-    "type": "boolean"
-  },
-  "p70": {
-    "label": "风冷主机故障",
-    "key": "FLZJ_GZ",
-    "type": "boolean"
-  },
-  "p71": {
-    "label": "高温报警",
-    "key": "GW_BJ",
-    "type": "boolean"
-  },
-  "p72": {
-    "label": "缺风压差",
-    "key": "QFYZ_BJ",
-    "type": "boolean"
-  },
-  "p73": {
-    "label": "机组急停",
-    "key": "JZ_ZT",
-    "type": "boolean"
-  },
-  "p74": {
-    "label": "机组运行",
-    "key": "JZ_YX",
-    "type": "boolean"
-  },
-  "p75": {
-    "label": "机组故障",
-    "key": "JZ_GZ",
-    "type": "boolean"
-  },
-  "p76": {
-    "label": "送风机工频启动",
-    "key": "SFJ_QT",
-    "type": "boolean"
-  },
-  "p77": {
-    "label": "排风机工频启动",
-    "key": "PFJ_QT",
-    "type": "boolean"
-  },
-  "p78": {
-    "label": "一级电加热启停",
-    "key": "YJDJR_QT",
-    "type": "boolean"
-  },
-  "p79": {
-    "label": "二级电加热启停",
-    "key": "EJDJR_QT",
-    "type": "boolean"
-  },
-  "p80": {
-    "label": "三级电加热启停",
-    "key": "SJDRJ_QT",
-    "type": "boolean"
-  },
-  "p81": {
-    "label": "送风阀开关控制",
-    "key": "SFF_KGKZ",
-    "type": "boolean"
-  },
-  "p82": {
-    "label": "排风阀开关控制",
-    "key": "PFF_KGKZ",
-    "type": "boolean"
-  },
-  "p83": {
-    "label": "风冷主机启停",
-    "key": "FLZJ_QT",
-    "type": "boolean"
-  },
-  "p84": {
-    "label": "温度2_读取",
-    "key": "WD_2",
-    "type": "double"
-  },
-  "p85": {
-    "label": "湿度2_读取",
-    "key": "SD_2",
-    "type": "double"
-  },
-  "p86": {
-    "label": "送风机频率设定",
-    "key": "SFJ_PLSD",
-    "type": "double"
-  },
-  "p87": {
-    "label": "排风机频率设定",
-    "key": "PFJ_PLSD",
-    "type": "double"
-  },
-  "p88": {
-    "label": "送风机频率反馈",
-    "key": "SFJ_PLFH",
-    "type": "double"
-  },
-  "p89": {
-    "label": "排风机频率反馈",
-    "key": "PFJ_PLFH",
-    "type": "double"
-  },
-  "p90": {
-    "label": "送风机频率上限值",
-    "key": "SFJ_PLSX",
-    "type": "double"
-  },
-  "p91": {
-    "label": "送风机频率下限值",
-    "key": "SFJ_PLXX",
-    "type": "double"
-  },
-  "p92": {
-    "label": "排风机频率上限值",
-    "key": "PFJ_PLSX",
-    "type": "double"
-  },
-  "p93": {
-    "label": "排风机频率下限值",
-    "key": "PFJ_PLXX",
-    "type": "double"
-  },
-  "p94": {
-    "label": "温度报警上限值",
-    "key": "WDBJ_SX",
-    "type": "double"
-  },
-  "p95": {
-    "label": "温度报警下限值",
-    "key": "WDBJ_XX",
-    "type": "double"
-  },
-  "p96": {
-    "label": "湿度报警上限值",
-    "key": "SDBJ_SX",
-    "type": "double"
-  },
-  "p97": {
-    "label": "湿度报警下限值",
-    "key": "SDBJ_XX",
-    "type": "double"
-  },
-  "p98": {
-    "label": "送风机频率修正",
-    "key": "SFJ_PLXZ",
-    "type": "double"
-  },
-  "p99": {
-    "label": "排风机频率修正",
-    "key": "PFJ_PLXZ",
-    "type": "double"
-  },
-
-
-  "p100": {
-    "label": "预热阀手动开度",
-    "key": "YRF_SDKD",
-    "type": "double"
-  },
-  "p101": {
-    "label": "温度死区",
-    "key": "WD_SQ",
-    "type": "double"
-  },
-  "p102": {
-  "label": "湿度死区",
-  "key": "SD_SQ",
-  "type": "double"
-  },
-  "p103": {
-    "label": "PID预热P",
-    "key": "YR_P",
-    "type": "double"
-  },
-  "p104": {
-    "label": "PID预热I",
-    "key": "YR_I",
-    "type": "double"
-  },
-  "p105": {
-    "label": "送风温度/风道温度",
-    "key": "SFFD_WD",
-    "type": "double"
-  },
-  "p106": {
-    "label": "室内温度2修正",
-    "key": "WD2_XZ",
-    "type": "double"
-  },
-  "p107": {
-    "label": "室内湿度2修正",
-    "key": "SD2_XZ",
-    "type": "double"
-  },
-  "p108": {
-    "label": "送风温度修正",
-    "key": "SFWD_XZ",
-    "type": "double"
-  },
-  "p109": {
-    "label": "送风湿度修正",
-    "key": "SFSD_XZ",
-    "type": "double"
-  },
-  "p110": {
-    "label": "风机启动失败",
-    "key": "FJ_QDSB",
-    "type": "boolean"
-  },
-  "p111": {
-    "label": "风机变频故障",
-    "key": "FJ_BPGZ",
-    "type": "boolean"
-  },
-  "p112": {
-    "label": "高效滤网阻塞",
-    "key": "LWDS_GX",
-    "type": "boolean"
-  },
-  "p113": {
-    "label": "风机启动延时",
-    "key": "FJQD_YS",
-    "type": "long"
-  },
-  "p114": {
-    "label": "风机停止延时",
-    "key": "FJTZ_YS",
-    "type": "long"
-  },
-  "p115": {
-    "label": "倒计时",
-    "key": "DJS",
-    "type": "long"
-  },
-  "p116": {
-    "label": "温度传感器选择",
-    "key": "WDCGQ_XZ",
-    "type": "boolean"
-  },
-  "p117": {
-    "label": "自动开机",
-    "key": "ZDKJ",
-    "type": "boolean"
-  },
-  "p118": {
-    "label": "湿度传感器选择",
-    "key": "SDCGQ_XZ",
-    "type": "boolean"
-  },
-  "p119": {
-    "label": "通风",
-    "key": "TF",
-    "type": "boolean"
-  },
-  "p120": {
-    "label": "预热阀手自动",
-    "key": "YRF_SZXZ",
-    "type": "boolean"
-  },
-  "p121": {
-    "label": "关机",
-    "key": "GJ",
-    "type": "boolean"
-  },
-  "p122": {
-    "label": "报警允许",
-    "key": "BJYX",
-    "type": "boolean"
-  },
-  "p123": {
-    "label": "X_预热阀",
-    "key": "YRF",
-    "type": "double"
-  },
-  "p124": {
-    "label": "室内静压",
-    "key": "SNJY",
-    "type": "double"
-  },
-  "p125": {
-    "label": "室内静压修正",
-    "key": "SNJY_XZ",
-    "type": "double"
-  },
-  "p126": {
-    "label": "温度传感器上限",
-    "key": "WDCGQ_SX",
-    "type": "double"
-  },
-  "p127": {
-    "label": "温度传感器下限",
-    "key": "WDCGQ_XX",
-    "type": "double"
-  },
-  "p128": {
-    "label": "送风温度下限",
-    "key": "SFWD_XX",
-    "type": "double"
-  },
-  "p129": {
-    "label": "送风温度上限",
-    "key": "SFWD_SX",
-    "type": "double"
-  }
-}

+ 1 - 0
sources/server/vrv/vrv-platform/pom.xml

@@ -28,6 +28,7 @@
 
     <!-- 项目依赖 -->
     <dependencies>
+
         <!--mqtt包-->
         <dependency>
             <groupId>org.springframework.integration</groupId>

+ 0 - 4
sources/server/vrv/vrv-platform/src/main/java/com/kuyuntech/vrv/platform/VrvPlatformApplication.java

@@ -8,10 +8,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import com.wbspool.fastboot.core.jpa.annotation.EnableFastbootJpaAutoConfiguration;
 import org.springframework.boot.context.ApplicationPidFileWriter;
 
-
-
-
-
 @SpringBootApplication
 @EnableFastbootUrlMapping
 @EnableFastbootParameterValidate

+ 1 - 1
sources/server/vrv/vrv-platform/src/main/java/com/kuyuntech/vrv/platform/configuration/core/MqttConfiguration.java

@@ -86,6 +86,7 @@ public class MqttConfiguration {
     public MessageHandler handler() {
         return message -> {
 
+            //接受到的消息
             String payload = message.getPayload().toString();
 
             // byte[] bytes = (byte[]) message.getPayload(); // 收到的消息是字节格式
@@ -120,7 +121,6 @@ public class MqttConfiguration {
 
                 //存入数据库的新增方法,将第一次读取到的数据存入数据库
 
-
                 //先将数据存入redis,检验所有数据,如果出现数据改变,就执行update更新数据库,并更新redis
 
                 //用长度做判断

+ 11 - 17
sources/server/vrv/vrv-platform/src/main/java/com/kuyuntech/vrv/platform/controller/auth/AuthController.java

@@ -67,10 +67,11 @@ public class AuthController {
         String verifyCode = ValidateCodeGenerator.generateVerifyCode(4);
         System.out.println(verifyCode);
 
-        VerifyCodeBean verifyCodeBean = this.verifyCodeService.add(VerifyCodeBean.builder().type(VerifyCodeType.IMG).verified(VerifyCodeStatus.UN_VERIFY).expireTime(verifyCodeExpireTime).verifyCode(verifyCode).build());
+        VerifyCodeBean verifyCodeBean = this.verifyCodeService.add(VerifyCodeBean.builder()
+                .type(VerifyCodeType.IMG).verified(VerifyCodeStatus.UN_VERIFY).expireTime(verifyCodeExpireTime).verifyCode(verifyCode).build());
 
+        //存入redis
         redisTemplate.opsForValue().set("verifyCodeBean", verifyCodeBean);
-        //request.getSession().setAttribute("verifyCodeBean", verifyCodeBean);
 
         response.setContentType("application/force-download");
         response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(verifyCode, "UTF-8"));
@@ -82,12 +83,11 @@ public class AuthController {
     @RequestMapping
     public Object login(UserBean userBean, HttpServletRequest request) {
 
-
         //校验验证码是否正确
         if (this.verifyCodeCheck) {
 
+            //获取redis中的验证码对象
             VerifyCodeBean verifyCodeBean = (VerifyCodeBean) redisTemplate.opsForValue().get("verifyCodeBean");
-            //    VerifyCodeBean verifyCodeBean = (VerifyCodeBean) request.getSession().getAttribute("verifyCodeBean");
 
             if (verifyCodeBean == null) {
                 return ParamErrorResultBuilder.newBuilder().paramError("verifyCode", "没有获取到验证码").build();
@@ -105,14 +105,10 @@ public class AuthController {
                 return ParamErrorResultBuilder.newBuilder().paramError("verifyCode", "没有获取到验证码").build();
             }
 
-            // String verifyCode = verifyCodeBean.getVerifyCode();
-
-
-            //判断有效期
-//            if ((System.currentTimeMillis() - verifyCodeBean.getCreateTime().getTime()) > verifyCodeBean.getExpireTime()) {
-//                return ParamErrorResultBuilder.newBuilder().paramError("verifyCode", "验证码已过期").build();
-//            }
-
+            // 判断有效期
+            if ((System.currentTimeMillis() - verifyCodeBean.getCreateTime().getTime()) > verifyCodeBean.getExpireTime()) {
+                return ParamErrorResultBuilder.newBuilder().paramError("verifyCode", "验证码已过期").build();
+            }
 
             if (!verifyCode.toLowerCase().equals(userBean.getVerifyCode().toLowerCase())) {
                 return ParamErrorResultBuilder.newBuilder().paramError("verifyCode", "验证码错误").build();
@@ -127,11 +123,11 @@ public class AuthController {
             return ResponseBean.serverError("账号或密码错误");
         }
 
+        //删除redis中的验证码对象
         redisTemplate.delete("verifyCodeBean");
-        //request.getSession().removeAttribute("verifyCodeBean");
 
+        //将登录用户村热redis
         redisTemplate.opsForValue().set("userBean", userBean);
-        //  request.getSession().setAttribute("userBean", userBean);
 
         return ResponseBean.success("登录成功").addData("userBean", userBean);
     }
@@ -145,7 +141,6 @@ public class AuthController {
     public Object updateUserPassword(String newPassword, String oldPassword, HttpServletRequest request) {
 
         UserBean userBean = (UserBean) redisTemplate.opsForValue().get("userBean");
-        //   UserBean userBean = (UserBean) request.getSession().getAttribute("userBean");
 
         if (userBean == null) {
             return ResponseBean.unAuthorize("您未登录");
@@ -161,7 +156,7 @@ public class AuthController {
 
         this.logout(request);
 
-        return ResponseBean.success("密码修改成功,请退出重新登录!");
+        return ResponseBean.success("密码修改成功,请重新登录!");
 
     }
 
@@ -180,7 +175,6 @@ public class AuthController {
             return ResponseBean.unAuthorize("您未登录");
         }
 
-        //request.getSession().invalidate();
         redisTemplate.delete("userBean");
 
         return ResponseBean.serverError("退出成功!");

+ 0 - 298
sources/server/vrv/vrv-platform/src/main/resources/static/user.html

@@ -1,298 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-
-    <!-- 引入样式 -->
-    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
-
-    <title>用户管理</title>
-</head>
-<body>
-<div id="project">
-    <el-main>
-        <el-form :inline="true" :model="searchFormData">
-            <el-form-item label="用户名称">
-                <el-input placeholder="用户名称" size="small" v-model="searchFormData.realname"></el-input>
-            </el-form-item>
-            <el-form-item label="账号">
-                <el-input placeholder="账号" size="small" v-model="searchFormData.account"></el-input>
-            </el-form-item>
-            <el-form-item label="密码">
-                <el-input placeholder="密码" size="small" v-model="searchFormData.password"></el-input>
-            </el-form-item>
-
-            <el-form-item>
-                <el-button type="primary" size="small" @click="search(searchFormData)">搜索</el-button>
-            </el-form-item>
-
-            <el-form-item>
-                <el-button type="primary" size="small" @click="showAdd">新增</el-button>
-            </el-form-item>
-
-            <el-form-item>
-                <el-button type="primary" size="small" @click="showBindRole">绑定角色</el-button>
-            </el-form-item>
-
-
-            <el-dialog title="用户" :visible.sync="dialogFormVisible">
-                <el-form label-position="left" :model="formData">
-                    <el-form-item label="用户名称">
-                        <el-input v-model="formData.realname"></el-input>
-                    </el-form-item>
-                    <el-form-item label="账号">
-                        <el-input v-model="formData.account"></el-input>
-                    </el-form-item>
-                    <el-form-item label="密码">
-                        <el-input v-model="formData.password"></el-input>
-                    </el-form-item>
-                </el-form>
-
-                <div slot="footer" class="dialog-footer">
-                    <el-button @click="cancel()">取 消</el-button>
-                    <el-button type="primary" @click="addOrEditMehtond()">确 定</el-button>
-                </div>
-            </el-dialog>
-
-        </el-form>
-
-
-        <el-table :data="tableData">
-
-            <el-table-column prop="realname" label="用户名称"></el-table-column>
-            <el-table-column prop="account" label="账号"></el-table-column>
-            <el-table-column prop="password" label="密码"></el-table-column>
-
-
-            <el-table-column label="操作">
-                <template slot-scope="scope">
-                    <el-button type="primary" size="small" @click="showEdit(scope.row)">修改</el-button>
-                    <el-button type="danger" size="small" @click="del(scope.row)">删除</el-button>
-                </template>
-            </el-table-column>
-
-        </el-table>
-
-        <el-pagination
-                background
-                layout="prev, pager, next"
-                :page-size="pager.pageSize"
-                :current-page="pager.pageIndex"
-                :total="pager.itemCount"
-                @current-change="handleCurrentChange"
-        >
-        </el-pagination>
-
-    </el-main>
-</div>
-
-
-<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
-<!-- 引入组件库 -->
-<script src="https://unpkg.com/element-ui/lib/index.js"></script>
-<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
-
-<script>
-    new Vue({
-        el: '#project',
-        data() {
-            return {
-
-                addOrEdit: 1,
-
-                dialogFormVisible: false,
-
-                pager: {
-                    pageSize: 2,
-                    pageIndex: 1,
-                    itemCount: 0,
-                },
-
-                tableData:
-                    [{
-                        realname: '',
-                        account: '',
-                        password: '',
-                        code: '',
-                        valid: '',
-                    }],
-                formData: {
-                    realname: '',
-                    account: '',
-                    password: '',
-                    code: '',
-                    valid: '',
-                },
-                searchFormData:
-                    {
-                        realname: '',
-                        account: '',
-                        password: '',
-                    }
-            }
-        },
-
-        created: function () {
-            this.loadData();
-        },
-
-        methods: {
-            //切换页码
-            handleCurrentChange(index) {
-                this.loadData(index)
-            },
-
-            loadData(index) {
-                var vm = this;
-                axios.get('http://localhost:8088/user/list', {
-                    params: {
-                        pageSize: 3,
-                        pageIndex: index ? index : 1,
-                        realname: this.searchFormData.realname,
-                        account: this.searchFormData.account,
-                        password: this.searchFormData.password,
-                    }
-                })
-                    .then((response) => {
-                        // vm.paper = response.data.data.paper;
-                        //console.log(response.data.data);
-
-                        vm.pager = response.data.data.pager
-
-                        vm.tableData = response.data.data.users;
-                    })
-            },
-            search(searchFormData) {
-                //console.log(this.searchFormData)
-                this.loadData();
-            },
-            showAdd() {
-                this.dialogFormVisible = true;
-
-                this.formData.realname = '';
-                this.formData.account = '';
-                this.formData.password = '';
-
-                this.addOrEdit = 1
-            },
-
-            showEdit(row) {
-
-                console.log(row)
-
-                this.dialogFormVisible = true;
-
-                this.formData = row
-
-                this.addOrEdit = 2
-            },
-
-
-            addOrEditMehtond() {
-                if (this.addOrEdit == 2) {
-                    axios.get('http://localhost:8088/user/update', {
-                        params: {
-                            code: this.formData.code,
-                            realname: this.formData.realname,
-                            account: this.formData.account,
-                            password: this.formData.password
-                        }
-                    })
-                        .then((response) => {
-                            console.log(response)
-
-                            if (response.data.status == 200) {
-
-                                this.$message({
-                                    type: 'success',
-                                    showClose: true,
-                                    message: response.data.desc
-                                })
-                            }
-
-                            this.dialogFormVisible = false;
-
-                            this.loadData();
-
-                        })
-                        .catch(() => {
-                        });
-                }
-
-                if (this.addOrEdit == 1) {
-                    axios.get('http://localhost:8088/user/add', {
-                        params: {
-                            realname: this.formData.realname,
-                            account: this.formData.account,
-                            password: this.formData.password
-                        }
-                    })
-                        .then((response) => {
-                            if (response.data.status == 200) {
-
-                                this.dialogFormVisible = false;
-
-                                this.$message({
-                                    type: 'success',
-                                    showClose: true,
-                                    message: response.data.desc
-                                })
-
-                                this.loadData();
-                            }
-                        })
-                }
-            },
-
-            del(row) {
-                this.$confirm('确认删除', '提示', {
-                    type: 'warning'
-                }).then(() => {
-                    axios.get('http://localhost:8088/user/delete', {
-                        params: {
-                            code: row.code,
-                        }
-                    })
-                        .then((response) => {
-                            console.log(response)
-                            if (response.data.status == 200) {
-                                this.$message({
-                                    type: 'success',
-                                    showClose: true,
-                                    message: response.data.desc
-                                })
-
-                            }
-                            this.loadData();
-                        })
-                })
-                    .catch(() => {
-                        this.$message({
-                            type: 'info',
-                            showClose: true,
-                            message: '取消删除'
-                        })
-                    });
-            },
-            cancel() {
-                this.$message({
-                    message: '操作取消',
-                    showClose: true,
-                    type: 'info'
-                });
-
-                this.dialogFormVisible = false;
-
-            },
-
-            showBindRole(){
-
-            }
-        }
-
-    })
-
-
-</script>
-</body>
-</html>