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

页面修改

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