cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>index</title>
    [#include "/business/pages/include/static.html" /]
    [#include "/component/DatePicker.html" /]
    <link rel="stylesheet" href="${common_static}/static/plugins/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <script type="text/javascript" src="${common_static}/static/plugins/ztree/js/jquery.ztree.all-3.5.min.js"></script>
    <script type="text/javascript">
 
    </script>
 
</head>
 
<body>
 
 
<div>
    <form id="myform">
        <table class="edit_layout" align="center" style="margin-top:30px">
            <tr>
                <th><label class="required">名称:</label></th>
                <td>
                    <input id="cname" name="cname" value="${cname}" class="general" type="text"/>
                </td>
            </tr>
            <tr>
                <th><label class="required">状态:</label></th>
                <td>
                    <input id="state" name="state" value="${state}" class="general" type="text"/>
                </td>
            </tr>
            <tr>
                <th><label class="required">内容:</label></th>
                <td>
                    <textarea id="content" id="content" name="content" class="general"
                              style="width: 90%;">${content}</textarea>
                </td>
            </tr>
        </table>
    </form>
</div>
 
</body>
<script type="text/javascript">
    //点击事件
    function onDialogBtnClick(btnID, dialogID, config) {
        var cname = $.trim($("#cname").val());
        if (cname.length<=0 || cname.length > 200) {
            window.top.popupTips("名称不能为空,不能超过200个字符或汉字");
            return;
        }
        var state = $.trim($("#state").val());
        if (state.length<=0 || state.length > 100) {
            window.top.popupTips("状态不能为空,不能超过100个字符或汉字");
            return;
        }
        var content = $.trim($("#content").val());
        if (content.length<=0 || content.length > 200) {
            window.top.popupTips("内容不能为空,不能超过200个字符或汉字");
            return;
        }
        var configData = new $.HashMap();
        configData.put("cname", cname);
        configData.put("content", content);
        configData.put("state", state);
        if (btnID == "btnSure") {
            window.parent.addConfigData(configData);
            window.top.hideDialog(dialogID);
        } else if (btnID == "btnEdit") {
            var tdIndex = '${RequestParameters.tdIndex}';
            window.parent.editConfigData(tdIndex, configData);
            window.top.hideDialog(dialogID);
        }
    }
</script>
</html>