Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
9ec222b2
提交
9ec222b2
authored
3月 04, 2021
作者:
陆
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
开屏图
上级
765b0312
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
73 行增加
和
14 行删除
+73
-14
screenimage.html
...m-admin/src/main/webapp/WEB-INF/page/sys/screenimage.html
+21
-11
screenimage.js
platform-admin/src/main/webapp/js/sys/screenimage.js
+52
-3
没有找到文件。
platform-admin/src/main/webapp/WEB-INF/page/sys/screenimage.html
浏览文件 @
9ec222b2
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html
xmlns:v-bind=
"http://www.w3.org/1999/xhtml"
>
<head>
<head>
<title>
开屏图
</title>
<title>
开屏图
</title>
#parse("sys/header.html")
#parse("sys/header.html")
...
@@ -36,18 +36,28 @@
...
@@ -36,18 +36,28 @@
<Form-item
label=
"开屏图名称"
prop=
"name"
>
<Form-item
label=
"开屏图名称"
prop=
"name"
>
<i-input
v-model=
"screenImage.name"
placeholder=
"开屏图名称"
/>
<i-input
v-model=
"screenImage.name"
placeholder=
"开屏图名称"
/>
</Form-item>
</Form-item>
<Form-item
label=
"开屏图"
prop=
"screenImage"
>
<!-- <Form-item label="开屏图" prop="screenImage">-->
<i-input
v-model=
"screenImage.screenImage"
placeholder=
"开屏图"
/>
<!-- <i-input v-model="screenImage.screenImage" placeholder="开屏图"/>-->
<!-- </Form-item>-->
<Form-item
label=
"开屏图"
prop=
"newsImg"
>
<img
v-bind:src=
"screenImage.screenImage"
style=
"width:200px;height:200px;"
v-show=
"!!screenImage.screenImage"
/>
<input
type=
"file"
placeholder=
"主图"
@
change=
"tirggerFile($event)"
/>
</Form-item>
</Form-item>
<Form-item
label=
"状态 0:关闭 1:开启"
prop=
"status"
>
<Form-item
label=
"是否显示"
prop=
"priceScore"
style=
"width: 500px"
>
<i-input
v-model=
"screenImage.status"
placeholder=
"状态 0:关闭 1:开启"
/>
<i-switch
v-model=
"screenImage.status == 1?true:false"
size=
"large"
@
on-change=
"changeswitch"
>
</Form-item>
<span
slot=
"open"
>
开启
</span>
<Form-item
label=
"创建时间"
prop=
"createTime"
>
<span
slot=
"close"
>
关闭
</span>
<i-input
v-model=
"screenImage.createTime"
placeholder=
"创建时间"
/>
</i-switch>
</Form-item>
<Form-item
label=
"更新时间"
prop=
"updateTime"
>
<i-input
v-model=
"screenImage.updateTime"
placeholder=
"更新时间"
/>
</Form-item>
</Form-item>
<!-- <Form-item label="状态 0:关闭 1:开启" prop="status">-->
<!-- <i-input v-model="screenImage.status" placeholder="状态 0:关闭 1:开启"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="创建时间" prop="createTime">-->
<!-- <i-input v-model="screenImage.createTime" placeholder="创建时间"/>-->
<!-- </Form-item>-->
<!-- <Form-item label="更新时间" prop="updateTime">-->
<!-- <i-input v-model="screenImage.updateTime" placeholder="更新时间"/>-->
<!-- </Form-item>-->
<Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<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>
...
...
platform-admin/src/main/webapp/js/sys/screenimage.js
浏览文件 @
9ec222b2
...
@@ -4,10 +4,28 @@ $(function () {
...
@@ -4,10 +4,28 @@ $(function () {
colModel
:
[
colModel
:
[
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'id'
,
name
:
'id'
,
index
:
'id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'开屏图名称'
,
name
:
'name'
,
index
:
'name'
,
width
:
80
},
{
label
:
'开屏图名称'
,
name
:
'name'
,
index
:
'name'
,
width
:
80
},
{
label
:
'开屏图'
,
name
:
'screenImage'
,
index
:
'screen_image'
,
width
:
80
},
{
label
:
'开屏图'
,
name
:
'screenImage'
,
index
:
'screen_image'
,
width
:
80
,
formatter
:
imageFormat
},
{
label
:
'状态 0:关闭 1:开启'
,
name
:
'status'
,
index
:
'status'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'status'
,
index
:
'status'
,
width
:
80
,
formatter
:
function
(
value
,
grid
,
rows
){
if
(
value
==
'1'
)
{
return
"<i-button class=
\"
ivu-btn ivu-btn-primary
\"
style='border-radius:25px;' type=
\"
info
\"
>已开启</i-button>"
;
}
else
if
(
value
==
'0'
)
{
return
"<i-button class=
\"
ivu-btn ivu-btn-success
\"
style='border-radius:25px;' type=
\"
warning
\"
>未开启</i-button>"
;
}
}},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'创建时间'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'更新时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
80
}]
{
label
:
'更新时间'
,
name
:
'updateTime'
,
index
:
'update_time'
,
width
:
80
}],
// shrinkToFit: true,
// datatype: "json",
// rowNum: 15,
// rowList: [15, 30, 45],
// mtype: "POST",
// rownumbers: true,
// rownumWidth: 40,
// gridview: true,
// pager: '#speedp',
// sortname: 'sort',
// viewrecords: true,
// sortorder: "desc"
});
});
});
});
...
@@ -59,6 +77,37 @@ let vm = new Vue({
...
@@ -59,6 +77,37 @@ let vm = new Vue({
}
}
});
});
},
},
tirggerFile
:
function
(
event
)
{
var
file
=
event
.
target
.
files
[
0
];
// (利用console.log输出看file文件对象)
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
$
.
ajax
({
url
:
"../api/upload/image/"
,
type
:
"POST"
,
data
:
formData
,
cache
:
false
,
//不设置缓存
processData
:
false
,
// 不处理数据
contentType
:
false
,
// 不设置内容类型
success
:
function
(
result
)
{
result
=
JSON
.
parse
(
result
);
//console.log(result)
if
(
result
.
errno
==
0
)
{
//成功
vm
.
screenImage
.
screenImage
=
result
.
data
;
vm
.
$forceUpdate
();
}
else
{
iview
.
Message
.
error
(
result
.
errmsg
);
}
}
});
},
// 修改是否显示
changeswitch
(
e
){
if
(
e
){
vm
.
screenImage
.
status
=
1
}
else
{
vm
.
screenImage
.
status
=
2
}
},
del
:
function
(
event
)
{
del
:
function
(
event
)
{
let
ids
=
getSelectedRows
(
"#jqGrid"
);
let
ids
=
getSelectedRows
(
"#jqGrid"
);
if
(
ids
==
null
){
if
(
ids
==
null
){
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论