This commit is contained in:
parent
3f3638bcab
commit
dc44e00aec
|
|
@ -3,7 +3,8 @@
|
|||
<canvas class="scroll-view" id="mycanvas" canvas-id="mycanvas"
|
||||
@touchstart="touchstart"
|
||||
@touchmove="touchmove"
|
||||
@touchend="touchend"/>
|
||||
@touchend="touchend"
|
||||
disable-scroll="true"/>
|
||||
<view class="fun-box">
|
||||
<view class="fun-box-btn clear flex" @click="clear">
|
||||
<text>清空</text>
|
||||
|
|
@ -76,31 +77,67 @@
|
|||
}
|
||||
}
|
||||
//绘制路径
|
||||
const draw = ()=> {
|
||||
let point1 = points[0]
|
||||
let point2 = points[1]
|
||||
points.shift()
|
||||
canvaCtx.moveTo(point1.X, point1.Y)
|
||||
canvaCtx.lineTo(point2.X, point2.Y)
|
||||
canvaCtx.stroke()
|
||||
canvaCtx.draw(true)
|
||||
// const draw = ()=> {
|
||||
// let point1 = points[0]
|
||||
// let point2 = points[1]
|
||||
// points.shift()
|
||||
// canvaCtx.moveTo(point1.X, point1.Y)
|
||||
// canvaCtx.lineTo(point2.X, point2.Y)
|
||||
// canvaCtx.stroke()
|
||||
// canvaCtx.draw(true)
|
||||
// }
|
||||
const draw = () => {
|
||||
if (points.length < 2) return;
|
||||
|
||||
canvaCtx.beginPath();
|
||||
canvaCtx.moveTo(points[0].X, points[0].Y);
|
||||
for (let i = 1; i < points.length; i++) {
|
||||
canvaCtx.lineTo(points[i].X, points[i].Y);
|
||||
}
|
||||
canvaCtx.stroke();
|
||||
canvaCtx.draw(true);
|
||||
|
||||
// 绘制后清空已绘制点
|
||||
points = [points[points.length - 1]]; // 保留最后一个点作为下一次起点
|
||||
}
|
||||
// 触摸结束,将未绘制的点清空防止对后续路径产生干扰
|
||||
const touchend = e=>{
|
||||
points = [];
|
||||
}
|
||||
// 清空画布
|
||||
const clear = ()=>{
|
||||
return uni.getSystemInfo()
|
||||
.then(res=>{
|
||||
canvaCtx.clearRect(0, 0, res.windowWidth, res.windowHeight);
|
||||
canvaCtx.draw(true);
|
||||
return res
|
||||
})
|
||||
.catch(err=>{
|
||||
// console.log(err);
|
||||
})
|
||||
}
|
||||
// const clear = ()=>{
|
||||
// return uni.getSystemInfo()
|
||||
// .then(res=>{
|
||||
// canvaCtx.clearRect(0, 0, res.windowWidth, res.windowHeight);
|
||||
// canvaCtx.draw(true);
|
||||
// return res
|
||||
// })
|
||||
// .catch(err=>{
|
||||
// // console.log(err);
|
||||
// })
|
||||
// }
|
||||
const clear = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.createSelectorQuery()
|
||||
.in(_this)
|
||||
.select('#mycanvas') // 确保 id 和 canvas 的一致性
|
||||
.fields({ size: true, rect: true }, data => {
|
||||
if (!data) {
|
||||
reject('Canvas not found')
|
||||
return
|
||||
}
|
||||
|
||||
const { width, height } = data
|
||||
|
||||
// 真正按 canvas 实际尺寸清除
|
||||
canvaCtx.clearRect(0, 0, width, height)
|
||||
canvaCtx.draw(true)
|
||||
resolve()
|
||||
})
|
||||
.exec()
|
||||
})
|
||||
}
|
||||
|
||||
// 确认
|
||||
const confirm = ()=>{
|
||||
uni.canvasToTempFilePath({ canvasId: 'mycanvas', }, _this, _this.parent)
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ const uploadSignUrl = async (base64Data) => {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.img {
|
||||
height: 300px;
|
||||
height: 500px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
@ -294,7 +294,7 @@ const uploadSignUrl = async (base64Data) => {
|
|||
}
|
||||
}
|
||||
.signature-page {
|
||||
min-height: 99vh;
|
||||
min-height: 94vh;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -79,24 +79,24 @@
|
|||
<div class="cont">{{ item.leasePerson }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<!-- <uni-row :gutter="24">
|
||||
<uni-col :span="6">预领数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ item.preCountNum }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-row> -->
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">已领数量:</uni-col>
|
||||
<uni-col :span="6">出库数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ item.alNum }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<!-- <uni-row :gutter="24">
|
||||
<uni-col :span="6">待领数量:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<div class="cont">{{ item.preCountNum - item.alNum }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-row> -->
|
||||
</uni-swipe-action-item>
|
||||
</uni-swipe-action>
|
||||
</view>
|
||||
|
|
@ -116,11 +116,14 @@ import { onBackPress } from '@dcloudio/uni-app'
|
|||
const total = ref(0) // 数据总量
|
||||
const active = ref(1) // tap索引
|
||||
const tableList = ref([]) // 列表数据源
|
||||
const dateArray = ref([]) // 日期范围
|
||||
const dateArray = ref([
|
||||
new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000).toISOString().split('T')[0],
|
||||
new Date().toISOString().split('T')[0],
|
||||
]) // 日期范围
|
||||
// 查询参数
|
||||
const queryParams = ref({
|
||||
startTime: '', // 开始时间
|
||||
endTime: '', // 结束时间
|
||||
startTime: dateArray.value[0] || '', // 开始时间
|
||||
endTime: dateArray.value[1] || '', // 结束时间
|
||||
keyWord: '', // 关键字
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export const getBackInfo = (id,keyWord) => {
|
|||
export const getProjectList = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/select/getProjectInfo',
|
||||
url: '/material/select/getProjectList',
|
||||
data:data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue