Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
LuJin-Im
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yangzhaojun
LuJin-Im
Commits
e202df87
Commit
e202df87
authored
Aug 28, 2018
by
李博今
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将错误日志导入数据库。为客服新增发送信息的手机号字段。等待发送短信接口
parent
226315e1
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
443 additions
and
1 deletion
+443
-1
ErrorController.java
...com/qiqiim/webserver/user/controller/ErrorController.java
+46
-0
ImController.java
...va/com/qiqiim/webserver/user/controller/ImController.java
+9
-0
ErrorLogDao.java
src/main/java/com/qiqiim/webserver/user/dao/ErrorLogDao.java
+23
-0
ErrorLogDao.xml
src/main/java/com/qiqiim/webserver/user/dao/ErrorLogDao.xml
+31
-0
UserAccountDao.java
...in/java/com/qiqiim/webserver/user/dao/UserAccountDao.java
+2
-0
UserAccountDao.xml
...ain/java/com/qiqiim/webserver/user/dao/UserAccountDao.xml
+4
-1
UserInfoDao.java
src/main/java/com/qiqiim/webserver/user/dao/UserInfoDao.java
+2
-0
UserInfoDao.xml
src/main/java/com/qiqiim/webserver/user/dao/UserInfoDao.xml
+4
-0
ConsultantManagerEntity.java
.../qiqiim/webserver/user/model/ConsultantManagerEntity.java
+10
-0
ErrorLog.java
src/main/java/com/qiqiim/webserver/user/model/ErrorLog.java
+103
-0
ErrorLogService.java
...va/com/qiqiim/webserver/user/service/ErrorLogService.java
+34
-0
UserInfoService.java
...va/com/qiqiim/webserver/user/service/UserInfoService.java
+2
-0
ErrorLogServiceImpl.java
...qiim/webserver/user/service/impl/ErrorLogServiceImpl.java
+37
-0
UserAccountServiceImpl.java
...m/webserver/user/service/impl/UserAccountServiceImpl.java
+3
-0
UserInfoServiceImpl.java
...qiim/webserver/user/service/impl/UserInfoServiceImpl.java
+5
-0
consultantlist.jsp
src/main/webapp/WEB-INF/page/user/consultantlist.jsp
+17
-0
errorloglist.jsp
src/main/webapp/WEB-INF/page/user/errorloglist.jsp
+111
-0
No files found.
src/main/java/com/qiqiim/webserver/user/controller/ErrorController.java
0 → 100644
View file @
e202df87
/**
* createby : JinxLbj
* date : 2018/8/27
* desc : 错误控制器
**/
package
com
.
qiqiim
.
webserver
.
user
.
controller
;
import
com.qiqiim.webserver.user.service.ErrorLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
@Controller
public
class
ErrorController
{
@Autowired
private
ErrorLogService
errorLogServiceImpl
;
/**
* 列表
*/
@RequestMapping
(
"/errorList"
)
public
String
errorLoglist
(
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
)
{
request
.
setAttribute
(
"allsession"
,
errorLogServiceImpl
.
getLogs
());
// String message = (String) getSession().getAttribute("message");
// if (message == null || "".equals(message)) {
// getSession().setAttribute("message", "");
// }
return
"user/errorloglist"
;
}
@RequestMapping
(
"/delError"
)
public
String
delError
(
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
){
Integer
id
=
new
Integer
((
String
)
params
.
get
(
"id"
));
String
solution
=
(
String
)
params
.
get
(
"solution"
);
errorLogServiceImpl
.
delLog
(
id
,
solution
);
request
.
setAttribute
(
"allsession"
,
errorLogServiceImpl
.
getLogs
());
return
"user/errorloglist"
;
}
}
src/main/java/com/qiqiim/webserver/user/controller/ImController.java
View file @
e202df87
...
@@ -703,6 +703,15 @@ public class ImController extends BaseController {
...
@@ -703,6 +703,15 @@ public class ImController extends BaseController {
return
new
ModelAndView
(
"redirect:/consultantlist"
);
return
new
ModelAndView
(
"redirect:/consultantlist"
);
}
}
}
}
@RequestMapping
(
value
=
"/receivePhone"
)
@ResponseBody
public
Map
<
String
,
Object
>
receivePhone
(
@Param
(
value
=
"id"
)
long
id
){
String
phone
=
userInfoServiceImpl
.
getPhone
(
id
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"phone"
,
phone
);
return
map
;
}
}
}
...
...
src/main/java/com/qiqiim/webserver/user/dao/ErrorLogDao.java
0 → 100644
View file @
e202df87
/**
* createby : JinxLbj
* date : 2018/8/27
* desc : 错误信息持久化层
**/
package
com
.
qiqiim
.
webserver
.
user
.
dao
;
import
com.qiqiim.webserver.user.model.ErrorLog
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
ErrorLogDao
{
List
<
ErrorLog
>
getLogs
(
String
state
);
int
saveErrorLog
(
ErrorLog
errorLog
);
int
delErrorLog
(
@Param
(
"id"
)
int
id
,
@Param
(
"solution"
)
String
solution
);
}
src/main/java/com/qiqiim/webserver/user/dao/ErrorLogDao.xml
0 → 100644
View file @
e202df87
<?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.qiqiim.webserver.user.dao.ErrorLogDao"
>
<resultMap
type=
"com.qiqiim.webserver.user.model.ErrorLog"
id=
"BaseResultMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"consultantId"
column=
"consultant_id"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"message"
column=
"message"
/>
<result
property=
"errorCode"
column=
"error_code"
/>
<result
property=
"errorMessage"
column=
"errorMessage"
/>
<result
property=
"sendTime"
column=
"send_time"
/>
<result
property=
"state"
column=
"state"
/>
<result
property=
"solution"
column=
"solution"
/>
</resultMap>
<select
id=
"getLogs"
resultMap=
"BaseResultMap"
>
select * from error_log where state = #{state};
</select>
<insert
id=
"saveErrorLog"
>
INSERT INTO error_log (user_id,consultant_id,phone,message,error_code,error_message,send_time,state)
VALUE (#{userId},#{consultantId},#{phone},#{message},#{errorCode},#{errorMessage},#{sendTime},#{state});
</insert>
<delete
id=
"delErrorLog"
>
update error_log set state = 1 , solution = #{solution} where id = #{id};
</delete>
</mapper>
\ No newline at end of file
src/main/java/com/qiqiim/webserver/user/dao/UserAccountDao.java
View file @
e202df87
...
@@ -28,4 +28,6 @@ public interface UserAccountDao extends BaseDao<UserAccountEntity> {
...
@@ -28,4 +28,6 @@ public interface UserAccountDao extends BaseDao<UserAccountEntity> {
public
int
updateConsultantPhone
(
@Param
(
value
=
"phone"
)
String
phone
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantPhone
(
@Param
(
value
=
"phone"
)
String
phone
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantName
(
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantName
(
@Param
(
value
=
"name"
)
String
name
,
@Param
(
value
=
"id"
)
long
id
);
public
int
updateConsultantMessagePhone
(
@Param
(
value
=
"messagePhone"
)
String
messagePhone
,
@Param
(
value
=
"id"
)
long
id
);
}
}
src/main/java/com/qiqiim/webserver/user/dao/UserAccountDao.xml
View file @
e202df87
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
<select
id=
"getAllConsultant"
resultMap=
"consultantMap"
>
<select
id=
"getAllConsultant"
resultMap=
"consultantMap"
>
select ua.id, ua.account, ud.name as deptName, ui.name as name, ui.phone as phone, ui.profilephoto as headPic,
select ua.id, ua.account, ud.name as deptName, ui.name as name, ui.phone as phone, ui.profilephoto as headPic,
ui.remark as remark
ui.remark as remark
, ui.message_phone as messagePhone
from user_account ua
from user_account ua
left join user_info ui on ua.id = ui.uid
left join user_info ui on ua.id = ui.uid
left join user_department ud on ui.deptid = ud.id
left join user_department ud on ui.deptid = ud.id
...
@@ -166,4 +166,7 @@
...
@@ -166,4 +166,7 @@
<update
id=
"updateConsultantRemark"
>
<update
id=
"updateConsultantRemark"
>
update user_info set remark = #{remark} where uid = #{id}
update user_info set remark = #{remark} where uid = #{id}
</update>
</update>
<update
id=
"updateConsultantMessagePhone"
>
update user_info set message_phone = #{messagePhone} where uid = #{id}
</update>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/qiqiim/webserver/user/dao/UserInfoDao.java
View file @
e202df87
...
@@ -14,4 +14,6 @@ public interface UserInfoDao extends BaseDao<UserInfoEntity> {
...
@@ -14,4 +14,6 @@ public interface UserInfoDao extends BaseDao<UserInfoEntity> {
int
updateHeadPic
(
@Param
(
value
=
"path"
)
String
path
,
@Param
(
value
=
"id"
)
long
id
);
int
updateHeadPic
(
@Param
(
value
=
"path"
)
String
path
,
@Param
(
value
=
"id"
)
long
id
);
int
delByUid
(
@Param
(
value
=
"id"
)
long
id
);
int
delByUid
(
@Param
(
value
=
"id"
)
long
id
);
String
getPhone
(
@Param
(
value
=
"id"
)
long
id
);
}
}
src/main/java/com/qiqiim/webserver/user/dao/UserInfoDao.xml
View file @
e202df87
...
@@ -181,4 +181,8 @@
...
@@ -181,4 +181,8 @@
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"getPhone"
resultType=
"string"
>
select phone from user_info where uid = #{id};
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/java/com/qiqiim/webserver/user/model/ConsultantManagerEntity.java
View file @
e202df87
...
@@ -14,6 +14,8 @@ public class ConsultantManagerEntity {
...
@@ -14,6 +14,8 @@ public class ConsultantManagerEntity {
private
String
password
;
private
String
password
;
private
String
remark
;
private
String
remark
;
private
String
messagePhone
;
public
String
getPassword
()
{
public
String
getPassword
()
{
return
password
;
return
password
;
}
}
...
@@ -85,4 +87,12 @@ public class ConsultantManagerEntity {
...
@@ -85,4 +87,12 @@ public class ConsultantManagerEntity {
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
public
String
getMessagePhone
()
{
return
messagePhone
;
}
public
void
setMessagePhone
(
String
meesagePhone
)
{
this
.
messagePhone
=
meesagePhone
;
}
}
}
src/main/java/com/qiqiim/webserver/user/model/ErrorLog.java
0 → 100644
View file @
e202df87
/**
* createby : JinxLbj
* date : 2018/8/27
* desc : 错误信息类
**/
package
com
.
qiqiim
.
webserver
.
user
.
model
;
import
java.util.Date
;
public
class
ErrorLog
{
private
int
id
;
private
int
userId
;
private
int
consultantId
;
private
String
phone
;
private
String
message
;
private
String
errorCode
;
private
String
errorMessage
;
private
Date
sendTime
;
private
String
state
=
"0"
;
private
String
solution
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
int
userId
)
{
this
.
userId
=
userId
;
}
public
int
getConsultantId
()
{
return
consultantId
;
}
public
void
setConsultantId
(
int
consultantId
)
{
this
.
consultantId
=
consultantId
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
String
getErrorCode
()
{
return
errorCode
;
}
public
void
setErrorCode
(
String
errorCode
)
{
this
.
errorCode
=
errorCode
;
}
public
Date
getSendTime
()
{
return
sendTime
;
}
public
void
setSendTime
(
Date
sendTime
)
{
this
.
sendTime
=
sendTime
;
}
public
String
getErrorMessage
()
{
return
errorMessage
;
}
public
void
setErrorMessage
(
String
errorMessage
)
{
this
.
errorMessage
=
errorMessage
;
}
public
String
getState
()
{
return
state
;
}
public
void
setState
(
String
state
)
{
this
.
state
=
state
;
}
public
String
getSolution
()
{
return
solution
;
}
public
void
setSolution
(
String
solution
)
{
this
.
solution
=
solution
;
}
}
\ No newline at end of file
src/main/java/com/qiqiim/webserver/user/service/ErrorLogService.java
0 → 100644
View file @
e202df87
/**
* createby : JinxLbj
* date : 2018/8/27
* desc : 错误记录接口
**/
package
com
.
qiqiim
.
webserver
.
user
.
service
;
import
com.qiqiim.webserver.user.model.ErrorLog
;
import
java.util.List
;
public
interface
ErrorLogService
{
/**
* 错误信息录入数据库
* @return 插入是否成功(0失败 1成功)
*/
int
saveErrorLog
();
/**
* 获取所有错误信息
* @return 错误信息集合
*/
List
<
ErrorLog
>
getLogs
();
/**
* 删除错误信息
* @param id 主键
* @param solution 解决方案
* @return 删除数量
*/
int
delLog
(
Integer
id
,
String
solution
);
}
src/main/java/com/qiqiim/webserver/user/service/UserInfoService.java
View file @
e202df87
...
@@ -27,4 +27,6 @@ public interface UserInfoService {
...
@@ -27,4 +27,6 @@ public interface UserInfoService {
int
updateHeadPic
(
String
path
,
long
id
);
int
updateHeadPic
(
String
path
,
long
id
);
int
delByUid
(
long
uid
);
int
delByUid
(
long
uid
);
String
getPhone
(
long
uid
);
}
}
src/main/java/com/qiqiim/webserver/user/service/impl/ErrorLogServiceImpl.java
0 → 100644
View file @
e202df87
/**
* createby : JinxLbj
* date : 2018/8/27
* desc : 实现类
**/
package
com
.
qiqiim
.
webserver
.
user
.
service
.
impl
;
import
com.qiqiim.webserver.user.dao.ErrorLogDao
;
import
com.qiqiim.webserver.user.model.ErrorLog
;
import
com.qiqiim.webserver.user.service.ErrorLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
ErrorLogServiceImpl
implements
ErrorLogService
{
@Autowired
private
ErrorLogDao
errorLogDao
;
@Override
public
int
saveErrorLog
()
{
return
errorLogDao
.
saveErrorLog
(
new
ErrorLog
());
}
@Override
public
List
<
ErrorLog
>
getLogs
()
{
return
errorLogDao
.
getLogs
(
"0"
);
}
@Override
public
int
delLog
(
Integer
id
,
String
solution
)
{
return
errorLogDao
.
delErrorLog
(
id
,
solution
);
}
}
src/main/java/com/qiqiim/webserver/user/service/impl/UserAccountServiceImpl.java
View file @
e202df87
...
@@ -116,6 +116,9 @@ public class UserAccountServiceImpl implements UserAccountService {
...
@@ -116,6 +116,9 @@ public class UserAccountServiceImpl implements UserAccountService {
if
(
consultantManagerEntity
.
getRemark
()
!=
null
){
if
(
consultantManagerEntity
.
getRemark
()
!=
null
){
i
+=
userAccountDao
.
updateConsultantRemark
(
new
String
(
consultantManagerEntity
.
getRemark
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
i
+=
userAccountDao
.
updateConsultantRemark
(
new
String
(
consultantManagerEntity
.
getRemark
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
}
}
if
(
consultantManagerEntity
.
getMessagePhone
()
!=
null
){
i
+=
userAccountDao
.
updateConsultantMessagePhone
(
new
String
(
consultantManagerEntity
.
getMessagePhone
().
getBytes
(
"iso8859-1"
),
"UTF-8"
),
Long
.
parseLong
(
consultantManagerEntity
.
getId
()));
}
return
i
;
return
i
;
}
}
...
...
src/main/java/com/qiqiim/webserver/user/service/impl/UserInfoServiceImpl.java
View file @
e202df87
...
@@ -67,4 +67,9 @@ public class UserInfoServiceImpl implements UserInfoService {
...
@@ -67,4 +67,9 @@ public class UserInfoServiceImpl implements UserInfoService {
return
userInfoDao
.
delByUid
(
uid
);
return
userInfoDao
.
delByUid
(
uid
);
}
}
@Override
public
String
getPhone
(
long
uid
)
{
return
userInfoDao
.
getPhone
(
uid
);
}
}
}
src/main/webapp/WEB-INF/page/user/consultantlist.jsp
View file @
e202df87
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
<th>
顾问姓名
</th>
<th>
顾问姓名
</th>
<th>
所属部门
</th>
<th>
所属部门
</th>
<th>
联系电话
</th>
<th>
联系电话
</th>
<th>
信息电话
</th>
<th>
顾问描述
</th>
<th>
顾问描述
</th>
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
...
@@ -43,6 +44,7 @@
...
@@ -43,6 +44,7 @@
<td>
${user.name}
</td>
<td>
${user.name}
</td>
<td>
${user.deptName}
</td>
<td>
${user.deptName}
</td>
<td>
${user.phone}
</td>
<td>
${user.phone}
</td>
<td>
${user.messagePhone}
</td>
<td>
${user.remark}
</td>
<td>
${user.remark}
</td>
<td>
<td>
<a
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
<a
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
...
@@ -108,6 +110,13 @@
...
@@ -108,6 +110,13 @@
placeholder=
"请输入联系电话"
class=
"layui-input"
>
placeholder=
"请输入联系电话"
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
信息电话
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"messagePhone"
id=
"messagePhone1"
autocomplete=
"off"
placeholder=
"请输入联系电话"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
描述
</label>
<label
class=
"layui-form-label"
>
描述
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
...
@@ -175,6 +184,13 @@
...
@@ -175,6 +184,13 @@
autocomplete=
"off"
class=
"layui-input"
>
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
信息电话
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"messagePhone"
id=
"messagePhone2"
autocomplete=
"off"
placeholder=
"请输入联系电话"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
描述
</label>
<label
class=
"layui-form-label"
>
描述
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
...
@@ -255,6 +271,7 @@
...
@@ -255,6 +271,7 @@
}
}
form
.
render
(
'select'
);
form
.
render
(
'select'
);
document
.
getElementById
(
"phone1"
).
value
=
tr
.
children
[
5
].
innerHTML
;
document
.
getElementById
(
"phone1"
).
value
=
tr
.
children
[
5
].
innerHTML
;
document
.
getElementById
(
"messagePhone1"
).
value
=
tr
.
children
[
6
].
innerHTML
;
list
.
style
.
display
=
'none'
;
list
.
style
.
display
=
'none'
;
updateDetailForm
.
style
.
display
=
'block'
;
updateDetailForm
.
style
.
display
=
'block'
;
}
}
...
...
src/main/webapp/WEB-INF/page/user/errorloglist.jsp
0 → 100644
View file @
e202df87
<%@ page
language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%>
<%@ include
file=
"/WEB-INF/page/public/taglib.jsp"
%>
<!doctype html>
<html>
<head>
<title>
错误查看
</title>
<link
href=
"img/icon.ico"
rel=
"SHORTCUT ICON"
/>
<%@ include
file=
"/WEB-INF/page/public/meta.jsp"
%>
<link
rel=
"stylesheet"
href=
"layui/css/layui.css"
>
</head>
<body>
<div
style=
"margin: 20px;"
>
<div
id=
"list"
>
<table
class=
"layui-table"
lay-size=
"lg"
>
<colgroup>
<col
width=
"150"
>
<col
width=
"200"
>
<col>
</colgroup>
<thead>
<tr>
<th>
错误ID
</th>
<th>
用户ID
</th>
<th>
顾问ID
</th>
<th>
接受者电话
</th>
<th>
发送信息
</th>
<th>
错误代码
</th>
<th>
错误信息
</th>
<th>
发送时间
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"
${
allsession
}
"
var=
"user"
>
<tr>
<td>
${user.id}
</td>
<td>
${user.userId}
</td>
<td>
${user.consultantId}
</td>
<td>
${user.phone}
</td>
<td>
${user.message}
</td>
<td>
${user.errorCode}
</td>
<td>
${user.errorMessage}
</td>
<td>
${user.sendTime}
</td>
<td>
<a
class=
"layui-btn layui-btn-primary layui-btn-xs sendUserMsg"
onclick=
"del(this)"
>
删除
</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<div
id=
"delDiv"
style=
"display: none"
>
<fieldset
class=
"layui-elem-field index-button"
style=
"margin-top: 30px"
>
<legend>
添加
</legend>
<div>
<form
class=
"layui-form"
action=
"delError"
method=
"post"
id=
"delForm"
>
<input
name=
"id"
id=
"id3"
type=
"text"
style=
"display: none"
/>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
描述
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"solution"
placeholder=
"输入解决方案"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<button
id=
"regBut"
class=
"layui-btn"
onclick=
"subdel()"
>
添加
</button>
<a
class=
"layui-btn layui-btn-primary"
onclick=
"cancel()"
target=
"_blank"
>
返回
</a>
</div>
</div>
</form>
</div>
</fieldset>
</div>
<script
src=
"layui/layui.js"
></script>
</div>
<script>
var
form
;
layui
.
use
(
'form'
,
function
()
{
form
=
layui
.
form
;
});
function
del
(
e
)
{
document
.
getElementById
(
"id3"
).
value
=
e
.
parentElement
.
parentElement
.
children
[
0
].
innerHTML
;
document
.
getElementById
(
"list"
).
style
.
display
=
'none'
;
document
.
getElementById
(
"delDiv"
).
style
.
display
=
'block'
;
}
function
subdel
(){
document
.
getElementById
(
"delForm"
).
submit
();
}
window
.
onload
=
function
(){
var
message
=
""
;
message
=
"${sessionScope.message}"
;
if
(
message
==
null
||
message
===
""
){
return
;
}
alert
(
message
);
$
{
sessionScope
.
remove
(
"message"
)}
}
</script>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment