IGD3000系列(一体屏)网关的app和文件系统的打包目录
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
var layer;// 定义全局变量
var laydate;
var form;
var test = {"name":"系统名称","screenName":"大屏名称","screenSlogan":"大屏标语","opVendor":"运维厂商","opPhone":"180********"
    ,"contacter":"联系人","usedTime":"2022-08-14 15:16:18","menu3DVld":"1", "etcPlat":"0", "linkage":"0"};
var sysInfo = {};
(function () {
    layui.use(['layer', 'form', 'laydate'], function () {
        layer = layui.layer;
        form = layui.form;
        laydate = layui.laydate;
        //开始时间
        laydate.render({
            elem: '#usedTime'
            , type: 'date'
            , trigger: 'click'
            , theme: 'custom'
        });
 
        laydate.render({
            elem: '#time'
            , type: 'datetime'
            , trigger: 'click'
            , theme: 'custom'
            ,value: new Date()
        });
 
        //测试
        // form.val("form-info", test);
 
        //默认查询
        queryInfo();
 
        queryTime();
    });
}).call(this);
 
 
//执行保存,系统参数
function saveInfo() {
    var info = form.val("form-info");
    info.usedTime = timeStr(info.usedTime);
 
    if(info.name){
        sysInfo.name = info.name;
    }
    if(info.screenName){
        sysInfo.screenName = info.screenName;
    }
    if(info.screenSlogan){
        sysInfo.screenSlogan = info.screenSlogan;
    }
    if(info.opVendor){
        sysInfo.opVendor = info.opVendor;
    }
    if(info.opPhone){
        sysInfo.opPhone = info.opPhone;
    }
    if(info.contacter){
        sysInfo.contacter = info.contacter;
    }
    if(info.usedTime){
        sysInfo.usedTime = info.usedTime;
    }
    // if(info.menu3DVld){
    //     sysInfo.menu3DVld = info.menu3DVld;
    // }
    if(info.mainShow){
        sysInfo.mainShow = info.mainShow;
    }else if(!sysInfo.mainShow){
        sysInfo.mainShow = "0";
    }
 
 
 
    // console.log(JSON.stringify(info));
    $.post("./cgi-bin/sys-set/save-info", JSON.stringify(info), function (data, status) {
        if (data.code == "success") {
            window.parent.parent.notify("数据保存成功!");
        } else {
            window.parent.parent.notify("数据保存出错,请重新操作!!msg=" + data.msg);
        }
    }, "json");
}
 
//时间格式处理,2021-02-26 -----20210226
function timeStr(time) {
    return time.replace('-','').replace('-','');
}
 
 
//执行查询,系统参数
function queryInfo() {
    $.get("./cgi-bin/sys-set/query-info", function (data, status) {
        if ("success" == status) {
            sysInfo = data;
            renderInfo(data);
        } else {
            window.parent.parent.notify("数据查询出错,请重新操作!!msg=" + data.msg);
        }
    }, "json");
}
 
function renderInfo(data){
    data.usedTime = strTime(data.usedTime);
    form.val("form-info", data);
}
 
//时间格式处理,20210226-----2021-02-26
function strTime(time) {
    return time.substring(0, 4) + "-" + time.substring(4, 6) + "-" + time.substring(6, 8);
}
 
function setTime(){
    var time = $("#time").val();
    // console.log(time);
    var param = {"time":time};
    $.post("./cgi-bin/device-ctrl/set-time", JSON.stringify(param), function (data, status) {
        if ("success" == data.code) {
            window.parent.parent.notify("时间校准操作成功!");
        } else {
            window.parent.parent.notify("操作失败,请重新操作!"+data.msg);
        }
    }, "json");
}
 
//执行查询
function queryTime() {
    $.get("./cgi-bin/device-ctrl/query-version", function (data, status) {
        if ("success" == status) {
            $("#time").val(data.time);
        } else {
            window.parent.parent.notify("数据查询出错,请重新操作!!");
        }
    }, "json");
}