Commit 36bb924d authored by zhengke's avatar zhengke

修改

parent a3c671b2
...@@ -128,10 +128,6 @@ ...@@ -128,10 +128,6 @@
width: 50%; width: 50%;
} }
.scenicRecommentList .iconfont {
margin-right: 5px;
}
.scenicRecommentList .dieline { .scenicRecommentList .dieline {
color: #2aaef2; color: #2aaef2;
font-size: 14px; font-size: 14px;
...@@ -223,7 +219,20 @@ ...@@ -223,7 +219,20 @@
.scenicRecommentList .comCursorUrl { .scenicRecommentList .comCursorUrl {
cursor: pointer; cursor: pointer;
} }
.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{
min-height: 150px;
}
/* 景区推荐列表 */ /* 景区推荐列表 */
</style> </style>
...@@ -242,13 +251,13 @@ ...@@ -242,13 +251,13 @@
<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="$router.push('scenicSpotInfoManage')">{{$t('pub.addBtn')}}</button> @click="outerVisible=true">{{$t('pub.addBtn')}}</button>
</li> </li>
</ul> </ul>
</div> </div>
<div class="hotelResource clearfix" v-loading="loading"> <div class="hotelResource clearfix" v-loading="loading">
<table> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr> <tr>
<th> <th>
编号 编号
...@@ -286,12 +295,81 @@ ...@@ -286,12 +295,81 @@
{{item.UpdateTimeStr}} {{item.UpdateTimeStr}}
</td> </td>
<td> <td>
<a>修改</a> <el-tooltip class="item" effect="dark" content="修改" placement="top">
<a @click="removeScenicRecomment(item.Id)">删除</a> <el-button
type="primary"
icon="el-icon-edit"
circle
@click="UpdateScenic(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-tooltip>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<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>
<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;"
>
<img :src="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
>
<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>
</el-form>
<div slot="footer" class="dialog-footer">
<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>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
:page-size="msg.pageSize" layout="total,prev, pager, next, jumper" :total="msg.total"></el-pagination> :page-size="msg.pageSize" layout="total,prev, pager, next, jumper" :total="msg.total"></el-pagination>
</div> </div>
...@@ -306,6 +384,7 @@ ...@@ -306,6 +384,7 @@
DataList: "", DataList: "",
noData: false, noData: false,
loading: true, loading: true,
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,
...@@ -317,7 +396,25 @@ ...@@ -317,7 +396,25 @@
total: 0, total: 0,
currentPage: 1, currentPage: 1,
Id: 0 Id: 0
},
addMsg:{
Id:0,
Name:'',
ImgCover:'',
Content:''
},
editorOption:{
modules:{
toolbar:[
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block','align']
]
} }
},
rules:{
Name: [{ required: true, message: '请输入名称', trigger: "change" }],
},
}; };
}, },
methods: { methods: {
...@@ -329,48 +426,6 @@ ...@@ -329,48 +426,6 @@
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.msg.currentPage = 1; this.msg.currentPage = 1;
}, },
//根据省份获取城市
getProvinceList(ID, type) {
let msg = {
Id: ID
};
if (type == 1) {
this.msg.QProvince = "";
this.msg.QCity = "";
this.msg.QDistrict = "";
} else if (type == 2) {
this.msg.QCity = "";
this.msg.QDistrict = "";
} else if (type == 3) {
this.msg.QDistrict = "";
}
if (this.msg.QCountry !== "") {
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
} else if (type == 3) {
this.district = res.data.data;
}
},
err => {}
);
}
},
//获取国家
getCountryList() {
this.apipost(
"dict_post_Destination_GetCountry", {},
res => {
this.countryList = res.data.data;
},
err => {}
);
},
removeScenicRecomment(ID) { removeScenicRecomment(ID) {
var that = this; var that = this;
that.Confirm(that.$t('tips.shifoushanchu'), function () { that.Confirm(that.$t('tips.shifoushanchu'), function () {
...@@ -406,6 +461,89 @@ ...@@ -406,6 +461,89 @@
null null
); );
}, },
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 ft = file.file.name
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase();
let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach(x => {
if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type;
typeOk = true;
}
});
if (!typeOk) return this.Error(this.$t("tips.qsctpian"));
let newArr = [];
newArr.push(file.file);
let path = "/Upload/DMC/";
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);
this.addMsg.ImgCover = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.Success(this.$t("tips.scchenggong"));
this.$forceUpdate();
});
},
closeChangeMachie(done) {
//弹出框关闭初始化弹框内表单
done();
this.resetForm("addMsg");
},
submitForm(addMsg) {
//提交创建、修改表单
this.$refs[addMsg].validate(valid => {
if (valid) {
this.addScenic();
} else {
return false;
}
});
},
//新增
addScenic(){
this.apipost(
"ScenicRecomment_Post_SetScenicRecommentService",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
}else{
this.Error(res.data.message);
}
},
null
);
},
//修改
UpdateScenic(id){
this.apipost(
"ScenicRecomment_Post_SetScenicRecommentService",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
}else{
this.Error(res.data.message);
}
},
null
);
},
goUrl(path, id) { goUrl(path, id) {
this.$store.commit("pageConditionUpdate", this.msg); this.$store.commit("pageConditionUpdate", this.msg);
this.$router.push({ this.$router.push({
......
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