Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
024d5074
提交
024d5074
authored
4月 14, 2020
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成社区:文章管理功能
上级
033b04b5
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
294 行增加
和
193 行删除
+294
-193
TbCfStationItemController.java
...va/com/platform/controller/TbCfStationItemController.java
+3
-1
TbCfUserInfoController.java
.../java/com/platform/controller/TbCfUserInfoController.java
+2
-2
TbCfArticleEntity.java
.../src/main/java/com/platform/entity/TbCfArticleEntity.java
+10
-0
TbCfUserInfoService.java
...c/main/java/com/platform/service/TbCfUserInfoService.java
+1
-1
TbCfUserInfoServiceImpl.java
...va/com/platform/service/impl/TbCfUserInfoServiceImpl.java
+2
-2
TbCfArticleDao.xml
...in/src/main/resources/com/platform/dao/TbCfArticleDao.xml
+63
-61
tbcfarticle.html
...m-admin/src/main/webapp/WEB-INF/page/sys/tbcfarticle.html
+25
-7
common.js
platform-admin/src/main/webapp/js/common.js
+9
-0
tbcfarticle.js
platform-admin/src/main/webapp/js/sys/tbcfarticle.js
+170
-119
Constant.java
...orm-common/src/main/java/com/platform/utils/Constant.java
+9
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfStationItemController.java
浏览文件 @
024d5074
...
...
@@ -64,7 +64,9 @@ public class TbCfStationItemController extends ApiBaseAction {
@RequiresPermissions
(
"tbcfstationitem:list"
)
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
if
(!
Constant
.
SUPER_ADMIN
.
equals
(
ShiroUtils
.
getUserId
()))
{
if
(!
Constant
.
SUPER_ADMIN
.
equals
(
ShiroUtils
.
getUserId
())
&&
!
Constant
.
SUPER_ITEM
.
equals
(
ShiroUtils
.
getUserId
())
&&
!
Constant
.
SUPER_USER
.
equals
(
ShiroUtils
.
getUserId
()))
{
params
.
put
(
"creator"
,
ShiroUtils
.
getUserId
());
}
String
userId
=
ShiroUtils
.
getUserId
();
...
...
platform-admin/src/main/java/com/platform/controller/TbCfUserInfoController.java
浏览文件 @
024d5074
...
...
@@ -105,7 +105,7 @@ public class TbCfUserInfoController {
@ResponseBody
@GetMapping
(
"/queryByAccount"
)
public
R
queryByAccount
(
@RequestParam
(
"account"
)
String
account
)
{
return
R
.
ok
();
String
userId
=
tbCfUserInfoService
.
queryById
(
account
);
return
R
.
ok
()
.
put
(
"userId"
,
userId
)
;
}
}
platform-admin/src/main/java/com/platform/entity/TbCfArticleEntity.java
浏览文件 @
024d5074
...
...
@@ -58,6 +58,16 @@ public class TbCfArticleEntity implements Serializable {
*/
private
Date
updatetime
;
private
String
account
;
public
String
getAccount
()
{
return
account
;
}
public
void
setAccount
(
String
account
)
{
this
.
account
=
account
;
}
/**
* 设置:文章ID
*/
...
...
platform-admin/src/main/java/com/platform/service/TbCfUserInfoService.java
浏览文件 @
024d5074
...
...
@@ -73,5 +73,5 @@ public interface TbCfUserInfoService {
long
queryUserTotal
();
boolean
queryByAccount
(
String
account
);
String
queryByAccount
(
String
account
);
}
platform-admin/src/main/java/com/platform/service/impl/TbCfUserInfoServiceImpl.java
浏览文件 @
024d5074
...
...
@@ -68,8 +68,8 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
}
@Override
public
boolean
queryByAccount
(
String
account
)
{
public
String
queryByAccount
(
String
account
)
{
return
tbCfUserInfoDao
.
queryById
(
account
)
==
null
?
true
:
false
;
return
tbCfUserInfoDao
.
queryById
(
account
)
;
}
}
platform-admin/src/main/resources/com/platform/dao/TbCfArticleDao.xml
浏览文件 @
024d5074
...
...
@@ -17,7 +17,7 @@
<result
property=
"updatetime"
column=
"updateTime"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfArticleEntity"
>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfArticleEntity"
>
select
`id`,
`title`,
...
...
@@ -34,46 +34,48 @@
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfArticleEntity"
>
select
`id`,
`title`,
`content`,
`picture`,
`author_type`,
`author`,
`like_num`,
`del_flag`,
`top`,
`createTime`,
`updateTime`
from tb_cf_article
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfArticleEntity"
>
select
`id`,
`title`,
`content`,
`picture`,
`author_type`,
`author`,
`like_num`,
`del_flag`,
`top`,
`createTime`,
`updateTime`,
u.account account
from tb_cf_article a left join tb_cf_user_info u
on a.author=u.user_id
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND title LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by
id
desc
</otherwise>
<otherwise>
order by
createTime
desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_article
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfArticleEntity"
>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_article
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND title LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfArticleEntity"
>
insert into tb_cf_article(
`id`,
`title`,
...
...
@@ -99,33 +101,33 @@
#{createtime},
#{updatetime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfArticleEntity"
>
update tb_cf_article
<set>
<if
test=
"title != null"
>
`title` = #{title},
</if>
<if
test=
"content != null"
>
`content` = #{content},
</if>
<if
test=
"picture != null"
>
`picture` = #{picture},
</if>
<if
test=
"authorType != null"
>
`author_type` = #{authorType},
</if>
<if
test=
"author != null"
>
`author` = #{author},
</if>
<if
test=
"likeNum != null"
>
`like_num` = #{likeNum},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"top != null"
>
`top` = #{top},
</if>
<if
test=
"createtime != null"
>
`createTime` = #{createtime},
</if>
<if
test=
"updatetime != null"
>
`updateTime` = #{updatetime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfArticleEntity"
>
update tb_cf_article
<set>
<if
test=
"title != null"
>
`title` = #{title},
</if>
<if
test=
"content != null"
>
`content` = #{content},
</if>
<if
test=
"picture != null"
>
`picture` = #{picture},
</if>
<if
test=
"authorType != null"
>
`author_type` = #{authorType},
</if>
<if
test=
"author != null"
>
`author` = #{author},
</if>
<if
test=
"likeNum != null"
>
`like_num` = #{likeNum},
</if>
<if
test=
"delFlag != null"
>
`del_flag` = #{delFlag},
</if>
<if
test=
"top != null"
>
`top` = #{top},
</if>
<if
test=
"createtime != null"
>
`createTime` = #{createtime},
</if>
<if
test=
"updatetime != null"
>
`updateTime` = #{updatetime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from tb_cf_article where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_article where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_article where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfarticle.html
浏览文件 @
024d5074
...
...
@@ -6,11 +6,11 @@
</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"
>
<i-input
v-model=
"q.name"
@
on-enter=
"query"
placeholder=
"
名称
"
/>
<i-input
v-model=
"q.name"
@
on-enter=
"query"
placeholder=
"
文章标题
"
/>
</i-col>
<i-button
@
click=
"query"
>
查询
</i-button>
<i-button
@
click=
"reloadSearch"
>
重置
</i-button>
...
...
@@ -27,18 +27,35 @@
#end
</div>
</Row>
<table
id=
"jqGrid"
></table>
<table
id=
"jqGrid"
></table>
</div>
<Card
v-show=
"!showList"
>
<p
slot=
"title"
>
{{title}}
</p>
<i-form
ref=
"formValidate"
:model=
"tbCfArticle"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"文章标题"
prop=
"title"
>
<i-form
ref=
"formValidate"
:model=
"tbCfArticle"
:rules=
"ruleValidate"
:label-width=
"80"
>
<Form-item
label=
"文章标题"
prop=
"title"
style=
"width: 800px"
>
<i-input
v-model=
"tbCfArticle.title"
placeholder=
"文章标题"
/>
</Form-item>
<!--<Form-item label="图片" prop="picture">
<i-input v-model="tbCfArticle.picture" placeholder="图片"/>
</Form-item>-->
<!-- <Form-item label="用户类型" prop="authorType" style="width: 800px">-->
<!-- <i-select v-model="tbCfArticle.authorType" style="width:200px" @on-change="changeType" :disabled="disabled">-->
<!-- <i-option v-for="item in typeList" :value="item.value">{{ item.label }}</i-option>-->
<!-- </i-select>-->
<!-- </Form-item>-->
<Form-item
label=
"用户类型"
prop=
"authorType"
style=
"width: 800px"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfArticle.authorType"
:disabled=
"disabled"
@
on-change=
"changeType"
>
<i-option
v-for=
"(el,i) in typeList"
:key=
'i'
:value=
"el.value"
>
{{el.label}}
</i-option>
</i-select>
</Form-item>
<Form-item
label=
"app账户"
prop=
"author"
style=
"width: 800px"
v-show=
"!account"
>
<i-input
v-model=
"tbCfArticle.author"
placeholder=
"260977204970 or ctehillah@gmail.com"
@
on-blur=
"queryAccount"
/>
</Form-item>
<Form-item
label=
"图片"
prop=
"picture"
>
<!-- <i-input v-model="xPicture.pictureUrl" placeholder="图片地址"/> -->
<upload
...
...
@@ -67,11 +84,12 @@
<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>
<script
src=
"${rc.contextPath}/statics/libs/iview.js"
></script>
<script
src=
"${rc.contextPath}/js/sys/tbcfarticle.js?_${date.systemTime}"
></script>
...
...
platform-admin/src/main/webapp/js/common.js
浏览文件 @
024d5074
...
...
@@ -465,13 +465,22 @@ imageFormat = function (cellvalue, options, rowObject) {
if
(
cellvalue
.
indexOf
(
';'
))
{
let
split
=
cellvalue
.
split
(
';'
);
cellvalue
=
'<img src="'
+
split
[
0
]
+
'" style="width:30px;height:30px;" />'
;
}
else
if
(
cellvalue
.
indexOf
(
','
))
{
let
split
=
cellvalue
.
split
(
','
);
cellvalue
=
'<img src="'
+
split
[
0
]
+
'" style="width:30px;height:30px;" />'
;
}
else
{
cellvalue
=
'<img src="'
+
cellvalue
+
'" style="width:30px;height:30px;" />'
;
}
}
return
cellvalue
;
};
accountFormat
=
function
(
cellvalue
,
options
,
rowObject
)
{
if
(
cellvalue
==
''
||
cellvalue
==
null
)
{
cellvalue
=
'系统用户'
;
}
return
cellvalue
;
}
/**
* 跳转翻译
* @param cellvalue
...
...
platform-admin/src/main/webapp/js/sys/tbcfarticle.js
浏览文件 @
024d5074
...
...
@@ -2,115 +2,166 @@ $(function () {
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfarticle/list'
,
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'文章标题'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
},
{
label
:
'图片'
,
name
:
'picture'
,
index
:
'picture'
,
width
:
80
},
{
label
:
'作者'
,
name
:
'author'
,
index
:
'author'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createtime'
,
index
:
'createTime'
,
width
:
80
}
]
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'文章标题'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
},
{
label
:
'图片'
,
name
:
'picture'
,
index
:
'picture'
,
width
:
80
,
formatter
:
imageFormat
},
{
label
:
'作者'
,
name
:
'account'
,
index
:
'account'
,
width
:
80
,
formatter
:
accountFormat
},
{
label
:
'创建时间'
,
name
:
'createtime'
,
index
:
'createTime'
,
width
:
80
}
]
});
});
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
data
:
{
el
:
'#rrapp'
,
data
:
{
showList
:
true
,
uploadList
:
[],
account
:
true
,
uploadList
:
[],
title
:
null
,
tbCfArticle
:
{},
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
}
},
methods
:
{
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfArticle
=
{};
this
.
uploadList
.
length
=
0
;
UE
.
getEditor
(
'content'
).
setContent
(
''
);
},
update
:
function
(
event
)
{
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
tbCfArticle
:
{},
typeList
:
[
{
value
:
0
,
label
:
'系统用户'
},
{
value
:
1
,
label
:
'app用户'
}
],
ruleValidate
:
{
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
]
},
q
:
{
name
:
''
},
disabled
:
false
,
flag
:
true
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
let
url
=
vm
.
tbCfArticle
.
id
==
null
?
"../tbcfarticle/save"
:
"../tbcfarticle/update"
;
vm
.
tbCfArticle
.
picture
=
this
.
uploadList
.
map
(
res
=>
res
).
join
(
','
);
vm
.
tbCfArticle
.
content
=
encodeURI
(
UE
.
getEditor
(
'content'
).
getContent
());
// 富文本取值
vm
.
tbCfArticle
.
content
=
vm
.
tbCfArticle
.
content
.
replace
(
/ /g
,
" "
);
},
methods
:
{
changeType
:
function
()
{
let
type
=
this
.
tbCfArticle
.
authorType
;
if
(
type
==
'0'
)
{
vm
.
account
=
true
;
}
else
if
(
type
==
'1'
)
{
vm
.
account
=
false
;
}
},
queryAccount
:
function
()
{
let
flag
=
vm
.
flag
;
let
url
=
'../tbcfuserinfo/queryByAccount?account='
+
this
.
tbCfArticle
.
author
;
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfArticle
),
type
:
"POST"
,
contentType
:
"application/json"
,
url
:
url
,
type
:
"GET"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
let
userId
=
r
.
userId
;
if
(
userId
==
null
||
userId
==
''
)
{
flag
=
false
}
// alert('操作成功', function (index) {
// vm.reload();
// });
}
});
},
del
:
function
(
event
)
{
});
return
flag
;
},
query
:
function
()
{
vm
.
reload
();
},
add
:
function
()
{
vm
.
disabled
=
false
;
vm
.
showList
=
false
;
vm
.
title
=
"新增"
;
vm
.
tbCfArticle
=
{};
this
.
uploadList
.
length
=
0
;
UE
.
getEditor
(
'content'
).
setContent
(
''
);
},
update
:
function
(
event
)
{
vm
.
disabled
=
true
;
let
id
=
getSelectedRow
(
"#jqGrid"
);
if
(
id
==
null
)
{
return
;
}
vm
.
showList
=
false
;
vm
.
title
=
"修改"
;
vm
.
getInfo
(
id
);
},
saveOrUpdate
:
function
(
event
)
{
let
flag
=
this
.
queryAccount
();
if
(
flag
)
{
let
url
=
vm
.
tbCfArticle
.
id
==
null
?
"../tbcfarticle/save"
:
"../tbcfarticle/update"
;
vm
.
tbCfArticle
.
picture
=
this
.
uploadList
.
map
(
res
=>
res
).
join
(
','
);
vm
.
tbCfArticle
.
content
=
encodeURI
(
UE
.
getEditor
(
'content'
).
getContent
());
// 富文本取值
vm
.
tbCfArticle
.
content
=
vm
.
tbCfArticle
.
content
.
replace
(
/ /g
,
" "
);
Ajax
.
request
({
url
:
url
,
params
:
JSON
.
stringify
(
vm
.
tbCfArticle
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
}
else
{
alert
(
'此用户不存在'
)
}
},
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
)
{
return
;
}
if
(
ids
==
null
)
{
return
;
}
confirm
(
'确定要删除选中的记录?'
,
function
()
{
confirm
(
'确定要删除选中的记录?'
,
function
()
{
Ajax
.
request
({
url
:
"../tbcfarticle/delete"
,
url
:
"../tbcfarticle/delete"
,
params
:
JSON
.
stringify
(
ids
),
type
:
"POST"
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
});
},
getInfo
:
function
(
id
)
{
}
});
});
},
getInfo
:
function
(
id
)
{
Ajax
.
request
({
url
:
"../tbcfarticle/info/"
+
id
,
url
:
"../tbcfarticle/info/"
+
id
,
async
:
true
,
successCallback
:
function
(
r
)
{
vm
.
account
=
true
;
vm
.
tbCfArticle
=
r
.
tbCfArticle
;
let
content
=
vm
.
tbCfArticle
.
content
;
vm
.
uploadList
=
vm
.
tbCfArticle
.
picture
.
split
(
','
);
if
(
content
!=
null
)
{
UE
.
getEditor
(
'content'
).
setContent
(
content
);
}
else
{
UE
.
getEditor
(
'content'
).
setContent
(
''
);
}
let
content
=
vm
.
tbCfArticle
.
content
;
vm
.
uploadList
=
vm
.
tbCfArticle
.
picture
.
split
(
','
);
if
(
content
!=
null
)
{
UE
.
getEditor
(
'content'
).
setContent
(
content
);
}
else
{
UE
.
getEditor
(
'content'
).
setContent
(
''
);
}
}
});
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
},
reload
:
function
(
event
)
{
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
page
:
page
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
},
reloadSearch
:
function
()
{
},
reloadSearch
:
function
()
{
vm
.
q
=
{
name
:
''
};
...
...
@@ -124,45 +175,45 @@ let vm = new Vue({
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
handleBeforeUpload
(
file
)
{
// 上传图片大小不超过5M
if
(
file
.
size
>
5
*
1024
*
1024
)
{
alert
(
'请上传不超过5M的图片'
);
return
false
;
}
console
.
log
(
123456
,
this
.
uploadList
)
const
check
=
this
.
uploadList
.
length
<
9
;
if
(
!
check
)
{
this
.
$Notice
.
warning
({
title
:
'最多只能上传九张图片'
});
return
false
;
}
// 限制上传文件的宽高
// return this.checkImageWH(file,750,320);
},
handleSuccess
(
response
,
file
,
fileList
)
{
// "http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155728894307110106.jpg"
vm
.
uploadList
.
push
(
response
);
$
(
"#itemImg"
).
show
();
},
// 删除上传图片
delImg1
:
function
(
url
)
{
if
(
vm
.
title
!=
"详情"
)
{
vm
.
uploadList
.
remove
(
url
);
console
.
log
(
url
);
Ajax
.
request
({
url
:
"../api/upload/delFile?url="
+
url
,
async
:
false
,
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
resultData
)
{
// console.log(resultData);
iview
.
Message
.
success
(
resultData
.
success
);
}
});
}
handleBeforeUpload
(
file
)
{
// 上传图片大小不超过5M
if
(
file
.
size
>
5
*
1024
*
1024
)
{
alert
(
'请上传不超过5M的图片'
);
return
false
;
}
console
.
log
(
123456
,
this
.
uploadList
)
const
check
=
this
.
uploadList
.
length
<
9
;
if
(
!
check
)
{
this
.
$Notice
.
warning
({
title
:
'最多只能上传九张图片'
});
return
false
;
}
// 限制上传文件的宽高
// return this.checkImageWH(file,750,320);
},
handleSuccess
(
response
,
file
,
fileList
)
{
// "http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155728894307110106.jpg"
vm
.
uploadList
.
push
(
response
);
$
(
"#itemImg"
).
show
();
},
// 删除上传图片
delImg1
:
function
(
url
)
{
if
(
vm
.
title
!=
"详情"
)
{
vm
.
uploadList
.
remove
(
url
);
console
.
log
(
url
);
Ajax
.
request
({
url
:
"../api/upload/delFile?url="
+
url
,
async
:
false
,
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
(
resultData
)
{
// console.log(resultData);
iview
.
Message
.
success
(
resultData
.
success
);
}
});
}
}
}
}
}
});
\ No newline at end of file
platform-common/src/main/java/com/platform/utils/Constant.java
浏览文件 @
024d5074
...
...
@@ -10,6 +10,15 @@ public class Constant {
*/
public
static
final
String
SUPER_ADMIN
=
"1"
;
/**
* 管理员
*/
public
static
final
String
SUPER_ITEM
=
"2"
;
/**
* 管理员
*/
public
static
final
String
SUPER_USER
=
"3"
;
/**
* 默认系统domainId 业务系统
*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论