Commit 86a98c8f by zhangxw

ui走查修改

1 parent 84896f97
......@@ -4,7 +4,7 @@
right: 70px;
}
.tip {
margin-top: 105px;
margin-top: 120px;
text-align: center;
color: #fff;
font-size: 16px;
......

2.54 KB | W: | H:

1.09 KB | W: | H:

src/assets/icon/replay-pause.png
src/assets/icon/replay-pause.png
src/assets/icon/replay-pause.png
src/assets/icon/replay-pause.png
  • 2-up
  • Swipe
  • Onion skin

2.32 KB | W: | H:

1.11 KB | W: | H:

src/assets/icon/replay-play.png
src/assets/icon/replay-play.png
src/assets/icon/replay-play.png
src/assets/icon/replay-play.png
  • 2-up
  • Swipe
  • Onion skin

3.17 KB | W: | H:

1.95 KB | W: | H:

src/assets/icon/replay-refresh.png
src/assets/icon/replay-refresh.png
src/assets/icon/replay-refresh.png
src/assets/icon/replay-refresh.png
  • 2-up
  • Swipe
  • Onion skin

2.35 KB | W: | H:

5.14 KB | W: | H:

src/assets/icon/share.png
src/assets/icon/share.png
src/assets/icon/share.png
src/assets/icon/share.png
  • 2-up
  • Swipe
  • Onion skin
.icon {display: inline-block;background-image: url(sprite.png);background-size: 172px 172px;}
.icon-begin { width: 26px; height: 36px; background-position: 0px -136px; }
.icon-checked { width: 10px; height: 10px; background-position: -106px -120px; }
.icon-copy { width: 28px; height: 28px; background-position: -120px -92px; }
.icon-device { width: 14px; height: 14px; background-position: -154px -52px; }
.icon-loc-icon { width: 30px; height: 30px; background-position: -52px -136px; }
.icon-locate-sm { width: 14px; height: 14px; background-position: -154px -66px; }
.icon-location { width: 24px; height: 24px; background-position: -148px -92px; }
.icon-navgation { width: 28px; height: 28px; background-position: -82px -136px; }
.icon-off-car { width: 52px; height: 52px; background-position: -60px -60px; }
.icon-offline-time { width: 14px; height: 14px; background-position: -64px -120px; }
.icon-on-car { width: 52px; height: 52px; background-position: -120px 0px; }
.icon-online-time { width: 14px; height: 14px; background-position: -78px -120px; }
.icon-put-away { width: 64px; height: 16px; background-position: 0px -120px; }
.icon-refresh-car { width: 24px; height: 24px; background-position: -110px -136px; }
.icon-replay-pause { width: 60px; height: 60px; background-position: 0px 0px; }
.icon-replay-play { width: 60px; height: 60px; background-position: -60px 0px; }
.icon-replay-refresh { width: 60px; height: 60px; background-position: 0px -60px; }
.icon-resident { width: 26px; height: 36px; background-position: -26px -136px; }
.icon-screen-btn { width: 12px; height: 12px; background-position: -154px -80px; }
.icon-setting-btn { width: 24px; height: 24px; background-position: -134px -136px; }
.icon-share { width: 34px; height: 40px; background-position: -120px -52px; }
.icon-typeList { width: 14px; height: 14px; background-position: -92px -120px; }
\ No newline at end of file
.icon {display: inline-block;background-image: url(sprite.png);background-size: 192px 188px;}
.icon-begin { width: 26px; height: 36px; background-position: -140px -52px; }
.icon-copy { width: 28px; height: 28px; background-position: -144px -96px; }
.icon-device { width: 14px; height: 14px; background-position: -118px -68px; }
.icon-loc-icon { width: 30px; height: 30px; background-position: -88px -52px; }
.icon-locate-sm { width: 14px; height: 14px; background-position: -88px -82px; }
.icon-location { width: 24px; height: 24px; background-position: -28px -160px; }
.icon-navgation { width: 28px; height: 28px; background-position: 0px -160px; }
.icon-off-car { width: 52px; height: 52px; background-position: -88px 0px; }
.icon-offline-time { width: 14px; height: 14px; background-position: -102px -82px; }
.icon-on-car { width: 52px; height: 52px; background-position: -140px 0px; }
.icon-online-time { width: 14px; height: 14px; background-position: -116px -82px; }
.icon-put-away { width: 64px; height: 16px; background-position: 0px -144px; }
.icon-refresh-car { width: 24px; height: 24px; background-position: -52px -160px; }
.icon-replay-pause { width: 48px; height: 48px; background-position: 0px -96px; }
.icon-replay-play { width: 48px; height: 48px; background-position: -48px -96px; }
.icon-replay-refresh { width: 48px; height: 48px; background-position: -96px -96px; }
.icon-resident { width: 26px; height: 36px; background-position: -166px -52px; }
.icon-search { width: 16px; height: 16px; background-position: -118px -52px; }
.icon-setting-btn { width: 24px; height: 24px; background-position: -76px -160px; }
.icon-share { width: 88px; height: 96px; background-position: 0px 0px; }
.icon-typeList { width: 14px; height: 14px; background-position: -144px -124px; }
.icon-warning { width: 16px; height: 16px; background-position: -172px -96px; }
\ No newline at end of file

36.4 KB | W: | H:

35.6 KB | W: | H:

src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<div class="map-box">
<slot name="mapBox"></slot>
<div v-if="sharePage" class="share-tip">
<p>
<van-icon name="warning-o" class="warning-icon" />
提示:此分享功能请在有效时间内使用,详情联系分享者
</p>
</div>
<div v-show="isUploaded">
<a class="map-cmd-icon location" @click="getLocation">
<span v-if="!isGetLocation" class="icon icon-location"></span>
......@@ -23,18 +17,20 @@
import { onMounted, ref } from "vue";
export default {
name: "mapContent",
props: {},
props: {
noShowNotice: {
type: Boolean,
},
},
setup(props, context) {
let map = null;
const isUploaded = ref(false);
let checkLoadedTimeoutId = "";
const satelActive = ref(null);
const roadActive = ref(null);
const sharePage = ref(false);
const isGetLocation = ref(false);
onMounted(() => {});
const initMap = (id) => {
sharePage.value = JSON.parse(localStorage.getItem("sharePage"));
let check = () => {
checkLoadedTimeoutId && window.clearTimeout(checkLoadedTimeoutId);
let AMap = window.AMap;
......@@ -99,7 +95,6 @@ export default {
roadActive,
refresh,
isUploaded,
sharePage,
isGetLocation,
};
},
......@@ -110,23 +105,6 @@ export default {
.map-box {
height: 100%;
}
.share-tip {
position: fixed;
top: 100px;
z-index: 101;
background: rgba(0, 0, 0, 0.5);
font-size: 12px;
left: 50%;
margin-left: -140px;
width: 260px;
padding: 5px 10px;
text-align: center;
color: #fff;
border-radius: 5px;
.warning-icon {
color: var(--van-warning-color);
}
}
.map-cmd-icon {
width: 40px;
height: 40px;
......@@ -137,6 +115,7 @@ export default {
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08);
}
.location {
bottom: 160px;
......
......@@ -12,6 +12,7 @@ import {
Switch,
Cell,
Loading,
NoticeBar,
} from "vant";
export function vant(app) {
......@@ -28,4 +29,5 @@ export function vant(app) {
app.use(Tabs);
app.use(Cell);
app.use(Loading);
app.use(NoticeBar);
}
......@@ -9,73 +9,121 @@
<div id="container" class="map-container index-map"></div>
</template>
</mapContent>
<van-notice-bar
class="share-tip"
mode="closeable"
v-if="isSharePage"
text="此分享功能请在有效时间内使用,详情联系分享者"
>
<template #left-icon>
<span class="icon icon-warning"></span>
</template>
</van-notice-bar>
<!-- 搜索区域 -->
<div class="search-header">
<div
class="select-box"
:class="carItem ? 'text' : ''"
@click="isShowList = !isShowList"
>
<span>{{
carItem
? (carItem.ownerName || "--") + " | " + (carItem.vin || "--")
: "请选择"
}}</span>
<span class="arrow-icon"><van-icon name="arrow-down" /></span>
<div class="search-box" :class="isSharePage ? 'search-box-top' : ''">
<div class="search-header">
<div
class="select-box"
:class="carItem ? 'text' : ''"
@click="isShowList = !isShowList"
>
<span>{{
carItem
? (carItem.ownerName || "--") + " | " + (carItem.vin || "--")
: "请选择"
}}</span>
<span class="arrow-icon"><van-icon name="arrow-down" /></span>
</div>
</div>
</div>
<div
class="search-content"
:class="isShowList ? (!list.length ? 'no-data-content' : '') : 'hidden'"
>
<van-search
class="search-input"
v-model="keyWord"
placeholder="输入两位以上关键字搜索"
@search="getCarList(true)"
@clear="getCarList(true)"
/>
<van-list
v-if="list.length"
class="list-box"
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="getCarList"
:immediate-check="false"
>
<van-cell v-for="item in list" @click="getCarInfo(item)" :key="item">
<div
class="list-item"
:class="(carItem && carItem.id) == item.id ? 'active' : ''"
>
<!-- <i v-if="item.offLineDuration" class="icon icon-off-line"></i>
<i v-else class="icon icon-on-line"></i> -->
<div class="item-right">
<span class="item-text">{{
(item.ownerName || "--") + " | " + (item.vin || "--")
}}</span>
<span
v-if="(carItem && carItem.vin) == item.vin"
class="slectedicon"
><i class="icon icon-checked"></i
></span>
<div class="search-content" :class="isShowList ? '' : 'hidden'">
<van-search
class="search-input"
v-model="keyWord"
placeholder="输入两位以上关键字搜索"
@search="getCarList(true)"
@clear="getCarList(true)"
>
<template #left-icon>
<span class="icon icon-search"></span>
</template>
</van-search>
<van-list
class="list-box"
:class="list.length && isShowList ? '' : 'hidden'"
v-model:loading="loading"
:finished="finished"
finished-text="没有更多了"
@load="getCarList"
:immediate-check="false"
>
<van-cell v-for="item in list" @click="getCarInfo(item)" :key="item">
<div
class="list-item"
:class="(carItem && carItem.id) == item.id ? 'active' : ''"
>
<div class="item-text">
<div class="item-title">
<div class="item-title-left">
<div class="item-text-name">
{{ item.ownerName || "--" }}
</div>
<div class="item-text-vin">{{ item.vin || "--" }}</div>
</div>
<div
v-if="item.licensePlate"
class="item-text-carNum"
:class="
item.licensePlate.length <= 7 ? 'blur-car' : 'green-car'
"
>
{{ item.licensePlate }}
</div>
</div>
<div class="item-text-content">
<div class="item-text-sn">
<span class="sn-item" v-if="item.snArr[0].length">
<span class="label">有线设备</span>
<span class="sn-text">
<span v-for="(val, index) in item.snArr[0]" :key="index"
>{{ val
}}<span v-if="index != item.snArr[0].length - 1"
>、</span
></span
>
</span>
</span>
<span class="sn-item" v-if="item.snArr[1].length">
<span class="label">无线设备</span>
<span
v-for="(val, index) in item.snArr[1]"
:key="index"
>{{ val }}</span
>
</span>
</div>
<div class="item-text-orderNo">
<span class="label">业务工单号</span>
<span>{{ item.workOrderNo || "--" }}</span>
</div>
</div>
</div>
</div>
</div>
</van-cell>
</van-list>
<div
class="no-data-class"
v-if="list.length <= 0 && !searched && !ISLOADING"
>
<img src="../assets/images/no-data.png" alt="" />
<span>暂无数据</span>
</div>
<div class="no-data-class" v-if="list.length <= 0 && searched">
<img src="../assets/images/search-noData.png" alt="" />
<span>搜索无结果</span>
</van-cell>
</van-list>
<div
class="no-data-class"
v-if="list.length <= 0 && !searched && !ISLOADING"
>
<img src="../assets/images/no-data.png" alt="" />
<span>暂无数据</span>
</div>
<div class="no-data-class" v-if="list.length <= 0 && searched">
<img src="../assets/images/search-noData.png" alt="" />
<span>搜索无结果</span>
</div>
</div>
</div>
<van-overlay
:show="showOverlay"
@click="showOverlay = false"
......@@ -93,7 +141,14 @@
</template>
<script>
import { ref, defineComponent, onMounted, watch, computed } from "vue";
import {
ref,
defineComponent,
onMounted,
watch,
computed,
nextTick,
} from "vue";
import { useStore } from "vuex";
import mapContent from "@/components/mapContent.vue";
import AMapLoader from "@amap/amap-jsapi-loader";
......@@ -132,7 +187,7 @@ export default defineComponent({
const store = useStore();
const ISLOADING = computed(() => store.state.LOADING);
const showOverlay = ref(false);
let isSharePage = false;
const isSharePage = ref(false);
let map = undefined;
let _timeoutId = undefined;
const refreshCb = () => {
......@@ -207,6 +262,17 @@ export default defineComponent({
}
}
);
watch(isShowList, (newVal) => {
if (newVal) {
nextTick(() => {
let listNode = document.querySelector(".list-box");
listNode.setAttribute(
"style",
`max-height: ${window.innerHeight * 0.8 - 116}px`
);
});
}
});
onMounted(() => {
localStorage.removeItem("sharePage");
if (route.query.token) {
......@@ -214,7 +280,7 @@ export default defineComponent({
}
if (route.query.sharePage) {
localStorage.setItem("sharePage", JSON.parse(route.query.sharePage));
isSharePage = JSON.parse(route.query.sharePage);
isSharePage.value = JSON.parse(route.query.sharePage);
}
AMapLoader.load({
key: CONSTANT.MAP_KEY,
......@@ -427,7 +493,7 @@ export default defineComponent({
carFenceBtn && carFenceBtn.classList.add("disabled");
}
// 是否被分享者打开
if (isSharePage) {
if (isSharePage.value) {
shareBtn && shareBtn.classList.add("disabled");
carFenceBtn && carFenceBtn.classList.add("disabled");
}
......@@ -548,7 +614,7 @@ export default defineComponent({
// 电子围栏
(carFenceBtn && carFenceBtn).onclick = () => {
if (item.source == 0 || isSharePage) {
if (item.source == 0 || isSharePage.value) {
return;
} else {
wx.miniProgram.navigateTo({
......@@ -558,7 +624,7 @@ export default defineComponent({
};
// 分享找车
shareBtn.onclick = () => {
if (isSharePage) {
if (isSharePage.value) {
return;
}
showOverlay.value = true;
......@@ -602,6 +668,18 @@ export default defineComponent({
term: keyWord.value,
}).then((res) => {
if (res.code === 200) {
res.data.list &&
res.data.list.forEach((val) => {
let snArr = [[], []];
val.sources.split(",").forEach((i, index) => {
if (i == 1) {
snArr[0].push(val.sns.split(",")[index]);
} else {
snArr[1].push(val.sns.split(",")[index]);
}
});
val.snArr = snArr;
});
list.value = list.value.concat(res.data.list);
loading.value = false;
searched.value = flag;
......@@ -632,6 +710,7 @@ export default defineComponent({
ISLOADING,
showOverlay,
initViewport,
isSharePage,
};
},
});
......@@ -642,88 +721,151 @@ export default defineComponent({
.index-map {
position: relative;
}
.search-header {
z-index: 102;
.share-tip {
position: fixed;
top: 0;
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.06);
background-color: rgba(255, 255, 255, 1);
border-radius: 6px;
height: 44px;
width: calc(100% - 24px);
margin: 12px 12px 0 12px;
.select-box {
color: #b8bdc2;
font-size: 14px;
padding: 0 16px;
line-height: 44px;
display: flex;
justify-content: space-between;
.arrow-icon {
color: #9ca4ad;
}
}
.select-box.text {
color: #111111;
}
z-index: 101;
background: rgba(0, 0, 0, 0.6);
font-size: 14px;
height: 28px;
line-height: 28px;
width: calc(100% - 16px);
color: #fff;
padding: 0 8px 0;
}
.search-content {
.search-box {
width: 100%;
position: fixed;
max-height: 80%;
z-index: 102;
top: 64px;
height: 65%;
margin-top: 8px;
border-radius: 12px;
background: #fff;
overflow: hidden;
transition: height 0.3s;
.search-input {
border-radius: 12px;
}
.list-box {
max-height: calc(100% - 52px);
overflow-y: auto;
.list-item {
height: 52px;
padding: 0 14px;
position: absolute;
top: 0;
.search-header {
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.06);
border-radius: 6px;
height: 44px;
width: calc(100% - 24px);
margin: 12px 12px 0 12px;
background: #fff;
.select-box {
color: #b8bdc2;
font-size: 14px;
padding: 0 16px;
line-height: 44px;
display: flex;
align-items: center;
.item-right {
margin-left: 10px;
justify-content: space-between;
.arrow-icon {
color: #9ca4ad;
}
}
.select-box.text {
color: #111111;
}
}
.search-content {
width: 100%;
max-height: 100%;
border-radius: 12px;
background: #fff;
margin-top: 8px;
overflow: hidden;
.search-input {
border-radius: 12px;
}
.list-box {
float: left;
width: 100%;
overflow-y: auto;
background: #f5f6f7;
border-radius: 0 0 12px 12px;
.list-item {
padding: 0 16px;
display: flex;
justify-content: space-between;
width: 100%;
.slectedicon {
display: inline-block;
width: 20px;
height: 20px;
align-items: center;
font-size: 12px;
.item-text {
display: flex;
flex-flow: column;
width: 100%;
border: none;
.item-title {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f0f2f5;
padding: 10px 0;
.item-title-left {
.item-text-name {
font-size: 14px;
color: #111;
font-weight: 600;
}
}
.item-text-carNum {
font-size: 12px;
padding: 0 5px;
border-radius: 3px;
}
.item-text-carNum.blur-car {
color: var(--base-color);
background: #d9e9ff;
}
.item-text-carNum.green-car {
color: #00cd9e;
background: #e5faf5;
}
}
.item-text-content {
padding: 10px 0;
.item-text-sn {
display: flex;
.sn-item {
flex: 1;
display: flex;
.label {
color: #9fa6ad;
margin-right: 8px;
}
.sn-text {
display: flex;
flex-flow: column;
}
}
}
.item-text-orderNo {
.label {
color: #9fa6ad;
margin-right: 8px;
}
}
}
}
}
.list-item.active {
background: #eff6ff;
}
}
.list-item.active {
background: #ecf5fe;
.list-box.hidden {
max-height: 0;
}
}
.no-data-class {
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
padding: 40px;
span {
font-size: 14px;
color: #9fa6ad;
margin-top: 16px;
.no-data-class {
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
padding: 40px;
span {
font-size: 14px;
color: #9fa6ad;
margin-top: 16px;
}
}
}
.search-content.hidden {
max-height: 0;
}
}
.search-content.hidden {
height: 0;
transition: height 0.3s;
}
.search-content.no-data-content {
height: auto;
.search-box.search-box-top {
top: 24px;
}
</style>
<style lang="scss">
......@@ -735,6 +877,7 @@ export default defineComponent({
color: #111111;
word-break: break-all;
user-select: text;
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.08);
.main-info {
padding: 10px;
}
......@@ -841,10 +984,21 @@ export default defineComponent({
}
.van-cell {
padding: 0;
margin-bottom: 8px;
}
.van-cell--borderless {
margin: 0;
}
.van-search__content {
height: var(--van-search-input-height);
display: flex;
align-items: center;
}
.van-field__left-icon {
display: flex;
align-items: center;
}
.van-badge__wrapper {
margin-right: 2px;
}
</style>
......@@ -274,7 +274,7 @@ export default {
.time {
color: #666;
font-size: 12px;
margin-top: 5px;
margin-top: 7px;
}
}
:last-child {
......@@ -287,7 +287,7 @@ export default {
transition: max-height 0.3s;
}
.toggle-bottom-monitor.show {
max-height: 80%;
max-height: 60%;
transition: max-height 0.3s;
.list-content-monitor {
overflow-y: scroll;
......
......@@ -581,6 +581,9 @@ export default defineComponent({
left: 50%;
margin-left: -72px;
z-index: 101;
a {
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.08);
}
.icon-replay-refresh {
margin-left: 12px;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!