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
9af32ed2
Commit
9af32ed2
authored
Dec 10, 2020
by
Xiaxuxia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复若干bug
parent
4983776b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
30 deletions
+51
-30
edit.vue
src/views/webSiteManagement/imageLibrary/edit.vue
+9
-12
list.vue
src/views/webSiteManagement/imageLibrary/list.vue
+42
-18
No files found.
src/views/webSiteManagement/imageLibrary/edit.vue
View file @
9af32ed2
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
确定
</el-button>
<el-button>
取消
</el-button>
<el-button
@
click=
"goBack"
>
取消
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -286,19 +286,16 @@ export default {
...
@@ -286,19 +286,16 @@ export default {
//点击编辑的时候,获取表格行数据,渲染edit页面
//点击编辑的时候,获取表格行数据,渲染edit页面
renderData
(
val
)
{
renderData
(
val
)
{
//获取详情
//获取详情
// getDetail(val.id).then(res => {
// let val = res.data;
let
afterFormat
=
this
.
filterParams
(
val
);
let
afterFormat
=
this
.
filterParams
(
val
);
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
afterFormat
));
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
afterFormat
));
data
.
paramJson
=
JSON
.
parse
(
data
.
paramJson
);
//
data.paramJson = JSON.parse(data.paramJson);
data
.
imageInfoRelationList
=
data
.
imageInfoRelationList
[
0
];
data
.
imageInfoRelationList
=
data
.
imageInfoRelationList
[
0
];
data
.
coverImg
=
data
.
coverImg
||
''
;
data
.
coverImg
=
data
.
coverImg
||
''
;
this
.
ruleForm
=
data
;
this
.
ruleForm
=
data
;
this
.
images
.
selects
=
this
.
ruleForm
.
relatedIds
.
split
(
','
)
//相似图片转为数组格式
this
.
images
.
selects
=
this
.
ruleForm
.
relatedIds
.
split
(
','
)
//相似图片转为数组格式
// console.log('bus end', this.ruleForm);
// })
},
},
//返回上一页
//返回上一页
goBack
()
{
goBack
()
{
...
...
src/views/webSiteManagement/imageLibrary/list.vue
View file @
9af32ed2
...
@@ -12,11 +12,16 @@
...
@@ -12,11 +12,16 @@
<el-option
v-for=
"(item, index) in bannerStatus"
:key=
"index"
:label=
"item"
:value=
"~~index"
></el-option>
<el-option
v-for=
"(item, index) in bannerStatus"
:key=
"index"
:label=
"item"
:value=
"~~index"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"影像分类"
>
<el-select
v-model=
"searchForm.type"
>
<el-option
v-for=
"(item, index) in imageTypes"
:key=
"index"
:label=
"item"
:value=
"~~index"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"卫星名称"
>
<el-form-item
label=
"卫星名称"
>
<el-input
v-model=
"searchForm.title"
placeholder=
"请输入卫星名称"
></el-input>
<el-input
v-model=
"searchForm.title"
placeholder=
"请输入卫星名称"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"
filterData
"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"
search
"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"clearFilterData"
>
清除搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"clearFilterData"
>
清除搜索
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -24,7 +29,7 @@
...
@@ -24,7 +29,7 @@
<el-table
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
align=
"center"
type=
"index"
label=
"序号"
width=
"65"
></el-table-column>
<el-table-column
align=
"center"
type=
"index"
label=
"序号"
width=
"65"
></el-table-column>
<el-table-column
align=
"center"
label=
"产品名称"
prop=
"name"
></el-table-column>
<el-table-column
align=
"center"
label=
"产品名称"
prop=
"name"
></el-table-column>
<el-table-column
align=
"center"
label=
"产品类型"
prop=
"
t
ype"
></el-table-column>
<el-table-column
align=
"center"
label=
"产品类型"
prop=
"
paramJson.productT
ype"
></el-table-column>
<el-table-column
align=
"center"
label=
"尺寸"
prop=
"imageInfoRelationList[0].fileWidth"
></el-table-column>
<el-table-column
align=
"center"
label=
"尺寸"
prop=
"imageInfoRelationList[0].fileWidth"
></el-table-column>
<el-table-column
align=
"center"
label=
"价格"
prop=
"imageInfoRelationList[0].price"
></el-table-column>
<el-table-column
align=
"center"
label=
"价格"
prop=
"imageInfoRelationList[0].price"
></el-table-column>
<el-table-column
align=
"center"
label=
"状态"
>
<el-table-column
align=
"center"
label=
"状态"
>
...
@@ -70,11 +75,12 @@ export default {
...
@@ -70,11 +75,12 @@ export default {
//请求参数。页码页数等
//请求参数。页码页数等
listQuery
:
{
listQuery
:
{
page
:
1
,
page
:
1
,
limit
:
2
0
limit
:
1
0
},
},
//搜索表单
//搜索表单
searchForm
:
{
searchForm
:
{
status
:
0
,
status
:
0
,
type
:
0
,
title
:
""
title
:
""
},
},
//添加banner与修改banner的form对象
//添加banner与修改banner的form对象
...
@@ -87,26 +93,31 @@ export default {
...
@@ -87,26 +93,31 @@ export default {
1
:
'启用'
,
1
:
'启用'
,
2
:
'禁用'
,
2
:
'禁用'
,
},
},
imageTypes
:
{
//1--影像美图 2--专题图 3--遥感成果图
0
:
'全部'
,
1
:
'影像美图'
,
2
:
'专题图'
,
3
:
'遥感成果图'
,
},
dialogVisible
:
false
,
dialogVisible
:
false
,
dialogTitle
:
"新增卫星"
dialogTitle
:
"新增卫星"
,
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getList
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
//清除搜索
//搜索按钮
filterData
()
{
search
()
{
if
(
this
.
searchForm
.
status
===
0
&&
this
.
searchForm
.
title
===
''
)
{
this
.
listQuery
=
{
this
.
list
=
this
.
data
;
status
:
this
.
searchForm
.
status
||
null
,
return
;
type
:
this
.
searchForm
.
type
||
null
,
}
name
:
this
.
searchForm
.
title
,
let
temp
=
this
.
data
.
filter
(
v
=>
this
.
searchForm
.
status
===
0
?
true
:
!!
(
this
.
searchForm
.
status
===
v
.
status
))
page
:
1
,
if
(
!!
this
.
searchForm
.
title
)
{
limit
:
10
temp
=
temp
.
filter
(
v
=>
v
.
name
.
includes
(
this
.
searchForm
.
title
))
}
}
this
.
getList
();
this
.
list
=
temp
},
},
//清除搜索
//清除搜索
clearFilterData
()
{
clearFilterData
()
{
...
@@ -114,7 +125,15 @@ export default {
...
@@ -114,7 +125,15 @@ export default {
status
:
0
,
status
:
0
,
title
:
""
title
:
""
}
}
this
.
list
=
this
.
data
;
this
.
listQuery
=
{
status
:
this
.
searchForm
.
status
||
null
,
type
:
this
.
searchForm
.
type
||
null
,
name
:
this
.
searchForm
.
title
,
page
:
1
,
limit
:
10
}
this
.
getList
()
},
},
//切换页码
//切换页码
currentChange
(
val
)
{
currentChange
(
val
)
{
...
@@ -183,8 +202,13 @@ export default {
...
@@ -183,8 +202,13 @@ export default {
getList
()
{
getList
()
{
this
.
listLoading
=
true
;
this
.
listLoading
=
true
;
page
(
this
.
listQuery
).
then
(
res
=>
{
page
(
this
.
listQuery
).
then
(
res
=>
{
this
.
list
=
res
.
data
.
data
this
.
list
=
res
.
data
.
data
;
this
.
data
=
res
.
data
.
data
this
.
list
=
this
.
list
.
map
(
v
=>
{
v
.
paramJson
=
JSON
.
parse
(
v
.
paramJson
)
return
v
})
console
.
log
(
222222
,
this
.
list
)
this
.
data
=
res
.
data
.
data
;
this
.
total
=
res
.
data
.
totalCount
;
this
.
total
=
res
.
data
.
totalCount
;
this
.
listLoading
=
false
;
this
.
listLoading
=
false
;
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
...
...
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