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
8adfa21a
Commit
8adfa21a
authored
May 10, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增删除功能
parent
e9f5a652
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
250 additions
and
13 deletions
+250
-13
classManage.vue
src/pages/course/classManage.vue
+71
-5
course.vue
src/pages/course/course.vue
+69
-6
employment.vue
src/pages/studyAbroad/employment.vue
+56
-1
studyabroad.vue
src/pages/studyAbroad/studyabroad.vue
+54
-1
No files found.
src/pages/course/classManage.vue
View file @
8adfa21a
...
...
@@ -94,12 +94,34 @@
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"订单中心"
@
click=
"gotoOrder(props.row)"
></q-btn>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
@
click=
"goPayment(props.row)"
style=
"font-weight:400"
label=
"收支明细"
></q-btn>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditCourse(props.row)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"gotoOrder(props.row)"
>
<q-item-section>
<q-item-label>
订单中心
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"goPayment(props.row)"
>
<q-item-section>
<q-item-label>
收支明细
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeClass(props.row,1)"
v-if=
"props.row.Status==0"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeClass(props.row,0)"
v-if=
"props.row.Status==1"
>
<q-item-section>
<q-item-label>
恢复
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</
template
>
</q-table>
...
...
@@ -118,8 +140,10 @@
}
from
'../../api/course/class'
;
//获取校区列表
import
{
getSchoolDropdown
getSchoolDropdown
,
deleteClass
}
from
'../../api/school/index'
;
import
classForm
from
'../../components/course/class-form'
;
import
classinfoForm
from
'../../components/course/classinfo-form'
;
export
default
{
...
...
@@ -224,6 +248,48 @@
this
.
getClassList
();
},
methods
:
{
//删除班级
removeClass
(
item
,
status
)
{
let
delMsg
=
{
ClassId
:
item
.
ClassId
,
Status
:
status
};
var
message
=
"是否要删除该班级?"
;
if
(
status
==
0
)
{
message
=
"是否要恢复该班级?"
;
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteClass
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getClassList
();
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
}).
onCancel
(()
=>
{
});
},
//当前点击的班级
getClassItem
(
item
)
{
this
.
isShowEdit
=
true
;
...
...
src/pages/course/course.vue
View file @
8adfa21a
...
...
@@ -119,7 +119,7 @@
</
template
>
<
template
v-slot:body-cell-Status=
"props"
>
<q-td
:props=
"props"
>
<q-badge
:color=
"props.value == 1 ? 'negative' : 'primary'"
:label=
"props.value == 0 ? '正常' : '
禁用
'"
/>
<q-badge
:color=
"props.value == 1 ? 'negative' : 'primary'"
:label=
"props.value == 0 ? '正常' : '
删除
'"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
...
...
@@ -132,8 +132,25 @@
@
click=
"EditCourse(props.row, 1)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"价格设置"
@
click=
"EditCourse(props.row, 2)"
v-if=
"isHavePriceAction"
/>
<!--
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400;"
label=
"详情"
@
click=
"goMycourse(props.row)"
/>
-->
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"DeleteCourse(props.row,1)"
v-if=
"props.row.Status==0"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"DeleteCourse(props.row,0)"
v-if=
"props.row.Status==1"
>
<q-item-section>
<q-item-label>
恢复
</q-item-label>
</q-item-section>
</q-item>
<q-item
style=
"display:none;"
clickable
v-close-popup
@
click=
"goMycourse(props.row)"
>
<q-item-section>
<q-item-label>
详情
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</
template
>
</q-table>
...
...
@@ -149,7 +166,8 @@
<
script
>
import
{
queryCoursePage
,
queryCourseCategoryTree
queryCourseCategoryTree
,
deleteCourseInfo
}
from
"../../api/course/index"
;
import
courseForm
from
"../../components/course/course-form"
;
import
coursepriceForm
from
"../../components/course/courseprice-form"
;
...
...
@@ -285,7 +303,7 @@
CourseName
:
""
,
QCateIds
:
""
,
IsQPrice
:
1
,
Status
:
"
-1
"
Status
:
"
0
"
},
//课程分类树形列表
TreeCategoryList
:
[],
...
...
@@ -299,7 +317,8 @@
},
computed
:
mapState
({
isHavePriceAction
(
state
)
{
if
(
state
.
user
.
userInfo
&&
state
.
user
.
userInfo
.
ActionMenuList
&&
state
.
user
.
userInfo
.
ActionMenuList
.
length
>
0
)
{
if
(
state
.
user
.
userInfo
&&
state
.
user
.
userInfo
.
ActionMenuList
&&
state
.
user
.
userInfo
.
ActionMenuList
.
length
>
0
)
{
let
action
=
state
.
user
.
userInfo
.
ActionMenuList
.
find
(
x
=>
{
if
(
x
.
FunctionCode
==
"Edit_CoursePrice"
)
{
return
x
;
...
...
@@ -316,6 +335,48 @@
this
.
getcourselist
();
},
methods
:
{
//删除课程
DeleteCourse
(
item
,
status
)
{
let
delMsg
=
{
CourseId
:
item
.
CourseId
,
Status
:
status
};
var
message
=
"是否要删除该课程?"
;
if
(
status
==
0
)
{
message
=
"是否要恢复该课程?"
;
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteCourseInfo
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getcourselist
();
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
}).
onCancel
(()
=>
{
});
},
gotoSub
(
obj
,
routeStr
)
{
var
tempStr
=
"/course/"
+
routeStr
+
"?CourseId="
+
obj
.
CourseId
;
this
.
$router
.
push
({
...
...
@@ -403,7 +464,9 @@
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
</
style
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/studyAbroad/employment.vue
View file @
8adfa21a
...
...
@@ -179,6 +179,18 @@
<q-item-label>
下架
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeStudy(props.row,1)"
v-if=
"props.row.Status==0"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeStudy(props.row,0)"
v-if=
"props.row.Status==1"
>
<q-item-section>
<q-item-label>
恢复
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-list>
</q-btn-dropdown>
</q-td>
...
...
@@ -214,7 +226,8 @@
import
{
queryStudyAbroadPage
,
saveSaleState
,
querySaleStateList
querySaleStateList
,
deleteStudyAbroad
}
from
'../../api/studyabroad/index'
import
studyAbroadForm
from
'../../components/studyAbroad/studyAbroad-form'
import
studyAbroadpriceForm
from
'../../components/studyAbroad/studyAbroadprice-form'
...
...
@@ -375,6 +388,48 @@
}
},
methods
:
{
//删除留学就业产品
removeStudy
(
item
,
status
)
{
let
delMsg
=
{
Id
:
item
.
Id
,
Status
:
status
};
var
message
=
"是否要删除该产品?"
;
if
(
status
==
0
)
{
message
=
"是否要恢复该产品?"
;
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteStudyAbroad
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getList
();
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
}).
onCancel
(()
=>
{
});
},
//跳转到留学就业订单中心
GoToOrder
(
item
)
{
this
.
OpenNewUrl
(
"/studyAbroad/studyemploymentorder"
,
{
...
...
src/pages/studyAbroad/studyabroad.vue
View file @
8adfa21a
...
...
@@ -179,6 +179,16 @@
<q-item-label>
下架
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeStudy(props.row,1)"
v-if=
"props.row.Status==0"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"removeStudy(props.row,0)"
v-if=
"props.row.Status==1"
>
<q-item-section>
<q-item-label>
恢复
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
...
...
@@ -214,7 +224,8 @@
import
{
queryStudyAbroadPage
,
saveSaleState
,
querySaleStateList
querySaleStateList
,
deleteStudyAbroad
}
from
'../../api/studyabroad/index'
import
studyAbroadForm
from
'../../components/studyAbroad/studyAbroad-form'
import
studyAbroadpriceForm
from
'../../components/studyAbroad/studyAbroadprice-form'
...
...
@@ -376,6 +387,48 @@
}
},
methods
:
{
//删除留学就业产品
removeStudy
(
item
,
status
)
{
let
delMsg
=
{
Id
:
item
.
Id
,
Status
:
status
};
var
message
=
"是否要删除该产品?"
;
if
(
status
==
0
)
{
message
=
"是否要恢复该产品?"
;
}
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
deleteStudyAbroad
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getList
();
}
else
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
res
.
Message
,
position
:
'top'
})
}
})
}).
onCancel
(()
=>
{
});
},
//跳转到留学就业订单中心
GoToOrder
(
item
)
{
this
.
OpenNewUrl
(
"/studyAbroad/studyemploymentorder"
,
{
...
...
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