Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform-ui
Commits
3c577ac2
Commit
3c577ac2
authored
Jan 07, 2021
by
rencs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_ren' into 'master'
Dev ren See merge request
!28
parents
cb85e7f1
099da13d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
82 deletions
+79
-82
singleImageX.vue
src/components/Upload/singleImageX.vue
+17
-16
index.vue
...s/webSiteManagement/newsCategory/nebulaDynamics/index.vue
+62
-66
No files found.
src/components/Upload/singleImageX.vue
View file @
3c577ac2
...
@@ -9,10 +9,11 @@
...
@@ -9,10 +9,11 @@
:http-request=
"onUploadRequest"
:http-request=
"onUploadRequest"
:show-file-list=
"false"
:show-file-list=
"false"
:multiple=
"false"
:multiple=
"false"
:limit=
"1"
>
:limit=
"1"
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__text"
>
只能上传1
个文件
</div>
<div
class=
"el-upload__text"
>
只能上传1
张图片
</div>
</el-upload>
</el-upload>
<div
class=
"image-preview"
v-show=
"value"
>
<div
class=
"image-preview"
v-show=
"value"
>
<div
class=
"image-preview-wrapper"
>
<div
class=
"image-preview-wrapper"
>
...
@@ -33,7 +34,7 @@ export default {
...
@@ -33,7 +34,7 @@ export default {
props
:
{
props
:
{
refName
:
{
refName
:
{
type
:
String
,
type
:
String
,
default
:
'upload'
default
:
"upload"
,
},
},
//图片地址
//图片地址
value
:
{
value
:
{
...
@@ -43,19 +44,19 @@ export default {
...
@@ -43,19 +44,19 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
uploading
:
false
uploading
:
false
,
};
};
},
},
mounted
()
{
mounted
()
{
this
.
$bus
.
$on
(
'upload-clearFiles'
,
this
.
clearFiles
)
this
.
$bus
.
$on
(
"upload-clearFiles"
,
this
.
clearFiles
);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
$bus
.
$off
(
'upload-clearFiles'
)
this
.
$bus
.
$off
(
"upload-clearFiles"
);
},
},
methods
:
{
methods
:
{
//清空上传过的图片
//清空上传过的图片
clearFiles
()
{
clearFiles
()
{
this
.
$refs
[
this
.
refName
].
clearFiles
()
this
.
$refs
[
this
.
refName
].
clearFiles
()
;
},
},
//删除图片
//删除图片
rmImage
()
{
rmImage
()
{
...
@@ -68,13 +69,13 @@ export default {
...
@@ -68,13 +69,13 @@ export default {
let
fileObj
=
data
.
file
;
let
fileObj
=
data
.
file
;
//获取图片详情信息
//获取图片详情信息
let
imgInfo
=
{};
let
imgInfo
=
{};
let
temp
=
URL
.
createObjectURL
(
fileObj
)
let
temp
=
URL
.
createObjectURL
(
fileObj
)
;
let
img
=
new
Image
();
let
img
=
new
Image
();
img
.
src
=
temp
;
img
.
src
=
temp
;
img
.
onload
=
function
()
{
img
.
onload
=
function
()
{
imgInfo
.
width
=
img
.
width
;
imgInfo
.
width
=
img
.
width
;
imgInfo
.
height
=
img
.
height
;
imgInfo
.
height
=
img
.
height
;
}
}
;
imgInfo
.
size
=
fileObj
.
size
;
imgInfo
.
size
=
fileObj
.
size
;
imgInfo
.
type
=
fileObj
.
type
;
imgInfo
.
type
=
fileObj
.
type
;
// FormData 对象
// FormData 对象
...
@@ -82,21 +83,21 @@ export default {
...
@@ -82,21 +83,21 @@ export default {
// 文件对象
// 文件对象
form
.
append
(
"file"
,
fileObj
);
form
.
append
(
"file"
,
fileObj
);
uploadFile
(
form
).
then
(
res
=>
{
uploadFile
(
form
).
then
(
(
res
)
=>
{
this
.
uploading
=
false
;
this
.
uploading
=
false
;
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
this
.
emitFunc
(
res
.
data
,
imgInfo
)
this
.
emitFunc
(
res
.
data
,
imgInfo
)
;
}
else
{
}
else
{
this
.
emitFunc
(
""
,
null
);
this
.
emitFunc
(
""
,
null
);
this
.
$message
.
error
(
res
.
message
)
this
.
$message
.
error
(
res
.
message
)
;
}
}
})
})
;
},
},
//组件通信
//组件通信
emitFunc
(
val
,
info
=
null
)
{
emitFunc
(
val
,
info
=
null
)
{
this
.
$emit
(
'input'
,
val
,
info
)
this
.
$emit
(
"input"
,
val
,
info
);
}
}
,
},
},
};
};
</
script
>
</
script
>
...
@@ -153,4 +154,4 @@ export default {
...
@@ -153,4 +154,4 @@ export default {
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/webSiteManagement/newsCategory/nebulaDynamics/index.vue
View file @
3c577ac2
<!--
<!--
* @Author: Jenkins
* @Author: Jenkins
* @Date: 2020-12-01 09:54:12
* @Date: 2020-12-01 09:54:12
* @LastEditTime: 202
1-01-06 09:53:06
* @LastEditTime: 202
0-12-11 11:27:34
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: 星云动态
* @Description: 星云动态
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\newsCategory\index.vue
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\newsCategory\index.vue
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
>
>
<el-table-column
label=
"序号"
align=
"center"
>
<el-table-column
label=
"序号"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
i
ndex
}}
</span>
<span>
{{
scope
.
row
.
i
d
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"类型名称"
align=
"center"
>
<el-table-column
label=
"类型名称"
align=
"center"
>
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
@
size-change=
"changeHandleSize"
@
size-change=
"changeHandleSize"
@
current-change=
"changeHandleCurrent"
@
current-change=
"changeHandleCurrent"
:current-page
.
sync=
"typePagination.currentPage"
:current-page
.
sync=
"typePagination.currentPage"
:page-sizes=
"[
6,8,10
]"
:page-sizes=
"[
2, 4, 6
]"
:page-size=
"typePagination.pageSize"
:page-size=
"typePagination.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"typePagination.total"
:total=
"typePagination.total"
...
@@ -237,7 +237,13 @@
...
@@ -237,7 +237,13 @@
</div>
</div>
<!-- 表格 -->
<!-- 表格 -->
<div
class=
"table"
>
<div
class=
"table"
>
<el-table
:data=
"tableData"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table
:data=
"tableData"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
label=
"序号"
width=
"100"
align=
"center"
>
<el-table-column
label=
"序号"
width=
"100"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
index
}}
</span>
<span>
{{
scope
.
row
.
index
}}
</span>
...
@@ -323,7 +329,7 @@
...
@@ -323,7 +329,7 @@
</div>
</div>
</el-dialog> -->
</el-dialog> -->
<!-- 使用图片查看器预览当前缩略图 -->
<!-- 使用图片查看器预览当前缩略图
-->
<el-image-viewer
<el-image-viewer
v-if=
"currentIcon.showPreview"
v-if=
"currentIcon.showPreview"
:on-close=
"closePreview"
:on-close=
"closePreview"
...
@@ -464,9 +470,9 @@ export default {
...
@@ -464,9 +470,9 @@ export default {
// },
// },
],
],
typePagination
:
{
typePagination
:
{
currentPage
:
1
,
// 当前页码
currentPage
:
1
,
// 当前页码
pageSize
:
6
,
// 每页查询数量
pageSize
:
2
,
// 每页查询数量
total
:
0
,
// 总记录数量
total
:
0
,
// 总记录数量
},
},
typeEditorVisible
:
false
,
typeEditorVisible
:
false
,
editorType
:
{},
// 编辑中的类型
editorType
:
{},
// 编辑中的类型
...
@@ -782,32 +788,29 @@ export default {
...
@@ -782,32 +788,29 @@ export default {
}
}
},
},
// 获取类型分页的表格数据
// 获取类型分页的表格数据
pullListNewsType
(){
pullListNewsType
()
{
// 先将当前类型表格数据清空
// 先将当前类型表格数据清空
this
.
tableType
=
[]
this
.
tableType
=
[];
// 获取分页新闻类型
// 获取分页新闻类型
getListnewsType
({
getListnewsType
({
page
:
this
.
typePagination
.
currentPage
,
page
:
this
.
typePagination
.
currentPage
,
limit
:
this
.
typePagination
.
pageSize
,
limit
:
this
.
typePagination
.
pageSize
,
name
:
""
,
name
:
""
,
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
console
.
log
(
"获取分页新闻类型=>"
,
res
);
console
.
log
(
"获取分页新闻类型=>"
,
res
);
if
(
res
.
status
==
200
){
if
(
res
.
status
==
200
)
{
this
.
typePagination
.
total
=
res
.
data
.
totalCount
this
.
typePagination
.
total
=
res
.
data
.
totalCount
;
res
.
data
.
data
.
forEach
((
element
,
index
)
=>
{
res
.
data
.
data
.
forEach
((
element
)
=>
{
// 未被删除的类型
// 未被删除的类型
if
(
element
.
isDel
==
0
){
if
(
element
.
isDel
==
0
)
{
this
.
tableType
.
push
({
this
.
tableType
.
push
({
index
:
(
this
.
typePagination
.
currentPage
-
1
)
*
this
.
typePagination
.
pageSize
+
index
+
1
,
id
:
element
.
id
,
id
:
element
.
id
,
name
:
element
.
nameCn
,
name
:
element
.
nameCn
,
nameEn
:
element
.
nameEn
,
nameEn
:
element
.
nameEn
,
sort
:
element
.
rank
,
sort
:
element
.
rank
,
status
:
element
.
status
,
status
:
element
.
status
,
isDel
:
element
.
isDel
,
isDel
:
element
.
isDel
});
})
}
})
}
}
});
});
}
}
...
@@ -949,38 +952,31 @@ export default {
...
@@ -949,38 +952,31 @@ export default {
this
.
typeEditorVisible
=
false
;
this
.
typeEditorVisible
=
false
;
},
},
// 修改类型
// 修改类型
confirmEditor
(){
confirmEditor
()
{
// 中文对应
// 中文对应
if
(
/^
(?:[\u
3400-
\u
4DB5
\u
4E00-
\u
9FEA
\u
FA0E
\u
FA0F
\u
FA11
\u
FA13
\u
FA14
\u
FA1F
\u
FA21
\u
FA23
\u
FA24
\u
FA27-
\u
FA29
]
|
[\u
D840-
\u
D868
\u
D86A-
\u
D86C
\u
D86F-
\u
D872
\u
D874-
\u
D879
][\u
DC00-
\u
DFFF
]
|
\u
D869
[\u
DC00-
\u
DED6
\u
DF00-
\u
DFFF
]
|
\u
D86D
[\u
DC00-
\u
DF34
\u
DF40-
\u
DFFF
]
|
\u
D86E
[\u
DC00-
\u
DC1D
\u
DC20-
\u
DFFF
]
|
\u
D873
[\u
DC00-
\u
DEA1
\u
DEB0-
\u
DFFF
]
|
\u
D87A
[\u
DC00-
\u
DFE0
])
+$/
.
test
(
this
.
editorType
.
name
)){
if
(
if
(
this
.
editorType
.
sort
>=
0
&&
this
.
editorType
.
sort
<
10000
){
/^
(?:[\u
3400-
\u
4DB5
\u
4E00-
\u
9FEA
\u
FA0E
\u
FA0F
\u
FA11
\u
FA13
\u
FA14
\u
FA1F
\u
FA21
\u
FA23
\u
FA24
\u
FA27-
\u
FA29
]
|
[\u
D840-
\u
D868
\u
D86A-
\u
D86C
\u
D86F-
\u
D872
\u
D874-
\u
D879
][\u
DC00-
\u
DFFF
]
|
\u
D869
[\u
DC00-
\u
DED6
\u
DF00-
\u
DFFF
]
|
\u
D86D
[\u
DC00-
\u
DF34
\u
DF40-
\u
DFFF
]
|
\u
D86E
[\u
DC00-
\u
DC1D
\u
DC20-
\u
DFFF
]
|
\u
D873
[\u
DC00-
\u
DEA1
\u
DEB0-
\u
DFFF
]
|
\u
D87A
[\u
DC00-
\u
DFE0
])
+$/
.
test
(
// 上传修改
this
.
editorType
.
name
addUpdateNewsType
({
)
id
:
this
.
editorType
.
id
,
)
{
nameCn
:
this
.
editorType
.
name
,
if
(
this
.
editorType
.
sort
>=
0
&&
this
.
editorType
.
sort
<
10000
)
{
nameEn
:
this
.
editorType
.
nameEn
,
// 上传修改
rank
:
this
.
editorType
.
sort
,
addUpdateNewsType
({
status
:
this
.
editorType
.
status
,
// 1启用,2不启用
id
:
this
.
editorType
.
id
,
isDel
:
this
.
editorType
.
isDel
,
// 0不删除,1删除
nameCn
:
this
.
editorType
.
name
,
}).
then
(
res
=>
{
nameEn
:
this
.
editorType
.
nameEn
,
if
(
res
.
status
==
200
){
rank
:
this
.
editorType
.
sort
,
this
.
$message
({
status
:
this
.
editorType
.
status
,
// 1启用,2不启用
message
:
'修改成功!!!'
,
isDel
:
this
.
editorType
.
isDel
,
// 0不删除,1删除
type
:
'success'
});
})
this
.
$message
({
this
.
pullListNewsType
()
message
:
"修改成功!!!"
,
this
.
typeEditorVisible
=
false
type
:
"success"
,
}
else
{
});
this
.
$message
({
this
.
pullListNewsType
();
message
:
'修改失败请稍后重试!!!'
,
this
.
typeEditorVisible
=
false
;
type
:
'fail'
}
else
{
})
this
.
$message
.
error
(
"排序值不在指定范围,请输入正确的排序值!!!"
);
}
})
}
else
{
this
.
$message
.
error
(
'排序值不在指定范围,请输入正确的排序值!!!'
);
}
}
else
{
this
.
$message
.
error
(
'中文名称不正确!!!'
);
}
}
}
else
{
}
else
{
this
.
$message
.
error
(
"中文名称不正确!!!"
);
this
.
$message
.
error
(
"中文名称不正确!!!"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment