Commit 05326458 by 胡悦

Merge branch 'v1.0.7' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.7

2 parents 55d9e190 e3e625ba
No preview for this file type
<template>
<view class="wn-canvas">
<template v-if="false">
<template v-if="showPenBox">
<view class="pen-box">
<view
class="pen"
:style="{backgroundColor: currentColor, height: lineWidth+'px'}"
></view>
<slider
min="1"
max="20"
:value="lineWidth"
block-size="20"
activeColor="#84f876"
class="pen-slider"
@change="penWidthChange"
/>
<view class="pen-txt">{{lineWidth}}px</view>
</view>
</template>
<image
v-if="isLandScape"
src="./img/color.png"
mode=""
class="draw-logo"
@click="showTools"
></image>
<view
class="tools-box"
v-if="toolsShow"
>
<view class="tools">
<view
class="tools-item "
v-for="(item,index) in tools"
:key="index"
>
<button
open-type="share"
v-if="item.key == 'share'"
style="background-color: rgba(0,0,0,0);padding: 0;border-radius: none;line-height: 0;borderColor:rgba(0,0,0,0);"
>
<image
class="tools-icon"
:src="item.active?item.item.activeUrl:item.url"
mode="aspectFit"
>
</image>
</button>
<image
@click="chooseTools(item)"
v-else
:src="item.active?item.activeUrl:item.url"
class="tools-icon"
></image>
</view>
</view>
</view>
</template>
<!-- <movable-area
:class="['canvas-box',{fill:custom}]"
scale-area
:style="{height:height}"
@touchstart="viewTouchStart"
>
<movable-view
class="canvas-view"
scale-min="1"
:scale="!drawStatus"
:disabled="drawStatus"
:direction="scaleValue == 1?'none':'all'"
:scale-value="defaultScaleValue"
@scale="scale"
> -->
<zoom-pan
:class="['canvas-box',{fill:custom}]"
:disabled="drawStatus"
......@@ -108,25 +35,6 @@
</template>
</template>
</zoom-pan>
<!-- <image class="under-image" :src="drawImage"
mode="scaleToFill"
/> -->
<!-- </movable-view>
</movable-area> -->
<!-- <color
:colorShow="colorShow"
@colorPickTap="colorPickTapHandler"
></color> -->
<!-- <view
class="btn-box"
v-if="showSave"
>
<button
type="primary"
@click="saveImage"
>保存</button>
</view> -->
</view>
</template>
......@@ -899,7 +807,6 @@ export default {
}
},
/**缩放 */
scale (e) {
this.scaleValue = e.scale
this.$emit('scale', e.scale)
......
<template>
<view
:class="['container zoom-pan-container',{disabled:disabled}]"
@touchstart="handleTouchStart"
@touchmove="handleTouchMove"
@touchend="handleTouchEnd"
@touchcancel="handleTouchEnd"
>
<view
class="content"
:style="{ transform: transformStyle ,
'transform-origin': transformOriginStyle
}"
<view>
<movable-area
class="container zoom-pan-container"
@touchstart="handleTouchStart"
@touchmove="handleTouchMove"
@touchEnd="handleTouchEnd"
>
<slot name="content"></slot>
</view>
<movable-view
class="content"
:style="{'transform-origin': transformOriginStyle}"
scale
:direction="scale == 1?'none':'all'"
:scale-min="scaleMin"
:scale-max="scaleMax"
:disabled="disabled"
out-of-bounds
@scale="onScale"
:scale-value="defalutscale"
>
<slot name="content"></slot>
</movable-view>
</movable-area>
</view>
</template>
<script>
......@@ -35,27 +43,20 @@ export default {
},
data () {
return {
startX: 0,
startY: 0,
moveX: 0,
moveY: 0,
scale: 1,
lastScale: 1,
lastTouchDistance: 0,
defalutscale: 1,
isScaling: false,
isDragging: false,
transformOrigin: { x: 0, y: 0 },
transformStyle: '',
transformOriginStyle: '50% 50%',
scaleFactor: 0.01,
transformOriginStyle: '50% 50%'
};
},
watch: {
watchScaleValue () {
this.lastScale = 1
if(this.defalutscale != 1) this.defalutscale = 2
this.scale = 1
this.transformStyle = `scale(1) translate(0px, 0px)`
this.transformOriginStyle = `50% 50%'`
setTimeout(() => {
this.defalutscale = 1
}, 100)
}
},
computed: {
......@@ -66,44 +67,21 @@ export default {
methods: {
handleTouchStart (e) {
if (this.disabled) return
if (e.touches.length === 2) {
this.isScaling = true;
this.lastTouchDistance = this.getTouchDistance(e.touches);
// 初始化缩放中心为两指间的中心点
this.transformOrigin = this.getTouchCenter(e.touches);
} else if (e.touches.length === 1) {
this.isDragging = true;
[this.startX, this.startY] = [e.touches[0].pageX, e.touches[0].pageY];
this.moveX = 0
this.moveY = 0
}
if (e.touches.length === 2) this.isScaling = true;
},
handleTouchMove: utils.throttle(function (e) {
if (this.disabled) return
if (this.isScaling && e.touches.length === 2) {
const currentDistance = this.getTouchDistance(e.touches);
const deltaDistance = currentDistance - this.lastTouchDistance;
// 根据触点距离变化和缩放因子计算新的缩放比例
const newScale = this.lastScale + deltaDistance * this.scaleFactor;
this.setScale(newScale, this.getTouchCenter(e.touches)); // 更新缩放同时更新中心点
this.lastTouchDistance = currentDistance;
} else if (this.isDragging && e.touches.length === 1 && this.scale !== 1) {
this.transformOriginStyle = `${this.startX}px ${this.startY}px`;
const newX = e.touches[0].pageX;
const newY = e.touches[0].pageY;
this.moveX = (newX - this.startX) / this.scale;
this.moveY = (newY - this.startY) / this.scale;
// 确保计算基于初始未缩放的触摸点,并考虑当前缩放比例
this.updatePosition();
const center = this.getTouchCenter(e.touches)
this.transformOriginStyle = `${center.x}px ${center.y}px`;
}
}, 16),
setScale (scale, center) {
this.scale = Math.min(Math.max(scale, this.scaleMin), this.scaleMax); // 假设最大缩放为10
this.lastScale = this.scale;
this.$emit('scale', { scale: this.scale })
// 更新transform-origin以使缩放围绕两指中心进行
if (center) this.transformOriginStyle = `${center.x}px ${center.y}px`;
this.updatePosition();
handleTouchEnd () {
this.isScaling = false
},
onScale (e) {
this.scale = e.detail.scale
this.$emit('scale', e.detail)
},
getTouchCenter (touches) {
......@@ -111,28 +89,6 @@ export default {
const centerY = (touches[0].pageY + touches[1].pageY) / 2;
return { x: centerX, y: centerY };
},
handleTouchEnd () {
if (this.disabled) return
this.isScaling = false;
this.isDragging = false;
},
getTouchDistance (touches) {
const dx = touches[1].pageX - touches[0].pageX;
const dy = touches[1].pageY - touches[0].pageY;
return Math.sqrt(dx * dx + dy * dy);
},
async updatePosition () {
// 更新位置并确保内容不超出容器
// 注意:此处需根据实际容器大小和内容尺寸进行调整
this.transformStyle = `translate(${this.moveX}px, ${this.moveY}px) scale(${this.scale})`;
},
getQueryInfo (el) {
return new Promise((resolve, reject) => {
uni.createSelectorQuery().in(this).select(el).boundingClientRect(data => {
resolve(data)
}).exec()
})
}
},
};
</script>
......
......@@ -69,8 +69,8 @@
class="record-list"
:style="{
height:
firstIndex == 0 ? 'calc(100% - 300rpx)' : 'calc(100% - 180rpx)',
'margin-top': firstIndex == 0 ? '24rpx' : '-20rpx',
firstIndex == 0 ? 'calc(100% - 292rpx)' : 'calc(100% - 176rpx)',
'margin-top': firstIndex == 0 ? '40rpx' : '0',
}"
scroll-y
@scrolltolower="pageonReachBottom"
......@@ -124,7 +124,6 @@
</template>
</scroll-view>
</view>
<view class="bottom-mask"></view>
</view>
</view>
</template>
......@@ -418,6 +417,10 @@ export default {
margin-top: 48rpx;
height: calc(100vh - 440rpx);
margin-right: 66rpx;
box-shadow: inset 0 0 16rpx 0 #FFFFFF;
border: 2rpx solid #fff;
box-sizing: border-box;
position: relative;
.type-box {
position: relative;
display: flex;
......@@ -617,16 +620,20 @@ export default {
}
}
.tabs-bottom {
margin-top: -45rpx;
background: #fff;
height: 45rpx;
height: 48rpx;
position: relative;
z-index: 3;
border-radius: 24px 24px 0 0;
position: absolute;
width: 100%;
top: 128rpx;
}
.data-tabs-box {
position: relative;
top: 0;
z-index: 3;
margin-top: -8rpx;
.data-tabs {
display: flex;
justify-content: space-between;
......@@ -700,7 +707,7 @@ export default {
.end-text {
color: #999;
text-align: center;
margin: 50rpx 0;
padding: 50rpx 0;
font-size: 24rpx;
}
.bottom-mask {
......
......@@ -24,7 +24,7 @@ export default {
async init() {
this.wv = await this.initWebview()
await this.enQueue()
this.polling()
this.pollingLater(interval)
},
/**
* 处理消息函数
......
......@@ -57,6 +57,18 @@
/>
</template>
</view>
<template v-if="searchValue">
<view
class="clear"
@click="clear"
>
<uni-icons
type="closeempty"
:size="16"
color="#1A1A1A"
></uni-icons>
</view>
</template>
</view>
</template>
<scroll-view
......@@ -100,9 +112,9 @@ export default {
}
},
onLoad (options) {
if(options.stepIndex == 1 ) {
this.$nextTick(()=>{
this.$refs.account.getListSelectAccount(true)
if (options.stepIndex == 1) {
this.$nextTick(() => {
this.$refs.account.getListSelectAccount(true)
})
}
},
......@@ -127,19 +139,24 @@ export default {
},
chooseAccount (userInfo) {
this.stepIndex = 1
this.searchValue = ''
this.$nextTick(() => {
this.$refs.merchant.init(userInfo)
})
},
chooseMerchant (userInfo) {
this.stepIndex = 2
this.searchValue = ''
this.$refs.scene.init(userInfo)
},
setStep (index) {
let { stepIndex } = this
if (index == 2) return
if (stepIndex > index) this.stepIndex = index
},
clear () {
this.searchValue = ''
this.search()
}
}
}
......@@ -160,7 +177,7 @@ export default {
height: 100%;
left: 0;
top: 0;
background-image: url("../../assets/images/login/account-bg.webp");
background-image: url('../../assets/images/login/account-bg.webp');
background-size: 100% 100%;
}
.nav-bar {
......@@ -206,7 +223,7 @@ export default {
bottom: 0;
right: 0;
border: 2rpx solid #b1b1b1;
content: "";
content: '';
border-radius: 100%;
}
.text {
......@@ -246,7 +263,7 @@ export default {
background: #ffffff59;
&::after {
position: absolute;
content: "";
content: '';
left: 0;
top: 0;
width: 100%;
......@@ -269,9 +286,9 @@ export default {
border-radius: 16rpx;
box-sizing: border-box;
color: #333;
box-sizing: border-box;
padding: 0 24rpx;
font-size: 28rpx;
position: relative;
.input {
display: flex;
align-items: center;
......@@ -289,12 +306,22 @@ export default {
color: #999999;
}
}
.clear {
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
padding: 0 32rpx;
height: 100%;
display: flex;
align-items: center;
}
}
.list {
position: relative;
z-index: 2;
height: calc(100% - 176rpx);
& ::-webkit-scrollbar{
& ::-webkit-scrollbar {
background-color: #ffffff59 !important;
}
& ::-webkit-scrollbar-thumb {
......
......@@ -28,19 +28,19 @@
</template>
</template>
<template v-else>
<view class="list-not">
暂无内容
</view>
<no-data />
</template>
</view>
</template>
<script type='text/ecmascript-6'>
import { loginMixin } from '@/mixin/index'
import NoData from './NoData.vue'
export default {
mixins: [loginMixin],
name: '',
components: {
NoData
},
data () {
return {
copyLoginUserInfoList: [],
......@@ -51,7 +51,6 @@ export default {
4: '驻店负责人'
},
selectedUuid: '',
requestFlag: false,
loginUserInfoList: [],
flag: false
}
......@@ -118,21 +117,18 @@ export default {
this.selectAccountLogin(id)
},
selectAccountLogin (id) {
if (this.requestFlag) return
this.requestFlag = true
uni.showLoading({
mask: true
})
uni.$api.userApi.selectAccountLogin({ id }).then(data => {
uni.hideLoading()
this.requestFlag = false
let [userInfo] = data.loginUserInfoList
if (data && userInfo) this.get4SStoreList(userInfo)
else uni.showToast({
title: '获取4S店列表失败',
icon: 'none',
})
}).catch(()=>{
}).catch(() => {
uni.hideLoading()
})
},
......@@ -242,10 +238,5 @@ export default {
.active {
border: 4rpx solid #347bff;
}
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
}
}
</style>
\ No newline at end of file
......@@ -25,15 +25,15 @@
</template>
</template>
<template v-else>
<view class="list-not">
暂无内容
</view>
<no-data />
</template>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
import NoData from './NoData.vue'
export default {
name: 'MerchantList',
data () {
......@@ -47,8 +47,8 @@ export default {
selectMerchantId: ''
}
},
onLoad () {
components: {
NoData
},
methods: {
init (userInfo) {
......@@ -196,10 +196,5 @@ export default {
.active {
border: 4rpx solid #347bff;
}
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
}
}
</style>
\ No newline at end of file
<template>
<view class="list-not">
<image
src="@/assets/images/login/nothing.webp"
class="list-not-img"
/>
暂无内容
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'NoData',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
text-align: center;
&-img {
width: 676rpx;
height: 284rpx;
margin: 192rpx auto 24rpx;
display: block;
}
}
</style>
\ No newline at end of file
......@@ -66,7 +66,7 @@ export default {
}).then(result => {
uni.hideLoading()
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []
}).catch(()=>{
}).catch(() => {
uni.hideLoading()
})
},
......@@ -81,6 +81,9 @@ export default {
sceneList[index].actived = true
this.sceneList = sceneList
userInfo.sceneType = sceneType
uni.showLoading({
mask: true
})
if (userInfo?.isSuper) this.jump(userInfo)
else {
try {
......@@ -91,6 +94,7 @@ export default {
})
if (data) this.jump(userInfo, data)
} catch (error) {
uni.hideLoading()
uni.showToast({
title: error,
icon: 'none'
......@@ -100,6 +104,7 @@ export default {
},
jump (userInfo, data) {
uni.hideLoading()
if (data) userInfo.loginRoleOnSelectMerchant = data?.loginRoleOnSelectMerchant
uni.$storage.set('userInfo', userInfo)
let url = {
......
......@@ -47,10 +47,10 @@
/>
</template>
<template slot="content">
<novice-guide
<!-- <novice-guide
@nextStep="nextStep"
@back="back"
/>
/> -->
</template>
</home-frame>
<!--
......@@ -97,6 +97,7 @@ export default {
const mock_data = uni.$storage.get("mock_data") || {};
this.moduleList = mock_data.moduleList || [];
this.toolList = mock_data.toolList || [];
this.getSoure();
this.get_Vehicle_Sales_Data();
},
onShow () {
......@@ -114,7 +115,6 @@ export default {
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
init () {
this.getSoure();
this.findPayInfo();
},
/**获取车型&销售数据 */
......@@ -212,6 +212,7 @@ export default {
});
return;
}
this.getSoure();
this.clearHistory();
this.$refs.home.startAudio();
this.id = this.moduleList[0].id;
......@@ -309,7 +310,7 @@ export default {
.module-box {
padding-top: 44rpx;
&::after {
content: "";
content: '';
display: block;
clear: both;
}
......
......@@ -150,6 +150,9 @@ class RecordManager {
let path = await utils.getFileSaveFolderOnClient()
try {
let records = this.getRecords()
if(typeof records === 'string') {
records = JSON.parse(records)
}
records.forEach(i => {
if (i.recordUrlList && i.recordUrlList.length) {
i.recordUrlList.forEach(async j => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!