mitao
2024-07-08 022a7ff7abf82cd2546e18071ade5228b4e2339f
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
@/*
    头像参数的说明:
    name : 名称
    id : 头像的id
    imgClass : 每行放几个照片 默认: col-sm-12
    len : 允许上传照片数量 默认1
@*/
<div class="form-group">
    <label class="col-sm-3 control-label head-scu-label">
        @if(isNotEmpty(required)){
        <span style="color: red;">*</span>
        @}
        ${name!}</label>
    <div class="col-sm-9">
        <input type="hidden" id="${id}Disabled" value="${disabled!}">
        <div id="${id}Editor" class="editorHeight"></div>
        <input type="text" style="opacity:0" id="${id}" name="${id}">
        <link type="text/css" rel="stylesheet" href="${ctxPath}/static/js/plugins/umeditor/themes/default/css/umeditor.css">
        <script type="text/javascript" charset="utf-8" src="${ctxPath}/static/js/plugins/umeditor/umeditor.config.js"></script>
        <script type="text/javascript" charset="utf-8" src="${ctxPath}/static/js/plugins/umeditor/umeditor.js"></script>
        <script type="text/javascript" charset="utf-8" src="${ctxPath}/static/js/plugins/umeditor/lang/zh-cn/zh-cn.js"></script>
        <script> $(function () {
            var ${id}Editor = UM.getEditor('${id}Editor');
            ${id}Editor.ready(function () {
                // 设置高度
                ${id}Editor.setHeight( 400);
                // 设置内容
                ${id}Editor.setContent('${value!}');
                ${id}Editor.addListener('contentChange',function(){
                    $("#${id}").val( ${id}Editor.getContent())
                });
 
                if ( $( "#${id}Disabled").val() == "true") {
                    ${id}Editor.setDisabled();
                }
 
            });
            $("#${id}").val( '${value!}')
        }) </script>
    </div>
</div>
@if(isNotEmpty(underline) && underline == 'true'){
    <div class="hr-line-dashed"></div>
@}