Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
240 views
in Technique[技术] by (71.8m points)

jquery - BusLayout with dynamic

enter image description here

Hi Dears, how to draw the above layout image using the given JSON Data. I am developing a Project for online bus ticket reservation. For this project Bus Seat Layout should be shown after selecting Bus Type.

Please suggest to me how to develop a seat Layout.

 "SeatLayoutDetails": {
  "LayoutFlag": 1,
  "SeatLayout": {
    "SeatColumns": [
      {
        "Seats": [
          {
            "SeatNo": "L1",   
            "SeatTypeId": 5,                
            "BerthType": "L",
          
          },
          {
            "SeatNo": "L2",
            "SeatTypeId": 5,
            "BerthType": "L",
          
          },
          null,
          {
            "SeatNo": "L3",
            "SeatTypeId": 5,
            "BerthType": "L",
         
          },
          null
        ]
      },
      {
        "Seats": [
          {
            "SeatNo": "L4",
            "SeatTypeId": 5,
            "BerthType": "L",
          
          },
          {
            "SeatNo": "L5",
            "SeatTypeId": 5,
            "BerthType": "L",
          
          },
          null,
          {
            "SeatNo": "L6",
            "SeatTypeId": 5,
            "BerthType": "L",
          
          },
          null
        ]
      },
      {
        "Seats": [
          {
            "SeatNo": "L7",
            "SeatTypeId": 5,
            "BerthType": "L",
        
          },
          {
            "SeatNo": "L8",
            "SeatTypeId": 5,
            "BerthType": "L",
           
          },
          null,
          {
            "SeatNo": "L9",
            "SeatTypeId": 5,
            "BerthType": "L",
            
          },
          null
        ]
      },
      {
        "Seats": [
          {
            "SeatNo": "L10",
            "SeatTypeId": 5,
            "BerthType": "L",
           
          },
          {
            "SeatNo": "L11",
            "SeatTypeId": 5,
            "BerthType": "L",
          
          },
          null,
          {
            "SeatNo": "L12",
            "SeatTypeId": 5,
            "BerthType": "L",
           
          },
          null
        ]
      },
      {
        "Seats": [
          {
            "SeatNo": "L13",
            "SeatTypeId": 5,
            "BerthType": "L",
         
          },
          {
            "SeatNo": "L14",
            "SeatTypeId": 5,
            "BerthType": "L",
           
          },
          null,
          {
            "SeatNo": "L15",
            "SeatTypeId": 5,
            "BerthType": "L",
           
          },
          null
        ]
      },
      {
        "Seats": [
          null,
          {
            "SeatNo": "U16",
            "SeatTypeId": 5,
            "BerthType": "U",
        
          },
          {
            "SeatNo": "U17",
            "SeatTypeId": 5,
            "BerthType": "U",
          
          },
          null,
          {
            "SeatNo": "U18",
            "SeatTypeId": 5,
            "BerthType": "U",
       
          },
          null
        ]
      },
      {
        "Seats": [
          null,
          {
            "SeatNo": "U19",
            "SeatTypeId": 5,
            "BerthType": "U",
         
          },
          {
            "SeatNo": "U20",
            "SeatTypeId": 5,
            "BerthType": "U",
           
          },
          null,
          {
            "SeatNo": "U21",
            "SeatTypeId": 5,
            "BerthType": "U",
        
          },
          null
        ]
      },
      {
        "Seats": [
          null,
          {
            "SeatNo": "U22",
            "SeatTypeId": 5,
            "BerthType": "U",
          
          },
          {
            "SeatNo": "U23",
            "SeatTypeId": 5,
            "BerthType": "U",
           
          },
          null,
          {
            "SeatNo": "U24",
            "SeatTypeId": 5,
            "BerthType": "U",
        
          },
          null
        ]
      },
      {
        "Seats": [
          null,
          {
            "SeatNo": "U25",
            "SeatTypeId": 5,
            "BerthType": "U",
        
          },
          {
            "SeatNo": "U26",
            "SeatTypeId": 5,
            "BerthType": "U",
          
          },
          null,
          {
            "SeatNo": "U27",
            "SeatTypeId": 5,
            "BerthType": "U",
     
          },
          null
        ]
      },
      {
        "Seats": [
          null,
          {
            "SeatNo": "U28",
            "SeatTypeId": 5,
            "BerthType": "U",
        
          },
          {
            "SeatNo": "U29",
            "SeatTypeId": 5,
            "BerthType": "U",
        
          },
          null,
          {
            "SeatNo": "U30",
            "SeatTypeId": 5,
            "BerthType": "U",
          
          },
          null
        ]
      }
    ]
  },

Thank you Advance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...