if(y1<=TOP||y1>=BOTTOM)

#include "graphics.h"
#define LEFT 0
#define TOP 0
#define RIGHT 639
#define BOTTOM 479
#define LINES 400
#define MAXCOLOR 15
main()

{

http://www.rznews.cn/yszx/stbk/5443972332.html
http://zx.zynews.com/hyzx/yskt/5434781857.html
http://zx.zynews.com/hyzx/yskt/5434776758.html
http://zx.zynews.com/hyzx/yskt/5434774541.html
http://www.zhiyin.cn/ylzx/gzpx/5434897750.html
http://zx.zynews.com/hyzx/yskt/5433495042.html
http://www.zznews.cn/hyzx/jkxx/5449464160.html
http://zx.zynews.com/hyzx/yskt/5433285704.html
http://www.zznews.cn/hyzx/jkxx/5443068727.html
http://www.zznews.cn/hyzx/jkxx/5445271231.html
http://zx.zynews.com/hyzx/yskt/5431868783.html
http://zx.zynews.com/hyzx/yskt/5433285839.html
http://www.zznews.cn/hyzx/jkxx/5443078089.html
http://zx.zynews.com/hyzx/yskt/5433286178.html
http://www.zznews.cn/hyzx/jkxx/5445306853.html
http://zx.zynews.com/hyzx/yskt/5433286370.html
http://www.zznews.cn/hyzx/jkxx/5445054275.html
http://www.lfxww.com/2014/shichangshangxun/2014/0421/827920.html
http://www.zznews.cn/hyzx/jkxx/5445080916.html
http://www.lfxww.com/2014/shichangshangxun/2014/0421/828177.html
http://zx.zynews.com/hyzx/yskt/5433495042.html
http://www.zznews.cn/hyzx/jkxx/5445087457.html
http://zx.zynews.com/hyzx/yskt/5433498057.html
http://www.lfxww.com/2014/shichangshangxun/2014/0421/828186.html
http://www.zznews.cn/hyzx/jkxx/5445282274.html
http://www.zznews.cn/hyzx/jkxx/5445293800.html
http://www.zhiyin.cn/ylzx/gzpx/5434897750.html
http://zx.zynews.com/hyzx/yskt/5434774541.html
http://www.zznews.cn/hyzx/jkxx/5449449141.html
http://zx.zynews.com/hyzx/yskt/5434776758.html
http://www.zznews.cn/hyzx/jkxx/5449464160.html
http://zx.zynews.com/hyzx/yskt/5434779960.html
http://www.zznews.cn/hyzx/jkxx/5449497060.html
http://zx.zynews.com/hyzx/yskt/5434781857.html
http://www.zznews.cn/hyzx/jkxx/5449503798.html
http://www.rznews.cn/yszx/stbk/5443972332.html


int driver,mode,error;
int x1,y1;
int x2,y2;
int dx1,dy1,dx2,dy2,i=1;
int count=0;
int color=0;
driver=VGA;
mode=VGAHI;
initgraph(&driver,&mode,"");
x1=x2=y1=y2=10;
dx1=dy1=2;
dx2=dy2=3;
while(!kbhit())
{
  line(x1,y1,x2,y2);
  x1+=dx1;y1+=dy1;
  x2+=dx2;y2+dy2;
  if(x1<=LEFT||x1>=RIGHT)
  dx1=-dx1;
  if(y1<=TOP||y1>=BOTTOM)
   dy1=-dy1;
  if(x2<=LEFT||x2>=RIGHT)
   dx2=-dx2;
  if(y2<=TOP||y2>=BOTTOM)
   dy2=-dy2;
  if(++count>LINES)
  {
   setcolor(color);
   color=(color>=MAXCOLOR)?0:++color;
  }
}
closegraph();
}
逐句分析这段代码<%@page import="java.util.Date"%> <%@page import="java.text.SimpleDateFormat"%> <%@page import="java.sql.ResultSet"%> <%@page import="java.sql.PreparedStatement"%> <%@ page import="jp.co.canon_soft.wp.runtime.AppContext"%> <%@ page import="java.text.SimpleDateFormat, java.util.Date, java.util.Locale, java.util.Calendar" %> <%@ page contentType="text/html; charset=Windows-31J" import="org.apache.commons.lang.*" import="jakarta.servlet.http.HttpSession" import="jp.co.canon_soft.wp.runtime.util.*" import="filter.Certification" import="security.LoginCheck" import="java.util.*" import="util.StringUtil" %> <%!private static final int MSGTYPE_UNKNOWN = 0; private static final int MSGTYPE_INFO = 1; private static final int MSGTYPE_WARN = 2; private static final int MSGTYPE_ERR = 3; String msg = ""; int msgType = MSGTYPE_UNKNOWN; String focusFieldName = "user"; private boolean doLogin(HttpSession ses, String userid, String pass) { System.out.println("@@@@@doLogin: "+ses); Certification cer = new Certification(); return cer.certificateByAD(ses, userid, pass); }%><% String strLoginMode = (String)request.getAttribute("LOGIN_MODE"); if( strLoginMode == null ) strLoginMode = "LOGIN" ; String strWpkey = (String)request.getAttribute("WPKEY"); if( strWpkey == null ) strWpkey = "" ; String msg = (String)request.getAttribute("LOGIN_MSG"); if( msg == null ) msg = "" ; String ctxPath = request.getContextPath(); String pAction = request.getParameter("action"); String userid = request.getParameter("user"); String pass = request.getParameter("password"); /* if(StringUtils.equals(pAction, "dologin")) { List<Object> result = LoginCheck.loginCheck(userid, pass); String message = StringUtil.toString(result.get(0)); HttpSession ses = request.getSession(true); System.out.println("@@@@@@@ "+ses); if (userid == null || userid.equals("")) { msg = "ユーザIDは必須です。"; msgType = 3; focusFieldName = "user"; } else if (pass == null || pass.equals("")) { msg = "パスワードは必須です。"; msgType = 3; focusFieldName = "password"; } else if (message != null && !"".equals(message)) { msg = message; msgType = 3; focusFieldName = "user"; } else { if(doLogin(ses, userid, pass)) { ses.setAttribute("APP_ISLOGGEDIN",new Boolean(true)); ses.setAttribute("APP_USER",userid); ses.setAttribute("APP_PASS",pass); Date lastLoginTime = (Date)result.get(1); ses.setAttribute("sysLastLoginDateTime",lastLoginTime); response.sendRedirect( ctxPath + "/"); } else { msg = "ユーザIDまたはパスワードが違います。"; msgType = 3; focusFieldName = "user"; } } } */ %> <!DOCTYPE html> <html lang="ja"> <head> <meta charset="Shift_JIS"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <meta http-equiv="Content-Style-Type" content="text/css"> <title>財務会計コアシステム</title> <link rel="stylesheet" href="<%= ctxPath %>/style/global.css"> <%-- <link rel="stylesheet" href="<%= ctxPath %>/style/body_global.css"> --%> <style> /* メッセージ */ .info-icon { display: inline-block; width:20px; height:20px; background-image : url(../image/msg_info.gif); margin-right: 3px; } .info-text { color : blue; font-weight: bold; } .warn-icon { display: inline-block; width:20px; height:20px; background-image : url(../image/msg_alert.gif); margin-right: 3px; } .warn-text { color : tomato; font-weight: bold; } .errors-icon { display: inline-block; width:20px; height:20px; background-image : url(../image/msg_error.gif); margin-right: 3px; } .errors-text { color : red; font-weight: bold; } .topBody { background-color: #EEEEEE; text-align: center; margin: 0; padding: 0 0 20px; } .topContainerInner { text-align: left; padding: 0 30px 30px; } .topContainerInner > div:first-child { padding-left: 450px; } .topContainerInner h1 { color: #fff; background : linear-gradient(120deg, rgba(1,62,125,1.00) 0%, rgba(8,89,171,1.00) 100%); border: 1px solid #024D99; border-radius: 6px; font-size: 15px; font-weight: normal; line-height: 1.3; letter-spacing: 1px; padding: 9px 20px 7px 0px; margin: 20px 0 10px; position: relative; padding-left: 28px; } .topContainerInner h1::before { content: ""; display: block; position: absolute; left: 15px; top: 50%; width: 8px; height: 8px; background-color: #ED6D00; border-radius: 1px; margin: -4px 0 0 0; } .topHeaderTitle { margin: 0; padding: 18px 70px 14px; line-height: 1; color: #fff; font-weight: 500; font-size: 27px; border-top: none; border-radius: 0 0 10px 10px; display: inline-block; background : linear-gradient(180deg, rgba(1,43,98,1.00) 0%, rgba(16,72,145,1.00) 100%); letter-spacing: 3px; font-family: Arial, Helvetica, "sans-serif"; } .topHeaderDate { width: 159px; height: 43px; /*background-color: #f0f8ff;*/ /* 背景色 */ /*border: 0.5px solid #4682b4;*/ /* ?框 */ border-radius: 20px; display: flex; align-items: center; justify-content: center; font-family: Arial, Helvetica, "sans-serif"; /*color: #333;*/ text-align: right; margin-top: 50px; border: 1px solid #5483BA; font-size: 14px; color: #074D99; border-radius: 100px; line-height: 1; background-color: #F6F6F6; } .topHeaderDate:before { /*content: "\f073";*/ font-family: FontAwesome; margin-right:10px; color: #EB7D42; } .login-container { width: 900px; margin: 7px auto; padding: 30px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border-radius: 8px; background-color: #fff; } .login-header { text-align: center; margin-bottom: 20px; } .login-form div { margin-bottom: 6px; display: flex; align-items: center; } .login-form label { width: 120px; margin-right: 10px; text-align: right; } .login-form input[type="text"], .login-form input[type="password"] { flex: 1; padding: 10px; box-sizing: border-box; } .login-form input[type="submit"]:hover { background-color: #0056b3; } .login-message { color: red; margin-bottom: 15px; } .password { padding-left: 20px; } .okButton { width: 200px; height: 34px; background: linear-gradient(180deg, rgba(1,62,125,1.00) 0%, rgba(2,77,153,1.00) 100%); } .quitButton { width: 200px; height: 34px; color: #024D99; background : linear-gradient(180deg, rgba(236,236,236,1.00) 0%, rgba(246,246,246,1.00) 90%); } .passButton { width: 115px; height: 29px; color: #024D99; background : linear-gradient(180deg, rgba(236,236,236,1.00) 0%, rgba(246,246,246,1.00) 90%); } .loginFormData { flex-direction: column; /*padding: 20px 10px 0;*/ } .loginFormData dt { font-size: 20px; color: #024D99; float: left; width: 150px; padding: 20px 10px 0; } .loginFormData dd { margin: 0; padding: 10px 10px 10px 150px; } .loginFormData .ErrorMessage{ padding: 1px 0; } .loginFormData.changePwData dt { width: 240px; } .loginFormData.changePwData dd { padding: 10px 10px 10px 240px; } .btnTopLogin, .btnTopQuit, .btnChangePw, .btnTopPW, .topHeaderMenu a, .btnLatestSituation, .bt_sub { -moz-transition: background-color 0.3s; -o-transition: background-color 0.3s; -webkit-transition: background-color 0.3s; transition: background-color 0.3s; width: 120px; } .btnTopLogin:hover, .btnTopPW:hover, .bt_sub:hover, .topHeaderMenu a:hover { opacity: 0.7; } /*.btnTopLogin, .btnTopPW { color: #fff; font-size: 20px; background : linear-gradient(180deg, rgba(1,62,125,1.00) 0%, rgba(2,77,153,1.00) 100%); border-top-color: #3E70AF; border-left-color: #3E70AF; } .btnTopQuit { border: 1px solid #07336A; border-top-color: #3E70AF; border-left-color: #3E70AF; color: #024D99; font-size: 20px; background : linear-gradient(180deg, rgba(236,236,236,1.00) 0%, rgba(246,246,246,1.00) 90%); } .btnTopQuit:before { content: "\f00d"; font-family: FontAwesome; margin-right: 10px; font-weight: normal; font-size: 22px; }*/ .loginFormBtn { list-style: none; margin: 20px; padding: 0; display:flex; justify-content:center; column-gap: 20px; } .loginFormBtn li { margin: 5px; } .cautionList { list-style: none; margin: 0px 0; padding: 0; font-size: 14px; color: #144D67; } .cautionList > li { margin: 0 0 0 5px; padding: 0 0 0 18px; text-indent: -18px; } </style> </head> <% Date now = new Date(); String historicalTime = StringUtil.seirekiToWareki(now, "1"); %> <body onLoad="event_onLoad()" class="topBody"> <div class = "topContainerInner"> <div> <div class = "topHeaderTitle">財務会計コアシステム</div> </div> <div style = "text-align: right; padding-left: 1244px;"> <div class = "topHeaderDate"><%= historicalTime%></div> </div> <div class="login-container"> <div class="login-header"> <div style="text-align: left;"> <h1>ログイン</h1> </div> </div> <%-- <form name="myLogin" method="POST" action="<%= ctxPath %>/page/login.jsp"> --%> <form name="myLogin" action="<%=request.getContextPath() %>/servlet/EntryServlet" method="POST"> <input type="hidden" name="action" value="dologin"> <% if(pAction == null) { msg = null; msgType = 0; focusFieldName = "user"; } String msgArea = null; String msgIcon = null; String msgText = null; switch(msgType) { case MSGTYPE_INFO: msgArea = "info"; msgIcon = "info-icon"; msgText = "info-text"; break; case MSGTYPE_WARN: msgArea = "warn"; msgIcon = "warn-icon"; msgText = "warn-text"; break; case MSGTYPE_ERR: msgArea = "errors"; msgIcon = "errors-icon"; msgText = "errors-text"; break; default: msgArea = null; msgIcon = null; msgText = null; break; } %> <div class="<%= msgArea %> login_message" style="text-align:center"> <% if(msgIcon != null) { %> <i class="<%= msgIcon %>"></i> <% } //if msgIcon %> <% if(msg != null) { %> <span class="<%= msgText %>"><%= EscapeUtils.escapeHtml(msg) %></span> <!-- <br/>  --> <% } //if msg %> </div> <div class="login-form"> <div class="loginFormData"> <div> <div style = "padding-right: 56px"> <label for="user" style="color: #024D99;font-size: 15px;">ユーザID</label> </div> <div style = "padding-right: 127px"> <input id="user" type="text" name="user" maxlength="10" style="ime-mode:disabled;height: 30px;border-radius: 5px;"> </div> <div class = "password"> </div> </div> <div> <div style = "padding-right: 44px"> <label for="pass" style="color: #024D99;font-size: 15px;">パスワード</label> </div> <div> <input id="pass" type="password" name="password" maxlength="20" style="height: 30px;border-radius: 5px;"> </div> <div class = "password"> <input type="submit" value="パスワード変更" class="passButton" style="height: 27px;"> </div> </div> </div> <svg width="100%" height="10"> <line x1="160" y1="5" x2="87%" y2="5" stroke="black" stroke-width="0.5" stroke-dasharray="5,1" /> </svg> <div class = "loginFormBtn"> <div class="btnTopLogin"> <input type="submit" value="OK" class="okButton"> </div> <div class="btnTopQuit"> <input type="submit" value="QUIT" class="quitButton"> </div> </div> <svg width="100%" height="10"> <line x1="5" y1="5" x2="100%" y2="5" stroke="black" stroke-width="0.5" stroke-dasharray="5,1" /> </svg> <div class="cautionList" > <div style="margin-left:100px;"> <li style=" padding-left: 69px;font-size: 12px;">※財務会計システムでは誤作動防止のため、以下のブラウザ標準機能を制御しておりますのでご注意ください。 <br> ・マウス操作による右クリック・メニューが表示されません。<br> ・キーボードのBS(バックスペース)キーで前画面に戻れません。<br> ※操作に関するご質問については、下記ヘルプデスクまでお問い合わせください。<br> ※ユーザID、パスワードがご不明な方は下記問い合わせフォームにてお問い合わせください。 </div> </div> <svg width="100%" height="10"> <line x1="5" y1="5" x2="100%" y2="5" stroke="black" stroke-width="0.5" stroke-dasharray="5,1" /> </svg> <div class="cautionList" > <div style="margin-left:100px;"> <li style=" padding-left: 69px;font-size: 12px;"> [財務会計コアシステム サポート担当]  00-1234-5678</li> </div> </div> <div style="width: 100%;display:flex;"> <div style="width: 50%;text-align:left;margin-left:50px;font-size:12px "> Ver.1.0.1 </div> <div style="padding-left:258px;font-size:12px"> 画面ID:○○○○1 </div> </div> </ul> </div> <input type="hidden" name="WPKEY" value="<%=strWpkey %>"> <input type="hidden" name="DISP_MODE" value="login"/> <input type="hidden" name="LOGIN_MODE" value="<%=strLoginMode %>"> </form> </div> </div> <script> function event_onLoad() { try { var focusFieldName = "<%= EscapeUtils.escapeJavaScriptIncludesSlash(focusFieldName) %>"; var focusControl = document.forms[0].elements[focusFieldName]; if (focusControl) { focusControl.focus(); } } catch (e) {} } </script> </body> </html>
09-06
<%@page import="java.util.Date"%> <%@page import="java.text.SimpleDateFormat"%> <%@page import="java.sql.ResultSet"%> <%@page import="java.sql.PreparedStatement"%> <%@ page import="jp.co.canon_soft.wp.runtime.AppContext"%> <%@ page import="java.text.SimpleDateFormat, java.util.Date, java.util.Locale, java.util.Calendar"%> <%@ page contentType="text/html; charset=UTF-8" import="org.apache.commons.lang.*" import="jakarta.servlet.http.HttpSession" import="jp.co.canon_soft.wp.runtime.util.*" import="filter.Certification" import="security.LoginCheck" import="java.util.*" import="util.StringUtil"%> <% String ctxPath = request.getContextPath(); %> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <link rel="stylesheet" href="<%=ctxPath%>/font-awesome/css/font-awesome.css" /> <script src="<%=AppContext.getContextPath()%>/components/searchView/script/jquery-3.7.1.min.js" type="text/javascript"></script> </head> <% Date now = new Date(); String historicalTime = StringUtil.seirekiToWareki(now, "1"); %> <body onload="setFocus()"> <style type="text/css"> /* メッセージ */ .info-icon { display: inline-block; width: 20px; height: 20px; background-image: url(../image/msg_info.gif); margin-right: 3px; } .info-text { color: blue; font-weight: bold; } .warn-icon { display: inline-block; width: 20px; height: 20px; background-image: url(../image/msg_alert.gif); margin-right: 3px; } .warn-text { color: tomato; font-weight: bold; } .errors-icon { display: inline-block; width: 20px; height: 20px; background-image: url(../image/msg_error.gif); margin-right: 3px; } .errors-text { color: red; font-weight: bold; } .topBody { background-color: #EEEEEE; text-align: center; margin: 0; padding: 0 0 20px; } .topContainerInner { text-align: left; padding: 0 30px 30px; } .topContainerInner>div:first-child { padding-left: 450px; } .topContainerInner h1 { color: #fff; background: linear-gradient(120deg, rgba(1, 62, 125, 1.00) 0%, rgba(8, 89, 171, 1.00) 100%); border: 1px solid #024D99; border-radius: 6px; font-size: 15px; font-weight: normal; line-height: 1.3; letter-spacing: 1px; padding: 9px 20px 7px 0px; margin: 20px 0 10px; position: relative; padding-left: 28px; } .topContainerInner h1::before { content: ""; display: block; position: absolute; left: 15px; top: 50%; width: 8px; height: 8px; background-color: #ED6D00; border-radius: 1px; margin: -4px 0 0 0; } .topHeaderTitle { margin: 0; padding: 18px 70px 14px; line-height: 1; color: #fff; font-weight: 500; font-size: 27px; border-top: none; border-radius: 0 0 10px 10px; display: inline-block; background: linear-gradient(180deg, rgba(1, 43, 98, 1.00) 0%, rgba(16, 72, 145, 1.00) 100%); letter-spacing: 3px; font-family: Arial, Helvetica, "sans-serif"; } .topHeaderDate { width: 159px; height: 43px; /*background-color: #f0f8ff;*/ /* 背景色 */ /*border: 0.5px solid #4682b4;*/ /* ?框 */ border-radius: 20px; display: flex; align-items: center; justify-content: center; font-family: Arial, Helvetica, "sans-serif"; /*color: #333;*/ text-align: right; margin-top: 50px; border: 1px solid #5483BA; font-size: 14px; color: #074D99; border-radius: 100px; line-height: 1; background-color: #F6F6F6; } .topHeaderDate:before { content: "\f073"; font-family: FontAwesome; margin-right: 10px; color: #EB7D42; } .login-container { width: 900px; margin: 7px auto; padding: 30px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); border-radius: 8px; background-color: #fff; } .login-header { text-align: center; margin-bottom: 20px; } .login-form div { margin-bottom: 6px; display: flex; align-items: center; } .login-form label { width: 120px; margin-right: 10px; text-align: right; } .login-form input[type="text"], .login-form input[type="password"] { flex: 1; padding: 10px; box-sizing: border-box; } .login-form input[type="submit"]:hover { background-color: #0056b3; } .login-message { color: red; margin-bottom: 15px; } .password { padding-left: 20px; } .okButton { border-radius: 8px; height: 50px; width: 175px; text-align: center; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: -68px; padding-right: 15px; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.25); color: #fff; font-size: 20px; background: linear-gradient(180deg, rgba(1, 62, 125, 1.00) 0%, rgba(2, 77, 153, 1.00) 100%); border: 1px solid #07336A; border-top-color: #3E70AF; border-left-color: #3E70AF; } .okButton::before { content: "\f084"; font-family: FontAwesome; margin-right: 10px; font-weight: normal; font-size: 22px; } .quitButton { border-radius: 14px; height: 50px; width: 175px; text-align: center; margin: 5px; padding-right: 15px; transition: all 0.3s; border: 1px solid #07336A; border-top-color: #3E70AF; border-left-color: #3E70AF; color: #024D99; font-size: 20px; background: linear-gradient(180deg, rgba(236, 236, 236, 1.00) 0%, rgba(246, 246, 246, 1.00) 90%); } .quitButton:before { content: "\f00d"; font-family: FontAwesome; margin-right: 10px; font-weight: normal; font-size: 22px; } .closeDialog { width: 130px; padding: 5px 8px 6px 5px; text-align: center; color: #fff; margin-right: 15px; background-color: #024d99; border: 1px solid #fff; border-radius: 6px; font-size: 15px; height: 34px; transition: background-color .3s; } .closeDialog:before { content: "\f00d"; font-family: FontAwesome; margin-right: 10px; font-weight: normal; font-size: 22px; } .okDialog { width: 130px; text-align: center; color: #fff; margin-right: 15px; background-color: #024d99; border: 1px solid #fff; border-radius: 6px; font-size: 15px; height: 34px; transition: background-color .3s; } .okDialog:before { content: "\f00c"; font-family: FontAwesome; margin-right: 10px; font-weight: normal; font-size: 22px; } .passButton { width: 115px; height: 29px; color: #024D99; background: linear-gradient(180deg, rgba(236, 236, 236, 1.00) 0%, rgba(246, 246, 246, 1.00) 90%); } .loginFormData { flex-direction: column; /*padding: 20px 10px 0;*/ margin-left: 100px; } .loginFormData dt { font-size: 20px; color: #024D99; float: left; width: 150px; padding: 20px 10px 0; } .loginFormData dd { margin: 0; padding: 10px 10px 10px 150px; } .loginFormData input { background: #FFFFFF; border: 1px solid #979797; box-shadow: inset 1px 1px 4px 0 rgba(0, 0, 0, 0.22); border-radius: 6px; font-size: 20px; height: 42px !important; width: 280px !important; padding: 0 0 0 0; } .loginFormData .ErrorMessage { padding: 1px 0; } .loginFormData.changePwData dt { width: 240px; } .loginFormData.changePwData dd { padding: 10px 10px 10px 240px; } .btnTopLogin, .btnTopQuit, .btnChangePw, .btnTopPW, .topHeaderMenu a, .btnLatestSituation, .bt_sub { -moz-transition: background-color 0.3s; -o-transition: background-color 0.3s; -webkit-transition: background-color 0.3s; transition: background-color 0.3s; width: 120px; } .btnTopLogin:hover, .btnTopPW:hover, .bt_sub:hover, .topHeaderMenu a:hover { opacity: 0.7; } /*.btnTopLogin, .btnTopPW { color: #fff; font-size: 20px; background : linear-gradient(180deg, rgba(1,62,125,1.00) 0%, rgba(2,77,153,1.00) 100%); border-top-color: #3E70AF; border-left-color: #3E70AF; } .btnTopQuit { border: 1px solid #07336A; border-top-color: #3E70AF; border-left-color: #3E70AF; color: #024D99; font-size: 20px; background : linear-gradient(180deg, rgba(236,236,236,1.00) 0%, rgba(246,246,246,1.00) 90%); } .btnTopQuit:before { content: "\f00d"; font-family: FontAwesome; margin-right: 10px; font-weight: normal; font-size: 22px; }*/ .loginFormBtn { list-style: none; margin: 20px; padding: 0; display: flex; justify-content: center; column-gap: 20px; } .loginFormBtn li { margin: 5px; } .cautionList { list-style: none; margin: 0px 0; padding: 0; font-size: 14px; color: #144D67; } .cautionList>li { margin: 0 0 0 5px; padding: 0 0 0 18px; text-indent: -18px; } /* 遮罩层样式 */ #overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 999; } /* 对话框样式 */ #dialog { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 20px; border: 1px solid #ccc; z-index: 1000; cursor: move; border-width: 4px; border-style: solid; border-color: #024d99; background-color: #fff; min-height: 170px; min-width: 530px; max-height: 100%; max-width: 100%; border-radius: 20px; padding-bottom: 20px; } .MessageBoxTitle { padding: 1px; text-align: left; color: #fbfff9; font-size: 14px; height: 32px; } </style> <form id="myForm" name="myPassword" action="<%=request.getContextPath()%>/servlet/PassWordServlet" method="POST"> <input type="hidden" name="action" value="dologin"> <div class="topContainerInner"> <div> <div class="topHeaderTitle">財務会計コアシステム</div> </div> <div style="text-align: right; padding-left: 1244px;"> <div class="topHeaderDate"><%=historicalTime%></div> </div> <div class="login-container"> <div class="login-header"> <div style="text-align: left;"> <h1>パスワード変更</h1> </div> </div> <dd class="ErrorMessage"> <label id="ErrMsg"></label> </dd> <dl class="loginFormData changePwData"> <dt>ユーザID</dt> <dd> <input id="userId" type="text" name="userId" maxlength="10" autocomplete="off"></input> </dd> <dt class="ErrorMessage"></dt> <dd class="ErrorMessage"> <label id="lblUserIdErrMsg" style="color: red; font-size: 8pt; padding-left: 20px"></label> </dd> <dt>旧パスワード</dt> <dd> <input id="oldPassword" type="password" name="oldPassword" maxlength="20" autocomplete="new-password"></input> </dd> <dt class="ErrorMessage"></dt> <dd class="ErrorMessage"> <label id="lblOldPassErrMsg" style="color: red; font-size: 8pt; padding-left: 20px"></label> </dd> <dt>新パスワード</dt> <dd> <input id="newPassword" type="password" name="newPassword" maxlength="20" autocomplete="new-password"></input> </dd> <dt class="ErrorMessage"></dt> <dd class="ErrorMessage"> <label id="lblNewPass1ErrMsg" style="color: red; font-size: 8pt; padding-left: 20px"></label> </dd> <dt>新パスワード(再入力)</dt> <dd> <input id="newPassword2" type="password" name="newPassword2" maxlength="20" autocomplete="new-password"></input> </dd> <dt class="ErrorMessage"></dt> <dd class="ErrorMessage"> <label id="lblNewPass2ErrMsg" style="color: red; font-size: 8pt; padding-left: 20px"></label> </dd> </dl> <svg width="100%" height="10"> <line x1="100" y1="5" x2="90%" y2="5" stroke="black" stroke-width="0.5" stroke-dasharray="5,1" /> </svg> <div class="topContainerCaution"> <ul class="cautionList" style="margin-left: 100px;"> <li>※パスワード変更に関する注意<br> ・パスワードは、8文字以上、10文字以内で入力してください。<br> ・パスワードに使用できる文字種: 「半角英大文字」 「半角英小文字」 「半角数字」 「記号」<br> ・パスワードに使用できる記号は、次の文字になります。<br>    記号: ` ~ ! @ # $ % ^ & * ( ) _ - + = { } [ ] \ | : ; " ' < > , . ? / 及び 半角スペース<br> ・新パスワードに、変更前(旧パスワード)及び前回の変更前と同じパスワードを設定することはできません。<br> ・入力文字は次の要素を全て満たして下さい。<br> ①半角英字含める(大文字小文字を混在させる)<br> ②アラビア数字を含める<br> ③特殊文字を含める 特殊文字: ! " # $ % & ' ( ) - = ^ ~ \ | @ [ { ] } ; + : * , < . > / ? _<br> ④ログイン名/名前は含めない<br> ・パスワードは、生年月日や家族の名前、ありふれた文字の連続等、推測の容易な内容を使用しないで下さい。<br> ・パスワードは本人のみが知り得る情報である必要があります。<br> ・個人で利用しているアカウント等のパスワードと、同じ内容は利用しないで下さい。<br> </li> </ul> </div> <div class="loginFormBtn"> <div class="btnTopLogin"> <button type="button" class="okButton" onclick="openDialog()">OK</button> </div> <!-- 遮罩层 --> <div id="overlay"></div> <!-- 对话框 --> <div id="dialog"> <div class="MessageBoxTitle" style="cursor: move;"> <td colspan="2"><span id="MessageBox_lblTitle" style="padding-left: 13px; display: block; width: 100%; color: blue;"> </span></td> </div> <div> <p>パスワードを変更しても宜しいですか。</p> </div> <button type="button" class="okDialog" onclick="okDialog()" style="position: absolute; bottom: 0; left: 40%; transform: translateX(-50%); margin-right: 10px;">はい</button> <button type="button" class="closeDialog" onclick="closeDialog()" style="position: absolute; bottom: 0; left: 40%; transform: translateX(50%);">いいえ</button> </div> <div class="btnTopQuit"> <button type="button" class="quitButton" onclick="buttonQUITPage()">QUIT</button> </div> </div> <div style="width: 100%; display: flex;"> <div style="width: 50%; text-align: left; margin-left: 50px; font-size: 12px"> Ver.1.0.1</div> <div style="padding-left: 258px; font-size: 12px"> 画面ID:CMP010DI</div> </div> </div> </div> </form> <script type="text/javascript"> $(document).ready(function() { var msg = '<%=request.getAttribute("error")%>'; if(msg!=null && msg.trim().length > 0){ var json = JSON.parse(msg); if(json.msg){ if(json.msg[0] == '認証成功'){ buttonQUITPage() }else{ var html = ""; json.msg.forEach(item=>{ html += item + '<br>' }) $("#ErrMsg").html(html) $("#ErrMsg").css("color","red") } } if(json.lblUserIdErrMsg||json.lblOldPassErrMsg){ if(json.lblUserIdErrMsg){ $("#lblUserIdErrMsg").text(json.lblUserIdErrMsg[0]) $("#userId").css("background-color","red") } if(json.lblOldPassErrMsg){ $("#lblOldPassErrMsg").text(json.lblOldPassErrMsg[0]) $("#oldPassword").css("background-color","red") } }else if(json.lblNewPass1ErrMsg||json.lblNewPass2ErrMsg){ if(json.lblNewPass1ErrMsg){ $("#lblNewPass1ErrMsg").text(json.lblNewPass1ErrMsg[0]) $("#newPassword").css("background-color","red") } if(json.lblNewPass2ErrMsg){ $("#lblNewPass2ErrMsg").text(json.lblNewPass2ErrMsg[0]) $("#newPassword2").css("background-color","red") } } } }); function setFocus() { document.getElementById("userId").focus(); } function buttonQUITPage() { window.location.href = "/FinancialCoreSystem/page/login.jsp"; } function openDialog() { // 显示遮罩层 document.getElementById('overlay').style.display = 'block'; // 显示对话框 document.getElementById('dialog').style.display = 'block'; } function closeDialog() { // 隐藏遮罩层 document.getElementById('overlay').style.display = 'none'; // 隐藏对话框 document.getElementById('dialog').style.display = 'none'; } // 实现对话框可移动 let isDragging = false; let offsetX, offsetY; const dialog = document.getElementById('dialog'); dialog.addEventListener('mousedown', (e) => { isDragging = true; offsetX = e.clientX - dialog.offsetLeft; offsetY = e.clientY - dialog.offsetTop; }); document.addEventListener('mousemove', (e) => { if (isDragging) { dialog.style.left = (e.clientX - offsetX) + 'px'; dialog.style.top = (e.clientY - offsetY) + 'px'; } }); document.addEventListener('mouseup', () => { isDragging = false; }); function okDialog() { document.querySelector('.okDialog').addEventListener('click', function() { document.getElementById('myForm').submit(); }); } </script> </body> </html>加工这个代码实现
最新发布
09-13
<template> <div class="listManagePage EventAlarmDetail"> <a-breadcrumb separator=">" v-if="route.query.origin == 'violate'"> <img class="dw_img" src="@/assets/images/demoImg/mbx_dw.png" alt=""> <a-breadcrumb-item><a @click="()=>router.push('/roomInOut/personnelViolate')">人员违规行为台账</a></a-breadcrumb-item> <a-breadcrumb-item>人员违规行为台账详情</a-breadcrumb-item> </a-breadcrumb> <a-breadcrumb separator=">" v-else-if="route.query.origin == 'ledger'"> <img class="dw_img" src="@/assets/images/demoImg/mbx_dw.png" alt=""> <a-breadcrumb-item><a @click="()=>router.push('/roomInOut/eventLedger')">事件台账列表</a></a-breadcrumb-item> <a-breadcrumb-item>事件台账详情</a-breadcrumb-item> </a-breadcrumb> <a-breadcrumb separator=">" v-else> <img class="dw_img" src="@/assets/images/demoImg/mbx_dw.png" alt=""> <a-breadcrumb-item><a @click="()=>router.push('/eventManage/eventAlarm')">AI事件告警处理列表</a></a-breadcrumb-item> <a-breadcrumb-item>AI事件告警处理事件详情</a-breadcrumb-item> </a-breadcrumb> <a-spin :spinning="loading"> <div class="topPart"> <div class="header_right"> <img src="@/assets/images/abnormalEvent.jpg" alt=""> <div> <h5>{{formModel.deviceName}}-{{formModel.eventName}}事件</h5> <p><span class="num_header">NO.</span>{{formModel.eventId}}</p> </div> </div> </div> <div class="bj_white_height"> <div class="tableTitleLine page-header-btn"> <i class="titleIcon"></i> <span class="title">事件信息</span> </div> <a-form ref="topFormRef" class="topForm firstForm" layout="inline" :model="formModel" :label-col="firstLabelCol" :wrapper-col="firstWrapperCol"> <a-row style="width:100%"> <a-col :span="6"> <a-form-item label="事件ID:"> <span> {{ formModel.eventId }} </span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="事件等级:"> <span>{{ formModel.eventLevel }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="发生时间:"> <span>{{ formModel.occurrenceTime }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="事件分类:"> <span>{{ formModel.eventClassification }}</span> </a-form-item> </a-col> </a-row> <a-row style="width:100%"> <a-col :span="6"> <a-form-item label="事件名称:"> <span>{{ formModel.eventName }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="事件标题:"> <span>{{ formModel.eventTitle }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="关联摄像头:"> <span>{{ formModel.deviceName }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="地市:"> <span>{{ formModel.city }}</span> </a-form-item> </a-col> </a-row> <a-row style="width:100%"> <a-col :span="6"> <a-form-item label="区县:"> <span>{{ formModel.district }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="所属机楼:"> <span>{{ formModel.facilityName }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="所属机房:"> <span>{{ formModel.roomName }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="所属设备:"> <span>{{ formModel.cameraName }}</span> </a-form-item> </a-col> </a-row> <!-- <a-row style="width:100%"> <a-col :span="6"> <a-form-item label="事件触发人员名称:"> <span>{{ formModel.triggerPersonName }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="身份证号:"> <span>{{ formModel.triggerIdNumber }}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item label="手机号:"> <span>{{ formModel.triggerPhoneNumber }}</span> </a-form-item> </a-col> </a-row> --> <a-row style="width:100%"> <a-col :span="12"> <a-form-item label="事件图片:"> <div class="image-container" ref="containerRef"> <img v-if="formModel.eventPicture" class="img_size" :src="`/bit-dfs/file/download?fileId=${formModel.eventPicture}&sourceSystem=ULTRA-AIMR`" @load="onImageLoad" ref="imgRef" /> <canvas ref="canvasRef" class="overlay-canvas"></canvas> </div> </a-form-item> </a-col> <a-col :span="12"> <a-form-item label="事件视频:"> <EventAlarmVideo v-if="formModel.eventVideoFileId || formModel.eventVideo" :formModel="formModel" :deviceId="route.query.deviceRowId"/> <!-- <video ref="videoPlayer" controls class="img_size" :src="formModel.eventVideo" ></video> --> <!-- <img src="https://www.antdv.com/#error"/> --> </a-form-item> </a-col> </a-row> </a-form> <div class="tableTitleLine page-header-btn"> <i class="titleIcon"></i> <span class="title">触发事件人员</span> </div> <a-table :dataSource="dataSource" :columns="columns" :pagination="false" :scroll="{ y: 500 }"/> <div class="tableTitleLine page-header-btn" style="margin-top: 20px;"> <i class="titleIcon"></i> <span class="title">事件处理</span> </div> <a-form ref="formRef" class="topForm secform" layout="vertical" :model="formData" :rules="rules"> <a-row :gutter="24"> <a-col :span="6"> <a-form-item :label="`是否真实告警:`" name="isTrueAlert"> <a-select v-if="route.query.type!='view'" v-model:value="formData.isTrueAlert" placeholder="" :options="needDispatchData" > </a-select> <span v-else>{{formModel.isTrueAlert}}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item :label="`是否清除:`" name="isRecovered"> <a-select v-if="route.query.type!='view'" v-model:value="formData.isRecovered" placeholder="" :options="isRecoveredData" > </a-select> <span v-else>{{formModel.isRecovered}}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item :label="`告警清除时间:`"> <a-date-picker v-if="route.query.type!='view'" v-model:value="formData.alertResolvedTime" show-time type="date" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择" style="width: 100%" :disabled-date="disabledBeforeOccurrenceDate" :disabled-time="disabledBeforeOccurrenceTime" :disabled="formData.isRecovered === '否'" /> <span v-else>{{formModel.alertResolvedTime}}</span> </a-form-item> </a-col> <!-- <a-col :span="6"> <a-form-item :label="`是否需要派单:`"> <a-select v-if="route.query.type!='view'" v-model:value="formData.needDispatch" placeholder="否" :options="needDispatchData" > </a-select> <span v-else>{{formModel.needDispatch}}</span> </a-form-item> </a-col> <a-col :span="6"> <a-form-item :label="`派发至:`"> <a-select v-if="route.query.type!='view'" v-model:value="formData.dispatchTarget" placeholder="无" :options="dispatchTargetData" > </a-select> <span v-else>{{formModel.dispatchTarget}}</span> </a-form-item> </a-col> --> </a-row> <a-row style="width:100%"> <a-col :span="24"> <a-form-item label="告警说明:" name="alertDescription"> <a-textarea v-if="route.query.type!='view'" placeholder="请输入说明内容" :rows="2" v-model:value="formData.alertDescription" /> <span v-else>{{formModel.alertDescription}}</span> </a-form-item> </a-col> </a-row> </a-form> <div class="footer_btn"> <a-button style="margin-right: 20px;" @click="backToList">{{route.query.type!='view'?'取消':'关闭'}}</a-button> <a-button v-if="route.query.type!='view'" type="primary" @click="confirmData">确认</a-button> </div> </div> </a-spin> </div> </template> <script setup lang="ts"> import { ref, onMounted, nextTick, reactive, watch,watchEffect,computed } from 'vue' import {useRoute, useRouter} from 'vue-router' import { updateEventAlarm, queryEventAlarmById } from "@/api/eventManage" import { message } from 'ant-design-vue' import moment from 'moment' import EventAlarmVideo from '@/views/components/EventAlarmVideo.vue' import axios from 'axios' const route = useRoute() const router = useRouter() const firstLabelCol = ref({ style: { width: '100px' }}) const firstWrapperCol = ref({ span: 14 }) const formModel = ref({ eventId: '', eventLevel: '', eventTitle: '', occurrenceTime: '', eventClassification: '', eventName: '', city: '', cameraName: '', district: '', facilityName: '', roomName: '', equipmentName: '', triggerPersonName: '', triggerIdNumber: '', triggerPhoneNumber: '', eventVideo: '', eventPicture: '', deviceName: '', isTrueAlert: '', isRecovered: '', alertResolvedTime: '', // needDispatch: '', // dispatchTarget: '', alertDescription: '', }) const recognizeCoordinates = ref([]) const formData = ref({ isTrueAlert: '', isRecovered: '', alertResolvedTime: '', // needDispatch: '', // dispatchTarget: '', alertDescription: '', }) const loading = ref(false) const isRecoveredData = ref([ { value: '是', label: '是', }, { value: '否', label: '否', }, ]) const needDispatchData = ref([ { value: '是', label: '是', }, { value: '否', label: '否', }, ]) const formRef = ref() const rules = { isTrueAlert: [{ required: true, message: '请选择是否真实告警', trigger: 'change' }], isRecovered: [{ required: true, message: '请选择是否清除', trigger: 'change' }], // alertResolvedTime: [{ required: true, message: '请选择告警清除时间', trigger: 'change', type: 'object' }], alertDescription: [{ required: true, message: '请输入告警说明', trigger: 'blur' }], } const videoData = ref ({}) const dataSource = ref ([]) const columns = ref([ { title: '姓名', dataIndex: 'triggerPersonName', key: 'triggerPersonName', }, { title: '公司', dataIndex: 'triggerCorporation', key: 'triggerCorporation', }, { title: '手机号', dataIndex: 'triggerPhoneNumber', key: 'triggerPhoneNumber', }, { title: '身份证号', dataIndex: 'triggerIdNumber', key: 'triggerIdNumber', }, ]) onMounted(() => { fetchData() }) const fetchData = () => { loading.value = true queryEventAlarmById(route.query.id).then(res => { if(res) { recognizeCoordinates.value = res.recognizeCoordinates || [] formModel.value = res dataSource.value = res.triggerPersonInfoList || [] Object.keys(formData.value).forEach(key => { if (res[key] !== undefined) { formData.value[key] = res[key] } }) // 确保图片加载完成后绘制 nextTick(() => { if (imgRef.value && imgRef.value.complete) { onImageLoad() } }) } }).catch((error: any) => { console.log(error) }).finally(()=> { loading.value = false }) } const confirmData = () => { if(!route.query.id) { return } formRef.value.validate().then(() => { loading.value = true let data = { eventId: route.query.id, ...formData.value } // console.log(data, 'formData') updateEventAlarm(data).then((res) => { message.success('保存成功') setTimeout(()=>{ backToList() }, 1000) }).catch((error: any) => { console.log(error) message.error(error.message) }).finally(()=> { loading.value = false }) }) .catch(error => { console.log('error', error); }) } const backToList = () => { if(route.query.origin == 'violate'){ router.push({ path: '/roomInOut/personnelViolate',query: route.query }) }else if(route.query.origin == 'ledger'){ router.push({ path: '/roomInOut/eventLedger',query: route.query }) }else{ router.push({ path: '/eventManage/eventAlarm',query: route.query }) } } // 计算属性:将发生时间转换为 moment 对象 const occurrenceTimeObj = computed(() => { if (!formModel.value.occurrenceTime) return null; return moment(formModel.value.occurrenceTime, 'YYYY-MM-DD HH:mm:ss'); }); // 禁用发生时间之前的日期 const disabledBeforeOccurrenceDate = (current) => { if (!occurrenceTimeObj.value) return false; // 禁用发生日期之前的所有日期 return current && current < moment(occurrenceTimeObj.value).startOf('day'); }; // 禁用发生时间当天的之前时间 const disabledBeforeOccurrenceTime = () => { if (!occurrenceTimeObj.value || !formModel.value.alertResolvedTime) { return { disabledHours: () => [], disabledMinutes: () => [], disabledSeconds: () => [] }; } const selectedDate = moment(formModel.value.alertResolvedTime); const occurrenceDate = moment(occurrenceTimeObj.value); // 如果选择的日期大于发生日期,则不禁用任何时间 if (selectedDate.isAfter(occurrenceDate, 'day')) { return { disabledHours: () => [], disabledMinutes: () => [], disabledSeconds: () => [] }; } // 如果选择的日期等于发生日期,则禁用发生时间之前的时间 if (selectedDate.isSame(occurrenceDate, 'day')) { const occurrenceHour = occurrenceDate.hour(); const occurrenceMinute = occurrenceDate.minute(); const occurrenceSecond = occurrenceDate.second(); return { disabledHours: () => Array.from({ length: occurrenceHour }, (_, i) => i), disabledMinutes: (h) => h === occurrenceHour ? Array.from({ length: occurrenceMinute }, (_, i) => i) : [], disabledSeconds: (h, m) => h === occurrenceHour && m === occurrenceMinute ? Array.from({ length: occurrenceSecond }, (_, i) => i) : [] }; } // 默认不禁用任何时间 return { disabledHours: () => [], disabledMinutes: () => [], disabledSeconds: () => [] }; }; // 监听发生时间变化,自动调整已选的清除时间 watchEffect(() => { if ( formData.value.alertResolvedTime && occurrenceTimeObj.value && moment(formData.value.alertResolvedTime).isBefore(occurrenceTimeObj.value) ) { // 如果已选的清除时间早于发生时间,则重置为发生时间 formData.value.alertResolvedTime = occurrenceTimeObj.value.format('YYYY-MM-DD HH:mm:ss'); } }); watch( () => formData.value.isRecovered, (newValue) => { // 当值为"否"时,清空告警清除时间 if (newValue === '否') { formData.value.alertResolvedTime = ''; } }, { immediate: true } // 初始化时也执行一次 ); const imgRef = ref(null) const canvasRef = ref(null) const containerRef = ref(null) const onImageLoad = () => { nextTick(() => { try { if (!imgRef.value || !canvasRef.value) return const img = imgRef.value const canvas = canvasRef.value // 确保图片已加载 if (!img.complete) { img.onload = onImageLoad return } // 设置canvas尺寸与图片相同 canvas.width = img.naturalWidth canvas.height = img.naturalHeight const ctx = canvas.getContext('2d') if (!ctx) return // 清除之前绘制的内容 ctx.clearRect(0, 0, canvas.width, canvas.height) // 如果没有坐标数据则返回 if (!recognizeCoordinates.value || recognizeCoordinates.value.length === 0) { console.warn('No recognition coordinates to draw') return } // 绘制所有识别框 recognizeCoordinates.value.forEach(item => { if (item.bbox && item.bbox.length === 4) { drawBoundingBox(ctx, item.bbox, item.label, item.score) } }) } catch (error) { console.error('Error drawing bounding boxes:', error) } }) } // 修改绘制函数,添加参数验证 const drawBoundingBox = (ctx, bbox, label, score) => { if (!bbox || bbox.length !== 4) return const [x1, y1, x2, y2] = bbox const width = x2 - x1 const height = y2 - y1 // 验证坐标是否有效 if (width <= 0 || height <= 0) return // 绘制矩形框 ctx.strokeStyle = '#FF0000' ctx.lineWidth = 2 ctx.strokeRect(x1, y1, width, height) // 绘制标签背景 ctx.fillStyle = '#FF0000' ctx.globalAlpha = 0.7 ctx.fillRect(x1, y1, Math.max(80, width * 0.3), 20) ctx.globalAlpha = 1 // 绘制标签文本 ctx.fillStyle = '#FFFFFF' ctx.font = '12px Arial' const labelText = `${label || 'unknown'} ${(parseFloat(score) * 100).toFixed(0)}%` ctx.fillText(labelText, x1 + 5, y1 + 15) } // 添加对图片的额外监听 watch(imgRef, (newImg) => { if (newImg) { if (newImg.complete) { onImageLoad() } else { newImg.onload = onImageLoad } } }) // 确保在坐标数据变化时重新绘制 watch(() => recognizeCoordinates.value, (newVal) => { if (newVal && imgRef.value && imgRef.value.complete) { onImageLoad() } }, { deep: true }) </script> <style lang="less" scoped> .EventAlarmDetail { padding-bottom: 20px; } .EventAlarmDetail .topPart { padding: 16px; } .header_right { display: flex; } .header_right img { width: 48px; height: 48px; margin-right: 16px; } .header_right h5 { height: 14px; font-size: 14px; color: #333330; font-weight: 400; margin-bottom: 14px; } .header_right .num_header { display: inline-block; width: 31px; height: 18px; line-height: 18px; text-align: center; background: rgba(0, 86, 245, 0.1); border-radius: 3px; font-size: 10px; color: #0056F5; font-weight: 400; margin-right: 8px; } .header_right p { height: 10px; font-size: 10px; color: #0056F5; font-weight: 400; margin-bottom: 2px; } :deep(.ant-page-header .ant-page-header-content) { padding: 0; } :deep(.ant-descriptions .ant-descriptions-title) { margin-top: 15px!important; } .listManagePage .topPart { display: flex; align-items: center; margin: 0 16px 16px 0; background: rgba(255, 255, 255, 0.70); border: 1px solid #FFFFFF; box-shadow: 0 2px 4px 0 rgba(0,0,0,0.10); border-radius: 3px; } .footer_btn { position: fixed; bottom: 0; right: 0; box-sizing: border-box; margin-right: 16px; background: #fff; padding-bottom: -16px; text-align: right; width: 100%; padding: 12px 17px 12px 0; border: 1px solid #FFFFFF; box-shadow: 0 -2px 6px 0 rgba(0,27,77,0.06); } .topForm { padding: 6px 16px; background: #F3F7FE; } .firstForm { margin-bottom: 24px; } .secform { padding: 16px 16px 36px; } .tableTitleLine { margin-bottom: 14px; } :deep(.ant-form-item .ant-form-item-control-input-content) { font-size: 12px; color: #666666; font-weight: 400; } :deep(.ant-input:placeholder-shown) { font-size: 12px; color: #DBDFE8; font-weight: 400; } .img_size { // width:100%; height:200px; } :deep(.ant-image .ant-image-img) { width: 350px; height: 200px; } :deep(.ant-form-item .ant-form-item-explain-error) { font-size: 12px; } .image-container { position: relative; display: inline-block; line-height: 0; /* 防止图片下方有间隙 */ } .overlay-canvas { position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; z-index: 2; /* 确保canvas在图片上方 */ } .img_size { display: block; max-width: 100%; height:200px; position: relative; z-index: 1; } </style> 在事件图片的效果上再实现可以图片预览,预览图片的时候,绘制图也跟着变化
07-25
<item> <widget class="QGroupBox" name="groupBox_2"> <property name="title"> <string>当前主要用来选取Z轴坐标值,默认正视图</string> </property> <layout class="QVBoxLayout" name="verticalLayout_3" stretch="1,0"> <item> <widget class="pclTaskWidget" name="frontVIew" native="true"/> </item> <item> <widget class="QGroupBox" name="groupBox_4"> <property name="title"> <string>视图选择</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> <widget class="QRadioButton" name="verticalFViewRadio"> <property name="text"> <string>俯视图</string> </property> </widget> </item> <item> <widget class="QRadioButton" name="upFViewRadio"> <property name="text"> <string>仰视图</string> </property> </widget> </item> <item> <widget class="QRadioButton" name="frontFViewRadio"> <property name="text"> <string>正()视图</string> </property> <property name="checked"> <bool>true</bool> </property> </widget> </item> <item> <widget class="QRadioButton" name="backFViewRadio"> <property name="text"> <string>后视图</string> </property> </widget> </item> <item> <widget class="QRadioButton" name="rightFViewRadio"> <property name="text"> <string>右视图</string> </property> </widget> </item> <item> <widget class="QRadioButton" name="leftFViewRadio"> <property name="text"> <string>左视图</string> </property> </widget> </item> <item> <widget class="QPushButton" name="resetFView"> <property name="text"> <string>复位</string> </property> </widget> </item> </layout> </widget> </item> </layout> </widget> </item> 注释上述代码
09-13
以下是针对Z轴坐标选取界面的 **深度代码注释与优化建议**: --- ### 1. **整体结构分析** ```xml <widget class="QGroupBox" name="groupBox_2"> <property name="title"> <string>当前主要用来选取Z轴坐标值,默认正视图</string> <!-- 功能说明 --> </property> <layout class="QVBoxLayout" stretch="1,0"> <!-- 视图区域可拉伸,控制面板固定 --> ``` **关键设计**: - 采用与X/Y轴选取界面相同的双组件布局(视图+控制面板) - `stretch="1,0"` 确保点云显示区域占据主要空间 **问题**: - 标题文本过长可能影响布局美观 **建议**: ```xml <property name="toolTip"> <string>通过正视图交互选取Z轴坐标值</string> <!-- 悬浮提示 --> </property> <property name="title"><string>Z轴坐标选取</string></property> <!-- 简化标题 --> ``` --- ### 2. **点云显示组件** ```xml <widget class="pclTaskWidget" name="frontVIew" native="true"/> <!-- 注意拼写错误:frontVIew应为frontView --> ``` **功能要求**: 1. 需要实现Z轴坐标捕捉: ```cpp // 伪代码:Z轴坐标选择信号 connect(frontView, &pclTaskWidget::zCoordinateSelected, this, &RouteSettingWidget::onZCoordSelected); ``` 2. 建议增加可视化引导: ```xml <!-- 在pclTaskWidget的样式表中添加 --> <property name="styleSheet"> <string notr="true"> border: 1px dashed #AAA; background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #F8F8F8, stop:1 #E8E8E8); </string> </property> ``` --- ### 3. **视图控制面板** ```xml <widget class="QGroupBox" name="groupBox_4"> <layout class="QHBoxLayout"> <!-- 视图单选按钮组 --> <widget class="QRadioButton" name="frontFViewRadio" checked="true"> <property name="text"><string>正()视图</string></property> </widget> <!-- 其他视图选项... --> <widget class="QPushButton" name="resetFView"> <property name="text"><string>复位</string></property> </widget> </layout> </widget> ``` **交互优化**: 1. 使用枚举管理视图模式: ```cpp enum ZViewMode { Front, Back, Left, Right, Top, Bottom }; Q_ENUM(ZViewMode) ``` 2. 为复位按钮添加功能: ```cpp connect(resetFView, &QPushButton::clicked, [this](){ frontView->resetCameraAngle(ZViewMode::Front); frontView->clearSelection(); // 清除已选Z坐标 }); ``` --- ### 4. **关键改进建议** #### 坐标显示增强 ```xml <!-- 在groupBox_2底部添加状态栏 --> <widget class="QLabel" name="zCoordStatus"> <property name="alignment">Qt::AlignRight</property> <property name="text">Z: ---</property> <property name="styleSheet">font: bold 10pt "Consolas";</property> </widget> ``` #### 视图切换动画 ```cpp // 使用动画平滑过渡 QPropertyAnimation *anim = new QPropertyAnimation(frontView, "geometry"); anim->setEasingCurve(QEasingCurve::OutQuad); anim->setDuration(250); ``` #### 错误处理 ```cpp // 检查点云数据有效性 if(frontView->pointCloud().empty()) { QMessageBox::warning(this, tr("错误"), tr("未加载点云数据")); return; } ``` --- ### 5. **样式优化方案** ```xml <style> /* 统一单选按钮样式 */ QRadioButton::indicator { width: 14px; height: 14px; } QRadioButton::indicator:checked { image: url(:/icons/checked_blue.png); } /* 高亮当前Z坐标 */ QLabel#zCoordStatus[alert="true"] { color: #FF5722; background-color: #FFF3F0; border: 1px solid #FFCCBC; } </style> ``` ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值