Commit 217fd530 by wuwx

修复第一轮bug

1 parent 33e1da85
...@@ -6,14 +6,18 @@ ...@@ -6,14 +6,18 @@
</el-select> </el-select>
</div> </div>
<div class="map-address"> <div class="map-address">
<img class="icon-map" src="./images/icon-map.png" /> <div v-if="addressFlag">
<img class="icon-map" src="./images/icon-map.png" v-show="address" />
{{ address }} {{ address }}
<!-- <el-input </div>
placeholder="请输入内容" <div v-else>
v-model="inputAddress" <el-input v-model="address" placeholder="请输入活动地址" clearable></el-input>
@change="geoCode" </div>
clearable> <div class="address-config" v-show="addressFlag" @click="addressFlag = false">配置</div>
</el-input> --> <div class="address-config" v-show="!addressFlag">
<span @click="geoCode">保存</span>
<span @click="addressFlag = true">取消</span>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -38,7 +42,7 @@ export default { ...@@ -38,7 +42,7 @@ export default {
adrList: [], adrList: [],
lnglat: [], lnglat: [],
geocoderAddress: {}, geocoderAddress: {},
inputAddress: '' addressFlag: true
} }
}, },
mounted() { mounted() {
...@@ -138,16 +142,16 @@ export default { ...@@ -138,16 +142,16 @@ export default {
}, },
// 输入地址获取得到经纬度 // 输入地址获取得到经纬度
geoCode() { geoCode() {
this.addressFlag = true
var geocoder = new AMap.Geocoder({ var geocoder = new AMap.Geocoder({
city: "" city: ""
}) })
var address = this.inputAddress var address = this.address
let _this = this let _this = this
geocoder.getLocation(address, function(status, result) { geocoder.getLocation(address, function(status, result) {
if (status === 'complete' && result.geocodes.length) { if (status === 'complete' && result.geocodes.length) {
var lnglat = result.geocodes[0].location var lnglat = result.geocodes[0].location
console.log('lnglat',lnglat) _this.getAddress(lnglat)
_this.addMarker(lnglat)
} else { } else {
console.log('根据地址查询位置失败') console.log('根据地址查询位置失败')
} }
...@@ -216,7 +220,7 @@ export default { ...@@ -216,7 +220,7 @@ export default {
width: 280px; width: 280px;
} }
.map-address { .map-address {
display: flex; // display: flex;
box-sizing: border-box; box-sizing: border-box;
width: 284px; width: 284px;
height: 100%; height: 100%;
...@@ -227,7 +231,20 @@ export default { ...@@ -227,7 +231,20 @@ export default {
.icon-map { .icon-map {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-right: 6px; }
}
.address-config {
font-size: 14px;
color: #5850ff;
letter-spacing: 0;
line-height: 14px;
font-weight: 400;
cursor: pointer;
span {
&:last-child {
color: #666;
margin-left: 10px;
}
} }
} }
</style> </style>
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
<div> <div>
<span class="share-txt">H5短链接:</span> <span class="share-txt">H5短链接:</span>
<span class="copy" @click="handleSaveTxt(shareForm.linkUrl)">复制</span> <span class="copy" @click="handleSaveTxt(shareForm.linkUrl)">复制</span>
<span class="copy" style="margin-left: 10px;width: 75px;" @click="handleSaveTxt(shareForm.originallinkUrl)">复制长链接</span>
</div> </div>
<p class="link" style="margin-bottom: 16px;">{{ shareForm.linkUrl }}</p> <p class="link" style="margin-bottom: 16px;">{{ shareForm.linkUrl }}</p>
<div> <div>
......
...@@ -1666,6 +1666,21 @@ export default { ...@@ -1666,6 +1666,21 @@ export default {
}, },
'editForm.activityActionReport.noteTouchConversionRate'(newValue, oldValue) { 'editForm.activityActionReport.noteTouchConversionRate'(newValue, oldValue) {
this.editForm.activityActionReport.noteTouchConversionRate = limitPrice(newValue, oldValue, 99999, 2, 0) this.editForm.activityActionReport.noteTouchConversionRate = limitPrice(newValue, oldValue, 99999, 2, 0)
},
'editForm.activityActionReport.noteTouchCustomerCount'(newValue, oldValue) {
this.editForm.activityActionReport.noteTouchCustomerCount = limitPrice(newValue, oldValue, 99999, 0)
},
'editForm.activityActionReport.noteTouchVisitorCount'(newValue, oldValue) {
this.editForm.activityActionReport.noteTouchVisitorCount = limitPrice(newValue, oldValue, 99999, 0)
},
'editForm.activityActionReport.signMerchantVisitorCount'(newValue, oldValue) {
this.editForm.activityActionReport.signMerchantVisitorCount = limitPrice(newValue, oldValue, 99999, 0)
},
'editForm.activityActionReport.signMerchantShareCount'(newValue, oldValue) {
this.editForm.activityActionReport.signMerchantShareCount = limitPrice(newValue, oldValue, 99999, 0)
},
'editForm.activityActionReport.signMerchantBrowseCount'(newValue, oldValue) {
this.editForm.activityActionReport.signMerchantBrowseCount = limitPrice(newValue, oldValue, 99999, 0)
} }
}, },
...@@ -2165,10 +2180,31 @@ export default { ...@@ -2165,10 +2180,31 @@ export default {
let resetArr = [{ name: 'id' }, { name: 'activityTime', type: 'array' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }, { name: 'selectedProInfo', type: 'Object' }, { name: 'goodsId' }, { name: 'activityPrice' }, { name: 'goodsStock' }] let resetArr = [{ name: 'id' }, { name: 'activityTime', type: 'array' }, { name: 'liveBroadcastRoomId' }, { name: 'groupQrCode' }, { name: 'floatingMaskDiagram' }, { name: 'selectedProInfo', type: 'Object' }, { name: 'goodsId' }, { name: 'activityPrice' }, { name: 'goodsStock' }]
this.copyReset(resetArr) this.copyReset(resetArr)
} }
// 兼容以前众筹活动没有战报内容配置,展示页面
if (this.editForm.activityActionReport == null) {
this.editForm.activityActionReport = {
produceReportSummary: '',
customerAssetSummary: '',
touchPassageSummary: '',
signMerchantShareCount: '',
signMerchantBrowseCount: '',
signMerchantVisitorCount: '',
signMerchantOrderCount: '',
signMerchantProduceCount: '',
noteTouchCustomerCount: '',
noteTouchVisitorCount: '',
noteTouchOrderCount: '',
noteTouchConversionRate: ''
}
}
// 标杆门店总产值/元(已结束战报) // 标杆门店总产值/元(已结束战报)
if (this.editForm.activityActionReport.signMerchantProduceCount) {
this.editForm.activityActionReport.signMerchantProduceCount = (info.activityActionReport.signMerchantProduceCount / 10000).toFixed(2) this.editForm.activityActionReport.signMerchantProduceCount = (info.activityActionReport.signMerchantProduceCount / 10000).toFixed(2)
}
// 转化率(已结束战报) // 转化率(已结束战报)
if (this.editForm.activityActionReport.noteTouchConversionRate) {
this.editForm.activityActionReport.noteTouchConversionRate = (info.activityActionReport.noteTouchConversionRate / 100).toFixed(2) this.editForm.activityActionReport.noteTouchConversionRate = (info.activityActionReport.noteTouchConversionRate / 100).toFixed(2)
}
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
...@@ -2258,9 +2294,37 @@ export default { ...@@ -2258,9 +2294,37 @@ export default {
param.floatingMaskDiagram = '' param.floatingMaskDiagram = ''
} }
// 标杆门店总产值/元(已结束战报) // 标杆门店总产值/元(已结束战报)
if (param.activityActionReport.signMerchantProduceCount) {
param.activityActionReport.signMerchantProduceCount = (this.editForm.activityActionReport.signMerchantProduceCount * 10000).toFixed(0) param.activityActionReport.signMerchantProduceCount = (this.editForm.activityActionReport.signMerchantProduceCount * 10000).toFixed(0)
}
// 转化率(已结束战报) // 转化率(已结束战报)
if (param.activityActionReport.noteTouchConversionRate) {
param.activityActionReport.noteTouchConversionRate = (this.editForm.activityActionReport.noteTouchConversionRate * 100).toFixed(0) param.activityActionReport.noteTouchConversionRate = (this.editForm.activityActionReport.noteTouchConversionRate * 100).toFixed(0)
}
// 判断目标客户数与访客数
if (param.activityActionReport.noteTouchCustomerCount && param.activityActionReport.noteTouchVisitorCount) {
if (param.activityActionReport.noteTouchCustomerCount < param.activityActionReport.noteTouchVisitorCount) {
this.loading = false
this.$message({
message: '目标客户数应大于等于访客数',
type: 'error',
customClass: 'message-Z-zinde'
})
return
}
}
// 判断访客数与浏览数
if (param.activityActionReport.signMerchantVisitorCount && param.activityActionReport.signMerchantBrowseCount) {
if (param.activityActionReport.signMerchantBrowseCount < param.activityActionReport.signMerchantVisitorCount) {
this.loading = false
this.$message({
message: '浏览数应大于等于访客数',
type: 'error',
customClass: 'message-Z-zinde'
})
return
}
}
delete param.liveFlag delete param.liveFlag
return param return param
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!