puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
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
@layout("/common/_container.html"){
<style>
    .newWidth, .single-line{
        max-width:350px !important;display: initial !important;
    }
</style>
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="tabs-container">
                            <ul class="nav nav-tabs">
                                <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">常见问题设置</a></li>
                            </ul>
                            <div class="tab-content">
                                <div id="tab-1" class="tab-pane active">
                                    <div class="panel-body">
                                        <textarea id="editor_1" type="text/plain" style="width:1200px;height:400px;">${one.content}</textarea>
                                        <div class="row btn-group-m-t">
                                            <div class="col-sm-10 col-sm-offset-5">
                                                <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="update_1(${one.id});"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
 
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
 
<script type="text/javascript">
    var editor_1 = null;
    $(function () {
        //初始化编辑器
        editor_1 = UE.getEditor('editor_1');
    });
 
    function update_1(id){
        if (editor_1.getContentTxt() == ""){
            Feng.error("内容不能为空!");
            return;
        }
        submitData(editor_1.getContent(),id);
    }
 
    function submitData(content,id) {
        //提交信息
        var ajax = new $ax(Feng.ctxPath + "/tAgreement/updateAppParam", function(data){
            Feng.success("编辑成功!");
        },function(data){
            Feng.error("编辑失败!" + data.responseJSON.message + "!");
        });
        ajax.set("context", content);
        ajax.set("id", id);
        ajax.start();
    }
</script>
@}