Commit 3e52cfa7 authored by 黄奎's avatar 黄奎

页面修改

parent df26712d
...@@ -219,9 +219,11 @@ ...@@ -219,9 +219,11 @@
.scenicRecommentList .comCursorUrl { .scenicRecommentList .comCursorUrl {
cursor: pointer; cursor: pointer;
} }
.scenicRecommentList .ql-container{
.scenicRecommentList .ql-container {
min-height: 150px; min-height: 150px;
} }
.scenicRecommentList .el-upload-dragger { .scenicRecommentList .el-upload-dragger {
font-size: 28px; font-size: 28px;
color: #8c939d; color: #8c939d;
...@@ -230,9 +232,11 @@ ...@@ -230,9 +232,11 @@
line-height: 41px; line-height: 41px;
text-align: center; text-align: center;
} }
.scenicRecommentList .ql-editor{
.scenicRecommentList .ql-editor {
min-height: 150px; min-height: 150px;
} }
/* 景区推荐列表 */ /* 景区推荐列表 */
</style> </style>
...@@ -242,7 +246,7 @@ ...@@ -242,7 +246,7 @@
<ul> <ul>
<li> <li>
<span class="hotel_name"> <span class="hotel_name">
<em>名称</em> <em>攻略名称</em>
<el-input maxlength="50" @keyup.native.enter="resetPageIndex(),getList()" v-model="msg.Name"> <el-input maxlength="50" @keyup.native.enter="resetPageIndex(),getList()" v-model="msg.Name">
</el-input> </el-input>
</span> </span>
...@@ -250,8 +254,7 @@ ...@@ -250,8 +254,7 @@
<li> <li>
<button class="hollowFixedBtn" type="button" <button class="hollowFixedBtn" type="button"
@click="resetPageIndex(),getList()">{{$t('pub.searchBtn')}}</button> @click="resetPageIndex(),getList()">{{$t('pub.searchBtn')}}</button>
<button class="normalBtn" type="button" <button class="normalBtn" type="button" @click="outerVisible=true">{{$t('pub.addBtn')}}</button>
@click="outerVisible=true">{{$t('pub.addBtn')}}</button>
</li> </li>
</ul> </ul>
...@@ -259,22 +262,22 @@ ...@@ -259,22 +262,22 @@
<div class="hotelResource clearfix" v-loading="loading"> <div class="hotelResource clearfix" v-loading="loading">
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr> <tr>
<th> <th width="80" >
编号 编号
</th> </th>
<th> <th width="150">
名称 名称
</th> </th>
<th> <th width="150">
封面 封面
</th> </th>
<th> <th width="100">
操作人 操作人
</th> </th>
<th> <th width="120">
操作时间 操作时间
</th> </th>
<th> <th width="120">
操作 操作
</th> </th>
</tr> </tr>
...@@ -296,77 +299,53 @@ ...@@ -296,77 +299,53 @@
</td> </td>
<td> <td>
<el-tooltip class="item" effect="dark" content="修改" placement="top"> <el-tooltip class="item" effect="dark" content="修改" placement="top">
<el-button <el-button type="primary" icon="el-icon-edit" circle @click="GetScenic(item.Id)"></el-button>
type="primary"
icon="el-icon-edit"
circle
@click="UpdateScenic(item.Id)"
></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top"> <el-tooltip class="item" effect="dark" content="删除" placement="top">
<el-button <el-button type="danger" icon="iconfont icon-img_delete_small" circle
type="danger" @click="removeScenicRecomment(item.Id)"></el-button>
icon="iconfont icon-img_delete_small"
circle
@click="removeScenicRecomment(item.Id)"
></el-button>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
<tr v-if="!(DataList && DataList.length>0)">
<td colspan="6">
暂无数据...
</td>
</tr>
</table> </table>
</div> </div>
<el-dialog <el-dialog custom-class="w800" title="新增" :visible.sync="outerVisible" center :before-close="closeChangeMachie">
custom-class="w800"
title="新增"
:visible.sync="outerVisible"
center
:before-close="closeChangeMachie"
>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="80px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="80px">
<el-form-item label="名称" prop="Name"> <el-form-item label="攻略名称" prop="Name">
<el-input v-model="addMsg.Name" class="w217"/> <el-input v-model="addMsg.Name" class="w217" />
</el-form-item> </el-form-item>
<el-form-item label="封面图"> <el-form-item label="封面图">
<div class="_addUpload_box"> <div class="_addUpload_box">
<div class="_pic_upload"> <div class="_pic_upload">
<template v-if="addMsg.ImgCover!==''"> <template v-if="addMsg.ImgCover!==''">
<div> <div>
<div <div style="width:125px;height:80px;overflow: hidden;display: flex;align-items: center;">
style="width:125px;height:80px;overflow: hidden;display: flex;align-items: center;"
>
<img :src="addMsg.ImgCover"> <img :src="addMsg.ImgCover">
</div> </div>
<div <div style="font-size:12px; color:#666666;cursor: pointer;line-height: 20px;"
style="font-size:12px; color:#666666;cursor: pointer;line-height: 20px;" @click="addMsg.ImgCover=''">重新上传</div>
@click="addMsg.ImgCover=''"
>重新上传</div>
</div> </div>
</template> </template>
<el-upload <el-upload v-else drag :http-request="uploadFileBtn" :multiple="false" :show-file-list="false" action>
v-else
drag
:http-request="uploadFileBtn"
:multiple="false"
:show-file-list="false"
action
>
<i class="el-icon-plus avatar-uploader-icon"></i> <i class="el-icon-plus avatar-uploader-icon"></i>
<div class="el-upload__text">{{$t("active.ld_djscwj")}}</div> <div class="el-upload__text">{{$t("active.ld_djscwj")}}</div>
</el-upload> </el-upload>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="内容" prop="lotteryRules"> <el-form-item label="攻略内容" prop="lotteryRules">
<quill-editor class="w595" :options="editorOption" v-model="addMsg.Content"></quill-editor> <quill-editor class="w595" :options="editorOption" v-model="addMsg.Content"></quill-editor>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button <button class="hollowFixedBtn"
class="hollowFixedBtn" @click="outerVisible = false, resetForm('addMsg')">{{$t('pub.cancelBtn')}}</button> &nbsp;
@click="outerVisible = false, resetForm('addMsg')"
>{{$t('pub.cancelBtn')}}</button> &nbsp;
<button class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> <button class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -384,7 +363,7 @@ ...@@ -384,7 +363,7 @@
DataList: "", DataList: "",
noData: false, noData: false,
loading: true, loading: true,
outerVisible:false, outerVisible: false,
defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"', defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"',
msg: { msg: {
pageIndex: 1, pageIndex: 1,
...@@ -397,22 +376,26 @@ ...@@ -397,22 +376,26 @@
currentPage: 1, currentPage: 1,
Id: 0 Id: 0
}, },
addMsg:{ addMsg: {
Id:0, Id: 0,
Name:'', Name: '',
ImgCover:'', ImgCover: '',
Content:'' Content: ''
}, },
editorOption:{ editorOption: {
modules:{ modules: {
toolbar:[ toolbar: [
['bold', 'italic', 'underline', 'strike'], // toggled buttons ['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block','align'] ['blockquote', 'code-block', 'align']
] ]
} }
}, },
rules:{ rules: {
Name: [{ required: true, message: '请输入名称', trigger: "change" }], Name: [{
required: true,
message: '请输入名称',
trigger: "change"
}],
}, },
}; };
...@@ -462,14 +445,17 @@ ...@@ -462,14 +445,17 @@
); );
}, },
uploadFileBtn(file){ uploadFileBtn(file) {
//上传 //上传
if (file.file.size > 1024 * 1024 * 10) { if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning(this.$t("tips.wjdxbncgsz")); this.$message.warning(this.$t("tips.wjdxbncgsz"));
return; return;
} }
// 1 文档 2 数据 3 图片 // 1 文档 2 数据 3 图片
let typeArr = [{ stringArr: "GIF|JPG|JPEG|PNG|BMP", type: 3 }]; let typeArr = [{
stringArr: "GIF|JPG|JPEG|PNG|BMP",
type: 3
}];
let ft = file.file.name let ft = file.file.name
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length) .substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase(); .toUpperCase();
...@@ -488,9 +474,9 @@ ...@@ -488,9 +474,9 @@
this.Success(this.$t("tips.shangchuanzhong")); this.Success(this.$t("tips.shangchuanzhong"));
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
let fileSize = let fileSize =
file.file.size < 1024 file.file.size < 1024 ?
? file.file.size file.file.size :
: (file.file.size / 1024).toFixed(0); (file.file.size / 1024).toFixed(0);
this.addMsg.ImgCover = this.domainManager().ViittoFileUrl + x.data.FilePath; this.addMsg.ImgCover = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.Success(this.$t("tips.scchenggong")); this.Success(this.$t("tips.scchenggong"));
this.$forceUpdate(); this.$forceUpdate();
...@@ -512,7 +498,7 @@ ...@@ -512,7 +498,7 @@
}); });
}, },
//新增 //新增
addScenic(){ addScenic() {
this.apipost( this.apipost(
"ScenicRecomment_Post_SetScenicRecommentService", "ScenicRecomment_Post_SetScenicRecommentService",
this.addMsg, this.addMsg,
...@@ -520,7 +506,8 @@ ...@@ -520,7 +506,8 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); this.Success(res.data.message);
this.getList(); this.getList();
}else{ this.outerVisible = false;
} else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}, },
...@@ -528,44 +515,20 @@ ...@@ -528,44 +515,20 @@
); );
}, },
//修改 //修改
UpdateScenic(id){ GetScenic(id) {
this.apipost( this.apipost(
"ScenicRecomment_Post_SetScenicRecommentService", "ScenicRecomment_Get_GetScenicRecommentService", {
this.addMsg, Id: id
},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); this.addMsg = res.data.data;
this.getList(); this.outerVisible = true;
}else{
this.Error(res.data.message);
} }
}, },
null null
); );
}, },
goUrl(path, id) {
this.$store.commit("pageConditionUpdate", this.msg);
this.$router.push({
path: path,
query: {
id: id,
blank: 'y',
tab: '修改景区信息'
}
});
},
goUrlT(path, id) {
this.$router.push({
path: path,
query: {
id: id,
blank: 'y',
tab: '门票管理'
}
});
}
}, },
mounted() { mounted() {
//this.getCountryList(); //this.getCountryList();
......
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