@indfnd/common-mobile 0.0.11 → 0.0.12
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/CHANGELOG.md +7 -0
- package/dist/ind-common-mobile.es.js +53 -18
- package/dist/ind-common-mobile.umd.cjs +33 -33
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.12](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.11...v0.0.12) (2024-03-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* detail-view暴露参数,切换单位 ([c29bb43](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/c29bb4327c9b99de589b3eaee887282c5bd95002))
|
|
11
|
+
|
|
5
12
|
### [0.0.11](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.10...v0.0.11) (2024-03-20)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -2,7 +2,7 @@ import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, checkIdCard, ch
|
|
|
2
2
|
import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
const name = "@indfnd/common-mobile";
|
|
5
|
-
const version$1 = "0.0.
|
|
5
|
+
const version$1 = "0.0.11";
|
|
6
6
|
const author = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -44276,7 +44276,9 @@ var render$i = function() {
|
|
|
44276
44276
|
return _vm.setForm(table, $event);
|
|
44277
44277
|
}, "fieldChange": function($event) {
|
|
44278
44278
|
return _vm.fieldChange(table, $event);
|
|
44279
|
-
}, "itemClick":
|
|
44279
|
+
}, "itemClick": function($event) {
|
|
44280
|
+
return _vm.itemClick($event, table);
|
|
44281
|
+
} } })];
|
|
44280
44282
|
} }], null, true) })], 1)];
|
|
44281
44283
|
}, { "table": table })] : _vm._e()];
|
|
44282
44284
|
}), _c("van-collapse", { model: { value: _vm.activeNames, callback: function($$v) {
|
|
@@ -44295,7 +44297,9 @@ var render$i = function() {
|
|
|
44295
44297
|
return _vm.setForm(cTable, $event);
|
|
44296
44298
|
}, "fieldChange": function($event) {
|
|
44297
44299
|
return _vm.fieldChange(cTable, $event);
|
|
44298
|
-
}, "itemClick":
|
|
44300
|
+
}, "itemClick": function($event) {
|
|
44301
|
+
return _vm.itemClick($event, cTable);
|
|
44302
|
+
} } })];
|
|
44299
44303
|
} }], null, true) })], 1)];
|
|
44300
44304
|
}, { "table": cTable })] : _vm._e()], 2);
|
|
44301
44305
|
}), 1)], 2), _vm._t("bottom", function() {
|
|
@@ -44412,10 +44416,10 @@ const __vue2_script$i = {
|
|
|
44412
44416
|
_.forEach(unitFields, (ddd) => {
|
|
44413
44417
|
if (this.dataUnit == "X" && this.pageUnit == "WZ") {
|
|
44414
44418
|
let t2 = _.round(parseFloat(dd[ddd]), 6);
|
|
44415
|
-
dd[ddd] = isNaN(t2) ? null : t2 * 5;
|
|
44419
|
+
dd[ddd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
|
|
44416
44420
|
} else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
|
|
44417
44421
|
let t2 = _.round(parseFloat(dd[ddd]), 6);
|
|
44418
|
-
dd[ddd] = isNaN(t2) ? null : t2 / 5;
|
|
44422
|
+
dd[ddd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
|
|
44419
44423
|
}
|
|
44420
44424
|
});
|
|
44421
44425
|
});
|
|
@@ -44423,10 +44427,10 @@ const __vue2_script$i = {
|
|
|
44423
44427
|
_.forEach(unitFields, (dd) => {
|
|
44424
44428
|
if (this.dataUnit == "X" && this.pageUnit == "WZ") {
|
|
44425
44429
|
let t2 = _.round(parseFloat(tmpData[dd]), 6);
|
|
44426
|
-
tmpData[dd] = isNaN(t2) ? null : t2 * 5;
|
|
44430
|
+
tmpData[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
|
|
44427
44431
|
} else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
|
|
44428
44432
|
let t2 = _.round(parseFloat(tmpData[dd]), 6);
|
|
44429
|
-
tmpData[dd] = isNaN(t2) ? null : t2 / 5;
|
|
44433
|
+
tmpData[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
|
|
44430
44434
|
}
|
|
44431
44435
|
});
|
|
44432
44436
|
}
|
|
@@ -44436,10 +44440,10 @@ const __vue2_script$i = {
|
|
|
44436
44440
|
_.forEach(unitFields, (dd) => {
|
|
44437
44441
|
if (this.dataUnit == "X" && this.pageUnit == "WZ") {
|
|
44438
44442
|
let t2 = _.round(parseFloat(dataSrc[dd]), 6);
|
|
44439
|
-
dataSrc[dd] = isNaN(t2) ? null : t2 * 5;
|
|
44443
|
+
dataSrc[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
|
|
44440
44444
|
} else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
|
|
44441
44445
|
let t2 = _.round(parseFloat(dataSrc[dd]), 6);
|
|
44442
|
-
dataSrc[dd] = isNaN(t2) ? null : t2 / 5;
|
|
44446
|
+
dataSrc[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
|
|
44443
44447
|
}
|
|
44444
44448
|
});
|
|
44445
44449
|
}
|
|
@@ -44465,10 +44469,10 @@ const __vue2_script$i = {
|
|
|
44465
44469
|
_.forEach(unitFields, (ddd) => {
|
|
44466
44470
|
if (this.dataUnit == "X" && this.pageUnit == "WZ") {
|
|
44467
44471
|
let t2 = _.round(parseFloat(dd[ddd]), 6);
|
|
44468
|
-
dd[ddd] = isNaN(t2) ? null : t2 / 5;
|
|
44472
|
+
dd[ddd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
|
|
44469
44473
|
} else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
|
|
44470
44474
|
let t2 = _.round(parseFloat(dd[ddd]), 6);
|
|
44471
|
-
dd[ddd] = isNaN(t2) ? null : t2 * 5;
|
|
44475
|
+
dd[ddd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
|
|
44472
44476
|
}
|
|
44473
44477
|
});
|
|
44474
44478
|
});
|
|
@@ -44476,10 +44480,10 @@ const __vue2_script$i = {
|
|
|
44476
44480
|
_.forEach(unitFields, (dd) => {
|
|
44477
44481
|
if (this.dataUnit == "X" && this.pageUnit == "WZ") {
|
|
44478
44482
|
let t2 = _.round(parseFloat(tmpData[dd]), 6);
|
|
44479
|
-
tmpData[dd] = isNaN(t2) ? null : t2 / 5;
|
|
44483
|
+
tmpData[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
|
|
44480
44484
|
} else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
|
|
44481
44485
|
let t2 = _.round(parseFloat(tmpData[dd]), 6);
|
|
44482
|
-
tmpData[dd] = isNaN(t2) ? null : t2 * 5;
|
|
44486
|
+
tmpData[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
|
|
44483
44487
|
}
|
|
44484
44488
|
});
|
|
44485
44489
|
}
|
|
@@ -44489,10 +44493,10 @@ const __vue2_script$i = {
|
|
|
44489
44493
|
_.forEach(unitFields, (dd) => {
|
|
44490
44494
|
if (this.dataUnit == "X" && this.pageUnit == "WZ") {
|
|
44491
44495
|
let t2 = _.round(parseFloat(dataSrc[dd]), 6);
|
|
44492
|
-
dataSrc[dd] = isNaN(t2) ? null : t2 / 5;
|
|
44496
|
+
dataSrc[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
|
|
44493
44497
|
} else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
|
|
44494
44498
|
let t2 = _.round(parseFloat(dataSrc[dd]), 6);
|
|
44495
|
-
dataSrc[dd] = isNaN(t2) ? null : t2 * 5;
|
|
44499
|
+
dataSrc[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
|
|
44496
44500
|
}
|
|
44497
44501
|
});
|
|
44498
44502
|
}
|
|
@@ -44501,8 +44505,24 @@ const __vue2_script$i = {
|
|
|
44501
44505
|
this.$emit("update:formValue", dataSrc);
|
|
44502
44506
|
},
|
|
44503
44507
|
fieldChange(table, event) {
|
|
44508
|
+
let itemClone = _.cloneDeep((event == null ? void 0 : event.row) || {});
|
|
44509
|
+
let unitFields = _.filter(table.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
|
|
44510
|
+
(m) => m.id
|
|
44511
|
+
);
|
|
44512
|
+
if (unitFields == null ? void 0 : unitFields.length) {
|
|
44513
|
+
_.forEach(unitFields, (dd) => {
|
|
44514
|
+
if (this.dataUnit == "X" && this.pageUnit == "WZ") {
|
|
44515
|
+
let t2 = _.round(parseFloat(itemClone[dd]), 6);
|
|
44516
|
+
itemClone[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
|
|
44517
|
+
} else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
|
|
44518
|
+
let t2 = _.round(parseFloat(itemClone[dd]), 6);
|
|
44519
|
+
itemClone[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
|
|
44520
|
+
}
|
|
44521
|
+
});
|
|
44522
|
+
}
|
|
44504
44523
|
this.$emit("fieldChange", {
|
|
44505
|
-
|
|
44524
|
+
formKey: event.formKey,
|
|
44525
|
+
row: itemClone,
|
|
44506
44526
|
table
|
|
44507
44527
|
});
|
|
44508
44528
|
},
|
|
@@ -44563,8 +44583,23 @@ const __vue2_script$i = {
|
|
|
44563
44583
|
async submit() {
|
|
44564
44584
|
this.$emit("submit");
|
|
44565
44585
|
},
|
|
44566
|
-
itemClick: _.debounce(function(item2) {
|
|
44567
|
-
|
|
44586
|
+
itemClick: _.debounce(function(item2, table) {
|
|
44587
|
+
let itemClone = _.cloneDeep(item2);
|
|
44588
|
+
let unitFields = _.filter(table.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
|
|
44589
|
+
(m) => m.id
|
|
44590
|
+
);
|
|
44591
|
+
if (unitFields == null ? void 0 : unitFields.length) {
|
|
44592
|
+
_.forEach(unitFields, (dd) => {
|
|
44593
|
+
if (this.dataUnit == "X" && this.pageUnit == "WZ") {
|
|
44594
|
+
let t2 = _.round(parseFloat(itemClone[dd]), 6);
|
|
44595
|
+
itemClone[dd] = isNaN(t2) ? null : _.round(t2 / 5, 6);
|
|
44596
|
+
} else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
|
|
44597
|
+
let t2 = _.round(parseFloat(itemClone[dd]), 6);
|
|
44598
|
+
itemClone[dd] = isNaN(t2) ? null : _.round(t2 * 5, 6);
|
|
44599
|
+
}
|
|
44600
|
+
});
|
|
44601
|
+
}
|
|
44602
|
+
this.$emit("itemClick", itemClone);
|
|
44568
44603
|
}, 1)
|
|
44569
44604
|
}
|
|
44570
44605
|
};
|