| | |
| | | |
| | | // 系统运行开关 |
| | | function systemSwitch() { |
| | | if (top.systemRunning){ |
| | | if (systemRunning){ |
| | | layer.prompt({title: '请输入口令,并停止 WCS 系统', formType: 1, shadeClose: true}, function(pass, idx){ |
| | | layer.close(idx); |
| | | doSwitch(0, pass); // 停止wcs系统 |
| | |
| | | if (res.data.status) { |
| | | $('#system-icon').attr("class", "system-icon-open"); |
| | | $('#system-run-desc').html("系统运行中..."); |
| | | top.systemRunning = true; |
| | | systemRunning = true; |
| | | } else { |
| | | $('#system-icon').attr("class", "system-icon-close"); |
| | | $('#system-run-desc').html("系统已停止!"); |
| | | top.systemRunning = false; |
| | | systemRunning = false; |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/login"; |
| | |
| | | if (res.data.status) { |
| | | $('#system-icon').attr("class", "system-icon-open"); |
| | | $('#system-run-desc').html("系统运行中..."); |
| | | top.systemRunning = true; |
| | | systemRunning = true; |
| | | } else { |
| | | $('#system-icon').attr("class", "system-icon-close"); |
| | | $('#system-run-desc').html("系统已停止!"); |
| | | top.systemRunning = false; |
| | | systemRunning = false; |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/login"; |