多单位版国产化地质资料管理系统
zhai
2025-12-13 fc0cc9fff4b4cbdc7cbb52b4a96c947530fcbba0
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>文本框</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
    <meta name="generator" content="www.leipi.org" />
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <!--[if lte IE 6]>
    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap-ie6.css">
    <![endif]-->
    <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css" href="bootstrap/css/ie.css">
    <![endif]-->
    <link rel="stylesheet" href="leipi.style.css">
    <script type="text/javascript" src="../dialogs/internal.js"></script>
</head>
<body>
<div class="content">
    <table class="table table-bordered table-striped table-hover">
            <tr>
                    <th>
                        <span>所属表名</span>
                    </th>
                    <th width="50%">
                        <span>字段名称</span>
                        <span class="label label-important">*</span>
                    </th>
                </tr>
                <tr>
                    <td>
                        <div class="input-group">
                            <input type="text" id="orgtablename" class="form-control">
                            <span class="input-group-btn">
                                <button class="btn btn-default">选表</button>
                            </span>
                        </div>
                    </td>
                    <td>
                        <div class="input-group">
                            <input type="text" id="orgname" class="form-control" placeholder="必填项">
                            <span class="input-group-btn">
                                <button class="btn btn-default" id="selectField">选字段</button>
                            </span>
                        </div>
                    </td>
                </tr>
     <tr>
        <th><span>显示名称</span></th>
        <th><span>宽&nbsp;&nbsp;X&nbsp;&nbsp;高&nbsp;&nbsp;&&nbsp;&nbsp;字体大小</span> </th>
    </tr>
    <tr>
        <td><input id="orgdisplayname" type="text" class="form-control"/></td>
        <td>
                宽 <input id="orgwidth" type="text" value="300" class="input-small span1" placeholder="auto"/> px
                &nbsp;&nbsp;
                高 <input id="orgheight" type="text" value="80" class="input-small span1" placeholder="auto"/> px
            <input id="orgfontsize" type="text"  value="" class="input-small span1" placeholder="auto"/> px</td>
    </tr>
    <tr>
        <th><span>可见性&nbsp;&nbsp;&nbsp;&&nbsp;&nbsp;&nbsp;必填性&nbsp;&nbsp;&nbsp;&&nbsp;&nbsp;&nbsp;增强性&nbsp;&nbsp;&nbsp;&&nbsp;&nbsp;&nbsp;可编辑性</span> </th>
        <th><span>验证</span> </th>
    </tr>
    <tr>
       
        <td> 
             <label class="checkbox-inline">
                <input id="orghide" type="checkbox" /> 隐藏 </label>
            <label class="checkbox-inline">
                <input id="orgrequired" type="checkbox" /> 必填 </label> 
            <label class="checkbox-inline">
                <input id="orgrich" type="checkbox"  /> 富文本形式 </label> 
                <label class="checkbox-inline">
                        <input id="orgedit" type="checkbox" checked /> 编辑 </label> 
            </td>
        <td>
                <input id="orgzz" type="text" value="" class="form-control" placeholder="参看easyui的validType" />
        </td>
    </tr>
    <tr>
        <th colspan="2"><span>默认值</span> </th>
    </tr>
    <tr>
        <td colspan="2">
           
            <textarea  rows="3" id="orgdefaultvalue" placeholder="多行文本框默认值..." class="form-control"></textarea>
            <a style="margin-top:2px;" title="选默认值" class="btn btn-primary">选值</a>
        </td>
    </tr>
    </table>
</div>
<script type="text/javascript">
var oNode = null,thePlugins = 'textarea';
window.onload = function() {
    if( UE.plugins[thePlugins].editdom ){
        oNode = UE.plugins[thePlugins].editdom;
        var gValue = oNode.getAttribute('value').replace(/&quot;/g,"\""),gTitle=oNode.getAttribute('title').replace(/&quot;/g,"\""),gName = oNode.getAttribute('name').replace(/&quot;/g, "\""), gHidden = oNode.getAttribute('orghide'),gFontSize=oNode.getAttribute('orgfontsize'),gWidth=oNode.getAttribute('orgwidth'),gHeight=oNode.getAttribute('orgheight'),gRich=oNode.getAttribute('orgrich'),gZZ = oNode.getAttribute('orgzz'), gRequired = oNode.getAttribute('orgrequired'), gEdit = oNode.getAttribute('orgedit'),gTableName=oNode.getAttribute('orgtablename'),gDisplayName=oNode.getAttribute('placeholder');
        
        gValue = gValue==null ? '' : gValue;
        gTitle = gTitle==null ? '' : gTitle;
        $G('orgdefaultvalue').value = gValue;
        $G('orgname').value = gName;
        $G('orgdisplayname').value=gDisplayName;
        if ( gRich == '1' ) {
            $G('orgrich').checked = true ;
        } 
      
        if (gHidden == '1') {
            $G('orghide').checked = true;
        }
        if (gRequired == "1") {
            $G('orgrequired').checked = true;
        }
        if(gEdit=="1"){
            $G('orgedit').checked = true;
        }else{
            $G('orgedit').checked=false;
        }
       
 
        $G('orgfontsize').value = gFontSize;
        $G('orgwidth').value = gWidth;
        $G('orgheight').value = gHeight;
        $G('orgzz').value = gZZ;
        $G('orgtablename').value=gTableName;
    }
}
dialog.oncancel = function () {
    if( UE.plugins[thePlugins].editdom ) {
        delete UE.plugins[thePlugins].editdom;
    }
};
dialog.onok = function (){
    if($G('orgname').value==''){
        alert('请输入字段名称');
        return false;
    }
    var gValue=$G('orgdefaultvalue').value.replace(/\"/g,"&quot;"),gName=$G('orgname').value.replace(/\"/g,"&quot;"),gTitle=$G('orgdisplayname').value.replace(/\"/g,"&quot;"),gFontSize=$G('orgfontsize').value,gWidth=$G('orgwidth').value,gHeight=$G('orgheight').value,gEdit = $G('orgedit'), gRequired = $G("orgrequired"), gZZ = $G('orgzz').value,gTableName=$G('orgtablename').value,gHidden=$G("orghide"),gRich=$G("orgrich");
 
    if( !oNode ) {
        try {
            var html = '<textarea ';
            html += ' title = "' + gTitle + '"';
            html += ' name = "'+gName+'"';
            html += ' leipiPlugins = "'+thePlugins+'"';
            html += ' value = "' + gValue + '"';
            if (gRich.checked ) {
                html += ' orgrich = "1"';
            } else {
                html += ' orgrich = "0"';
            }
            if (gRequired.checked ) {
                html += ' orgrequired = "1"';
            } else {
                html += ' orgrequired = "0"';
            }
            if (gHidden.checked ) {
                html += ' orghide = "1"';
            } else {
                html += ' orghide = "0"';
            }
            if (gEdit.checked) {
                html += ' orgedit = "1"';
            } else {
                html += ' orgedit = "0"';
                html+='disabled="disabled"';
            }
            if( gFontSize != '' ) {
                html += ' orgfontsize = "' + gFontSize + '"';
            } else {
                html += ' orgfontsize = ""';
            }
            if( gWidth != '' ) {
                html += ' orgwidth = "' + gWidth + '"';
            } else {
                html += ' orgwidth = ""';
            }
            if(gHeight != '') {
                html += ' orgheight = "' + gHeight + '"';
            } else {
                html += ' orgheight = ""';
            } 
            if(gTableName != '') {
                html += ' orgtablename = "' + gTitle + '"';
            } else {
                html += ' orgtablename = ""';
            }
            if(gTitle != '') {
                html += ' orgdisplayname = "' + gTableName + '"';
            } else {
                html += ' orgdisplayname = ""';
            }
            if(gZZ!=''){
 
                html += ' orgzz = "' + gZZ + '"';
                } else {
                    html += ' orgzz = ""';
            }
            
            html += ' style = "';
            if( gFontSize != '' ) {
                html += 'font-size:' + gFontSize + 'px;';
            }
            if( gWidth != '' ) {
                html += 'width:' + gWidth + 'px;';
            }
            if( gHeight != '' ) {
                html += 'height:' + gHeight + 'px;';
            }
            html += '">';
            html += gValue + '</textarea>';
            editor.execCommand('insertHtml',html);
        } catch (e) {
            try {
                editor.execCommand('error');
            } catch ( e ) {
                alert('控件异常,请联系管理员!');
            }
            return false;
        }
    } else {
        oNode.setAttribute('title', gTitle);
        oNode.setAttribute('value',gValue);
        oNode.innerHTML = gValue;
        if( gRich.checked ) {
            oNode.setAttribute('orgrich', 1);
        } else {
            oNode.setAttribute('orgrich', 0);
        }
        if( gHidden.checked ) {
            oNode.setAttribute('orghide', 1);
        } else {
            oNode.setAttribute('orghide', 0);
        }
        if( gEdit.checked ) {
            oNode.setAttribute('orgedit', 1);
        } else {
            oNode.setAttribute('orgedit', 0);
            oNode.setAttribute('disabled','disabled');
        }
        if( gRequired.checked ) {
            oNode.setAttribute('orgrequired', 1);
        } else {
            oNode.setAttribute('orgrequired', 0);
        }
        
        
        if( gFontSize != '' ) {
            oNode.style.fontSize = gFontSize+ 'px';
            oNode.setAttribute('orgfontsize',gFontSize );
        }else{
            oNode.setAttribute('orgfontsize', '');
        }
        if( gWidth != '' ) {
            oNode.style.width = gWidth+ 'px';
            oNode.setAttribute('orgwidth',gWidth );
        }else{
            oNode.setAttribute('orgwidth', '');
        }
        if( gHeight != '' ) {
            oNode.style.height = gHeight+ 'px';
            oNode.setAttribute('orgheight',gHeight );
        }else{
            oNode.setAttribute('orgheight', '');
        }
 
        oNode.setAttribute('orgname',gName);
        oNode.setAttribute('orgtablename',gTableName);
        oNode.setAttribute('orgdisplayname',gTitle);
        oNode.setAttribute('placeholder',gTitle);
        oNode.setAttribute('orgdefaultvalue',gValue);
        oNode.setAttribute('orgzz',gZZ);
       
        delete UE.plugins[thePlugins].editdom;
    }
};
</script>
</body>
</html>