地图页面 及页面加语言编译

This commit is contained in:
浅念
2025-03-19 15:39:21 +08:00
parent 1faedd2fd5
commit bfd28be350
9 changed files with 779 additions and 273 deletions
+53 -35
View File
@@ -1,95 +1,95 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" title="客户资料"></uni-nav-bar>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('navbar.customerinfo')"></uni-nav-bar>
<view class="content">
<view class="cell">
<view>渠道</view>
<view>{{$t('customer.CustomerChannel')}}</view>
<view class="right select" @click="showchannel = true">
<input placeholder="选择渠道" disabled v-model="channel_name" />
<input :placeholder="$t('customer.CustomerChannelinput')" disabled v-model="channel_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showchannel" @cancel="cancel('showchannel')" :columns="channelList" keyName="name" @confirm="channelChange"></u-picker>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>客户商机</view>
<view>{{$t('customer.Medal')}}</view>
<view class="right select" @click="showmagnitude = true">
<input placeholder="选择客户商机" disabled v-model="magnitude_name" />
<input :placeholder="$t('customer.Medalinput')" disabled v-model="magnitude_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showmagnitude" @cancel="cancel('showmagnitude')" :columns="magnitudeList" keyName="name" @confirm="magnitudeChange"></u-picker>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>客户名称 <text class="red">*</text></view>
<view>{{$t('customer.CustomerName')}} <text class="red">*</text></view>
<view class="right">
<input placeholder="输入名称" v-model="form.contacts" />
<input :placeholder="$t('customer.CustomerNameinput')" v-model="form.contacts" />
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>性别</view>
<view>{{$t('gender')}}</view>
<view class="right">
<u-radio-group v-model="form.sex">
<u-radio name="0">未知</u-radio>
<u-radio name="1">男</u-radio>
<u-radio name="2">女</u-radio>
<u-radio name="0">{{$t('gender0')}}</u-radio>
<u-radio name="1">{{$t('gender1')}}</u-radio>
<u-radio name="2">{{$t('gender2')}}</u-radio>
</u-radio-group>
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>联系方式 <text class="red">*</text></view>
<view>{{$t('mine.lxcall')}} <text class="red">*</text></view>
<view class="right">
<input placeholder="输入联系方式" v-model="form.phone" />
<input :placeholder="$t('mine.lxcallinputhd')" v-model="form.phone" />
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>Email</view>
<view class="right">
<input placeholder="输入Email" v-model="form.email" />
<input :placeholder="$t('customer.Emailinput')" v-model="form.email" />
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>WhatsApp</view>
<view class="right">
<input placeholder="输入WhatsApp" v-model="form.WhatsApp" />
<input :placeholder="$t('customer.WhatsAppinput')" v-model="form.WhatsApp" />
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>客户偏好</view>
<view>{{$t('customer.Customerph')}}</view>
<view class="right select" @click="showcartype = true">
<input placeholder="选择客户偏好" disabled v-model="car_type_name" />
<input :placeholder="$t('customer.Customerphinput')" disabled v-model="car_type_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showcartype" @cancel="cancel('showcartype')" :columns="carTypeList" keyName="name" @confirm="cartypesChange"></u-picker>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>客户分级</view>
<view>{{$t('customer.Cstomerfj')}}</view>
<view class="right select" @click="showgrade = true">
<input placeholder="选择客户分级" disabled v-model="grade_name" />
<input :placeholder="$t('customer.Cstomerfjinput')" disabled v-model="grade_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showgrade" @cancel="cancel('showgrade')" :columns="getGradeList" keyName="name" @confirm="gradeHandler"></u-picker>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>国家</view>
<view>{{$t('customer.Country')}}</view>
<view class="right select" @click="showarea = true">
<input placeholder="选择国家" disabled v-model="country_name" />
<input :placeholder="$t('customer.Cstomerfjinput')" disabled v-model="country_name" />
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showarea" @cancel="cancel('showarea')" :columns="areaList" keyName="name" @confirm="areaChange"></u-picker>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
<u-line></u-line>
<view class="cell">
<view>公司</view>
<view class="right select" @click="showmap = true">
<input placeholder="去定位" type="text" disabled v-model="form.address"/>
<view>{{$t('customer.Company')}}</view>
<view class="right select" @click="gomap">
<input :placeholder="$t('customer.Companyinput')" type="text" disabled v-model="form.address"/>
<u-icon class="arrowright" name="arrow-right" size="18" color="#747474"></u-icon>
</view>
</view>
@@ -102,29 +102,28 @@
</view> -->
<u-line></u-line>
<view class="cell1">
<view>备注(非必填)</view>
<view>{{$t('customer.Remarks')}}</view>
<view class="">
<textarea auto-height v-model="form.describe" placeholder="请输入备注内容~"/>
<textarea auto-height v-model="form.describe" :placeholder="$t('customer.Remarksinputhd')"/>
</view>
</view>
<u-gap height="100" bgColor="#fff"></u-gap>
</view>
<view class="foot">
<button class="btn" @click="saveFn">提交</button>
<button class="btn" @click="saveFn">{{$t('submit')}}</button>
</view>
<u-popup :show="showmap" :round="10" mode="bottom" @close="mapclose">
<!-- <u-popup :show="showmap" :round="10" mode="bottom" @close="mapclose" width="90%" height="70%">
<view class="mapcont">
<view class="header">
<view class="cancel" @click="mapclose">取消</view>
<view class="title">地图位置</view>
<view class="confirm" @click="mapconfirm">确定</view>
</view>
<view class="map">
<view class="map" id="map">
</view>
</view>
</u-popup>
</u-popup> -->
@@ -135,6 +134,7 @@
export default {
data() {
return {
mapUrl: '',
showmap: false,
showmagnitude: false,
showgrade: false,
@@ -163,7 +163,10 @@
channel_id:'',
magnitude:'',
address:'',
}
lat:'',
lng:'',
},
location:{}
}
},
onLoad() {
@@ -173,10 +176,28 @@
this.carType()
this.area()
},
onShow() {
console.log(uni.getStorageSync('location'))
if(uni.getStorageSync('location')){
this.location = JSON.parse(uni.getStorageSync('location'))
this.form.address = this.location.address
this.form.lng = this.location.lng
this.form.lat = this.location.lat
console.log(this.location)
}
},
mounted() {
// this.initMap();
},
methods: {
leftClick(){
uni.navigateBack({})
},
gomap(){
uni.navigateTo({
url: '/pages/customer/map'
});
},
mapclose(){
this.showmap = false
},
@@ -312,9 +333,6 @@
padding: 15px;
border-radius: 10px;
}
.u-divider{
margin: 0px 0px !important;
}
.uniui-right{
position: absolute;
top: 2px;