Commit 77428188 authored by 黄奎's avatar 黄奎

页面修改

parent 867fa2df
This source diff could not be displayed because it is too large. You can view the blob instead.
<style>
.leftDayList{
display:inline-block;
width: 30px;
height: 100%;
vertical-align: top;
}
.dayNum{
font-weight: bold;
font-size: 16px;
margin-left: -42px;
position: relative;
z-index: 2;
margin-bottom: 5px;
display: block;
}
.siteList{
display: inline-block;
position: relative;
border-left: 2px solid #ebebec;
position: relative;
padding: 0 0 50px 50px;
margin-left: 10px;
}
.Trip_Content{
margin-left:100px;
}
.Trip_Content:first-child{
margin-top:20px;
}
.Trip_Content:last-child{
margin-bottom:20px;
}
.TC_circles{
width: 18px;
height: 18px;
background: #fff;
border-radius: 100%;
border: 2px solid #90b7ec;
position: absolute;
left: -11px;
top: 0;
}
.TripControl{
display: inline-block;
vertical-align: middle;
position: relative;
top: -170px;
margin-left: 30px;
}
.TripControl i{
display:inline-block;
width:30px;
height:30px;
line-height: 30px;
cursor: pointer;
border-radius: 50%;
text-align: center;
}
.TripControl i:hover{
background-color: #90b7ec;
color:#fff;
}
.addTrip{
width:30px;
height:30px;
color: #fff;
text-align: center;
font-size: 25px;
line-height: 28px;
background-color: #f60;
border-radius: 100%;
cursor: pointer;
margin:-2px 0 20px 130px;
}
.leftDayList {
display: inline-block;
width: 30px;
height: 100%;
vertical-align: top;
}
.dayNum {
font-weight: bold;
font-size: 16px;
margin-left: -42px;
position: relative;
z-index: 2;
margin-bottom: 5px;
display: block;
}
.siteList {
display: inline-block;
position: relative;
border-left: 2px solid #ebebec;
position: relative;
padding: 0 0 50px 50px;
margin-left: 10px;
}
.Trip_Content {
margin-left: 100px;
}
.Trip_Content:first-child {
margin-top: 20px;
}
.Trip_Content:last-child {
margin-bottom: 20px;
}
.TC_circles {
width: 18px;
height: 18px;
background: #fff;
border-radius: 100%;
border: 2px solid #90b7ec;
position: absolute;
left: -11px;
top: 0;
}
.TripControl {
display: inline-block;
vertical-align: middle;
position: relative;
top: -170px;
margin-left: 30px;
}
.TripControl i {
display: inline-block;
width: 30px;
height: 30px;
line-height: 30px;
cursor: pointer;
border-radius: 50%;
text-align: center;
}
.TripControl i:hover {
background-color: #90b7ec;
color: #fff;
}
.addTrip {
width: 30px;
height: 30px;
color: #fff;
text-align: center;
font-size: 25px;
line-height: 28px;
background-color: #f60;
border-radius: 100%;
cursor: pointer;
margin: -2px 0 20px 130px;
}
</style>
<template>
<div>
<div class="Trip_Content" v-for="(item,index) in TripListArr">
<div class="leftDayList">
<span class="dayNum">{{index+1}}</span>
</div>
<div class="siteList">
<el-form-item label="前往地" label-width='100px' style="display:inline-block;">
<el-input type="text" class="w150" v-model="item.Go"></el-input>
</el-form-item>
<el-form-item label="前往省份/国家地区" label-width='160px' style="display:inline-block;">
<el-input type="text" class="w150" v-model="item.GoProvice"></el-input>
</el-form-item>
<el-form-item label="是否过境" label-width='100px' style="display:inline-block;">
<el-checkbox v-model="item.IsOut" :true-label="CheckedVaule" :false-label="UnCheckedVaule"></el-checkbox>
</el-form-item>
<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>
<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>
</div>
</div>
<div class="addTrip" @click="addTrip()">+</div>
<div>
<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">
<span class="dayNum">{{index+1}}</span>
</div>
<div class="siteList">
<el-form-item label="前往地" label-width='100px' style="display:inline-block;">
<el-input type="text" class="w150" v-model="item.Go"></el-input>
</el-form-item>
<el-form-item label="前往省份/国家地区" label-width='160px' style="display:inline-block;">
<el-input type="text" class="w150" v-model="item.GoProvice"></el-input>
</el-form-item>
<el-form-item label="是否过境" label-width='100px' style="display:inline-block;">
<el-checkbox v-model="item.IsOut" :true-label="CheckedVaule" :false-label="UnCheckedVaule"></el-checkbox>
</el-form-item>
<quill-editor v-model="item.TravelContent" style="height:300px;"></quill-editor>
<div class="TC_circles"></div>
</div>
<div class="TripControl">
<i class="iconfont icon-img_delete_small" style="margin-left:10px;" @click="delTrip(index)"></i>
</div>
<div class="addTrip" @click="addTrip()">+</div>
</div>
</div>
</template>
<script>
export default {
props:["ContractTripList"],
data() {
return {
checked: false,
TripListArr:[],
//选中过境
CheckedVaule: 1,
//不过境
UnCheckedVaule: 0,
export default {
props: ["ContractTripList", "TripType"],
data() {
return {
checked: false,
TripListArr: [],
//选中过境
CheckedVaule: 1,
//不过境
UnCheckedVaule: 0,
};
},
mounted() {
};
},
mounted() {
if(this.ContractTripList&&this.ContractTripList.length>0){
this.TripListArr=this.ContractTripList;
}
},
methods: {
//添加行程
addTrip(){
let obj={
DayNum:'', //天数
Go:'', // 前往地
GoProvice:'', //前往国家地区
IsOut:0, // 是否过境(0-不过,1-过)
TravelContent:'', //行程内容
},
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: {
//添加行程
addTrip() {
let obj = {
DayNum: '', //天数
Go: '', // 前往地
GoProvice: '', //前往国家地区
IsOut: 0, // 是否过境(0-不过,1-过)
TravelContent: '', //行程内容
}
this.TripListArr.push(obj);
this.getSavedData();
},
//删除行程
delTrip(index){
this.TripListArr.splice(index,1);
},
//删除行程
delTrip(index) {
this.TripListArr.splice(index, 1);
this.getSavedData();
},
//保存行程
// saveTripList(item,index){
// item.DayNum=index+1;
// item.IsShow=1;
// this.getSavedData();
// },
//遍历已经保存数据
getSavedData(){
let sendArr=[];
this.TripListArr.forEach((x,index)=>{
x.DayNum=index+1;
sendArr.push(x);
},
//遍历已经保存数据
getSavedData() {
this.TripListArr.forEach((x, index) => {
x.DayNum = index + 1;
})
this.$emit('tripData', sendArr);
}
},
watch: {
//监听参数
TripListArr: {
handler: function (val, oldVal) {
this.$emit('tripData', this.TripListArr);
},
deep: true
},
}
}
};
};
</script>
......@@ -67,8 +67,6 @@
<div v-if="FeatureData.FeatureType==FeatureTypeState.userDefined">
<span class="userDeSpan">{{$t('sm.xiaoguoyldzxg')}}</span>
<div class="userDefined">
<!-- <quill-editor @change="onEditorChange($event)" v-model="FeatureData.FeatureContent">
</quill-editor>-->
<my-edit v-on:edit-value="FeatureData.FeatureContent = arguments[0]"
v-bind:editValue="FeatureData.FeatureContent" v-bind:toolbarShow="toolbar"
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