Commit 77428188 authored by 黄奎's avatar 黄奎

页面修改

parent 867fa2df
This diff is collapsed.
<style> <style>
.leftDayList{ .leftDayList {
display:inline-block; display: inline-block;
width: 30px; width: 30px;
height: 100%; height: 100%;
vertical-align: top; vertical-align: top;
} }
.dayNum{
.dayNum {
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
margin-left: -42px; margin-left: -42px;
...@@ -14,7 +15,8 @@ ...@@ -14,7 +15,8 @@
margin-bottom: 5px; margin-bottom: 5px;
display: block; display: block;
} }
.siteList{
.siteList {
display: inline-block; display: inline-block;
position: relative; position: relative;
border-left: 2px solid #ebebec; border-left: 2px solid #ebebec;
...@@ -22,16 +24,20 @@ ...@@ -22,16 +24,20 @@
padding: 0 0 50px 50px; padding: 0 0 50px 50px;
margin-left: 10px; margin-left: 10px;
} }
.Trip_Content{
margin-left:100px; .Trip_Content {
margin-left: 100px;
} }
.Trip_Content:first-child{
margin-top:20px; .Trip_Content:first-child {
margin-top: 20px;
} }
.Trip_Content:last-child{
margin-bottom:20px; .Trip_Content:last-child {
margin-bottom: 20px;
} }
.TC_circles{
.TC_circles {
width: 18px; width: 18px;
height: 18px; height: 18px;
background: #fff; background: #fff;
...@@ -41,29 +47,33 @@ ...@@ -41,29 +47,33 @@
left: -11px; left: -11px;
top: 0; top: 0;
} }
.TripControl{
.TripControl {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
position: relative; position: relative;
top: -170px; top: -170px;
margin-left: 30px; margin-left: 30px;
} }
.TripControl i{
display:inline-block; .TripControl i {
width:30px; display: inline-block;
height:30px; width: 30px;
height: 30px;
line-height: 30px; line-height: 30px;
cursor: pointer; cursor: pointer;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
} }
.TripControl i:hover{
.TripControl i:hover {
background-color: #90b7ec; background-color: #90b7ec;
color:#fff; color: #fff;
} }
.addTrip{
width:30px; .addTrip {
height:30px; width: 30px;
height: 30px;
color: #fff; color: #fff;
text-align: center; text-align: center;
font-size: 25px; font-size: 25px;
...@@ -71,13 +81,17 @@ ...@@ -71,13 +81,17 @@
background-color: #f60; background-color: #f60;
border-radius: 100%; border-radius: 100%;
cursor: pointer; cursor: pointer;
margin:-2px 0 20px 130px; margin: -2px 0 20px 130px;
} }
</style> </style>
<template> <template>
<div> <div>
<div class="Trip_Content" v-for="(item,index) in TripListArr"> <div v-if="TripType==0">
<quill-editor v-model="TripListArr[0].TravelContent" style="height:400px;"></quill-editor>
</div>
<div v-else class="Trip_Content" v-for="(item,index) in TripListArr" :key="index">
<div class="leftDayList"> <div class="leftDayList">
<span class="dayNum">{{index+1}}</span> <span class="dayNum">{{index+1}}</span>
</div> </div>
...@@ -92,70 +106,81 @@ ...@@ -92,70 +106,81 @@
<el-checkbox v-model="item.IsOut" :true-label="CheckedVaule" :false-label="UnCheckedVaule"></el-checkbox> <el-checkbox v-model="item.IsOut" :true-label="CheckedVaule" :false-label="UnCheckedVaule"></el-checkbox>
</el-form-item> </el-form-item>
<quill-editor v-model="item.TravelContent" style="height:300px;"></quill-editor> <quill-editor v-model="item.TravelContent" style="height:300px;"></quill-editor>
<!-- <el-input type="textarea" resize="none" rows="16" cols="40" v-model="item.TravelContent"></el-input> -->
<div class="TC_circles"></div> <div class="TC_circles"></div>
</div> </div>
<div class="TripControl"> <div class="TripControl">
<!-- <i class="iconfont icon-baocun1" @click="saveTripList(item,index)"></i> -->
<i class="iconfont icon-img_delete_small" style="margin-left:10px;" @click="delTrip(index)"></i> <i class="iconfont icon-img_delete_small" style="margin-left:10px;" @click="delTrip(index)"></i>
</div> </div>
</div>
<div class="addTrip" @click="addTrip()">+</div> <div class="addTrip" @click="addTrip()">+</div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
props:["ContractTripList"], props: ["ContractTripList", "TripType"],
data() { data() {
return { return {
checked: false, checked: false,
TripListArr:[], TripListArr: [],
//选中过境 //选中过境
CheckedVaule: 1, CheckedVaule: 1,
//不过境 //不过境
UnCheckedVaule: 0, UnCheckedVaule: 0,
}; };
}, },
mounted() { mounted() {
if(this.ContractTripList&&this.ContractTripList.length>0){
this.TripListArr=this.ContractTripList; },
created() {
if (this.ContractTripList) {
if (this.ContractTripList.length > 0) {
this.TripListArr = JSON.parse(JSON.stringify(this.ContractTripList));
} else {
var tripObj = {
DayNum: 1, //天数
Go: '', // 前往地
GoProvice: '', //前往国家地区
IsOut: 0, // 是否过境(0-不过,1-过)
TravelContent: '', //行程内容
}
this.TripListArr.push(tripObj);
}
} }
}, },
methods: { methods: {
//添加行程 //添加行程
addTrip(){ addTrip() {
let obj={ let obj = {
DayNum:'', //天数 DayNum: '', //天数
Go:'', // 前往地 Go: '', // 前往地
GoProvice:'', //前往国家地区 GoProvice: '', //前往国家地区
IsOut:0, // 是否过境(0-不过,1-过) IsOut: 0, // 是否过境(0-不过,1-过)
TravelContent:'', //行程内容 TravelContent: '', //行程内容
} }
this.TripListArr.push(obj); this.TripListArr.push(obj);
this.getSavedData(); this.getSavedData();
}, },
//删除行程 //删除行程
delTrip(index){ delTrip(index) {
this.TripListArr.splice(index,1); this.TripListArr.splice(index, 1);
this.getSavedData(); this.getSavedData();
}, },
//保存行程
// saveTripList(item,index){
// item.DayNum=index+1;
// item.IsShow=1;
// this.getSavedData();
// },
//遍历已经保存数据 //遍历已经保存数据
getSavedData(){ getSavedData() {
let sendArr=[]; this.TripListArr.forEach((x, index) => {
this.TripListArr.forEach((x,index)=>{ x.DayNum = index + 1;
x.DayNum=index+1;
sendArr.push(x);
}) })
this.$emit('tripData', sendArr);
} }
},
watch: {
//监听参数
TripListArr: {
handler: function (val, oldVal) {
this.$emit('tripData', this.TripListArr);
},
deep: true
},
} }
}; };
</script> </script>
...@@ -67,8 +67,6 @@ ...@@ -67,8 +67,6 @@
<div v-if="FeatureData.FeatureType==FeatureTypeState.userDefined"> <div v-if="FeatureData.FeatureType==FeatureTypeState.userDefined">
<span class="userDeSpan">{{$t('sm.xiaoguoyldzxg')}}</span> <span class="userDeSpan">{{$t('sm.xiaoguoyldzxg')}}</span>
<div class="userDefined"> <div class="userDefined">
<!-- <quill-editor @change="onEditorChange($event)" v-model="FeatureData.FeatureContent">
</quill-editor>-->
<my-edit v-on:edit-value="FeatureData.FeatureContent = arguments[0]" <my-edit v-on:edit-value="FeatureData.FeatureContent = arguments[0]"
v-bind:editValue="FeatureData.FeatureContent" v-bind:toolbarShow="toolbar" v-bind:editValue="FeatureData.FeatureContent" v-bind:toolbarShow="toolbar"
v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit> v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
......
This diff is collapsed.
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