@indfnd/common-mobile 0.0.42 → 0.0.43

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 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.43](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.42...v0.0.43) (2024-07-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * 移动端协议报表修改 ([03513ae](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/03513ae72b0eb19a48f4593c489909fd8f007c09))
11
+
5
12
  ### [0.0.42](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.41...v0.0.42) (2024-07-02)
6
13
 
7
14
 
@@ -2,7 +2,7 @@ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage,
2
2
  import Vue$1 from "vue";
3
3
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
4
4
  const name$1 = "@indfnd/common-mobile";
5
- const version$2 = "0.0.41";
5
+ const version$2 = "0.0.42";
6
6
  const author$1 = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -44773,7 +44773,7 @@ var render$g = function() {
44773
44773
  var _vm = this;
44774
44774
  var _h = _vm.$createElement;
44775
44775
  var _c = _vm._self._c || _h;
44776
- return _c("div", { staticClass: "ind-page-view ind-flex-column" }, [_c("div", { staticClass: "ind-page" }, [_c("IndMobileTable", _vm._g(_vm._b({ ref: "table", attrs: { "columns": _vm.columns, "disablePage": "", "height": _vm.height, "showTableOption": false }, scopedSlots: _vm._u([{ key: "options", fn: function() {
44776
+ return _c("div", { staticClass: "ind-page-view ind-flex-column" }, [_c("div", { staticClass: "ind-page" }, [_c("IndMobileTable", _vm._g(_vm._b({ ref: "table", attrs: { "columns": _vm.columns, "disablePage": "", "height": _vm.height, "showTableOption": false, "defaultUnitType": _vm.defaultUnitType, "defaultTableUnitType": _vm.defaultTableUnitType }, scopedSlots: _vm._u([{ key: "options", fn: function() {
44777
44777
  return [_c("div", { staticStyle: { "color": "var(--ind-blue)" }, on: { "click": _vm.showCondition } }, [_vm._v("\u67E5\u8BE2\u6761\u4EF6")])];
44778
44778
  }, proxy: true }]), model: { value: _vm.data, callback: function($$v) {
44779
44779
  _vm.data = $$v;
@@ -44787,14 +44787,6 @@ var staticRenderFns$g = [];
44787
44787
  const __vue2_script$g = {
44788
44788
  name: "IndMQueryView",
44789
44789
  props: {
44790
- dataUnit: {
44791
- type: String,
44792
- default: "X"
44793
- },
44794
- pageUnit: {
44795
- type: String,
44796
- default: "X"
44797
- },
44798
44790
  dataApi: Function,
44799
44791
  loading: Boolean,
44800
44792
  bottom: Boolean,
@@ -44810,7 +44802,15 @@ const __vue2_script$g = {
44810
44802
  apiParams: Object,
44811
44803
  cardFields: Array,
44812
44804
  tableColumns: Array,
44813
- tableData: Array
44805
+ tableData: Array,
44806
+ defaultUnitType: {
44807
+ type: String,
44808
+ default: "WZ"
44809
+ },
44810
+ defaultTableUnitType: {
44811
+ type: String,
44812
+ default: "X"
44813
+ }
44814
44814
  },
44815
44815
  data() {
44816
44816
  return {
@@ -44846,6 +44846,7 @@ const __vue2_script$g = {
44846
44846
  tableData: {
44847
44847
  handler: function() {
44848
44848
  this.data = _.cloneDeep(this.tableData);
44849
+ this.$refs.table.toggleUnitIfNeeded();
44849
44850
  },
44850
44851
  deep: true
44851
44852
  },
@@ -44871,41 +44872,6 @@ const __vue2_script$g = {
44871
44872
  computed: {
44872
44873
  height() {
44873
44874
  return window.innerHeight - 160;
44874
- },
44875
- displayRows() {
44876
- let datas;
44877
- if (this.searchVal) {
44878
- datas = _.filter(this.rows, (d) => {
44879
- var _a;
44880
- let titleKey = (_a = _.find(this.formFieldList, (d2) => {
44881
- return !!d2.isTitle;
44882
- })) == null ? void 0 : _a.formKey;
44883
- return titleKey ? _.includes(d[titleKey], this.searchVal) : false;
44884
- }) || [];
44885
- } else {
44886
- datas = this.rows || [];
44887
- }
44888
- let dataSrc = _.cloneDeep(datas);
44889
- if (this.dataUnit == this.pageUnit) {
44890
- return dataSrc;
44891
- }
44892
- let unitFields = _.filter(this.formFieldList, (dd) => dd.isSwitchUnit === "true").map(
44893
- (m) => m.id
44894
- );
44895
- if (unitFields == null ? void 0 : unitFields.length) {
44896
- _.forEach(dataSrc, (dd) => {
44897
- _.forEach(unitFields, (ddd) => {
44898
- if (this.dataUnit == "X" && this.pageUnit == "WZ") {
44899
- let t2 = _.round(parseFloat(dd[ddd]), 6);
44900
- dd[ddd] = _.round(isNaN(t2) ? 0 : t2 * 5, 6);
44901
- } else if (this.dataUnit == "WZ" && this.pageUnit == "X") {
44902
- let t2 = _.round(parseFloat(dd[ddd]), 6);
44903
- dd[ddd] = _.round(isNaN(t2) ? 0 : t2 / 5, 6);
44904
- }
44905
- });
44906
- });
44907
- }
44908
- return dataSrc;
44909
44875
  }
44910
44876
  },
44911
44877
  methods: {