Commit e36b9477 authored by zhengke's avatar zhengke

修改

parent 7f651780
......@@ -47,7 +47,7 @@
@click="getList()"
>
<!-- -->
<input v-if="EmployeeId==1 || EmployeeId==5 || F_GeneralManager || EmployeeId==2524"
<input v-if="EmployeeId==1 || EmployeeId==5 || F_GeneralManager || EmployeeId==2524 || EmployeeId==418"
type="button"
class="hollowFixedBtn"
value="新增"
......
......@@ -223,6 +223,10 @@
<!-- 图片链接 -->
<imglinkdialog v-if="currentEditItem.Id=='white_label_link_picture'" :plugData="currentEditItemData">
</imglinkdialog>
<!-- 挑选自有行程 -->
<b2bdialog v-if="currentEditItem.Id=='b2b'" :plugData="currentEditItemData"></b2bdialog>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowDialog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="setSubPlugData()">确 定</el-button>
......@@ -239,6 +243,7 @@
import sectiondialog from "../WebSet/plug-in/sectionTitle_dialog.vue"
import paragraphLinkdialog from "../WebSet/plug-in/paragraphLink_dialog.vue"
import imglinkdialog from "../WebSet/plug-in/imglink_dialog.vue"
import b2bdialog from "../WebSet/plug-in/b2b_dialog.vue"
export default {
props: ["templateData"],
data() {
......@@ -268,7 +273,8 @@
backgrounddialog,
sectiondialog,
paragraphLinkdialog,
imglinkdialog
imglinkdialog,
b2bdialog
},
methods: {
//显示弹窗
......
<style>
.b2bDialog .webSliderDiv {
width: 370px;
line-height: 0;
height: 244px;
border: 1px solid #ccc;
position: relative;
}
.b2bDialog .webSliderDiv .web_imgUrl {
width: 100%;
height: 100%;
}
.b2bDialog .webSliderDiv .el-upload {
width: 100%;
height: 100%;
}
.b2bDialog .webSliderDiv .addIconDiv {
position: absolute;
width: 100%;
height: 100%;
top: 0;
background-color: transparent;
display: flex;
align-items: center;
justify-content: center;
}
.b2bDialog .webSliderDiv>div {
height: 100%;
}
.b2bDialog .myWebDiv {
width: 175px !important;
overflow: hidden;
}
.b2bDialog .webImg_radius {
width: 310px !important;
height: 310px !important;
border-radius: 50%;
overflow: hidden;
border:0!important;
}
.b2b_imgList{
width:100%;
min-height:233px;
background-color: #f1f1f1;
position: relative;
}
.b2bDialog .sectionImg{
position:absolute;
width:100%;
height:100%;
background-position: center;
background-size: cover;
}
</style>
<template>
<div class="b2bDialog">
<el-form label-width="120px">
<el-form-item label="標題">
<el-input type="text" v-model="plugData.Title"></el-input>
</el-form-item>
<el-form-item label="副標題" v-if="plugData.Type!=4">
<el-input type="text" v-model="plugData.SubTitle"></el-input>
</el-form-item>
<template v-if="plugData.Type==1||plugData.Type==2">
<el-row v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;">
<el-col :span="10">
<div class="webSliderDiv">
<img v-if="item.TripImageUrl" :src="item.TripImageUrl" class="web_imgUrl" alt="" />
</div>
</el-col>
<el-col :span="14">
<el-row>
<el-col :span="24">
<el-form-item :label="'行程名稱'+(index+1)">
<el-select v-model="item.TripTitle" style="width:100%">
<el-option label="不限" :value="0"></el-option>
<el-option label="B2B前台菜单" :value="-1">B2B前台菜单</el-option>
<el-option label="个人中心菜单" :value="-2">个人中心菜单</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="價格">
<el-input type="text" v-model="item.Price" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="天數">
<el-input type="text" v-model="item.DayNum" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</template>
<template v-if="plugData.Type==5">
<el-row v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;">
<el-col :span="5">
<div class="webSliderDiv myWebDiv" @click="clickIndex=index">
<el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<img v-if="item.ImageUrl" :src="item.ImageUrl" style="width:auto;" class="web_imgUrl" alt="" />
</el-upload>
</div>
</el-col>
<el-col :span="19">
<el-form-item style="margin-bottom:0">
<div>圖片尺寸請上傳:373x600,檔案請小於3M</div>
</el-form-item>
<el-row>
<el-col :span="24">
<el-form-item label="行程名稱">
<el-input type="text" v-model="item.TripTitle"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="連結網址">
<el-input type="text" v-model="item.LinkUrl"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</template>
<template v-if="plugData.Type==3">
<el-row>
<el-col :span="12" v-for="(item,index) in plugData.Details" :key="index">
<el-form-item :label="'行程名稱'+' '+(index+1)">
<el-select v-model="item.TripTitle" style="width:100%">
<el-option label="不限" :value="0"></el-option>
<el-option label="B2B前台菜单" :value="-1">B2B前台菜单</el-option>
<el-option label="个人中心菜单" :value="-2">个人中心菜单</el-option>
</el-select>
</el-form-item>
<el-form-item>
<div class="b2b_imgList">
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item>
<span>文字版位設定</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" v-for="(item,index) in plugData.Details" :key="index">
<el-row>
<el-col :span="24">
<el-form-item :label="'行程名稱'+' '+(index+1)">
<el-select v-model="item.TripTitle" style="width:100%">
<el-option label="不限" :value="0"></el-option>
<el-option label="B2B前台菜单" :value="-1">B2B前台菜单</el-option>
<el-option label="个人中心菜单" :value="-2">个人中心菜单</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="價格">
<el-input type="text" v-model="item.Price" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="天數">
<el-input type="text" v-model="item.DayNum" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</template>
<template v-if="plugData.Type==4">
<el-row v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;">
<el-col :span="8">
<div class="webSliderDiv webImg_radius">
<div class="b2b_imgList">
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div>
</div>
</div>
</el-col>
<el-col :span="16">
<el-row>
<el-col :span="24">
<el-form-item :label="'行程名稱'+' '+(index+1)">
<el-select v-model="item.TripTitle" style="width:100%">
<el-option label="不限" :value="0"></el-option>
<el-option label="B2B前台菜单" :value="-1">B2B前台菜单</el-option>
<el-option label="个人中心菜单" :value="-2">个人中心菜单</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</template>
</el-form>
</div>
</template>
<script>
export default {
props: ["plugData"],
data() {
return {
clickIndex: 1
};
},
created() {},
methods: {
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/WebSite/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str;
this.plugData.Details[this.clickIndex].TripImageUrl = imgUrl;
});
}
},
mounted() {
console.log(this.plugData, 'plugData');
},
};
</script>
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