Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
b1860139
提交
b1860139
authored
2月 23, 2021
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
导出
上级
5e11779e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
37 行增加
和
22 行删除
+37
-22
TbCfUserInfoServiceImpl.java
...va/com/platform/service/impl/TbCfUserInfoServiceImpl.java
+4
-4
virtualuser.html
...m-admin/src/main/webapp/WEB-INF/page/sys/virtualuser.html
+11
-7
virtualuser.js
platform-admin/src/main/webapp/js/sys/virtualuser.js
+22
-11
没有找到文件。
platform-admin/src/main/java/com/platform/service/impl/TbCfUserInfoServiceImpl.java
浏览文件 @
b1860139
...
...
@@ -182,16 +182,15 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
List
<
Object
[]>
list1
=
new
ArrayList
<
Object
[]>();
List
<
Object
>
obj
=
new
ArrayList
<
Object
>();
List
<
VirtualUserEntity
>
virtualUsers
=
tbCfUserInfoDao
.
queryVirtualUser
(
null
);
virtualUsers
.
forEach
(
v
->
{
List
<
Object
>
obj
=
new
ArrayList
<
Object
>();
obj
.
add
(
v
.
getAccount
());
obj
.
add
(
v
.
getAvatar
());
obj
.
add
(
v
.
getNick
());
list1
.
add
(
obj
.
toArray
());
});
list1
.
add
(
obj
.
toArray
());
String
[]
header
=
new
String
[]{
"账号"
,
"头像"
,
"昵称"
};
ee1
.
addSheetByArray
(
"virtualUsers"
,
list1
,
header
);
...
...
@@ -225,7 +224,8 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
* @param filename 文件名称
*/
public
String
getAbsoluteFile
(
String
filename
)
{
String
downloadPath
=
"D:\\virtual\\"
+
filename
;
// String downloadPath = "D:\\virtual\\" + filename;
String
downloadPath
=
"/home/virtual/uploadPath"
+
filename
;
File
desc
=
new
File
(
downloadPath
);
if
(!
desc
.
getParentFile
().
exists
())
{
desc
.
getParentFile
().
mkdirs
();
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/virtualuser.html
浏览文件 @
b1860139
...
...
@@ -6,7 +6,7 @@
</head>
<body>
<div
id=
"rrapp"
v-cloak
style=
"height: calc(100% - 15px);"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<div
v-show=
"showList"
style=
"height: 100%;"
>
<Row
:gutter=
"16"
>
<div
class=
"search-group"
>
<i-col
span=
"4"
>
...
...
@@ -36,15 +36,18 @@
</template>
</Modal>
</i-button>
<i-button
type=
"info"
@
click=
"exportExcel"
><i
class=
"fa fa-chevron-down"
></i>
导出
</i-button>
</div>
</Row>
<div
id=
"speedp"
></div>
<table
id=
"jqGrid"
></table>
<table
id=
"jqGrid"
></table>
</div>
<Card
v-show=
"!showList"
>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"virtualUser"
:rules=
"ruleValidate"
:label-width=
"80"
>
<i-form
ref=
"formValidate"
:model=
"virtualUser"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"虚拟账号"
prop=
"account"
>
<i-input
v-model=
"virtualUser.account"
placeholder=
"虚拟账号"
style=
"width: 500px"
/>
</Form-item>
...
...
@@ -54,7 +57,7 @@
<!--<Form-item label="头像" prop="avatar">
<i-input v-model="virtualUser.avatar" placeholder="头像" style="width: 500px"/>
</Form-item>-->
<Form-item
label=
"头像"
prop=
"avatar"
>
<Form-item
label=
"头像"
prop=
"avatar"
>
<!-- <i-input v-model="xPicture.pictureUrl" placeholder="图片地址"/> -->
<upload
multiple
...
...
@@ -65,7 +68,7 @@
</upload>
<div
id=
"imgWrapper"
style=
"display: flex;position: relative;"
>
<div
v-for=
"item in uploadList"
style=
"margin-left: 5px;"
:data-img-path=
"item"
>
<img
:src=
"item"
width=
"100"
height=
"100"
id=
"itemImg"
>
<img
:src=
"item"
width=
"100"
height=
"100"
id=
"itemImg"
>
<i
class=
"ivu-icon ivu-icon-ios-trash-outline"
style=
"cursor:pointer;display: flex;font-size: 24px;position: relative;left:11px"
@
click=
"delImg1(item)"
></i>
...
...
@@ -74,11 +77,12 @@
</Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"ghost"
@
click=
"handleReset('formValidate')"
style=
"margin-left: 8px"
>
重置
</i-button>
</Form-item>
</i-form>
</Card>
</Card>
</div>
...
...
platform-admin/src/main/webapp/js/sys/virtualuser.js
浏览文件 @
b1860139
$
(
function
()
{
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfuserinfo/queryVirtualUser'
,
...
...
@@ -23,7 +22,7 @@ $(function () {
viewrecords
:
true
,
sortorder
:
"desc"
,
multiselect
:
true
,
multiboxonly
:
true
,
multiboxonly
:
true
,
beforeSelectRow
:
true
,
});
});
...
...
@@ -31,7 +30,7 @@ $(function () {
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
uploadList
:[],
uploadList
:
[],
showList
:
true
,
title
:
null
,
modal
:
false
,
...
...
@@ -50,13 +49,13 @@ let vm = new Vue({
vm
.
reload
();
},
add
:
function
()
{
vm
.
uploadList
=
[];
vm
.
uploadList
=
[];
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
virtualUser
=
{};
},
update
:
function
(
event
)
{
vm
.
uploadList
=
[];
vm
.
uploadList
=
[];
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
...
...
@@ -69,9 +68,9 @@ let vm = new Vue({
saveOrUpdate
:
function
(
event
)
{
// alert(vm.virtualUser.id)
// return
let
url
=
vm
.
virtualUser
.
userId
==
null
||
''
?
"../tbcfuserinfo/save"
:
"../tbcfuserinfo/update"
;
let
url
=
vm
.
virtualUser
.
userId
==
null
||
''
?
"../tbcfuserinfo/save"
:
"../tbcfuserinfo/update"
;
vm
.
virtualUser
.
avatar
=
vm
.
uploadList
[
0
];
if
(
vm
.
virtualUser
.
id
==
null
){
if
(
vm
.
virtualUser
.
id
==
null
)
{
vm
.
virtualUser
.
real
=
0
;
}
Ajax
.
request
({
...
...
@@ -86,6 +85,18 @@ let vm = new Vue({
}
});
},
exportExcel
:
function
()
{
Ajax
.
request
({
url
:
"../tbcfuserinfo/exportData"
,
async
:
false
,
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
resultData
)
{
vm
.
reload
();
}
});
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
)
{
...
...
@@ -143,8 +154,7 @@ let vm = new Vue({
let
self
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
let
filereader
=
new
FileReader
();
filereader
.
onload
=
e
=>
{
filereader
.
onload
=
e
=>
{
let
src
=
e
.
target
.
result
;
const
image
=
new
Image
();
image
.
onload
=
function
()
{
...
...
@@ -164,7 +174,8 @@ let vm = new Vue({
};
image
.
onerror
=
reject
;
image
.
src
=
src
;
};
}
;
filereader
.
readAsDataURL
(
file
);
});
},
...
...
@@ -187,7 +198,7 @@ let vm = new Vue({
},
getInfo
:
function
(
id
)
{
vm
.
uploadList
=
[];
vm
.
uploadList
=
[];
Ajax
.
request
({
url
:
"../tbcfuserinfo/info/"
+
id
,
async
:
true
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论