ci-plus 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/cardPrint.ts +13 -8
package/package.json
CHANGED
package/src/utils/cardPrint.ts
CHANGED
|
@@ -698,19 +698,24 @@ export const cardPrint = (cParams: any, callback: (data: any) => void, baseUrl?:
|
|
|
698
698
|
// 通过循环 tqList 数组,将数组中的每一项合并到obj中
|
|
699
699
|
console.log('%c Line:699 🍰 套圈数组', 'color:#ed9ec7', tqList)
|
|
700
700
|
let obj4: any = {}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
701
|
+
if (tqList.length > 0) {
|
|
702
|
+
for (let i = 0; i < tqList.length; i++) {
|
|
703
|
+
const item = tqList[i]
|
|
704
|
+
console.log('%c Line:703 🌰 item', 'color:#ffdd4d', item)
|
|
705
|
+
const rowIndex = Math.floor(i / 2) + (row + 1) // 从r8c1开始这里就是8
|
|
706
|
+
const columnIndex = (i % 2) * 2 + 1
|
|
707
|
+
obj4[`r${rowIndex}c${columnIndex}`] = item.label
|
|
708
|
+
obj4[`r${rowIndex}c${columnIndex + 1}`] = item.value
|
|
709
|
+
}
|
|
708
710
|
}
|
|
709
711
|
console.log('%c Line:709 🌭 obj4', 'color:#42b983', obj4)
|
|
710
712
|
//-------
|
|
711
713
|
|
|
712
714
|
// 获取obj4最后一条属性
|
|
713
|
-
let lastKey4 =
|
|
715
|
+
let lastKey4 = lastKey
|
|
716
|
+
if (Object.keys(obj4).length > 0) {
|
|
717
|
+
lastKey4 = Object.keys(obj4)[Object.keys(obj4).length - 1]
|
|
718
|
+
}
|
|
714
719
|
console.log('%c Line:714 🍻 lastKey4', 'color:#6ec1c2', lastKey4)
|
|
715
720
|
// 获取行号
|
|
716
721
|
let row4 = Number(parseInt(lastKey4.split('r')[1].split('c')[0]))
|