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
69a049c2
Commit
69a049c2
authored
Dec 24, 2020
by
rencs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12.24 存档数据管理
parent
798e7b8b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
389 additions
and
7 deletions
+389
-7
archiveDataManagement.js
src/api/website/archiveDataManagement.js
+52
-0
index.vue
src/views/archiveDataManagement/resolutionManger/index.vue
+153
-3
index.vue
...views/archiveDataManagement/satelliteManagement/index.vue
+184
-4
No files found.
src/api/website/archiveDataManagement.js
View file @
69a049c2
...
...
@@ -44,3 +44,55 @@ export function getimagePriceAll(obj) {
params
:
obj
});
}
// 删除分辨率
export
function
delResolution
(
obj
)
{
return
fetch
({
url
:
'/api/datacenter/bg/resolution/del?id='
+
obj
.
id
,
method
:
'DELETE'
// data: obj
});
}
// 删除卫星传感器
export
function
delimagePrice
(
obj
)
{
return
fetch
({
url
:
'/api/datacenter/bg/imagePrice/del?id='
+
obj
.
id
,
method
:
'DELETE'
// data: obj
});
}
// 添加分辨率
export
function
addResolution
(
obj
)
{
return
fetch
({
url
:
'/api/datacenter/bg/resolution'
,
method
:
'post'
,
data
:
obj
});
}
// 修改分辨率
export
function
updateResolution
(
obj
)
{
return
fetch
({
url
:
'/api/datacenter/bg/resolution/'
+
obj
.
id
,
method
:
'PUT'
,
data
:
obj
});
}
// 添加卫星传感器
export
function
addimagePrice
(
obj
)
{
return
fetch
({
url
:
'/api/datacenter/bg/imagePrice'
,
method
:
'post'
,
data
:
obj
});
}
// 修改卫星传感器
export
function
updateimagePrice
(
obj
)
{
return
fetch
({
url
:
'/api/datacenter/bg/imagePrice/'
+
obj
.
id
,
method
:
'PUT'
,
data
:
obj
});
}
src/views/archiveDataManagement/resolutionManger/index.vue
View file @
69a049c2
<
template
>
<div
class=
"main"
>
<el-row>
<el-button
type=
"primary"
@
click=
"addItem"
>
添加分辨率
</el-button>
</el-row>
<el-table
border
:data=
"list"
style=
"margin-top: 20px; width: 100%"
>
<el-table-column
prop=
"resolutionName"
label=
"分辨率名称"
align=
"center"
>
</el-table-column>
...
...
@@ -17,8 +20,21 @@
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
<el-row>
<el-button
type=
"text"
>
编辑
</el-button>
<el-button
type=
"text"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"edit(row)"
>
编辑
</el-button>
<el-button
v-if=
"row.status == 1"
type=
"text"
@
click=
"changeSate(row, 2)"
>
下架
</el-button
>
<el-button
v-if=
"row.status == 2"
type=
"text"
@
click=
"changeSate(row, 1)"
>
上架
</el-button
>
<el-button
type=
"text"
@
click=
"delItem(row)"
>
删除
</el-button>
</el-row>
</
template
>
</el-table-column>
...
...
@@ -34,10 +50,43 @@
:total=
"total"
>
</el-pagination>
<el-dialog
:title=
"titleText"
:visible
.
sync=
"showAddOrUpd"
width=
"30%"
@
close=
"showAddOrUpd = false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"分辨率名称"
prop=
"resolutionName"
>
<el-input
v-model=
"form.resolutionName"
style=
"width: 80%"
></el-input>
</el-form-item>
<el-form-item
label=
"分辨率标识"
prop=
"resolution"
>
<el-input
v-model=
"form.resolution"
style=
"width: 80%"
></el-input>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"sort"
>
<el-input-number
:min=
"0"
:step=
"1"
:precision=
"0"
v-model=
"form.sort"
></el-input-number>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"showAddOrUpd = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"addOrUpdOk('form')"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
getResolutionData
}
from
"api/website/archiveDataManagement"
;
import
{
getResolutionData
,
delResolution
,
addResolution
,
updateResolution
,
}
from
"api/website/archiveDataManagement"
;
export
default
{
data
()
{
return
{
...
...
@@ -47,12 +96,113 @@ export default {
page
:
1
,
limit
:
10
,
},
form
:
{
resolutionName
:
undefined
,
resolution
:
undefined
,
sort
:
0
,
status
:
2
,
},
rules
:
{
resolutionName
:
[
{
required
:
true
,
message
:
"请输入分辨率名称"
,
trigger
:
"blur"
},
],
resolution
:
[
{
required
:
true
,
message
:
"请输入分辨率标识"
,
trigger
:
"blur"
},
],
sort
:
[{
required
:
true
,
message
:
"请输入排序"
,
trigger
:
"blur"
}],
},
showAddOrUpd
:
false
,
titleText
:
""
,
};
},
created
()
{
this
.
getList
();
},
methods
:
{
addItem
()
{
this
.
showAddOrUpd
=
true
;
this
.
titleText
=
"添加分辨率"
;
this
.
form
=
{
resolutionName
:
undefined
,
resolution
:
undefined
,
sort
:
0
,
status
:
2
,
};
},
edit
(
row
)
{
this
.
showAddOrUpd
=
true
;
this
.
titleText
=
"修改分辨率"
;
this
.
form
=
row
;
},
changeSate
(
row
,
state
)
{
let
data
=
{
id
:
row
.
id
,
status
:
state
,
};
updateResolution
(
data
).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"修改成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
},
addOrUpdOk
(
formname
)
{
this
.
$refs
[
formname
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
)
{
//编辑
updateResolution
(
this
.
form
).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"修改成功"
);
this
.
getList
();
this
.
showAddOrUpd
=
false
;
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
}
else
{
//添加
addResolution
(
this
.
form
).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"添加成功"
);
this
.
listQuery
.
page
=
1
;
this
.
getList
();
this
.
showAddOrUpd
=
false
;
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
}
}
else
{
return
false
;
}
});
},
delItem
(
row
)
{
this
.
$confirm
(
"是否删除"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
delResolution
({
id
:
Number
(
row
.
id
)
}).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"删除成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消"
,
});
});
},
getList
()
{
getResolutionData
(
this
.
listQuery
).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
...
...
src/views/archiveDataManagement/satelliteManagement/index.vue
View file @
69a049c2
<
template
>
<div
class=
"main"
>
<el-row>
<el-button
type=
"primary"
>
添加卫星
</el-button>
<el-button
type=
"primary"
@
click=
"addItem"
>
添加卫星传感器
</el-button>
</el-row>
<el-table
border
:data=
"list"
style=
"margin-top: 20px; width: 100%"
>
<el-table-column
prop=
"satelliteName"
label=
"卫星名称"
align=
"center"
>
...
...
@@ -29,8 +29,21 @@
<el-table-column
label=
"操作"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
<el-row>
<el-button
type=
"text"
>
编辑
</el-button>
<el-button
type=
"text"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"edit(row)"
>
编辑
</el-button>
<el-button
v-if=
"row.status == 1"
type=
"text"
@
click=
"changeSate(row, 0)"
>
设为不可用
</el-button
>
<el-button
v-if=
"row.status == 0"
type=
"text"
@
click=
"changeSate(row, 1)"
>
设为可用
</el-button
>
<el-button
type=
"text"
@
click=
"delItem(row)"
>
删除
</el-button>
</el-row>
</
template
>
</el-table-column>
...
...
@@ -46,10 +59,61 @@
:total=
"total"
>
</el-pagination>
<el-dialog
:title=
"titleText"
:visible
.
sync=
"showAddOrUpd"
width=
"30%"
@
close=
"showAddOrUpd = false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"卫星名称"
prop=
"satelliteName"
>
<el-input
v-model=
"form.satelliteName"
style=
"width: 80%"
></el-input>
</el-form-item>
<el-form-item
label=
"卫星标识"
prop=
"imageSatelliteType"
>
<el-input
v-model=
"form.imageSatelliteType"
style=
"width: 80%"
></el-input>
</el-form-item>
<el-form-item
label=
"分辨率标识"
prop=
"imageResolution"
>
<el-input
v-model=
"form.imageResolution"
style=
"width: 80%"
></el-input>
</el-form-item>
<el-form-item
label=
"传感器"
prop=
"imageSensorType"
>
<el-input
v-model=
"form.imageSensorType"
style=
"width: 80%"
></el-input>
</el-form-item>
<el-form-item
label=
"传感器名称"
prop=
"sensorName"
>
<el-input
v-model=
"form.sensorName"
style=
"width: 80%"
></el-input>
</el-form-item>
<el-form-item
label=
"价格"
prop=
"price"
>
<el-input-number
:min=
"0"
:step=
"1"
:precision=
"0"
v-model=
"form.price"
></el-input-number>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"showAddOrUpd = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"addOrUpdOk('form')"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
getSatelliteData
}
from
"api/website/archiveDataManagement"
;
import
{
getSatelliteData
,
delimagePrice
,
addimagePrice
,
updateimagePrice
,
}
from
"api/website/archiveDataManagement"
;
export
default
{
data
()
{
return
{
...
...
@@ -59,6 +123,35 @@ export default {
page
:
1
,
limit
:
10
,
},
form
:
{
satelliteName
:
undefined
,
imageSatelliteType
:
undefined
,
imageResolution
:
undefined
,
imageSensorType
:
undefined
,
sensorName
:
undefined
,
price
:
0
,
status
:
0
,
},
rules
:
{
satelliteName
:
[
{
required
:
true
,
message
:
"请输入卫星名称"
,
trigger
:
"blur"
},
],
imageSatelliteType
:
[
{
required
:
true
,
message
:
"请输入卫星标识"
,
trigger
:
"blur"
},
],
imageResolution
:
[
{
required
:
true
,
message
:
"请输入分辨率标识"
,
trigger
:
"blur"
},
],
imageSensorType
:
[
{
required
:
true
,
message
:
"请输入传感器"
,
trigger
:
"blur"
},
],
sensorName
:
[
{
required
:
true
,
message
:
"请输入传感器名称"
,
trigger
:
"blur"
},
],
price
:
[{
required
:
true
,
message
:
"请输入价格"
,
trigger
:
"blur"
}],
},
showAddOrUpd
:
false
,
titleText
:
""
,
};
},
created
()
{
...
...
@@ -73,6 +166,93 @@ export default {
}
});
},
addItem
()
{
this
.
showAddOrUpd
=
true
;
this
.
titleText
=
"添加卫星传感器"
;
this
.
form
=
{
satelliteName
:
undefined
,
imageSatelliteType
:
undefined
,
imageResolution
:
undefined
,
imageSensorType
:
undefined
,
sensorName
:
undefined
,
price
:
0
,
status
:
0
,
};
},
edit
(
row
)
{
this
.
showAddOrUpd
=
true
;
this
.
titleText
=
"修改卫星传感器"
;
this
.
form
=
row
;
},
changeSate
(
row
,
state
)
{
let
data
=
{
id
:
row
.
id
,
status
:
state
,
};
updateimagePrice
(
data
).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"修改成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
},
addOrUpdOk
(
formname
)
{
this
.
$refs
[
formname
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
)
{
//编辑
updateimagePrice
(
this
.
form
).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"修改成功"
);
this
.
getList
();
this
.
showAddOrUpd
=
false
;
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
}
else
{
//添加
addimagePrice
(
this
.
form
).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"添加成功"
);
this
.
listQuery
.
page
=
1
;
this
.
getList
();
this
.
showAddOrUpd
=
false
;
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
}
}
else
{
return
false
;
}
});
},
delItem
(
row
)
{
this
.
$confirm
(
"是否删除"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
delimagePrice
({
id
:
Number
(
row
.
id
)
}).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"删除成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消"
,
});
});
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
page
=
1
;
this
.
listQuery
.
limit
=
val
;
...
...
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