Browse Source

更改

xiaowang-xiugai
是小王呀\24601 11 months ago
parent
commit
5d782a995e
  1. BIN
      yifengdian-company-report/src/assets/images/home/shangbao.gif
  2. 114
      yifengdian-company-report/src/views/home.vue

BIN
yifengdian-company-report/src/assets/images/home/shangbao.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

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

@ -1,4 +1,5 @@
<template>
<div class="home">
<div class="header">
<div class="tel_box flex flex-center2 flex-end">
@ -23,8 +24,8 @@
<section style="overflow: hidden;">
<vue-seamless-scroll :class-option="optionHover" :data="vegetableList">
<div class="scroll-content">
<div class="flex flex-end item" v-for="(item, index) in vegetableList"
:key="'vegetable' + index" style="padding: 0 26px;">
<div class="flex flex-end item" v-for="(item, index) in vegetableList" :key="'vegetable' + index"
style="padding: 0 26px;">
<!-- <img :src="item.imageList[0]" v-if="item.imageList.length >0"/>
<img src="../../assets/images/dyfc.png" v-else alt=""> -->
<div class="flex1 van-ellipsis text-anign-left">{{ item.vegetableCategory }} </div>
@ -53,15 +54,15 @@
<section style="overflow: hidden;">
<vue-seamless-scroll :class-option="optionHover" :data="priceList">
<div class="scroll-content">
<div class="flex flex-mean item" v-for="(item, index) in priceList"
:key="'price' + index">
<div class="flex flex-mean item" v-for="(item, index) in priceList" :key="'price' + index">
<div class="flex1 van-ellipsis">{{ item.Name }} </div>
<div class="flex1 van-ellipsis">{{ item.price }} </div>
<div class="vegetable-item-row2 flex1 van-ellipsis">{{ item.jzrPrice }}
<img v-if="item.jzrPrice > 0 && item.jzrPrice != '暂无'"
src="@/assets/up.png" alt="" style="width: 11px;height: 15px;">
<img v-if="item.jzrPrice < 0 && item.jzrPrice != '暂无'"
src="@/assets/down.png" alt="" style="width: 11px;height: 15px;"></div>
<img v-if="item.jzrPrice > 0 && item.jzrPrice != '暂无'" src="@/assets/up.png" alt=""
style="width: 11px;height: 15px;">
<img v-if="item.jzrPrice < 0 && item.jzrPrice != '暂无'" src="@/assets/down.png" alt=""
style="width: 11px;height: 15px;">
</div>
</div>
</div>
@ -82,14 +83,20 @@
</div>
<div class="flex flex-end m-top12">
<div class="flex font-size14 flex-center2">
<img src="@/assets/images/home/unit.png" class="img-13" alt=""><span
class="blue">青岛市人民政府</span>
<img src="@/assets/images/home/unit.png" class="img-13" alt=""><span class="blue">青岛市人民政府</span>
</div>
<span class="gray">2024-03-05</span>
</div>
</div>
</div>
</section>
<div class="container1">
<div class="movable-area" @touchstart="onMovableStart" @touchmove="onMovableMove" @touchend="onMovableEnd">
<div class="movable-view" :style="{ left: x + 'px', top: y + 'px' }">
<img src="@/assets/images/home/shangbao.gif" class="draggable" alt="draggable image">
</div>
</div>
</div>
</div>
</template>
<script>
@ -132,14 +139,38 @@ export default {
],
dayList: [],
tDayList: []
tDayList: [],
dragging: false,
startX: 0,
startY: 0,
x: 279,
y: 625
};
},
created () {
created() {
this.getDayScData()
},
methods: {
handelClickEmap () {
onMovableStart(event) {
console.log("123");
this.dragging = true;
this.startX = event.touches[0].clientX - this.x;
this.startY = event.touches[0].clientY - this.y;
},
onMovableMove(event) {
console.log("123");
event.preventDefault(); //
if (this.dragging) {
this.x = event.touches[0].clientX - this.startX;
this.y = event.touches[0].clientY - this.startY;
}
console.log(this.x, this.y);
},
onMovableEnd() {
this.dragging = false;
},
handelClickEmap() {
this.$EventBus.$emit('switcMapType', 'Emap')
},
...mapActions({
@ -149,13 +180,13 @@ export default {
set_yfclz: 'SET_YFCLZ',
set_ldhg: 'SET_LDGH'
}),
openClz () {
openClz() {
this.set_yfclz(true)
},
openPdf () {
openPdf() {
this.set_viewPdf(true)
},
deduplicationJs (arr) {
deduplicationJs(arr) {
const data = []
arr.forEach((item, index) => {
if ((index + 1) % 2 === 0) {
@ -167,22 +198,22 @@ export default {
},
getDayScData(data) {
console.log(data,"123");
console.log(this.params, data );
console.log(this.times,"事件");
console.log(data, "123");
console.log(this.params, data);
console.log(this.times, "事件");
prcCollectionListForGov({ ...this.params, ...data }).then((res) => {
console.log(res,"XIAOWANG");
console.log(res, "XIAOWANG");
if (res.data.priceslist.length > 0) {
this.dayList = res.data.priceslist
console.log("day");
console.log(this.dayList,"day");
console.log(this.dayList, "day");
this.getDayScTData()
} else {
console.log("11");
this.times = this.$moment(this.times)
.subtract(1, 'days')
.format('yyyy-MM-DD')
console.log( this.times);
console.log(this.times);
this.getDayScData({
FEndDate: this.$moment(this.times)
.subtract(1, 'days')
@ -196,24 +227,24 @@ export default {
}
})
getVegetableOutputList().then(res => {
console.log(res,"12651651651");
console.log(res, "12651651651");
this.vegetableList = res.data.data,
console.log(res.data.data,"12651651651");
console.log(this.vegetableList,"1232432");
console.log(res.data.data, "12651651651");
console.log(this.vegetableList, "1232432");
})
},
getDayScTData () {
getDayScTData() {
console.log(this.times);
prcCollectionListForGov({
...this.params,
FEndDate: this.times,
FStartDate: this.times
}).then((res1) => {
console.log(res1.data,"15216516516");
console.log(res1.data, "15216516516");
if (res1.data.priceslist.length > 0) {
this.priceList = this.getScData(this.dayList, res1.data.priceslist)
console.log( this.priceList);
console.log(this.priceList);
} else {
this.times = this.$moment(this.times)
.subtract(1, 'days')
@ -222,7 +253,7 @@ export default {
}
})
},
getScData (arr, arr1) {
getScData(arr, arr1) {
const dataD = this.deduplicationJs(arr)
const dataTd = this.deduplicationJs(arr1)
return dataD.map((item, index) => {
@ -332,4 +363,29 @@ export default {
}
}
}
.container1 {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.movable-area {
width: 100%;
height: 100%;
position: relative;
}
.movable-view {
width: 80px;
height: 80px;
position: absolute;
cursor: move;
}
.draggable {
width: 100%;
height: 100%;
}
</style>
Loading…
Cancel
Save