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
e1d166b3
Commit
e1d166b3
authored
2 years ago
by
纪泽龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jzl'
parents
1982805d
6ba61b3a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
641 additions
and
570 deletions
+641
-570
index.vue
danger-manage-web/src/components/PeopleChange/index.vue
+2
-2
ChangPapelTable.vue
...-web/src/components/PeopleGuestChange/ChangPapelTable.vue
+12
-10
index.vue
danger-manage-web/src/components/PeopleGuestChange/index.vue
+27
-24
Dia.vue
...views/educationPlanExam/lessonsProgram/components/Dia.vue
+5
-1
AddQuestion.vue
...educationPlanExam/questionBank/components/AddQuestion.vue
+11
-6
Dia.vue
...c/views/educationPlanExam/questionBank/components/Dia.vue
+5
-1
QuestionList.vue
...ducationPlanExam/questionBank/components/QuestionList.vue
+37
-21
index.vue
...ge-web/src/views/educationPlanExam/questionBank/index.vue
+1
-2
AddQuestion.vue
...ws/educationPlanExam/textPaper/components/AddQuestion.vue
+27
-28
ChangeQuestion.vue
...educationPlanExam/textPaper/components/ChangeQuestion.vue
+226
-0
Dia.vue
.../src/views/educationPlanExam/textPaper/components/Dia.vue
+28
-11
Lesson.vue
...c/views/educationPlanExam/textPaper/components/Lesson.vue
+111
-145
QuestionList.vue
...s/educationPlanExam/textPaper/components/QuestionList.vue
+31
-35
index.vue
...anage-web/src/views/educationPlanExam/textPaper/index.vue
+118
-284
No files found.
danger-manage-web/src/components/PeopleChange/index.vue
View file @
e1d166b3
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-19 17:39:55
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-2
4 16:12:47
* @LastEditTime: 2022-12-2
6 09:36: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
-->
...
...
@@ -63,7 +63,7 @@
<div
class=
"close"
@
click=
"deleteName(item.staffId)"
>
x
</div>
</div>
</div>
<div
class=
"bottom-text"
>
已选择
n
人
</div>
<div
class=
"bottom-text"
>
已选择
{{
selectNameList
.
length
}}
人
</div>
</div>
</div>
</
template
>
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/components/PeopleGuestChange/ChangPapelTable.vue
View file @
e1d166b3
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-19 15:23:58
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-2
4 16:51:34
* @LastEditTime: 2022-12-2
5 16:47:17
* @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
-->
...
...
@@ -17,19 +17,19 @@
ref=
"multipleTable"
>
<el-table-column
type=
"selection"
></el-table-column>
<el-table-column
label=
"负责人"
align=
"center"
prop=
"
staffN
ame"
>
<el-table-column
label=
"负责人"
align=
"center"
prop=
"
n
ame"
>
</el-table-column>
<el-table-column
label=
"手机号"
align=
"center"
prop=
"
deptNam
e"
prop=
"
phon
e"
:formatter=
"formatter"
>
</el-table-column>
<el-table-column
label=
"所属单位"
align=
"center"
prop=
"
profession
"
prop=
"
contractorName
"
:formatter=
"formatter"
>
</el-table-column>
...
...
@@ -49,6 +49,7 @@
<
script
>
import
{
listStaff
}
from
"@/api/safetyManagement/staff"
;
import
{
listContractorPerson
}
from
"@/api/contractor/contractorPerson"
;
export
default
{
name
:
""
,
props
:
{
...
...
@@ -64,8 +65,8 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
dept
Id
:
null
,
staffN
ame
:
null
,
contractor
Id
:
null
,
n
ame
:
null
,
},
total
:
0
,
nameList
:
[],
...
...
@@ -75,12 +76,13 @@ export default {
methods
:
{
listStaff
()
{
this
.
loading
=
true
;
listStaff
(
this
.
queryParams
).
then
((
res
)
=>
{
listContractorPerson
(
this
.
queryParams
).
then
((
res
)
=>
{
console
.
log
(
'res'
,
res
)
this
.
total
=
res
.
total
;
this
.
nameList
=
res
.
rows
;
this
.
$nextTick
((
item
)
=>
{
this
.
selectNameList
.
forEach
((
item
)
=>
{
this
.
toggleSelection
(
item
.
staffI
d
,
true
);
this
.
toggleSelection
(
item
.
i
d
,
true
);
});
this
.
loading
=
false
;
});
...
...
@@ -110,9 +112,9 @@ export default {
this
.
$emit
(
"selectAll"
,
this
.
nameList
,
allSelect
);
},
// 切换选项
toggleSelection
(
staffI
d
,
SeclctFlag
=
false
)
{
toggleSelection
(
i
d
,
SeclctFlag
=
false
)
{
const
item
=
this
.
nameList
.
find
((
item
)
=>
{
return
item
.
staffId
==
staffI
d
;
return
item
.
id
==
i
d
;
});
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
item
,
SeclctFlag
);
},
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/components/PeopleGuestChange/index.vue
View file @
e1d166b3
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-19 17:39:55
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-2
4 16:12:56
* @LastEditTime: 2022-12-2
5 17:49:17
* @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
-->
...
...
@@ -12,7 +12,7 @@
<div
class=
"changePeople-left"
>
<div
class=
"top-search flex"
>
<el-select
v-model=
"
deptI
d"
v-model=
"
i
d"
filterable
placeholder=
"请选择"
size=
"mini"
...
...
@@ -21,14 +21,14 @@
>
<el-option
v-for=
"item in searchList"
:key=
"item.
deptI
d"
:label=
"item.
dept
Name"
:value=
"item.
deptI
d"
:key=
"item.
i
d"
:label=
"item.
contractor
Name"
:value=
"item.
i
d"
>
</el-option>
</el-select>
<el-input
v-model=
"
staffN
ame"
v-model=
"
n
ame"
size=
"mini"
placeholder=
"请输入姓名"
suffix-icon=
"el-icon-date"
...
...
@@ -57,10 +57,10 @@
<div
class=
"item flex"
v-for=
"item in selectNameList"
:key=
"item.
staffI
d"
:key=
"item.
i
d"
>
<div>
{{
item
.
staffN
ame
}}
</div>
<div
class=
"close"
@
click=
"deleteName(item.
staffI
d)"
>
x
</div>
<div>
{{
item
.
n
ame
}}
</div>
<div
class=
"close"
@
click=
"deleteName(item.
i
d)"
>
x
</div>
</div>
</div>
<div
class=
"bottom-text"
>
已选择n人
</div>
...
...
@@ -71,6 +71,7 @@
<
script
>
import
ChangPapelTable
from
"./ChangPapelTable"
;
import
{
listDept
}
from
"@/api/system/dept"
;
import
{
listAll
}
from
"@/api/contractor/contractorInfo"
;
export
default
{
name
:
"PeopleGuestChange"
,
...
...
@@ -88,13 +89,15 @@ export default {
return
{
selectNameList
:
[],
searchList
:
[],
deptId
:
null
,
staffName
:
null
,
// 这个id是访客跟承包商的id。也叫id
id
:
null
,
name
:
null
,
};
},
created
()
{
list
Dept
().
then
((
res
)
=>
{
list
All
().
then
((
res
)
=>
{
console
.
log
(
res
);
// return;
this
.
searchList
=
res
.
data
;
});
},
...
...
@@ -108,8 +111,8 @@ export default {
if
(
Array
.
isArray
(
this
.
selectNameList
))
{
json
=
this
.
selectNameList
.
map
((
item
)
=>
{
return
{
peoPleId
:
item
.
staffI
d
,
peoPleName
:
item
.
staffN
ame
,
peoPleId
:
item
.
i
d
,
peoPleName
:
item
.
n
ame
,
};
});
}
else
{
...
...
@@ -124,8 +127,8 @@ export default {
if
(
jsonSelectNameList
)
{
this
.
selectNameList
=
JSON
.
parse
(
jsonSelectNameList
).
map
((
item
)
=>
{
return
{
staffI
d
:
item
.
peoPleId
,
staffN
ame
:
item
.
peoPleName
,
i
d
:
item
.
peoPleId
,
n
ame
:
item
.
peoPleName
,
};
});
}
else
{
...
...
@@ -137,25 +140,25 @@ export default {
this
.
$refs
.
table
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
,
deptId
:
this
.
deptI
d
,
staffName
:
this
.
staffN
ame
,
contractorId
:
this
.
i
d
,
name
:
this
.
n
ame
,
};
this
.
$refs
.
table
.
listStaff
();
},
deleteName
(
staffI
d
)
{
deleteName
(
i
d
)
{
const
index
=
this
.
selectNameList
.
findIndex
((
item
)
=>
{
return
item
.
staffId
==
staffI
d
;
return
item
.
id
==
i
d
;
});
if
(
index
>=
0
)
{
console
.
log
(
index
);
this
.
selectNameList
.
splice
(
index
,
1
);
this
.
$refs
.
table
.
toggleSelection
(
staffI
d
);
this
.
$refs
.
table
.
toggleSelection
(
i
d
);
}
},
addName
(
row
)
{
const
index
=
this
.
selectNameList
.
findIndex
((
item
)
=>
{
// console.log(item.id)
return
item
.
staffId
==
row
.
staffI
d
;
return
item
.
id
==
row
.
i
d
;
});
console
.
log
(
index
);
if
(
index
>=
0
)
{
...
...
@@ -170,7 +173,7 @@ export default {
if
(
allSelect
)
{
all
.
forEach
((
item
)
=>
{
const
index
=
this
.
selectNameList
.
findIndex
((
iten
)
=>
{
return
iten
.
staffId
==
item
.
staffI
d
;
return
iten
.
id
==
item
.
i
d
;
});
if
(
index
<
0
)
{
this
.
selectNameList
.
push
(
item
);
...
...
@@ -178,7 +181,7 @@ export default {
});
}
else
{
all
.
forEach
((
item
)
=>
{
this
.
deleteName
(
item
.
staffI
d
);
this
.
deleteName
(
item
.
i
d
);
});
}
},
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/Dia.vue
View file @
e1d166b3
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:38:49
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-
17 10:24:41
* @LastEditTime: 2022-12-
26 09:54:47
* @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
-->
...
...
@@ -145,6 +145,10 @@ export default {
},
// 隐藏与显示dialog
dialogCancel
()
{
// 录入考题的时候不会有修改的缓存
if
(
this
.
topicId
)
{
this
.
topicId
=
null
;
}
this
.
$emit
(
"update:visible"
,
false
);
},
// 把ID改变了
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/questionBank/components/AddQuestion.vue
View file @
e1d166b3
...
...
@@ -123,7 +123,12 @@
// getQuestion,
// getLessonById,
// } from "@/api/educationPlanExam/lessonsProgram.js";
import
{
addSubject
,
getSubject
,
listSubject
,
updateSubject
}
from
"@/api/educationPlanExam/subject"
;
import
{
addSubject
,
getSubject
,
listSubject
,
updateSubject
,
}
from
"@/api/educationPlanExam/subject"
;
export
default
{
name
:
"AnswerLesson"
,
...
...
@@ -158,7 +163,7 @@ export default {
// 如果存在就是修改
if
(
this
.
subjectId
)
{
getSubject
(
this
.
subjectId
).
then
((
res
)
=>
{
console
.
log
(
'?'
,
res
.
data
);
console
.
log
(
"?"
,
res
.
data
);
const
data
=
res
.
data
;
this
.
form
=
{
topicTitle
:
data
.
topicTitle
,
...
...
@@ -176,12 +181,12 @@ export default {
methods
:
{
getQuestion
()
{
listSubject
({
bankId
:
this
.
bankId
}).
then
((
res
)
=>
{
console
.
log
(
res
)
// 如果是修改 就是原来的值,如果不是,就是总数+1
console
.
log
(
res
)
;
// 如果是修改 就是原来的值,如果不是,就是总数+1
if
(
this
.
subjectId
)
{
res
.
rows
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
subjectId
==
this
.
subjectId
)
{
this
.
questionNextNum
=
index
+
1
;
this
.
questionNextNum
=
index
+
1
;
}
});
}
else
{
...
...
@@ -243,7 +248,7 @@ export default {
// 把修改的这个归位,变成正常添加
this
.
$emit
(
"update:subjectId"
,
null
);
this
.
$message
({
message
:
"添加
题目成功"
,
message
:
this
.
subjectId
?
"添加题目成功"
:
"修改
题目成功"
,
type
:
"success"
,
});
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/questionBank/components/Dia.vue
View file @
e1d166b3
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:38:49
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-
17 14:28
:56
* @LastEditTime: 2022-12-
26 09:55
:56
* @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
-->
...
...
@@ -145,6 +145,10 @@ export default {
},
// 隐藏与显示dialog
dialogCancel
()
{
// 录入题目的时候不会有修改的缓存
if
(
this
.
subjectId
)
{
this
.
subjectId
=
null
;
}
this
.
$emit
(
"update:visible"
,
false
);
},
// 把ID改变了
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/questionBank/components/QuestionList.vue
View file @
e1d166b3
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 17:56:05
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-
17 14:28:57
* @LastEditTime: 2022-12-
27 16:03:40
* @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
-->
...
...
@@ -17,15 +17,16 @@
<div
class=
"right"
>
{{
courseName
}}
</div>
</div>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button
>
</el-col>
</el-row>
<div
class=
"table flex"
v-loading=
"loading"
>
...
...
@@ -89,13 +90,24 @@
</div>
-->
<!-- 设备导入对话框 -->
<el-dialog
:title=
"upload.title"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-dialog
:title=
"upload.title"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url + '?updateSupport=' + upload.updateSupport+ '&bankId=' + upload.bankId"
:action=
"
upload.url +
'?updateSupport=' +
upload.updateSupport +
'&bankId=' +
upload.bankId
"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
...
...
@@ -108,17 +120,19 @@
<em>
点击上传
</em>
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<!--
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的设备数据-->
<!--
<el-link
type=
"info"
style=
"font-size:12px"
@
click=
"importTemplate"
>
下载模板
</el-link>
-->
<!--
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的设备数据-->
<!--
<el-link
type=
"info"
style=
"font-size:12px"
@
click=
"importTemplate"
>
下载模板
</el-link>
-->
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleDownload(upload)"
>
下载模板
</el-button>
>
下载模板
</el-button
>
</div>
<div
class=
"el-upload__tip"
style=
"color: red"
slot=
"tip"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
<div
class=
"el-upload__tip"
style=
"color:red"
slot=
"tip"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitFileForm"
>
确 定
</el-button>
...
...
@@ -160,7 +174,7 @@ export default {
// 设备导入参数
upload
:
{
//题库id
bankId
:
0
,
bankId
:
0
,
// 是否显示弹出层(用户导入)
open
:
false
,
// 弹出层标题(用户导入)
...
...
@@ -172,7 +186,7 @@ export default {
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/subject/import"
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/subject/import"
,
},
queryParams
:
{
bankId
:
0
...
...
@@ -209,7 +223,7 @@ export default {
/** 导入按钮操作 */
handleImport
()
{
this
.
upload
.
bankId
=
this
.
bankId
;
this
.
upload
.
bankId
=
this
.
bankId
;
this
.
upload
.
title
=
"题目导入"
;
this
.
upload
.
open
=
true
;
},
...
...
@@ -223,10 +237,12 @@ export default {
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
response
.
msg
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
getQuestion
({
bankId
:
this
.
bankId
});
// this.getList();
this
.
$parent
.
$parent
.
$parent
.
getList
();
},
/** 下载模板操作 */
importTemplate
()
{
importTemplate
().
then
(
response
=>
{
importTemplate
().
then
(
(
response
)
=>
{
this
.
download
(
response
.
msg
);
});
},
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/questionBank/index.vue
View file @
e1d166b3
...
...
@@ -5,7 +5,6 @@
ref=
"queryForm"
:inline=
"true"
label-width=
"68px"
>
<!--
<el-form-item
label=
"课件类别"
prop=
"courseType"
>
<el-select
...
...
@@ -24,7 +23,7 @@
</el-form-item>
-->
<el-form-item
label=
"
考试名称
"
label=
"
所属单位
"
prop=
"deptId"
ref=
"treeItem"
>
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/AddQuestion.vue
View file @
e1d166b3
...
...
@@ -116,14 +116,13 @@
</
template
>
<
script
>
// import {
// addQuestion,
// checkQuestion,
// changeQuestion,
// getQuestion,
// getLessonById,
// } from "@/api/educationPlanExam/lessonsProgram.js";
import
{
addSubject
,
getSubject
,
listSubject
,
updateSubject
}
from
"@/api/educationPlanExam/subject"
;
import
{
addQuestion
,
checkQuestion
,
changeQuestion
,
getQuestion
,
getLessonById
,
}
from
"@/api/educationPlanExam/lessonsProgram.js"
;
export
default
{
name
:
"AnswerLesson"
,
...
...
@@ -132,10 +131,10 @@ export default {
// type: Boolean,
// default: false,
// },
bank
Id
:
{
course
Id
:
{
type
:
Number
,
},
subject
Id
:
{
topic
Id
:
{
type
:
Number
,
},
},
...
...
@@ -156,9 +155,9 @@ export default {
created
()
{
// 如果存在就是修改
if
(
this
.
subject
Id
)
{
getSubject
(
this
.
subject
Id
).
then
((
res
)
=>
{
console
.
log
(
'?'
,
res
.
data
);
if
(
this
.
topic
Id
)
{
checkQuestion
(
this
.
topic
Id
).
then
((
res
)
=>
{
console
.
log
(
res
.
data
);
const
data
=
res
.
data
;
this
.
form
=
{
topicTitle
:
data
.
topicTitle
,
...
...
@@ -171,16 +170,16 @@ export default {
// 查询是第几道题
this
.
getQuestion
();
// 获取课程标题
// this.getLessonById(this.bank
Id);
this
.
getLessonById
(
this
.
course
Id
);
},
methods
:
{
getQuestion
()
{
listSubject
({
bankId
:
this
.
bankId
}).
then
((
res
)
=>
{
getQuestion
({
courseId
:
this
.
courseId
}).
then
((
res
)
=>
{
// 如果是修改 就是原来的值,如果不是,就是总数+1
console
.
log
(
res
)
// 如果是修改 就是原来的值,如果不是,就是总数+1
if
(
this
.
subjectId
)
{
if
(
this
.
topicId
)
{
res
.
rows
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
subjectId
==
this
.
subject
Id
)
{
if
(
item
.
topicId
==
this
.
topic
Id
)
{
this
.
questionNextNum
=
index
+
1
;
}
});
...
...
@@ -189,18 +188,18 @@ export default {
}
});
},
// getLessonById(bank
Id) {
// getLessonById(bank
Id).then((res) => {
//
console.log(res);
//
this.courseName = res.data.courseName;
//
});
//
},
getLessonById
(
course
Id
)
{
getLessonById
(
course
Id
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
courseName
=
res
.
data
.
courseName
;
});
},
addQuestion
(
data
)
{
// 如果是修改,就用修改的方法,如果是新增,就用新增的方法
if
(
this
.
subject
Id
)
{
return
updateSubject
({
subjectId
:
this
.
subject
Id
,
...
data
});
if
(
this
.
topic
Id
)
{
return
changeQuestion
({
topicId
:
this
.
topic
Id
,
...
data
});
}
else
{
return
add
Subject
({
bankId
:
this
.
bank
Id
,
...
data
});
return
add
Question
({
courseId
:
this
.
course
Id
,
...
data
});
}
},
rightAnswerClick
(
index
)
{
...
...
@@ -241,7 +240,7 @@ export default {
this
.
addQuestion
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
// 把修改的这个归位,变成正常添加
this
.
$emit
(
"update:
subject
Id"
,
null
);
this
.
$emit
(
"update:
topic
Id"
,
null
);
this
.
$message
({
message
:
"添加题目成功"
,
type
:
"success"
,
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
0 → 100644
View file @
e1d166b3
<!--
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-27 09:30:19
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-27 15:59:28
* @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
-->
<
template
>
<div
class=
"table-wrapper"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
>
<el-form-item
label=
"所属单位"
prop=
"deptId"
ref=
"treeItem"
>
<Treeselect
class=
"tree"
v-model=
"queryParams.deptId"
:options=
"deptOptions"
:show-count=
"true"
placeholder=
"请选择归属部门"
style=
"width: 200px"
/>
</el-form-item>
<el-form-item
label=
"名称"
prop=
"courseName"
>
<el-input
v-model=
"queryParams.courseName"
placeholder=
"考试时间"
clearable
size=
"small"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"search"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetClick"
>
重置
</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"list"
height=
"435"
ref=
"multipleTable"
>
<!--
<el-table-column
type=
"selection"
></el-table-column>
-->
<el-table-column
label=
""
align=
"center"
prop=
"profession"
>
<template
v-slot=
"
{ row }">
<!--
<div>
-->
<el-checkbox
:disabled=
"row.numberQuestions == 0"
v-model=
"row.checked"
></el-checkbox>
<!--
</div>
-->
</
template
>
</el-table-column>
<el-table-column
label=
"题库名称"
align=
"center"
prop=
"bankName"
>
</el-table-column>
<el-table-column
label=
"所属单位"
align=
"center"
prop=
"courseType"
>
<
template
v-slot=
"scope"
>
<div>
{{
selectList
(
deptOptions
,
scope
.
row
.
deptId
)
||
"-"
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"包含题目数量"
align=
"center"
prop=
"numberQuestions"
:formatter=
"formatter"
>
</el-table-column>
<el-table-column
label=
"选取题目数量"
align=
"center"
prop=
"profession"
>
<
template
v-slot=
"{ row }"
>
<div>
<!--
<el-input
:disabled=
"!row.checked|| row.numberQuestions==0 "
v-model=
"row.changeNum"
size=
"mini"
style=
"width: 100px"
></el-input>
-->
<el-input-number
v-model=
"row.changeNum"
:disabled=
"!row.checked || row.numberQuestions == 0"
size=
"mini"
:min=
"1"
:max=
"+row.numberQuestions ? +row.numberQuestions : 1000000"
label=
"描述文字"
></el-input-number>
</div>
</
template
>
</el-table-column>
</el-table>
<!-- <div> -->
<el-pagination
:layout=
"'prev, pager, next'"
v-show=
"total > 0"
:total=
"total"
:current-page=
"queryParams.pageNum"
:page-sizes=
"[queryParams.pageSize]"
@
current-change=
"currentChangeClick"
/>
</div>
</template>
<
script
>
import
{
listBank
,
delBank
}
from
"@/api/educationPlanExam/questionBank"
;
// 部门列表
import
{
treeselect
}
from
"@/api/system/dept"
;
import
Treeselect
from
"@riophae/vue-treeselect"
;
import
"@riophae/vue-treeselect/dist/vue-treeselect.css"
;
export
default
{
name
:
""
,
components
:
{
Treeselect
,
},
props
:
{
courseId
:
{
type
:
Number
,
},
},
data
()
{
return
{
queryParams
:
{},
list
:
[
{
checked
:
false
,
},
],
total
:
20
,
loading
:
false
,
// 题库id
deptId
:
null
,
// 归属部门列表
deptOptions
:
[],
};
},
created
()
{
this
.
getList
();
this
.
getTreeselect
();
},
methods
:
{
getTreeselect
()
{
treeselect
().
then
((
response
)
=>
{
this
.
deptOptions
=
response
.
data
;
// console.log("123", this.deptOptions);
// console.log(this.selectList(this.deptOptions, 175));
});
},
// 递归查值的方法
selectList
(
list
,
id
)
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
let
item
=
list
[
i
];
if
(
item
.
id
==
id
)
{
return
item
.
label
;
}
else
{
if
(
Array
.
isArray
(
item
.
children
))
{
let
a
=
this
.
selectList
(
item
.
children
,
id
);
if
(
a
)
{
return
a
;
}
}
}
}
},
getList
()
{
this
.
loading
=
true
;
listBank
(
this
.
queryParams
)
.
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
list
=
res
.
rows
.
map
((
item
,
index
)
=>
{
return
{
bankNum
:
index
+
1
+
(
this
.
queryParams
.
pageNum
-
1
)
*
this
.
queryParams
.
pageSize
,
checked
:
false
,
changeNum
:
0
,
...
item
,
};
});
this
.
total
=
res
.
total
;
})
.
finally
(()
=>
{
this
.
loading
=
false
;
});
},
saveAndNext
()
{
const
topicInfos
=
this
.
list
.
filter
((
item
)
=>
item
.
checked
)
.
map
((
item
)
=>
{
return
{
bankId
:
item
.
bankId
,
quan
:
item
.
changeNum
,
};
});
console
.
log
(
this
.
courseId
,
topicInfos
);
const
data
=
{
courseId
:
this
.
courseId
,
topicInfos
}
console
.
log
(
data
);
// this.$parent.$parent.componentsNumChange(2);
},
resetClick
()
{},
search
()
{},
currentChangeClick
()
{},
formatter
(
row
,
column
,
cellValue
,
index
)
{
// console.log(row, column, cellValue, index);
if
(
!
cellValue
)
return
"-"
;
else
return
cellValue
;
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.table-wrapper
{
padding-top
:
22px
;
width
:
100%
;
height
:
550px
;
overflow
:
hidden
;
// padding-bottom: 10px;
margin-bottom
:
20px
;
}
</
style
>
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/Dia.vue
View file @
e1d166b3
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:38:49
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-
19 14:01:37
* @LastEditTime: 2022-12-
27 09:45:29
* @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
-->
...
...
@@ -22,8 +22,8 @@
<transition
name=
"fade"
mode=
"out-in"
>
<component
:is=
"currentComponent"
:
bankId
.
sync=
"bank
Id"
:
subjectId
.
sync=
"subject
Id"
:
courseId
.
sync=
"course
Id"
:
topicId
.
sync=
"topic
Id"
ref=
"current"
></component>
</transition>
...
...
@@ -33,6 +33,13 @@
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 2"
@
click=
"componentsNumChange(4)"
>
从题库选择
</el-button
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 1 || this.componentsNum == 3"
...
...
@@ -58,6 +65,7 @@
import
Lesson
from
"./Lesson"
;
import
AddQuestion
from
"./AddQuestion"
;
import
QuestionList
from
"./QuestionList"
;
import
ChangeQuestion
from
"./ChangeQuestion"
;
export
default
{
name
:
"AnswerLesson"
,
...
...
@@ -70,7 +78,7 @@ export default {
type
:
Number
,
default
:
1
,
},
bank
Id
:
{
course
Id
:
{
type
:
Number
,
},
},
...
...
@@ -85,7 +93,7 @@ export default {
title
:
"录入课程"
,
currentComponent
:
Lesson
,
// 当前题目查看
subject
Id
:
null
,
topic
Id
:
null
,
};
},
watch
:
{
...
...
@@ -93,7 +101,7 @@ export default {
handler
(
num
)
{
if
(
num
===
1
)
{
this
.
currentComponent
=
Lesson
;
if
(
this
.
bank
Id
)
{
if
(
this
.
course
Id
)
{
this
.
title
=
"修改课程"
;
}
else
{
this
.
title
=
"新增课程"
;
...
...
@@ -102,13 +110,16 @@ export default {
this
.
currentComponent
=
QuestionList
;
this
.
title
=
"题目列表"
;
}
else
{
}
else
if
(
num
===
3
)
{
this
.
currentComponent
=
AddQuestion
;
if
(
this
.
subject
Id
)
{
if
(
this
.
topic
Id
)
{
this
.
title
=
"修改题目"
;
}
else
{
this
.
title
=
"新增题目"
;
}
}
else
if
(
num
==
4
)
{
this
.
currentComponent
=
ChangeQuestion
;
this
.
title
=
"从题库选题"
;
}
},
deep
:
true
,
...
...
@@ -121,8 +132,10 @@ export default {
text
=
"保存并录入题目"
;
}
else
if
(
this
.
componentsNum
==
2
)
{
text
=
"录入考题"
;
}
else
{
}
else
if
(
this
.
componentsNum
==
3
)
{
text
=
"保存并录入下一题"
;
}
else
{
text
=
"确定选择"
;
}
return
text
;
},
...
...
@@ -145,11 +158,15 @@ export default {
},
// 隐藏与显示dialog
dialogCancel
()
{
// 录入考题的时候不会有修改的缓存
if
(
this
.
topicId
)
{
this
.
topicId
=
null
;
}
this
.
$emit
(
"update:visible"
,
false
);
},
// 把ID改变了
changeCourseId
(
bank
Id
)
{
this
.
$emit
(
"update:
bankId"
,
bank
Id
);
changeCourseId
(
course
Id
)
{
this
.
$emit
(
"update:
courseId"
,
course
Id
);
},
// 改变当前组件
componentsNumChange
(
num
)
{
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/Lesson.vue
View file @
e1d166b3
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/QuestionList.vue
View file @
e1d166b3
...
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 17:56:05
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-12-
17 14:28:57
* @LastEditTime: 2022-12-
26 16:55:10
* @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
-->
...
...
@@ -10,9 +10,9 @@
<div
ref=
"myBody"
class=
"add-question flex"
>
<div
class=
"text flex"
>
<div
class=
"left"
>
目前有
<span>
{{
questionNum
||
0
}}
</span
目前有
<span>
{{
questionNum
}}
</span
>
道题
<
!--
<span
class=
"warn"
>
温馨提示:发布课程前需要进行考试设置
</span>
--
>
<
span
class=
"warn"
>
温馨提示:发布课程前需要进行考试设置
</span
>
</div>
<div
class=
"right"
>
{{
courseName
}}
</div>
</div>
...
...
@@ -25,7 +25,7 @@
<div
class=
"td-wrapper"
>
<div
v-for=
"(item, index) in questionList"
:key=
"item.
subject
Id"
:key=
"item.
topic
Id"
class=
"td flex"
>
<div
class=
"left"
>
{{
index
+
1
}}
</div>
...
...
@@ -35,13 +35,13 @@
<div
class=
"right"
>
<div>
<el-button
@
click=
"edit(item.
subject
Id)"
@
click=
"edit(item.
topic
Id)"
icon=
"el-icon-edit"
type=
"text"
>
修改
</el-button
>
<el-button
@
click=
"deleteLesson(item.
subject
Id)"
@
click=
"deleteLesson(item.
topic
Id)"
icon=
"el-icon-delete"
type=
"text"
>
删除
</el-button
...
...
@@ -51,9 +51,8 @@
</div>
</div>
</div>
<!--
<div
class=
"rightNum flex"
>
<div
class=
"left"
>
录入考题
</div>
<div
class=
"rightNum flex"
>
<div
class=
"left"
>
考试设置
</div>
<div
class=
"middle flex"
>
<div
class=
"left-text"
>
答对题目大于
</div>
<div>
...
...
@@ -73,8 +72,8 @@
type=
"success"
>
保存
</el-button
>
</div>
</div>
-->
</div>
</div>
</div>
</
template
>
...
...
@@ -85,13 +84,10 @@ import {
changeLesson
,
getLessonById
,
}
from
"@/api/educationPlanExam/lessonsProgram"
;
import
{
listSubject
,
delSubject
}
from
"@/api/educationPlanExam/subject"
;
import
{
getBank
}
from
"@/api/educationPlanExam/questionBank"
;
export
default
{
name
:
"AnswerLesson"
,
props
:
{
bank
Id
:
{
course
Id
:
{
type
:
Number
,
},
},
...
...
@@ -118,11 +114,11 @@ export default {
// },
created
()
{
console
.
log
(
"this.
bankId"
,
this
.
bank
Id
);
if
(
this
.
bank
Id
)
{
this
.
getQuestion
({
bankId
:
this
.
bank
Id
});
console
.
log
(
"this.
courseId"
,
this
.
course
Id
);
if
(
this
.
course
Id
)
{
this
.
getQuestion
({
courseId
:
this
.
course
Id
});
// 获取只题目正确几题算过关
this
.
getLessonById
(
this
.
bank
Id
);
this
.
getLessonById
(
this
.
course
Id
);
}
},
methods
:
{
...
...
@@ -132,14 +128,13 @@ export default {
saveAndNext
()
{
this
.
$parent
.
$parent
.
componentsNumChange
(
3
);
},
getQuestion
(
bankId
)
{
console
.
log
(
bankId
);
return
listSubject
(
bankId
).
then
((
res
)
=>
{
console
.
log
(
"题库res"
,
res
);
getQuestion
(
courseId
)
{
return
getQuestion
(
courseId
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
questionList
=
res
.
rows
.
map
((
item
)
=>
{
return
{
subjectId
:
item
.
subject
Id
,
topicId
:
item
.
topic
Id
,
topicTitle
:
item
.
topicTitle
,
};
});
...
...
@@ -147,18 +142,18 @@ export default {
return
true
;
});
},
getLessonById
(
bank
Id
)
{
get
Bank
(
bank
Id
).
then
((
res
)
=>
{
//
console.log(res);
//
this.rightNum = res.data.qualifiedNum;
this
.
courseName
=
res
.
data
.
bank
Name
;
getLessonById
(
course
Id
)
{
get
LessonById
(
course
Id
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
rightNum
=
res
.
data
.
qualifiedNum
;
this
.
courseName
=
res
.
data
.
course
Name
;
});
},
edit
(
subject
Id
)
{
this
.
$emit
(
"update:
subjectId"
,
subject
Id
);
edit
(
topic
Id
)
{
this
.
$emit
(
"update:
topicId"
,
topic
Id
);
this
.
$parent
.
$parent
.
componentsNumChange
(
3
);
},
deleteLesson
(
subject
Id
)
{
deleteLesson
(
topic
Id
)
{
this
.
$confirm
(
"请确定删除该题"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
...
...
@@ -166,7 +161,7 @@ export default {
})
.
then
(()
=>
{
this
.
loading
=
true
;
return
del
Subject
(
subject
Id
);
return
del
eteQuestion
(
topic
Id
);
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -175,7 +170,7 @@ export default {
type
:
"success"
,
});
}
return
this
.
getQuestion
({
bankId
:
this
.
bank
Id
});
return
this
.
getQuestion
({
courseId
:
this
.
course
Id
});
})
.
finally
(()
=>
{
this
.
loading
=
false
;
...
...
@@ -192,7 +187,7 @@ export default {
return
;
}
changeLesson
({
bankId
:
this
.
bank
Id
,
courseId
:
this
.
course
Id
,
qualifiedNum
:
this
.
rightNum
,
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -200,6 +195,7 @@ export default {
message
:
"答题合格数修改成功"
,
type
:
"success"
,
});
this
.
$parent
.
$parent
.
$parent
.
getList
();
}
});
},
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/index.vue
View file @
e1d166b3
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