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
427974ec
Commit
427974ec
authored
Jan 21, 2022
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改滚动开班的样式
parent
20bc13a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
25 deletions
+50
-25
shift-form.vue
src/components/course/shift-form.vue
+38
-17
classHours.vue
src/pages/course/classHours.vue
+10
-6
workutaTeaching.vue
src/pages/course/workutaTeaching.vue
+2
-2
No files found.
src/components/course/shift-form.vue
View file @
427974ec
...
...
@@ -18,7 +18,7 @@
<div>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table
"
separator=
"none"
title=
"班次"
:data=
"shiftList"
dense
class=
"sticky-column-table
sticky-tow-column-table sticky-right-column-table"
separator=
"none"
title=
"班次"
:data=
"shiftList"
dense
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
班次
</div>
...
...
@@ -65,7 +65,7 @@
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"shiftOption.Name"
ref=
"Name"
class=
"col-12"
label=
"班次名称"
:rules=
"[val => !!val || '请填写班次名称']"
/>
</div>
<div
class=
"row wrap "
>
<div
class=
"row wrap "
v-if=
"shiftOption.Color==''"
>
<q-input
filled
stack-label
class=
"col-12"
label=
"背景颜色"
v-model=
"shiftOption.Color"
ref=
"color"
:rules=
"['anyColor']"
>
<
template
v-slot:append
>
<q-icon
name=
"colorize"
class=
"cursor-pointer"
>
...
...
@@ -137,6 +137,7 @@ export default {
msg
:
{
rowsPerPage
:
9999
,
},
colorlist
:[
'#f1c40f'
,
'#e67e22'
,
'#e74c3c'
,
'#f39c12'
,
'#d35400'
,
'#c0392b'
,
'#1abc9c'
,
'#2ecc71'
,
'#3498db'
,
'#9b59b6'
,
'#16a085'
,
'#27ae60'
,
'#2980b9'
,
'#8e44ad'
,],
//写死的颜色
columns
:
[
{
name
:
'Name'
,
...
...
@@ -150,18 +151,18 @@ export default {
align
:
'left'
,
field
:
'time'
},
{
name
:
'UpdateByName'
,
label
:
'操作人'
,
align
:
'left'
,
field
:
'UpdateByName'
},
{
name
:
'UpdateTime'
,
label
:
'操作时间'
,
align
:
'left'
,
field
:
'UpdateTime'
},
//
{
//
name: 'UpdateByName',
//
label: '操作人',
//
align: 'left',
//
field: 'UpdateByName'
//
},
//
{
//
name: 'UpdateTime',
//
label: '操作时间',
//
align: 'left',
//
field: 'UpdateTime'
//
},
{
name
:
'optioned'
,
label
:
'操作'
,
...
...
@@ -193,21 +194,42 @@ export default {
getScrollShiftList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
shiftList
=
res
.
Data
;
this
.
removeColor
()
if
(
res
.
Data
.
length
>
0
){
this
.
$emit
(
'getLists'
,
res
.
Data
)
}
}
})
},
removeColor
(){
this
.
shiftList
.
forEach
(
x
=>
{
this
.
colorlist
.
forEach
((
j
,
ji
)
=>
{
if
(
x
.
Color
==
j
){
this
.
colorlist
[
ji
]
=
''
}
})
})
console
.
log
(
this
.
colorlist
)
},
//新增修改班次
Editshift
(
obj
)
{
if
(
obj
)
{
this
.
shiftOption
=
JSON
.
parse
(
JSON
.
stringify
(
obj
)
)
;
}
else
{
let
Color
=
''
;
for
(
let
i
=
0
;
i
<
this
.
colorlist
.
length
;
i
++
){
let
x
=
this
.
colorlist
[
i
];
if
(
x
!=
''
){
Color
=
x
;
break
}
}
console
.
log
(
Color
)
this
.
shiftOption
=
{
Id
:
0
,
Name
:
''
,
color
:
''
,
Color
:
Color
,
StartTime
:
''
,
EndTime
:
''
,
};
...
...
@@ -216,8 +238,7 @@ export default {
},
onSubmit
(){
this
.
$refs
.
Name
.
validate
()
this
.
$refs
.
color
.
validate
()
if
(
!
this
.
$refs
.
Name
.
hasError
&&
!
this
.
$refs
.
color
.
hasError
)
{
if
(
!
this
.
$refs
.
Name
.
hasError
)
{
if
(
!
this
.
shiftOption
.
StartTime
){
this
.
$q
.
notify
({
type
:
'negative'
,
...
...
src/pages/course/classHours.vue
View file @
427974ec
...
...
@@ -43,7 +43,7 @@
color
:
#1f2329
;
}
.customMain
{
width
:
6
00px
!important
;
width
:
7
00px
!important
;
display
:
flex
;
flex-direction
:
column
;
height
:
100
vh
;
...
...
@@ -172,7 +172,7 @@
style=
"display: flex;align-items: center;margin-bottom: 10px;"
>
<el-input
v-model=
"x.Sort"
placeholder=
"排序"
type=
'number'
min=
"0"
style=
"width:
10
0px;margin-right: 5px;"
></el-input>
<el-input
v-model=
"x.Sort"
placeholder=
"排序"
type=
'number'
min=
"0"
style=
"width:
8
0px;margin-right: 5px;"
></el-input>
<el-time-select
class=
"q-mr-lg"
...
...
@@ -197,6 +197,7 @@
}"
placeholder=
"结束时间(格式00:00)"
></el-time-select>
<el-input
v-model=
"x.ClassHours"
placeholder=
"消耗课时"
type=
'number'
min=
"0"
style=
"width: 100px;margin-right: 5px;"
></el-input>
<q-btn
round
size=
"xs"
...
...
@@ -212,7 +213,7 @@
color=
"primary"
icon=
"add"
v-if=
"addMsg.TimeList.length == y + 1"
@
click=
"addMsg.TimeList.push({ Sort: 1, StartTime: '', EndTime: '', Minutes: 0, })"
@
click=
"addMsg.TimeList.push({ Sort: 1, StartTime: '', EndTime: '', Minutes: 0,
ClassHours:''
})"
style=
"margin-left: 10px;"
/>
</div>
...
...
@@ -336,7 +337,7 @@ export default {
this
.
addMsg
=
{
Id
:
0
,
Name
:
''
,
TimeList
:
[{
Sort
:
1
,
StartTime
:
''
,
EndTime
:
''
,
Minutes
:
0
,
}]
TimeList
:
[{
Sort
:
1
,
StartTime
:
''
,
EndTime
:
''
,
Minutes
:
0
,
ClassHours
:
''
}]
}
}
this
.
persistent
=
true
...
...
@@ -346,12 +347,15 @@ export default {
if
(
!
this
.
$refs
.
Name
.
hasError
){
for
(
let
i
=
0
;
i
<
this
.
addMsg
.
TimeList
.
length
;
i
++
){
let
x
=
this
.
addMsg
.
TimeList
[
i
]
if
(
x
.
Sort
==
''
||
x
.
Sort
==
''
||
x
.
Sort
<
0
){
if
(
x
.
Sort
==
''
||
x
.
Sort
==
null
||
x
.
Sort
<
0
){
x
.
Sort
=
0
}
if
(
x
.
Minutes
==
''
||
x
.
Minutes
==
''
||
x
.
Minutes
<
0
){
if
(
x
.
Minutes
==
''
||
x
.
Minutes
==
null
||
x
.
Minutes
<
0
){
x
.
Minutes
=
0
}
if
(
x
.
ClassHours
==
''
||
x
.
ClassHours
==
null
||
x
.
ClassHours
<
0
){
x
.
ClassHours
=
0
}
if
(
x
.
StartTime
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
...
...
src/pages/course/workutaTeaching.vue
View file @
427974ec
...
...
@@ -137,9 +137,9 @@
style=
"width: 100%;border:1px solid #E6E6E6;display: flex;align-items: center;justify-content: center;height: 60px;"
>
暂无数据
</div>
</div>
<div
style=
"width:100%;height: 50px;"
></div>
</div>
</
template
>
...
...
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