Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
accdc1ed
Commit
accdc1ed
authored
Apr 07, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
1f3d81ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
17 deletions
+97
-17
index.js
src/api/teacher/index.js
+25
-0
assess-form.vue
src/components/teacher/assess-form.vue
+30
-11
assessmentType.vue
src/pages/teacher/assessmentType.vue
+42
-6
No files found.
src/api/teacher/index.js
View file @
accdc1ed
...
...
@@ -483,6 +483,31 @@ export function SetAssessmentType(data) {
})
}
/**
* 删除列表数据
* @param {*} data
*/
export
function
RemoveAssessmentType
(
data
)
{
return
request
({
url
:
'/TeacherAssessment/RemoveAssessmentType'
,
method
:
'post'
,
data
})
}
/**
* 删除子类数据
* @param {*} data
*/
export
function
RemoveAssessmentSubtype
(
data
)
{
return
request
({
url
:
'/TeacherAssessment/RemoveAssessmentSubtype'
,
method
:
'post'
,
data
})
}
...
...
src/components/teacher/assess-form.vue
View file @
accdc1ed
...
...
@@ -39,7 +39,8 @@
</div>
</div>
<div
v-for=
"(item,index) in addMsg.SubtypeList"
class=
"row wrap childConfig"
>
<q-btn
size=
"10px"
@
click=
"delChild(index)"
class=
"SubChild"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
<q-btn
size=
"10px"
@
click=
"delChild(item,index)"
class=
"SubChild"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
<div
class=
"col-12 q-pr-lg q-pb-lg"
>
<q-input
filled
v-model=
"item.SubTypeName"
ref=
"SubTypeName"
label=
"标题"
></q-input>
</div>
...
...
@@ -73,7 +74,8 @@
<
script
>
import
{
SetAssessmentType
,
GetAssessmentType
GetAssessmentType
,
RemoveAssessmentSubtype
}
from
'../../api/teacher/index'
;
export
default
{
...
...
@@ -102,17 +104,17 @@
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Id
>
0
)
{
let
obj
=
{
Id
:
this
.
saveObj
.
Id
}
Id
:
this
.
saveObj
.
Id
}
GetAssessmentType
(
obj
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
addMsg
=
res
.
Data
;
if
(
res
.
Code
==
1
)
{
this
.
addMsg
=
res
.
Data
;
}
})
}
else
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
TypeName
=
''
;
this
.
addMsg
.
SubtypeList
=
[];
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
TypeName
=
''
;
this
.
addMsg
.
SubtypeList
=
[];
}
},
//关闭弹窗
...
...
@@ -157,8 +159,25 @@
})
},
//删除子类
delChild
(
index
)
{
this
.
addMsg
.
SubtypeList
.
splice
(
index
,
1
);
delChild
(
obj
,
index
)
{
console
.
log
(
obj
,
'obj'
);
if
(
obj
.
Id
>
0
)
{
let
msg
=
{
Id
:
obj
.
Id
}
RemoveAssessmentSubtype
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据删除成功!'
,
position
:
'top'
})
this
.
addMsg
.
SubtypeList
.
splice
(
index
,
1
);
}
})
}
},
//删除孙类
delSun
(
index1
,
index2
)
{
...
...
src/pages/teacher/assessmentType.vue
View file @
accdc1ed
...
...
@@ -47,6 +47,7 @@
<
script
>
import
{
queryAssessmentTypeList
,
RemoveAssessmentType
}
from
'../../api/teacher/index'
;
import
assessForm
from
'../../components/teacher/assess-form'
export
default
{
...
...
@@ -81,8 +82,8 @@
}
],
dataList
:
[],
objOption
:
null
,
isShowAssess
:
false
objOption
:
null
,
isShowAssess
:
false
}
},
created
()
{
...
...
@@ -103,7 +104,7 @@
})
},
//新增修改
AddMsg
(
obj
){
AddMsg
(
obj
)
{
if
(
obj
)
{
this
.
objOption
=
obj
}
else
{
...
...
@@ -111,15 +112,50 @@
}
this
.
isShowAssess
=
true
;
},
getClose
(){
getClose
()
{
this
.
isShowAssess
=
false
;
},
getRefresh
(){
getRefresh
()
{
this
.
getAssessmentTypeList
();
},
//删除数据
delConsult
(
Id
)
{
let
that
=
this
;
this
.
$q
.
dialog
({
title
:
"提示"
,
message
:
'是否删除该配置?'
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
let
msg
=
{
Id
:
Id
}
RemoveAssessmentType
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
that
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据删除成功!'
,
position
:
'top'
})
that
.
getAssessmentTypeList
();
}
})
});
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
</
style
>
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