瀏覽代碼

reactor:地图选点优化;

zhangchong 1 年之前
父節點
當前提交
1437e61e50

+ 4 - 2
src/layout/lockScreen/index.vue

@@ -34,6 +34,7 @@
 								ref="layoutLockScreenInputRef"
 								v-model="state.lockScreenPassword"
 								@keyup.enter.native.stop="onLockScreenSubmit()"
+                clearable
 							>
 								<template #append>
 									<el-button @click="onLockScreenSubmit">
@@ -225,7 +226,7 @@ onUnmounted(() => {
 }
 
 .layout-lock-screen-filter {
-	filter: blur(1px);
+	filter: blur(3px);
 }
 
 .layout-lock-screen-mask {
@@ -236,7 +237,8 @@ onUnmounted(() => {
 
 .layout-lock-screen-img {
 	@extend .layout-lock-screen-fixed;
-	background-image: url(https://i.hd-r.cn/e4a19d84364f185266666765ac21a5db.jpg);
+	//background-image: url(https://i.hd-r.cn/e4a19d84364f185266666765ac21a5db.jpg);
+  background-image: url(/@/assets/images/login/bg.png);
 	background-size: 100% 100%;
 	z-index: 99;
 }

+ 13 - 5
src/layout/navBars/breadcrumb/user.vue

@@ -21,20 +21,20 @@
 		<div class="layout-navbars-breadcrumb-user-icon mr10" @click="onLayoutSetingClick" title="布局配置">
 			<i class="icon-skin iconfont"></i>
 		</div>-->
-		 <div class="layout-navbars-breadcrumb-user-icon mr10">
+		 <div class="layout-navbars-breadcrumb-user-icon mr10" title="消息">
 			<el-popover placement="bottom" trigger="click" transition="el-zoom-in-top" :width="300" :persistent="false">
 				<template #reference>
-					<el-badge :value="12">
-            <SvgIcon name="ele-Bell" title="消息" size="18px"/>
+					<el-badge :value="messageCount" :max="99" :hidden="messageHidden">
+            <SvgIcon name="ele-Bell" size="18px"/>
 					</el-badge>
 				</template>
 				<template #default>
-					<UserNews />
+					<UserNews @onAllReadClick="onAllReadClick"/>
 				</template>
 			</el-popover>
 		</div>
 		 <div class="layout-navbars-breadcrumb-user-icon mr10" @click="onLockScreen" title="锁屏">
-       <SvgIcon name="ele-Lock" title="锁屏" size="18px"/>
+       <SvgIcon name="ele-Lock" size="18px"/>
 		</div>
 <!--		<div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick" :title="isScreenfull ? '关全屏' : '开全屏'" >
 			<i class="iconfont" :class="!isScreenfull ? 'icon-quanping1' : 'icon-tuichuquanping'"></i>
@@ -192,6 +192,14 @@ const state = reactive({
 		pwd: '', // 锁频密码
 	},
 });
+const messageCount = ref<number>(2);//消息数量
+const messageHidden = computed(() => { //消息是否隐藏
+  return messageCount.value === 0;
+});
+// 全部已读点击
+const onAllReadClick = () => {
+  messageCount.value = 0;
+};
 //  检查密码强度
 let modes = ref<number>(0);
 const checkPassword = (rule: any, value: string, callback: any) => {

+ 2 - 1
src/layout/navBars/breadcrumb/userNews.vue

@@ -22,7 +22,7 @@
 
 <script setup lang="ts" name="layoutBreadcrumbUserNews">
 import { reactive } from 'vue';
-
+const emit = defineEmits(['onAllReadClick']);
 const state = reactive({
 	newsList: [
 		{
@@ -40,6 +40,7 @@ const state = reactive({
 // 全部已读点击
 const onAllReadClick = () => {
 	state.newsList = [];
+  emit('onAllReadClick');
 };
 // 前往通知中心点击
 const onGoToGiteeClick = () => {

+ 2 - 2
src/views/business/order/accept/index.vue

@@ -695,7 +695,7 @@ const selectLocation = ()=>{
     longitude: state.ruleForm.longitude,
     latitude: state.ruleForm.latitude,
     adcode: state.ruleForm.areaCode,
-    street: state.ruleForm.street
+    formattedAddress: state.ruleForm.street
   }
   mapDialogRef.value.openDialog(location);
 }
@@ -705,7 +705,7 @@ const selectMap = (location:any)=>{
     state.ruleForm.longitude = location.longitude;
     state.ruleForm.latitude = location.latitude;
     state.ruleForm.areaCode = location.adcode;
-    state.ruleForm.street = location.street;
+    state.ruleForm.street = location.formattedAddress;
 }
 const ExpandFormRef = ref<RefType>();
 // 打开拓展表单

+ 21 - 21
src/views/business/order/components/amap-select.vue

@@ -9,7 +9,7 @@
 				clearable
 				placeholder="输入城市+关键字搜索"
 				@select="handleSelect"
-				style="width: 300px"
+				style="width: 400px"
 			/>
 			<el-input v-model="location.longitude" placeholder="点击地图选择经度" maxlength="15" readonly style="width: 150px; margin: 0 5px"></el-input>
 			<el-input v-model="location.latitude" placeholder="点击地图选择纬度" maxlength="15" readonly style="width: 150px"></el-input>
@@ -19,7 +19,7 @@
 
 <script setup>
 import AMapLoader from '@amap/amap-jsapi-loader';
-import {computed, onMounted, ref, shallowRef, watch} from 'vue';
+import { onMounted, ref, shallowRef, watch } from 'vue';
 window._AMapSecurityConfig = {
 	securityJsCode: import.meta.env.VITE_AMAP_SECURITYJSCODE,
 };
@@ -59,6 +59,7 @@ const initMap = () => {
 		map.value = new AMap.Map('map-container');
 		// 添加点击事件
 		map.value.on('click', onMapClick);
+
 		if (location.value.longitude) {
 			drawMarker();
 		}
@@ -117,38 +118,37 @@ const onMapClick = (e) => {
 	geocoder.getAddress([lng, lat], (status, result) => {
 		if (status === 'complete' && result.info === 'OK') {
 			const { addressComponent, formattedAddress } = result.regeocode;
-      let { city, province, district,township,adcode } = addressComponent;
-      if (!city) {
-        // 直辖市
-        city = province;
-      }
-      const allAddress = province+city+district+township;
-      const street = formattedAddress.substring(allAddress.length);
+			let { city, province, district, township, adcode } = addressComponent;
+			if (!city) {
+				// 直辖市
+				city = province;
+			}
 			location.value = {
 				longitude: lng,
 				latitude: lat,
-        formattedAddress,
-        street,
-				zone: [province, city, district,township],
-        adcode
+				formattedAddress,
+				zone: [province, city, district, township],
+				adcode,
 			};
-      emit('update:modelValue', location.value);
+			keyword.value = formattedAddress;
+			emit('update:modelValue', location.value);
 		}
 	});
 };
 // 点击搜索项
 const handleSelect = (item) => {
-	const { pname, cityname, adname, address, name } = item;
+	console.log(item);
+	const { pname, cityname, adname, address, name, adcode } = item;
 	const { lng, lat } = item.location;
 	location.value = {
 		longitude: lng,
 		latitude: lat,
-		address,
-		zone: [pname, cityname, adname],
+		adcode,
+		formattedAddress: address,
+		zone: [pname, cityname, adname, ''],
 		name,
 	};
-
-  emit('update:modelValue', location.value);
+	emit('update:modelValue', location.value);
 	map.value.setZoomAndCenter(16, [lng, lat]);
 };
 // 绘制地点marker
@@ -162,10 +162,10 @@ const drawMarker = (val) => {
 		anchor: 'bottom-center',
 	});
 	map.value.add(marker);
-	// map.value.setZoomAndCenter(16, [longitude, latitude]);
+	map.value.setZoomAndCenter(16, [longitude, latitude]);
 };
 defineExpose({
-  location,
+	location,
 });
 </script>
 

+ 2 - 6
src/views/login/component/Account.vue

@@ -60,7 +60,7 @@
 <script setup lang="ts" name="loginAccount">
 import { reactive, computed, ref } from 'vue';
 import { useRoute, useRouter } from 'vue-router';
-import { ElNotification } from 'element-plus';
+import {ElMessage, ElNotification} from 'element-plus';
 import { storeToRefs } from 'pinia';
 import { useThemeConfig } from '/@/stores/themeConfig';
 import { initFrontEndControlRoutes } from '/@/router/frontEnd';
@@ -162,11 +162,7 @@ const signInSuccess = (isNoPower: boolean | undefined) => {
 		// 关闭 loading
 		state.loading = true;
 		const signInText = '欢迎回来!';
-		ElNotification({
-			title: currentTimeInfo,
-			message: `${currentTimeInfo},${signInText}`,
-			type: 'success',
-		});
+    ElMessage.success(`${currentTimeInfo},${signInText}`);
 		NextLoading.start();
 	}
 };