Browse Source

Merge branch 'master' of http://116.63.33.55/git/dt2

yhd 3 years ago
parent
commit
e4675d1ce3

+ 35 - 0
cms/src/main/resources/static/ftl/fzzd/dhl/hdgn/wjll.ftl

@@ -329,11 +329,46 @@
         } else if (iden === "lswj") {
             // 加载临时文件库
             $(".file_list").load("/${data.websiteInfo.rootPath }/dhl/hdgn/wjll/lswj/list.html");
+        } else if (iden === "qyy") {
+            // 请求轻应用文件获取接口
+            getFileListForQYY()
+            // 加载轻应用文件库
+            <#--$(".file_list").load("/${data.websiteInfo.rootPath }/dhl/hdgn/wjll/qyy/list.html");-->
         }
     })
 
     defaultShowFileList();
 
+    function getFileListForQYY() {
+        $.ajax({
+            type: 'get',
+            url: QYYFILE_PATH + 'base/api/upload/record/list',
+            dataType: 'json',
+            data: {
+                current: 1,
+                size: 10000,
+            },
+            success: function (res) {
+                if (res.code == 200) {
+                    let data = res.data.records;
+                    console.log(data)
+                    var qyyHtml = '';
+                    if (data && data.length > 0) {
+                        for (let i = 0; i < data.length; i++) {
+                            qyyHtml += '<li class="file_item" data-iden="img" data-src="' + data[i].filePath + '">'
+                                + '<img src="/fzzd/public/img/tp.png"/>'
+                                + '<div class="file_name">'
+                                + data[i].sourceName
+                                + '</div></li>';
+                        }
+                    }
+                    $(".file_list").empty().append(qyyHtml)
+                }
+            },
+            error: function(msg) {
+            }
+        })
+    }
     // 默认展示文件分类
     function defaultShowFileList() {
         // 通过sessionStorage判断当前页面是否为临时文件上传成功后跳转

+ 0 - 0
cms/src/main/resources/static/ftl/fzzd/dhl/hdgn/wjll/qyy.ftl


+ 4 - 0
spring-cloud/server-basic/src/main/java/com/jd/entity/SceneTheme.java

@@ -68,4 +68,8 @@ public class SceneTheme implements Serializable {
     @TableField("theme_icon_path")
     private String themeIconPath;
 
+    @ApiModelProperty("外链地址")
+    @TableField("url")
+    private String url;
+
 }

+ 1 - 1
spring-cloud/server-page/src/main/resources/static/ipad/css/index_sw.css

@@ -295,7 +295,7 @@ li {
 
 .sig_list::-webkit-scrollbar {
     width: 7px;
-    height: 0px;
+    height: 7px;
     background-color: #F5F5F5;
 }
 

+ 10 - 7
spring-cloud/server-page/src/main/resources/static/ipad/js/basic/direct/index.js

@@ -233,13 +233,16 @@ const UI = {
     openDriver(data) {
         let array = [];
         for (let i = 0; i < data.length; i++) {
-            array.push({
-                id: data[i].systemInfo.system_id,
-                url: data[i].systemInfo.login_address,
-                account: data[i].systemInfo.login_account,
-                password: data[i].systemInfo.password,
-                interface: data[i].systemInfo.interface_url,
-            });
+            if (data[i].systemInfo) {
+                const newObj = {
+                    id: data[i].systemInfo.system_id,
+                    url: data[i].systemInfo.login_address,
+                    account: data[i].systemInfo.login_account,
+                    password: data[i].systemInfo.password,
+                    interface: data[i].systemInfo.interface_url,
+                };
+                array.push(newObj);
+            }
         }
         customLayui.post({
             url: DPZHD_PATH + 'automation/guide/init',

+ 23 - 19
spring-cloud/server-page/src/main/resources/static/ipad/js/basic/index_sw.js

@@ -282,31 +282,35 @@ function initClick() {
         var that = this
         tmerSw = setTimeout(function() {
             //禁用轮播图
-            util.variable['swiper'].disable()
-            initX = $(that)[0].offsetLeft + $(".back").clientWidth + $(that)[0].clientWidth / 2
-            $(".cont").css({ "left": initX, "top": "90%" })
-            $(".cont").css("display", "block").empty()
-                // 将长按的元素复制到容器中
-            var copyEl = $.clone($(that)[0])
-            $(".cont").append(copyEl)
-                // 获取容器的初始位置值
-                // 移动容器
+            // util.variable['swiper'].disable();
+            initX = $(that)[0].offsetLeft + $(".back").clientWidth + $(that)[0].clientWidth / 2;
+            $(".cont").css({ "left": initX, "top": "90%" });
+            $(".cont").css("display", "block").empty();
+            // 将长按的元素复制到容器中
+            var copyEl = $.clone($(that)[0]);
+            $(".cont").append(copyEl);
+            // 获取容器的初始位置值
+            // 移动容器
             that.addEventListener("touchmove", function(e1) {
-                swX = e1.changedTouches[0].clientX
-                swY = e1.changedTouches[0].clientY
-                $(".cont").css({ "left": swX, "top": swY })
+                swX = e1.changedTouches[0].clientX;
+                swY = e1.changedTouches[0].clientY;
+                $(".cont").css({ "left": swX, "top": swY });
             })
-            idenSw = 1
-        }, 500)
+            idenSw = 1;
+        }, 500);
 
         util.variable['swiper'].on("touchMove", function(swiper, e) {
-            that.removeEventListener("touchmove")
-            clearTimeout(tmerSw)
+            that.removeEventListener("touchmove", function(e1) {
+                swX = e1.changedTouches[0].clientX;
+                swY = e1.changedTouches[0].clientY;
+                $(".cont").css({ "left": swX, "top": swY });
+            })
+            clearTimeout(tmerSw);
         })
     });
     $(".swiper-wrapper").on("touchend", '.slide-item', function() {
         // 判断是否长按
-        clearTimeout(tmerSw)
+        clearTimeout(tmerSw);
         if (idenSw == 0) {
             switchSwiper($(this).attr('data-si'));
         } else {
@@ -326,8 +330,8 @@ function initClick() {
             $(".cont").css({ "display": "none" })
         }
         //启用轮播图
-        util.variable['swiper'].enable()
-        idenSw = 0
+        // util.variable['swiper'].enable();
+        idenSw = 0;
     });
 
     var frameBh = 0

+ 13 - 1
spring-cloud/server-page/src/main/resources/static/page/js/basic/sceneThemeManager.js

@@ -139,6 +139,7 @@ layui.config({
             $("#themeIconPath").val(data.themeIconPath)
             $("#sceneId").val(data.sceneId)
             $("#themeName").val(data.themeName)
+            $("#url").val(data.url)
             $("#quickNavigation").val(data.quickNavigation)
             // 快捷导航单选框回显
             var radio = $("input[name = 'quickNavigation']")
@@ -190,7 +191,17 @@ layui.config({
             if (!value.trim()) {
                 return '排序号不能为空!';
             }
-        }
+        },
+        url: function (value, item) {
+            if (!value.trim()) {
+                return 'URL 地址不能为空!';
+            }
+            if (value != '#' && value.indexOf("http") < 0) {
+                if (!(/^([a-zA-Z]([-_a-zA-Z0-9])+[.]?)*[A-Za-z]$/.test(value))) {
+                    return '请输入合法的 HTML 文件名或者 #!';
+                }
+            }
+        },
     });
     // 监听提交按钮
     form.on('submit(submit)', function (data) {
@@ -416,6 +427,7 @@ function clearForm() {
     $("#voice").val('');
     $("#voiceEvent").val('');
     $("#sortno").val('');
+    $("#url").val('');
     form.render('select');
     multiSelect.render('select', 'multiple');
 }