Commit c2706105 authored by Xiaxuxia's avatar Xiaxuxia

优化细节

parent 756d7ec6
......@@ -38,7 +38,7 @@
<!-- 输入框 -->
<div v-else>
<el-input v-model="getForm.formVal[index]" :placeholder="item.placeholder || `请输入${item.label}`"></el-input>
<el-input :class="customClass" v-model="getForm.formVal[index]" :placeholder="item.placeholder || `请输入${item.label}`"></el-input>
</div>
</el-form-item>
<el-form-item>
......@@ -61,6 +61,10 @@ export default {
KindEditor
},
props: {
customClass: {
type: String,
default: ""
},
formData: {
type: Object,
default: () => {}
......@@ -154,5 +158,7 @@ export default {
</script>
<style>
.half-width {
width: 50%;
}
</style>
......@@ -100,7 +100,7 @@
:page-size="news.pageParams.limit"
background
layout="prev, pager, next"
:total="news.total">
:total="news.total" @current-change="(val) => pageChange('news', val)">
</el-pagination>
</div>
<div slot="footer" class="dialog-footer">
......@@ -158,7 +158,7 @@
:page-size="details.pageParams.limit"
background
layout="prev, pager, next"
:total="details.total">
:total="details.total" @current-change="(val) => pageChange('details', val)">
</el-pagination>
</div>
<div slot="footer" class="dialog-footer">
......@@ -199,7 +199,6 @@ export default {
},
select: {
handler(newVal) {
// console.dir(JSON.stringify(newVal))
this.$emit('input', newVal)
},
deep: true
......@@ -282,12 +281,19 @@ export default {
this.getDialogDatas('details', getListApplicationInfo)//行业应用详情
},
getDialogDatas(key, fn) {
console.log(this[key].pageParams, '星云和详情')
// console.log(this[key].pageParams, '星云和详情')
fn(this[key].pageParams).then(res => {
this[key].datas = res.data.data
this[key].total = res.data.totalCount
})
},
//分页切换
pageChange(key, val) {
this[key].pageParams.page = val;
let fn = key == 'news' ? getListNewsInfo : getListApplicationInfo
this.getDialogDatas(key, fn)//星云动态 or 行业应用详情
},
// //星云动态
// getListNewsInfoFunc() {
// getListNewsInfo(this.news.pageParams).then(res => {
......
......@@ -9,7 +9,7 @@
<el-alert title="基础信息" type="info" :closable="false" style="margin-bottom: 10px"></el-alert>
<el-form-item label="产品名称" prop="name">
<el-input v-model="ruleForm.name" placeholder="请输入产品名称"></el-input>
<el-input class="half-width" v-model="ruleForm.name" placeholder="请输入产品名称"></el-input>
</el-form-item>
<el-form-item label="产品缩略图" prop="coverImg">
<!-- 上传 -->
......@@ -21,7 +21,7 @@
<my-upload refName="upload2" :value="ruleForm.imageInfoRelationList.url" @input="(val, info) => getSrc('imageInfoRelationList', val, info)"></my-upload>
<div v-if="ruleForm.imageInfoRelationList.fileWidth">尺寸大小:{{ruleForm.imageInfoRelationList.fileWidth}}</div>
<el-input size="mini" v-model="ruleForm.imageInfoRelationList.price" placeholder="请输入价格"></el-input>
<el-input class="half-width" size="small" v-model="ruleForm.imageInfoRelationList.price" placeholder="请输入价格"></el-input>
</el-form-item>
<el-alert title="产品参数" type="info" :closable="false" style="margin-bottom: 10px"></el-alert>
......@@ -37,26 +37,27 @@
</el-select>
</el-form-item>
<el-form-item label="产品类型" prop="paramJson.productType">
<el-input v-model="ruleForm.paramJson.productType" placeholder="请输入产品类型"></el-input>
<el-input class="half-width" v-model="ruleForm.paramJson.productType" placeholder="请输入产品类型"></el-input>
</el-form-item>
<el-form-item label="文件格式" prop="paramJson.productType">
<el-input v-model="ruleForm.paramJson.fileType" placeholder="请输入文件格式"></el-input>
<el-input class="half-width" v-model="ruleForm.paramJson.fileType" placeholder="请输入文件格式"></el-input>
</el-form-item>
<el-form-item label="卫星" prop="paramJson.satellite">
<el-input v-model="ruleForm.paramJson.satellite" placeholder="请输入卫星型号"></el-input>
<el-input class="half-width" v-model="ruleForm.paramJson.satellite" placeholder="请输入卫星型号"></el-input>
</el-form-item>
<el-form-item label="分辨率" prop="paramJson.resolution">
<el-input v-model="ruleForm.paramJson.resolution" placeholder="请输入产品分辨率"></el-input>
<el-input class="half-width" v-model="ruleForm.paramJson.resolution" placeholder="请输入产品分辨率"></el-input>
</el-form-item>
<el-form-item label="拍摄地点" prop="paramJson.address">
<el-input v-model="ruleForm.paramJson.address" placeholder="请输入拍摄地点"></el-input>
<el-input class="half-width" v-model="ruleForm.paramJson.address" placeholder="请输入拍摄地点"></el-input>
</el-form-item>
<el-form-item label="拍摄时间" prop="paramJson.shotTime">
<el-date-picker
value-format="yyyy-MM-dd HH:mm:ss"
v-model="ruleForm.paramJson.shotTime"
type="datetime"
placeholder="选择日期时间">
placeholder="选择日期时间"
:picker-options="datePickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="可否商用" prop="paramJson.commercial">
......@@ -199,9 +200,6 @@ export default {
],
'paramJson.watermark': [
{required: true, message: '请选择', trigger: 'change'}
],
relatedIds: [
{required: true, message: '请选择'}
]
},
images: {
......@@ -214,7 +212,12 @@ export default {
visible: false,
selects: []
},
selectsArr: []
selectsArr: [],
datePickerOptions: {
disabledDate: (time) => {
return time.getTime() > new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 -1)
}
}
}
},
mounted() {
......@@ -239,11 +242,6 @@ export default {
},
//选择相似图片确定按钮
confirm() {
if (this.selectsArr.length <= 0) {
this.$message.info('至少选出一个')
return;
}
this.images.visible = false;
this.ruleForm.relatedIds = this.selectsArr.toString();
this.images.selects = JSON.parse(JSON.stringify(this.selectsArr));
......@@ -387,4 +385,7 @@ export default {
border: 1px solid #409eff;
box-sizing: border-box
}
.half-width {
width: 50%
}
</style>
<template>
<div class="container">
<div class="head">
<div>卫星介绍</div>
<div>影像图库</div>
<el-button type="primary" @click="addItem">添加产品</el-button>
</div>
<div class="app-container calendar-list-container">
......
......@@ -6,6 +6,7 @@
<div class="body">
<custom-form
customClass="half-width"
:formData="formObject"
@submitFunc="updateFunc"
@reset="goBack"
......
......@@ -73,7 +73,7 @@ export default {
//请求参数。页码页数等
listQuery: {
page: 1,
limit: 20
limit: 10
},
//搜索表单
searchForm: {
......@@ -103,7 +103,7 @@ export default {
status: this.searchForm.status || null,
name: this.searchForm.name,
page: 1,
limit: 20
limit: 10
}
this.getList();
},
......@@ -118,7 +118,7 @@ export default {
status: this.searchForm.status || null,
name: this.searchForm.name,
page: 1,
limit: 20
limit: 10
}
this.getList()
},
......
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