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
c396b71f
Commit
c396b71f
authored
Dec 04, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
教室修改
parent
b6f65ed6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
7 deletions
+45
-7
classroom-form.vue
src/components/school/classroom/classroom-form.vue
+3
-2
classroom.vue
src/pages/school/classroom.vue
+42
-5
No files found.
src/components/school/classroom/classroom-form.vue
View file @
c396b71f
...
...
@@ -8,10 +8,10 @@
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
教室信息
</div>
<div
class=
"row wrap"
>
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"objOption.School_Id"
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
ref=
"School_Id"
:options=
"schoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6 q-pb-lg
q-pr-lg
"
emit-value
map-options
:rules=
"[val => !!val || '请选择所属校区']"
/>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.RoomName"
ref=
"RoomName"
class=
"col-6 q-pr-lg
q-pb-lg
"
label=
"教室名称"
:rules=
"[val => !!val || '请填写教室名称']"
/>
class=
"col-6 q-pr-lg"
label=
"教室名称"
:rules=
"[val => !!val || '请填写教室名称']"
/>
</div>
</q-card-section>
<q-separator
/>
...
...
@@ -45,6 +45,7 @@
RoomId
:
0
,
RoomName
:
""
,
//教室名称
School_Id
:
0
,
//校区编号
Status
:
-
1
,
//状态
},
optionTitle
:
""
,
schoolList
:
[],
...
...
src/pages/school/classroom.vue
View file @
c396b71f
...
...
@@ -10,6 +10,10 @@
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.School_Id"
:options=
"schoolList"
emit-value
map-options
label=
"关联校区"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.Status"
:options=
"StatusOpts"
option-value=
"value"
option-label=
"label"
label=
"状态"
emit-value
map-options
/>
</div>
</div>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
icon=
"add"
label=
"新增教室"
@
click=
"EditClassRoom(null)"
/>
...
...
@@ -54,10 +58,16 @@
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<div
style=
"min-width:190px;width:100%"
>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
color=
"negative"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"删除"
@
click=
"removeClassRoom(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"EditClassRoom(props.row)"
/>
<template
v-if=
"props.row.Status==0"
>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
color=
"negative"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"删除"
@
click=
"removeClassRoom(props.row,1)"
/>
</
template
>
<
template
v-if=
"props.row.Status==1"
>
<q-btn
flat
size=
"xs"
icon=
"iconfont icon-shanchu"
color=
"negative"
style=
"font-weight:400"
class=
"q-mr-xs"
label=
"恢复"
@
click=
"removeClassRoom(props.row,0)"
/>
</
template
>
</div>
</q-td>
</template>
...
...
@@ -97,6 +107,12 @@
field
:
'SchoolName'
,
align
:
'left'
},
{
name
:
'StatusStr'
,
label
:
'状态'
,
align
:
'left'
,
field
:
'StatusStr'
},
{
name
:
'UpdateByName'
,
label
:
'操作人'
,
...
...
@@ -123,11 +139,25 @@
rowsPerPage
:
12
,
RoomName
:
""
,
School_Id
:
0
,
//校区编号
Status
:
'-1'
,
//状态
},
pageCount
:
0
,
isShowEditClassRoomForm
:
false
,
classRoomOption
:
null
,
schoolList
:
[],
//校区列表
StatusOpts
:
[{
label
:
'全部'
,
value
:
'-1'
},
{
label
:
'正常'
,
value
:
'0'
},
{
label
:
'删除'
,
value
:
'1'
}
],
}
},
created
()
{
...
...
@@ -160,11 +190,17 @@
this
.
getClassRoomPage
();
},
//删除教室
removeClassRoom
(
obj
)
{
removeClassRoom
(
obj
,
status
)
{
let
that
=
this
;
var
message
=
""
;
if
(
status
==
1
)
{
message
=
"您正在进行删除【"
+
obj
.
RoomName
+
"】行为,一旦执行无法找回,是否确认执行?"
;
}
else
{
message
=
"您正在进行恢复【"
+
obj
.
RoomName
+
"】,是否确认执行?"
;
}
this
.
$q
.
dialog
({
title
:
"删除教室"
,
message
:
"你正在进行删除【"
+
obj
.
RoomName
+
"】行为,一旦执行无法找回,是否确认执行?"
,
message
:
message
,
isShowEditClassRoomForm
:
true
,
cancel
:
{
label
:
"取消"
,
...
...
@@ -177,7 +213,8 @@
}
}).
onOk
(()
=>
{
var
delMsg
=
{
RoomId
:
obj
.
RoomId
RoomId
:
obj
.
RoomId
,
Status
:
status
};
deleteClassRoomInfo
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
...
...
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