Browse Source

Merge remote-tracking branch 'origin/feature/dev_point_manage' into feature/dev_point_manage

# Conflicts:
#	src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
master
wanggongfeng 3 years ago
parent
commit
277b33945e
  1. 36
      src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue
  2. 29
      src/views/modules/plugins/point/icpointnucleicmonitoring.vue
  3. 38
      src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue
  4. 54
      src/views/modules/plugins/point/icpointvaccinesinoculation.vue

36
src/views/modules/plugins/point/icpointnucleicmonitoring-add-or-update.vue

@ -148,8 +148,8 @@ export default {
serveTime: "", serveTime: "",
mobile: "", mobile: "",
address: "", address: "",
longitude: "120.38945519", longitude: '',
latitude: "36.0722275", latitude: '',
}, },
keyWords: null, keyWords: null,
organizationList: [], organizationList: [],
@ -247,12 +247,14 @@ export default {
}, },
// init // init
initMap() { initMap() {
let { latitude, longitude } = this.dataForm;
// //
let _this = this; if (!latitude || latitude == "" || latitude == "0") {
var center = new window.TMap.LatLng( latitude = 39.9088810666821;
_this.dataForm.latitude, longitude = 116.39743841556731;
_this.dataForm.longitude }
); console.log(latitude,longitude);
var center = new window.TMap.LatLng(latitude, longitude);
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_add"), { map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, // center: center, //
@ -297,7 +299,6 @@ export default {
// //
search search
.searchRectangle({ .searchRectangle({
// keyword: this.keyWords,
keyword: this.dataForm.address, keyword: this.dataForm.address,
bounds: map.getBounds(), bounds: map.getBounds(),
}) })
@ -307,6 +308,7 @@ export default {
const { const {
location: { lat, lng }, location: { lat, lng },
} = data[0]; } = data[0];
map.setCenter(new TMap.LatLng(lat, lng)); map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng); this.setMarker(lat, lng);
this.dataForm.latitude = lat; this.dataForm.latitude = lat;
@ -340,8 +342,14 @@ export default {
geocoder geocoder
.getAddress({ location: location }) // .getAddress({ location: location }) //
.then((result) => { .then((result) => {
this.dataForm.address = result.result.address; this.dataForm.address =
this.dataForm.address !== "" &&
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
? this.dataForm.address
: result.result.address;
// //
console.log(this.dataForm.address);
}); });
}, },
@ -363,7 +371,7 @@ export default {
this.$http this.$http
.post(`/gov/org/agency/communityListByCustomerId`) .post(`/gov/org/agency/communityListByCustomerId`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (tMapres.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} }
this.organizationList = res.data; this.organizationList = res.data;
@ -376,8 +384,7 @@ export default {
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo(); this.getInfo();
} else { } else {
this.dataForm.longitude = "120.38945519";
this.dataForm.latitude = "36.0722275";
this.initMap(); this.initMap();
} }
}); });
@ -395,11 +402,6 @@ export default {
...this.dataForm, ...this.dataForm,
...res.data, ...res.data,
}; };
if (!this.dataForm.longitude && !this.dataForm.latitude) {
this.dataForm.longitude = "120.38945519";
this.dataForm.latitude = "36.0722275";
}
this.initMap(); this.initMap();
}) })
.catch(() => {}); .catch(() => {});

29
src/views/modules/plugins/point/icpointnucleicmonitoring.vue

@ -112,13 +112,12 @@
v-loading="dataListLoading" v-loading="dataListLoading"
:data="dataList" :data="dataList"
border border
@selection-change="dataListSelectionChangeHandle" style="width: 100%; height: 564px"
style="width: 100%;height:564px;" ><el-table-column
> label="序号"
<el-table-column
type="selection"
header-align="center" header-align="center"
align="center" align="center"
type="index"
width="50" width="50"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
@ -181,16 +180,14 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination @size-change="pageSizeChangeHandle"
:current-page="page" @current-change="pageCurrentChangeHandle"
:page-sizes="[10, 20, 50, 100]" :current-page.sync="pageNo"
:page-size="limit" :page-sizes="[20, 50, 100, 200]"
:total="total" :page-size="limit"
layout="total, sizes, prev, pager, next, jumper" layout="sizes, prev, pager, next, total"
@size-change="pageSizeChangeHandle" :total="total">
@current-change="pageCurrentChangeHandle" </el-pagination>
>
</el-pagination>
</div> </div>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<el-dialog <el-dialog
@ -509,7 +506,7 @@ export default {
border-radius: 5px; border-radius: 5px;
padding: 10px; padding: 10px;
} }
.dialog-h >>> .el-dialog__body{ .dialog-h >>> .el-dialog__body {
overflow: scroll; overflow: scroll;
} }
</style> </style>

38
src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue

@ -123,7 +123,7 @@
>查询</el-button >查询</el-button
> --> > -->
<div <div
id="map_app" id="map_add"
class="div_map" class="div_map"
style="width: 500px; height: 300px; margin-top: 20px" style="width: 500px; height: 300px; margin-top: 20px"
></div> ></div>
@ -188,8 +188,8 @@ export default {
noAvailableVaccines: '1', noAvailableVaccines: '1',
mobile: "", mobile: "",
address: "", address: "",
longitude: "120.38945519", longitude: "",
latitude: "36.0722275", latitude: "",
}, },
keyWords: null, keyWords: null,
// organizationList: [], // organizationList: [],
@ -333,14 +333,16 @@ export default {
}, },
// init // init
initMap() { initMap() {
let { latitude, longitude } = this.dataForm;
// //
let _this = this; if (!latitude || latitude == "" || latitude == "0") {
var center = new window.TMap.LatLng( latitude = 39.9088810666821;
_this.dataForm.latitude, longitude = 116.39743841556731;
_this.dataForm.longitude }
); console.log(latitude,longitude);
var center = new window.TMap.LatLng(latitude, longitude);
// map TMap.Map() // map TMap.Map()
map = new window.TMap.Map(document.getElementById("map_app"), { map = new window.TMap.Map(document.getElementById("map_add"), {
center: center, // center: center, //
zoom: 17.2, // zoom: 17.2, //
pitch: 43.5, // pitch: 43.5, //
@ -353,12 +355,14 @@ export default {
geometries: [], geometries: [],
}); });
infoWindowList = Array(10); infoWindowList = Array(10);
geocoder = new TMap.service.Geocoder(); // geocoder = new TMap.service.Geocoder(); //
// //
map.on("panend", () => { map.on("panend", () => {
this.handleMoveCenter(); this.handleMoveCenter();
}); });
this.handleMoveCenter(); // this.handleMoveCenter()
this.convert(); this.convert();
}, },
handleMoveCenter() { handleMoveCenter() {
@ -381,7 +385,6 @@ export default {
// //
search search
.searchRectangle({ .searchRectangle({
// keyword: this.keyWords,
keyword: this.dataForm.address, keyword: this.dataForm.address,
bounds: map.getBounds(), bounds: map.getBounds(),
}) })
@ -391,6 +394,7 @@ export default {
const { const {
location: { lat, lng }, location: { lat, lng },
} = data[0]; } = data[0];
map.setCenter(new TMap.LatLng(lat, lng)); map.setCenter(new TMap.LatLng(lat, lng));
this.setMarker(lat, lng); this.setMarker(lat, lng);
this.dataForm.latitude = lat; this.dataForm.latitude = lat;
@ -424,8 +428,14 @@ export default {
geocoder geocoder
.getAddress({ location: location }) // .getAddress({ location: location }) //
.then((result) => { .then((result) => {
this.dataForm.address = result.result.address; this.dataForm.address =
this.dataForm.address !== "" &&
this.dataForm.address !== null &&
(this.dataForm.longitude === "" || this.dataForm.longitude === null)
? this.dataForm.address
: result.result.address;
// //
console.log(this.dataForm.address);
}); });
}, },
@ -461,8 +471,6 @@ export default {
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo(); this.getInfo();
} else { } else {
this.dataForm.longitude = "120.38945519";
this.dataForm.latitude = "36.0722275";
this.initMap(); this.initMap();
} }
}); });
@ -479,6 +487,8 @@ export default {
...this.dataForm, ...this.dataForm,
...res.data, ...res.data,
}; };
this.morningTime = [res.data.moStartTime,res.data.moEndTime]
this.afterTime = [res.data.afStartTime,res.data.afEndTime]
if(res.data.moStartTime !== ''){ if(res.data.moStartTime !== ''){
this.morningTime = [res.data.moStartTime,res.data.moEndTime] this.morningTime = [res.data.moStartTime,res.data.moEndTime]
this.afterTime = [res.data.afStartTime,res.data.afEndTime] this.afterTime = [res.data.afStartTime,res.data.afEndTime]

54
src/views/modules/plugins/point/icpointvaccinesinoculation.vue

@ -102,13 +102,13 @@
v-loading="dataListLoading" v-loading="dataListLoading"
:data="dataList" :data="dataList"
border border
@selection-change="dataListSelectionChangeHandle" style="width: 100%; height: 564px"
style="width: 100%;height:564px;"
> >
<el-table-column <el-table-column
type="selection" label="序号"
header-align="center" header-align="center"
align="center" align="center"
type="index"
width="50" width="50"
></el-table-column> ></el-table-column>
<!--<el-table-column--> <!--<el-table-column-->
@ -130,29 +130,23 @@
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="moStartTime" label="接种上午时间"
label="接种上午开始时间"
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> >
<el-table-column <template slot-scope="scope">
prop="moEndTime" <div>{{ scope.row.moStartTime }} - {{ scope.row.moEndTime }}</div>
label="接种上午结束时间" </template>
header-align="center" </el-table-column>
align="center"
></el-table-column>
<el-table-column <el-table-column
prop="afStartTime"
label="接种下午开始时间" label="接种下午开始时间"
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> >
<el-table-column <template slot-scope="scope">
prop="afEndTime" <div>{{ scope.row.afStartTime }} - {{ scope.row.afEndTime }}</div>
label="接种下午结束时间" </template>
header-align="center" </el-table-column>
align="center"
></el-table-column>
<el-table-column <el-table-column
prop="noAvailableVaccines" prop="noAvailableVaccines"
label="暂无疫苗" label="暂无疫苗"
@ -201,16 +195,14 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination @size-change="pageSizeChangeHandle"
:current-page="page" @current-change="pageCurrentChangeHandle"
:page-sizes="[10, 20, 50, 100]" :current-page.sync="pageNo"
:page-size="limit" :page-sizes="[20, 50, 100, 200]"
:total="total" :page-size="limit"
layout="total, sizes, prev, pager, next, jumper" layout="sizes, prev, pager, next, total"
@size-change="pageSizeChangeHandle" :total="total">
@current-change="pageCurrentChangeHandle" </el-pagination>
>
</el-pagination>
</div> </div>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<el-dialog <el-dialog
@ -493,7 +485,7 @@ export default {
border-radius: 5px; border-radius: 5px;
padding: 10px; padding: 10px;
} }
.dialog-h{ .dialog-h {
overflow: scroll; overflow: scroll;
} }
</style> </style>

Loading…
Cancel
Save