sbd-npm 1.4.39 → 1.4.41
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.
- package/package.json +1 -1
- package/status.js +14 -2
package/package.json
CHANGED
package/status.js
CHANGED
@@ -505,7 +505,7 @@ $(function () {
|
|
505
505
|
$("#task_add").prop('disabled', true);
|
506
506
|
Util.show_loading();
|
507
507
|
$("#task_tips").html("");
|
508
|
-
Util.post(location.pathname, {active_div: "task_add", "task_content": task_content}, function (j) {
|
508
|
+
Util.post(location.pathname, {active_div: "task_add", "task_content": task_content, machine_id: $("#task_machines").val()}, function (j) {
|
509
509
|
if (j["code"] && j["code"] === 1) {
|
510
510
|
Status.task_status = 1;
|
511
511
|
$("#task_add").html('任务处理中...').removeClass("btn-default").addClass("btn-warning");
|
@@ -554,9 +554,17 @@ $(function () {
|
|
554
554
|
},
|
555
555
|
|
556
556
|
fetch_task_data: function(is_init = 0) {
|
557
|
-
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init}, function (j) {
|
557
|
+
Util.post(location.pathname, {active_div: localStorage[Status.tab_token], is_init: is_init, machine_id: $("#task_machines").val()}, function (j) {
|
558
558
|
if (j["machines"]) {
|
559
559
|
Status.pack_machine_component("task_machines", j["machines"]);
|
560
|
+
if (j["machines"].length > 0) {
|
561
|
+
$("#task_machines").change(function() {
|
562
|
+
Util.show_loading();
|
563
|
+
$("#task_tips").html("");
|
564
|
+
$("#task_result").val("");
|
565
|
+
Status.fetch_task_data(0);
|
566
|
+
});
|
567
|
+
}
|
560
568
|
} else {
|
561
569
|
if (is_init === 1) {
|
562
570
|
$('#task_machines').html('<option value="">暂无Machine</option>');
|
@@ -601,6 +609,10 @@ $(function () {
|
|
601
609
|
clearTimeout(Status.task_timer_id);
|
602
610
|
}
|
603
611
|
Status.task_status = 0;
|
612
|
+
if (j["is_new"] && j["is_new"] === 1) {
|
613
|
+
$("#task_content").val("").prop('disabled', false);
|
614
|
+
$("#task_add").html('添加任务').prop('disabled', false).removeClass("btn-warning").addClass("btn-default");
|
615
|
+
}
|
604
616
|
}
|
605
617
|
Util.hide_tips();
|
606
618
|
});
|