Commit 8c9c1b69 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/superman into master

parents 891c77ae 35b51642
...@@ -102,6 +102,10 @@ ...@@ -102,6 +102,10 @@
</div> </div>
</div> </div>
</div> </div>
<el-form-item label="地址说明">
<el-input type="text" class="w300" v-model="addMsg.AddressDes" size="small">
</el-input>
</el-form-item>
<el-form-item label="标签"> <el-form-item label="标签">
<el-tag :key="tag" v-for="(tag,index) in TagsList" style="margin-right:5px;" closable <el-tag :key="tag" v-for="(tag,index) in TagsList" style="margin-right:5px;" closable
:disable-transitions="false" @close="handleClose(tag,index)"> :disable-transitions="false" @close="handleClose(tag,index)">
...@@ -139,7 +143,7 @@ ...@@ -139,7 +143,7 @@
</div> </div>
<div> <div>
<el-tabs> <el-tabs>
<el-tab-pane v-for="(subItem,subIndex) in addMsg.InnerHotelImaList" :key="subIndex" :label="subItem.Label==''?'酒店图片':subItem.Label"> <el-tab-pane v-for="(subItem,subIndex) in addMsg.InnerHotelImaList" :key="subIndex" :label="subItem.Label==''?'默认':subItem.Label">
<div class="InnerHotelDiv"> <div class="InnerHotelDiv">
<div class="InnerHoImgDiv" v-for="(sItem,sIndex) in subItem.ImgList" :key="sIndex"> <div class="InnerHoImgDiv" v-for="(sItem,sIndex) in subItem.ImgList" :key="sIndex">
<img :src="sItem.Path" /> <img :src="sItem.Path" />
...@@ -152,7 +156,6 @@ ...@@ -152,7 +156,6 @@
</div> </div>
</template> </template>
<template v-if="activeName==2"> <template v-if="activeName==2">
<!-- <div class="jz_HotelName">{{addMsg.HotelRealName}}</div> -->
<el-form-item label="开业时间"> <el-form-item label="开业时间">
<el-input placeholder="开业时间" class="w300" v-model="addMsg.HotelInfo.OpenTime"></el-input> <el-input placeholder="开业时间" class="w300" v-model="addMsg.HotelInfo.OpenTime"></el-input>
</el-form-item> </el-form-item>
...@@ -356,6 +359,7 @@ ...@@ -356,6 +359,7 @@
DecorationTime: "", //装修时间 DecorationTime: "", //装修时间
Into: "", //酒店介绍 Into: "", //酒店介绍
}, },
AddressDes:'' //地址说明
}, },
//酒店图片 //酒店图片
HotelImgArr: [], HotelImgArr: [],
...@@ -401,7 +405,6 @@ ...@@ -401,7 +405,6 @@
methods: { methods: {
//获取子组件新增分类和图片 //获取子组件新增分类和图片
getHotelImg(data){ getHotelImg(data){
console.log(data,'datasss');
this.addMsg.InnerHotelImaList = data; this.addMsg.InnerHotelImaList = data;
this.isShowHotelImg=false; this.isShowHotelImg=false;
}, },
...@@ -485,7 +488,6 @@ ...@@ -485,7 +488,6 @@
this.addMsg.RoomFacilities = this.chooseObj.RoomFacilities.toString(); this.addMsg.RoomFacilities = this.chooseObj.RoomFacilities.toString();
this.addMsg.ServiceItems = this.chooseObj.ServiceItems.toString(); this.addMsg.ServiceItems = this.chooseObj.ServiceItems.toString();
this.addMsg.Bookings = this.chooseObj.Bookings; this.addMsg.Bookings = this.chooseObj.Bookings;
// this.addMsg.InnerHotelImaList = this.HotelImgArr;
this.addMsg.ID = this.hotelID; this.addMsg.ID = this.hotelID;
this.addMsg.Tags = this.TagsList.toString(); this.addMsg.Tags = this.TagsList.toString();
this.addMsg.HotelImageList = this.HotelImageArray; this.addMsg.HotelImageList = this.HotelImageArray;
...@@ -523,7 +525,6 @@ ...@@ -523,7 +525,6 @@
msg, msg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log("res.data", res.data);
var tempMsg = res.data.data; var tempMsg = res.data.data;
_self.addMsg.ID = tempMsg.ID; _self.addMsg.ID = tempMsg.ID;
_self.addMsg.HotelRealName = tempMsg.HotelRealName; _self.addMsg.HotelRealName = tempMsg.HotelRealName;
......
This diff is collapsed.
...@@ -439,7 +439,7 @@ ...@@ -439,7 +439,7 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="resDiv"> <div class="resDiv">
<el-form-item :label="$t('hotel.hotel_SalesPrice')" prop="SalesPrice"> <el-form-item label="原价" prop="SalesPrice">
<el-input type="text" class="w210" v-model="addMsg.SalesPrice" @keyup.native="checkPrice(addMsg,'SalesPrice')"></el-input> <el-input type="text" class="w210" v-model="addMsg.SalesPrice" @keyup.native="checkPrice(addMsg,'SalesPrice')"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_Supplier')" v-if="IsSelfBook==1" prop="Supplier"> <el-form-item :label="$t('hotel.hotel_Supplier')" v-if="IsSelfBook==1" prop="Supplier">
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
.hotelproduct .descripTion { .hotelproduct .descripTion {
border-radius: 4px; border-radius: 4px;
width: 266px; width: 100%;
text-align: left; text-align: left;
padding: 5px; padding: 5px;
height: 40px; height: 40px;
...@@ -139,12 +139,43 @@ ...@@ -139,12 +139,43 @@
padding-left: 20px; padding-left: 20px;
} }
.HotelAdd_ImgBtn {
width: 100px;
height: 100px;
line-height: 100px;
color: #419efb;
border: 1px solid #e2e2e2;
cursor: pointer;
text-align: center;
}
.hotl_ImgDiv {
margin: 0 20px 0 0;
position: relative;
display: inline-block;
}
.hotelproduct .colapp-image {
background-size: cover;
background-position: 50%;
width: 100px;
height: 100px;
border-radius: 0;
}
.hotelproduct .delBtn {
position: absolute;
right: -8px;
top: -8px;
padding: 4px 4px !important;
}
</style> </style>
<template> <template>
<div class="flexOne hotelproduct"> <div class="flexOne hotelproduct">
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li style="display:none;">
<span> <span>
<em>{{$t('hotel.hotel_roomName')}}</em> <em>{{$t('hotel.hotel_roomName')}}</em>
<el-select filterable v-model='msg.HotelProductType' :placeholder="$t('pub.pleaseSel')"> <el-select filterable v-model='msg.HotelProductType' :placeholder="$t('pub.pleaseSel')">
...@@ -153,6 +184,12 @@ ...@@ -153,6 +184,12 @@
</el-select> </el-select>
</span> </span>
</li> </li>
<li>
<span>
<em>{{$t('hotel.hotel_roomName')}}</em>
<el-input class="w300" type="text" v-model="msg.Name" maxlength="20"></el-input>
</span>
</li>
<li> <li>
<button class="hollowFixedBtn" type="success" <button class="hollowFixedBtn" type="success"
@click="resetPageIndex(),initData()">{{$t('pub.searchBtn')}}</button> @click="resetPageIndex(),initData()">{{$t('pub.searchBtn')}}</button>
...@@ -164,29 +201,69 @@ ...@@ -164,29 +201,69 @@
<el-dialog custom-class='addGroup' :visible.sync="outerVisible" :title="dialogTitle" center <el-dialog custom-class='addGroup' :visible.sync="outerVisible" :title="dialogTitle" center
:before-close="closeChangeMachie"> :before-close="closeChangeMachie">
<el-form :model="addMsg" :rules="rules" ref="addMsg"> <el-form :model="addMsg" :rules="rules" ref="addMsg">
<el-form-item :label="$t('hotel.hotel_resource')" prop="Hotel_ID"> <el-form-item label="酒店名称" prop="Hotel_ID">
<el-select :placeholder="$t('pub.pleaseSel')" filterable class="w300" disabled clearable <el-select :placeholder="$t('pub.pleaseSel')" filterable class="w300" disabled clearable
v-model="addMsg.Hotel_ID"> v-model="addMsg.Hotel_ID">
<el-option v-for="item in HotelName" :key="item.ID" :label="item.Name" :value="item.ID"> <el-option v-for="item in HotelName" :key="item.ID" :label="item.Name" :value="item.ID">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.product_name')"> <el-form-item label="名称">
<el-input class="w300" type="text" v-model="addMsg.Name" maxlength="20"></el-input> <el-input class="w300" type="text" v-model="addMsg.Name" maxlength="20"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item :label="$t('hotel.product_type_name')" prop="HotelProductType" > <el-form-item label="入住人数" prop="ServiceNumber">
<el-select filterable v-model='addMsg.HotelProductType' :placeholder="$t('pub.pleaseSel')" class="w300">
<el-option v-for='item in HotelProductTypeList' :label='item.Name' :value='item.Id' :key='item.Id'>
</el-option>
</el-select>
</el-form-item> -->
<el-form-item :label="$t('hotel.table_servers')" prop="ServiceNumber">
<el-input type="text" class="w300" v-model="addMsg.ServiceNumber" <el-input type="text" class="w300" v-model="addMsg.ServiceNumber"
@keyup.native="checkInteger(addMsg,'ServiceNumber')"></el-input> @keyup.native="checkInteger(addMsg,'ServiceNumber')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="早餐类型">
<el-select :placeholder="$t('pub.pleaseSel')" class="w300" v-model="addMsg.BreakfastType">
<el-option v-for="item in BreakfastList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="床型">
<el-select :placeholder="$t('pub.pleaseSel')" class="w300" v-model="addMsg.BedType">
<el-option v-for="item in BedTypeList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="床型描述">
<el-input class="w300" type="textarea" v-model="addMsg.BedDesc" :rows="4" maxlength="200"></el-input>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_produceDes')" prop="Description"> <el-form-item :label="$t('hotel.hotel_produceDes')" prop="Description">
<el-input class="w300" type="textarea" v-model="addMsg.Description"></el-input> <el-input class="w300" type="textarea" v-model="addMsg.Description"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="是否有窗">
<el-switch v-model="addMsg.HasWindow" :active-value="1" :inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item label="免费取消">
<el-switch v-model="addMsg.IsCancel" :active-value="2" :inactive-value="1">
</el-switch>
</el-form-item>
<el-form-item label="免费取消时间" v-if="addMsg.IsCancel==2">
<el-input class="w300" type="text" v-model="addMsg.CancelTime" maxlength="200"></el-input>
</el-form-item>
<el-form-item label="房型图">
<div style="display:flex;flex-wrap:wrap;">
<div style="display:inline-block;">
<div class="hotl_ImgDiv" v-for="(item,index) in addMsg.RoomImage" :key="index">
<div class="colapp-image" :style="{backgroundImage: 'url(' + item.Path + ')'}">
</div>
<el-button @click="delHotelImg(item,index)" class="delBtn" type="danger" icon="el-icon-close" circle>
</el-button>
</div>
</div>
<el-upload class="avatar-uploader" action="" style="display:inline-block;"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" :http-request="UploadImage"
multiple>
<div class="HotelAdd_ImgBtn">
+ 添加图片
</div>
</el-upload>
</div>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" <button class="hollowFixedBtn"
...@@ -197,6 +274,10 @@ ...@@ -197,6 +274,10 @@
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading" <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"
style="border-collapse:separate;border-spacing:0px 10px;table-layout:fixed;"> style="border-collapse:separate;border-spacing:0px 10px;table-layout:fixed;">
<tr> <tr>
<th>名称</th>
<th>入住人数</th>
<th>床型/早餐</th>
<th>是否可取消</th>
<th>{{$t('scen.sc_bjts')}}</th> <th>{{$t('scen.sc_bjts')}}</th>
<th>{{$t('scen.sc_dj')}}</th> <th>{{$t('scen.sc_dj')}}</th>
<th>{{$t('scen.sc_gj')}}</th> <th>{{$t('scen.sc_gj')}}</th>
...@@ -204,6 +285,25 @@ ...@@ -204,6 +285,25 @@
<th>{{$t('hotel.table_operat')}}</th> <th>{{$t('hotel.table_operat')}}</th>
</tr> </tr>
<tr v-for="(item,index) in pageData" :key="item.subCode"> <tr v-for="(item,index) in pageData" :key="item.subCode">
<td>
{{item.Name}}
</td>
<td>
{{item.ServiceNumber}}
</td>
<td>
{{item.BedTypeStr}} ({{item.BedDesc}})
<br />
{{item.BreakfastTypeStr}}
<br />
{{item.HasWindowStr}}
</td>
<td>
{{item.IsCancelStr}}
<template v-if="item.IsCancel">
<br /> {{item.CancelTime}}
</template>
</td>
<td class="DaysInfo"> <td class="DaysInfo">
<span><i class="iconfont icon-kaoqintongji"></i>{{item.Days}}{{$t('hotel.hotel_day')}}</span> <span><i class="iconfont icon-kaoqintongji"></i>{{item.Days}}{{$t('hotel.hotel_day')}}</span>
</td> </td>
...@@ -276,8 +376,40 @@ ...@@ -276,8 +376,40 @@
Name: "", Name: "",
HotelProductType: 0, HotelProductType: 0,
Description: "", Description: "",
ServiceNumber: "" ServiceNumber: "",
BreakfastType: 1, //早餐类型 1-含早餐,2-单早餐,3-双早餐
BedType: 1, //床型 1-单人床,2-大床,3-双床
BedDesc: '', //床型描述
HasWindow: 1, //是否有窗(1-有窗,2-无窗)
IsCancel: 1, //'是否可免费取消(1-不可取消,2-可取消
CancelTime: '', //免费取消时间
RoomImage: [], //房型图
}, },
//早餐类型下拉
BreakfastList: [{
Id: 1,
Name: '含早餐'
}, {
Id: 2,
Name: '单早餐'
}, {
Id: 3,
Name: '双早餐'
}, {
Id: 4,
Name: '无早餐'
}],
//床型下拉
BedTypeList: [{
Id: 1,
Name: '单人床'
}, {
Id: 2,
Name: '大床'
}, {
Id: 3,
Name: '双床'
}],
rules: { rules: {
//表单必填验证 //表单必填验证
Hotel_ID: [{ Hotel_ID: [{
...@@ -297,6 +429,41 @@ ...@@ -297,6 +429,41 @@
}; };
}, },
methods: { methods: {
//上传酒店图片
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
var obj = {
TagName: '',
Path: imgUrl
}
this.addMsg.RoomImage.push(obj);
});
},
//删除房型图片
delHotelImg(item, index) {
var that = this
that.Confirm("删除图片将不能恢复?", function () {
if (item.ID > 0) {
let msg = {
Id: item.ID,
PicId: item.Pic
}
that.apipost("hotel_post_RemoveHotelImage", msg, res => {
if (res.data.resultCode == 1) {
that.addMsg.RoomImage.splice(index, 1);
}
});
} else {
that.addMsg.RoomImage.splice(index, 1);
}
});
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.initData(); this.initData();
...@@ -395,6 +562,7 @@ ...@@ -395,6 +562,7 @@
this.innerVisible = true; this.innerVisible = true;
this.insideDialogTxt = res.data.message; this.insideDialogTxt = res.data.message;
this.isDeleteNote = true; this.isDeleteNote = true;
this.Error(res.data.message);
} }
}, },
null null
...@@ -407,7 +575,13 @@ ...@@ -407,7 +575,13 @@
Hotel_ID: parseInt(this.HotelID), Hotel_ID: parseInt(this.HotelID),
Name: "", Name: "",
Description: "", Description: "",
ServiceNumber: "" ServiceNumber: "",
BreakfastType: 1,
BedType: 1,
BedDesc: '',
HasWindow: 1,
IsCancel: 1,
CancelTime: ''
}; };
this.addMsg = newMsg; this.addMsg = newMsg;
}, },
......
...@@ -11,9 +11,13 @@ ...@@ -11,9 +11,13 @@
</el-form-item> </el-form-item>
<el-form-item label="LOGO" size="small"> <el-form-item label="LOGO" size="small">
<el-tooltip class="item" effect="dark" content="建议尺寸100*100" placement="top"> <el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
<el-button @click="openChangeDig(1)">选择文件</el-button> :show-file-list="false" :http-request="UploadImage">
</el-tooltip> <el-tooltip class="item" effect="dark" content="建议尺寸100*100" placement="top">
<el-button >选择文件</el-button>
</el-tooltip>
</el-upload>
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;"> <div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;">
<img v-if="!addMsg.CarLogo || addMsg.CarLogo==''" <img v-if="!addMsg.CarLogo || addMsg.CarLogo==''"
src="../../../assets/img/default.png" style="width:80px;height:80px" alt=""> src="../../../assets/img/default.png" style="width:80px;height:80px" alt="">
...@@ -64,10 +68,14 @@ ...@@ -64,10 +68,14 @@
<el-button @click="ClearCarouse(index,index2)" class="delBtn" type="danger" icon="el-icon-close" <el-button @click="ClearCarouse(index,index2)" class="delBtn" type="danger" icon="el-icon-close"
circle></el-button> circle></el-button>
</div> </div>
<div @click="openChangeDig(2),Picindex = index" v-if="item.PicList&&item.PicList.length<9" <el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage2">
<div @click="Picindex = index" v-if="item.PicList&&item.PicList.length<9"
class="add-image-btn"> class="add-image-btn">
+ 添加图片 + 添加图片
</div> </div>
</el-upload>
</div> </div>
...@@ -164,6 +172,33 @@ ...@@ -164,6 +172,33 @@
this.changeState = false; this.changeState = false;
}, },
//图片上传
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.addMsg.CarLogo = imgUrl
});
},
UploadImage2(file){
let that = this;
let newArr = [];
console.log(that.addMsg.ColorList[that.Picindex].PicList)
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
that.addMsg.ColorList[that.Picindex].PicList.push(imgUrl);
});
},
SelectId2(msg){ SelectId2(msg){
let that = this; let that = this;
let data =[] let data =[]
......
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
</el-form-item> </el-form-item>
<el-form-item label="LOGO" class="is-required"> <el-form-item label="LOGO" class="is-required">
<el-button @click="openChangeDig(1)" size="small">选择文件</el-button>
<el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage">
<el-button size="small">选择文件</el-button>
</el-upload>
<div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;"> <div class="app-gallery-item" style="position: relative;width: 100px;margin-top: 10px;">
<img v-if="!addMsg.BrandLogo || addMsg.BrandLogo==''" <img v-if="!addMsg.BrandLogo || addMsg.BrandLogo==''"
src="../../../assets/img/default.png" style="width:80px;height:80px" alt=""> src="../../../assets/img/default.png" style="width:80px;height:80px" alt="">
...@@ -78,6 +82,20 @@ ...@@ -78,6 +82,20 @@
} }
this.changeState = false; this.changeState = false;
}, },
//图片上传
UploadImage(file) {
console.log(file)
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.addMsg.BrandLogo = imgUrl
});
},
openChangeDig(num) { openChangeDig(num) {
......
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
</el-form-item> </el-form-item>
<el-form-item label="简介"> <el-form-item label="简介">
<!-- <UE style="width:750px;" :defaultMsg="defaultMsg" :config="config" :IsMultiple="true" ref="ue"></UE>--> <!-- <UE style="width:750px;" :defaultMsg="defaultMsg" :config="config" :IsMultiple="true" ref="ue"></UE>-->
<quill-editor :options="tl" v-model="addMsg.Introduction"></quill-editor> <my-edit v-on:edit-value="addMsg.Introduction = arguments[0]" v-bind:editValue="addMsg.Introduction"
v-bind:toolbarShow="toolbar" v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
<!-- <quill-editor :options="editorOption" v-model="addMsg.Introduction"></quill-editor> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -65,11 +67,13 @@ ...@@ -65,11 +67,13 @@
<script> <script>
// import ChooseImg from "@/components/global/ChooseImg.vue"; // import ChooseImg from "@/components/global/ChooseImg.vue";
// import UE from "@/components/global/UE.vue"; // import UE from "@/components/global/UE.vue";
import tl from './js/tl' import MyEdit from "../../EditTemplate.vue";
export default { export default {
components: { components: {
// ChooseImg, // ChooseImg,
// UE, // UE,
"my-edit": MyEdit
}, },
data() { data() {
return { return {
...@@ -83,25 +87,27 @@ ...@@ -83,25 +87,27 @@
EmergencyPhone:'', EmergencyPhone:'',
Introduction:'', Introduction:'',
}, },
tl:tl, toolbar: {
editorOption: { clean: true,
modules:{ font: false, //字体
toolbar:[ narrative: false, //叙述,
['bold', 'italic', 'underline', 'strike', 'image'], // toggled buttons image:true,
[{ 'header': [1, 2, 3, 4, 5, 6, false] }], bold: true, //加粗
[{ 'color': [] }, {'background': [] }], underline: true, //下划线
[{ 'font': [] }], header1: true, //H1
[{ 'align': [] }], header2: true, //H2
[{ 'size': ['small', false, 'large', 'huge'] }], fontColor: true, //字体颜色
[{ 'list': 'ordered'}, { 'list': 'bullet' }] fontBackgroundColor: true, //背景颜色
]
}
}, },
DefaultList: [],
placeholder: "请输入",
defaultMsg: "", defaultMsg: "",
config: { config: {
initialFrameWidth: null, initialFrameWidth: null,
initialFrameHeight: 350 initialFrameHeight: 350
}, },
rules: { rules: {
Name: [{ Name: [{
...@@ -231,6 +237,9 @@ ...@@ -231,6 +237,9 @@
.app-add-cat .el-checkbox-group { .app-add-cat .el-checkbox-group {
font-size: 14px !important; font-size: 14px !important;
} }
.app-add-cat .ql-toolbar span{
line-height: 24px;
}
.app-add-cat .el-checkbox { .app-add-cat .el-checkbox {
margin-right: 0; margin-right: 0;
...@@ -349,4 +358,8 @@ ...@@ -349,4 +358,8 @@
height: 32px; height: 32px;
margin: 0 5px; margin: 0 5px;
} }
.addGuide .ql-toolbar.ql-snow .ql-formats {
margin-right: 5px;
line-height: 24px;
}
</style> </style>
...@@ -165,11 +165,11 @@ ...@@ -165,11 +165,11 @@
<h3 style="padding:15px 0">一级分类</h3> <h3 style="padding:15px 0">一级分类</h3>
<div class="app-goods-cat-list active"> <div class="app-goods-cat-list active">
<el-checkbox-group v-model="checkList"> <el-checkbox-group v-model="checkList">
<div v-for="(item,index) in fenleiData" :key="index" flex="dir:left box:first" class="cat-item"> <div v-for="(item,index) in fenleiData" :key="index" flex="dir:left box:first" class="cat-item" style="display: flex;align-items: center;">
<el-checkbox :label="item"> <el-checkbox :label="item">
<span style="display: none;">{{item.Name}}</span> <span style="display: none;">{{item.Name}}</span>
</el-checkbox> </el-checkbox>
<div flex="box:last cross:center"> <div flex="box:last cross:center" style="display: flex;align-items: center;">
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
<i v-if="item.ChildList.length>0" @click="getChild2(item.ChildList)" class="el-icon-arrow-right"></i> <i v-if="item.ChildList.length>0" @click="getChild2(item.ChildList)" class="el-icon-arrow-right"></i>
</div> </div>
...@@ -182,11 +182,11 @@ ...@@ -182,11 +182,11 @@
<h3 style="padding:15px 0">二级分类</h3> <h3 style="padding:15px 0">二级分类</h3>
<div class="app-goods-cat-list active"> <div class="app-goods-cat-list active">
<el-checkbox-group v-model="checkList"> <el-checkbox-group v-model="checkList">
<div v-for="(item,index) in childList2" :key="index" flex="dir:left box:first" class="cat-item"> <div v-for="(item,index) in childList2" :key="index" flex="dir:left box:first" class="cat-item" style="display: flex;align-items: center;" >
<el-checkbox :label="item"> <el-checkbox :label="item">
<span style="display: none;">{{item.Name}}</span> <span style="display: none;">{{item.Name}}</span>
</el-checkbox> </el-checkbox>
<div flex="box:last cross:center"> <div flex="box:last cross:center" style="display: flex;align-items: center;">
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
<i v-if="item.ChildList.length>0" @click="getChild3(item.ChildList)" class="el-icon-arrow-right"></i> <i v-if="item.ChildList.length>0" @click="getChild3(item.ChildList)" class="el-icon-arrow-right"></i>
</div> </div>
...@@ -195,15 +195,15 @@ ...@@ -195,15 +195,15 @@
</div> </div>
</el-col> </el-col>
<el-col v-show="childList3.length>0" :span="8" style="padding:0 10px;box-sizing:border-box"> <el-col v-show="childList3.length>0" :span="8" style="padding:0 10px;box-sizing:border-box" >
<h3 style="padding:15px 0">三级分类</h3> <h3 style="padding:15px 0">三级分类</h3>
<div class="app-goods-cat-list active"> <div class="app-goods-cat-list active">
<el-checkbox-group v-model="checkList"> <el-checkbox-group v-model="checkList">
<div v-for="(item,index) in childList3" :key="index" flex="dir:left box:first" class="cat-item"> <div v-for="(item,index) in childList3" :key="index" flex="dir:left box:first" class="cat-item" style="display: flex;align-items: center;">
<el-checkbox :label="item"> <el-checkbox :label="item">
<span style="display: none;">{{item.Name}}</span> <span style="display: none;">{{item.Name}}</span>
</el-checkbox> </el-checkbox>
<div flex="box:last cross:center"> <div flex="box:last cross:center" style="display: flex;align-items: center;">
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
</div> </div>
...@@ -722,4 +722,12 @@ ...@@ -722,4 +722,12 @@
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.directorGoodsList .el-pagination ul li {
text-align: center;
line-height: 28px;
position: static !important;
display: flex;
align-items: center;
justify-content: center;
}
</style> </style>
...@@ -255,8 +255,7 @@ ...@@ -255,8 +255,7 @@
this.$router.push({ this.$router.push({
name: 'addGuide', name: 'addGuide',
query: { query: {
ID:row.ID, ID:row.ID
blank: "y"
} }
}); });
}, },
......
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
</div> </div>
<div> <div>
<el-form-item label="订单状态"> <el-form-item label="订单状态">
<div flex="dir:left wrap:wrap"> <div flex="dir:left wrap:wrap" style="display: flex">
<div v-for="item in addMsg.OrderStateList" :key="item.Id" style="margin-right: 15px" flex="dir:left"> <div v-for="item in addMsg.OrderStateList" :key="item.Id" style="margin-right: 15px" flex="dir:left">
<span>{{item.Id}}</span> <span>{{item.Id}}</span>
<el-input style="width:100px" placeholder="请输入" size="small" v-model="item.Name"></el-input> <el-input style="width:100px" placeholder="请输入" size="small" v-model="item.Name"></el-input>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</el-form-item> </el-form-item>
<el-form-item label="详情页面链接"> <el-form-item label="详情页面链接">
<el-input style="width:350px" placeholder="请输入" size="small" v-model="addMsg.PagePath"> <el-input style="width:350px" placeholder="请输入" size="small" v-model="addMsg.PagePath">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="提前预定天数"> <el-form-item label="提前预定天数">
...@@ -196,7 +196,9 @@ ...@@ -196,7 +196,9 @@
</div> </div>
<el-row> <el-row>
<el-col :span="242"> <el-col :span="242">
<UE style="width:750px;" :defaultMsg="defaultMsg" :config="config" :IsMultiple="true" ref="ue"></UE> <!-- <UE style="width:750px;" :defaultMsg="defaultMsg" :config="config" :IsMultiple="true" ref="ue"></UE> -->
<my-edit v-on:edit-value="addMsg.InsuranceDescription = arguments[0]" v-bind:editValue="addMsg.InsuranceDescription"
v-bind:toolbarShow="toolbar" v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
...@@ -385,12 +387,15 @@ ...@@ -385,12 +387,15 @@
// import chooseMenu from "../common/chooseMenu.vue"; // import chooseMenu from "../common/chooseMenu.vue";
// import ChooseImg from "@/components/global/ChooseImg.vue"; // import ChooseImg from "@/components/global/ChooseImg.vue";
// import UE from "@/components/global/UE.vue"; // import UE from "@/components/global/UE.vue";
import MyEdit from "../../EditTemplate.vue";
export default { export default {
components: { components: {
// chooseMenu, // chooseMenu,
// UE, // UE,
// ChooseImg // ChooseImg
"my-edit": MyEdit
}, },
data() { data() {
...@@ -429,6 +434,20 @@ ...@@ -429,6 +434,20 @@
}, },
choicImg: false, choicImg: false,
imgType: -1, imgType: -1,
toolbar: {
clean: true,
font: false, //字体
narrative: false, //叙述,
image:true,
bold: true, //加粗
underline: true, //下划线
header1: true, //H1
header2: true, //H2
fontColor: true, //字体颜色
fontBackgroundColor: true, //背景颜色
},
DefaultList: [],
placeholder: "请输入",
}; };
}, },
created() { created() {
...@@ -460,8 +479,8 @@ ...@@ -460,8 +479,8 @@
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
let content = this.$refs.ue.getUEContent(); // let content = this.$refs.ue.getUEContent();
this.addMsg.InsuranceDescription = content; // this.addMsg.InsuranceDescription = content;
let cmd = "/api/GuideCar/SetGuideCarInfo"; let cmd = "/api/GuideCar/SetGuideCarInfo";
this.saveload = true this.saveload = true
this.lxymallapipost(cmd, this.addMsg, this.lxymallapipost(cmd, this.addMsg,
...@@ -488,9 +507,9 @@ ...@@ -488,9 +507,9 @@
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg = res.data.data; this.addMsg = res.data.data;
if (this.addMsg.InsuranceDescription && this.addMsg.InsuranceDescription != "") { // if (this.addMsg.InsuranceDescription && this.addMsg.InsuranceDescription != "") {
this.defaultMsg = this.addMsg.InsuranceDescription; // this.defaultMsg = this.addMsg.InsuranceDescription;
} // }
} }
}) })
}, },
...@@ -583,5 +602,9 @@ ...@@ -583,5 +602,9 @@
margin-top: 10px; margin-top: 10px;
box-sizing: border-box; box-sizing: border-box;
} }
.directorSetting .ql-toolbar.ql-snow .ql-formats {
margin-right: 5px;
line-height: 24px;
}
</style> </style>
/*富文本编辑图片上传配置*/
let locationName = window.location.hostname;
let UploadUrl= locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.20.214:8120";
const uploadConfig = {
action: UploadUrl + "/Upload?filePath=" , // 必填参数 图片上传地址
methods:'POST', // 必填参数 图片上传方式
headers:{}, // 可选参数 设置请求头部
token:'', // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
name:'image', // 必填参数 文件的参数名
size:500, // 可选参数 图片大小,单位为Kb, 1M = 1024Kb
accept:'image/png, image/gif, image/jpeg, image/bmp, image/x-icon' // 可选 可上传的图片格式
};
// toolbar工具栏的工具选项(默认展示全部)
const toolOptions = [
['bold', 'italic', 'underline', 'strike', 'image'], // toggled buttons
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, {'background': [] }],
[{ 'font': [] }],
[{ 'align': [] }],
[{ 'size': ['small', false, 'large', 'huge'] }],
[{ 'list': 'ordered'}, { 'list': 'bullet' }]
];
const handlers = {
image:function image() {
var self =this;
var fileInput =this.container.querySelector('input.ql-image[type=file]');
if (fileInput ===null) {
fileInput =document.createElement('input');
fileInput.setAttribute('type', 'file');
// 设置图片参数名
if (uploadConfig.name) {
fileInput.setAttribute('name', uploadConfig.name);
}
fileInput.setAttribute('accept', uploadConfig.accept);
fileInput.classList.add('ql-image');
// 监听选择文件
fileInput.addEventListener('change', function () {
// 创建formData
var formData =new FormData();
console.log(fileInput.files[0])
let files = [];
files.push(fileInput.files[0]);
formData.append(uploadConfig.name, fileInput.files[0]);
formData.append('object','product');
// 如果需要token且存在token
// 图片上传
var xhr =new XMLHttpRequest();
// 可设置上传图片的格式
xhr.open(uploadConfig.methods, uploadConfig.action, true);
xhr.setRequestHeader('authorization',uploadConfig.token)
// 上传数据成功,会触发
// xhr.onload =function (e) {
//
// if (xhr.status ===200) {
//
// var res =JSON.parse(xhr.responseText);
//
// let length = self.quill.getSelection(true).index;
//
// //这里很重要,你图片上传成功后,img的src需要在这里添加,res.path就是你服务器返回的图片链接。
//
// self.quill.insertEmbed(length, 'image', res.data);
//
// self.quill.setSelection(length +1)
//
// }
//
// fileInput.value =''
//
// };
});
this.container.appendChild(fileInput);
}
fileInput.click();
}
};
export default {
placeholder:'',
theme:'snow', // 主题
modules: {
toolbar: {
container: toolOptions, // 工具栏选项
handlers: handlers// 事件重写
}
}
};
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
created() {}, created() {},
computed: {}, computed: {},
mounted() { mounted() {
console.log(this.saveObj, 'saveObj');
}, },
methods: { methods: {
//新增分组 //新增分组
...@@ -137,8 +137,6 @@ ...@@ -137,8 +137,6 @@
}, },
//选定 //选定
SelectImgId() { SelectImgId() {
console.log('1111');
console.log(this.saveObj,'saveObj');
}, },
//上传酒店图片 //上传酒店图片
UploadImage(file) { UploadImage(file) {
...@@ -156,7 +154,6 @@ ...@@ -156,7 +154,6 @@
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath; var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
obj.Path = str; obj.Path = str;
obj.ShowPath = imgUrl; obj.ShowPath = imgUrl;
console.log(obj,'obj');
this.saveObj[this.commonIndex].imgArr.push(obj.ShowPath); this.saveObj[this.commonIndex].imgArr.push(obj.ShowPath);
}); });
}, },
......
...@@ -7,17 +7,21 @@ ...@@ -7,17 +7,21 @@
<div class="el-scrollbar" style="height: 450px; width: 100%;overflow-y:auto;"> <div class="el-scrollbar" style="height: 450px; width: 100%;overflow-y:auto;">
<div style="margin-bottom: -8px; margin-right: -8px;"> <div style="margin-bottom: -8px; margin-right: -8px;">
<div class="el-scrollbar__view"> <div class="el-scrollbar__view">
<!-- <li class="el-menu-item" style="padding-left: 10px;padding-right: 10px;" <li class="el-menu-item" :class="commonIndex==index?'selectActive' : ''"
:class="commonIndex==-1?'selectActive' : ''" @click="getImgList(-1,saveObj)"> @click="getImgList(-1,saveObj)" :key="index" style="padding-left: 10px;padding-right: 10px;">
<i class="el-icon-tickets"></i> <div flex="dir:left box:last">
<span>全部</span> <el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;">
</li> --> <i class="el-icon-tickets"></i>
<span>全部</span>
</el-col>
</div>
</li>
<li class="el-menu-item" v-for="(item,index) in saveObj" :class="commonIndex==index?'selectActive' : ''" <li class="el-menu-item" v-for="(item,index) in saveObj" :class="commonIndex==index?'selectActive' : ''"
@click="getImgList(index,saveObj)" :key="index" style="padding-left: 10px;padding-right: 10px;"> @click="getImgList(index,saveObj)" :key="index" style="padding-left: 10px;padding-right: 10px;">
<div flex="dir:left box:last"> <div flex="dir:left box:last">
<el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;"> <el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;">
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span>{{item.Label==''?'酒店图片':item.Label}}</span> <span>{{item.Label==''?'默认':item.Label}}</span>
</el-col> </el-col>
<el-col class="blue" :span="6" v-if="index!=0"> <el-col class="blue" :span="6" v-if="index!=0">
<span @click="editGroup(index)">编辑</span> <span @click="editGroup(index)">编辑</span>
...@@ -40,10 +44,11 @@ ...@@ -40,10 +44,11 @@
</div> </div>
</el-upload> </el-upload>
</div> </div>
<div style="display:inline-block;margin-left:9px;position:relative" v-for="(item,index) in comImgArr" :key="index"> <div style="display:inline-block;margin-left:9px;position:relative" v-for="(item,index) in comImgArr"
<img :src="item.Path" class="app-attachment-img" style="width: 100px; height: 100px;"> :key="index">
<i class="iconfont icon-bumenguanli-shanchu hotel_DelIcon" @click="delHotelImg(index)"></i> <img :src="item.Path" class="app-attachment-img" style="width: 100px; height: 100px;">
</div> <i class="iconfont icon-bumenguanli-shanchu hotel_DelIcon" @click="delHotelImg(item,index)"></i>
</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -97,23 +102,38 @@ ...@@ -97,23 +102,38 @@
this.getAll(); this.getAll();
}, },
methods: { methods: {
getAll(){ getAll() {
// this.commonIndex=-1; this.comImgArr = [];
this.comImgArr=[]; if (this.saveObj.length > 0) {
if(this.saveObj.length>0){
this.saveObj.forEach(item => { this.saveObj.forEach(item => {
this.comImgArr=this.comImgArr.concat(item.ImgList); this.comImgArr = this.comImgArr.concat(item.ImgList);
}) })
} else {
let obj = {
Label: '',
ImgList: this.comImgArr
}
this.saveObj.unshift(obj);
} }
let obj={
Label:'',
ImgList:this.comImgArr
}
this.saveObj.unshift(obj);
}, },
//删除图片 //删除图片
delHotelImg(index){ delHotelImg(item, index) {
this.comImgArr.splice(index,1); var that = this
that.Confirm("删除图片将不能恢复?", function () {
if (item.MappingId && item.MappingId > 0) {
let msg = {
Id: item.MappingId,
PicId: item.PicId
}
that.apipost("hotel_post_RemoveHotelImage", msg, res => {
if (res.data.resultCode == 1) {
that.comImgArr.splice(index, 1);
}
});
} else {
that.comImgArr.splice(index, 1);
}
});
}, },
//清空消息 //清空消息
clearGroupMsg() { clearGroupMsg() {
...@@ -144,15 +164,18 @@ ...@@ -144,15 +164,18 @@
}, },
//删除 //删除
delGroup(index) { delGroup(index) {
this.saveObj.splice(index, 1); var that = this
that.Confirm("删除图片将不能恢复?", function () {
this.saveObj.splice(index, 1);
});
}, },
//点击获取图片arr //点击获取图片arr
getImgList(index, obj) { getImgList(index, obj) {
this.commonIndex = index; this.commonIndex = index;
if (index == -1) { if (index == -1) {
this.comImgArr=[]; this.comImgArr = [];
this.saveObj.forEach(item => { this.saveObj.forEach(item => {
this.comImgArr=this.comImgArr.concat(item.ImgList); this.comImgArr = this.comImgArr.concat(item.ImgList);
}) })
} else { } else {
this.comImgArr = this.saveObj[index].ImgList; this.comImgArr = this.saveObj[index].ImgList;
...@@ -160,21 +183,15 @@ ...@@ -160,21 +183,15 @@
}, },
//选定 //选定
SelectImgId() { SelectImgId() {
this.$emit('getHotelImg',this.saveObj); this.$emit('getHotelImg', this.saveObj);
}, },
//上传酒店图片 //上传酒店图片
UploadImage(file) { UploadImage(file) {
// if (this.commonIndex == -2) {
// this.Error('请选择分类')
// return;
// }
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
let fileName = file.file.name; let fileName = file.file.name;
var path = "/Upload/DMC/"; var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
console.log(x,'xxxx');
;
var str = x.data.FilePath; var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath; var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
var obj = { var obj = {
...@@ -271,11 +288,13 @@ ...@@ -271,11 +288,13 @@
border-left: none; border-left: none;
padding: 0 15px; padding: 0 15px;
} }
.hotel_DelIcon{
.hotel_DelIcon {
position: absolute; position: absolute;
right:-5px; right: -5px;
top:-7px; top: -7px;
color:red; color: red;
cursor: pointer; cursor: pointer;
} }
</style> </style>
...@@ -317,6 +317,10 @@ ...@@ -317,6 +317,10 @@
}, },
//提交验证 //提交验证
submitForm(SaveType) { submitForm(SaveType) {
if(this.PostConfig.LineteamId==0){
this.Error('请选择系列');
return
}
if (this.isSubmit) { if (this.isSubmit) {
this.isSubmit = false; this.isSubmit = false;
this.SaveData(SaveType); this.SaveData(SaveType);
......
...@@ -2591,7 +2591,7 @@ export default { ...@@ -2591,7 +2591,7 @@ export default {
}, },
},{ },{
path: '/addCar', //司导专区=>车辆管理 path: '/addCar', //司导专区=>车辆管理
name: 'addSite', name: 'addCar',
component: resolve => require(['@/components/TravelManager/Lxy/addCar'], resolve), component: resolve => require(['@/components/TravelManager/Lxy/addCar'], resolve),
meta: { meta: {
title: '车辆管理' title: '车辆管理'
......
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