|
@@ -1,7 +1,36 @@
|
|
define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echarts-theme', 'template'], function ($, undefined, Backend, Datatable, Table, Echarts, undefined, Template) {
|
|
define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echarts-theme', 'template'], function ($, undefined, Backend, Datatable, Table, Echarts, undefined, Template) {
|
|
|
|
|
|
var Controller = {
|
|
var Controller = {
|
|
- index: function () {
|
|
|
|
|
|
+ index: function () {
|
|
|
|
+ //扫模拟器描
|
|
|
|
+ $(document).on("click",".btn-scanning",function () {
|
|
|
|
+ var index = Layer.load(2, {
|
|
|
|
+ shade: [0.5,'#393D49'],
|
|
|
|
+ content: '正在进行模拟器扫描,请稍后...', // 这里是加载的文字
|
|
|
|
+ });
|
|
|
|
+ $(".content").val('');
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: Config.url_type+"/sim/debug/debugScanAllSeat/",
|
|
|
|
+ type: 'get',
|
|
|
|
+ success: function (data) {
|
|
|
|
+ if(data.code==200){
|
|
|
|
+ var option_tr = '<option value="">请选择</option>';
|
|
|
|
+ var ret = data.data;
|
|
|
|
+ for (var i = 0; i < ret.length; i++) {
|
|
|
|
+ option_tr += '<option value="'+ret[i].simType+'" seat="'+ret[i].seatId+'">'+ret[i].text+'</option>';
|
|
|
|
+ }
|
|
|
|
+ $(".simNum1").html(option_tr)
|
|
|
|
+ $(".content").val('模拟器扫描'+data.msg);
|
|
|
|
+ Layer.close(index);
|
|
|
|
+ }else{
|
|
|
|
+ Layer.alert(data.msg);
|
|
|
|
+ Layer.close(index);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
//选择设备编号
|
|
//选择设备编号
|
|
$(document).on("change", ".simNum1", function () {
|
|
$(document).on("change", ".simNum1", function () {
|
|
var customValue = $('.simNum1 option:selected').val();
|
|
var customValue = $('.simNum1 option:selected').val();
|
|
@@ -28,7 +57,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echart
|
|
});
|
|
});
|
|
//通过simNum清除一台模拟器所有故障
|
|
//通过simNum清除一台模拟器所有故障
|
|
$(document).on("click", ".btn-clear-fault", function () {
|
|
$(document).on("click", ".btn-clear-fault", function () {
|
|
- var customValue = $('.simNum1 option:selected').text();
|
|
|
|
|
|
+ var customValue = $('.simNum1 option:selected').attr('seat');
|
|
if(customValue=='请选择'){
|
|
if(customValue=='请选择'){
|
|
Layer.alert('选择设备编号');
|
|
Layer.alert('选择设备编号');
|
|
return;
|
|
return;
|
|
@@ -95,7 +124,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echart
|
|
|
|
|
|
//下发故障
|
|
//下发故障
|
|
$(document).on("click", ".btn-issued-fault", function () {
|
|
$(document).on("click", ".btn-issued-fault", function () {
|
|
- var customValue = $('.simNum1 option:selected').text();
|
|
|
|
|
|
+ var customValue = $('.simNum1 option:selected').attr('seat');
|
|
if(customValue=='请选择'){
|
|
if(customValue=='请选择'){
|
|
Layer.alert('选择设备编号');
|
|
Layer.alert('选择设备编号');
|
|
return;
|
|
return;
|
|
@@ -108,6 +137,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echart
|
|
shade: [0.5,'#393D49'],
|
|
shade: [0.5,'#393D49'],
|
|
content: '正在检查模拟器并下发故障,请稍后...', // 这里是加载的文字
|
|
content: '正在检查模拟器并下发故障,请稍后...', // 这里是加载的文字
|
|
});
|
|
});
|
|
|
|
+ console.log(Config.url_type+"/sim/debug/debugWriteSelectedFaultBySimNum/"+customValue+"/"+rel_Ids+"?checkReplace=false");
|
|
$.ajax({
|
|
$.ajax({
|
|
url: Config.url_type+"/sim/debug/debugWriteSelectedFaultBySimNum/"+customValue+"/"+rel_Ids+"?checkReplace=false",
|
|
url: Config.url_type+"/sim/debug/debugWriteSelectedFaultBySimNum/"+customValue+"/"+rel_Ids+"?checkReplace=false",
|
|
type: 'get',
|
|
type: 'get',
|
|
@@ -149,7 +179,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'table', 'echarts', 'echart
|
|
|
|
|
|
//读取当前状态
|
|
//读取当前状态
|
|
$(document).on("click", ".btn-read-fault", function () {
|
|
$(document).on("click", ".btn-read-fault", function () {
|
|
- var customValue = $('.simNum1 option:selected').text();
|
|
|
|
|
|
+ var customValue = $('.simNum1 option:selected').attr('seat');
|
|
if(customValue=='请选择'){
|
|
if(customValue=='请选择'){
|
|
Layer.alert('选择设备编号');
|
|
Layer.alert('选择设备编号');
|
|
return;
|
|
return;
|