Commit 194ba08a authored by lihui's avatar lihui

feat:fix-little-problem

parent 3e365632
......@@ -114,7 +114,6 @@ import { ElMessage } from "element-plus";
import dayJs from "dayjs";
export default {
components: {},
props: {},
data() {
return {
......@@ -141,10 +140,6 @@ export default {
marketing_id: this.$route.query.marketing_id
})
]);
// let data = await ActivityService.checkActivityDetail({
// marketing_id: this.$route.query.marketing_id,
// marketing_type: this.$route.query.marketing_type
// });
this.pageLoading = false;
this.goodsList = dataArr[0].result.goods_list;
......
......@@ -281,7 +281,8 @@ export default {
handleEnd(val) {
this.storeQuery = {
marketing_id: val.activiteId,
online_status: 2 // 1 启用 2 关闭
online_status: 2, // 1 启用 2 关闭
end_time: dayJs().format("YYYY-MM-DD HH:mm:ss")
};
},
// 开始
......
<template>
<div id="map" class="mapContainer">
<!-- map -->
<div class="mapWrapper">
<div class="search">
<el-form-item label-position="left">
<el-button @click="handleSearch">搜索</el-button>
<el-input
class="dialog-input"
v-model="searchKey"
placeholder="请输入关键字"
autocomplete="on"
>
<template #suffix>
<i
@click="searchKey = ''"
class="el-input__icon el-icon-close"
></i>
</template>
</el-input>
</el-form-item>
<el-form ref="form" label-width="80px">
<el-form-item label-position="left">
<el-button @click="handleSearch">搜索</el-button>
<el-input
class="dialog-input"
v-model="searchKey"
placeholder="请输入关键字"
autocomplete="on"
>
<template #suffix>
<i
@click="searchKey = ''"
class="el-input__icon el-icon-close"
></i>
</template>
</el-input>
</el-form-item>
</el-form>
<div id="js-result" v-show="searchKey" class="result"></div>
</div>
<div id="js-container" class="myMap">
正在加载数据 ...
</div>
</div>
<!-- info -->
<div class="mapInfo">
<h3 class="title">拖拽选址</h3>
<ul class="info">
......@@ -35,6 +35,10 @@
<li><span>地址:</span>{{ dragData.address }}</li>
</ul>
</div>
<div class="confirmButton">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="confirm">确 定</el-button>
</div>
</div>
</template>
......@@ -44,6 +48,7 @@ export default {
name: "app",
data() {
return {
dialogVisible: true,
MapCityName: "北京",
searchKey: "",
dragData: {
......@@ -57,6 +62,15 @@ export default {
};
},
methods: {
// 取消
cancel() {
this.$emit("hideMapDialog", false);
},
// 确认
confirm() {
this.$emit("getMapInfo", this.dragData);
this.$emit("hideMapDialog", false);
},
// 搜索
handleSearch() {
if (this.searchKey) {
......@@ -76,7 +90,6 @@ export default {
// 初始化地图
initMap() {
let that = this;
// 加载PositionPicker,loadUI的路径参数为模块名中 'ui/' 之后的部分
let AMapUI = (this.AMapUI = window.AMapUI);
let AMap = (this.AMap = window.AMap);
......@@ -157,7 +170,6 @@ export default {
// 拖拽完成发送自定义 drag 事件
positionPicker.on("success", positionResult => {
this.dragMap(positionResult);
that.$emit("getMapInfo", this.dragData);
});
// 启动拖放
positionPicker.start();
......@@ -181,6 +193,15 @@ export default {
</script>
<style lang="less" scoped>
.mapDialog {
margin-top: 11vh !important;
display: flex !important;
flex-direction: column !important;
background: red !important;
/deep/ .el-dialog__body {
height: 90%;
}
}
.mapContainer {
height: 100%;
width: 100%;
......@@ -201,7 +222,7 @@ export default {
}
.myMap {
height: 100%;
height: 500px;
height: 100%;
}
}
.mapInfo {
......@@ -215,6 +236,11 @@ export default {
text-align: left;
}
}
.confirmButton {
position: absolute;
bottom: 100px;
right: 100px;
}
}
.m-map .search {
position: absolute;
......
......@@ -209,13 +209,11 @@
<!-- 地图 dialog -->
<el-dialog custom-class="mapDialog" v-model="mapDialogVisible" width="100%">
<my-map class="my-map" @getMapInfo="getMapInfo" />
<div class="confirmButton">
<el-button @click="mapDialogVisible = false"> </el-button>
<el-button type="primary" @click="mapDialogVisible = false"
> </el-button
>
</div>
<my-map
class="my-map"
@getMapInfo="getMapInfo"
@hideMapDialog="mapDialogVisible = false"
/>
</el-dialog>
</div>
</template>
......@@ -246,7 +244,6 @@ export default {
pickerOptions: {
disabledDateStart(time) {
let _now = Date.now();
// let three = 3 * 24 * 60 * 60 * 1000;
let threeDays = _now + 3 * 24 * 60 * 60 * 1000;
return time.getTime() < _now || time.getTime() > threeDays; //大于当前的禁止,小于3天前的禁止
},
......@@ -408,6 +405,7 @@ export default {
try {
this.pageLoading = true;
await ActivityService.addPlace(params);
await this.getPlaceList();
this.pageLoading = false;
} catch {
this.pageLoading = false;
......@@ -420,7 +418,7 @@ export default {
let result = data.map(item => {
return {
name: item.take_place_name,
location: item.province + item.city + item.area, // p + c + a
location: item.location, // p + c + a
address: item.address,
contactor: item.contact_name,
id: item.take_place_id
......@@ -570,17 +568,14 @@ export default {
justify-content: center;
align-items: center;
}
// mapDialog
.mapDialog {
height: 80%;
margin-top: 10vh !important;
.my-map {
height: 10%;
.el-dialog__body {
height: 85% !important;
}
.confirmButton {
position: absolute;
bottom: 100px;
right: 100px;
.my-map {
height: 100%;
}
}
</style>
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