您好Knockout映射有问题。我已经尝试过了一些来自于有利于冒险的解决方案。代码如下:
{
"PanelDetails": [
{
"PanelID": 466,
"Panel": "581ZDPAD30D",
"PanelType": 2,
"Source": "S63B",
"Substation": "S63",
"Bay": "615W",
"Voltage": 480,
"kVA": 630,
"Utility": "N",
"Train": "B",
"Circuits": 12,
"Status": "Existing/Re-fed/Re-tag",
"Drawing": "IRAE-0326"
}
],
"DPanelCcts": [
{
"PanCctID": 1442,
"PanelID": 466,
"cct": 1,
"Base": 250,
"POCID": null,
"DateUpdated": null,
"Assigned": ""
},
{
"PanCctID": 1443,
"PanelID": 466,
"cct": 2,
"Base": 400,
"POCID": 38,
"DateUpdated": "/Date(1427842800000)/",
"Assigned": "EDT113-E04"
}
};
ko.applyBindings(new PanelViewVM());
JSON ajax响应是:
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['text.usetex'] = True
x = np.arange(10000, 10011)
plt.plot(x)
plt.show()
] }
在地图中,我试图返回PanelDetails对象数组。