Commit 511efba4 authored by zhengke's avatar zhengke

2

parent 1ed26065
...@@ -260,10 +260,10 @@ ...@@ -260,10 +260,10 @@
arr.forEach(function (x) { arr.forEach(function (x) {
SeatData.push(x); SeatData.push(x);
}); });
var self = this;
function MyViewModel() { function MyViewModel() {
alert();
var self = this;
//定义数组对象 //定义数组对象
// self.SeatData = ko.observableArray([]); // self.SeatData = ko.observableArray([]);
self.InitSeat = function () { self.InitSeat = function () {
...@@ -389,7 +389,7 @@ ...@@ -389,7 +389,7 @@
self.reSeat = function (dataRowIndex) { self.reSeat = function (dataRowIndex) {
var dataList = SeatData(); var dataList = SeatData();
alert();
var col_input = $("#col_input").val(); var col_input = $("#col_input").val();
var newObj = self.clone(SeatData()[dataRowIndex]); var newObj = self.clone(SeatData()[dataRowIndex]);
if (newObj.noLenth > 0) if (newObj.noLenth > 0)
...@@ -406,7 +406,6 @@ ...@@ -406,7 +406,6 @@
if (flag) { if (flag) {
if ((i + 1) < middleIndex) { if ((i + 1) < middleIndex) {
if (newObj.ColumnArray[i].SeatClassStr == 'noSeat') { if (newObj.ColumnArray[i].SeatClassStr == 'noSeat') {
newObj.ColumnArray[i].attr('data-noSeat')=21;
leftArray.push('0'); leftArray.push('0');
} }
else { else {
...@@ -771,9 +770,7 @@ ...@@ -771,9 +770,7 @@
if ((leftFlag || rightFlag) && (topFlag || bottomFlag)) { if ((leftFlag || rightFlag) && (topFlag || bottomFlag)) {
selectedList.push(blockList[i]); selectedList.push(blockList[i]);
$(blockList[i]).removeClass('seat'); $(blockList[i]).removeClass('seat');
$(blockList[i]).removeClass('noSeat'); reSeat();
console.log(blockList[i].attr('data_row_id'),'aaaaaaaaaaaaaaaa');
//self.reSeat(parseInt(blockList[i].attr('data_row_id')) - 1);
if ($(blockList[i]).hasClass('seled')) { if ($(blockList[i]).hasClass('seled')) {
$(blockList[i]).removeClass('seled'); $(blockList[i]).removeClass('seled');
$(blockList[i]).addClass('seat'); $(blockList[i]).addClass('seat');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment