virtualEdit.html
4.79 KB
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
<!DOCTYPE html>
<div id="tt" class="easyui-layout" fit="true" style="overflow-y: scroll">
<form name="topicForm" id="topicForm" method="post">
<div style="margin-top: 20px;margin-left: 30px">
<table border="0" style="width:95%;margin-top:5px;line-height:30px;" id="tab">
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>UID</label> <br>
<input id="uid" name="uid" class="easyui-textbox" style="width: 380px;" readonly='readonly'/>
</td>
</tr>
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>马甲昵称</label> <br>
<input id="nickName" name="nickName" class="easyui-textbox" style="width: 380px;"/>
</td>
</tr>
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>所属分组</label><br>
<input class="easyui-combobox" id="groupId" name="groupId">
</input>
<!-- <span style=" margin-left: 10px; color: red"> 图片宽高(186x170)</span>-->
</td>
</tr>
<tr style="height: 60px">
<td>
<span style="color:red">*</span><label>头像</label> <br>
<div id="imageUpload">
</div>
<!-- <span style=" margin-left: 10px; color: red"> 图片宽高(186x170)</span>-->
</td>
</tr>
<tr style="height: 60px">
<td>
<label>马甲简介</label> <br>
<textarea id="signature" name="signature" style="width: 380px;" rows="6" placeholder=""
required="true" maxlength="500"></textarea>
</td>
</tr>
</table>
</div>
</form>
</div>
<script>
$(function () {
$("#nickName").textbox({
required: true,
missingMessage: "昵称不能为空",
prompt: "请输入昵称"
});
$("#groupId").combobox({
valueField: "value",
textField: "text",
required: false,
prompt: "请选择分组",
data: [ {text: "普通马甲", value: "1"},{text: "编辑", value: "2"}, {text: "官方号", value: "3"},{text: "社区大号", value: "4"}, {text: "品牌号", value: "5"},
{text: "外部刷评论马甲", value: "6"},{text: "其他", value: "0"}]
});
$("#imageUpload").imageUpload({
width: 171,
height: 120,
realInputName: "headIcon",
url: serverContextPath + '/fileupload/uploadFile',
queryParams: {
bucket: "yhb-img01"
},
onBeforeSubmit: function () {
$.messager.progress({
title: "正在执行",
msg: "正在执行,请稍后...",
interval: 500,
text: ""
});
},
filterFileName: function (data) {
debugger;
if (!data || data.code != 200) {
$.messager.progress("close");
$.messager.alert("错误", data.message);
return "";
}
return data.data.url;
},
onLoadSuccess: function (data) {
$.messager.progress("close");
//$("#imageUpload").hide();
//$("#fileName").val(data.data.fileName);
//$("#videoSize").val(data.data.fileSize); //如果有大小校验
/*$("#callBackDiv").html("<div id='videoUploadDiv' class='image-upload' style='position: relative;top:19px;width: 120px; height: 150px;'><img id='imageShow' src='"+data.data.url+"?vframe/jpg/offset/0' width='120' height='150'/></div>"
+"<span style='position: relative;top: -40px;left: 30px;'>"+data.data.fileName+"</span><span style='position: relative;left: 50px;top: -40px;'>"+data.data.fileSize+"M</span>").show();
*/
return false;
}
});
//加载数据
var data = paramObject.mkData;
$("#uid").textbox("setValue", data.uid);
$("#nickName").textbox("setValue", data.nickName);
$("#signature").html(data.signature);
//图片
$("#imageUpload").imageUpload('setValue', data.headIcon);
//所属分组
$("#groupId").combobox('setValue', data.groupId);
});
</script>
</html>