Commit 01e06712 authored by obt's avatar obt

应用详情代码更新

parent 45ef8eb2
...@@ -153,4 +153,4 @@ export default { ...@@ -153,4 +153,4 @@ export default {
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -27,11 +27,15 @@ ...@@ -27,11 +27,15 @@
<!-- 数据列表 --> <!-- 数据列表 -->
<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" label="序号" width="65">
<template slot-scope="scope">
{{scope.row.index}}
</template>
</el-table-column>
<el-table-column align="center" label="banner标题" prop="title"></el-table-column> <el-table-column align="center" label="banner标题" prop="title"></el-table-column>
<el-table-column align="center" label="banner图"> <el-table-column align="center" label="banner图">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="cover" :src="scope.row.cover" /> <img class="cover" :src="scope.row.cover" @click.stop="showPreview(scope.row.cover)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="状态"> <el-table-column align="center" label="状态">
...@@ -59,6 +63,12 @@ ...@@ -59,6 +63,12 @@
</el-pagination> </el-pagination>
</div> </div>
<!-- 使用图片查看器预览当前缩略图 -->
<el-image-viewer
v-show="currentIcon.showPreview"
:on-close="closePreview"
:url-list="[currentIcon.url]"
/>
<!-- 添加、编辑弹窗 --> <!-- 添加、编辑弹窗 -->
<el-dialog <el-dialog
...@@ -79,6 +89,7 @@ ...@@ -79,6 +89,7 @@
</template> </template>
<script> <script>
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import { banner } from "@/utils/formDatas.js"//表单数据 import { banner } from "@/utils/formDatas.js"//表单数据
import { page, update } from "@/api/website/banner"//接口 import { page, update } from "@/api/website/banner"//接口
...@@ -87,10 +98,15 @@ import CustomForm from "@/components/CustomForm"//自定义表单组件 ...@@ -87,10 +98,15 @@ import CustomForm from "@/components/CustomForm"//自定义表单组件
export default { export default {
name: "bannerSetting", name: "bannerSetting",
components: { components: {
CustomForm CustomForm,
ElImageViewer
}, },
data() { data() {
return { return {
currentIcon:{
showPreview: false,
url: ""
},
data: null,//原数据 data: null,//原数据
list: null,//赋值数据 | 过滤数据 list: null,//赋值数据 | 过滤数据
total: null,//总个数 total: null,//总个数
...@@ -98,7 +114,7 @@ export default { ...@@ -98,7 +114,7 @@ export default {
//请求参数。页码页数等 //请求参数。页码页数等
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20 limit: 10
}, },
//搜索表单 //搜索表单
searchForm: { searchForm: {
...@@ -124,6 +140,13 @@ export default { ...@@ -124,6 +140,13 @@ export default {
this.getList()//获取数据 this.getList()//获取数据
}, },
methods: { methods: {
closePreview() {
this.currentIcon.showPreview = false;
},
showPreview(url){
this.currentIcon.showPreview = true
this.currentIcon.url = url
},
//获取图片链接 //获取图片链接
getSrc(val) { getSrc(val) {
this.editForm.cover = val this.editForm.cover = val
...@@ -276,6 +299,9 @@ export default { ...@@ -276,6 +299,9 @@ export default {
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.list.forEach((element,index) => {
element.index = ((this.listQuery.page-1)*this.listQuery.limit)+(index+1)
});
this.data = res.data.data this.data = res.data.data
this.total = res.data.totalCount; this.total = res.data.totalCount;
this.listLoading = false; this.listLoading = false;
...@@ -297,8 +323,10 @@ export default { ...@@ -297,8 +323,10 @@ export default {
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
} }
.cover { .cover {
max-width: 200px; width: 50px;
height: auto; height: 50px;
object-fit: cover;
cursor: pointer;
} }
.page-foot { .page-foot {
display: flex; display: flex;
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2020-12-02 10:27:53 * @Date: 2020-12-02 10:27:53
* @LastEditTime: 2020-12-10 09:29:46 * @LastEditTime: 2020-12-11 11:02:51
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\industryApplication\applicationList\index.vue * @FilePath: \rs-cloud-platform-ui\src\views\webSiteManagement\industryApplication\applicationList\index.vue
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<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.id }}</span> <span>{{ scope.row.index }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="应用类别" width="200" align="center"> <el-table-column label="应用类别" width="200" align="center">
...@@ -258,14 +258,16 @@ export default { ...@@ -258,14 +258,16 @@ export default {
// 筛选数据 // 筛选数据
screenApplicationInfo(){ screenApplicationInfo(){
this.tableData = [] this.tableData = []
let index = 0
this.tableDataCache.forEach(element => { this.tableDataCache.forEach(element => {
// 未被删除的 // 未被删除的
if(element.isDel==0){ if(element.isDel==0){
this.tableData.push({ this.tableData.push({
index: ((this.infoPagination.currentPage-1)*this.infoPagination.pageSize)+(++index),
id: element.id,
attribute:element.attribute, attribute:element.attribute,
examples:element.examples, examples:element.examples,
examplesJson: element.examplesJson, examplesJson: element.examplesJson,
id: element.id,
indexShow:element.indexShow, indexShow:element.indexShow,
introduction:element.introduction, introduction:element.introduction,
isDel:element.isDel, isDel:element.isDel,
......
...@@ -22,11 +22,15 @@ ...@@ -22,11 +22,15 @@
</el-form> </el-form>
</div> </div>
<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" label="序号" width="65">
<template slot-scope="scope">
{{scope.row.index}}
</template>
</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="缩略图"> <el-table-column align="center" label="缩略图">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="cover" :src="scope.row.coverImg" /> <img class="cover" :src="scope.row.coverImg" @click.stop="showPreview(scope.row.coverImg)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="分辨率" prop="resolution"></el-table-column> <el-table-column align="center" label="分辨率" prop="resolution"></el-table-column>
...@@ -44,7 +48,12 @@ ...@@ -44,7 +48,12 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 使用图片查看器预览当前缩略图 -->
<el-image-viewer
v-show="currentIcon.showPreview"
:on-close="closePreview"
:url-list="[currentIcon.url]"
/>
<div class="page-foot"> <div class="page-foot">
<el-pagination <el-pagination
background background
...@@ -59,13 +68,21 @@ ...@@ -59,13 +68,21 @@
</template> </template>
<script> <script>
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import { satelliteIntroduction } from "@/utils/formDatas.js" import { satelliteIntroduction } from "@/utils/formDatas.js"
import { page, update } from "@/api/website/satelliteIntroduction" import { page, update } from "@/api/website/satelliteIntroduction"
export default { export default {
name: "satelliteIntroduction", name: "satelliteIntroduction",
components:{
ElImageViewer
},
data() { data() {
return { return {
currentIcon:{
showPreview: false,
url: "",
},
data: null,//原数据 data: null,//原数据
list: null,//赋值数据 | 过滤数据 list: null,//赋值数据 | 过滤数据
total: null, total: null,
...@@ -98,6 +115,13 @@ export default { ...@@ -98,6 +115,13 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
closePreview() {
this.currentIcon.showPreview = false;
},
showPreview(url){
this.currentIcon.showPreview = true
this.currentIcon.url = url
},
search() { search() {
this.listQuery = { this.listQuery = {
status: this.searchForm.status || null, status: this.searchForm.status || null,
...@@ -190,6 +214,9 @@ export default { ...@@ -190,6 +214,9 @@ export default {
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.list.forEach((element,index) => {
element.index = ((this.listQuery.page-1)*this.listQuery.limit)+(index+1)
});
this.data = res.data.data this.data = res.data.data
this.total = res.data.totalCount; this.total = res.data.totalCount;
this.listLoading = false; this.listLoading = false;
...@@ -211,8 +238,10 @@ export default { ...@@ -211,8 +238,10 @@ export default {
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
} }
.cover { .cover {
max-width: 200px; width: 50px;
height: auto; height: 50px;
object-fit: cover;
cursor: pointer;
} }
.page-foot { .page-foot {
display: flex; display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment