Commit 0a418c4f by 袁晓帅

提交修改样式和不能上传的问题

parent 852d62f7
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination> <pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination>
</div> </div>
</div> </div>
<el-dialog :title="title" :visible.sync="adddialogVisible" width="35%"> <el-dialog :title="title" :visible.sync="adddialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="addForm" label-width="75px" > <el-form :model="addForm" label-width="75px" >
<el-form-item label="活动标题" required style="margin-bottom: 10px !important;"> <el-form-item label="活动标题" required style="margin-bottom: 10px !important;">
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<el-date-picker v-model="addForm.endTime" type="date" :picker-options="EndOptions" placeholder="结束时间" style="width: 190px;" > </el-date-picker> <el-date-picker v-model="addForm.endTime" type="date" :picker-options="EndOptions" placeholder="结束时间" style="width: 190px;" > </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="上传海报" required > <el-form-item label="上传海报" required >
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar"> <img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;line-height: 20px;">仅支持PNG/JPG格式,230*540像素比,不得大于4M</div> <div style="font-size: 11px;color: #FF4D51;margin-top: -16px;">仅支持PNG/JPG格式,230*540像素比,不得大于4M</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<el-button class="ml10" @click="adddialogVisible = false">取消</el-button> <el-button class="ml10" @click="adddialogVisible = false">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title" :visible.sync="editdialogVisible" width="35%"> <el-dialog :title="title" :visible.sync="editdialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="editForm" label-width="75px" > <el-form :model="editForm" label-width="75px" >
<el-form-item label="活动标题" required style="margin-bottom: 10px !important;"> <el-form-item label="活动标题" required style="margin-bottom: 10px !important;">
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<el-date-picker v-model="editForm.endTime" type="date" :picker-options="EndOptions" placeholder="结束时间" style="width: 190px;" > </el-date-picker> <el-date-picker v-model="editForm.endTime" type="date" :picker-options="EndOptions" placeholder="结束时间" style="width: 190px;" > </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="上传封面" required > <el-form-item label="上传封面" required >
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<img v-if="editForm.imgUrl" :src="editForm.imgUrl" class="avatar"> <img v-if="editForm.imgUrl" :src="editForm.imgUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;line-height: 20px;">仅支持PNG/JPG格式,230*540像素比,不得大于4M</div> <div style="font-size: 11px;color: #FF4D51;margin-top: -16px;">仅支持PNG/JPG格式,230*540像素比,不得大于4M</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -109,7 +109,6 @@ ...@@ -109,7 +109,6 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import pagination from '../../BasePagination.vue'; import pagination from '../../BasePagination.vue';
export default { export default {
...@@ -193,7 +192,13 @@ export default { ...@@ -193,7 +192,13 @@ export default {
addBtn(data) { addBtn(data) {
this.title = '新增活动' this.title = '新增活动'
this.adddialogVisible = true; this.adddialogVisible = true;
this.addForm = {} this.addForm = {
title:'',
content:'',
startTime:'',
endTime:'',
imgUrl:''
}
}, },
// 修改 // 修改
editBtn(data){ editBtn(data){
...@@ -365,7 +370,7 @@ export default { ...@@ -365,7 +370,7 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.tableCont { .tableCont {
height: calc(100vh - 33px); height: calc(100vh - 20px);
} }
.el-form-item { .el-form-item {
margin-bottom: 0 !important; margin-bottom: 0 !important;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination> <pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination>
</div> </div>
</div> </div>
<el-dialog :title="title" :visible.sync="adddialogVisible" width="38%"> <el-dialog :title="title" :visible.sync="adddialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="addForm" label-width="75px" > <el-form :model="addForm" label-width="75px" >
<el-form-item label="广告标题" required style="margin-bottom: 5px !important;"> <el-form-item label="广告标题" required style="margin-bottom: 5px !important;">
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
<el-input type="textarea" :rows="5" v-model="addForm.content" placeholder="请输入广告内容(200以内)" maxlength="200"></el-input> <el-input type="textarea" :rows="5" v-model="addForm.content" placeholder="请输入广告内容(200以内)" maxlength="200"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传视频" required style="margin-bottom: 12px !important;"> <el-form-item label="上传视频" required style="margin-bottom: 12px !important;">
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://jinmao-api.iyunfish.com/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
:show-file-list="false" :show-file-list="false"
:headers="headers" :headers="headers"
:on-success="handlevideoSuccess" :on-success="handlevideoSuccess"
...@@ -55,14 +55,14 @@ ...@@ -55,14 +55,14 @@
<video v-if="addForm.videoUrl" :src="addForm.videoUrl" controls='controls' :autoplay="autoplay" class="avatar"/> <video v-if="addForm.videoUrl" :src="addForm.videoUrl" controls='controls' :autoplay="autoplay" class="avatar"/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;">图片比例: 16:9,不得大于200M</div> <div style="font-size: 10px;color: #FF4D51;margin-top: -16px;">图片比例: 16:9,不得大于200M</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="上传图片" required > <el-form-item label="上传图片" required >
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://jinmao-api.iyunfish.com/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
:show-file-list="false" :show-file-list="false"
:headers="headers" :headers="headers"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar"> <img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;">大图1920x1080/小图230x540,不得大于4M</div> <div style="font-size: 10px;color: #FF4D51;margin-top: -16px;">大图1920x1080/小图230x540,不得大于4M</div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<el-button class="ml10" @click="adddialogVisible = false">取消</el-button> <el-button class="ml10" @click="adddialogVisible = false">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title" :visible.sync="editdialogVisible" width="38%"> <el-dialog :title="title" :visible.sync="editdialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="editForm" label-width="75px" > <el-form :model="editForm" label-width="75px" >
<el-form-item label="广告标题" required style="margin-bottom: 5px !important;"> <el-form-item label="广告标题" required style="margin-bottom: 5px !important;">
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<el-input type="textarea" :rows="5" v-model="editForm.content" placeholder="请输入广告内容(200字以内)" maxlength="200"></el-input> <el-input type="textarea" :rows="5" v-model="editForm.content" placeholder="请输入广告内容(200字以内)" maxlength="200"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传视频" required style="margin-bottom: 12px !important;"> <el-form-item label="上传视频" required style="margin-bottom: 12px !important;">
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
...@@ -104,11 +104,11 @@ ...@@ -104,11 +104,11 @@
<video v-if="editForm.videoUrl" :src="editForm.videoUrl" controls='controls' :autoplay="autoplay" class="avatar"/> <video v-if="editForm.videoUrl" :src="editForm.videoUrl" controls='controls' :autoplay="autoplay" class="avatar"/>
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;">图片比例: 16:9,不得大于200M</div> <div style="font-size: 10px;color: #FF4D51;margin-top: -16px;">图片比例: 16:9,不得大于200M</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="上传图片" required > <el-form-item label="上传图片" required >
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
...@@ -120,9 +120,8 @@ ...@@ -120,9 +120,8 @@
<img v-if="editForm.imgUrl" :src="editForm.imgUrl" class="avatar"> <img v-if="editForm.imgUrl" :src="editForm.imgUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;">大图1920x1080/小图230x540,不得大于4M</div> <div style="font-size: 10px;color: #FF4D51;margin-top: -16px;">大图1920x1080/小图230x540,不得大于4M</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
...@@ -133,7 +132,6 @@ ...@@ -133,7 +132,6 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import pagination from '../../BasePagination.vue'; import pagination from '../../BasePagination.vue';
export default { export default {
...@@ -220,7 +218,12 @@ export default { ...@@ -220,7 +218,12 @@ export default {
addBtn(data) { addBtn(data) {
this.title = '新增广告' this.title = '新增广告'
this.adddialogVisible = true; this.adddialogVisible = true;
this.addForm = {} this.addForm = {
title:'',
content:'',
videoUrl:'',
imgUrl:'',
}
}, },
// 修改 // 修改
editBtn(data){ editBtn(data){
...@@ -375,7 +378,7 @@ export default { ...@@ -375,7 +378,7 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.tableCont { .tableCont {
height: calc(100vh - 33px); height: calc(100vh - 20px);
} }
.el-form-item { .el-form-item {
margin-bottom: 0 !important; margin-bottom: 0 !important;
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</div> </div>
<div style="display: flex;"> <div style="display: flex;">
<div class="mainBox boxDiv2" style="width: 40%;"> <div class="mainBox boxDiv2" style="width: 50%;">
<div class="title">社区警官管理</div> <div class="title">社区警官管理</div>
<div> <div>
<div class="row-col"> <div class="row-col">
...@@ -103,18 +103,21 @@ ...@@ -103,18 +103,21 @@
</div> </div>
<div class="row-col"> <div class="row-col">
<div class="row-text">警官照片</div> <div class="row-text">警官照片</div>
<el-upload <div>
class="avatar-uploader" <el-upload
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" class="avatar-uploader"
:headers="headers" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
:show-file-list="false" :headers="headers"
:on-success="handleAvatarSuccess" :show-file-list="false"
v-if="imgShow" :on-success="handleAvatarSuccess"
> v-if="imgShow"
<img v-if="IntelData4.imgUrl" :src="IntelData4.imgUrl" class="avatar"> >
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <img v-if="IntelData4.imgUrl" :src="IntelData4.imgUrl" class="avatar">
</el-upload> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</div> </el-upload>
<div style="font-size: 11px;color: #FF4D51;margin-top: 5px;">仅支持PNG/JPG格式,不得大于4M</div>
</div>
</div>
</div> </div>
<div slot="footer" class="dialog-footer text-center"> <div slot="footer" class="dialog-footer text-center">
<!-- <el-button type="primary">复位</el-button> --> <!-- <el-button type="primary">复位</el-button> -->
...@@ -276,7 +279,6 @@ ...@@ -276,7 +279,6 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data: () => ({ data: () => ({
...@@ -580,7 +582,7 @@ export default { ...@@ -580,7 +582,7 @@ export default {
justify-content: center; justify-content: center;
} }
.boxDiv { .boxDiv {
width: 52.5%; // width: 52.5%;
// height: 150px; // height: 150px;
overflow: hidden; overflow: hidden;
background: #ffffff; background: #ffffff;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination> <pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination>
</div> </div>
</div> </div>
<el-dialog :title="title" :visible.sync="adddialogVisible" width="33%"> <el-dialog :title="title" :visible.sync="adddialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="addForm" label-width="75px" > <el-form :model="addForm" label-width="75px" >
<el-form-item label="绿植名称" required style="margin-bottom: 5px !important;"> <el-form-item label="绿植名称" required style="margin-bottom: 5px !important;">
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-input type="textarea" :rows="5" v-model="addForm.content" placeholder="请输入绿植介绍(30字以内)" maxlength="30"></el-input> <el-input type="textarea" :rows="5" v-model="addForm.content" placeholder="请输入绿植介绍(30字以内)" maxlength="30"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传图片" required > <el-form-item label="上传图片" required >
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar"> <img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;">仅支持PNG/JPG格式,不得大于4M</div> <div style="font-size: 10px;color: #FF4D51;margin-top: -16px;">仅支持PNG/JPG格式,不得大于4M</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<el-button class="ml10" @click="adddialogVisible = false">取消</el-button> <el-button class="ml10" @click="adddialogVisible = false">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title" :visible.sync="editdialogVisible" width="33%"> <el-dialog :title="title" :visible.sync="editdialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="editForm" label-width="75px" > <el-form :model="editForm" label-width="75px" >
<el-form-item label="绿植名称" required style="margin-bottom: 5px !important;"> <el-form-item label="绿植名称" required style="margin-bottom: 5px !important;">
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<el-input type="textarea" :rows="5" v-model="editForm.content" placeholder="请输入绿植介绍(30字以内)" maxlength="30"></el-input> <el-input type="textarea" :rows="5" v-model="editForm.content" placeholder="请输入绿植介绍(30字以内)" maxlength="30"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传图片" required > <el-form-item label="上传图片" required >
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<img v-if="editForm.imgUrl" :src="editForm.imgUrl" class="avatar"> <img v-if="editForm.imgUrl" :src="editForm.imgUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;">仅支持PNG/JPG格式,不得大于4M</div> <div style="font-size: 10px;color: #FF4D51;margin-top: -16px;">仅支持PNG/JPG格式,不得大于4M</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import pagination from '../../BasePagination.vue'; import pagination from '../../BasePagination.vue';
export default { export default {
...@@ -163,7 +162,11 @@ export default { ...@@ -163,7 +162,11 @@ export default {
addBtn(data) { addBtn(data) {
this.title = '新增绿植' this.title = '新增绿植'
this.adddialogVisible = true; this.adddialogVisible = true;
this.addForm = {} this.addForm = {
title:'',
content:'',
imgUrl:''
}
}, },
// 修改 // 修改
editBtn(data){ editBtn(data){
...@@ -312,7 +315,7 @@ export default { ...@@ -312,7 +315,7 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.tableCont { .tableCont {
height: calc(100vh - 33px); height: calc(100vh - 20px);
} }
.el-form-item { .el-form-item {
margin-bottom: 0 !important; margin-bottom: 0 !important;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination> <pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination>
</div> </div>
</div> </div>
<el-dialog :title="title" :visible.sync="adddialogVisible" width="33%"> <el-dialog :title="title" :visible.sync="adddialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="addForm" label-width="75px"> <el-form :model="addForm" label-width="75px">
<el-form-item label="公告标题" required><el-input v-model="addForm.title" maxlength="15" placeholder="15字以内"></el-input></el-form-item> <el-form-item label="公告标题" required><el-input v-model="addForm.title" maxlength="15" placeholder="15字以内"></el-input></el-form-item>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<el-button class="ml10" @click="adddialogVisible = false">取消</el-button> <el-button class="ml10" @click="adddialogVisible = false">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title" :visible.sync="editdialogVisible" width="33%"> <el-dialog :title="title" :visible.sync="editdialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="editForm" label-width="75px"> <el-form :model="editForm" label-width="75px">
<el-form-item label="公告标题" required><el-input v-model="editForm.title" placeholder="15字以内" maxlength="15"></el-input></el-form-item> <el-form-item label="公告标题" required><el-input v-model="editForm.title" placeholder="15字以内" maxlength="15"></el-input></el-form-item>
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import pagination from '../../BasePagination.vue'; import pagination from '../../BasePagination.vue';
export default { export default {
...@@ -113,7 +112,10 @@ export default { ...@@ -113,7 +112,10 @@ export default {
addBtn(data) { addBtn(data) {
this.title = '新增公告'; this.title = '新增公告';
this.adddialogVisible = true; this.adddialogVisible = true;
this.addForm = {} this.addForm = {
title:'',
content:'',
}
}, },
// 修改公告 // 修改公告
editBtn(data) { editBtn(data) {
...@@ -129,7 +131,9 @@ export default { ...@@ -129,7 +131,9 @@ export default {
}, },
addsubmit() { addsubmit() {
var that = this; var that = this;
console.log(that.addForm.content)
if (that.addForm.title == '') { if (that.addForm.title == '') {
console.log('1111111111')
that.$message({ that.$message({
message: '公告标题不为空', message: '公告标题不为空',
type: 'warning' type: 'warning'
...@@ -247,8 +251,9 @@ export default { ...@@ -247,8 +251,9 @@ export default {
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.tableCont { .tableCont {
height: calc(100vh - 33px); height: calc(100vh - 20px);
} }
.el-form-item { .el-form-item {
margin-bottom: 0 !important; margin-bottom: 0 !important;
......
<!-- 菜谱管理 --> <!-- 周围商铺管理 -->
<template> <template>
<div> <div>
<div class="mainContent tableCont"> <div class="mainContent tableCont">
...@@ -33,17 +33,17 @@ ...@@ -33,17 +33,17 @@
<pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination> <pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination>
</div> </div>
</div> </div>
<el-dialog :title="title" :visible.sync="adddialogVisible" width="33%"> <el-dialog :title="title" :visible.sync="adddialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="addForm" label-width="75px" > <el-form :model="addForm" label-width="100px" >
<el-form-item label="菜谱名称" required style="margin-bottom: 5px !important;"> <el-form-item label="周围商铺名称" required style="margin-bottom: 5px !important;">
<el-input v-model="addForm.title" placeholder="请输入菜谱名称(10字以内)" maxlength="10"></el-input> <el-input v-model="addForm.title" placeholder="请输入周围商铺名称(10字以内)" maxlength="10"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="菜谱介绍" required style="margin-bottom: 12px !important;"> <el-form-item label="周围商铺介绍" required style="margin-bottom: 12px !important;">
<el-input type="textarea" :rows="5" v-model="addForm.content" placeholder="请输入菜谱内容(50字以内)" maxlength="50"></el-input> <el-input type="textarea" :rows="5" v-model="addForm.content" placeholder="请输入周围商铺内容(50字以内)" maxlength="50"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="菜谱图片" required > <el-form-item label="周围商铺图片" required >
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar"> <img v-if="addForm.imgUrl" :src="addForm.imgUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;line-height: 20px;">仅支持PNG/JPG格式,图片比例16:9、像素比500x500,不得大于4M</div> <div style="font-size: 10px;color: #FF4D51;margin-top: -10px;line-height: 16px;">仅支持PNG/JPG格式,图片比例16:9、像素比500x500,不得大于4M</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -65,17 +65,17 @@ ...@@ -65,17 +65,17 @@
<el-button class="ml10" @click="adddialogVisible = false">取消</el-button> <el-button class="ml10" @click="adddialogVisible = false">取消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title" :visible.sync="editdialogVisible" width="33%"> <el-dialog :title="title" :visible.sync="editdialogVisible" width="40%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="editForm" label-width="75px" > <el-form :model="editForm" label-width="100px" >
<el-form-item label="菜谱名称" required style="margin-bottom: 5px !important;"> <el-form-item label="周围商铺名称" required style="margin-bottom: 5px !important;">
<el-input v-model="editForm.title" placeholder="请输入菜谱名称(10字以内)" maxlength="10"></el-input> <el-input v-model="editForm.title" placeholder="请输入周围商铺名称(10字以内)" maxlength="10"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="菜谱介绍" required style="margin-bottom: 12px !important;"> <el-form-item label="周围商铺介绍" required style="margin-bottom: 12px !important;">
<el-input type="textarea" :rows="5" v-model="editForm.content" placeholder="请输入菜谱内容(50字以内)" maxlength="50"></el-input> <el-input type="textarea" :rows="5" v-model="editForm.content" placeholder="请输入周围商铺内容(50字以内)" maxlength="50"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传封面" required > <el-form-item label="周围商铺图片" required >
<div style="display: flex;"> <div style="display: flex;flex-direction: column;">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
action="http://39.97.169.207:9200/baseInfo/uploadPhoto" action="http://39.97.169.207:9200/baseInfo/uploadPhoto"
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<img v-if="editForm.imgUrl" :src="editForm.imgUrl" class="avatar"> <img v-if="editForm.imgUrl" :src="editForm.imgUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<div style="margin-left: 15px;font-size: 10px;color: #FF4D51;line-height: 20px;">仅支持PNG/JPG格式,图片比例16:9、像素比500x500,不得大于4M</div> <div style="font-size: 10px;color: #FF4D51;margin-top: -10px;line-height: 16px;">仅支持PNG/JPG格式,图片比例16:9、像素比500x500,不得大于4M</div>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
imgUrl:'', imgUrl:'',
}, },
type:'save', type:'save',
title:'新增菜谱', title:'新增周围商铺',
adddialogVisible: false, adddialogVisible: false,
editdialogVisible: false, editdialogVisible: false,
headers:{ headers:{
...@@ -165,14 +165,18 @@ export default { ...@@ -165,14 +165,18 @@ export default {
}, },
// 新增 // 新增
addBtn(data) { addBtn(data) {
this.title = '新增菜谱' this.title = '新增周围商铺'
this.adddialogVisible = true; this.adddialogVisible = true;
this.addForm = {} this.addForm = {
title:'',
content:'',
imgUrl:'',
}
}, },
// 修改 // 修改
editBtn(data){ editBtn(data){
this.getDetail(data.id) this.getDetail(data.id)
this.title = '修改菜谱' this.title = '修改周围商铺'
this.editdialogVisible = true; this.editdialogVisible = true;
}, },
// 获取详情 // 获取详情
...@@ -185,17 +189,17 @@ export default { ...@@ -185,17 +189,17 @@ export default {
var that = this var that = this
if(that.addForm.title == ''){ if(that.addForm.title == ''){
that.$message({ that.$message({
message: '请输入菜谱名称', message: '请输入周围商铺名称',
type: 'warning' type: 'warning'
}); });
}else if(that.addForm.content == ''){ }else if(that.addForm.content == ''){
that.$message({ that.$message({
message: '请输入菜谱内容', message: '请输入周围商铺内容',
type: 'warning' type: 'warning'
}); });
}else if(that.addForm.imgUrl == ''){ }else if(that.addForm.imgUrl == ''){
that.$message({ that.$message({
message: '请上传图片', message: '请上传周围商铺图片',
type: 'warning' type: 'warning'
}); });
}else{ }else{
...@@ -312,7 +316,7 @@ export default { ...@@ -312,7 +316,7 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.tableCont { .tableCont {
height: calc(100vh - 33px); height: calc(100vh - 20px);
} }
.el-form-item { .el-form-item {
margin-bottom: 0 !important; margin-bottom: 0 !important;
......
...@@ -9,24 +9,22 @@ ...@@ -9,24 +9,22 @@
</el-button> </el-button>
<el-button class="addBtn" @click="upload(1)"><span>导入模板下载</span></el-button> <el-button class="addBtn" @click="upload(1)"><span>导入模板下载</span></el-button>
<el-button class="addBtn"> <el-button class="addBtn">
<img src="../../../../static/img/add.png" class="addIcon" />
<el-upload ref="upload" action="string" :before-upload="onBeforeUploadImage" :http-request="UploadImage" :show-file-list="false" style="width: 80px;"> <el-upload ref="upload" action="string" :before-upload="onBeforeUploadImage" :http-request="UploadImage" :show-file-list="false" style="width: 80px;">
<span>点击上传</span> <span>数据导入</span>
</el-upload> </el-upload>
</el-button> </el-button>
<el-button class="addBtn" @click="upload(3)"> <el-button class="addBtn" @click="upload(3)">
<img src="../../../../static/img/add.png" class="addIcon" />
<span>数据导出</span> <span>数据导出</span>
</el-button> </el-button>
<div v-if="adddialogVisible" style="display: flex;align-items: center;padding-bottom: 10px;"> <div v-if="adddialogVisible" style="display: flex;align-items: center;padding-bottom: 10px;">
<el-form :model="addForm" label-width="80px" style="display: flex;"> <el-form :model="addForm" label-width="80px" style="display: flex;" :rules="rules">
<el-form-item label="所在楼层" required prop="floor" inline-message> <el-form-item label="所在楼层" prop="floor">
<el-input v-model="addForm.floor" placeholder="请输入所在楼层" style="width: 150px;"></el-input> <el-input v-model="addForm.floor" placeholder="请输入所在楼层" style="width: 150px;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="区域" required prop="region"> <el-form-item label="区域" prop="region">
<el-input :rows="5" v-model="addForm.region" placeholder="请输入区域" style="width: 150px;"></el-input> <el-input :rows="5" v-model="addForm.region" placeholder="请输入区域" style="width: 150px;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="车位编号" required prop="carNumber"> <el-form-item label="车位编号" prop="carNumber">
<el-input :rows="5" v-model="addForm.carNumber" placeholder="请输入车位编号" style="width: 150px;"></el-input> <el-input :rows="5" v-model="addForm.carNumber" placeholder="请输入车位编号" style="width: 150px;"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -52,22 +50,7 @@ ...@@ -52,22 +50,7 @@
<pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination> <pagination v-if="showpage" @pageSize="currentSize" @pageNum="currentPage" :totalNum="totalNum"></pagination>
</div> </div>
</div> </div>
<!-- <el-dialog :title="title" :visible.sync="adddialogVisible" width="33%"> <el-dialog :title="title" :visible.sync="editdialogVisible" width="40%">
<el-row class="modelBox">
<el-form :model="addForm" label-width="75px">
<el-form-item label="所在楼层" required prop="floor"><el-input v-model="addForm.floor" placeholder="请输入所在楼层"></el-input></el-form-item>
<el-form-item label="区域" required prop="region"><el-input :rows="5" v-model="addForm.region" placeholder="请输入区域"></el-input></el-form-item>
<el-form-item label="车位编号" required prop="carNumber">
<el-input :rows="5" v-model="addForm.carNumber" placeholder="请输入车位编号"></el-input>
</el-form-item>
</el-form>
</el-row>
<div slot="footer" class="dialog-footer text-center">
<el-button type="primary" v-on:click="addsubmit(type)">保存</el-button>
<el-button class="ml10" @click="adddialogVisible = false">取消</el-button>
</div>
</el-dialog> -->
<el-dialog :title="title" :visible.sync="editdialogVisible" width="33%">
<el-row class="modelBox"> <el-row class="modelBox">
<el-form :model="editForm" label-width="75px"> <el-form :model="editForm" label-width="75px">
<el-form-item label="所在楼层" required prop="floor"><el-input v-model="editForm.floor" placeholder="请输入所在楼层"></el-input></el-form-item> <el-form-item label="所在楼层" required prop="floor"><el-input v-model="editForm.floor" placeholder="请输入所在楼层"></el-input></el-form-item>
...@@ -109,6 +92,11 @@ export default { ...@@ -109,6 +92,11 @@ export default {
title: '新增出售车位', title: '新增出售车位',
adddialogVisible: false, adddialogVisible: false,
editdialogVisible: false, editdialogVisible: false,
rules: {
floor: [{ required: true, message: '请输入所在楼层', trigger: 'change' }],
region: [{ required: true, message: '请输入区域', trigger: 'change' }],
carNumber: [{ required: true, message: '请输入车位编号', trigger: 'change' }],
}
}), }),
created() { created() {
this.getList(); this.getList();
...@@ -133,7 +121,11 @@ export default { ...@@ -133,7 +121,11 @@ export default {
addBtn(data) { addBtn(data) {
this.title = '新增车位信息'; this.title = '新增车位信息';
this.adddialogVisible = true; this.adddialogVisible = true;
this.addForm = {} this.addForm = {
floor: '',
region: '',
carNumber: ''
}
}, },
upload(data) { upload(data) {
if (data === 1) { if (data === 1) {
...@@ -309,10 +301,7 @@ export default { ...@@ -309,10 +301,7 @@ export default {
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.tableCont { .tableCont {
height: calc(100vh - 33px); height: calc(100vh - 20px);
}
.el-form-item {
margin-bottom: 0 !important;
} }
.addBtn { .addBtn {
padding: 6px 20px !important; padding: 6px 20px !important;
......
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 sign in to comment