jtui3.0 1.0.67 → 1.0.69

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.
@@ -90447,7 +90447,7 @@ function useFilterData() {
90447
90447
  /*
90448
90448
  * @Author: leevan
90449
90449
  * @Date: 2022-07-12 16:59:44
90450
- * @LastEditTime: 2023-08-31 14:40:14
90450
+ * @LastEditTime: 2024-02-04 15:10:57
90451
90451
  * @LastEditors: leevan
90452
90452
  * @FilePath: /jtui3.0/packages/tables/hooks/useFormatter.js
90453
90453
  */
@@ -99449,11 +99449,11 @@ function cascadervue_type_template_id_6775b4a7_render(_ctx, _cache, $props, $set
99449
99449
  const cascader_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(cascadervue_type_script_lang_js, [['render',cascadervue_type_template_id_6775b4a7_render]])
99450
99450
 
99451
99451
  /* harmony default export */ var cascader = (cascader_exports_);
99452
- ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/tables/hooks/edit-render/cascader-select.vue?vue&type=template&id=5954d7fa
99452
+ ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/tables/hooks/edit-render/cascader-select.vue?vue&type=template&id=33ac6616
99453
99453
  /* unplugin-vue-components disabled */
99454
99454
 
99455
99455
 
99456
- function cascader_selectvue_type_template_id_5954d7fa_render(_ctx, _cache, $props, $setup, $data, $options) {
99456
+ function cascader_selectvue_type_template_id_33ac6616_render(_ctx, _cache, $props, $setup, $data, $options) {
99457
99457
  const _component_el_option = ElOption;
99458
99458
 
99459
99459
  const _component_el_select = ElSelect;
@@ -99473,7 +99473,7 @@ function cascader_selectvue_type_template_id_5954d7fa_render(_ctx, _cache, $prop
99473
99473
  _: 1
99474
99474
  }, 8, ["onChange", "onVisibleChange"])]);
99475
99475
  }
99476
- ;// CONCATENATED MODULE: ./packages/tables/hooks/edit-render/cascader-select.vue?vue&type=template&id=5954d7fa
99476
+ ;// CONCATENATED MODULE: ./packages/tables/hooks/edit-render/cascader-select.vue?vue&type=template&id=33ac6616
99477
99477
  /* unplugin-vue-components disabled */
99478
99478
  ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/tables/hooks/edit-render/cascader-select.vue?vue&type=script&lang=js
99479
99479
  /* unplugin-vue-components disabled */
@@ -99497,7 +99497,12 @@ function cascader_selectvue_type_template_id_5954d7fa_render(_ctx, _cache, $prop
99497
99497
  selectValue.value = row[column.field];
99498
99498
 
99499
99499
  if (Array.isArray(opts)) {
99500
- options.value = opts;
99500
+ row.cascaderOpt = {};
99501
+ row.cascaderOpt[column.field] = opts;
99502
+ }
99503
+
99504
+ if ('cascaderOpt' in row && column.field in row.cascaderOpt) {
99505
+ options.value = row.cascaderOpt[column.field];
99501
99506
  }
99502
99507
  }
99503
99508
 
@@ -99513,10 +99518,9 @@ function cascader_selectvue_type_template_id_5954d7fa_render(_ctx, _cache, $prop
99513
99518
  const {
99514
99519
  path,
99515
99520
  params,
99516
- nextProp,
99517
- options: opts
99521
+ nextProp
99518
99522
  } = column.editRender;
99519
- const temp = opts.find(item => item.value === data);
99523
+ const temp = row.cascaderOpt[column.field].find(item => item.value === data);
99520
99524
  row[column.field] = temp;
99521
99525
 
99522
99526
  if (nextProp) {
@@ -99524,14 +99528,39 @@ function cascader_selectvue_type_template_id_5954d7fa_render(_ctx, _cache, $prop
99524
99528
  axios.post(path + '/' + data, params).then(async ({
99525
99529
  data: res
99526
99530
  }) => {
99527
- nextCol.editRender.options = res;
99531
+ if ('cascaderOpt' in row && nextCol) {
99532
+ row.cascaderOpt[nextCol.field] = res;
99533
+ clearNextCol(nextCol);
99534
+ }
99528
99535
 
99529
99536
  if ($table) {
99530
99537
  await $table.clearEdit();
99531
99538
  }
99532
99539
  });
99533
99540
  }
99534
- }
99541
+
99542
+ function clearNextCol(nextCol) {
99543
+ if (nextCol) {
99544
+ row[nextCol.field] = '';
99545
+ const {
99546
+ nextProp
99547
+ } = nextCol.editRender;
99548
+ const nextColChild = $table.getColumnByField(nextProp);
99549
+ clearNextCol(nextColChild);
99550
+ }
99551
+ }
99552
+ } // function mockChild(){
99553
+ // return [
99554
+ // {
99555
+ // label:`这是${Math.floor(Math.random() * 1000) + 1}`,
99556
+ // value:Math.floor(Math.random() * 1000) + 1
99557
+ // },{
99558
+ // label:`这是${Math.floor(Math.random() * 1000) + 1}`,
99559
+ // value:Math.floor(Math.random() * 1000) + 1
99560
+ // }
99561
+ // ]
99562
+ // }
99563
+
99535
99564
 
99536
99565
  async function visibleChange(val) {
99537
99566
  if (val === false) {
@@ -99558,14 +99587,14 @@ function cascader_selectvue_type_template_id_5954d7fa_render(_ctx, _cache, $prop
99558
99587
 
99559
99588
 
99560
99589
  ;
99561
- const cascader_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(cascader_selectvue_type_script_lang_js, [['render',cascader_selectvue_type_template_id_5954d7fa_render]])
99590
+ const cascader_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(cascader_selectvue_type_script_lang_js, [['render',cascader_selectvue_type_template_id_33ac6616_render]])
99562
99591
 
99563
99592
  /* harmony default export */ var cascader_select = (cascader_select_exports_);
99564
- ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/tables/hooks/edit-render/cus-select.vue?vue&type=template&id=411a42b6
99593
+ ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/tables/hooks/edit-render/cus-select.vue?vue&type=template&id=61f3ece2
99565
99594
  /* unplugin-vue-components disabled */
99566
99595
 
99567
99596
 
99568
- function cus_selectvue_type_template_id_411a42b6_render(_ctx, _cache, $props, $setup, $data, $options) {
99597
+ function cus_selectvue_type_template_id_61f3ece2_render(_ctx, _cache, $props, $setup, $data, $options) {
99569
99598
  const _component_el_option = ElOption;
99570
99599
 
99571
99600
  const _component_el_select = ElSelect;
@@ -99591,7 +99620,7 @@ function cus_selectvue_type_template_id_411a42b6_render(_ctx, _cache, $props, $s
99591
99620
  _: 1
99592
99621
  }, 8, ["modelValue", "filterable", "allow-create", "multiple", "onChange", "onVisibleChange"])]);
99593
99622
  }
99594
- ;// CONCATENATED MODULE: ./packages/tables/hooks/edit-render/cus-select.vue?vue&type=template&id=411a42b6
99623
+ ;// CONCATENATED MODULE: ./packages/tables/hooks/edit-render/cus-select.vue?vue&type=template&id=61f3ece2
99595
99624
  /* unplugin-vue-components disabled */
99596
99625
  ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/tables/hooks/edit-render/cus-select.vue?vue&type=script&lang=js
99597
99626
  /* unplugin-vue-components disabled */
@@ -99602,7 +99631,6 @@ function cus_selectvue_type_template_id_411a42b6_render(_ctx, _cache, $props, $s
99602
99631
  const tableVM = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toRef)(props, 'params');
99603
99632
  const value = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)('');
99604
99633
  const options = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)([]);
99605
- console.log(tableVM);
99606
99634
  load();
99607
99635
 
99608
99636
  function load() {
@@ -99657,7 +99685,7 @@ function cus_selectvue_type_template_id_411a42b6_render(_ctx, _cache, $props, $s
99657
99685
 
99658
99686
 
99659
99687
  ;
99660
- const cus_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(cus_selectvue_type_script_lang_js, [['render',cus_selectvue_type_template_id_411a42b6_render]])
99688
+ const cus_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(cus_selectvue_type_script_lang_js, [['render',cus_selectvue_type_template_id_61f3ece2_render]])
99661
99689
 
99662
99690
  /* harmony default export */ var cus_select = (cus_select_exports_);
99663
99691
  ;// CONCATENATED MODULE: ./packages/tables/hooks/edit-render/edit-render.js
@@ -105058,7 +105086,7 @@ const ElColorPicker = _ColorPicker;
105058
105086
 
105059
105087
 
105060
105088
 
105061
- ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/echarts/index.vue?vue&type=template&id=422c2ffa&scoped=true
105089
+ ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/echarts/index.vue?vue&type=template&id=c5c6e504&scoped=true
105062
105090
  /* unplugin-vue-components disabled */
105063
105091
 
105064
105092
 
@@ -105068,26 +105096,26 @@ const ElColorPicker = _ColorPicker;
105068
105096
 
105069
105097
 
105070
105098
 
105071
- const echartsvue_type_template_id_422c2ffa_scoped_true_withScopeId = n => (_pushScopeId("data-v-422c2ffa"), n = n(), _popScopeId(), n);
105099
+ const echartsvue_type_template_id_c5c6e504_scoped_true_withScopeId = n => (_pushScopeId("data-v-c5c6e504"), n = n(), _popScopeId(), n);
105072
105100
 
105073
- const echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_1 = {
105101
+ const echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_1 = {
105074
105102
  class: "echarts-wapper"
105075
105103
  };
105076
- const echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_2 = ["id"];
105104
+ const echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_2 = ["id"];
105077
105105
 
105078
- const echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_3 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("实线");
105106
+ const echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_3 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("实线");
105079
105107
 
105080
- const echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_4 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("虚线");
105108
+ const echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_4 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("虚线");
105081
105109
 
105082
- const echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("点");
105110
+ const echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("点");
105083
105111
 
105084
- const echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("实线");
105112
+ const echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("实线");
105085
105113
 
105086
- const echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("虚线");
105114
+ const echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("虚线");
105087
105115
 
105088
- const echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_8 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("点");
105116
+ const echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_8 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)("点");
105089
105117
 
105090
- function echartsvue_type_template_id_422c2ffa_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
105118
+ function echartsvue_type_template_id_c5c6e504_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
105091
105119
  const _component_el_switch = ElSwitch;
105092
105120
 
105093
105121
  const _component_el_form_item = ElFormItem;
@@ -105102,11 +105130,11 @@ function echartsvue_type_template_id_422c2ffa_scoped_true_render(_ctx, _cache, $
105102
105130
 
105103
105131
  const _component_el_dialog = ElDialog;
105104
105132
 
105105
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
105133
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
105106
105134
  ref: el => $setup.setRef(el),
105107
105135
  id: $props.id,
105108
105136
  class: "jt-chart-vm"
105109
- }, null, 8, echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_2), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
105137
+ }, null, 8, echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_2), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
105110
105138
  class: "jtIcon iconpeizhi41 eitid-icon",
105111
105139
  onClick: _cache[0] || (_cache[0] = $event => $setup.dialogVisible = true)
105112
105140
  }), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_el_dialog, {
@@ -105189,21 +105217,21 @@ function echartsvue_type_template_id_422c2ffa_scoped_true_render(_ctx, _cache, $
105189
105217
  "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => $setup.gridLineConfig.lineType = $event),
105190
105218
  label: "solid"
105191
105219
  }, {
105192
- default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_3]),
105220
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_3]),
105193
105221
  _: 1
105194
105222
  }, 8, ["modelValue"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_el_radio, {
105195
105223
  modelValue: $setup.gridLineConfig.lineType,
105196
105224
  "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => $setup.gridLineConfig.lineType = $event),
105197
105225
  label: "dashed"
105198
105226
  }, {
105199
- default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_4]),
105227
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_4]),
105200
105228
  _: 1
105201
105229
  }, 8, ["modelValue"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_el_radio, {
105202
105230
  modelValue: $setup.gridLineConfig.lineType,
105203
105231
  "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => $setup.gridLineConfig.lineType = $event),
105204
105232
  label: "dotted"
105205
105233
  }, {
105206
- default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_5]),
105234
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_5]),
105207
105235
  _: 1
105208
105236
  }, 8, ["modelValue"])]),
105209
105237
  _: 1
@@ -105250,21 +105278,21 @@ function echartsvue_type_template_id_422c2ffa_scoped_true_render(_ctx, _cache, $
105250
105278
  "onUpdate:modelValue": _cache[15] || (_cache[15] = $event => $setup.tickLineConfig.lineType = $event),
105251
105279
  label: "solid"
105252
105280
  }, {
105253
- default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_6]),
105281
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_6]),
105254
105282
  _: 1
105255
105283
  }, 8, ["modelValue"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_el_radio, {
105256
105284
  modelValue: $setup.tickLineConfig.lineType,
105257
105285
  "onUpdate:modelValue": _cache[16] || (_cache[16] = $event => $setup.tickLineConfig.lineType = $event),
105258
105286
  label: "dashed"
105259
105287
  }, {
105260
- default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_7]),
105288
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_7]),
105261
105289
  _: 1
105262
105290
  }, 8, ["modelValue"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_el_radio, {
105263
105291
  modelValue: $setup.tickLineConfig.lineType,
105264
105292
  "onUpdate:modelValue": _cache[17] || (_cache[17] = $event => $setup.tickLineConfig.lineType = $event),
105265
105293
  label: "dotted"
105266
105294
  }, {
105267
- default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_422c2ffa_scoped_true_hoisted_8]),
105295
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [echartsvue_type_template_id_c5c6e504_scoped_true_hoisted_8]),
105268
105296
  _: 1
105269
105297
  }, 8, ["modelValue"])]),
105270
105298
  _: 1
@@ -105274,7 +105302,7 @@ function echartsvue_type_template_id_422c2ffa_scoped_true_render(_ctx, _cache, $
105274
105302
  _: 1
105275
105303
  }, 8, ["modelValue"])]);
105276
105304
  }
105277
- ;// CONCATENATED MODULE: ./packages/echarts/index.vue?vue&type=template&id=422c2ffa&scoped=true
105305
+ ;// CONCATENATED MODULE: ./packages/echarts/index.vue?vue&type=template&id=c5c6e504&scoped=true
105278
105306
  /* unplugin-vue-components disabled */
105279
105307
  ;// CONCATENATED MODULE: ./node_modules/echarts/node_modules/tslib/tslib.es6.js
105280
105308
 
@@ -223810,6 +223838,14 @@ const erd = element_resize_detector_default()();
223810
223838
  //自定义事件间隔
223811
223839
  customIntrerVal: {
223812
223840
  type: Number
223841
+ },
223842
+ yLeft: {
223843
+ type: String,
223844
+ default: ''
223845
+ },
223846
+ yRight: {
223847
+ type: String,
223848
+ default: ''
223813
223849
  }
223814
223850
  },
223815
223851
 
@@ -223828,22 +223864,29 @@ const erd = element_resize_detector_default()();
223828
223864
 
223829
223865
  let chartVM;
223830
223866
  let option;
223831
- let tempArray = [];
223867
+ const isDoubleY = props.data.findIndex(item => 'yAxisIndex' in item && item.yAxisIndex == 1) != -1;
223868
+ let tempArray = []; //左边y轴的数据
223869
+
223870
+ let tempArrayRight = []; //右边y轴的数据
223871
+
223832
223872
  props.data.forEach(item => {
223833
- tempArray = tempArray.concat(item.data);
223873
+ if ('yAxisIndex' in item && item.yAxisIndex == 1) {
223874
+ tempArrayRight = tempArrayRight.concat(item.data);
223875
+ } else {
223876
+ tempArray = tempArray.concat(item.data);
223877
+ }
223834
223878
  });
223835
223879
 
223836
223880
  if (timeRange.value && tempArray.length != 0) {
223837
- const {
223838
- minVal,
223839
- maxVal
223840
- } = getMaxAndMinValue();
223841
223881
  option = {
223842
223882
  xAxis: {
223843
223883
  type: "value",
223844
223884
  min: new Date(timeRange.value[0]).getTime(),
223845
223885
  max: new Date(timeRange.value[1]).getTime(),
223846
223886
  interval: 6 * 60 * 60 * 1000,
223887
+ nameTextStyle: {
223888
+ padding: [0, 0, 0, 20]
223889
+ },
223847
223890
  axisLabel: {
223848
223891
  formatter: function (e) {
223849
223892
  let temp;
@@ -223891,17 +223934,35 @@ const erd = element_resize_detector_default()();
223891
223934
  tooltip: {
223892
223935
  trigger: 'axis',
223893
223936
  formatter: params => {
223894
- return `${dayjs_dayjs_min_default()(params[0].data[0]).format('YYYY-MM-DD HH:mm')}
223895
- <br/>${params[0].seriesName}:${params[0].data[1]}`;
223937
+ let str = '';
223938
+ params.forEach(item => {
223939
+ str += `<br/>${item.seriesName}:${item.data[1]}`;
223940
+ });
223941
+ return `${dayjs_dayjs_min_default()(params[0].data[0]).format('YYYY-MM-DD HH:mm')}${str}`;
223896
223942
  }
223897
223943
  },
223944
+ grid: {
223945
+ bottom: 80
223946
+ },
223898
223947
  legend: {
223899
223948
  data: []
223900
223949
  },
223901
- yAxis: {
223902
- type: 'value',
223903
- min: minVal,
223904
- max: maxVal,
223950
+ yAxis: [],
223951
+ dataZoom: [{
223952
+ type: 'inside',
223953
+ xAxisIndex: 0
223954
+ }, {
223955
+ type: 'slider',
223956
+ xAxisIndex: 0
223957
+ }],
223958
+ series: props.data
223959
+ };
223960
+
223961
+ if (isDoubleY) {
223962
+ option.yAxis = [{
223963
+ name: props.yLeft,
223964
+ min: 0,
223965
+ max: 0,
223905
223966
  minorTick: {
223906
223967
  show: true,
223907
223968
  lineStyle: {}
@@ -223918,16 +223979,66 @@ const erd = element_resize_detector_default()();
223918
223979
  color: '#333'
223919
223980
  }
223920
223981
  }
223921
- },
223922
- dataZoom: [{
223923
- type: 'inside',
223924
- xAxisIndex: 0
223925
223982
  }, {
223926
- type: 'slider',
223927
- xAxisIndex: 0
223928
- }],
223929
- series: props.data
223930
- };
223983
+ name: props.yRight,
223984
+ min: 0,
223985
+ max: 5,
223986
+ minorTick: {
223987
+ show: true,
223988
+ lineStyle: {}
223989
+ },
223990
+ minorSplitLine: {
223991
+ show: true,
223992
+ lineStyle: {
223993
+ color: '#ccc'
223994
+ }
223995
+ },
223996
+ splitLine: {
223997
+ show: true,
223998
+ lineStyle: {
223999
+ color: '#333'
224000
+ }
224001
+ }
224002
+ }];
224003
+ } else {
224004
+ option.yAxis = [{
224005
+ name: props.yLeft,
224006
+ min: 0,
224007
+ max: 0,
224008
+ minorTick: {
224009
+ show: true,
224010
+ lineStyle: {}
224011
+ },
224012
+ minorSplitLine: {
224013
+ show: true,
224014
+ lineStyle: {
224015
+ color: '#ccc'
224016
+ }
224017
+ },
224018
+ splitLine: {
224019
+ show: true,
224020
+ lineStyle: {
224021
+ color: '#333'
224022
+ }
224023
+ }
224024
+ }];
224025
+ }
224026
+
224027
+ const {
224028
+ minVal,
224029
+ maxVal
224030
+ } = getMaxAndMinValue(tempArray);
224031
+ option.yAxis[0].min = minVal;
224032
+ option.yAxis[0].max = maxVal;
224033
+
224034
+ if (isDoubleY) {
224035
+ const {
224036
+ minVal: minValRight,
224037
+ maxValRight
224038
+ } = getMaxAndMinValue(tempArrayRight);
224039
+ option.yAxis[1].min = minValRight;
224040
+ option.yAxis[1].max = maxValRight;
224041
+ }
223931
224042
  } else {
223932
224043
  option = {
223933
224044
  title: {
@@ -224019,7 +224130,6 @@ const erd = element_resize_detector_default()();
224019
224130
  option.xAxis.max = maxTime;
224020
224131
  option.legend.data = option.series.map(item => item.name);
224021
224132
  setGridLine(gridLineConfig);
224022
- console.log(option, 111);
224023
224133
  chartVM.setOption(option, true);
224024
224134
  } //监听网格线相关设置操作
224025
224135
 
@@ -224036,36 +224146,95 @@ const erd = element_resize_detector_default()();
224036
224146
 
224037
224147
  function setGridLine(obj) {
224038
224148
  option.xAxis.minorTick.show = obj.tickX;
224039
- option.yAxis.minorTick.show = obj.tickY;
224149
+ option.yAxis[0].minorTick.show = obj.tickY;
224150
+
224151
+ if (isDoubleY) {
224152
+ option.yAxis[1].minorTick.show = obj.tickY;
224153
+ }
224154
+
224040
224155
  option.xAxis.minorSplitLine.show = obj.lineX;
224041
- option.yAxis.minorSplitLine.show = obj.lineY;
224156
+ option.yAxis[0].minorSplitLine.show = obj.lineY;
224157
+
224158
+ if (isDoubleY) {
224159
+ option.yAxis[1].minorSplitLine.show = obj.lineY;
224160
+ }
224161
+
224042
224162
  option.xAxis.minorSplitLine.lineStyle.color = obj.lineColor;
224043
- option.yAxis.minorSplitLine.lineStyle.color = obj.lineColor;
224163
+ option.yAxis[0].minorSplitLine.lineStyle.color = obj.lineColor;
224164
+
224165
+ if (isDoubleY) {
224166
+ option.yAxis[1].minorSplitLine.lineStyle.color = obj.lineColor;
224167
+ }
224168
+
224044
224169
  option.xAxis.minorTick.lineStyle.width = obj.lineWidth;
224045
- option.yAxis.minorTick.lineStyle.width = obj.lineWidth;
224170
+ option.yAxis[0].minorTick.lineStyle.width = obj.lineWidth;
224171
+
224172
+ if (isDoubleY) {
224173
+ option.yAxis[1].minorTick.lineStyle.width = obj.lineWidth;
224174
+ }
224175
+
224046
224176
  option.xAxis.minorSplitLine.lineStyle.width = obj.lineWidth;
224047
- option.yAxis.minorSplitLine.lineStyle.width = obj.lineWidth;
224177
+ option.yAxis[0].minorSplitLine.lineStyle.width = obj.lineWidth;
224178
+
224179
+ if (isDoubleY) {
224180
+ option.yAxis[1].minorSplitLine.lineStyle.width = obj.lineWidth;
224181
+ }
224182
+
224048
224183
  option.xAxis.minorTick.lineStyle.type = obj.lineType;
224049
- option.yAxis.minorTick.lineStyle.type = obj.lineType;
224184
+ option.yAxis[0].minorTick.lineStyle.type = obj.lineType;
224185
+
224186
+ if (isDoubleY) {
224187
+ option.yAxis[1].minorTick.lineStyle.type = obj.lineType;
224188
+ }
224189
+
224050
224190
  option.xAxis.minorSplitLine.lineStyle.type = obj.lineType;
224051
- option.yAxis.minorSplitLine.lineStyle.type = obj.lineType;
224191
+ option.yAxis[0].minorSplitLine.lineStyle.type = obj.lineType;
224192
+
224193
+ if (isDoubleY) {
224194
+ option.yAxis[1].minorSplitLine.lineStyle.type = obj.lineType;
224195
+ }
224196
+
224052
224197
  option.xAxis.minorTick.splitNumber = obj.splitNumber;
224198
+ option.yAxis[0].minorTick.splitNumber = obj.splitNumber;
224199
+
224200
+ if (isDoubleY) {
224201
+ option.yAxis[1].minorTick.splitNumber = obj.splitNumber;
224202
+ }
224053
224203
  } //刻度线相关设置
224054
224204
 
224055
224205
 
224056
224206
  function setTickLine(obj) {
224057
224207
  //显隐
224058
224208
  option.xAxis.splitLine.show = obj.tickX;
224059
- option.yAxis.splitLine.show = obj.tickY; //颜色
224209
+ option.yAxis[0].splitLine.show = obj.tickY;
224210
+
224211
+ if (isDoubleY) {
224212
+ option.yAxis[1].splitLine.show = obj.tickY;
224213
+ } //颜色
224214
+
224060
224215
 
224061
224216
  option.xAxis.splitLine.lineStyle.color = obj.lineColor;
224062
- option.yAxis.splitLine.lineStyle.color = obj.lineColor; //线宽
224217
+ option.yAxis[0].splitLine.lineStyle.color = obj.lineColor;
224218
+
224219
+ if (isDoubleY) {
224220
+ option.yAxis[1].splitLine.lineStyle.color = obj.lineColor;
224221
+ } //线宽
224222
+
224063
224223
 
224064
224224
  option.xAxis.splitLine.lineStyle.width = obj.lineWidth;
224065
- option.yAxis.splitLine.lineStyle.width = obj.lineWidth; //类型
224225
+ option.yAxis[0].splitLine.lineStyle.width = obj.lineWidth;
224226
+
224227
+ if (isDoubleY) {
224228
+ option.yAxis[1].splitLine.lineStyle.width = obj.lineWidth;
224229
+ } //类型
224230
+
224066
224231
 
224067
224232
  option.xAxis.splitLine.lineStyle.type = obj.lineType;
224068
- option.yAxis.splitLine.lineStyle.type = obj.lineType;
224233
+ option.yAxis[0].splitLine.lineStyle.type = obj.lineType;
224234
+
224235
+ if (isDoubleY) {
224236
+ option.yAxis[1].splitLine.lineStyle.type = obj.lineType;
224237
+ }
224069
224238
  } //自定义配置持久化
224070
224239
 
224071
224240
 
@@ -224088,13 +224257,19 @@ const erd = element_resize_detector_default()();
224088
224257
  } //计算图表y轴最大值和最小值
224089
224258
 
224090
224259
 
224091
- function getMaxAndMinValue() {
224260
+ function getMaxAndMinValue(tempArray) {
224092
224261
  let minVal, maxVal;
224093
- const tempArraySort = tempArray.sort((a, b) => {
224262
+ const tempArraySort = tempArray.filter(item => item[1] != null).sort((a, b) => {
224094
224263
  return a[1] - b[1];
224095
224264
  });
224096
- minVal = tempArraySort[0][1];
224097
- maxVal = tempArraySort[tempArraySort.length - 1][1];
224265
+
224266
+ if (tempArraySort.length == 0) {
224267
+ minVal = 0, maxVal = 1;
224268
+ } else {
224269
+ minVal = tempArraySort[0][1];
224270
+ maxVal = tempArraySort[tempArraySort.length - 1][1];
224271
+ }
224272
+
224098
224273
  const sub = maxVal - minVal;
224099
224274
  minVal = Math.floor((minVal - sub * props.maxAndMinLevel) * Math.pow(10, props.yMaxAndMinkeepDecimal)) / Math.pow(10, props.yMaxAndMinkeepDecimal);
224100
224275
  maxVal = Math.ceil((maxVal + sub * props.maxAndMinLevel) * Math.pow(10, props.yMaxAndMinkeepDecimal)) / Math.pow(10, props.yMaxAndMinkeepDecimal);
@@ -224120,10 +224295,10 @@ const erd = element_resize_detector_default()();
224120
224295
  });
224121
224296
  ;// CONCATENATED MODULE: ./packages/echarts/index.vue?vue&type=script&lang=js
224122
224297
  /* unplugin-vue-components disabled */
224123
- ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/echarts/index.vue?vue&type=style&index=0&id=422c2ffa&lang=scss&scoped=true
224298
+ ;// CONCATENATED MODULE: ./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[33].use[0]!./node_modules/unplugin/dist/webpack/loaders/transform.js??ruleSet[1].rules[34].use[0]!./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./packages/echarts/index.vue?vue&type=style&index=0&id=c5c6e504&lang=scss&scoped=true
224124
224299
  /* unplugin-vue-components disabled */// extracted by mini-css-extract-plugin
224125
224300
 
224126
- ;// CONCATENATED MODULE: ./packages/echarts/index.vue?vue&type=style&index=0&id=422c2ffa&lang=scss&scoped=true
224301
+ ;// CONCATENATED MODULE: ./packages/echarts/index.vue?vue&type=style&index=0&id=c5c6e504&lang=scss&scoped=true
224127
224302
  /* unplugin-vue-components disabled */
224128
224303
  ;// CONCATENATED MODULE: ./packages/echarts/index.vue
224129
224304
  /* unplugin-vue-components disabled */
@@ -224133,7 +224308,7 @@ const erd = element_resize_detector_default()();
224133
224308
  ;
224134
224309
 
224135
224310
 
224136
- const echarts_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(echartsvue_type_script_lang_js, [['render',echartsvue_type_template_id_422c2ffa_scoped_true_render],['__scopeId',"data-v-422c2ffa"]])
224311
+ const echarts_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(echartsvue_type_script_lang_js, [['render',echartsvue_type_template_id_c5c6e504_scoped_true_render],['__scopeId',"data-v-c5c6e504"]])
224137
224312
 
224138
224313
  /* harmony default export */ var echarts = (echarts_exports_);
224139
224314
  ;// CONCATENATED MODULE: ./packages/echarts/index.js