sbd-npm 1.1.66 → 1.1.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/summary_daily.js +31 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.1.66",
3
+ "version": "1.1.67",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/summary_daily.js CHANGED
@@ -442,10 +442,11 @@ $(document).ready(function () {
442
442
  });
443
443
  // 成交概况数据
444
444
  let Modal = {
445
- data_type: "",
446
445
 
446
+ data_type: "",
447
447
  mo_start_time: 0,
448
448
  mo_end_time: 0,
449
+ p_change_data: [],
449
450
 
450
451
  render_market_overview_line: function (data, key, element_id, title, chart_instance) {
451
452
  let line_id = element_id + "_chart";
@@ -523,25 +524,8 @@ $(document).ready(function () {
523
524
  Util.post(location.pathname, payload, function (j) {
524
525
  Util.render_type_option($("#p_change_industry"), j["data"], "industry", Modal.render_stock_rate_html);
525
526
  Util.render_type_option($("#p_change_area"), j["data"], "area", Modal.render_stock_rate_html);
526
- let _html = [];
527
- let industry = $("#p_change_industry").val();
528
- let area = $("#p_change_area").val();
529
- let index = 0;
530
- j["data"].forEach(function (item) {
531
- if (Util.is_industry_area(item, industry, area)) {
532
- index++;
533
- _html.push("<tr>");
534
- _html.push("<td>", index, "</td>");
535
- _html = Util.stock_basics_html(_html, item);
536
- if (item["continue_top_day"]) {
537
- _html.push("<td title='连续涨停" + item["continue_top_day"] + "天'>", Util.parse_ratio(item["p_change"]), " <span class='badge alert-danger'>" + item["continue_top_day"] + "<span></td>");
538
- } else {
539
- _html.push("<td>", Util.parse_ratio(item["p_change"]), "</td>");
540
- }
541
- _html.push("</tr>");
542
- }
543
- });
544
- Util.render_table_html("stock_rate_table_body", _html);
527
+ Modal["p_change_data"] = j["data"];
528
+ Modal.render_stock_rate_html();
545
529
  $("#p_change_type").change(function () {
546
530
  if (!DailySummary.is_load) {
547
531
  $("#stock_rate_table_body").html("<tr><td colspan='9'>Loading...</td></tr>");
@@ -552,6 +536,31 @@ $(document).ready(function () {
552
536
  });
553
537
  },
554
538
 
539
+ render_stock_rate_html: function() {
540
+ let _html = [];
541
+ let industry = $("#p_change_industry").val();
542
+ let area = $("#p_change_area").val();
543
+ let index = 0;
544
+ Modal["p_change_data"].forEach(function (item) {
545
+ if (Util.is_industry_area(item, industry, area)) {
546
+ index++;
547
+ _html.push("<tr>");
548
+ _html.push("<td>", index, "</td>");
549
+ _html = Util.stock_basics_html(_html, item);
550
+ _html.push("<td>", Util.year_price_rate(item["stock_price"], item["year_price"]), "</td>");
551
+ _html.push("<td class='holder_", item["code"], "'>--</td>");
552
+ if (item["continue_top_day"]) {
553
+ _html.push("<td title='连续涨停" + item["continue_top_day"] + "天'>", Util.parse_ratio(item["p_change"]), " <span class='badge alert-danger'>" + item["continue_top_day"] + "<span></td>");
554
+ } else {
555
+ _html.push("<td>", Util.parse_ratio(item["p_change"]), "</td>");
556
+ }
557
+ _html.push("</tr>");
558
+ }
559
+ });
560
+ Util.render_table_html("stock_rate_table_body", _html);
561
+ Util.init_stock_stuff("stock_rate_table_body", [], 0, 0);
562
+ },
563
+
555
564
  render_news_modal: function () {
556
565
  Util.show_tips("Loading...");
557
566
  Util.post(location.pathname, {action: "pbc_news"}, function (j) {
@@ -591,6 +600,8 @@ $(document).ready(function () {
591
600
  {"name": "行业", "select_id": "p_change_industry"},
592
601
  {"name": "地区", "select_id": "p_change_area"},
593
602
  {"name": "当前价", "table_sort": 1},
603
+ {"name": "年初至今", "table_sort": 1},
604
+ {"name": "股东数", "table_sort": 1},
594
605
  {
595
606
  "name": "类型",
596
607
  "select_id": "p_change_type",