|
@@ -1,33 +1,45 @@
|
|
|
$(function () {
|
|
|
-
|
|
|
+
|
|
|
var urlParams = new URLSearchParams(window.location.search);
|
|
|
var examId = urlParams.get('examId');
|
|
|
var caseId = urlParams.get('caseId');
|
|
|
- $('table#report-list .collapse').click(function () {
|
|
|
- $(this).collapse('toggle');
|
|
|
- });
|
|
|
+ $('table#report-list .collapse').click(function () {
|
|
|
+ $(this).collapse('toggle');
|
|
|
+ });
|
|
|
|
|
|
var reportListTable = $('#report-list').DataTable({
|
|
|
searching: false,
|
|
|
pageLength: 25
|
|
|
});
|
|
|
-
|
|
|
- $('#assign-btn').click(function () {
|
|
|
+
|
|
|
+ $('#assign-btn').click(function () {
|
|
|
|
|
|
$(this).attr('disabled', true);
|
|
|
$(this).find('span').text('融合中...');
|
|
|
|
|
|
- $.get('/aggregate', {examId: examId, caseId: caseId}, function () {
|
|
|
- setInterval(function () {
|
|
|
- $.get('/agg_task_status', {examId: examId, caseId: caseId}, function(result) {
|
|
|
- if (result == 1) {
|
|
|
+ $.get('/aggregate', {examId: examId, caseId: caseId}, function () {
|
|
|
+ setInterval(function () {
|
|
|
+ $.get('/agg_task_status', {examId: examId, caseId: caseId}, function (result) {
|
|
|
+ if (result == 1) {
|
|
|
|
|
|
- agg_success();
|
|
|
- }
|
|
|
- });
|
|
|
- }, 10000)
|
|
|
+ agg_success();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, 10000)
|
|
|
});
|
|
|
- });
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#deliver-btn').click(function () {
|
|
|
+ if (confirm("是否确定全部交付?") == true) {
|
|
|
+ $(this).attr('disabled', true);
|
|
|
+ $(this).find('span').text('处理中...');
|
|
|
+ $.get('/appendBugToFinalReport', {examId: examId, caseId: caseId}, function () {
|
|
|
+
|
|
|
+ alert("处理完成");
|
|
|
+ location.reload();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
});
|
|
|
|
|
@@ -46,15 +58,15 @@ function agg_success() {
|
|
|
|
|
|
var _id = $(el).children('td.report-id').attr('value');
|
|
|
|
|
|
- $.get('/aggregate_info', { bugId: _id }, function(data) {
|
|
|
+ $.get('/aggregate_info', {bugId: _id}, function (data) {
|
|
|
var aggregator = data.masterId;
|
|
|
var printAggregator = 'ML-AG-' + data.masterId.substring(10);
|
|
|
|
|
|
function fadeInAggreagator() {
|
|
|
|
|
|
- if($.trim(aggregator)) {
|
|
|
+ if ($.trim(aggregator)) {
|
|
|
$(el).children('td.report-aggregator').attr('value', aggregator);
|
|
|
- var aggregatorHtml = "<a href=/report?masterId="+aggregator+"&examId="+examId+"&caseId="+caseId+">"+printAggregator+"</a>";
|
|
|
+ var aggregatorHtml = "<a href=/report?masterId=" + aggregator + "&examId=" + examId + "&caseId=" + caseId + ">" + printAggregator + "</a>";
|
|
|
$(el).children('td.report-aggregator').html(aggregatorHtml).fadeIn(rand * 2);
|
|
|
}
|
|
|
}
|
|
@@ -62,7 +74,7 @@ function agg_success() {
|
|
|
function fadeInStatus() {
|
|
|
$(el).find('td:last').hide();
|
|
|
|
|
|
- if($.trim(aggregator)) {
|
|
|
+ if ($.trim(aggregator)) {
|
|
|
$(el).find('td:last').html('<i class=\'fa fa-check-circle text-inverse\'></i>').fadeIn(rand * 2);
|
|
|
$(el).find('td:last').addClass('row-success');
|
|
|
|
|
@@ -75,11 +87,11 @@ function agg_success() {
|
|
|
setTimeout(fadeInAggreagator, 0);
|
|
|
setTimeout(fadeInStatus, rand);
|
|
|
});
|
|
|
- }, rand * 3 *i);
|
|
|
+ }, rand * 3 * i);
|
|
|
});
|
|
|
|
|
|
|
|
|
setTimeout(function () {
|
|
|
location.reload();
|
|
|
- }, rand * 3 * (count+1));
|
|
|
+ }, rand * 3 * (count + 1));
|
|
|
};
|