Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Theater
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
吴春
Theater
Commits
03b0daa7
Commit
03b0daa7
authored
Jan 31, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
w
parent
d4f9b065
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
TheaterSeat.cshtml
...ll.Web/Areas/Admin/Views/TheaterManage/TheaterSeat.cshtml
+40
-3
No files found.
EheMall.Web/Areas/Admin/Views/TheaterManage/TheaterSeat.cshtml
View file @
03b0daa7
...
@@ -220,7 +220,7 @@
...
@@ -220,7 +220,7 @@
<div
class=
"row"
data-bind=
"foreach:{data:sItem.ColumnArray,as:'childItem'}"
>
<div
class=
"row"
data-bind=
"foreach:{data:sItem.ColumnArray,as:'childItem'}"
>
<span
class=
"seat"
data-bind=
"css:{'oneArea':childItem.SeatClassStr=='oneArea','twoArea':childItem.SeatClassStr=='twoArea',
<span
class=
"seat"
data-bind=
"css:{'oneArea':childItem.SeatClassStr=='oneArea','twoArea':childItem.SeatClassStr=='twoArea',
'threeArea':childItem.SeatClassStr=='threeArea','specialArea':childItem.SeatClassStr=='specialArea','noSeat':childItem.SeatClassStr=='noSeat'},
'threeArea':childItem.SeatClassStr=='threeArea','specialArea':childItem.SeatClassStr=='specialArea','noSeat':childItem.SeatClassStr=='noSeat'},
text:childItem.col,attr:{ data_row_id: childItem.rowIndex, data_column_id: childItem.columnIndex}"
contenteditable=
"true"
></span>
text:childItem.col,attr:{ data_row_id: childItem.rowIndex, data_column_id: childItem.columnIndex
,data_col:childItem.col
}"
contenteditable=
"true"
></span>
</div>
</div>
</div>
</div>
<div
id=
"moveSelected"
></div>
<div
id=
"moveSelected"
></div>
...
@@ -239,7 +239,7 @@
...
@@ -239,7 +239,7 @@
<button
class=
"normalBtn"
data-bind=
"click:function(data, event) { SetArea('B', data, event) }"
>
设为乙区
</button>
<button
class=
"normalBtn"
data-bind=
"click:function(data, event) { SetArea('B', data, event) }"
>
设为乙区
</button>
<button
class=
"normalBtn"
data-bind=
"click:function(data, event) { SetArea('C', data, event) }"
>
设为丙区
</button>
<button
class=
"normalBtn"
data-bind=
"click:function(data, event) { SetArea('C', data, event) }"
>
设为丙区
</button>
<button
class=
"normalBtn"
data-bind=
"click:function(data, event) { SetArea('D', data, event) }"
>
设为特区
</button>
<button
class=
"normalBtn"
data-bind=
"click:function(data, event) { SetArea('D', data, event) }"
>
设为特区
</button>
<button
class=
"normalBtn"
data-bind=
"click:function(data, event) { SetArea('E', data, event) }"
>
设为过道
</button>
<button
class=
"normalBtn"
data-bind=
"click:function(data, event) { SetArea('E', data, event)
,reSeat()
}"
>
设为过道
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -349,9 +349,42 @@
...
@@ -349,9 +349,42 @@
};
};
self
.
reSeat
=
function
()
{
self
.
reSeat
=
function
()
{
//console.log(SeatData(),'sssss');
var
dataList
=
SeatData
();
console
.
log
(
dataList
,
'dataList'
);
for
(
var
i
=
0
;
i
<
dataList
.
length
;
i
++
)
{
var
jiArr
=
[];
var
ouArr
=
[];
if
(
dataList
[
i
].
noLenth
>
0
)
{
var
newObj
=
self
.
clone
(
SeatData
()[
i
]);
for
(
var
j
=
0
;
j
<
newObj
.
noLenth
;
j
++
)
{
if
(
j
%
2
==
0
)
{
ouArr
.
push
(
j
+
1
);
}
else
{
jiArr
.
push
(
j
+
1
);
}
}
jiArr
.
reverse
();
newObj
.
myArr
=
jiArr
.
concat
(
ouArr
);
var
_index
=
0
;
for
(
var
k
=
0
;
k
<
newObj
.
ColumnArray
.
length
;
k
++
)
{
if
(
newObj
.
ColumnArray
[
k
].
SeatClassStr
!=
'noSeat'
)
{
newObj
.
ColumnArray
[
k
].
col
=
newObj
.
myArr
[
_index
];
_index
++
;
}
}
SeatData
.
replace
(
SeatData
()[
i
],
newObj
);
}
}
}
}
//用做ko更新数组某一项数据时的克隆,无需重新清空并绑定整个列表
self
.
clone
=
function
(
source
)
{
var
obj
=
{};
for
(
var
p
in
source
)
obj
[
p
]
=
source
[
p
];
return
obj
;
};
/**
/**
* 用做ko更新数组某一项数据时的克隆,无需重新清空并绑定整个列表
* 用做ko更新数组某一项数据时的克隆,无需重新清空并绑定整个列表
* */
* */
...
@@ -406,6 +439,7 @@
...
@@ -406,6 +439,7 @@
case
'A'
:
case
'A'
:
SeatData
()[
data_row
-
1
].
ColumnArray
[
data_column
-
1
].
SeatClassStr
=
"oneArea"
;
SeatData
()[
data_row
-
1
].
ColumnArray
[
data_column
-
1
].
SeatClassStr
=
"oneArea"
;
SeatData
()[
data_row
-
1
].
ColumnArray
[
data_column
-
1
].
AreaSeat
=
"jiaArea"
;
SeatData
()[
data_row
-
1
].
ColumnArray
[
data_column
-
1
].
AreaSeat
=
"jiaArea"
;
self
.
reSeat
();
$
(
this
).
removeClass
();
$
(
this
).
removeClass
();
$
(
this
).
addClass
(
"oneArea"
);
$
(
this
).
addClass
(
"oneArea"
);
break
;
break
;
...
@@ -432,6 +466,9 @@
...
@@ -432,6 +466,9 @@
SeatData
()[
data_row
-
1
].
ColumnArray
[
data_column
-
1
].
AreaSeat
=
"noArea"
;
SeatData
()[
data_row
-
1
].
ColumnArray
[
data_column
-
1
].
AreaSeat
=
"noArea"
;
$
(
this
).
removeClass
();
$
(
this
).
removeClass
();
$
(
this
).
addClass
(
"noSeat"
);
$
(
this
).
addClass
(
"noSeat"
);
var
_thisLen
=
$
(
this
).
parent
().
find
(
"span"
).
not
(
'.noSeat'
).
length
;
SeatData
()[
data_row
-
1
].
noLenth
=
_thisLen
;
SeatData
()[
data_row
-
1
].
myArr
=
[];
break
;
break
;
}
}
});
});
...
...
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