Browse Source

7.24

master
fengdong777 2 years ago
parent
commit
2dcf1ddb72
  1. 1
      warehousing-system/project_web_ui/package.json
  2. 27
      warehousing-system/project_web_ui/src/main.js
  3. 22
      warehousing-system/project_web_ui/src/views/component/initial_value/add/storeAdd.vue
  4. 55
      warehousing-system/project_web_ui/src/views/component/initial_value/add/storehouseAdd.vue
  5. 6
      warehousing-system/project_web_ui/src/views/component/initial_value/storehouse.vue
  6. 283
      warehousing-system/project_web_ui/src/views/component/pictureList/Map.vue
  7. 33
      warehousing-system/project_web_ui/src/views/component/pictureList/pictureParticulars.vue

1
warehousing-system/project_web_ui/package.json

@ -14,6 +14,7 @@
"test:ci": "npm run lint && npm run test:unit"
},
"dependencies": {
"@amap/amap-vue": "^2.0.13",
"axios": "^0.24.0",
"bpmn-js": "^9.2.2",
"core-js": "^2.6.12",

27
warehousing-system/project_web_ui/src/main.js

@ -17,7 +17,7 @@ import moment from 'moment'
import Print from '@/utils/print' // 引入附件的js文件
import request from '@/utils/request'
import { setDefaultOrgPath, setDefaultOrgPathName, setStorage } from './utils/auth.js'
import VueAMap from 'vue-amap'
import AmapVue from '@amap/amap-vue'
Vue.use(ElementUI)
@ -38,13 +38,24 @@ Vue.filter('dateFormat', function(dateStr, pattern = 'YYYY-MM-DD') {
})
Vue.use(Print) // 注册
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
key: 'ccda12d8bffc72e9f1a32c599323a876', // 此处的key,在高德开放平台申请
plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'], // 此处的插件按需添加
v: '1.4.4',
uiVersion: '1.0'
})
// Vue.use(VueAMap)
// VueAMap.initAMapApiLoader({
// key: 'ccda12d8bffc72e9f1a32c599323a876', // 此处的key,在高德开放平台申请
// plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'], // 此处的插件按需添加
// v: '1.4.4',
// uiVersion: '1.0'
// })
AmapVue.config.version = '2.0'; // 默认2.0,这里可以不修改
AmapVue.config.key = '815dbe1e7b48b7eb942d0f15776b3855';
AmapVue.config.plugins = [
'AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType',
'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.DistrictSearch', 'AMap.CircleMarker', 'AMap.Polyline'
];
Vue.use(AmapVue);
window._AMapSecurityConfig = {
securityJsCode:'81def3105f66d9b838900ee3fce498cd',
};
Vue.config.productionTip = false

22
warehousing-system/project_web_ui/src/views/component/initial_value/add/storeAdd.vue

@ -27,28 +27,6 @@
>
<div style="margin-left: 15px">基本信息</div>
</div>
<el-row>
<el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item">
<span slot="label">项目名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightbs_item">
<span>{{ temp.projectName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item">
<span slot="label">客户名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightbs_item">
<span>{{ temp.custerName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item">

55
warehousing-system/project_web_ui/src/views/component/initial_value/add/storehouseAdd.vue

@ -31,47 +31,6 @@
>
<div style="margin-left: 15px">仓库信息</div>
</div>
<el-row>
<el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item">
<span slot="label">项目名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightbs_item">
<el-select v-model="form.projectSid" placeholder="请选择" @change="changeLocationValue">
<el-option
v-for="(custName, i) in projectNames"
:key="i"
:label="custName.entryName"
:value="custName.sid"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item">
<span slot="label">客户名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightbs_item">
<el-select v-model="form.custerName" placeholder="请选择">
<el-option
v-for="(custName, i) in custList"
:key="i"
:label="custName.enterpriseName"
:value="custName.enterpriseName"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightbs">
<el-form-item class="trightbs_item"
@ -433,8 +392,6 @@ export default {
},
mounted() {
this.getMap();
this.getcustListList();
this.getprojectSid();
},
created() {},
watch: {
@ -537,18 +494,6 @@ export default {
}
this.hierarchys = true;
},
async getcustListList () {
const { data: result } = await this.$http.get('/v1/shstorehouse/fetchEntList')
if (result.code == 200){
this.custList = result.data
}
},
async getprojectSid () {
const { data: result } = await this.$http.get('/v1/shstorehouse/selectAllProject') //
if (result.code == 200){
this.projectNames = result.data
}
},
claerArrList(){
this.clearList()
this.imgList=[]

6
warehousing-system/project_web_ui/src/views/component/initial_value/storehouse.vue

@ -25,18 +25,16 @@
:index="indexMethod"
align="center"
/>
<el-table-column prop="custerName" label="客户名称" width="240" align="center">
</el-table-column>
<el-table-column prop="name" label="仓库名称" align="center">
</el-table-column>
<el-table-column
prop="simpleName"
label="仓库简称"
width="100"
width="200"
align="center"
>
</el-table-column>
<el-table-column prop="code" label="仓库编码" align="center">
<el-table-column prop="code" label="仓库编码" width="140" align="center">
</el-table-column>
<el-table-column
label="所属地(省 - 市 - 县)"

283
warehousing-system/project_web_ui/src/views/component/pictureList/Map.vue

@ -1,252 +1,75 @@
<template>
<div class="amap-page-container" style="width: 600px; height:300px;margin:30px 10%;">
<el-amap-search-box
class="search-box"
:search-option="searchOption"
:on-search-result="onSearchResult"
></el-amap-search-box>
<el-amap
ref="map"
:vid="workId"
:amap-manager="amapManager"
:center="center"
:zoom="zoom"
:plugin="plugin"
:events="events"
class="amap-demo"
<div class="coord-picker">
<div class="map-container">
<amap
cache-key="coord-picker-map"
mmap-style="amap://styles/whitesmoke"
async
:center.sync="center"
:zoom.sync="zoom"
is-hotspot
>
</el-amap>
<!-- <p>{{ address }}</p>
<p>{{ center }}</p> -->
<div class="footer">
<Input class="lineinput" v-model.number="lng" disabled></Input>
<Input class="lineinput" v-model.number="lat" disabled></Input>
<Input class="lineinput" v-model="address" disabled></Input>
</div>
<div class="drawer-footer">
<Button type="text" @click="cancel">{{ $t("cancel") }}</Button>
<Button type="primary" @click="findlocation">{{
$t("sure")
}}</Button>
<amap-marker v-if="position" :position.sync="position" draggable />
</amap>
</div>
</div>
</template>
<script>
import { AMapManager } from "vue-amap";
let amapManager = new AMapManager();
export default {
props:{
workId:String
},
data() {
const self = this;
return {
locData: {
longitude: "",
latitude: "",
address: "",
province:"",
city:"",
district:""
props: {
timeStamp: {
type: Number,
},
searchOption: {
city: "",//
citylimit: false, //
//city: "", citylimit: false, //
mapData: {
type: String,
},
lng: "",
lat: "",
address: "",
province:"",
city:"",
district:"",
marker: "",
amapManager,
zoom: 12,
center: [121.59996, 31.197646],
amapamapDemo:'amapamapDemo',
events: {
init: (o) => {
o.getCity((result) => {
// console.log(result);
// this.searchOption.city=result.city
});
},
moveend: () => {},
zoomchange: () => {},
click: (e) => {
// console.log(e.lnglat);
self.lng = e.lnglat.lng;
self.lat = e.lnglat.lat;
self.center = [self.lng, self.lat];
// console.log(e.lnglat, 1999);
let o = amapManager.getMap();
if (!self.marker) {
self.marker = new AMap.Marker({
position: e.lnglat,
});
self.marker.setMap(o);
}
self.marker.setPosition(e.lnglat);
let geocoder = new AMap.Geocoder({});
geocoder.getAddress(e.lnglat, function (status, result) {
if (status === "complete" && result.regeocode) {
self.address = result.regeocode.formattedAddress;
self.province=result.regeocode.addressComponent.province
self.city=result.regeocode.addressComponent.city
self.district=result.regeocode.addressComponent.district
if(self.city==""){
self.city=self.province
}
console.log('self',self.province,self.city,self.district);
// console.log(self.address, "999");
} else {
log.error("根据经纬度查询地址失败");
}
});
},
},
plugin: [
"ToolBar",
{
pName: "MapType",
defaultType: 0,
events: {
init(o) {
// console.log(o);
},
data() {
return {
center: null,
zoom: 10,
position: null,
};
},
watch: {
timeStamp() {
this.center = [115.479646, 35.234309];
this.zoom = 10;
this.position = null;
this.initMap();
},
],
plugin: [
{
pName: "Geolocation",
events: {
init(o) {
// o
o.getCurrentPosition((status, result) => {
// console.log(JSON.stringify(result));
if (result && result.position) {
self.lng = result.position.lng;
self.lat = result.position.lat;
self.address = result.formattedAddress;
self.center = [self.lng, self.lat];
// console.log(self.center, 99666);
let o = amapManager.getMap();
if (!self.marker) {
self.marker = new AMap.Marker({
position: self.center,
});
self.marker.setMap(o);
}
self.marker.setPosition(self.center);
}
});
mapData() {
this.initMap();
},
},
},
],
};
created() {
this.initMap();
},
methods: {
onSearchResult(pois) {
console.log('pois',pois);
if (pois.length > 0) {
let { lng, lat, name ,location} = pois[0];
this.searchName=pois[0].name
let center = [lng, lat];
this.lng = lng;
this.lat = lat;
this.center = [lng, lat];
let o = amapManager.getMap();
if (!this.marker) {
this.marker = new AMap.Marker({
position: center,
});
this.marker.setMap(o);
}
this.marker.setPosition(center);
//
let geocoder = new AMap.Geocoder({});
let that = this
geocoder.getAddress(location, function(status, result) {
console.log(status, result)
if (status === "complete" && result.regeocode) {
that.address = result.regeocode.formattedAddress;
that.province=result.regeocode.addressComponent.province
that.city=result.regeocode.addressComponent.city
that.district=result.regeocode.addressComponent.district
if(that.city==""){
that.city=that.province
}
console.log('that',that.province,that.city,that.district);
} else {
console.log("根据经纬度查询地址失败");
//
async initMap() {
if (!this.mapData) {
return;
}
});
let mapPoi = this.mapData.split(",");
if (mapPoi.length < 2) {
this.center = [114.427999, 38.083779];
this.zoom = 10;
return;
}
this.center = mapPoi;
this.zoom = 14;
this.position = mapPoi;
},
//
cancel() {
this.lng = "";
this.lat = "";
this.address = "";
this.searchOption.city=""
// map.clearOverlays();
},
findlocation() {
// console.log('this.lng,this.lat,this.address',this.lng,this.lat,this.address);
this.locData.longitude=this.lng
this.locData.latitude=this.lat
this.locData.address=this.address
this.locData.province=this.province
this.locData.city=this.city
this.locData.district=this.district
this.$emit("findlocdata", this.locData);
this.lng = "";
this.lat = "";
this.address = "";
this.searchOption.city=""
// map.clearOverlays();
},
};
</script>
},
};
</script>
<style scoped>
/deep/ element.style{
font-size: none !important;
}
/deep/.amap-copyright {
display: none !important;
}
/deep/.amap-logo {
display: none!important;
}
.search-box {
position: absolute;
top: 25px;
left: 20px;
}
.amap-page-container {
position: relative;
/* margin-bottom: 20px; */
}
.footer {
margin-top: 10px;
text-align: center;
width: 600px;
}
.drawer-footer {
margin-top: 10px;
text-align: right;
position: relative;
border: 0;
}
.lineinput ivu-input-wrapper ivu-input-wrapper-default ivu-input-type-text ivu-input-wrapper-disabled{
width: 100%!important;
}
</style>
<style lang="scss" scoped>
.map-container {
width: 100%;
height: 500px;
}
</style>

33
warehousing-system/project_web_ui/src/views/component/pictureList/pictureParticulars.vue

@ -48,7 +48,7 @@
<div class="address">{{"\xa0\xa0\xa0"}}{{"\xa0\xa0\xa0"}}<span>{{ temp.address }}</span></div>
<div class="iconName">
<i class="el-icon-user"> {{ temp.linkerName }}</i>
<i style="margin-top: 2px;" class="el-icon-user"> {{ temp.linkerPhone }}</i>
<i style="margin-top: 2px;" class="el-icon-phone"> {{ temp.linkerPhone }}</i>
</div>
</div>
</div>
@ -80,6 +80,7 @@
<div class="span"/>
<h1>{{"\xa0\xa0\xa0"}}</h1>
</div>
<Map style="margin-top: 20px;" :timeStamp="Date.parse(new Date())" :mapData="mapInfo" />
</div>
</div>
</div>
@ -92,28 +93,48 @@
</template>
<script>
import Map from './Map.vue'
export default {
components: {
Map
},
data() {
return {
temp:{
sid:''
}
},
//
mapInfo: "",
//
showMapInfo: false,
jd:'',
wd:''
}
},
created() {
},
methods: {
showPicture(data) {
console.log(data);
this.temp=data
this.jd=data.lon
console.log(data.lon);
this.wd=data.lat
this.clickMapInfo(this.jd,this.wd)
},
handleReturn() {
this.$emit('reloadlist')
this.$emit('doback')
this.temp = {}
},
clickMapInfo(jd,wd) {
if (!jd) {
this.$message.error("请维护地址信息");
return;
}
this.mapInfo = jd + "," + wd;
this.showMapInfo = true;
},
},
}
@ -141,7 +162,7 @@
width: 600px;
height: 380px;
top: 40px;
left: 46%;
left: 560px;
.gongsi{
color: #717171;
}

Loading…
Cancel
Save