From cab8add6e522d95a00b67c8d8b8a7eea7434a20a Mon Sep 17 00:00:00 2001
From: Panzihang <819652404@qq.com>
Date: Mon, 8 Jan 2024 15:16:29 +0800
Subject: [PATCH] 1.8
---
.../maramlee-waterfalls-flow.vue | 181 ++++++++++++++++++
.../waterfall-list.vue | 69 ++-----
pages/discharge/index.vue | 2 +-
pages/index/instruct.vue | 1 +
pages/login/index.vue | 4 +-
pages/quality/details.vue | 3 +-
pages/quality/edit.vue | 15 +-
pages/quality/index.vue | 4 -
pages/quality/zsEdit.vue | 29 ++-
pages/receipt/index.vue | 3 +-
pages/shipWork/mixSign.vue | 1 -
pages/test.vue | 144 ++++++++++++++
.../custom-waterfalls-flow.vue | 76 ++++++--
.../components/waterfall/waterfall-item.vue | 98 ----------
14 files changed, 447 insertions(+), 183 deletions(-)
create mode 100644 components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue
rename {uni_modules/helang-waterfall/components/waterfall => components/maramlee-waterfalls-flow}/waterfall-list.vue (77%)
create mode 100644 pages/test.vue
delete mode 100644 uni_modules/helang-waterfall/components/waterfall/waterfall-item.vue
diff --git a/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue b/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue
new file mode 100644
index 0000000..beaaf8a
--- /dev/null
+++ b/components/maramlee-waterfalls-flow/maramlee-waterfalls-flow.vue
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/helang-waterfall/components/waterfall/waterfall-list.vue b/components/maramlee-waterfalls-flow/waterfall-list.vue
similarity index 77%
rename from uni_modules/helang-waterfall/components/waterfall/waterfall-list.vue
rename to components/maramlee-waterfalls-flow/waterfall-list.vue
index 9053562..9e11815 100644
--- a/uni_modules/helang-waterfall/components/waterfall/waterfall-list.vue
+++ b/components/maramlee-waterfalls-flow/waterfall-list.vue
@@ -4,55 +4,33 @@
-
- 456
-
+
+
- 456
-
+
+
-
-
\ No newline at end of file
diff --git a/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue b/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue
index 310cdf9..bd3935e 100644
--- a/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue
+++ b/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue
@@ -1,7 +1,9 @@
-
-
+
+
@@ -15,7 +17,10 @@
-
+
@@ -63,6 +68,21 @@
},
listStyle: { // 单个展示项的样式:eg:{'background':'red'}
type: Object
+ },
+ changeValue: {
+ type: Boolean,
+ default: false
+ },
+ biaosTitle:{
+ type:String,
+ default:''
+ },
+ idIndex:{
+ type:[String, Number],
+ },
+ idContent:{
+ type:Array,
+ default:[]
}
},
data() {
@@ -85,7 +105,7 @@
curIndex: 0,
isRefresh: true,
flag: false,
- refreshDatas: []
+ refreshDatas: [],
}
},
computed: {
@@ -96,12 +116,16 @@
},
// 计算margin
m() {
- const column_margin = `${(100-(100 / this.data.column - (+this.data.columnSpace)).toFixed(5)*this.data.column)/(this.data.column-1)}%`;
+ const column_margin =
+ `${(100-(100 / this.data.column - (+this.data.columnSpace)).toFixed(5)*this.data.column)/(this.data.column-1)}%`;
return column_margin;
},
// list样式
s1() {
- return { ...this.listInitStyle, ...this.listStyle };
+ return {
+ ...this.listInitStyle,
+ ...this.listStyle
+ };
}
},
created() {
@@ -145,7 +169,8 @@
this.isRefresh = true;
this.adds = [];
this.data.list = this.value ? this.value : [];
- this.data.column = this.column < 2 ? 2 : this.column >= this.maxColumn ? this.maxColumn : this.column;
+ this.data.column = this.column < 2 ? 2 : this.column >= this.maxColumn ? this.maxColumn : this
+ .column;
this.data.columnSpace = this.columnSpace <= 5 ? this.columnSpace : 5;
this.data.imageKey = this.imageKey;
this.data.seat = this.seat;
@@ -193,7 +218,10 @@
for (let i = 1; i <= this.data.column; i++) {
const query = uni.createSelectorQuery().in(this);
query.select(`#waterfalls_flow_column_${i}`).boundingClientRect(data => {
- heightArr.push({ column: i, height: data.height });
+ heightArr.push({
+ column: i,
+ height: data.height
+ });
}).exec(() => {
if (this.data.column <= heightArr.length) {
resolve(this.getMin(heightArr, 'height'));
@@ -212,7 +240,12 @@
const minHeightRes = await this.getMinColumnHeight();
const c = this.data[`column_${minHeightRes.column}_values`];
this.data.list[i].column = minHeightRes.column;
- c.push({ ...this.data.list[i], cIndex: c.length, index: i, o: 0 });
+ c.push({
+ ...this.data.list[i],
+ cIndex: c.length,
+ index: i,
+ o: 0
+ });
this.msg++;
},
// 图片加载完成
@@ -259,15 +292,17 @@
},
watch: {
value: {
- deep: true,
+ deep:true,
handler(newValue, oldValue) {
setTimeout(() => {
this.$nextTick(() => {
if (this.isRefresh) return false;
if (this.isLoaded) {
+ this.data.list = []
// if (newValue.length <= this.curIndex) return this.refresh();
if (newValue.length <= this.curIndex) return this.change(newValue);
this.data.list = newValue;
+ // console.log(this.data.list);
this.$nextTick(() => {
this.initValue(this.curIndex, 'watch==>');
})
@@ -278,6 +313,25 @@
}, 10)
}
},
+ changeValue(newValue) {
+ if(newValue) {
+ if(this.biaosTitle == '工班下拉') {
+ this.refresh()
+ // 每列的数据初始化
+
+ console.log(this.idContent);
+ this.data[`column_${this.idIndex}_values`].gbValue = this.idContent[0]
+ this.data[`column_${this.idIndex}_values`].gbTextValue = this.idContent[1]
+ console.log(this.data[`column_${this.idIndex}_values`]);
+ // this.value[this.idIndex].gbTextValue = this.idContent[1]
+ // this.data.list[this.idIndex].gbValue = this.idContent[0]
+ // this.data.list[this.idIndex].gbTextValue = this.idContent[1]
+ // console.log(this.value);
+ }
+ this.$emit("updataValue")
+ }
+ // this.data.list = this.value
+ },
column(newValue) {
this.refresh();
}
@@ -320,4 +374,4 @@
}
}
}
-
+
\ No newline at end of file
diff --git a/uni_modules/helang-waterfall/components/waterfall/waterfall-item.vue b/uni_modules/helang-waterfall/components/waterfall/waterfall-item.vue
deleted file mode 100644
index 489496f..0000000
--- a/uni_modules/helang-waterfall/components/waterfall/waterfall-item.vue
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
-
-
- {{params.title}}
- {{params.money}}元
-
- {{params.label}}
-
- {{params.shop}}
- 123
-
-
-
-
-
-
-
-