Commit 7b2e370f authored by 黄奎's avatar 黄奎

页面修改

parent 9aa7eb69
...@@ -1351,7 +1351,7 @@ ...@@ -1351,7 +1351,7 @@
newArr.push(blob); newArr.push(blob);
var fileName = `${that.uuid(10,10)}.png`; var fileName = `${that.uuid(10,10)}.png`;
var path = `/Upload/Temporary`; var path = `/Upload/Temporary`;
that.uploadSelfBlob(path, newArr, x => { that.uploadSelfBlob(path, newArr,'', x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath; let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
this.postImg(allPath) this.postImg(allPath)
}) })
......
...@@ -1498,7 +1498,7 @@ ...@@ -1498,7 +1498,7 @@
newArr.push(blob); newArr.push(blob);
var fileName = `${that.uuid(10, 10)}.png`; var fileName = `${that.uuid(10, 10)}.png`;
var path = `/newFeature`; var path = `/newFeature`;
that.uploadSelfBlob(path, newArr, x => { that.uploadSelfBlob(path, newArr,'', x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath; let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2]; let i = e.target.id.split("_")[2];
that.imgUrlChange(allPath); that.imgUrlChange(allPath);
......
...@@ -9,29 +9,28 @@ ...@@ -9,29 +9,28 @@
</FeatureControls> </FeatureControls>
</div> </div>
</div> </div>
<div class="UpgradedVersionDetails-box column" v-for="(item,i) in FeatureData.dataObj.SubList"> <div class="UpgradedVersionDetails-box column" v-for="(item,i) in FeatureData.dataObj.SubList">
<div class="UpgradedVersionDetails-imgbox row-aic UpgradedVersion-Hover"> <div class="UpgradedVersionDetails-imgbox row-aic UpgradedVersion-Hover">
<div class="UpgradedVersionDetails-img relative"> <div class="UpgradedVersionDetails-img relative">
<div class="UpgradedVersionDetails1 absolute z-index3"> <div class="UpgradedVersionDetails1 absolute z-index3">
<FeatureControls v-if="FeatureData" :index="index" :FeatureData="FeatureData" :ControlsType="'row'" isImg="1" :isUploadImg="true" <FeatureControls v-if="FeatureData" :index="index" :FeatureData="FeatureData" :ControlsType="'row'"
:isSelectImg="true" @toUploadImg="UploadImg(i)" @toSelectImg="SelectImg(i)" @toAddImg="AddImg" isImg="1" :isUploadImg="true" :isSelectImg="true" @toUploadImg="UploadImg(i)"
@toDeleteImg="DeleteImg(i)" :x="312" :y="312" /> @toSelectImg="SelectImg(i)" @toAddImg="AddImg" @toDeleteImg="DeleteImg(i)" :x="312" :y="312" />
<input type="file" style="display:none" :id="'GouDetaFile_'+(FeatureData * 2 + 1)+'_'+i+'_'+index" @change="uploadpic"> <input type="file" style="display:none" :id="'GouDetaFile_'+(FeatureData * 2 + 1)+'_'+i+'_'+index"
@change="uploadpic">
</div> </div>
<div class="UpgradedVersionDetails-imgOne relative bjE6" <div class="UpgradedVersionDetails-imgOne relative bjE6"
:id="'viewSpotBox_' + (FeatureData * 4) +'_deta_'+i+index"> :id="'viewSpotBox_' + (FeatureData * 4) +'_deta_'+i+index">
<VueDraggableResizable v-if="item.ImgList&&item.ImgList.length>0" <VueDraggableResizable v-if="item.ImgList&&item.ImgList.length>0" :w="312" :h="312"
:w="312" :h="312" :ref="'viewSpotVds_' + FeatureData * 4 + '_deta_'+i+index" tabindex="0" :resizable="false"
:ref="'viewSpotVds_' + FeatureData * 4 + '_deta_'+i+index" :active="false" :parent="false" axis="x" @activated="onActivated(FeatureData * 4, i)"
tabindex="0" :resizable="false" :active="false" :parent="false" axis="x" :x="item.ImgList[0].x" :y="item.ImgList[0].y" :z="2" @dragstop="onViewSpotDragstopX">
@activated="onActivated(FeatureData * 4, i)" :x="item.ImgList[0].x"
:y="item.ImgList[0].y" :z="2" @dragstop="onViewSpotDragstopX">
<img v-if="item.ImgList[0].url" :src="item.ImgList[0].url" <img v-if="item.ImgList[0].url" :src="item.ImgList[0].url"
:id="'viewSpotImg_' + FeatureData * 4 + '_deta_'+i+index"/> :id="'viewSpotImg_' + FeatureData * 4 + '_deta_'+i+index" />
<!-- <img :src="item.ImgList[0].url" :id="'viewSpotImg_' + FeatureData * 4 + 'deta_'+i+index"/> -->
</VueDraggableResizable> </VueDraggableResizable>
<template v-else> <template v-else>
<img src="http://imgfile.oytour.com/Static/NewTripFeature/homeBj.png"/> <img src="http://imgfile.oytour.com/Static/NewTripFeature/homeBj.png" />
</template> </template>
</div> </div>
<div class="UpgradedVersionDetails-detailsTop absolute"></div> <div class="UpgradedVersionDetails-detailsTop absolute"></div>
...@@ -112,19 +111,19 @@ ...@@ -112,19 +111,19 @@
}, },
isShowScenicImg: false, isShowScenicImg: false,
MasterMapIndex: null, //主图下标 MasterMapIndex: null, //主图下标
imgIndex:null imgIndex: null
}; };
}, },
methods: { methods: {
onActivated(i, j) { onActivated(i, j) {
this.imgIndex = j; this.imgIndex = j;
}, },
onViewSpotDragstopX(x,y) { onViewSpotDragstopX(x, y) {
let imgWidth = document.querySelector( let imgWidth = document.querySelector(
"#viewSpotImg_" + (this.FeatureItem * 4) + "_deta_"+this.imgIndex + this.index "#viewSpotImg_" + (this.FeatureItem * 4) + "_deta_" + this.imgIndex + this.index
).width; ).width;
let boxWidth = document.querySelector( let boxWidth = document.querySelector(
"#viewSpotBox_" + (this.FeatureItem * 4) + "_deta_"+this.imgIndex + this.index "#viewSpotBox_" + (this.FeatureItem * 4) + "_deta_" + this.imgIndex + this.index
).offsetWidth; ).offsetWidth;
let cha = boxWidth - imgWidth; let cha = boxWidth - imgWidth;
if (cha <= 0) { if (cha <= 0) {
...@@ -141,14 +140,14 @@ ...@@ -141,14 +140,14 @@
} }
} }
this.FeatureData.dataObj.SubList[this.imgIndex].x = x; this.FeatureData.dataObj.SubList[this.imgIndex].x = x;
this.$refs["viewSpotVds_" + (this.FeatureData * 4) + "_deta_"+this.imgIndex + this.index][0]._data.left = x; this.$refs["viewSpotVds_" + (this.FeatureData * 4) + "_deta_" + this.imgIndex + this.index][0]._data.left = x;
}, },
onViewSpotDragstop(x, y) { onViewSpotDragstop(x, y) {
let imgHeight = document.querySelector( let imgHeight = document.querySelector(
"#viewSpotImg_" + (this.FeatureData * 4)+ "_deta_"+this.imgIndex + this.index "#viewSpotImg_" + (this.FeatureData * 4) + "_deta_" + this.imgIndex + this.index
).height; ).height;
let boxHeight = document.querySelector( let boxHeight = document.querySelector(
"#viewSpotBox_" + (this.FeatureData * 4)+ "_deta_"+this.imgIndex + this.index "#viewSpotBox_" + (this.FeatureData * 4) + "_deta_" + this.imgIndex + this.index
).offsetHeight; ).offsetHeight;
let cha = boxHeight - imgHeight; let cha = boxHeight - imgHeight;
if (cha <= 0) { if (cha <= 0) {
...@@ -166,7 +165,7 @@ ...@@ -166,7 +165,7 @@
} }
this.FeatureData.dataObj.SubList[this.imgIndex].y = y; this.FeatureData.dataObj.SubList[this.imgIndex].y = y;
this.$refs[ this.$refs[
"viewSpotVds_" + (this.FeatureData * 4)+ "_deta_"+this.imgIndex + this.index "viewSpotVds_" + (this.FeatureData * 4) + "_deta_" + this.imgIndex + this.index
][0]._data.top = y; ][0]._data.top = y;
}, },
...@@ -186,7 +185,7 @@ ...@@ -186,7 +185,7 @@
newArr.push(blob); newArr.push(blob);
var fileName = `${that.uuid(10, 10)}.png`; var fileName = `${that.uuid(10, 10)}.png`;
var path = `/newFeature`; var path = `/newFeature`;
that.uploadSelfBlob(path, newArr, x => { that.uploadSelfBlob(path, newArr, '', x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath; let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2]; let i = e.target.id.split("_")[2];
that.FeatureData.dataObj.SubList[that.MasterMapIndex].ImgList[0].url = allPath that.FeatureData.dataObj.SubList[that.MasterMapIndex].ImgList[0].url = allPath
...@@ -256,4 +255,5 @@ ...@@ -256,4 +255,5 @@
<style> <style>
@import url("../../../../assets/css/UpgradedVersion.css"); @import url("../../../../assets/css/UpgradedVersion.css");
</style> </style>
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
<div class="featureHome-vToolBar-one absolute z-index3"> <div class="featureHome-vToolBar-one absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'row'" :isTemplate="false" <FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'row'" :isTemplate="false"
:isUploadImg="true" :isSelectImg="true" :isAddImg="false" :isDeleteImg="false" @toUploadImg="UploadImg" :isUploadImg="true" :isSelectImg="true" :isAddImg="false" :isDeleteImg="false" @toUploadImg="UploadImg"
@toSelectImg="SelectImg" @toAddImg="AddImg" @toDeleteImg="DeleteImg" @toSelectImg="SelectImg" @toAddImg="AddImg" @toDeleteImg="DeleteImg" :x="697" :y="930"></FeatureControls>
:x="697" :y="930"></FeatureControls>
<input type="file" style="display:none" :id="'homefile_'+(FeatureItem * 2 + 1) + '_'+index" @change="uploadpic"> <input type="file" style="display:none" :id="'homefile_'+(FeatureItem * 2 + 1) + '_'+index" @change="uploadpic">
</div> </div>
<div class="featureHome-vToolBar-two absolute z-index3"> <div class="featureHome-vToolBar-two absolute z-index3">
...@@ -28,14 +27,13 @@ ...@@ -28,14 +27,13 @@
</FeatureControls> </FeatureControls>
</div> </div>
<div class="featureHome-left-one bjF6 absolute z-index2" :id="'viewSpotBox_' + (FeatureItem * 4 + 1) + '_' +index"> <div class="featureHome-left-one bjF6 absolute z-index2"
<VueDraggableResizable v-if="FeatureItem.dataObj.ImgList&&FeatureItem.dataObj.ImgList.length>0" :id="'viewSpotBox_' + (FeatureItem * 4 + 1) + '_' +index">
:w="697" :h="930" <VueDraggableResizable v-if="FeatureItem.dataObj.ImgList&&FeatureItem.dataObj.ImgList.length>0" :w="697"
:ref="'viewSpotVds_' + (FeatureItem * 4 + 1) + '_'+index" tabindex="0" :resizable="false" :active="false" :h="930" :ref="'viewSpotVds_' + (FeatureItem * 4 + 1) + '_'+index" tabindex="0" :resizable="false"
:parent="false" axis="x" @activated="onActivated(FeatureItem * 4 + 1, index)" :active="false" :parent="false" axis="x" @activated="onActivated(FeatureItem * 4 + 1, index)"
:x="FeatureItem.dataObj.ImgList[0].x" :y="0" :z="2" @dragstop="onViewSpotDragstopY"> :x="FeatureItem.dataObj.ImgList[0].x" :y="0" :z="2" @dragstop="onViewSpotDragstopY">
<img :src="FeatureItem.dataObj.ImgList[0].url" <img :src="FeatureItem.dataObj.ImgList[0].url" :id="'viewSpotImg_' + (FeatureItem * 4 + 1) + '_'+index" />
:id="'viewSpotImg_' + (FeatureItem * 4 + 1) + '_'+index"/>
</VueDraggableResizable> </VueDraggableResizable>
</div> </div>
<div class="featureHome-left-two absolute z-index1" :style="{'background':TripColor}"> <div class="featureHome-left-two absolute z-index1" :style="{'background':TripColor}">
...@@ -160,7 +158,7 @@ ...@@ -160,7 +158,7 @@
newArr.push(blob); newArr.push(blob);
var fileName = `${that.uuid(10, 10)}.png`; var fileName = `${that.uuid(10, 10)}.png`;
var path = `/newFeature`; var path = `/newFeature`;
that.uploadSelfBlob(path, newArr, x => { that.uploadSelfBlob(path, newArr, '', x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath; let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2]; let i = e.target.id.split("_")[2];
that.FeatureItem.dataObj.ImgList[0].url = allPath that.FeatureItem.dataObj.ImgList[0].url = allPath
...@@ -211,8 +209,10 @@ ...@@ -211,8 +209,10 @@
} }
}; };
</script> </script>
<style> <style>
@import url("../../../../assets/css/UpgradedVersion.css"); @import url("../../../../assets/css/UpgradedVersion.css");
</style> </style>
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
newArr.push(blob); newArr.push(blob);
var fileName = `${that.uuid(10, 10)}.png`; var fileName = `${that.uuid(10, 10)}.png`;
var path = `/newFeature`; var path = `/newFeature`;
that.uploadSelfBlob(path, newArr, x => { that.uploadSelfBlob(path, newArr,'', x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath; let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2]; let i = e.target.id.split("_")[2];
if (that.StencilDrawing) { if (that.StencilDrawing) {
......
...@@ -337,7 +337,7 @@ ...@@ -337,7 +337,7 @@
newArr.push(blob); newArr.push(blob);
var fileName = `${that.uuid(10, 10)}.png`; var fileName = `${that.uuid(10, 10)}.png`;
var path = `/newFeature`; var path = `/newFeature`;
that.uploadSelfBlob(path, newArr, x => { that.uploadSelfBlob(path, newArr,'', x => {
let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath; let allPath = that.domainManager().ViittoFileUrl + x.data.FilePath;
let i = e.target.id.split("_")[2]; let i = e.target.id.split("_")[2];
if(that.ScenicArrayList.length>0){ if(that.ScenicArrayList.length>0){
......
...@@ -119,10 +119,10 @@ export default { ...@@ -119,10 +119,10 @@ export default {
let lxymallUrl = ''; //国内游api let lxymallUrl = ''; //国内游api
let crmUrl = ""; //crm API let crmUrl = ""; //crm API
let locationName = window.location.hostname; let locationName = window.location.hostname;
let ocrUrl="http://192.168.10.68:8888"; let ocrUrl = "http://192.168.10.68:8888";
// domainUrl = "http://192.168.10.238:8083"; // 刘东电脑 // domainUrl = "http://192.168.10.238:8083"; // 刘东电脑
// domainUrl = "http://192.168.10.226"; //春姐 // domainUrl = "http://192.168.10.226"; //春姐
domainUrl = "http://192.168.10.128"; //奎哥 domainUrl = "http://192.168.10.128"; //奎哥
// domainUrl = "http://reborn.oytour.com"; // domainUrl = "http://reborn.oytour.com";
let crmLocalFileStreamDownLoadUrl = ""; let crmLocalFileStreamDownLoadUrl = "";
...@@ -139,18 +139,18 @@ export default { ...@@ -139,18 +139,18 @@ export default {
mallUrl = "https://mallapi.oytour.com"; mallUrl = "https://mallapi.oytour.com";
lxymallUrl = "https://erpmallapi.oytour.com"; lxymallUrl = "https://erpmallapi.oytour.com";
crmUrl = "http://testcrm.oytour.com"; crmUrl = "http://testcrm.oytour.com";
ocrUrl="http://ocr.oytour.com"; ocrUrl = "http://ocr.oytour.com";
} else if (locationName.indexOf('oytour') !== -1) { } else if (locationName.indexOf('oytour') !== -1) {
domainUrl = "http://reborn.oytour.com"; domainUrl = "http://reborn.oytour.com";
mallUrl = "https://mallapi.oytour.com"; mallUrl = "https://mallapi.oytour.com";
lxymallUrl = "https://erpmallapi.oytour.com"; lxymallUrl = "https://erpmallapi.oytour.com";
crmUrl = "http://crm.oytour.com"; crmUrl = "http://crm.oytour.com";
ocrUrl="http://ocr.oytour.com"; ocrUrl = "http://ocr.oytour.com";
} }
var obj = { var obj = {
//主地址 //主地址
DomainUrl: domainUrl, DomainUrl: domainUrl,
ocrUrl:ocrUrl,//行程下载地址 ocrUrl: ocrUrl, //行程下载地址
//常用提交数据URL //常用提交数据URL
PostUrl: domainUrl + "/api/common/post", PostUrl: domainUrl + "/api/common/post",
//上传文件URL //上传文件URL
...@@ -287,8 +287,7 @@ export default { ...@@ -287,8 +287,7 @@ export default {
this.$router.push({ this.$router.push({
path: '/signname' path: '/signname'
}) })
} } else if (this.$route.path == "/clientConfirm") {
else if (this.$route.path == "/clientConfirm") {
let TCID = this.$route.query.TCID; let TCID = this.$route.query.TCID;
let orderID = this.$route.query.orderID; let orderID = this.$route.query.orderID;
let guestId = this.$route.query.guestId; let guestId = this.$route.query.guestId;
...@@ -300,8 +299,7 @@ export default { ...@@ -300,8 +299,7 @@ export default {
guestId: guestId, guestId: guestId,
} }
}) })
} } else if (this.$route.path == "/clientConfirmRB") {
else if (this.$route.path == "/clientConfirmRB") {
let TCID = this.$route.query.TCID; let TCID = this.$route.query.TCID;
let orderID = this.$route.query.orderID; let orderID = this.$route.query.orderID;
let guestId = this.$route.query.guestId; let guestId = this.$route.query.guestId;
...@@ -313,8 +311,7 @@ export default { ...@@ -313,8 +311,7 @@ export default {
guestId: guestId, guestId: guestId,
} }
}) })
} } else if (this.$route.path == "/TravelContractConfirm") {
else if (this.$route.path == "/TravelContractConfirm") {
let ContractId = this.$route.query.ContractId; let ContractId = this.$route.query.ContractId;
this.$router.push({ this.$router.push({
name: "TravelContractConfirm", name: "TravelContractConfirm",
...@@ -1061,10 +1058,14 @@ export default { ...@@ -1061,10 +1058,14 @@ export default {
}, faildCall) }, faildCall)
}, },
//Blob文件上传 //Blob文件上传
Vue.prototype.uploadSelfBlob = function (path, files, successCall) { Vue.prototype.uploadSelfBlob = function (path, files, paramsObj, successCall) {
console.log("paramsObj", paramsObj);
let that = this; let that = this;
var uploadUrl = that.domainManager().UploadUrl + "/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath=" + path; var uploadUrl = that.domainManager().UploadUrl + "/Upload/UploadBlob?fileType=1&fileLimit=5&&filePath=" + path;
var formData = new FormData(); var formData = new FormData();
if (paramsObj && paramsObj != '') {
formData.append("paramsObj", JSON.stringify(paramsObj));
}
formData.append("myfile", files[0]); formData.append("myfile", files[0]);
that.$http.post(uploadUrl, formData, { that.$http.post(uploadUrl, formData, {
'Content-Type': 'multipart/form-data' 'Content-Type': 'multipart/form-data'
...@@ -1073,6 +1074,7 @@ export default { ...@@ -1073,6 +1074,7 @@ export default {
successCall(res); successCall(res);
}) })
}, },
//path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包 //path 请按照"/模块名称/用户ID/自定义文件夹/" /谁搞错一次5块红包
//files 文件数组 //files 文件数组
//p 进度回调函数 //p 进度回调函数
...@@ -1722,20 +1724,20 @@ export default { ...@@ -1722,20 +1724,20 @@ export default {
// 多位小数点四舍五入 // 多位小数点四舍五入
Vue.prototype.RoundItUp = function (Money) { Vue.prototype.RoundItUp = function (Money) {
let FractionalPart = String(Money).split('.') let FractionalPart = String(Money).split('.')
if(FractionalPart&&FractionalPart[1]&&FractionalPart[1].length>2){ if (FractionalPart && FractionalPart[1] && FractionalPart[1].length > 2) {
return Money = (parseFloat(Money)).toFixed(2) //(parseFloat(Money.toFixed(3))+0.001).toFixed(2) return Money = (parseFloat(Money)).toFixed(2) //(parseFloat(Money.toFixed(3))+0.001).toFixed(2)
}else{ } else {
return Money = Math.round(Money * 100) / 100 return Money = Math.round(Money * 100) / 100
} }
} }
// 颜色转换rgb // 颜色转换rgb
Vue.prototype.hexToRgb = function (hexValue, opc) { Vue.prototype.hexToRgb = function (hexValue, opc) {
var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
var hex = hexValue.replace(rgx, function(m, r, g, b) { var hex = hexValue.replace(rgx, function (m, r, g, b) {
return r + r + g + g + b + b; return r + r + g + g + b + b;
}); });
var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
if(!rgb){ if (!rgb) {
return hexValue; return hexValue;
} }
var r = parseInt(rgb[1], 16); var r = parseInt(rgb[1], 16);
......
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