Browse Source

浮动框移出的问题, 上报图片加载不上的问题

master
是小王呀\24601 1 year ago
parent
commit
e2880b1aa1
  1. 27
      yifengdian-company-report/src/views/home.vue
  2. 85
      yifengdian-company-report/src/views/vegetableDetails.vue

27
yifengdian-company-report/src/views/home.vue

@ -143,8 +143,8 @@ export default {
dragging: false, dragging: false,
startX: 0, startX: 0,
startY: 0, startY: 0,
x: 279, x: 275,
y: 625 y: 540
}; };
}, },
created() { created() {
@ -155,7 +155,8 @@ export default {
console.log("123"); console.log("123");
this.dragging = true; this.dragging = true;
this.startX = event.touches[0].clientX - this.x; this.startX = event.touches[0].clientX - this.x;
this.startY = event.touches[0].clientY - this.y; this.startY = event.touches[0].clientY - this.y
}, },
onMovableMove(event) { onMovableMove(event) {
console.log("123"); console.log("123");
@ -163,6 +164,20 @@ export default {
if (this.dragging) { if (this.dragging) {
this.x = event.touches[0].clientX - this.startX; this.x = event.touches[0].clientX - this.startX;
this.y = event.touches[0].clientY - this.startY; this.y = event.touches[0].clientY - this.startY;
if(this.x>300){
console.log("12w3");
this.x=300
}
if(this.x<0){
console.log("12w3");
this.x=10
}
if(this.y>600){
this.y=600
}
if(this.y<0){
this.y=10
}
} }
console.log(this.x, this.y); console.log(this.x, this.y);
}, },
@ -372,7 +387,7 @@ export default {
} }
.movable-area { .movable-area {
width: 100%; width: 375px;
height: 100%; height: 100%;
position: relative; position: relative;
} }
@ -385,7 +400,7 @@ export default {
} }
.draggable { .draggable {
width: 100%; width: 80px;
height: 100%; height: 80px;
} }
</style> </style>

85
yifengdian-company-report/src/views/vegetableDetails.vue

@ -1,25 +1,6 @@
<template> <template>
<div> <div>
<van-tabs @click="onClick"> <van-tabs color="#3974F6" title-active-color="#3974F6">
<van-tab title="历史信息">
<div class="header font-size17 font-pingfangB text-center flex flex-center2 ">
<van-search v-model="searchKey" shape="round" background="#ffffff" placeholder="请输入搜索关键词" class="flex1" />
</div>
<div class="container">
<div class="card flex flex-y">
<div class="flex flex-x m-bot12 flex-center2" >
<img src="../assets/images//icons//date-blue.png" class="img-15">
<div class="font-size14 blue m-left5 ">2024-01</div>
</div>
<div class="border-btn" v-for="item in hisList">
<div class="font-pingfangB m-top12">{{ item.vegetable }}</div>
<div class="gray">种植时间:{{ item.PlantingTime }}</div>
<div class="gray">上市时间:{{ item.launchTime }}</div>
<div class="gray m-bot12">产量():{{ item.yield }}</div></div>
</div>
</div>
</van-tab>
<van-tab title="信息填报"> <van-tab title="信息填报">
<div class="flex flex-y"> <div class="flex flex-y">
<div class="header font-size17 font-pingfangB text-center flex flex-center2 "> <div class="header font-size17 font-pingfangB text-center flex flex-center2 ">
@ -99,6 +80,15 @@
show-toolbar show-toolbar
/> />
</div> </div>
<div v-show="timeShow3" class="picker-box">
<van-datetime-picker
type="date"
v-show="timeShow3"
@cancel="onCancelTime"
@confirm="onConfirmTime"
:value="new Date(vegetableList[index].growTime)"
/>
</div>
<div v-show="timeShow" class="picker-box"> <div v-show="timeShow" class="picker-box">
<van-datetime-picker <van-datetime-picker
type="date" type="date"
@ -108,6 +98,7 @@
:value="new Date(vegetableList[index].growTime)" :value="new Date(vegetableList[index].growTime)"
/> />
</div> </div>
<div v-show="timeShow1" class="picker-box"> <div v-show="timeShow1" class="picker-box">
<van-datetime-picker <van-datetime-picker
type="date" type="date"
@ -124,6 +115,43 @@
</div> </div>
</van-tab> </van-tab>
<van-tab title="历史信息">
<div class="header font-size17 font-pingfangB text-center flex-center1 flex flex-center2 ">
<van-button type="primary" icon-position="right" @click="onTime()" size="small" round color="#f7f8fa" style="width: 173px;">
<div class="gray flex flex-x flex- center2 flex-end" style="width: 150px;">
<div>{{Selectdate?Selectdate:"全部" }}</div>
<img src="../assets/images//icons//date.png" class="img-15 m-left25" style="right: 1px;"></div>
</van-button>
<van-search v-model="searchKey" style="width: 190px;" shape="round" background="#ffffff"search-background-color="#C1C1C1" placeholder="请输入品种" />
</div>
<div class="container">
<div class="card flex flex-y">
<div class="flex flex-x m-bot12 flex-center2" >
<img src="../assets/images//icons//date-blue.png" class="img-15">
<div class="font-size14 blue m-left5 ">2024-01</div>
</div>
<div class="border-btn" v-for="item in hisList">
<div class="font-pingfangB m-top12">{{ item.vegetable }}</div>
<div class="gray">种植时间:{{ item.PlantingTime }}</div>
<div class="gray">上市时间:{{ item.launchTime }}</div>
<div class="gray m-bot12">产量():{{ item.yield }}</div></div>
</div>
</div>
<div v-show="timeShow3" class="picker-box">
<van-datetime-picker
type="date"
v-show="timeShow3"
@cancel="onCancelTime3"
@confirm="onConfirmTime3"
:value="new Date(vegetableList[index].growTime)"
/>
</div>
</van-tab>
</van-tabs> </van-tabs>
@ -155,9 +183,12 @@ export default {
time: null, time: null,
time1: null, time1: null,
index: 0, index: 0,
Selectdate:"",
typeShow: false, typeShow: false,
timeShow: false, timeShow: false,
timeShow1: false, timeShow1: false,
timeShow3: false,
placeOrgName: null, placeOrgName: null,
columns: ["白菜", "土豆", "温州", "嘉兴", "湖州"], columns: ["白菜", "土豆", "温州", "嘉兴", "湖州"],
list: [], list: [],
@ -179,7 +210,6 @@ export default {
params.forEach((value, key) => { params.forEach((value, key) => {
queryParams[key] = value; queryParams[key] = value;
}); });
return queryParams; return queryParams;
} }
const query = getIframeQueryParams(); const query = getIframeQueryParams();
@ -310,6 +340,15 @@ export default {
this.timeShow = false; this.timeShow = false;
this.index = 0; this.index = 0;
}, },
onCancelTime3(val){
this.timeShow3 = false;
},
onConfirmTime3(val) {
this.Selectdate= this.formatDateTime(val);
// this.vegetableList[this.index].marketTime = this.formatDateTime(val);
this.timeShow3 = false;
// this.index = 0;
},
onConfirmTime1(val) { onConfirmTime1(val) {
this.vegetableList[this.index].marketTime = this.formatDateTime(val); this.vegetableList[this.index].marketTime = this.formatDateTime(val);
this.timeShow1 = false; this.timeShow1 = false;
@ -327,6 +366,9 @@ export default {
this.index = index; this.index = index;
this.timeShow1 = true; this.timeShow1 = true;
}, },
onTime(){
this.timeShow3 = true;
},
addRow() { addRow() {
this.vegetableList = [ this.vegetableList = [
...this.vegetableList, ...this.vegetableList,
@ -382,7 +424,6 @@ export default {
}) })
.then((response) => { .then((response) => {
// //
console.log("response::", response);
if (response.data.code == 0) { if (response.data.code == 0) {
Toast("提交成功"); Toast("提交成功");
this.goback(); this.goback();

Loading…
Cancel
Save