Просмотр исходного кода

#IQRV #comment [JS] 补充退出按钮流程

gifur 4 лет назад
Родитель
Сommit
03cbb03698

+ 47 - 5
addin/res/ManagerDesktop/css/emui-style.css

@@ -1221,15 +1221,24 @@ background-image: url('../images/ic_warning_small.png');
 background-position: left 0px;
 
 }
-.ic_succeed {
-    width: 24px;
-    height: 24px;
+.ic_succeed_large {
+    width: 74px;
+    height: 74px;
     cursor: pointer;
     background-repeat: no-repeat;
-    background-image: url('../images/ic_succeed.png');
+    background-image: url('../images/success.png');
     background-position: left 0px;
-    padding-right:5px;
+    padding-right:15px;
     }
+.ic_succeed {
+width: 24px;
+height: 24px;
+cursor: pointer;
+background-repeat: no-repeat;
+background-image: url('../images/ic_succeed.png');
+background-position: left 0px;
+padding-right:5px;
+}
 .ic_succeed_small {
 width: 16px;
 height: 16px;
@@ -4304,6 +4313,22 @@ overflow: hidden;
 background-repeat: no-repeat;
 background-image: url('../images/quit.png');
 }
+.ic_quit {
+    width: 32px;
+    height: 32px;
+    overflow: hidden;
+    cursor: pointer;
+    background-repeat: no-repeat;
+    background-image: url('../images/exit.png');
+    }
+    .ic_quit:hover {
+    width: 32px;
+    height: 32px;
+    cursor: pointer;
+    overflow: hidden;
+    background-repeat: no-repeat;
+    background-image: url('../images/exit.png');
+    }
 .ic_reboot {
 width: 32px;
 height: 32px;
@@ -4337,6 +4362,23 @@ background-repeat: no-repeat;
 background-image: url('../images/poweroff.png');
 }
 
+.ic_help_small {
+    width: 32px;
+    height: 32px;
+    overflow: hidden;
+    cursor: pointer;
+    background-repeat: no-repeat;
+    background-image: url('../images/ic_help.png');
+    }
+.ic_help_small:hover {
+width: 32px;
+height: 32px;
+overflow: hidden;
+cursor: pointer;
+background-repeat: no-repeat;
+background-image: url('../images/ic_help.png');
+}
+
 .ic_pcrestart {
     width: 32px;
     height: 32px;

+ 42 - 22
addin/res/ManagerDesktop/guide.html

@@ -40,11 +40,11 @@
                     <table class="pull-right" cellpadding="0" cellspacing="0" frame="void" rules="none">
                         <tbody>
                             <tr>
-                                <!-- <td id="header_upgrade_info" style="width:52px;" align="center">
-                                    <div title="版本更新" style="position: relative;"
-                                        class="ic_update_normal" onclick="test();">
+                                <td id="header_help_info" style="width:52px;" align="center">
+                                    <div title="解答帮助" style="position: relative;"
+                                        class="ic_help_small" onclick="test();">
                                     </div>
-                                </td> -->
+                                </td>
                                 <td style="width:52px;" align="center" id="reset_btn">
                                     <div title="配置重置" class="ic_reset"></div>
                                 </td>
@@ -60,8 +60,8 @@
                                     <div title="通过UPS关机" class="ic_upsoff"
                                         onclick="RVC.HealthmanagerEntityCtrl.UPSOffPC();"></div>
                                 </td> -->
-                                <td style="width:52px;border-left: 2px solid #A9A9A9;" align="center" id="quitpage_btn">
-                                    <div title="退出页面" class="ic_signout" id="quitpage_btn_div" onclick="quitThisPage();"></div>
+                                <td style="width:52px;" align="center" id="quitpage_btn">
+                                    <div title="退出配置" class="ic_quit" id="quitpage_btn_div"></div>
                                 </td>
                             </tr>
                         </tbody>
@@ -85,17 +85,17 @@
                                             <div id="guide_start_des1"class="text-left"></div>
                                             <div class="text-left" style="margin-top:10px;color:grey"">
                                                 <span style="font-weight:bold;">终端号注册</span>:
-                                                请确认<strong>已完成</strong>当前可视柜台设备的终端号注册
+                                                请确认<strong>已完成</strong>当前可视柜台设备的终端号注册
                                             </div>
                                             <div id="guide_start_des2" class="text-left" style="margin-top:10px"></div>
                                             <div class="text-left" style="margin-top:10px;color:grey"">
                                                 <span style="font-weight:bold;">网络设置</span>:
-                                                请确保当前设备终端已连接分行网络并配置为<strong>总行DNS</strong>地址
+                                                请确保当前设备终端已连接分行网络并配置为<strong>总行DNS</strong>地址
                                             </div>
                                             <div id="guide_start_des3" class="text-left" style="margin-top:10px"></div>
                                             <div class="text-left" style="margin-top:10px;color:grey"">
                                                 <span style="font-weight:bold;">服务集中配置</span>:
-                                                请确认在分行服务器的集中配置文件中已配置<strong>业务访问</strong>地址。
+                                                请确认在分行服务器的集中配置文件中已配置<strong>业务访问</strong>链接
                                             </div>
                                             <div id="guide_start_detail_more" class="text-left" style="margin-top:10px"></div>
                                             <div class="text-left" style="margin-top:10px;color: #A9A9A9;"">
@@ -208,7 +208,7 @@
                                 <div class="pull-left input_normal text-left">
                                     <input id="guide_server_ip" type="text" autocomplete="off"
                                         onfocus="showInputBorder(this)" onblur="hideInputBorder(this)"
-                                        oncontextmenu="return false;" maxlength="16" value="55.14.131.137">
+                                        oncontextmenu="return false;" maxlength="16" value="">
                                 </div>
                             </div>
                             <div id="guide_init_param_ip_check" class="pull-left margin-left-10"
@@ -227,7 +227,7 @@
                                 </div>
                                 <div class="controls text-left">
                                     <div id="gui_init_param_vendor" class="select_on_normal vendor_seleceed_save_btn"
-                                        onclick="SelectItem(this)" value="None"></div>
+                                        onclick="SelectItem(this)" value=""></div>
                                     <div id="gui_init_param_vendor_list" class="select_list hide">
                                         <div id="gui_init_param_vendor_list_item_0" option="CW" class="select_medium">
                                             恒银金融
@@ -274,9 +274,10 @@
                                     </div>
                                 </div>
                                 <div class="pull-left input_normal text-left">
-                                    <input id="guide_init_param_terminalno" type="text" autocomplete="off" placeholder=""
+                                    <input id="guide_init_param_terminalno" type="text" autocomplete="off"
+                                     placeholder="请输入终端号"
                                         onfocus="showInputBorder(this)" onblur="hideInputBorder(this)"
-                                        oncontextmenu="return false;" maxlength="10" value="7555980103">
+                                        oncontextmenu="return false;" maxlength="10" value="">
                                 </div>
                             </div>
                             <div id="guide_init_param_terminalno_tips" class="clearboth">
@@ -608,7 +609,7 @@
                                 <div class="pull-left input_normal text-left">
                                     <input id="guide_sync_centersetting_server_ip_content" type="text" autocomplete="off"
                                         onfocus="showInputBorder(this)" onblur="hideInputBorder(this)"
-                                        oncontextmenu="return false;" maxlength="16" value="55.14.131.137">
+                                        oncontextmenu="return false;" maxlength="16" value="">
                                 </div>
                             </div>
                             <div id="guide_sync_centersetting_ip_tips" class="clearboth">
@@ -625,7 +626,7 @@
                                 <div class="pull-left input_normal text-left">
                                     <input id="guide_sync_centersetting_port_content" type="text" autocomplete="off" placeholder=""
                                         onfocus="showInputBorder(this)" onblur="hideInputBorder(this)"
-                                        oncontextmenu="return false;" maxlength="4" value="6024">
+                                        oncontextmenu="return false;" maxlength="4" value="">
                                 </div>
                             </div>
                             <div id="guide_sync_centersetting_port_tips" class="clearboth">
@@ -796,20 +797,39 @@
                                     应用正在重启,请稍候…</div>
                             </div>
                         </div>
+                        <div id="guide_quit_loading" class="hide">
+                            <div style="padding-top:130px;" align="center">
+                                <div><img src="./images/submiting.gif"></div>
+                                <div style="padding-top:16px;" id="guide_quit_loading_info">
+                                    应用正在退出,请稍候…</div>
+                            </div>
+                        </div>
                     </div>
                     <div class="guide_table_bottom">&nbsp;</div>
                 </div>
             </div>
             <div class="clearboth"></div>
-            <div id="guide_finish_page" style="margin: 0px auto; width: 1000px; padding-top: 280px; display: none;">
-                <div id="guide_finish_containter" style="margin:0 auto;position:relative;">
-                    <div style="margin: 0 auto;width:1000px;position:absolute" class="captive_guide">
-                        <div class="guide_step_finish_title"
-                        style="padding-top:120px; font-size:28px; font-weight:bold; color:#32CD32; padding-left:25px;">
-                            安装完成!</div>
-                        <div class="btn_normal_long" id="guide_finish_restart_btn"
+            <div id="guide_finish_page" style="margin: 0px auto; width: 1000px; padding-top: 133px; display: none;">
+                <div id="guide_finish_content" style="margin:0 auto;position:absolute;">
+                    <div class="guide_table_top">&nbsp;</div>
+                    <div class="margin_bottom_box2 color_background_white" style="min-height:556px;">
+                        <div style="padding-top:20px;height:48px;" class="border_bottom" align="center">
+                            <div style="font-size:18px;">&nbsp;</div>
+                        </div>
+                        <div align="center" id="guide_finished_div"
+                         style="padding-top:90px;width:690px;padding-left:80px; ">
+                            <div class="pull-left ic_succeed_large clearboth"></div>
+                            <div class="pull-left text-left" id="guide_finished_content"
+                             style="font-family:'HYQiHei 55S','HYQiHei-55S',sans-serif;width:540px;padding-top:2px;font-size:60px;">
+                                恭喜,;安装成功!
+                            </div>
+                        </div>
+                        <div class="clearboth" style="padding-top:50px">
+                            <div class="btn_normal_long" id="guide_finish_restart_btn"
                             style="line-height:44px;margin-top:50px;">点击以重启应用</div>
+                        </div>
                     </div>
+                    <div class="guide_table_bottom">&nbsp;</div>
                 </div>
             </div>
             <div class="clearboth"></div>

BIN
addin/res/ManagerDesktop/images/exit.png


BIN
addin/res/ManagerDesktop/images/ic_help.png


+ 31 - 15
addin/res/ManagerDesktop/js/guide.js

@@ -186,8 +186,6 @@ function LoadDeviceAdaptersWithEvent(flag)
     FulfillDevAdapterFileList(deviceName, vendorName, globalInterestRootFlag, flag);
 }
 
-
-
 function AdapterSelectChange(name)
 {
     $('#guide_adapter_config_port_input').val('');
@@ -287,6 +285,15 @@ function InterestRootSwitch(flag)
 }
 
 $(function () {
+
+    function AbortDeployConfig(finished) {
+        
+        RVC.HealthmanagerEntityCtrl.QuitApp(true);
+        RVC.GuideController.hideAllPage();
+        RVC.GuideController.hideAllRebootTipElem();
+        $('#guide_quit_loading').show();
+        $('#guide_reboot_page').show();
+    }
     
     function ResetDeployConfig() {
         let req = new Request();
@@ -428,6 +435,13 @@ $(function () {
         });
     }
 
+    function InitCenterSettingInputParam()
+    {
+        if(globalServerIP === '') {
+            GetTerminalBaseInfo();
+        }
+        $('#guide_sync_centersetting_server_ip_content').attr('value', globalServerIP);
+    }
 
     function InitCurrentVendorSelect()
     {
@@ -771,15 +785,13 @@ $(function () {
 
         console.log("check adapter: " + adapter + " " + port + " " + baudrate);
 
-        setTestBtnStatus(false);
         utilStartSubmitDialog();
         RVC.DeviceControlEntityCtrl.TestAdapterFileAvailable(req, function(ret) {
             utilStopSubmitDialog();
-            setTestBtnStatus(true);
             if(ret.errorCode === 0) {
                 let result = JSON.parse(ret[RVC.EntityController.sigResponseUUID])
                 if(result.status == 0) {
-                    utilStartAlertDialog("适配器文件成功加载尝试打开设备成功!");
+                    utilStartAlertDialog("适配器文件成功加载尝试打开设备成功!");
                 } else {
                     utilStartAlertDialog("验证失败:[" + result.status + "] " + result.msg);
                 }
@@ -978,7 +990,7 @@ $(function () {
         req.param5 = '';
         req.array1 = [0];
         req.array2 = [''];
-        req.options = 3; //安装字体
+        req.options = 0;
         req.additional = 0;
         req.restartApp = false;
         req.restartPC = false;
@@ -990,12 +1002,14 @@ $(function () {
                 let result = JSON.parse(ret[RVC.EntityController.sigResponseUUID])
                 if(result.result == 0) {
                     
-                    var tip = '安装成功!请点击下一步继续';
-                    utilStartAlertDialog(tip, function() {
+                    var tip = '安装成功!强烈建议将当前页面拍照临存以便后续比对!';
+                    utilStartCommonDialog(tip, 3000, function() {
+                    //utilStartAlertDialog(tip, function() {
                         $('#guide_font_confirm_install').text('请后续确认效果');
                         $('#guide_font_confirm_install').addClass('btn_disabled');
-                        $('#guide_font_confirm_install').prop("onclick",null).off("click");;
-                        $('#guide_font_confirm_install').unbind('click');
+                        rebindBtnClick('guide_font_confirm_install');
+                        //$('#guide_font_confirm_install').prop("onclick",null).off("click");;
+                        //$('#guide_font_confirm_install').unbind('click');
                         
                         $('#guide_font_confirmed_div').empty();
                         var content = '<div class="pull-left text-left" id="guide_font_confirmed_content"\
@@ -1208,6 +1222,9 @@ $(function () {
                 case CONST.DeployStep_AdapterConfig:
                     InitCurrentVendorSelect();
                     break;
+                case CONST.DeployStep_FetchCenterSettings:
+                    InitCenterSettingInputParam();
+                    break;
                 case CONST.DeployStep_3rdParty_SogouInstall:
                     DisplaySogouInstallState();
                     break;
@@ -1360,6 +1377,7 @@ $(function () {
         InstallSogouInput();
     });
 
+    //字体安装按钮
     $(document).on('click', '#guide_font_confirm_install', function() {
         InstallSpecifiesFont();
     });
@@ -1391,15 +1409,13 @@ $(function () {
         RVC.GuideController.resizeWindow();
         RVC.Scroll.initScroll('#init_param_content');
 
-        $('#header_right #quitpage_btn_div').prop("onclick",null).off("click");;
-        $('#header_right #quitpage_btn_div').unbind('click');
         $('#header_right #quitpage_btn_div').bind('click', function() {
             if(!globalFinishedFlag) {
-                utilStartConfirmDialog("配置还未完成,确定要退出页面吗?", function() {
-                    quitThisPage();
+                utilStartConfirmDialog("配置还未完成,确定要退出当前配置吗?(应用也将退出)", function() {
+                    AbortDeployConfig();                   
                 });
             } else {
-                quitThisPage();
+                AbortDeployConfig(true);
             }
         });
         console.log("href:" + window.location.href);

+ 28 - 10
addin/res/ManagerDesktop/js/public.js

@@ -187,14 +187,14 @@ function utilStartAlertDialog(notice, confirmcallback, confirmstr) {
         + '    <div class="color_background_white" style="padding-top:40px;">'
         + '        <div class="clearboth"></div>'
         + '        <div align="center">'
-        + '            <button id="confirm_sure" class="btn_normal_short"></button>'
+        + '            <button id="confirm_yes" class="btn_normal_short"></button>'
         + '        </div>'
         + '    </div>'
         + '</div><div class="common_win_bottom"></div>';
     $('#confirm_light').secureHtml(confirmhtml);
     $('#confirm_notice').text(notice);
-    $('#confirm_sure').text(confirmsting);
-    $(document).on('click', '#confirm_sure', function () {
+    $('#confirm_yes').text(confirmsting);
+    $(document).on('click', '#confirm_yes', function () {
         utilStopAlertDialog();
         if (confirmcallback) {
             confirmcallback();
@@ -291,7 +291,12 @@ function utilStopSubmitDialog() {
     $('#submit_light').hide();
     $('#submit_fade').hide();
 }
-function utilStartCommonDialog(noticeEX) {
+
+function utilStopCommonDialog() {
+    utilStopSubmitDialog();
+}
+
+function utilStartCommonDialog(noticeEX, showTime, callback) {
     $('#submit_light').empty();
     var templateData = {
         noticeEX: noticeEX
@@ -306,10 +311,18 @@ function utilStartCommonDialog(noticeEX) {
     submitinterval = setTimeout(function () {
         $('#submit_fade').css('height', heightest + 'px');
     }, 50);
+
+    if (typeof showTime !== 'undefined' && showTime !== '') {
+        var showTimes = showTime;
+        setTimeout(function () {
+            utilStopCommonDialog();
+            if(callback) {
+                callback();
+            }
+        }, showTimes);
+    } 
 }
-function utilStopCommonDialog() {
-    utilStopSubmitDialog();
-}
+
 function utilShowToast(info, showTime, callback) {
     if (typeof info === 'undefined' || info === '') {
         return;
@@ -1763,10 +1776,15 @@ $(function () {
                 RVC.HealthmanagerEntityCtrl.ControlTerminalLifeNo(1);
             });
         },
-        QuitApp: function() {
-            utilStartConfirmDialog("确认要退出可视柜台应用程序?", function() {
+        QuitApp: function(flag) {
+            if(typeof flag === 'undefined') {
+                utilStartConfirmDialog("确认要退出可视柜台应用程序?", function() {
+                    RVC.HealthmanagerEntityCtrl.ControlTerminalLifeNo(2);
+                });
+            } else {
                 RVC.HealthmanagerEntityCtrl.ControlTerminalLifeNo(2);
-            });
+            }
+
         },
         UPSOffPC: function() {
             utilStartConfirmDialog("确认通过UPS关闭计算机?(点击确认并操作成功后请在5分钟内拔离插座电源线以彻底关闭计算机,否则机器将会重启!)", function() {