Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
Details
Activity
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
49ac7abd
Commit
49ac7abd
authored
Feb 03, 2023
by
王晓倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
38bf11bf
272e7779
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
1547 additions
and
521 deletions
+1547
-521
TStaningBookController.java
...g/web/controller/hiddenDanger/TStaningBookController.java
+6
-2
TTrainCourseController.java
...m/zehong/web/controller/train/TTrainCourseController.java
+13
-0
TStaff.java
...system/src/main/java/com/zehong/system/domain/TStaff.java
+25
-1
TStaningBook.java
.../src/main/java/com/zehong/system/domain/TStaningBook.java
+20
-0
TTrainUserCourse.java
.../main/java/com/zehong/system/domain/TTrainUserCourse.java
+62
-39
TStaffVo.java
...m/src/main/java/com/zehong/system/domain/vo/TStaffVo.java
+1
-1
TTrainUserCourseMapper.java
...java/com/zehong/system/mapper/TTrainUserCourseMapper.java
+15
-8
ITStaningBookService.java
.../java/com/zehong/system/service/ITStaningBookService.java
+1
-1
ITTrainCourseService.java
.../java/com/zehong/system/service/ITTrainCourseService.java
+7
-0
LedserviceImpl.java
...n/java/com/zehong/system/service/impl/LedserviceImpl.java
+1
-1
TStaffServiceImpl.java
...ava/com/zehong/system/service/impl/TStaffServiceImpl.java
+52
-9
TStaningBookServiceImpl.java
...m/zehong/system/service/impl/TStaningBookServiceImpl.java
+4
-6
TTrainCourseServiceImpl.java
...m/zehong/system/service/impl/TTrainCourseServiceImpl.java
+15
-1
TContractorTrainResultMapper.xml
.../resources/mapper/system/TContractorTrainResultMapper.xml
+7
-6
TStaffMapper.xml
...-system/src/main/resources/mapper/system/TStaffMapper.xml
+1
-1
TStaningBookMapper.xml
...m/src/main/resources/mapper/system/TStaningBookMapper.xml
+5
-3
TTrainUserCourseMapper.xml
...c/main/resources/mapper/system/TTrainUserCourseMapper.xml
+31
-6
contractTrain.js
danger-manage-web/src/api/contractTrain/contractTrain.js
+9
-0
lessonsProgram.js
...er-manage-web/src/api/educationPlanExam/lessonsProgram.js
+9
-0
index.vue
danger-manage-web/src/components/FileUpload/index.vue
+191
-188
ChangPapelTable.vue
...anage-web/src/components/PeopleChange/ChangPapelTable.vue
+17
-2
index.vue
danger-manage-web/src/components/PeopleChange/index.vue
+8
-3
dangerArr.js
danger-manage-web/src/utils/cesium/dangerArr.js
+32
-32
DangerTips.vue
...r-manage-web/src/views/dangerScale/profile/DangerTips.vue
+76
-0
index.vue
danger-manage-web/src/views/dangerScale/profile/index.vue
+5
-2
AddQuestion.vue
...ucationPlanExam/lessonsProgram/components/AddQuestion.vue
+32
-12
ChangeQuestion.vue
...tionPlanExam/lessonsProgram/components/ChangeQuestion.vue
+7
-4
Dia.vue
...views/educationPlanExam/lessonsProgram/components/Dia.vue
+33
-14
Lesson.vue
...ws/educationPlanExam/lessonsProgram/components/Lesson.vue
+59
-30
QuestionList.vue
...cationPlanExam/lessonsProgram/components/QuestionList.vue
+18
-1
index.vue
...-web/src/views/educationPlanExam/lessonsProgram/index.vue
+155
-17
index.vue
...c/views/educationPlanExam/myLessons/CheckLesson/index.vue
+6
-0
AddQuestion.vue
...educationPlanExam/questionBank/components/AddQuestion.vue
+1
-1
index.vue
...manage-web/src/views/educationPlanExam/testStat/index.vue
+54
-14
AddQuestion.vue
...ws/educationPlanExam/textPaper/components/AddQuestion.vue
+27
-9
ChangeQuestion.vue
...educationPlanExam/textPaper/components/ChangeQuestion.vue
+6
-4
Dia.vue
.../src/views/educationPlanExam/textPaper/components/Dia.vue
+54
-6
Lesson.vue
...c/views/educationPlanExam/textPaper/components/Lesson.vue
+17
-4
QuestionList.vue
...s/educationPlanExam/textPaper/components/QuestionList.vue
+24
-5
index.vue
...anage-web/src/views/educationPlanExam/textPaper/index.vue
+161
-27
visitorAdd.vue
...src/views/educationPlanExam/visitorProgram/visitorAdd.vue
+1
-1
index.vue
...web/src/views/educationPlanExam/visitorTestStat/index.vue
+2
-2
index.vue
danger-manage-web/src/views/safetyManagement/staff/index.vue
+165
-7
index.vue
danger-manage-web/src/views/system/book/index.vue
+112
-51
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/hiddenDanger/TStaningBookController.java
View file @
49ac7abd
...
...
@@ -44,8 +44,9 @@ public class TStaningBookController extends BaseController
{
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
SysUser
user
=
loginUser
.
getUser
();
tStaningBook
.
setUserId
(
user
.
getUserId
());
startPage
();
List
<
TStaningBook
>
list
=
tStaningBookService
.
selectTStaningBookList
(
tStaningBook
,
user
.
get
Dept
Id
());
List
<
TStaningBook
>
list
=
tStaningBookService
.
selectTStaningBookList
(
tStaningBook
,
user
.
get
Roles
().
get
(
0
).
getRole
Id
());
return
getDataTable
(
list
);
}
...
...
@@ -60,7 +61,7 @@ public class TStaningBookController extends BaseController
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
SysUser
user
=
loginUser
.
getUser
();
startPage
();
List
<
TStaningBook
>
list
=
tStaningBookService
.
selectTStaningBookList
(
tStaningBook
,
user
.
get
Dept
Id
());
List
<
TStaningBook
>
list
=
tStaningBookService
.
selectTStaningBookList
(
tStaningBook
,
user
.
get
Roles
().
get
(
0
).
getRole
Id
());
ExcelUtil
<
TStaningBook
>
util
=
new
ExcelUtil
<
TStaningBook
>(
TStaningBook
.
class
);
return
util
.
exportExcel
(
list
,
"隐患台账数据"
);
}
...
...
@@ -83,6 +84,9 @@ public class TStaningBookController extends BaseController
@PostMapping
public
AjaxResult
add
(
@RequestBody
TStaningBook
tStaningBook
)
{
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
());
SysUser
user
=
loginUser
.
getUser
();
tStaningBook
.
setCreateId
(
user
.
getUserId
());
return
toAjax
(
tStaningBookService
.
insertTStaningBook
(
tStaningBook
));
}
...
...
danger-manage-admin/src/main/java/com/zehong/web/controller/train/TTrainCourseController.java
View file @
49ac7abd
...
...
@@ -12,6 +12,7 @@ import com.zehong.common.utils.ServletUtils;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.framework.web.service.TokenService
;
import
com.zehong.system.domain.StatisticsTrainCourse
;
import
com.zehong.system.domain.TDeviceInfo
;
import
com.zehong.system.domain.TTrainCourse
;
import
com.zehong.system.domain.TTrainUserCourse
;
import
com.zehong.system.domain.vo.UserCourseVo
;
...
...
@@ -193,4 +194,16 @@ public class TTrainCourseController extends BaseController
List
<
TTrainUserCourse
>
persons
=
tTrainCourseService
.
testPersonDetailByCourseId
(
courseId
);
return
getDataTable
(
persons
);
}
/**
* 导出所有考试详细数据项
*/
@Log
(
title
=
"设备信息管理"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/examDetails"
)
public
AjaxResult
examDetails
(
@RequestParam
(
value
=
"courseId"
)
Long
courseId
)
{
List
<
TTrainUserCourse
>
persons
=
tTrainCourseService
.
examDetails
(
courseId
);
ExcelUtil
<
TTrainUserCourse
>
util
=
new
ExcelUtil
<
TTrainUserCourse
>(
TTrainUserCourse
.
class
);
return
util
.
exportExcel
(
persons
,
"考试详细数据"
);
}
}
danger-manage-system/src/main/java/com/zehong/system/domain/TStaff.java
View file @
49ac7abd
package
com
.
zehong
.
system
.
domain
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
...
...
@@ -17,6 +18,8 @@ public class TStaff extends BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**系统用户id*/
private
Integer
userId
;
/** 员工id */
private
Integer
staffId
;
...
...
@@ -49,6 +52,9 @@ public class TStaff extends BaseEntity
/** 岗位id */
@Excel
(
name
=
"岗位id"
)
private
Integer
postId
;
/** 角色组 */
private
Long
[]
roleIds
;
/** 角色id */
@Excel
(
name
=
"角色id"
)
...
...
@@ -83,6 +89,22 @@ public class TStaff extends BaseEntity
@Excel
(
name
=
"删除标志"
,
readConverterExp
=
"0=正常,1删除"
)
private
String
isDel
;
public
Long
[]
getRoleIds
()
{
return
roleIds
;
}
public
void
setRoleIds
(
Long
[]
roleIds
)
{
this
.
roleIds
=
roleIds
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
...
...
@@ -246,7 +268,8 @@ public class TStaff extends BaseEntity
@Override
public
String
toString
()
{
return
"TStaff{"
+
"staffId="
+
staffId
+
"userId="
+
userId
+
", staffId="
+
staffId
+
", userName='"
+
userName
+
'\''
+
", password='"
+
password
+
'\''
+
", staffName='"
+
staffName
+
'\''
+
...
...
@@ -255,6 +278,7 @@ public class TStaff extends BaseEntity
", deptId="
+
deptId
+
", phonenumber='"
+
phonenumber
+
'\''
+
", postId="
+
postId
+
", roleIds="
+
Arrays
.
toString
(
roleIds
)
+
", roleId="
+
roleId
+
", positionalTitles='"
+
positionalTitles
+
'\''
+
", profession='"
+
profession
+
'\''
+
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/TStaningBook.java
View file @
49ac7abd
...
...
@@ -145,6 +145,26 @@ public class TStaningBook extends BaseEntity
private
List
<
Long
>
deptList
;
private
Long
userId
;
private
Long
createId
;
public
Long
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getCreateId
()
{
return
createId
;
}
public
void
setCreateId
(
Long
createId
)
{
this
.
createId
=
createId
;
}
public
List
<
Long
>
getDeptList
()
{
return
deptList
;
}
...
...
danger-manage-system/src/main/java/com/zehong/system/domain/TTrainUserCourse.java
View file @
49ac7abd
...
...
@@ -9,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity;
/**
* 用户课程对象 t_train_user_course
*
*
* @author zehong
* @date 2022-09-19
*/
...
...
@@ -21,42 +21,60 @@ public class TTrainUserCourse extends BaseEntity
private
Long
userCourseId
;
/** 用户id */
@Excel
(
name
=
"用户id"
)
private
Long
userId
;
/** 课程id */
@Excel
(
name
=
"课程id"
)
private
Long
courseId
;
/** 0未学习 1未通过 2已通过 */
@Excel
(
name
=
"0未学习 1未通过 2已通过"
)
private
Integer
state
;
/**人员名称**/
@Excel
(
name
=
"考试人员"
)
private
String
staffName
;
/** 创建人 */
private
String
createUser
;
/**人员部门**/
@Excel
(
name
=
"所属部门"
)
private
String
deptName
;
/** 最后一次考试时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"
最后一次
考试时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"考试时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
examinationTime
;
/** 最后一次考试结果(答对数量) */
@Excel
(
name
=
"
最后一次考试结果"
,
readConverterExp
=
"答=对数量
"
)
@Excel
(
name
=
"
得分
"
)
private
Integer
examinationResult
;
/** 创建人 */
@Excel
(
name
=
"创建人"
)
private
String
createUser
;
/**人员名称**/
private
String
staffName
;
/** 0未学习 1未通过 2已通过 */
private
Integer
state
;
/**人员部门**/
private
String
deptName
;
/** 0未学习 1未通过 2已通过 */
@Excel
(
name
=
"考试结果"
)
private
String
states
;
private
Integer
personnelType
;
private
Integer
finishDuration
;
private
Integer
trainState
;
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
String
getStates
()
{
return
states
;
}
public
void
setStates
(
String
states
)
{
this
.
states
=
states
;
}
public
Integer
getFinishDuration
()
{
return
finishDuration
;
}
...
...
@@ -86,61 +104,61 @@ public class TTrainUserCourse extends BaseEntity
this
.
userCourseId
=
userCourseId
;
}
public
Long
getUserCourseId
()
public
Long
getUserCourseId
()
{
return
userCourseId
;
}
public
void
setUserId
(
Long
userId
)
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getUserId
()
public
Long
getUserId
()
{
return
userId
;
}
public
void
setCourseId
(
Long
courseId
)
public
void
setCourseId
(
Long
courseId
)
{
this
.
courseId
=
courseId
;
}
public
Long
getCourseId
()
public
Long
getCourseId
()
{
return
courseId
;
}
public
void
setState
(
Integer
state
)
public
void
setState
(
Integer
state
)
{
this
.
state
=
state
;
}
public
Integer
getState
()
public
Integer
getState
()
{
return
state
;
}
public
void
setExaminationTime
(
Date
examinationTime
)
public
void
setExaminationTime
(
Date
examinationTime
)
{
this
.
examinationTime
=
examinationTime
;
}
public
Date
getExaminationTime
()
public
Date
getExaminationTime
()
{
return
examinationTime
;
}
public
void
setExaminationResult
(
Integer
examinationResult
)
public
void
setExaminationResult
(
Integer
examinationResult
)
{
this
.
examinationResult
=
examinationResult
;
}
public
Integer
getExaminationResult
()
public
Integer
getExaminationResult
()
{
return
examinationResult
;
}
public
void
setCreateUser
(
String
createUser
)
public
void
setCreateUser
(
String
createUser
)
{
this
.
createUser
=
createUser
;
}
public
String
getCreateUser
()
public
String
getCreateUser
()
{
return
createUser
;
}
...
...
@@ -163,15 +181,20 @@ public class TTrainUserCourse extends BaseEntity
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"userCourseId"
,
getUserCourseId
())
.
append
(
"userId"
,
getUserId
())
.
append
(
"courseId"
,
getCourseId
())
.
append
(
"state"
,
getState
())
.
append
(
"examinationTime"
,
getExaminationTime
())
.
append
(
"examinationResult"
,
getExaminationResult
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createUser"
,
getCreateUser
())
.
toString
();
return
"TTrainUserCourse{"
+
"userCourseId="
+
userCourseId
+
", userId="
+
userId
+
", courseId="
+
courseId
+
", staffName='"
+
staffName
+
'\''
+
", createUser='"
+
createUser
+
'\''
+
", deptName='"
+
deptName
+
'\''
+
", examinationTime="
+
examinationTime
+
", examinationResult="
+
examinationResult
+
", state="
+
state
+
", states='"
+
states
+
'\''
+
", personnelType="
+
personnelType
+
", finishDuration="
+
finishDuration
+
", trainState="
+
trainState
+
'}'
;
}
}
danger-manage-system/src/main/java/com/zehong/system/domain/vo/TStaffVo.java
View file @
49ac7abd
...
...
@@ -12,7 +12,7 @@ import java.util.Date;
/**
* 员工信息管理对象 t_staff
*
*
* @author zehong
* @date 2022-06-17
*/
...
...
danger-manage-system/src/main/java/com/zehong/system/mapper/TTrainUserCourseMapper.java
View file @
49ac7abd
...
...
@@ -5,15 +5,15 @@ import com.zehong.system.domain.TTrainUserCourse;
/**
* 用户课程Mapper接口
*
*
* @author zehong
* @date 2022-09-19
*/
public
interface
TTrainUserCourseMapper
public
interface
TTrainUserCourseMapper
{
/**
* 查询用户课程
*
*
* @param userCourseId 用户课程ID
* @return 用户课程
*/
...
...
@@ -21,7 +21,7 @@ public interface TTrainUserCourseMapper
/**
* 查询用户课程列表
*
*
* @param tTrainUserCourse 用户课程
* @return 用户课程集合
*/
...
...
@@ -29,7 +29,7 @@ public interface TTrainUserCourseMapper
/**
* 新增用户课程
*
*
* @param tTrainUserCourse 用户课程
* @return 结果
*/
...
...
@@ -37,7 +37,7 @@ public interface TTrainUserCourseMapper
/**
* 修改用户课程
*
*
* @param tTrainUserCourse 用户课程
* @return 结果
*/
...
...
@@ -45,7 +45,7 @@ public interface TTrainUserCourseMapper
/**
* 删除用户课程
*
*
* @param userCourseId 用户课程ID
* @return 结果
*/
...
...
@@ -53,7 +53,7 @@ public interface TTrainUserCourseMapper
/**
* 批量删除用户课程
*
*
* @param userCourseIds 需要删除的数据ID
* @return 结果
*/
...
...
@@ -65,4 +65,11 @@ public interface TTrainUserCourseMapper
* @return List<TTrainUserCourse>
*/
List
<
TTrainUserCourse
>
testPersonDetailByCourseId
(
Long
courseId
);
/**
* 导出所有考试详细数据项
* @param courseId
* @return
*/
List
<
TTrainUserCourse
>
examDetails
(
Long
courseId
);
}
danger-manage-system/src/main/java/com/zehong/system/service/ITStaningBookService.java
View file @
49ac7abd
...
...
@@ -28,7 +28,7 @@ public interface ITStaningBookService
* @param tStaningBook 隐患台账
* @return 隐患台账集合
*/
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
,
Long
dept
Id
);
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
,
Long
role
Id
);
/**
* 新增隐患台账
...
...
danger-manage-system/src/main/java/com/zehong/system/service/ITTrainCourseService.java
View file @
49ac7abd
...
...
@@ -107,5 +107,12 @@ public interface ITTrainCourseService
* @return List<TTrainUserCourse>
*/
List
<
TTrainUserCourse
>
testPersonDetailByCourseId
(
Long
courseId
);
/**
* 导出所有考试详细数据项
* @param courseId
* @return
*/
List
<
TTrainUserCourse
>
examDetails
(
Long
courseId
);
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/LedserviceImpl.java
View file @
49ac7abd
...
...
@@ -239,7 +239,7 @@ public class LedserviceImpl {
led
.
AddSinglelineTextToImageTextArea
(
hProgram
,
0
,
1
,
0
,
"上海灵信视觉"
,
"宋体"
,
12
,
0xff
,
0
,
0
,
0
,
6
,
8
,
0
);
//添加数字时钟节目
led
.
AddProgram
(
hProgram
,
1
,
0
,
1
);
led
.
AddDigitalClockArea
(
hProgram
,
1
,
1
,
0
,
0
,
ledWidth
,
ledHeight
,
"宋体"
,
8
,
0xff
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
0
,
0
,
0xff
,
0
,
0xff
,
0
,
0xff
,
1
);
led
.
AddDigitalClockArea
(
hProgram
,
1
,
1
,
0
,
0
,
ledWidth
,
ledHeight
,
"宋体"
,
9
,
0xff
,
0
,
0
,
0
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0xff
,
0
,
0xff
,
3
,
0xff
,
0
);
int
errCode
=
led
.
NetWorkSend
(
strIp
,
hProgram
);
led
.
DeleteProgram
(
hProgram
);
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TStaffServiceImpl.java
View file @
49ac7abd
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.SysUserRole
;
import
com.zehong.system.domain.TStaff
;
import
com.zehong.system.domain.form.TStaffForm
;
import
com.zehong.system.domain.vo.TStaffVo
;
import
com.zehong.system.mapper.SysUserRoleMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TStaffMapper
;
...
...
@@ -12,19 +18,23 @@ import com.zehong.system.service.ITStaffService;
/**
* 员工信息管理Service业务层处理
*
*
* @author zehong
* @date 2022-06-17
*/
@Service
public
class
TStaffServiceImpl
implements
ITStaffService
public
class
TStaffServiceImpl
implements
ITStaffService
{
@Autowired
private
TStaffMapper
tStaffMapper
;
@Autowired
private
SysUserRoleMapper
userRoleMapper
;
/**
* 查询员工信息管理
*
*
* @param staffId 员工信息管理ID
* @return 员工信息管理
*/
...
...
@@ -36,7 +46,7 @@ public class TStaffServiceImpl implements ITStaffService
/**
* 查询员工信息管理列表
*
*
* @param tStaff 员工信息管理
* @return 员工信息管理
*/
...
...
@@ -48,7 +58,7 @@ public class TStaffServiceImpl implements ITStaffService
/**
* 新增员工信息管理
*
*
* @param tStaff 员工信息管理
* @return 结果
*/
...
...
@@ -58,25 +68,32 @@ public class TStaffServiceImpl implements ITStaffService
String
staffCode
=
tStaffMapper
.
getStaffCode
();
tStaff
.
setStaffCode
(
staffCode
);
tStaff
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tStaffMapper
.
insertTStaff
(
tStaff
);
tStaffMapper
.
insertTStaff
(
tStaff
);
// 新增用户与角色管理
insertUserRole
(
tStaff
);
return
tStaff
.
getStaffId
();
}
/**
* 修改员工信息管理
*
*
* @param tStaff 员工信息管理
* @return 结果
*/
@Override
public
int
updateTStaff
(
TStaff
tStaff
)
{
// 删除用户与角色关联
userRoleMapper
.
deleteUserRoleByUserId
(
Long
.
valueOf
(
tStaff
.
getStaffId
()));
// 新增用户与角色管理
insertUserRole
(
tStaff
);
tStaff
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tStaffMapper
.
updateTStaff
(
tStaff
);
}
/**
* 批量删除员工信息管理
*
*
* @param staffIds 需要删除的员工信息管理ID
* @return 结果
*/
...
...
@@ -88,7 +105,7 @@ public class TStaffServiceImpl implements ITStaffService
/**
* 删除员工信息管理信息
*
*
* @param staffId 员工信息管理ID
* @return 结果
*/
...
...
@@ -97,4 +114,30 @@ public class TStaffServiceImpl implements ITStaffService
{
return
tStaffMapper
.
deleteTStaffById
(
staffId
);
}
/**
* 新增用户角色信息
*
* @param user 用户对象
*/
public
void
insertUserRole
(
TStaff
user
)
{
Long
[]
roles
=
user
.
getRoleIds
();
if
(
StringUtils
.
isNotNull
(
roles
))
{
// 新增用户与角色管理
List
<
SysUserRole
>
list
=
new
ArrayList
<
SysUserRole
>();
for
(
Long
roleId
:
roles
)
{
SysUserRole
ur
=
new
SysUserRole
();
ur
.
setUserId
(
Long
.
valueOf
(
user
.
getStaffId
()));
ur
.
setRoleId
(
roleId
);
list
.
add
(
ur
);
}
if
(
list
.
size
()
>
0
)
{
userRoleMapper
.
batchUserRole
(
list
);
}
}
}
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TStaningBookServiceImpl.java
View file @
49ac7abd
...
...
@@ -51,13 +51,11 @@ public class TStaningBookServiceImpl implements ITStaningBookService
* @return 隐患台账
*/
@Override
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
,
Long
dept
Id
)
public
List
<
TStaningBook
>
selectTStaningBookList
(
TStaningBook
tStaningBook
,
Long
role
Id
)
{
List
<
Long
>
oneList
=
new
ArrayList
<>();
oneList
.
add
(
deptId
);
List
<
Long
>
deptIds
=
selectDeptIds
(
new
ArrayList
<>(),
oneList
);
deptIds
.
add
(
deptId
);
tStaningBook
.
setDeptList
(
deptIds
);
if
(
roleId
!=
3
){
//当角色是管理员时候查询全部
tStaningBook
.
setUserId
(
0
l
);
}
List
<
TStaningBook
>
list
=
tStaningBookMapper
.
selectTStaningBookList
(
tStaningBook
);
return
list
;
}
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TTrainCourseServiceImpl.java
View file @
49ac7abd
...
...
@@ -67,7 +67,11 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
return
0
;
}
List
<
String
>
userIds
=
tTrainPlanMapper
.
selectAlluserByplanId
(
course
.
getCourseType
());
tTrainCourseMapper
.
insertUserCourse
(
courseId
,
userIds
,
course
.
getPersonnelType
());
//异常数据
if
(
userIds
==
null
||
userIds
.
size
()==
0
){
return
0
;
}
tTrainCourseMapper
.
insertUserCourse
(
courseId
,
userIds
,
course
.
getPersonnelType
());
course
.
setStatus
(
1
);
course
.
setReleaseTime
(
new
Date
());
return
tTrainCourseMapper
.
updateTTrainCourse
(
course
);
...
...
@@ -332,6 +336,16 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
return
tTrainUserCourseMapper
.
testPersonDetailByCourseId
(
courseId
);
}
/**
* 导出所有考试详细数据项
* @param courseId
* @return
*/
@Override
public
List
<
TTrainUserCourse
>
examDetails
(
Long
courseId
)
{
return
tTrainUserCourseMapper
.
examDetails
(
courseId
);
}
@Override
public
TTrainUserCourse
getUserCourse
(
Long
userCourseId
){
TTrainUserCourse
userCourse
=
tTrainUserCourseMapper
.
selectTTrainUserCourseById
(
userCourseId
);
...
...
danger-manage-system/src/main/resources/mapper/system/TContractorTrainResultMapper.xml
View file @
49ac7abd
...
...
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TContractorTrainResultMapper"
>
<resultMap
type=
"TContractorTrainResult"
id=
"TContractorTrainResultResult"
>
<result
property=
"resultId"
column=
"result_id"
/>
<result
property=
"beyondUnit"
column=
"beyond_unit"
/>
...
...
@@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectTContractorTrainResultList"
parameterType=
"TContractorTrainResult"
resultMap=
"TContractorTrainResultResult"
>
<include
refid=
"selectTContractorTrainResultVo"
/>
<where>
<where>
<if
test=
"beyondUnit != null and beyondUnit != ''"
>
and beyond_unit = #{beyondUnit}
</if>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"sex != null and sex != ''"
>
and sex = #{sex}
</if>
...
...
@@ -34,13 +34,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"score != null and score != ''"
>
and score = #{score}
</if>
<if
test=
"isQualified != null and isQualified != ''"
>
and is_qualified = #{isQualified}
</if>
</where>
order by result_id desc
</select>
<select
id=
"selectTContractorTrainResultById"
parameterType=
"Long"
resultMap=
"TContractorTrainResultResult"
>
<include
refid=
"selectTContractorTrainResultVo"
/>
where result_id = #{resultId}
</select>
<insert
id=
"insertTContractorTrainResult"
parameterType=
"TContractorTrainResult"
useGeneratedKeys=
"true"
keyProperty=
"resultId"
>
insert into t_contractor_train_result
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -94,9 +95,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete
id=
"deleteTContractorTrainResultByIds"
parameterType=
"String"
>
delete from t_contractor_train_result where result_id in
delete from t_contractor_train_result where result_id in
<foreach
item=
"resultId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{resultId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
</mapper>
danger-manage-system/src/main/resources/mapper/system/TStaffMapper.xml
View file @
49ac7abd
...
...
@@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where t.user_id = #{staffId}
</select>
<insert
id=
"insertTStaff"
parameterType=
"TStaff"
>
<insert
id=
"insertTStaff"
parameterType=
"TStaff"
useGeneratedKeys =
"true"
keyProperty =
"staffId"
>
insert into sys_user
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
user_staff,
...
...
danger-manage-system/src/main/resources/mapper/system/TStaningBookMapper.xml
View file @
49ac7abd
...
...
@@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"workId"
column=
"work_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createId"
column=
"create_id"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"deptName"
column=
"deptName"
/>
</resultMap>
...
...
@@ -57,9 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sys_dept d ON d.`dept_id` = b.`dept_id`
<where>
<foreach
collection=
"deptList"
item=
"deptId"
open=
"AND b.dept_id in ("
separator=
","
close=
")"
>
#{deptId}
</foreach>
<if
test=
"userId != null and userId != 0"
>
and (b.escalation=#{userId}||b.rectification = #{userId}||b.create_id = #{userId} )
</if>
<if
test=
"troubleName != null and troubleName != ''"
>
and b.trouble_name like concat('%', #{troubleName}, '%')
</if>
<if
test=
"findTime != null "
>
and b.find_time
>
#{findTime}
</if>
<if
test=
"rectificationTime != null "
>
and b.find_time
<
#{rectificationTime}
</if>
...
...
@@ -103,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"workId != null"
>
work_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createId != null"
>
create_id,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -134,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"workId != null"
>
#{workId},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createId != null"
>
#{createId},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
</trim>
</insert>
...
...
@@ -169,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"workId != null"
>
work_id = #{workId},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createId != null"
>
create_id = #{createId},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
</trim>
where book_id = #{bookId}
...
...
danger-manage-system/src/main/resources/mapper/system/TTrainUserCourseMapper.xml
View file @
49ac7abd
...
...
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TTrainUserCourseMapper"
>
<resultMap
type=
"TTrainUserCourse"
id=
"TTrainUserCourseResult"
>
<result
property=
"userCourseId"
column=
"user_course_id"
/>
<result
property=
"userId"
column=
"user_id"
/>
...
...
@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"finishDuration"
column=
"finish_duration"
/>
<result
property=
"trainState"
column=
"train_state"
/>
<result
property=
"states"
column=
"states"
/>
</resultMap>
<sql
id=
"selectTTrainUserCourseVo"
>
...
...
@@ -35,12 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createUser != null and createUser != ''"
>
and create_user = #{createUser}
</if>
</where>
</select>
<select
id=
"selectTTrainUserCourseById"
parameterType=
"Long"
resultMap=
"TTrainUserCourseResult"
>
<include
refid=
"selectTTrainUserCourseVo"
/>
where user_course_id = #{userCourseId}
</select>
<insert
id=
"insertTTrainUserCourse"
parameterType=
"TTrainUserCourse"
useGeneratedKeys=
"true"
keyProperty=
"userCourseId"
>
insert into t_train_user_course
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -91,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete
id=
"deleteTTrainUserCourseByIds"
parameterType=
"String"
>
delete from t_train_user_course where user_course_id in
delete from t_train_user_course where user_course_id in
<foreach
item=
"userCourseId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{userCourseId}
</foreach>
...
...
@@ -102,11 +103,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sys.staff_name,
d.dept_name,
train.examination_result,
train.state,train.examination_time
train.state,
train.examination_time
FROM
t_train_user_course train
LEFT JOIN sys_user sys ON train.user_id = sys.user_id
left join sys_dept d on sys.dept_id = d.dept_id
WHERE train.course_id = #{courseId}
</select>
<!--导出所有考试详细数据项-->
<select
id=
"examDetails"
parameterType=
"Long"
resultMap=
"TTrainUserCourseResult"
>
SELECT
sys.staff_name,
d.dept_name,
train.examination_result,
train.examination_result,
CASE
WHEN train.state = 0 THEN
'未考试'
WHEN train.state = 1 THEN
'未通过'
WHEN train.state = 2 THEN
'已通过'
END AS states ,
train.examination_time
FROM
t_train_user_course train
LEFT JOIN sys_user sys ON train.user_id = sys.user_id
left join sys_dept d on sys.dept_id = d.dept_id
WHERE train.course_id = #{courseId}
</select>
</mapper>
\ No newline at end of file
</mapper>
danger-manage-web/src/api/contractTrain/contractTrain.js
View file @
49ac7abd
/*
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-27 16:04:04
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-01-31 16:22:00
* @FilePath: /danger-manage-web/src/api/contractTrain/contractTrain.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
request
from
'@/utils/request'
// 查询承包商及访客培训列表
...
...
@@ -9,6 +17,7 @@ export function listCourse(query) {
})
}
// 查询承包商及访客培训详细
export
function
getCourse
(
contractorCourseId
)
{
return
request
({
...
...
danger-manage-web/src/api/educationPlanExam/lessonsProgram.js
View file @
49ac7abd
...
...
@@ -193,3 +193,12 @@ export function bachAddTopicGuest(data) {
data
:
data
})
}
export
function
exportDeviceInfo
(
query
)
{
return
request
({
url
:
'/system/course/examDetails'
,
method
:
'get'
,
params
:
query
})
}
danger-manage-web/src/components/FileUpload/index.vue
View file @
49ac7abd
This diff is collapsed.
Click to expand it.
danger-manage-web/src/components/PeopleChange/ChangPapelTable.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-19 15:23:58
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-21 16:56:26
* @LastEditTime: 202
3-02-01 17:24:30
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/Lesson-table.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -16,7 +16,10 @@
@
select-all=
"all"
ref=
"multipleTable"
>
<el-table-column
type=
"selection"
></el-table-column>
<el-table-column
v-if=
'!disabled'
type=
"selection"
></el-table-column>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"staffName"
>
</el-table-column>
<el-table-column
...
...
@@ -55,10 +58,14 @@ export default {
selectNameList
:
{
type
:
Array
,
},
disabled
:
{
type
:
Boolean
,
},
},
created
()
{
// this.listStaff();
},
data
()
{
return
{
queryParams
:
{
...
...
@@ -71,6 +78,9 @@ export default {
nameList
:
[],
loading
:
false
,
};
},
mounted
()
{
},
methods
:
{
listStaff
()
{
...
...
@@ -109,6 +119,11 @@ export default {
}
this
.
$emit
(
"selectAll"
,
this
.
nameList
,
allSelect
);
},
selectable
(
row
,
rowIndex
)
{
if
(
!
this
.
disabled
)
{
return
true
;
}
},
// 切换选项
toggleSelection
(
staffId
,
SeclctFlag
=
false
)
{
const
item
=
this
.
nameList
.
find
((
item
)
=>
{
...
...
danger-manage-web/src/components/PeopleChange/index.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-19 17:39:55
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-13 15:37:54
* @LastEditTime: 2023-0
2-02 10:56:52
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangePapel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -36,13 +36,14 @@
>
</el-input>
<div>
<el-button
@
click=
"searchTable"
size=
"mini"
>
搜索
</el-button>
<el-button
@
click=
"searchTable"
size=
"mini"
>
搜索
</el-button>
</div>
</div>
<div
class=
"left-middle-table"
>
<ChangPapelTable
ref=
"table"
:selectNameList
.
sync=
"selectNameList"
:disabled=
"disabled"
@
selectOne=
"selectOne"
@
selectAll=
"selectAll"
/>
...
...
@@ -60,7 +61,7 @@
:key=
"item.staffId"
>
<div>
{{
item
.
staffName
}}
</div>
<div
class=
"close"
@
click=
"deleteName(item.staffId)"
>
x
</div>
<div
class=
"close"
@
click=
"deleteName(item.staffId)"
>
x
</div>
</div>
</div>
<div
class=
"bottom-text"
>
已选择
{{
selectNameList
.
length
}}
人
</div>
...
...
@@ -83,6 +84,9 @@ export default {
type
:
String
,
default
:
null
,
},
disabled
:{
type
:
Boolean
,
}
},
data
()
{
return
{
...
...
@@ -143,6 +147,7 @@ export default {
this
.
$refs
.
table
.
listStaff
();
},
deleteName
(
staffId
)
{
if
(
this
.
disabled
)
return
;
const
index
=
this
.
selectNameList
.
findIndex
((
item
)
=>
{
return
item
.
staffId
==
staffId
;
});
...
...
danger-manage-web/src/utils/cesium/dangerArr.js
View file @
49ac7abd
...
...
@@ -7,7 +7,7 @@
// [114.07708709377842, 38.248960473114614],
// ],
// colorNum: 1,
// fxlb: "
高
风险区域",
// fxlb: "
重大
风险区域",
// bsjh: "",
// wxy: "锅炉操作",
// fxd: "锅炉点火",
...
...
@@ -145,7 +145,7 @@ export const dangerArr = [
[
114.08164030994841
,
38.25079994477491
],
],
data
:
{
fxlb
:
"较
高
风险"
fxlb
:
"较
大
风险"
},
colorNum
:
2
,
},
...
...
@@ -160,7 +160,7 @@ export const dangerArr = [
[
114.08037480953207
,
38.249932590119556
],
],
data
:
{
fxlb
:
"
高
风险"
,
fxlb
:
"
重大
风险"
,
src
:
[
jzyh
,
jzdhz
,
dxzd
,
dxxl
,
dxbz
,
bxdfdmj
],
},
colorNum
:
1
,
...
...
@@ -174,7 +174,7 @@ export const dangerArr = [
[
114.08098376391818
,
38.24951885572243
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -201,7 +201,7 @@ export const dangerArr = [
[
114.08000932886821
,
38.25149427805925
],
],
data
:
{
fxlb
:
"较
高
风险"
fxlb
:
"较
大
风险"
},
colorNum
:
2
,
},
...
...
@@ -215,7 +215,7 @@ export const dangerArr = [
[
114.07992247747968
,
38.2490596822873
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
},
{
...
...
@@ -240,7 +240,7 @@ export const dangerArr = [
[
114.07896214915758
,
38.2485657203445
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -253,7 +253,7 @@ export const dangerArr = [
[
114.07968503158452
,
38.249621022521914
],
],
data
:
{
fxlb
:
"较
高
风险"
fxlb
:
"较
大
风险"
},
colorNum
:
2
,
},
...
...
@@ -266,7 +266,7 @@ export const dangerArr = [
[
114.07932854865001
,
38.25049906057526
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -279,7 +279,7 @@ export const dangerArr = [
[
114.07929156270377
,
38.24989004286162
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -293,7 +293,7 @@ export const dangerArr = [
[
114.07818775308438
,
38.24904718615451
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
},
{
...
...
@@ -308,7 +308,7 @@ export const dangerArr = [
[
114.07822516569071
,
38.24873709204756
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
},
{
...
...
@@ -320,7 +320,7 @@ export const dangerArr = [
[
114.0778791617466
,
38.24978811628299
],
],
data
:
{
fxlb
:
"较
高
风险"
fxlb
:
"较
大
风险"
},
colorNum
:
2
,
},
...
...
@@ -334,7 +334,7 @@ export const dangerArr = [
[
114.07811902680491
,
38.25084109067064
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
},
{
...
...
@@ -346,7 +346,7 @@ export const dangerArr = [
[
114.07816939918499
,
38.250464604821424
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -362,7 +362,7 @@ export const dangerArr = [
[
114.07655032796976
,
38.24855692071795
],
],
data
:
{
fxlb
:
"较
高
风险"
fxlb
:
"较
大
风险"
},
},
{
...
...
@@ -375,7 +375,7 @@ export const dangerArr = [
[
114.07645852296761
,
38.249258052783055
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
},
{
...
...
@@ -387,7 +387,7 @@ export const dangerArr = [
[
114.07673177371679
,
38.24999869046041
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -400,7 +400,7 @@ export const dangerArr = [
[
114.07638572203807
,
38.250006593486276
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -413,7 +413,7 @@ export const dangerArr = [
[
114.0763611632972
,
38.2506105391965
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -440,7 +440,7 @@ export const dangerArr = [
[
114.07610863025666
,
38.249559594773935
],
],
data
:
{
fxlb
:
"较
高
风险"
fxlb
:
"较
大
风险"
},
},
{
...
...
@@ -452,7 +452,7 @@ export const dangerArr = [
[
114.07629629633044
,
38.249994075703896
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -479,7 +479,7 @@ export const dangerArr = [
[
114.07614690640786
,
38.250982027231906
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -492,7 +492,7 @@ export const dangerArr = [
[
114.07506815524074
,
38.24935807751058
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -505,7 +505,7 @@ export const dangerArr = [
[
114.07575424777615
,
38.25022009521355
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -518,7 +518,7 @@ export const dangerArr = [
[
114.07569321404614
,
38.25050557141559
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -531,7 +531,7 @@ export const dangerArr = [
[
114.07533109169464
,
38.25112532353275
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -544,7 +544,7 @@ export const dangerArr = [
[
114.07506400522227
,
38.2498509809399
],
],
data
:
{
fxlb
:
"较
高
风险"
fxlb
:
"较
大
风险"
},
colorNum
:
2
,
},
...
...
@@ -557,7 +557,7 @@ export const dangerArr = [
[
114.07507104315593
,
38.249669088954406
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -571,7 +571,7 @@ export const dangerArr = [
[
114.07329016901807
,
38.24975956466659
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
},
{
...
...
@@ -583,7 +583,7 @@ export const dangerArr = [
[
114.07449942174725
,
38.25005976641145
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
@@ -596,7 +596,7 @@ export const dangerArr = [
[
114.07409377782558
,
38.25057015884229
],
],
data
:
{
fxlb
:
"
高
风险"
fxlb
:
"
重大
风险"
},
colorNum
:
1
,
},
...
...
danger-manage-web/src/views/dangerScale/profile/DangerTips.vue
0 → 100644
View file @
49ac7abd
<!--
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2023-02-01 09:37:02
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-02-01 09:59:55
* @FilePath: /danger-manage-web/src/views/dangerScale/profile/tiops.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div
class=
"danger-tips"
>
<!--
<div>
管道压力
</div>
-->
<div
class=
"hasColorBox"
:style=
"
{ color: dangerColor['1'] }">
<div
:style=
"
{ backgroundColor: dangerColor['1'] }">
</div>
<span>
重大风险
</span>
</div>
<div
class=
"hasColorBox"
:style=
"
{ color: dangerColor[`2`] }">
<div
:style=
"
{ backgroundColor: dangerColor[`2`] }">
</div>
<span>
较大风险
</span>
</div>
<div
class=
"hasColorBox"
:style=
"
{ color: dangerColor[`3`] }">
<div
:style=
"
{ backgroundColor: dangerColor[`3`] }">
</div>
<span>
一般风险
</span>
</div>
<div
class=
"hasColorBox"
:style=
"
{ color: dangerColor[`4`] }">
<div
:style=
"
{ backgroundColor: dangerColor[`4`] }">
</div>
<span>
低风险
</span>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
""
,
data
()
{
return
{
dangerColor
:
{
1
:
"red"
,
2
:
"orange"
,
3
:
"yellow"
,
4
:
"blue"
,
},
};
},
methods
:
{},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.danger-tips
{
position
:
absolute
;
color
:
#fff
;
left
:
10px
;
top
:
10px
;
padding
:
1px
;
padding-left
:
10px
;
width
:
150px
;
// background: rgba(6, 29, 51, 0.2);
.hasColorBox
{
// border: 1px solid #053b6a;
padding
:
2px
5px
;
margin-bottom
:
5px
;
position
:relative
;
&
>
div
{
display
:
inline-block
;
width
:
50px
;
height
:
20px
;
margin-right
:
10px
;
}
&
>
span
{
position
:absolute
;
display
:
inline-block
;
width
:
100px
;
}
}
}
</
style
>
danger-manage-web/src/views/dangerScale/profile/index.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-16 15:03:40
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-10-22 10:39:48
* @LastEditTime: 202
3-02-01 09:48:47
* @FilePath: /danger-manage-web/src/views/bigwindow/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -20,13 +20,14 @@
>
</div>
-->
<div
id=
"mapbox"
></div>
<DangerTips
/>
</div>
</
template
>
<
script
>
import
CreateCesium
,
{
DEVICE_PIC_TYPE
}
from
"@/utils/cesium/cesiumClass.js"
;
import
{
dangerArr
}
from
"@/utils/cesium/dangerArr.js"
;
import
DangerTips
from
"./DangerTips.vue"
;
import
Video
from
"@/components/bigWindow/video"
;
import
Null
from
"@/components/bigWindow/Null"
;
import
Danger
from
"@/components/bigWindow/Danger"
;
...
...
@@ -42,6 +43,7 @@ export default {
name
:
"profile"
,
components
:
{
Editor
,
DangerTips
,
},
data
()
{
return
{
...
...
@@ -249,6 +251,7 @@ export default {
<
style
lang=
"scss"
scoped
>
.big-window
{
width
:
100%
;
position
:relative
;
// height: calc(100vh - 84px);
height
:
calc
(
100vh
-
50px
);
#mapbox
{
...
...
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/AddQuestion.vue
View file @
49ac7abd
...
...
@@ -11,9 +11,15 @@
size=
"mini"
@
input=
"topicTypeChange"
>
<el-radio-button
:label=
"1"
>
单选
</el-radio-button>
<el-radio-button
:label=
"2"
>
多选
</el-radio-button>
<el-radio-button
:label=
"3"
>
判断
</el-radio-button>
<el-radio-button
:disabled=
"checkLock"
:label=
"1"
>
单选
</el-radio-button
>
<el-radio-button
:disabled=
"checkLock"
:label=
"2"
>
多选
</el-radio-button
>
<el-radio-button
:disabled=
"checkLock"
:label=
"3"
>
判断
</el-radio-button
>
</el-radio-group>
</div>
...
...
@@ -29,7 +35,7 @@
:rules=
"
{
required: true,
message: '必须输入题目内容',
trigger:
'blur'
,
trigger:
['blur', 'change']
,
}"
>
<el-input
...
...
@@ -38,6 +44,7 @@
resize=
"none"
rows=
"4"
v-model=
"form.topicTitle"
:disabled=
"checkLock"
>
</el-input>
</el-form-item>
...
...
@@ -55,7 +62,7 @@
:rules=
"
{
required: true,
message: '选项内容不能为空不能为空',
trigger:
'change'
,
trigger:
['blur', 'change']
,
}"
>
<div
class=
"add-select flex"
>
...
...
@@ -65,6 +72,7 @@
style=
"flex: 1; margin-right: 10px"
rows=
"2"
v-model=
"question.value"
:disabled=
"checkLock"
></el-input>
<div
class=
"flex algin-items"
>
<div
...
...
@@ -79,8 +87,9 @@
<el-button
size=
"mini"
type=
"danger"
v-if=
"index > 0"
v-if=
"index > 0
&& form.topicType != 3
"
@
click
.
prevent=
"removeDomain(question)"
:disabled=
"checkLock"
>
删除
</el-button
>
</div>
...
...
@@ -111,7 +120,11 @@
设为正确答案
</div>
-->
<div
style=
"padding-left: 30px"
v-if=
"form.topicType != 3"
>
<el-button
size=
"mini"
type=
"primary"
@
click
.
prevent=
"add(addValue)"
<el-button
size=
"mini"
:disabled=
"checkLock"
type=
"primary"
@
click
.
prevent=
"add(addValue)"
>
新增选项
</el-button
>
</div>
...
...
@@ -146,6 +159,10 @@ export default {
topicId
:
{
type
:
Number
,
},
// 如果是查看,就禁止修改
checkLock
:
{
type
:
Boolean
,
},
},
components
:
{},
data
()
{
...
...
@@ -171,7 +188,7 @@ export default {
console
.
log
(
res
.
data
);
const
data
=
res
.
data
;
this
.
form
=
{
topicType
:
data
.
topicType
,
topicType
:
data
.
topicType
,
topicTitle
:
data
.
topicTitle
,
questions
:
JSON
.
parse
(
data
.
topicOption
),
};
...
...
@@ -232,6 +249,7 @@ export default {
}
},
rightAnswerClick
(
index
)
{
if
(
this
.
checkLock
)
return
;
if
(
this
.
form
.
topicType
===
2
)
{
const
ind
=
this
.
answerNum
.
indexOf
(
index
);
if
(
ind
<
0
)
{
...
...
@@ -250,6 +268,8 @@ export default {
},
// 删除选项
removeDomain
(
question
)
{
if
(
this
.
checkLock
)
return
;
const
index
=
this
.
form
.
questions
.
indexOf
(
question
);
console
.
log
(
index
);
// 如果是正确答案,就让正确答案清空
...
...
@@ -279,7 +299,7 @@ export default {
},
save
(
num
=
2
)
{
return
new
Promise
((
resove
)
=>
{
if
(
this
.
answerNum
.
length
<=
0
)
{
if
(
this
.
answerNum
.
length
<=
0
)
{
this
.
$message
({
message
:
"警告,请设置一个正确答案"
,
type
:
"warning"
,
...
...
@@ -292,8 +312,8 @@ export default {
data
.
topicTitle
=
this
.
form
.
topicTitle
;
data
.
topicOption
=
JSON
.
stringify
(
this
.
form
.
questions
);
data
.
answer
=
JSON
.
stringify
(
this
.
answerNum
);
data
.
topicType
=
this
.
form
.
topicType
;
console
.
log
(
data
)
data
.
topicType
=
this
.
form
.
topicType
;
console
.
log
(
data
)
;
this
.
addQuestion
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
// 把修改的这个归位,变成正常添加
...
...
@@ -323,7 +343,7 @@ export default {
});
},
reset
()
{
const
topicType
=
this
.
form
.
topicType
const
topicType
=
this
.
form
.
topicType
;
this
.
form
=
{
topicType
,
topicTitle
:
""
,
...
...
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/ChangeQuestion.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-27 09:30:19
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-28 10:29:18
* @LastEditTime: 202
3-02-01 16:15:10
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -193,7 +193,8 @@ export default {
this
.
loading
=
false
;
});
},
saveAndNext
()
{
save
(
num
=
2
)
{
const
topicInfos
=
this
.
list
.
filter
((
item
)
=>
item
.
checked
)
.
map
((
item
)
=>
{
...
...
@@ -202,18 +203,20 @@ export default {
quan
:
item
.
changeNum
,
};
});
console
.
log
(
this
.
courseId
,
topicInfos
);
const
data
=
{
courseId
:
this
.
courseId
,
topicInfos
};
console
.
log
(
data
);
bachAddTopic
(
data
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
200
)
{
this
.
$parent
.
$parent
.
componentsNumChange
(
2
);
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
$parent
.
getList
();
}
});
},
saveAndNext
(){
this
.
save
(
3
)
},
resetClick
()
{},
search
()
{
this
.
getList
();
...
...
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/Dia.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:38:49
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-13 15:59:47
* @LastEditTime: 2023-0
2-01 16:16:44
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/addLesson.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -24,6 +24,7 @@
:is=
"currentComponent"
:courseId
.
sync=
"courseId"
:topicId
.
sync=
"topicId"
:checkLock=
"checkLock"
ref=
"current"
></component>
</transition>
...
...
@@ -32,27 +33,31 @@
<QuestionList/>
-->
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
v-if=
"!checkLock"
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 2"
v-if=
"this.componentsNum == 2
&& !checkLock
"
@
click=
"componentsNumChange(4)"
>
从题库选择
</el-button
>
<el-button
type=
"primary"
v-if=
"this.componentsNum ==
1 || this.componentsNum ==
3"
@
click=
"
save
"
>
保存
</el-button
v-if=
"this.componentsNum ==
4 ||this.componentsNum==
3"
@
click=
"
componentsNumChange(2)
"
>
返回题目列表
</el-button
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 4"
@
click=
"componentsNumChange(2)"
>
返回题目列表
</el-button
v-if=
"
this.componentsNum == 1 ||
this.componentsNum == 3 ||
this.componentsNum == 4
"
@
click=
"save"
>
保存
</el-button
>
<el-button
type=
"primary"
@
click=
"saveAndNext"
>
{{
<el-button
type=
"primary"
@
click=
"saveAndNext"
v-if=
"!checkLock"
>
{{
saveNextText
}}
</el-button>
<el-button
...
...
@@ -63,6 +68,16 @@
>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
v-else
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 3 && checkLock"
@
click=
"componentsNumChange(2)"
>
返回题目列表
</el-button
>
<el-button
type=
"primary"
@
click=
"dialogCancel"
>
{{
"确认"
}}
</el-button>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
</el-dialog>
</
template
>
...
...
@@ -72,7 +87,6 @@ import AddQuestion from "./AddQuestion";
import
QuestionList
from
"./QuestionList"
;
import
ChangeQuestion
from
"./ChangeQuestion"
;
export
default
{
name
:
"AnswerLesson"
,
props
:
{
...
...
@@ -87,6 +101,9 @@ export default {
courseId
:
{
type
:
Number
,
},
checkLock
:
{
type
:
Boolean
,
},
},
// components: {
// Lesson,
...
...
@@ -116,14 +133,14 @@ export default {
this
.
currentComponent
=
QuestionList
;
this
.
title
=
"题目列表"
;
}
else
if
(
num
===
3
)
{
}
else
if
(
num
===
3
)
{
this
.
currentComponent
=
AddQuestion
;
if
(
this
.
topicId
)
{
this
.
title
=
"修改题目"
;
}
else
{
this
.
title
=
"新增题目"
;
}
}
else
if
(
num
==
4
)
{
}
else
if
(
num
==
4
)
{
this
.
currentComponent
=
ChangeQuestion
;
this
.
title
=
"从题库选题"
;
}
...
...
@@ -167,6 +184,8 @@ export default {
this
.
topicId
=
null
;
}
this
.
$emit
(
"update:visible"
,
false
);
// 关闭的时候归位
this
.
$emit
(
"update:checkLock"
,
false
);
},
// 把ID改变了
changeCourseId
(
courseId
)
{
...
...
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/Lesson.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:59:44
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-04 17:47:53
* @LastEditTime: 2023-0
2-01 15:21:15
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/Lession.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -17,34 +17,33 @@
>
<div
class=
"top flex"
>
<el-form-item
label=
"课程标题"
prop=
"courseName"
>
<el-input
style=
"width: 400px"
v-model=
"form.courseName"
></el-input>
<el-input
style=
"width: 400px"
v-model=
"form.courseName"
:disabled=
"checkLock"
></el-input>
</el-form-item>
<!--
<el-form-item
label=
"培训计划"
prop=
"courseType"
>
-->
<!--
<el-select-->
<!--v-model="form.courseType"-->
<!--placeholder="请选择培训计划"-->
<!--clearable-->
<!--size="small"-->
<!-->-->
<!--
<el-option-->
<!--v-for="course in courseOptions"-->
<!--:key="course.planId"-->
<!--:label="course.planName"-->
<!--:value="course.planId"-->
<!--/>-->
<!--
</el-select>
-->
<!--
<el-select-->
<!--v-model="form.courseType"-->
<!--placeholder="请选择培训计划"-->
<!--clearable-->
<!--size="small"-->
<!-->-->
<!--
<el-option-->
<!--v-for="course in courseOptions"-->
<!--:key="course.planId"-->
<!--:label="course.planName"-->
<!--:value="course.planId"-->
<!--/>-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
</div>
<div
class=
"flex"
>
<el-form-item
label=
"培训计划"
prop=
"courseType"
>
<el-select
v-model=
"form.courseType"
placeholder=
"请选择培训计划"
clearable
size=
"small"
:disabled=
"checkLock"
>
<el-option
v-for=
"course in courseOptions"
...
...
@@ -54,8 +53,18 @@
/>
</el-select>
</el-form-item>
<el-form-item
label=
"培训时长"
prop=
"duration"
style=
"margin-left: 55px"
>
<el-input
style=
"width: 220px"
placeholder=
"分钟"
type=
"number"
v-model=
"form.duration"
></el-input>
<el-form-item
label=
"培训时长"
prop=
"duration"
style=
"margin-left: 55px"
>
<el-input
style=
"width: 220px"
placeholder=
"分钟"
type=
"number"
v-model=
"form.duration"
:disabled=
"checkLock"
></el-input>
</el-form-item>
</div>
<div
class=
"flex"
>
...
...
@@ -67,6 +76,7 @@
type=
"datetime"
placeholder=
"选择日期时间"
default-time=
"00:00:00"
:disabled=
"checkLock"
/>
</el-form-item>
<el-form-item
label=
"结束时间"
prop=
"testEndTime"
>
...
...
@@ -76,12 +86,13 @@
type=
"datetime"
placeholder=
"选择日期时间"
default-time=
"00:00:00"
:disabled=
"checkLock"
/>
</el-form-item>
</div>
<!--
</div>
-->
<el-form-item
label=
"课程内容"
prop=
"courseConent"
>
<Editor
v-model=
"form.courseConent"
:min-height=
"192"
/>
<Editor
v-model=
"form.courseConent"
:min-height=
"192"
:readOnly=
"checkLock"
/>
<el-input
v-show=
"false"
disabled
...
...
@@ -90,7 +101,7 @@
</el-form-item>
<div
class=
"flex"
>
<el-form-item
label=
"视频上传"
v-if=
"!readOnly"
prop=
"video"
>
<el-form-item
label=
"视频上传"
v-if=
"!readOnly"
prop=
"video"
>
<FileUpload
listType=
"picture"
@
resFun=
"getFileInfoVideo"
...
...
@@ -98,6 +109,7 @@
:fileArr=
"fileListVideo"
:fileSize=
"500"
:fileType=
"['mp4']"
:disabled=
"checkLock"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.video"
></el-input>
</el-form-item>
...
...
@@ -108,6 +120,7 @@
@
remove=
"listRemoveFile"
:fileArr=
"fileListFile"
:fileType=
"fileType"
:disabled=
"checkLock"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.enclosure"
></el-input>
</el-form-item>
...
...
@@ -133,6 +146,9 @@ export default {
courseId
:
{
type
:
Number
,
},
checkLock
:{
type
:
Boolean
,
}
},
components
:
{
Editor
,
...
...
@@ -204,8 +220,16 @@ export default {
getLessonById
(
this
.
courseId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
const
data
=
res
.
data
;
const
{
courseName
,
courseType
,
courseConent
,
video
,
enclosure
,
duration
,
testStartTime
,
testEndTime
}
=
data
;
const
{
courseName
,
courseType
,
courseConent
,
video
,
enclosure
,
duration
,
testStartTime
,
testEndTime
,
}
=
data
;
this
.
form
=
{
courseName
,
courseType
,
...
...
@@ -214,21 +238,22 @@ export default {
enclosure
,
duration
,
testStartTime
,
testEndTime
testEndTime
,
};
this
.
fileListVideo
=
[
console
.
log
(
'video'
,
video
)
this
.
fileListVideo
=
video
?
[
{
name
:
courseName
+
"视频"
,
url
:
uploadfile
,
},
];
]
:[]
;
this
.
fileListFile
=
[
{
name
:
courseName
+
"附件"
,
url
:
uploadfile
,
},
];
console
.
log
(
"--"
,
this
.
fileListFile
);
console
.
log
(
"--"
,
this
.
fileListFile
);
}
});
},
...
...
@@ -280,14 +305,18 @@ export default {
message
:
"保存课程成功"
,
type
:
"success"
,
});
// 隐藏dia
this
.
$parent
.
$parent
.
dialogCancel
()
}
else
if
(
num
==
3
)
{
this
.
$message
({
message
:
"保存课程成功,请开始录入题目"
,
type
:
"success"
,
});
// 跳转动态路由,并且把ID改变添加用
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
changeCourseId
(
courseId
);
}
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
changeCourseId
(
courseId
);
this
.
$parent
.
$parent
.
$parent
.
getList
();
return
true
;
...
...
@@ -307,7 +336,7 @@ export default {
.form-wrapper
{
padding-top
:
22px
;
width
:
100%
;
height
:
6
5
0px
;
height
:
6
8
0px
;
overflow
:
hidden
;
// padding-bottom: 10px;
margin-bottom
:
20px
;
...
...
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/QuestionList.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 17:56:05
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-31 14:03:36
* @LastEditTime: 2023-0
2-02 10:05:15
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/QuestionList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -71,12 +71,21 @@
<div
class=
"right"
>
<div>
<el-button
v-if=
"!checkLock"
@
click=
"edit(item.topicId)"
icon=
"el-icon-edit"
type=
"text"
>
修改
</el-button
>
<el-button
v-if=
"checkLock"
@
click=
"edit(item.topicId)"
icon=
"el-icon-edit"
type=
"text"
>
查看
</el-button
>
<el-button
v-if=
"!checkLock"
@
click=
"deleteLesson(item.topicId)"
icon=
"el-icon-delete"
type=
"text"
...
...
@@ -98,6 +107,7 @@
v-model=
"bottomFrom.singleChoiceScore"
style=
"width: 50px"
size=
"mini"
:disabled=
"checkLock"
></el-input>
</div>
<div>
分
</div>
...
...
@@ -109,6 +119,7 @@
v-model=
"bottomFrom.multipleChoiceScore"
style=
"width: 50px"
size=
"mini"
:disabled=
"checkLock"
></el-input>
</div>
<div>
分
</div>
...
...
@@ -121,6 +132,7 @@
v-model=
"bottomFrom.judgmentScore"
style=
"width: 50px"
size=
"mini"
:disabled=
"checkLock"
></el-input>
</div>
<div>
分
</div>
...
...
@@ -133,6 +145,7 @@
v-model=
"bottomFrom.qualifiedNum"
style=
"width: 60px"
size=
"mini"
:disabled=
"checkLock"
></el-input>
</div>
<div>
为合格
</div>
...
...
@@ -144,6 +157,7 @@
icon=
"el-icon-check"
size=
"mini"
type=
"success"
:disabled=
"checkLock"
>
保存
</el-button
>
</div>
...
...
@@ -164,6 +178,9 @@ export default {
courseId
:
{
type
:
Number
,
},
checkLock
:
{
type
:
Boolean
,
},
},
components
:
{},
data
()
{
...
...
danger-manage-web/src/views/educationPlanExam/lessonsProgram/index.vue
View file @
49ac7abd
...
...
@@ -131,11 +131,13 @@
prop=
"topicNum"
width=
"180"
>
<
template
v-slot=
"{ row: { topicNum, courseId } }"
>
<div
@
click=
"checkQuestion(courseId)"
class=
"timuNum"
>
<div
v-if=
"topicNum > 0"
>
{{
`已录入${topicNum
}
题`
}}
<
/div
>
<
div
v
-
else
>
未录入
<
/div
>
<
/div
>
<
template
v-slot=
"{ row: { topicNum, courseId, status } }"
>
<span
@
click=
"checkQuestion(courseId, status)"
class=
"timuNum"
>
<span
v-if=
"topicNum > 0"
>
{{
status
==
0
?
`已录入${topicNum
}
题`
:
"查看"
}}
<
/span
>
<
span
v
-
else
>
未录入
<
/span
>
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
...
...
@@ -153,6 +155,14 @@
@
click
=
"changeLesson(courseId)"
>
修改
<
/el-butto
n
>
<
el
-
button
v
-
if
=
"status == 1"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"checkLesson(courseId)"
>
详情
<
/el-butto
n
>
<
el
-
button
size
=
"mini"
type
=
"text"
...
...
@@ -165,7 +175,7 @@
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"issue
Lesson
(courseId)"
@
click
=
"issue
Dilog
(courseId)"
>
发布
<
/el-butto
n
>
<
/template
>
...
...
@@ -183,18 +193,68 @@
ref
=
"Dia"
:
componentsNum
.
sync
=
"componentsNum"
:
courseId
.
sync
=
"courseId"
:
checkLock
.
sync
=
"checkLock"
:
visible
.
sync
=
"dilogFlag"
/>
<
el
-
dialog
title
=
"发布详情"
:
visible
.
sync
=
"issueVisible"
width
=
"60%"
>
<
div
class
=
"detail flex"
>
<
div
class
=
"detail-item"
>
单选题
<
span
>
{{
bottomFrom
.
singleChoiceScore
}}
<
/spa
n
>
分
/
题
,
共
<
span
>
{{
danxs
}}
<
/spa
n
>
题,计
<
span
class
=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
多选题
<
span
>
{{
bottomFrom
.
multipleChoiceScore
}}
<
/spa
n
>
分
/
题
,
共
<
span
>
{{
duoxs
}}
<
/span> 题,计<span class="textC">{{
duoxs
*
bottomFrom
.
multipleChoiceScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
判断提
<
span
>
{{
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
/题,共<span>{{ pds
}}
</
span
>
题,计
<
span
class
=
"textC"
>
{{
pds
*
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
合格分数为
<
span
class
=
"textC"
>
{{
bottomFrom
.
qualifiedNum
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
一共
<
span
>
{{
danxs
+
duoxs
+
pds
}}
<
/spa
n
>
道题,总共计
<
span
class
=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
+
duoxs
*
bottomFrom
.
multipleChoiceScore
+
pds
*
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
分
<
/div
>
<
/div
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"issueVisible = false"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"issueLesson(issueCourseId)"
>
确认发布
<
/el-butto
n
>
<
/span
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
getQuestion
,
getLessons
,
getLessonById
,
issue
,
deleteLesson
,
}
from
"@/api/educationPlanExam/lessonsProgram.js"
;
// 获取培训计划
import
{
getPlanList
}
from
"@/api/educationPlanExam/trainingProgram"
;
import
{
mapGetters
,
mapMutations
}
from
"vuex"
;
...
...
@@ -222,18 +282,39 @@ export default {
courseName
:
null
,
releaseTime
:
""
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
dilogFlag
:
false
,
// 发布弹框
issueVisible
:
false
,
bottomFrom
:
{
singleChoiceScore
:
0
,
multipleChoiceScore
:
0
,
judgmentScore
:
0
,
qualifiedNum
:
0
,
}
,
issueCourseId
:
null
,
questionList
:
[],
componentsNum
:
1
,
// 点击的id,如果是新增为空
courseId
:
null
,
// false为编辑,true为查看,查看不允许编辑的时候
checkLock
:
false
,
}
;
}
,
computed
:
{
...
mapGetters
([
"courseOptions"
]),
danxs
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
1
).
length
;
}
,
duoxs
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
2
).
length
;
}
,
pds
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
3
).
length
;
}
,
}
,
created
()
{
this
.
getPlanList
();
...
...
@@ -275,21 +356,34 @@ export default {
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
checkLock
=
false
;
this
.
$refs
.
Dia
.
title
=
"新增培训课程"
;
this
.
componentsNum
=
1
;
this
.
courseId
=
null
;
this
.
dilogFlag
=
true
;
}
,
changeLesson
(
courseId
)
{
this
.
checkLock
=
false
;
this
.
$refs
.
Dia
.
title
=
"修改培训课程"
;
this
.
componentsNum
=
1
;
this
.
courseId
=
courseId
;
this
.
dilogFlag
=
true
;
}
,
checkLesson
(
courseId
)
{
this
.
checkLock
=
true
;
this
.
$refs
.
Dia
.
title
=
"查看培训课程"
;
this
.
componentsNum
=
1
;
this
.
courseId
=
courseId
;
this
.
dilogFlag
=
true
;
}
,
// 直接查看考题
checkQuestion
(
courseId
)
{
checkQuestion
(
courseId
,
status
)
{
// 要查看考题的id
if
(
status
==
1
)
{
this
.
checkLock
=
true
;
}
this
.
courseId
=
courseId
;
console
.
log
(
this
.
courseId
);
// 2代表列表组件
...
...
@@ -331,9 +425,39 @@ export default {
}
)
.
catch
(()
=>
{
}
);
}
,
// 发布弹框
issueDilog
(
courseId
)
{
getQuestion
({
courseId
}
)
.
then
((
res
)
=>
{
this
.
questionList
=
res
.
rows
.
map
((
item
)
=>
{
return
{
topicType
:
item
.
topicType
,
topicId
:
item
.
topicId
,
topicTitle
:
item
.
topicTitle
,
}
;
}
);
}
)
.
then
((
res
)
=>
{
return
getLessonById
(
courseId
);
}
)
.
then
((
res
)
=>
{
this
.
bottomFrom
=
{
singleChoiceScore
:
res
.
data
.
singleChoiceScore
,
multipleChoiceScore
:
res
.
data
.
multipleChoiceScore
,
judgmentScore
:
res
.
data
.
judgmentScore
,
qualifiedNum
:
res
.
data
.
qualifiedNum
,
}
;
}
)
.
then
((
res
)
=>
{
this
.
issueVisible
=
true
;
this
.
issueCourseId
=
courseId
;
}
);
//
}
,
// 发布
issueLesson
(
courseId
)
{
this
.
$confirm
(
"
请确定发布
"
,
{
this
.
$confirm
(
"
确定要发布吗
"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
...
...
@@ -343,14 +467,14 @@ export default {
return
getLessonById
(
courseId
);
}
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
singleChoiceScore
>
0
&&
res
.
data
.
multipleChoiceScore
>
0
&&
res
.
data
.
judgmentScore
>
0
&&
res
.
data
.
qualifiedNum
>
0
)
{
return
true
;
}
//
if (
// res.data.singleChoiceScore >=
0 &&
// res.data.multipleChoiceScore >=
0 &&
// res.data.judgmentScore >=
0 &&
// res.data.qualifiedNum >=
0
//
)
{
return
true
;
//
}
}
)
.
then
((
res
)
=>
{
if
(
res
)
{
...
...
@@ -370,6 +494,7 @@ export default {
type
:
"success"
,
}
);
this
.
getList
();
this
.
issueVisible
=
false
;
}
}
)
.
catch
(()
=>
{
}
);
...
...
@@ -469,4 +594,17 @@ export default {
::
v
-
deep
.
el
-
dialog
{
margin
-
top
:
15
vh
!
important
;
}
.
detail
{
// position: absolute;
// bottom: -20px;
// left: 10px;
.
textC
{
font
-
weight
:
800
;
font
-
size
:
18
px
;
}
.
detail
-
item
{
margin
-
right
:
20
px
;
color
:
red
;
}
}
<
/style
>
danger-manage-web/src/views/educationPlanExam/myLessons/CheckLesson/index.vue
View file @
49ac7abd
...
...
@@ -305,6 +305,12 @@ export default {
};
xhr
.
send
();
},
openXslx
(
url
,
name
)
{
// window.open(`https://view.xdocin.com/view?src=${url}`);
console
.
log
(
url
)
this
.
ky
=
`https://view.xdocin.com/view?src=
${
url
}
`
;
this
.
iframeVisible
=
true
;
},
},
};
</
script
>
...
...
danger-manage-web/src/views/educationPlanExam/questionBank/components/AddQuestion.vue
View file @
49ac7abd
...
...
@@ -81,7 +81,7 @@
<el-button
size=
"mini"
type=
"danger"
v-if=
"index > 0"
v-if=
"index > 0
&& form.topicType != 3
"
@
click
.
prevent=
"removeDomain(question)"
>
删除
</el-button
>
...
...
danger-manage-web/src/views/educationPlanExam/testStat/index.vue
View file @
49ac7abd
...
...
@@ -60,22 +60,22 @@
<el-table-column
label=
"应参加人数"
align=
"center"
prop=
"count"
/>
<el-table-column
label=
"实际考试人数"
align=
"center"
prop=
"test"
/>
<el-table-column
label=
"合格人数"
align=
"center"
prop=
"pass"
/>
<el-table-column
label=
"合格率"
align=
"center"
prop=
"rate"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
rate
}}
%
</
template
>
</el-table-column
>
<!-- <el-table-column label="合格率" align="center" prop="rate">--
>
<!-- <template slot-scope="scope">--
>
<!-- {{scope.row.rate}}%-->
<!-- </template>--
>
<!-- </el-table-column>--
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
v-slot=
"{ row: { courseId
}
}"
>
<
template
v-slot=
"{ row: { courseId
,courseName}
}"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"courseDetail(courseId)"
@
click=
"courseDetail(courseId
,courseName
)"
>
查看详情
</el-button>
</
template
>
</el-table-column>
...
...
@@ -89,13 +89,33 @@
/>
<!--考试详情 -->
<el-dialog
title=
"考试详情"
:visible
.
sync=
"testStatDetailOpen"
append-to-body
:close-on-click-modal=
"false"
>
<el-dialog
:title=
"'考试详情:'+courseName"
:visible
.
sync=
"testStatDetailOpen"
append-to-body
:close-on-click-modal=
"false"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
style=
"position: relative;left: 16px;top: -17px;"
>
导出
</el-button>
<el-table
v-loading=
"loading"
:data=
"testStatDetailData"
>
<el-table-column
label=
"序号"
width=
'100'
align=
"center"
prop=
"detailNum"
/>
<el-table-column
label=
"考试人员"
align=
"center"
prop=
"staffName"
/>
<el-table-column
label=
"所属部门"
align=
"center"
prop=
"deptName"
/>
<el-table-column
label=
"考试时间"
align=
"center"
prop=
"examinationTime"
/>
<el-table-column
label=
"答对个数"
align=
"center"
prop=
"examinationResult"
/>
<el-table-column
label=
"所属部门"
align=
"center"
prop=
"deptName"
>
<span
slot-scope=
"scope"
v-if=
"scope.row.deptName"
>
{{scope.row.deptName}}
</span>
<span
v-else
>
-
</span>
</el-table-column>
<el-table-column
label=
"考试时间"
align=
"center"
prop=
"examinationTime"
>
<span
slot-scope=
"scope"
v-if=
"scope.row.examinationTime"
>
{{scope.row.examinationTime}}
</span>
<span
v-else
>
-
</span>
</el-table-column>
<el-table-column
label=
"得分"
align=
"center"
prop=
"examinationResult"
>
<span
slot-scope=
"scope"
v-if=
"scope.row.examinationResult"
>
{{scope.row.examinationResult}}
</span>
<span
v-else
>
-
</span>
</el-table-column>
<el-table-column
label=
"考试结果"
align=
"center"
prop=
"state"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.state == 0"
>
未考试
</span>
...
...
@@ -104,6 +124,7 @@
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"totalDetail > 0"
:total=
"totalDetail"
...
...
@@ -116,7 +137,7 @@
</template>
<
script
>
import
{
statisticsTrainCourse
,
testPersonDetailByCourseId
}
from
"@/api/educationPlanExam/lessonsProgram.js"
;
import
{
statisticsTrainCourse
,
testPersonDetailByCourseId
,
exportDeviceInfo
}
from
"@/api/educationPlanExam/lessonsProgram.js"
;
export
default
{
name
:
"testStat"
,
data
(){
...
...
@@ -126,6 +147,7 @@
// 总条数
total
:
0
,
releaseTime
:
""
,
courseName
:
""
,
queryParams
:{
pageNum
:
1
,
pageSize
:
10
,
...
...
@@ -134,6 +156,8 @@
releaseTimeBegin
:
""
,
releaseTimeEnd
:
""
},
// 导出遮罩层
exportLoading
:
false
,
testStatData
:[],
testStatDetailOpen
:
false
,
testStatDetailData
:
[],
...
...
@@ -141,7 +165,7 @@
queryDetailParams
:{
pageNum
:
1
,
pageSize
:
10
,
courseId
:
""
courseId
:
0
}
}
},
...
...
@@ -149,6 +173,20 @@
this
.
getTestList
();
},
methods
:
{
/** 导出按钮操作 */
handleExport
()
{
this
.
$confirm
(
'是否确认导出所有考试详细数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportDeviceInfo
(
this
.
queryDetailParams
);
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
getTestList
(){
console
.
log
(
"this.queryParams:"
,
this
.
queryParams
)
statisticsTrainCourse
(
this
.
queryParams
).
then
(
res
=>
{
...
...
@@ -185,8 +223,10 @@
};
this
.
getTestList
();
},
courseDetail
(
courseId
){
courseDetail
(
courseId
,
courseName
){
this
.
testStatDetailOpen
=
true
;
this
.
courseName
=
courseName
;
this
.
queryDetailParams
.
courseId
=
courseId
;
this
.
getTestStatDetails
(
courseId
);
},
getTestStatDetails
(
courseId
){
...
...
danger-manage-web/src/views/educationPlanExam/textPaper/components/AddQuestion.vue
View file @
49ac7abd
...
...
@@ -11,9 +11,15 @@
size=
"mini"
@
input=
"topicTypeChange"
>
<el-radio-button
:label=
"1"
>
单选
</el-radio-button>
<el-radio-button
:label=
"2"
>
多选
</el-radio-button>
<el-radio-button
:label=
"3"
>
判断
</el-radio-button>
<el-radio-button
:disabled=
"checkLock"
:label=
"1"
>
单选
</el-radio-button
>
<el-radio-button
:disabled=
"checkLock"
:label=
"2"
>
多选
</el-radio-button
>
<el-radio-button
:disabled=
"checkLock"
:label=
"3"
>
判断
</el-radio-button
>
</el-radio-group>
</div>
<div
class=
"right"
>
{{
courseName
}}
</div>
...
...
@@ -28,7 +34,7 @@
:rules=
"
{
required: true,
message: '必须输入题目内容',
trigger:
'blur'
,
trigger:
['blur', 'change']
,
}"
>
<el-input
...
...
@@ -37,6 +43,7 @@
resize=
"none"
rows=
"4"
v-model=
"form.topicTitle"
:disabled=
"checkLock"
>
</el-input>
</el-form-item>
...
...
@@ -54,7 +61,7 @@
:rules=
"
{
required: true,
message: '第一项不能为空不能为空',
trigger:
'blur'
,
trigger:
['blur', 'change']
,
}"
>
<div
class=
"add-select flex"
>
...
...
@@ -64,6 +71,7 @@
style=
"flex: 1; margin-right: 10px"
rows=
"2"
v-model=
"question.value"
:disabled=
"checkLock"
></el-input>
<div
class=
"flex algin-items"
>
<div
...
...
@@ -76,8 +84,9 @@
<el-button
size=
"mini"
type=
"danger"
v-if=
"index > 0"
v-if=
"index > 0
&& form.topicType != 3
"
@
click
.
prevent=
"removeDomain(question)"
:disabled=
"checkLock"
>
删除
</el-button
>
</div>
...
...
@@ -108,7 +117,11 @@
设为正确答案
</div>
-->
<div
style=
"padding-left: 30px"
>
<el-button
size=
"mini"
type=
"primary"
@
click
.
prevent=
"add(addValue)"
<el-button
size=
"mini"
type=
"primary"
@
click
.
prevent=
"add(addValue)"
:disabled=
"checkLock"
>
新增选项
</el-button
>
</div>
...
...
@@ -143,6 +156,9 @@ export default {
topicId
:
{
type
:
Number
,
},
checkLock
:
{
type
:
Boolean
,
},
},
components
:
{},
data
()
{
...
...
@@ -229,6 +245,7 @@ export default {
}
},
rightAnswerClick
(
index
)
{
if
(
this
.
checkLock
)
return
;
if
(
this
.
form
.
topicType
===
2
)
{
const
ind
=
this
.
answerNum
.
indexOf
(
index
);
if
(
ind
<
0
)
{
...
...
@@ -247,6 +264,7 @@ export default {
},
// 删除选项
removeDomain
(
question
)
{
if
(
this
.
checkLock
)
return
;
const
index
=
this
.
form
.
questions
.
indexOf
(
question
);
console
.
log
(
index
);
// 如果是正确答案,就让正确答案清空
...
...
@@ -333,9 +351,9 @@ export default {
reset
()
{
this
.
form
=
{
topicTitle
:
""
,
questions
:
[{
value
:
""
},
{
value
:
""
}
,
{
value
:
""
}
],
questions
:
[{
value
:
""
},
{
value
:
""
}],
};
this
.
answerNum
=
null
;
this
.
answerNum
=
[]
;
this
.
addValue
=
""
;
},
},
...
...
danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-27 09:30:19
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-28 10:29:18
* @LastEditTime: 202
3-02-01 18:02:14
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -193,7 +193,7 @@ export default {
this
.
loading
=
false
;
});
},
save
AndNext
(
)
{
save
(
num
=
2
)
{
const
topicInfos
=
this
.
list
.
filter
((
item
)
=>
item
.
checked
)
.
map
((
item
)
=>
{
...
...
@@ -202,18 +202,20 @@ export default {
quan
:
item
.
changeNum
,
};
});
console
.
log
(
this
.
courseId
,
topicInfos
);
const
data
=
{
courseId
:
this
.
courseId
,
topicInfos
};
console
.
log
(
data
);
bachAddTopic
(
data
).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
200
)
{
this
.
$parent
.
$parent
.
componentsNumChange
(
2
);
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
$parent
.
getList
();
}
});
},
saveAndNext
()
{
this
.
save
(
3
);
},
resetClick
()
{},
search
()
{
this
.
getList
();
...
...
danger-manage-web/src/views/educationPlanExam/textPaper/components/Dia.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:38:49
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-28 10:31:06
* @LastEditTime: 202
3-02-01 17:34:25
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/addLesson.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -24,6 +24,7 @@
:is=
"currentComponent"
:courseId
.
sync=
"courseId"
:topicId
.
sync=
"topicId"
:checkLock=
"checkLock"
ref=
"current"
></component>
</transition>
...
...
@@ -32,7 +33,7 @@
<QuestionList/>
-->
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<
!--
<
div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 2"
...
...
@@ -62,6 +63,51 @@
>
{{
"确认"
}}
</el-button
>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
-->
<div
slot=
"footer"
class=
"dialog-footer"
v-if=
"!checkLock"
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 2 && !checkLock"
@
click=
"componentsNumChange(4)"
>
从题库选择
</el-button
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 4 || this.componentsNum == 3"
@
click=
"componentsNumChange(2)"
>
返回题目列表
</el-button
>
<el-button
type=
"primary"
v-if=
"
this.componentsNum == 1 ||
this.componentsNum == 3 ||
this.componentsNum == 4
"
@
click=
"save"
>
保存
</el-button
>
<el-button
type=
"primary"
@
click=
"saveAndNext"
v-if=
"!checkLock"
>
{{
saveNextText
}}
</el-button>
<el-button
v-if=
"this.componentsNum == 2"
type=
"primary"
@
click=
"dialogCancel"
>
{{
"确认"
}}
</el-button
>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
v-else
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 3 && checkLock"
@
click=
"componentsNumChange(2)"
>
返回题目列表
</el-button
>
<el-button
type=
"primary"
@
click=
"dialogCancel"
>
{{
"确认"
}}
</el-button>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
</el-dialog>
</
template
>
...
...
@@ -86,6 +132,9 @@ export default {
courseId
:
{
type
:
Number
,
},
checkLock
:
{
type
:
Boolean
,
},
},
// components: {
// Lesson,
...
...
@@ -137,11 +186,9 @@ export default {
text
=
"保存并录入题目"
;
}
else
if
(
this
.
componentsNum
==
2
)
{
text
=
"录入考题"
;
}
else
if
(
this
.
componentsNum
==
3
)
{
}
else
{
text
=
"保存并录入下一题"
;
}
else
{
text
=
"确定选择"
;
}
}
return
text
;
},
},
...
...
@@ -168,6 +215,7 @@ export default {
this
.
topicId
=
null
;
}
this
.
$emit
(
"update:visible"
,
false
);
this
.
$emit
(
"update:checkLock"
,
false
);
},
// 把ID改变了
changeCourseId
(
courseId
)
{
...
...
danger-manage-web/src/views/educationPlanExam/textPaper/components/Lesson.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:59:44
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-26 16:31:34
* @LastEditTime: 202
3-02-01 16:58:26
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/Lession.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -16,7 +16,11 @@
:rules=
"rules"
>
<el-form-item
label=
"考试标题"
prop=
"courseName"
>
<el-input
style=
"width: 700px"
v-model=
"form.courseName"
></el-input>
<el-input
:disabled=
"checkLock"
style=
"width: 700px"
v-model=
"form.courseName"
></el-input>
</el-form-item>
<div
class=
"top flex"
>
<el-form-item
label=
"开始时间"
prop=
"testStartTime"
>
...
...
@@ -27,6 +31,7 @@
type=
"datetime"
placeholder=
"选择日期时间"
default-time=
"00:00:00"
:disabled=
"checkLock"
/>
</el-form-item>
<el-form-item
label=
"结束时间"
prop=
"testEndTime"
>
...
...
@@ -36,6 +41,7 @@
type=
"datetime"
placeholder=
"选择日期时间"
default-time=
"00:00:00"
:disabled=
"checkLock"
/>
</el-form-item>
</div>
...
...
@@ -43,6 +49,7 @@
<ChangePapel
ref=
"changePaple"
:jsonSelectNameList=
"jsonSelectNameList"
:disabled=
"checkLock"
@
getPeopleList=
"getPeopleList"
/>
</el-form-item>
...
...
@@ -70,6 +77,9 @@ export default {
courseId
:
{
type
:
Number
,
},
checkLock
:
{
type
:
Boolean
,
},
},
components
:
{
// Editor,
...
...
@@ -196,14 +206,17 @@ export default {
message
:
"保存课程成功"
,
type
:
"success"
,
});
this
.
$parent
.
$parent
.
dialogCancel
();
}
else
if
(
num
==
3
)
{
this
.
$message
({
message
:
"保存课程成功,请开始录入题目"
,
type
:
"success"
,
});
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
changeCourseId
(
courseId
);
}
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
changeCourseId
(
courseId
);
//
this.$parent.$parent.componentsNumChange(num);
//
this.$parent.$parent.changeCourseId(courseId);
this
.
$parent
.
$parent
.
$parent
.
getList
();
return
true
;
...
...
danger-manage-web/src/views/educationPlanExam/textPaper/components/QuestionList.vue
View file @
49ac7abd
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 17:56:05
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-31 14:04
:09
* @LastEditTime: 2023-0
2-01 17:45
:09
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/QuestionList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -34,13 +34,15 @@
>
分
</div>
<div
class=
"detail-item"
>
判断提
<span>
{{
bottomFrom
.
judgmentScore
}}
</span>
/题,共
<span>
{{
pds
}}
</span>
题,计
<span
class=
"textC"
>
{{
pds
*
bottomFrom
.
judgmentScore
}}
</span
判断提
<span>
{{
bottomFrom
.
judgmentScore
}}
</span
>
/题,共
<span>
{{
pds
}}
</span>
题,计
<span
class=
"textC"
>
{{
pds
*
bottomFrom
.
judgmentScore
}}
</span
>
分
</div>
<div
class=
"detail-item"
>
一共
<span>
{{
danxs
+
duoxs
+
pds
}}
</span>
道题,总共计
<span
class=
"textC"
>
{{
一共
<span>
{{
danxs
+
duoxs
+
pds
}}
</span
>
道题,总共计
<span
class=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
+
duoxs
*
bottomFrom
.
multipleChoiceScore
+
pds
*
bottomFrom
.
judgmentScore
...
...
@@ -70,12 +72,21 @@
<div
class=
"right"
>
<div>
<el-button
v-if=
"!checkLock"
@
click=
"edit(item.topicId)"
icon=
"el-icon-edit"
type=
"text"
>
修改
</el-button
>
<el-button
v-if=
"checkLock"
@
click=
"edit(item.topicId)"
icon=
"el-icon-edit"
type=
"text"
>
查看
</el-button
>
<el-button
v-if=
"!checkLock"
@
click=
"deleteLesson(item.topicId)"
icon=
"el-icon-delete"
type=
"text"
...
...
@@ -106,6 +117,7 @@
v-model=
"bottomFrom.singleChoiceScore"
style=
"width: 50px"
size=
"mini"
:disabled=
"checkLock"
></el-input>
</div>
<div>
分
</div>
...
...
@@ -117,6 +129,7 @@
v-model=
"bottomFrom.multipleChoiceScore"
style=
"width: 50px"
size=
"mini"
:disabled=
"checkLock"
></el-input>
</div>
<div>
分
</div>
...
...
@@ -129,6 +142,7 @@
v-model=
"bottomFrom.judgmentScore"
style=
"width: 50px"
size=
"mini"
:disabled=
"checkLock"
></el-input>
</div>
<div>
分
</div>
...
...
@@ -141,6 +155,7 @@
v-model=
"bottomFrom.qualifiedNum"
style=
"width: 60px"
size=
"mini"
:disabled=
"checkLock"
></el-input>
</div>
<div>
为合格
</div>
...
...
@@ -151,6 +166,7 @@
icon=
"el-icon-check"
size=
"mini"
type=
"success"
:disabled=
"checkLock"
>
保存
</el-button
>
</div>
...
...
@@ -171,6 +187,9 @@ export default {
courseId
:
{
type
:
Number
,
},
checkLock
:
{
type
:
Boolean
,
},
},
components
:
{},
data
()
{
...
...
danger-manage-web/src/views/educationPlanExam/textPaper/index.vue
View file @
49ac7abd
...
...
@@ -82,15 +82,17 @@
prop=
"topicNum"
width=
"180"
>
<template
v-slot=
"
{ row: { topicNum, courseId } }">
<div
class=
"timuNum"
>
<div
v-if=
"topicNum > 0"
>
{{
`已录入${topicNum
}
题`
}}
<
/div
>
<
div
v
-
else
>
未录入
<
/div
>
<
/div
>
<template
v-slot=
"
{ row: { topicNum, courseId, status } }">
<span
class=
"timuNum"
@
click=
"checkQuestion(courseId, status)"
>
<span
v-if=
"topicNum > 0"
>
{{
status
==
0
?
`已录入${topicNum
}
题`
:
"查看"
}}
<
/span
>
<
span
v
-
else
>
未录入
<
/span
>
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
答对几题算合格
"
label
=
"
合格分数
"
align
=
"center"
prop
=
"qualifiedNum"
:
formatter
=
"formatter"
...
...
@@ -102,17 +104,15 @@
>
<
template
v
-
slot
=
"{ row: { status, courseId, qualifiedNum
}
}
"
>
<!--
<
div
>
{{
status
}}
<
/div> --
>
<
el
-
button
:
disabled
=
"status == 1"
<!--
<
el
-
button
v
-
if
=
"status == 0"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"checkQuestion(courseId)"
>
录入考题
<
/el-butto
n
>
>
-->
<
el
-
button
:
disabled
=
"status == 1"
v
-
if
=
"status == 0"
size
=
"mini"
type
=
"text"
...
...
@@ -120,6 +120,14 @@
@
click
=
"changeLesson(courseId)"
>
编辑
<
/el-butto
n
>
<
el
-
button
v
-
if
=
"status == 1"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"checkLesson(courseId)"
>
详情
<
/el-butto
n
>
<
el
-
button
size
=
"mini"
type
=
"text"
...
...
@@ -128,13 +136,12 @@
>
删除
<
/el-butto
n
>
<
el
-
button
:
disabled
=
"status == 1"
v
-
if
=
"status == 0"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"issue
Lesson(courseId, qualifiedNum
)"
>
发布
考试
<
/el-butto
n
@
click
=
"issue
Dilog(courseId
)"
>
发布
<
/el-butto
n
>
<
/template
>
<
/el-table-column
>
...
...
@@ -151,16 +158,62 @@
ref
=
"Dia"
:
componentsNum
.
sync
=
"componentsNum"
:
courseId
.
sync
=
"courseId"
:
checkLock
.
sync
=
"checkLock"
:
visible
.
sync
=
"dilogFlag"
/>
<
el
-
dialog
title
=
"提示"
:
visible
.
sync
=
"issue"
width
=
"30%"
>
<
div
>
123
<
/div
>
<
el
-
dialog
title
=
"发布详情"
:
visible
.
sync
=
"issueVisible"
width
=
"60%"
>
<
div
class
=
"detail flex"
>
<
div
class
=
"detail-item"
>
单选题
<
span
>
{{
bottomFrom
.
singleChoiceScore
}}
<
/spa
n
>
分
/
题
,
共
<
span
>
{{
danxs
}}
<
/spa
n
>
题,计
<
span
class
=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
多选题
<
span
>
{{
bottomFrom
.
multipleChoiceScore
}}
<
/spa
n
>
分
/
题
,
共
<
span
>
{{
duoxs
}}
<
/span> 题,计<span class="textC">{{
duoxs
*
bottomFrom
.
multipleChoiceScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
判断提
<
span
>
{{
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
/题,共<span>{{ pds
}}
</
span
>
题,计
<
span
class
=
"textC"
>
{{
pds
*
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
合格分数为
<
span
class
=
"textC"
>
{{
bottomFrom
.
qualifiedNum
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
一共
<
span
>
{{
danxs
+
duoxs
+
pds
}}
<
/spa
n
>
道题,总共计
<
span
class
=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
+
duoxs
*
bottomFrom
.
multipleChoiceScore
+
pds
*
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
分
<
/div
>
<
/div
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"issueVisible = false"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"issueLesson(issueCourseId)"
>
确认发布
<
/el-butto
n
>
<
/span
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
getQuestion
,
getLessons
,
getLessonById
,
issue
,
...
...
@@ -200,14 +253,36 @@ export default {
// 表单校验
dilogFlag
:
false
,
// 发布
issueVisible
:
false
,
bottomFrom
:
{
singleChoiceScore
:
0
,
multipleChoiceScore
:
0
,
judgmentScore
:
0
,
qualifiedNum
:
0
,
}
,
issueCourseId
:
null
,
questionList
:
[],
componentsNum
:
1
,
// 点击的id,如果是新增为空
courseId
:
null
,
issue
:
false
,
// false为编辑,true为查看,查看不允许编辑的时候
checkLock
:
false
,
}
;
}
,
computed
:
{
...
mapGetters
([
"courseOptions"
]),
danxs
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
1
).
length
;
}
,
duoxs
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
2
).
length
;
}
,
pds
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
3
).
length
;
}
,
}
,
created
()
{
// this.getPlanList();
...
...
@@ -257,12 +332,22 @@ export default {
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
checkLock
=
false
;
this
.
$refs
.
Dia
.
title
=
"新增考试试卷"
;
this
.
componentsNum
=
1
;
this
.
courseId
=
null
;
this
.
dilogFlag
=
true
;
}
,
changeLesson
(
courseId
)
{
this
.
checkLock
=
false
;
this
.
$refs
.
Dia
.
title
=
"修改考试试卷"
;
this
.
componentsNum
=
1
;
this
.
courseId
=
courseId
;
this
.
dilogFlag
=
true
;
}
,
checkLesson
(
courseId
)
{
this
.
checkLock
=
true
;
this
.
$refs
.
Dia
.
title
=
"修改考试试卷"
;
this
.
componentsNum
=
1
;
this
.
courseId
=
courseId
;
...
...
@@ -270,8 +355,12 @@ export default {
}
,
// 直接查看考题
checkQuestion
(
courseId
)
{
checkQuestion
(
courseId
,
status
)
{
// 要查看考题的id
if
(
status
==
1
)
{
this
.
checkLock
=
true
;
}
this
.
courseId
=
courseId
;
console
.
log
(
this
.
courseId
);
// 2代表列表组件
...
...
@@ -315,8 +404,39 @@ export default {
.
catch
(()
=>
{
}
);
}
,
// 发布
issueLesson
(
courseId
,
qualifiedNum
)
{
this
.
$confirm
(
"请确定发布"
,
{
issueDilog
(
courseId
)
{
getQuestion
({
courseId
}
)
.
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
questionList
=
res
.
rows
.
map
((
item
)
=>
{
return
{
topicType
:
item
.
topicType
,
topicId
:
item
.
topicId
,
topicTitle
:
item
.
topicTitle
,
}
;
}
);
}
)
.
then
((
res
)
=>
{
return
getLessonById
(
courseId
);
}
)
.
then
((
res
)
=>
{
this
.
bottomFrom
=
{
singleChoiceScore
:
res
.
data
.
singleChoiceScore
||
0
,
multipleChoiceScore
:
res
.
data
.
multipleChoiceScore
||
0
,
judgmentScore
:
res
.
data
.
judgmentScore
||
0
,
qualifiedNum
:
res
.
data
.
qualifiedNum
||
0
,
}
;
}
)
.
then
((
res
)
=>
{
this
.
issueVisible
=
true
;
this
.
issueCourseId
=
courseId
;
}
);
//
}
,
issueLesson
(
courseId
)
{
this
.
$confirm
(
"确定要发布吗"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
...
...
@@ -326,14 +446,14 @@ export default {
return
getLessonById
(
courseId
);
}
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
singleChoiceScore
>
0
&&
res
.
data
.
multipleChoiceScore
>
0
&&
res
.
data
.
judgmentScore
>
0
&&
res
.
data
.
qualifiedNum
>
0
)
{
return
true
;
}
//
if (
//
res.data.singleChoiceScore > 0 &&
//
res.data.multipleChoiceScore > 0 &&
//
res.data.judgmentScore > 0 &&
//
res.data.qualifiedNum > 0
//
)
{
return
true
;
//
}
}
)
.
then
((
res
)
=>
{
if
(
res
)
{
...
...
@@ -355,6 +475,7 @@ export default {
type
:
"success"
,
}
);
this
.
getList
();
this
.
issueVisible
=
false
;
}
}
)
.
catch
(()
=>
{
}
);
...
...
@@ -373,7 +494,7 @@ export default {
}
.
timuNum
{
color
:
#
1
d84ff
;
//
cursor: pointer;
cursor
:
pointer
;
}
::
v
-
deep
.
el
-
select
{
width
:
100
%
;
...
...
@@ -381,4 +502,17 @@ export default {
::
v
-
deep
.
el
-
dialog
{
margin
-
top
:
15
vh
!
important
;
}
.
detail
{
// position: absolute;
// bottom: -20px;
// left: 10px;
.
textC
{
font
-
weight
:
800
;
font
-
size
:
18
px
;
}
.
detail
-
item
{
margin
-
right
:
20
px
;
color
:
red
;
}
}
<
/style
>
danger-manage-web/src/views/educationPlanExam/visitorProgram/visitorAdd.vue
View file @
49ac7abd
...
...
@@ -78,7 +78,7 @@
<el-button
size=
"mini"
type=
"danger"
v-if=
"index > 0"
v-if=
"index > 0
&& form.topicType != 3
"
@
click
.
prevent=
"removeDomain(question)"
plain
icon=
"el-icon-delete"
...
...
danger-manage-web/src/views/educationPlanExam/visitorTestStat/index.vue
View file @
49ac7abd
...
...
@@ -62,9 +62,9 @@
<
span
>
{{
parseTime
(
scope
.
row
.
testEndTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
正确率
"
align
=
"center"
prop
=
"score"
>
<
el
-
table
-
column
label
=
"
答题得分
"
align
=
"center"
prop
=
"score"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
Math
.
round
(
scope
.
row
.
score
/
topicNum
*
100
)
}}
%
<
/span
>
<
span
>
{{
scope
.
row
.
score
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"是否合格"
align
=
"center"
prop
=
"isQualified"
>
...
...
danger-manage-web/src/views/safetyManagement/staff/index.vue
View file @
49ac7abd
...
...
@@ -150,7 +150,7 @@
</el-col>
</el-row>
<!-- 添加
或修改
参数配置对话框 -->
<!-- 添加参数配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
...
...
@@ -238,7 +238,7 @@
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"角色"
>
<el-select
v-model=
"form.roleId
"
placeholder=
"请选择角色"
style=
"width: 100%
"
>
<el-select
v-model=
"form.roleId
s"
multiple
placeholder=
"请选择
"
>
<el-option
v-for=
"item in roleOptions"
:key=
"item.roleId"
...
...
@@ -249,6 +249,9 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
...
...
@@ -294,7 +297,151 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- 修改参数配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"opens"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"姓名"
prop=
"staffName"
>
<el-input
v-model=
"form.staffName"
placeholder=
"请输入员工姓名"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"性别"
prop=
"sex"
label-width=
"140px"
>
<el-select
v-model=
"form.sex"
placeholder=
"请选择员工性别"
style=
"width: 100%"
>
<el-option
v-for=
"dict in sexOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"手机号码"
prop=
"phonenumber"
>
<el-input
v-model=
"form.phonenumber"
placeholder=
"请输入手机号码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"归属部门"
prop=
"deptId"
label-width=
"140px"
>
<treeselect
v-model=
"form.deptId"
:options=
"deptOptions"
:show-count=
"true"
placeholder=
"请选择归属部门"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"岗位"
prop=
"postId"
>
<el-select
v-model=
"form.postId"
placeholder=
"请选择岗位"
style=
"width: 100%"
>
<el-option
v-for=
"item in postOptions"
:key=
"item.postId"
:label=
"item.postName"
:value=
"item.postId"
:disabled=
"item.status == 1"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"职称"
prop=
"positionalTitles"
label-width=
"140px"
>
<el-input
v-model=
"form.positionalTitles"
placeholder=
"请输入员工职称"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"工种"
prop=
"profession"
>
<el-input
v-model=
"form.profession"
placeholder=
"请输入员工工种"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"是否为特种作业人员"
label-width=
"140px"
>
<el-select
v-model=
"form.specialOperators"
placeholder=
"请选择是否为特种作业人员"
style=
"width: 100%"
>
<el-option
v-for=
"dict in specialOptions"
:key=
"dict.dictValue"
:label=
"dict.dictLabel"
:value=
"dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<!-- <el-form-item label="角色">-->
<!-- <el-select v-model="form.roleId" placeholder="请选择角色" style="width: 100%">-->
<!-- <el-option-->
<!-- v-for="item in roleOptions"-->
<!-- :key="item.roleId"-->
<!-- :label="item.roleName"-->
<!-- :value="item.roleId"-->
<!-- :disabled="item.status == 1"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item
label=
"角色"
>
<el-select
v-model=
"form.roleIds"
multiple
placeholder=
"请选择"
>
<el-option
v-for=
"item in roleOptions"
:key=
"item.roleId"
:label=
"item.roleName"
:value=
"item.roleId"
:disabled=
"item.status == 1"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"证书照片"
prop=
"certificateUrl"
>
<MyFileUpload
listType=
"picture-card"
@
resFun=
"getFileInfo"
@
remove=
"listRemove"
:fileArr=
"fileList"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.certificateUrl"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"证书名称"
prop=
"certificateName"
>
<el-input
v-model=
"form.certificateName"
placeholder=
"请输入证书名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"证书有效日期"
prop=
"effectiveDate"
label-width=
"140px"
>
<el-date-picker
clearable
v-model=
"form.effectiveDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择证书有效日期"
style=
"width: 100%"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入备注信息"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -303,6 +450,7 @@ import { listStaff, getStaff, delStaff, addStaff, updateStaff, exportStaff } fro
import
{
treeselect
}
from
"@/api/system/dept"
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
{
listUser
,
getUser
,
delUser
,
addUser
,
updateUser
,
exportUser
,
resetUserPwd
,
changeUserStatus
,
importTemplate
}
from
"@/api/system/user"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
export
default
{
...
...
@@ -333,6 +481,8 @@ export default {
deptOptions
:
undefined
,
// 是否显示弹出层
open
:
false
,
// 修改是否显示弹出层
opens
:
false
,
openDetail
:
false
,
// 部门名称
deptName
:
undefined
,
...
...
@@ -431,6 +581,7 @@ export default {
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
opens
=
false
;
this
.
reset
();
},
cancelDetail
()
{
...
...
@@ -495,7 +646,13 @@ export default {
this
.
getTreeselect
();
// this.open = true;
// this.title = "添加员工信息";
getStaff
().
then
(
response
=>
{
// getStaff().then(response => {
// this.postOptions = response.posts;
// this.roleOptions = response.roles;
// this.open = true;
// this.title = "添加员工信息";
// });
getUser
().
then
(
response
=>
{
this
.
postOptions
=
response
.
posts
;
this
.
roleOptions
=
response
.
roles
;
this
.
open
=
true
;
...
...
@@ -507,16 +664,18 @@ export default {
this
.
reset
();
this
.
getTreeselect
();
const
staffId
=
row
.
staffId
||
this
.
ids
;
getUser
().
then
(
response
=>
{
this
.
roleOptions
=
response
.
roles
;
});
getStaff
(
staffId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
postOptions
=
response
.
posts
;
this
.
roleOptions
=
response
.
roles
;
if
(
this
.
form
.
certificateUrl
)
{
this
.
fileList
.
push
({
url
:
this
.
form
.
certificateUrl
,
});
}
this
.
open
=
true
;
this
.
open
s
=
true
;
this
.
title
=
"修改员工信息"
;
});
},
...
...
@@ -524,11 +683,10 @@ export default {
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
console
.
log
(
"this.form"
,
this
.
form
)
if
(
this
.
form
.
staffId
!=
null
)
{
updateStaff
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
open
s
=
false
;
this
.
getList
();
});
}
else
{
...
...
danger-manage-web/src/views/system/book/index.vue
View file @
49ac7abd
This diff is collapsed.
Click to expand it.
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