Commit bed2abae authored by zhengke's avatar zhengke

修改

parent 7e5d92b6
......@@ -55,12 +55,14 @@
<template>
<div class="bannerdialog">
<el-form label-width="80px">
<el-form-item label="標題">
<el-input type="text" v-model="plugData.Title"></el-input>
</el-form-item>
<el-form-item label="副標題">
<el-input type="text" v-model="plugData.SubTitle"></el-input>
</el-form-item>
<template v-if="plugData.Type==1">
<el-form-item label="標題">
<el-input type="text" v-model="plugData.Title"></el-input>
</el-form-item>
<el-form-item label="副標題">
<el-input type="text" v-model="plugData.SubTitle"></el-input>
</el-form-item>
</template>
<template v-if="plugData.Type==1">
<el-row>
<el-col :span="12" v-for="(item,index) in plugData.Details" :key="index">
......@@ -107,7 +109,7 @@
<el-form-item :label="'標題'+' '+(index+1)">
<el-input type="text" v-model="plugData.LinkTitle"></el-input>
</el-form-item>
<el-form-item label="連結網址">
<el-form-item label="連結網址" v-if="plugData.Type==2">
<el-input type="text" v-model="plugData.LinkUrl"></el-input>
</el-form-item>
</el-col>
......
......@@ -10,14 +10,14 @@
<el-row>
<el-col :span="24">
<el-table :data="plugData.GroupSelfItems" style="width: 100%">
<el-table-column prop="StartDate" label="出發日" width="180">
<el-table-column prop="StartDate" label="出發日" width="150">
</el-table-column>
<el-table-column label="團號" width="180">
<el-table-column label="團號" width="210">
<template slot-scope="scope">
{{scope.row.TCNUM}}({{scope.row.TCID}})
</template>
</el-table-column>
<el-table-column label="團名">
<el-table-column label="團名" width="210">
<template slot-scope="scope">
{{scope.row.Title}}
</template>
......@@ -31,7 +31,7 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button type="danger" icon="el-icon-delete" circle @click="deleteData(scope.$index)"></el-button>
<el-button type="danger" style="padding:6px;" icon="el-icon-delete" circle @click="deleteData(scope.$index)"></el-button>
</el-tooltip>
</template>
</el-table-column>
......
......@@ -41,12 +41,8 @@
<el-col :span="14">
<el-row>
<el-col :span="24">
<el-form-item :label="'行程名稱1'">
<el-select v-model="plugData.TripId1" 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-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=1">选择行程</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -63,28 +59,70 @@
<el-col :span="14">
<el-row>
<el-col :span="24">
<el-form-item :label="'行程名稱2'">
<el-select v-model="plugData.TripId2" 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-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=2">选择行程</el-button>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import chooseTrip from "../plug-in/choose_trip.vue"
export default {
props: ["plugData"],
data() {
return {};
return {
isShowTripDailog: false,
clickIndex: 0
};
},
components: {
chooseTrip,
},
created() {},
methods: {},
methods: {
//获取选择行程数据
getChooseTripData() {
var tempArray = this.$refs.chooseTrip.getChooseData();
this.isShowTripDailog = false;
if (tempArray && tempArray.length > 0) {
tempArray.forEach(item => {
var imgUrl = ""
if (item.ImgCover && item.ImgCover.length > 0) {
imgUrl = item.ImgCover[0].Url;
}
var obj = {
StartDate: item.StartDate,
imgUrl: imgUrl,
TCNUM: item.TCNUM,
TCID: item.TCID,
Title: item.Title,
DayNum: item.DayNum,
Price: item.B2BPrice,
};
if(this.clickIndex==1){
this.plugData.TripImage1 = obj.imgUrl;
}
if(this.clickIndex==2){
this.plugData.TripImage2 = obj.imgUrl;
}
this.$refs.chooseTrip.clearData();
});
}
},
},
mounted() {
console.log(this.plugData, 'plugData');
},
......
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