@haluo/biz 2.0.14 → 2.0.15

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/dist/haluo-biz.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ElTooltip, ElDivider, ElPopover, ElDialog, ElButton, ElRadio, ElInput, ElInfiniteScroll, ElMessage, ElIcon, ElFormItem, ElForm, ElMessageBox } from "element-plus";
1
+ import { ElTooltip, ElDivider, ElPopover, ElDialog, ElButton, ElRadio, ElInput, ElInfiniteScroll, ElMessage, ElIcon, ElSelect, ElOption, ElFormItem, ElForm, ElMessageBox } from "element-plus";
2
2
  import { defineComponent, ref, computed, openBlock, createElementBlock, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, unref, Fragment, renderList, withDirectives, isRef, vModelText, pushScopeId, popScopeId, watch, getCurrentScope, onScopeDispose, resolveComponent, resolveDirective, createVNode, withCtx, toDisplayString, createBlock, inject, renderSlot, createTextVNode, provide, toRefs, reactive, onMounted, withKeys, h, render, vShow } from "vue";
3
3
  import { Picture, CircleCloseFilled, Plus } from "@element-plus/icons-vue";
4
4
  import util from "@haluo/util";
@@ -527,49 +527,49 @@ const _hoisted_2$7 = { class: "tools-content" };
527
527
  const _hoisted_3$7 = ["src"];
528
528
  const _hoisted_4$6 = ["src"];
529
529
  const _hoisted_5$5 = ["src"];
530
- const _hoisted_6$2 = { class: "box" };
530
+ const _hoisted_6$3 = { class: "box" };
531
531
  const _hoisted_7$2 = ["src"];
532
- const _hoisted_8$1 = {
532
+ const _hoisted_8$2 = {
533
533
  key: 0,
534
534
  class: "box-mask"
535
535
  };
536
- const _hoisted_9$1 = { class: "tools-title" };
537
- const _hoisted_10$1 = ["src"];
538
- const _hoisted_11$1 = { class: "tools-font" };
539
- const _hoisted_12$1 = ["onClick"];
540
- const _hoisted_13$1 = { style: { "font-size": "10px" } };
541
- const _hoisted_14$1 = { class: "box" };
542
- const _hoisted_15$1 = ["src"];
543
- const _hoisted_16$1 = {
536
+ const _hoisted_9$2 = { class: "tools-title" };
537
+ const _hoisted_10$2 = ["src"];
538
+ const _hoisted_11$2 = { class: "tools-font" };
539
+ const _hoisted_12$2 = ["onClick"];
540
+ const _hoisted_13$2 = { style: { "font-size": "10px" } };
541
+ const _hoisted_14$2 = { class: "box" };
542
+ const _hoisted_15$2 = ["src"];
543
+ const _hoisted_16$2 = {
544
544
  key: 0,
545
545
  class: "box-mask"
546
546
  };
547
- const _hoisted_17 = { class: "box" };
548
- const _hoisted_18 = ["src"];
549
- const _hoisted_19 = {
547
+ const _hoisted_17$1 = { class: "box" };
548
+ const _hoisted_18$1 = ["src"];
549
+ const _hoisted_19$1 = {
550
550
  key: 0,
551
551
  class: "box-mask"
552
552
  };
553
- const _hoisted_20 = { class: "tools-title" };
554
- const _hoisted_21 = ["src"];
555
- const _hoisted_22 = ["src"];
556
- const _hoisted_23 = { class: "tools-title_content" };
557
- const _hoisted_24 = { class: "box" };
558
- const _hoisted_25 = ["src"];
559
- const _hoisted_26 = {
553
+ const _hoisted_20$1 = { class: "tools-title" };
554
+ const _hoisted_21$1 = ["src"];
555
+ const _hoisted_22$1 = ["src"];
556
+ const _hoisted_23$1 = { class: "tools-title_content" };
557
+ const _hoisted_24$1 = { class: "box" };
558
+ const _hoisted_25$1 = ["src"];
559
+ const _hoisted_26$1 = {
560
560
  key: 0,
561
561
  class: "box-mask"
562
562
  };
563
- const _hoisted_27 = { class: "box" };
564
- const _hoisted_28 = ["src"];
565
- const _hoisted_29 = {
563
+ const _hoisted_27$1 = { class: "box" };
564
+ const _hoisted_28$1 = ["src"];
565
+ const _hoisted_29$1 = {
566
566
  key: 0,
567
567
  class: "box-mask"
568
568
  };
569
- const _hoisted_30 = { class: "box" };
570
- const _hoisted_31 = ["src"];
571
- const _hoisted_32 = ["src"];
572
- const _hoisted_33 = ["src"];
569
+ const _hoisted_30$1 = { class: "box" };
570
+ const _hoisted_31$1 = ["src"];
571
+ const _hoisted_32$1 = ["src"];
572
+ const _hoisted_33$1 = ["src"];
573
573
  const _hoisted_34 = ["src"];
574
574
  const _hoisted_35 = { class: "tools-title" };
575
575
  const _hoisted_36 = ["src"];
@@ -659,7 +659,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
659
659
  placement: "top"
660
660
  }, {
661
661
  default: withCtx(() => [
662
- createElementVNode("div", _hoisted_6$2, [
662
+ createElementVNode("div", _hoisted_6$3, [
663
663
  createElementVNode("img", {
664
664
  src: $options.getImageUrl("tools_refresh@3x.png"),
665
665
  width: "40",
@@ -667,7 +667,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
667
667
  alt: "",
668
668
  onClick: _cache[3] || (_cache[3] = (...args) => $options.copyFormat && $options.copyFormat(...args))
669
669
  }, null, 8, _hoisted_7$2),
670
- $props.editor.cursorStyle !== "auto" ? (openBlock(), createElementBlock("div", _hoisted_8$1)) : createCommentVNode("", true)
670
+ $props.editor.cursorStyle !== "auto" ? (openBlock(), createElementBlock("div", _hoisted_8$2)) : createCommentVNode("", true)
671
671
  ])
672
672
  ]),
673
673
  _: 1
@@ -682,7 +682,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
682
682
  width: "152"
683
683
  }, {
684
684
  reference: withCtx(() => [
685
- createElementVNode("div", _hoisted_9$1, [
685
+ createElementVNode("div", _hoisted_9$2, [
686
686
  createVNode(_component_el_tooltip, {
687
687
  class: "item",
688
688
  effect: "dark",
@@ -701,7 +701,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
701
701
  width: "16",
702
702
  height: "40",
703
703
  alt: ""
704
- }, null, 8, _hoisted_10$1)
704
+ }, null, 8, _hoisted_10$2)
705
705
  ], 2)
706
706
  ]),
707
707
  _: 1
@@ -709,7 +709,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
709
709
  ])
710
710
  ]),
711
711
  default: withCtx(() => [
712
- withDirectives((openBlock(), createElementBlock("ul", _hoisted_11$1, [
712
+ withDirectives((openBlock(), createElementBlock("ul", _hoisted_11$2, [
713
713
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.fontsizes, (item, index) => {
714
714
  return openBlock(), createElementBlock("li", {
715
715
  class: normalizeClass([$data.activeFontsize + "px" === item.value ? "active" : ""]),
@@ -720,8 +720,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
720
720
  createElementVNode("span", {
721
721
  style: normalizeStyle({ fontSize: item.value })
722
722
  }, toDisplayString(item.name), 5),
723
- createElementVNode("span", _hoisted_13$1, toDisplayString(item.desc), 1)
724
- ], 10, _hoisted_12$1);
723
+ createElementVNode("span", _hoisted_13$2, toDisplayString(item.desc), 1)
724
+ ], 10, _hoisted_12$2);
725
725
  }), 128))
726
726
  ])), [
727
727
  [_directive_click_outside, $options.handlePopover]
@@ -740,7 +740,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
740
740
  placement: "top"
741
741
  }, {
742
742
  default: withCtx(() => [
743
- createElementVNode("div", _hoisted_14$1, [
743
+ createElementVNode("div", _hoisted_14$2, [
744
744
  createElementVNode("img", {
745
745
  src: $options.getImageUrl("tools_title@3x.png"),
746
746
  "data-editor-id": "makeHeader",
@@ -748,8 +748,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
748
748
  height: "40",
749
749
  alt: "",
750
750
  onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
751
- }, null, 8, _hoisted_15$1),
752
- $data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$1)) : createCommentVNode("", true)
751
+ }, null, 8, _hoisted_15$2),
752
+ $data.statusInfo && $data.statusInfo.title ? (openBlock(), createElementBlock("div", _hoisted_16$2)) : createCommentVNode("", true)
753
753
  ])
754
754
  ]),
755
755
  _: 1
@@ -761,15 +761,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
761
761
  placement: "top"
762
762
  }, {
763
763
  default: withCtx(() => [
764
- createElementVNode("div", _hoisted_17, [
764
+ createElementVNode("div", _hoisted_17$1, [
765
765
  createElementVNode("img", {
766
766
  src: $options.getImageUrl("tools_bold@3x.png"),
767
767
  width: "40",
768
768
  height: "40",
769
769
  alt: "",
770
770
  onClick: _cache[6] || (_cache[6] = ($event) => $options.setStyle($data.statusInfo.bold ? "removeBold" : "bold", "bold", !$data.statusInfo.bold))
771
- }, null, 8, _hoisted_18),
772
- $data.statusInfo && $data.statusInfo.bold ? (openBlock(), createElementBlock("div", _hoisted_19)) : createCommentVNode("", true)
771
+ }, null, 8, _hoisted_18$1),
772
+ $data.statusInfo && $data.statusInfo.bold ? (openBlock(), createElementBlock("div", _hoisted_19$1)) : createCommentVNode("", true)
773
773
  ])
774
774
  ]),
775
775
  _: 1
@@ -781,7 +781,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
781
781
  width: "152"
782
782
  }, {
783
783
  reference: withCtx(() => [
784
- createElementVNode("div", _hoisted_20, [
784
+ createElementVNode("div", _hoisted_20$1, [
785
785
  createVNode(_component_el_tooltip, {
786
786
  class: "item",
787
787
  effect: "dark",
@@ -799,13 +799,13 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
799
799
  width: "24",
800
800
  height: "40",
801
801
  alt: ""
802
- }, null, 8, _hoisted_21),
802
+ }, null, 8, _hoisted_21$1),
803
803
  createElementVNode("img", {
804
804
  src: $options.getImageUrl("tools_arrow@3x.png"),
805
805
  width: "16",
806
806
  height: "40",
807
807
  alt: ""
808
- }, null, 8, _hoisted_22)
808
+ }, null, 8, _hoisted_22$1)
809
809
  ], 2)
810
810
  ]),
811
811
  _: 1
@@ -813,7 +813,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
813
813
  ])
814
814
  ]),
815
815
  default: withCtx(() => [
816
- withDirectives((openBlock(), createElementBlock("ul", _hoisted_23, [
816
+ withDirectives((openBlock(), createElementBlock("ul", _hoisted_23$1, [
817
817
  createElementVNode("li", {
818
818
  "data-editor-id": "makeHeader",
819
819
  onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
@@ -840,15 +840,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
840
840
  placement: "top"
841
841
  }, {
842
842
  default: withCtx(() => [
843
- createElementVNode("div", _hoisted_24, [
843
+ createElementVNode("div", _hoisted_24$1, [
844
844
  createElementVNode("img", {
845
845
  src: $options.getImageUrl("tools_xie@3x.png"),
846
846
  width: "40",
847
847
  height: "40",
848
848
  alt: "",
849
849
  onClick: _cache[10] || (_cache[10] = ($event) => $options.setStyle($data.statusInfo.italic ? "removeItalic" : "italic", "italic", !$data.statusInfo.italic))
850
- }, null, 8, _hoisted_25),
851
- $data.statusInfo && $data.statusInfo.italic ? (openBlock(), createElementBlock("div", _hoisted_26)) : createCommentVNode("", true)
850
+ }, null, 8, _hoisted_25$1),
851
+ $data.statusInfo && $data.statusInfo.italic ? (openBlock(), createElementBlock("div", _hoisted_26$1)) : createCommentVNode("", true)
852
852
  ])
853
853
  ]),
854
854
  _: 1
@@ -860,15 +860,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
860
860
  placement: "top"
861
861
  }, {
862
862
  default: withCtx(() => [
863
- createElementVNode("div", _hoisted_27, [
863
+ createElementVNode("div", _hoisted_27$1, [
864
864
  createElementVNode("img", {
865
865
  src: $options.getImageUrl("tools_line@3x.png"),
866
866
  width: "40",
867
867
  height: "40",
868
868
  alt: "",
869
869
  onClick: _cache[11] || (_cache[11] = ($event) => $options.setStyle($data.statusInfo.underline ? "removeUnderline" : "underline", "underline", !$data.statusInfo.underline))
870
- }, null, 8, _hoisted_28),
871
- $data.statusInfo && $data.statusInfo.underline ? (openBlock(), createElementBlock("div", _hoisted_29)) : createCommentVNode("", true)
870
+ }, null, 8, _hoisted_28$1),
871
+ $data.statusInfo && $data.statusInfo.underline ? (openBlock(), createElementBlock("div", _hoisted_29$1)) : createCommentVNode("", true)
872
872
  ])
873
873
  ]),
874
874
  _: 1
@@ -881,14 +881,14 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
881
881
  placement: "top"
882
882
  }, {
883
883
  default: withCtx(() => [
884
- createElementVNode("div", _hoisted_30, [
884
+ createElementVNode("div", _hoisted_30$1, [
885
885
  createElementVNode("img", {
886
886
  src: $options.getImageUrl("icon_web_link@2x.png"),
887
887
  width: "40",
888
888
  height: "40",
889
889
  alt: "",
890
890
  onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
891
- }, null, 8, _hoisted_31)
891
+ }, null, 8, _hoisted_31$1)
892
892
  ])
893
893
  ]),
894
894
  _: 1
@@ -906,7 +906,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
906
906
  height: "40",
907
907
  alt: "",
908
908
  onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
909
- }, null, 8, _hoisted_32)
909
+ }, null, 8, _hoisted_32$1)
910
910
  ]),
911
911
  _: 1
912
912
  }),
@@ -926,7 +926,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
926
926
  width: "24",
927
927
  height: "40",
928
928
  alt: ""
929
- }, null, 8, _hoisted_33),
929
+ }, null, 8, _hoisted_33$1),
930
930
  createElementVNode("img", {
931
931
  src: $options.getImageUrl("tools_arrow@3x.png"),
932
932
  width: "16",
@@ -1108,20 +1108,22 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
1108
1108
  const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-719229ac"]]);
1109
1109
  const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
1110
1110
  const index_vue_vue_type_style_index_0_lang$4 = "";
1111
- const _hoisted_1$6 = { class: "basic-dialog_title" };
1112
- const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
1113
- const _hoisted_3$6 = {
1111
+ const _hoisted_1$6 = { key: 0 };
1112
+ const _hoisted_2$6 = { class: "basic-dialog_title" };
1113
+ const _hoisted_3$6 = /* @__PURE__ */ createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
1114
+ const _hoisted_4$5 = {
1114
1115
  key: 0,
1115
1116
  class: "dialog-footer"
1116
1117
  };
1117
- const _hoisted_4$5 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
1118
- const _hoisted_5$4 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
1118
+ const _hoisted_5$4 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
1119
+ const _hoisted_6$2 = /* @__PURE__ */ createTextVNode("\u786E\u8BA4");
1119
1120
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1120
1121
  name: "index",
1121
1122
  props: {
1122
1123
  visible: { type: Boolean, default: false },
1123
1124
  showBtn: { type: Boolean, default: true },
1124
- width: { default: "840px" }
1125
+ width: { default: "840px" },
1126
+ showTitle: { type: Boolean, default: true }
1125
1127
  },
1126
1128
  emits: ["submit", "cancel"],
1127
1129
  setup(__props, { emit: emits }) {
@@ -1152,26 +1154,26 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1152
1154
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
1153
1155
  "before-close": handleClose,
1154
1156
  width: __props.width,
1155
- class: "basic-dialog"
1157
+ class: normalizeClass(["basic-dialog", { "hide-title": !__props.showTitle }])
1156
1158
  }, {
1157
1159
  header: withCtx(() => [
1158
- createElementVNode("div", null, [
1159
- createElementVNode("div", _hoisted_1$6, [
1160
- _hoisted_2$6,
1160
+ __props.showTitle ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
1161
+ createElementVNode("div", _hoisted_2$6, [
1162
+ _hoisted_3$6,
1161
1163
  renderSlot(_ctx.$slots, "title")
1162
1164
  ])
1163
- ])
1165
+ ])) : createCommentVNode("", true)
1164
1166
  ]),
1165
1167
  footer: withCtx(() => [
1166
- __props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_3$6, [
1168
+ __props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_4$5, [
1167
1169
  createVNode(unref(ElButton), {
1168
- style: { "width": "120px", "border-color": "#CCCCCC", "color": "#333333" },
1170
+ style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
1169
1171
  plain: "",
1170
1172
  round: "",
1171
1173
  onClick: handleClose
1172
1174
  }, {
1173
1175
  default: withCtx(() => [
1174
- _hoisted_4$5
1176
+ _hoisted_5$4
1175
1177
  ]),
1176
1178
  _: 1
1177
1179
  }),
@@ -1182,7 +1184,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1182
1184
  onClick: confirm
1183
1185
  }, {
1184
1186
  default: withCtx(() => [
1185
- _hoisted_5$4
1187
+ _hoisted_6$2
1186
1188
  ]),
1187
1189
  _: 1
1188
1190
  })
@@ -1192,7 +1194,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1192
1194
  renderSlot(_ctx.$slots, "default")
1193
1195
  ]),
1194
1196
  _: 3
1195
- }, 8, ["modelValue", "width"]);
1197
+ }, 8, ["modelValue", "width", "class"]);
1196
1198
  };
1197
1199
  }
1198
1200
  });
@@ -1342,21 +1344,21 @@ const _hoisted_4$4 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u6587\u
1342
1344
  const _hoisted_5$3 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
1343
1345
  const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
1344
1346
  const _hoisted_7$1 = { class: "insert-article_input" };
1345
- const _hoisted_8 = {
1347
+ const _hoisted_8$1 = {
1346
1348
  key: 0,
1347
1349
  class: "nodata"
1348
1350
  };
1349
- const _hoisted_9 = ["infinite-scroll-disabled"];
1350
- const _hoisted_10 = {
1351
+ const _hoisted_9$1 = ["infinite-scroll-disabled"];
1352
+ const _hoisted_10$1 = {
1351
1353
  key: 0,
1352
1354
  class: "video-item"
1353
1355
  };
1354
- const _hoisted_11 = { class: "video-pic" };
1355
- const _hoisted_12 = ["src"];
1356
- const _hoisted_13 = ["src"];
1357
- const _hoisted_14 = { class: "video-text" };
1358
- const _hoisted_15 = { class: "dotdotdot2" };
1359
- const _hoisted_16 = {
1356
+ const _hoisted_11$1 = { class: "video-pic" };
1357
+ const _hoisted_12$1 = ["src"];
1358
+ const _hoisted_13$1 = ["src"];
1359
+ const _hoisted_14$1 = { class: "video-text" };
1360
+ const _hoisted_15$1 = { class: "dotdotdot2" };
1361
+ const _hoisted_16$1 = {
1360
1362
  key: 1,
1361
1363
  style: { "display": "inline-flex", "flex-direction": "column" }
1362
1364
  };
@@ -1513,7 +1515,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1513
1515
  _: 1
1514
1516
  }, 8, ["modelValue", "placeholder"])
1515
1517
  ]),
1516
- data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(`\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\u54E6\uFF0C\u4F60\u53EF\u4EE5\u8BD5\u8BD5\u641C\u7D22\u5176\u4ED6${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\uFF5E`), 1)) : withDirectives((openBlock(), createElementBlock("div", {
1518
+ data.data.length === 0 && !data.busy ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(`\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\u54E6\uFF0C\u4F60\u53EF\u4EE5\u8BD5\u8BD5\u641C\u7D22\u5176\u4ED6${unref(isVideo) ? "\u89C6\u9891" : "\u6587\u7AE0"}\uFF5E`), 1)) : withDirectives((openBlock(), createElementBlock("div", {
1517
1519
  key: 1,
1518
1520
  "infinite-scroll-immediate": false,
1519
1521
  class: "insert-article_list",
@@ -1533,22 +1535,22 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1533
1535
  default: withCtx(() => {
1534
1536
  var _a;
1535
1537
  return [
1536
- unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10, [
1537
- createElementVNode("div", _hoisted_11, [
1538
+ unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
1539
+ createElementVNode("div", _hoisted_11$1, [
1538
1540
  createElementVNode("img", {
1539
1541
  class: "video-pic",
1540
1542
  src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
1541
- }, null, 8, _hoisted_12),
1543
+ }, null, 8, _hoisted_12$1),
1542
1544
  createElementVNode("img", {
1543
1545
  class: "play",
1544
1546
  src: getImageUrl("play.png")
1545
- }, null, 8, _hoisted_13)
1547
+ }, null, 8, _hoisted_13$1)
1546
1548
  ]),
1547
- createElementVNode("div", _hoisted_14, [
1548
- createElementVNode("span", _hoisted_15, toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
1549
+ createElementVNode("div", _hoisted_14$1, [
1550
+ createElementVNode("span", _hoisted_15$1, toDisplayString(item.content || "[\u65E0\u6807\u9898]"), 1),
1549
1551
  createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
1550
1552
  ])
1551
- ])) : (openBlock(), createElementBlock("div", _hoisted_16, [
1553
+ ])) : (openBlock(), createElementBlock("div", _hoisted_16$1, [
1552
1554
  createElementVNode("span", null, toDisplayString(item.title || "[\u65E0\u6807\u9898]"), 1),
1553
1555
  createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
1554
1556
  ]))
@@ -1558,7 +1560,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1558
1560
  }, 1032, ["modelValue", "label", "onChange"])
1559
1561
  ]);
1560
1562
  }), 128))
1561
- ], 8, _hoisted_9)), [
1563
+ ], 8, _hoisted_9$1)), [
1562
1564
  [unref(vInfiniteScroll), getArticleList]
1563
1565
  ])
1564
1566
  ])
@@ -1608,24 +1610,94 @@ function v4(options, buf, offset) {
1608
1610
  return unsafeStringify(rnds);
1609
1611
  }
1610
1612
  const index_vue_vue_type_style_index_0_lang$2 = "";
1611
- const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("span", null, "\u63D2\u5165\u56FE\u7247", -1);
1612
- const _hoisted_2$4 = {
1613
+ const _hoisted_1$4 = { class: "img-upload-content" };
1614
+ const _hoisted_2$4 = { class: "title-box" };
1615
+ const _hoisted_3$4 = ["onClick"];
1616
+ const _hoisted_4$3 = {
1613
1617
  key: 0,
1614
- class: "upload-wrap"
1618
+ class: "line"
1615
1619
  };
1616
- const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
1617
- const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("span", { class: "remark" }, "\u652F\u6301jpg\u3001jpeg\u3001png\u7B49\u591A\u79CD\u683C\u5F0F\uFF0C\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120MB", -1);
1618
1620
  const _hoisted_5$2 = {
1621
+ key: 0,
1622
+ class: "prompt-restriction"
1623
+ };
1624
+ const _hoisted_6 = {
1625
+ key: 1,
1626
+ class: "prompt-restriction"
1627
+ };
1628
+ const _hoisted_7 = {
1629
+ key: 0,
1630
+ class: "text-picture"
1631
+ };
1632
+ const _hoisted_8 = { class: "image-list content-image" };
1633
+ const _hoisted_9 = ["onClick"];
1634
+ const _hoisted_10 = ["src"];
1635
+ const _hoisted_11 = {
1636
+ key: 0,
1637
+ class: "shade"
1638
+ };
1639
+ const _hoisted_12 = { class: "num" };
1640
+ const _hoisted_13 = {
1641
+ key: 0,
1642
+ class: "upload-wrap"
1643
+ };
1644
+ const _hoisted_14 = /* @__PURE__ */ createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
1645
+ const _hoisted_15 = /* @__PURE__ */ createElementVNode("span", { class: "remark" }, "\u652F\u6301jpg\u3001jpeg\u3001png\u7B49\u591A\u79CD\u683C\u5F0F\uFF0C\u5355\u5F20\u56FE\u7247\u6700\u5927\u652F\u630120MB", -1);
1646
+ const _hoisted_16 = {
1619
1647
  key: 1,
1620
1648
  class: "img-list"
1621
1649
  };
1622
- const _hoisted_6 = ["src"];
1623
- const _hoisted_7 = { class: "upload-btn" };
1650
+ const _hoisted_17 = ["src"];
1651
+ const _hoisted_18 = { class: "upload-btn" };
1652
+ const _hoisted_19 = {
1653
+ key: 2,
1654
+ class: "map-depot"
1655
+ };
1656
+ const _hoisted_20 = { class: "screen" };
1657
+ const _hoisted_21 = /* @__PURE__ */ createTextVNode("\u641C\u7D22");
1658
+ const _hoisted_22 = { key: 0 };
1659
+ const _hoisted_23 = { class: "tab-box" };
1660
+ const _hoisted_24 = ["onClick"];
1661
+ const _hoisted_25 = {
1662
+ key: 0,
1663
+ class: "line"
1664
+ };
1665
+ const _hoisted_26 = { class: "image-list depot-image" };
1666
+ const _hoisted_27 = ["onClick"];
1667
+ const _hoisted_28 = ["src"];
1668
+ const _hoisted_29 = {
1669
+ key: 0,
1670
+ class: "shade"
1671
+ };
1672
+ const _hoisted_30 = { class: "num" };
1673
+ const _hoisted_31 = {
1674
+ key: 1,
1675
+ class: "protocol-box"
1676
+ };
1677
+ const _hoisted_32 = /* @__PURE__ */ createElementVNode("div", null, [
1678
+ /* @__PURE__ */ createElementVNode("div", null, " \u56FE\u5E93\u4E2D\u7684\u56FE\u7247\u4EC5\u9650\u4E0B\u8F7D\u6469\u6258\u8303\u4EE5\u7F16\u8F91\u53D1\u5E03\u6587\u7AE0\u4F7F\u7528,\u4E0D\u5F97\u7528\u4E8E\u5176\u4ED6\u4EFB\u4F55\u5E73\u53F0\u53CA\u7528\u9014 "),
1679
+ /* @__PURE__ */ createElementVNode("div", null, [
1680
+ /* @__PURE__ */ createTextVNode(" \u8BF7\u9605\u8BFB"),
1681
+ /* @__PURE__ */ createElementVNode("a", {
1682
+ href: "https://mp.58moto.com/about?type=imageLicenseAgreement",
1683
+ target: "_blank",
1684
+ rel: "noopener noreferrer",
1685
+ class: "link"
1686
+ }, "\u300A\u6469\u6258\u8303\u56FE\u7247\u8BB8\u53EF\u4F7F\u7528\u534F\u8BAE\u300B"),
1687
+ /* @__PURE__ */ createTextVNode(",\u60A8\u7684\u884C\u4E3A\u89C6\u4E3A\u60A8\u5DF2\u540C\u610F\u8BE5\u534F\u8BAE\u3002 ")
1688
+ ])
1689
+ ], -1);
1690
+ const _hoisted_33 = [
1691
+ _hoisted_32
1692
+ ];
1624
1693
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1625
1694
  name: "index",
1626
1695
  props: {
1627
1696
  visible: { type: Boolean, default: false },
1628
- imgList: { default: [] }
1697
+ imgList: { default: [] },
1698
+ chartGallery: { type: Boolean, default: false },
1699
+ request: { default: {} },
1700
+ imgNum: { default: 20 }
1629
1701
  },
1630
1702
  emits: ["update:imgList", "update:visible", "submit"],
1631
1703
  setup(__props, { emit: emits }) {
@@ -1671,86 +1743,442 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1671
1743
  var ele = document.getElementsByClassName("imageFile");
1672
1744
  ele[0].dispatchEvent(event);
1673
1745
  };
1746
+ const activeTitle = ref(2);
1747
+ const titleList = ref([]);
1748
+ watch(
1749
+ () => props.visible,
1750
+ (newValue) => {
1751
+ if (newValue) {
1752
+ const list = [
1753
+ {
1754
+ id: 2,
1755
+ value: "\u4E0A\u4F20\u56FE\u7247"
1756
+ }
1757
+ ];
1758
+ activeTitle.value = 2;
1759
+ if (props.imgNum < 20) {
1760
+ list.unshift({
1761
+ id: 1,
1762
+ value: "\u6B63\u6587\u56FE\u7247"
1763
+ });
1764
+ activeTitle.value = 1;
1765
+ getContentImgList();
1766
+ }
1767
+ if (props.chartGallery) {
1768
+ list.push({
1769
+ id: 3,
1770
+ value: "\u6469\u6258\u8303\u56FE\u5E93"
1771
+ });
1772
+ }
1773
+ titleList.value = list;
1774
+ }
1775
+ }
1776
+ );
1777
+ const changeTab = (item) => {
1778
+ if (activeTitle.value !== item.id) {
1779
+ activeTitle.value = item.id;
1780
+ emits("update:imgList", []);
1781
+ if (item.id === 1) {
1782
+ if (!contentImgList.value.length) {
1783
+ getContentImgList();
1784
+ }
1785
+ }
1786
+ if (item.id === 3) {
1787
+ if (!brandList.value.length) {
1788
+ getBrandList();
1789
+ }
1790
+ }
1791
+ }
1792
+ };
1793
+ const contentImgListInit = ref([]);
1794
+ const getContentImgList = () => {
1795
+ contentImgListInit.value = [];
1796
+ const node = document.getElementById("editor-content");
1797
+ if (node) {
1798
+ const imgList = node.querySelectorAll(".halo-picture-area");
1799
+ if (imgList && imgList.length) {
1800
+ const list = [];
1801
+ imgList.forEach((img) => {
1802
+ if (!list.includes(img.src)) {
1803
+ list.push(img.src);
1804
+ }
1805
+ });
1806
+ list.forEach((src, i) => {
1807
+ contentImgListInit.value.push({
1808
+ imgOrgUrl: src,
1809
+ imgId: `content_${i}`
1810
+ });
1811
+ });
1812
+ }
1813
+ }
1814
+ };
1815
+ const contentImgList = computed(() => {
1816
+ const list = [];
1817
+ contentImgListInit.value.forEach((v) => {
1818
+ const value = props.imgList.find((_) => _.id === v.imgId);
1819
+ list.push({
1820
+ imgOrgUrl: v.imgOrgUrl,
1821
+ imgId: v.imgId,
1822
+ num: value && value.num || 0
1823
+ });
1824
+ });
1825
+ return list;
1826
+ });
1827
+ const selectData = reactive({
1828
+ brandId: "",
1829
+ goodId: "",
1830
+ carId: ""
1831
+ });
1832
+ const {
1833
+ getCarTypeList,
1834
+ getAllBrandList,
1835
+ getGoodsImgsTypeData,
1836
+ getCarGoodsList
1837
+ } = props.request;
1838
+ const brandList = ref([]);
1839
+ const getBrandList = () => {
1840
+ brandList.value = [];
1841
+ getAllBrandList({
1842
+ brandEnergyType: 3,
1843
+ brandVersion: 1598596364
1844
+ }).then((res) => {
1845
+ if (res.data.code === 0) {
1846
+ brandList.value = res.data.data || [];
1847
+ }
1848
+ });
1849
+ };
1850
+ const goodList = ref([]);
1851
+ const getGoodList = () => {
1852
+ goodList.value = [];
1853
+ getCarTypeList(selectData.brandId, {
1854
+ platform: 11,
1855
+ provinceName: "",
1856
+ cityName: "",
1857
+ onSale: 1,
1858
+ page: 1,
1859
+ rows: 200,
1860
+ brandEnergyType: 3,
1861
+ goodMinPrice: "",
1862
+ goodMaxPrice: "",
1863
+ goodType: "",
1864
+ goodMinVolume: "",
1865
+ goodMaxVolume: "",
1866
+ sortType: 0
1867
+ }).then((res) => {
1868
+ if (res.data.code === 0) {
1869
+ goodList.value = res.data.data || [];
1870
+ }
1871
+ });
1872
+ };
1873
+ const carList = ref([]);
1874
+ const getCarList = () => {
1875
+ carList.value = [];
1876
+ getCarGoodsList({
1877
+ goodId: selectData.goodId,
1878
+ color: "",
1879
+ isFromAskPrice: 0
1880
+ }).then((res) => {
1881
+ if (res.data.code === 0) {
1882
+ const list = res.data.data || [];
1883
+ list.forEach((v) => {
1884
+ if (v.carInfoList && v.carInfoList.length) {
1885
+ v.carInfoList.forEach((car) => {
1886
+ carList.value.push(car);
1887
+ });
1888
+ }
1889
+ });
1890
+ }
1891
+ });
1892
+ };
1893
+ const changeBrandId = () => {
1894
+ selectData.goodId = "";
1895
+ selectData.carId = "";
1896
+ getGoodList();
1897
+ };
1898
+ const changeGoodId = () => {
1899
+ selectData.carId = "";
1900
+ getCarList();
1901
+ };
1902
+ const activeTab = ref("1");
1903
+ const tabList = ref([]);
1904
+ const search = () => {
1905
+ if (!selectData.brandId) {
1906
+ return ElMessage.error("\u8BF7\u9009\u62E9\u54C1\u724C");
1907
+ }
1908
+ if (!selectData.goodId) {
1909
+ return ElMessage.error("\u8BF7\u9009\u62E9\u8F66\u578B");
1910
+ }
1911
+ if (!selectData.carId) {
1912
+ return ElMessage.error("\u8BF7\u9009\u62E9\u6B3E\u578B");
1913
+ }
1914
+ tabList.value = [];
1915
+ emits("update:imgList", []);
1916
+ getGoodsImgsTypeData({
1917
+ goodId: selectData.goodId,
1918
+ carId: selectData.carId
1919
+ }).then((res) => {
1920
+ if (res.data.code === 0) {
1921
+ tabList.value = res.data.data || [];
1922
+ if (tabList.value.length) {
1923
+ activeTab.value = tabList.value[0].type || "1";
1924
+ }
1925
+ }
1926
+ });
1927
+ };
1928
+ const imageList = computed(() => {
1929
+ const list = [];
1930
+ const item = tabList.value.find((v) => v.type === activeTab.value);
1931
+ if (item && item.imgList && item.imgList.length) {
1932
+ item.imgList.forEach((v) => {
1933
+ const value = props.imgList.find((_) => _.id === v.imgId);
1934
+ list.push({
1935
+ imgOrgUrl: v.imgOrgUrl,
1936
+ imgId: v.imgId,
1937
+ num: value && value.num || 0
1938
+ });
1939
+ });
1940
+ }
1941
+ return list;
1942
+ });
1943
+ const selectImage = (item, type) => {
1944
+ const list = [...props.imgList];
1945
+ const index = list.findIndex((v) => v.id === item.imgId);
1946
+ if (index >= 0) {
1947
+ list.splice(index, 1);
1948
+ } else {
1949
+ if (list.length >= props.imgNum)
1950
+ return;
1951
+ list.push({
1952
+ id: item.imgId,
1953
+ src: item.imgOrgUrl,
1954
+ type
1955
+ });
1956
+ }
1957
+ list.forEach((v, i) => {
1958
+ v.num = i + 1;
1959
+ });
1960
+ emits("update:imgList", list);
1961
+ };
1674
1962
  return (_ctx, _cache) => {
1675
1963
  return openBlock(), createBlock(_sfc_main$6, {
1676
- visible: props.visible
1964
+ visible: props.visible,
1965
+ showTitle: false
1677
1966
  }, {
1678
- title: withCtx(() => [
1679
- _hoisted_1$4
1680
- ]),
1681
1967
  default: withCtx(() => [
1682
- createElementVNode("div", {
1683
- class: normalizeClass(["insert-img", !props.imgList.length ? "no-img" : ""])
1684
- }, [
1685
- !props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_2$4, [
1686
- createElementVNode("div", {
1687
- class: "upload-wrap_box",
1688
- onClick: emitEvent
1689
- }, [
1690
- createVNode(unref(ElIcon), { class: "icon pointer" }, {
1968
+ createElementVNode("div", _hoisted_1$4, [
1969
+ createElementVNode("div", _hoisted_2$4, [
1970
+ (openBlock(true), createElementBlock(Fragment, null, renderList(titleList.value, (item, index) => {
1971
+ return openBlock(), createElementBlock("div", {
1972
+ key: index,
1973
+ class: normalizeClass(["title", { active: item.id === activeTitle.value }]),
1974
+ onClick: ($event) => changeTab(item)
1975
+ }, [
1976
+ createTextVNode(toDisplayString(item.value) + " ", 1),
1977
+ item.id === activeTitle.value ? (openBlock(), createElementBlock("div", _hoisted_4$3)) : createCommentVNode("", true)
1978
+ ], 10, _hoisted_3$4);
1979
+ }), 128)),
1980
+ [1, 3].includes(activeTitle.value) && props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_5$2, " \u6700\u591A\u53EF\u9009" + toDisplayString(props.imgNum) + "\u5F20\u56FE\u7247\uFF0C\u5DF2\u9009" + toDisplayString(props.imgList.length) + "\u5F20 ", 1)) : createCommentVNode("", true),
1981
+ activeTitle.value === 2 && props.imgList.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.imgList.length) + "\u5F20\u4E0A\u4F20\u6210\u529F \u62D6\u52A8\u53EF\u8C03\u6574\u987A\u5E8F ", 1)) : createCommentVNode("", true)
1982
+ ]),
1983
+ activeTitle.value === 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
1984
+ createElementVNode("div", _hoisted_8, [
1985
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(contentImgList), (item, index) => {
1986
+ return openBlock(), createElementBlock("div", {
1987
+ key: index,
1988
+ class: "image-item",
1989
+ onClick: ($event) => selectImage(item, 1)
1990
+ }, [
1991
+ createElementVNode("img", {
1992
+ src: item.imgOrgUrl,
1993
+ alt: "",
1994
+ class: "image"
1995
+ }, null, 8, _hoisted_10),
1996
+ item.num ? (openBlock(), createElementBlock("div", _hoisted_11, [
1997
+ createElementVNode("div", _hoisted_12, toDisplayString(item.num), 1)
1998
+ ])) : createCommentVNode("", true)
1999
+ ], 8, _hoisted_9);
2000
+ }), 128))
2001
+ ])
2002
+ ])) : createCommentVNode("", true),
2003
+ activeTitle.value === 2 ? (openBlock(), createElementBlock("div", {
2004
+ key: 1,
2005
+ class: normalizeClass(["insert-img", !props.imgList.length ? "no-img" : ""])
2006
+ }, [
2007
+ !props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_13, [
2008
+ createElementVNode("div", {
2009
+ class: "upload-wrap_box",
2010
+ onClick: emitEvent
2011
+ }, [
2012
+ createVNode(unref(ElIcon), { class: "icon pointer" }, {
2013
+ default: withCtx(() => [
2014
+ createVNode(unref(Picture))
2015
+ ]),
2016
+ _: 1
2017
+ }),
2018
+ _hoisted_14
2019
+ ]),
2020
+ _hoisted_15
2021
+ ])) : (openBlock(), createElementBlock("div", _hoisted_16, [
2022
+ createVNode(unref(draggable), {
2023
+ modelValue: unref(imgListTemp),
2024
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(imgListTemp) ? imgListTemp.value = $event : null),
2025
+ handle: ".img-item",
2026
+ class: "img-wrap",
2027
+ group: "people",
2028
+ onStart: _cache[1] || (_cache[1] = ($event) => drag.value = true),
2029
+ "item-key": "id",
2030
+ onEnd: _cache[2] || (_cache[2] = ($event) => drag.value = false)
2031
+ }, {
2032
+ item: withCtx(({ element }) => [
2033
+ (openBlock(), createElementBlock("div", {
2034
+ key: element.id,
2035
+ class: "img-item"
2036
+ }, [
2037
+ createElementVNode("img", {
2038
+ src: element.src,
2039
+ style: { "object-fit": "contain" },
2040
+ width: "120",
2041
+ height: "120"
2042
+ }, null, 8, _hoisted_17),
2043
+ createVNode(unref(CircleCloseFilled), {
2044
+ class: "icon pointer",
2045
+ onClick: ($event) => deleteImg(element)
2046
+ }, null, 8, ["onClick"])
2047
+ ]))
2048
+ ]),
2049
+ footer: withCtx(() => [
2050
+ createElementVNode("div", {
2051
+ class: "upload-icon pointer",
2052
+ onClick: emitEvent
2053
+ }, [
2054
+ createVNode(unref(ElIcon), { class: "icon pointer" }, {
2055
+ default: withCtx(() => [
2056
+ createVNode(unref(Plus))
2057
+ ]),
2058
+ _: 1
2059
+ })
2060
+ ])
2061
+ ]),
2062
+ _: 1
2063
+ }, 8, ["modelValue"])
2064
+ ])),
2065
+ createElementVNode("div", _hoisted_18, [
2066
+ createElementVNode("input", {
2067
+ type: "file",
2068
+ name: "file",
2069
+ multiple: "",
2070
+ class: "imageFile",
2071
+ accept: "image/*",
2072
+ onChange: _cache[3] || (_cache[3] = ($event) => selectImgs($event))
2073
+ }, null, 32)
2074
+ ])
2075
+ ], 2)) : createCommentVNode("", true),
2076
+ activeTitle.value === 3 ? (openBlock(), createElementBlock("div", _hoisted_19, [
2077
+ createElementVNode("div", _hoisted_20, [
2078
+ createElementVNode("div", null, [
2079
+ createVNode(unref(ElSelect), {
2080
+ modelValue: selectData.brandId,
2081
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => selectData.brandId = $event),
2082
+ placeholder: "\u8BF7\u9009\u62E9\u54C1\u724C",
2083
+ size: "large",
2084
+ class: "select_1",
2085
+ onChange: changeBrandId
2086
+ }, {
2087
+ default: withCtx(() => [
2088
+ (openBlock(true), createElementBlock(Fragment, null, renderList(brandList.value, (item, index) => {
2089
+ return openBlock(), createBlock(unref(ElOption), {
2090
+ key: index,
2091
+ label: item.brandName,
2092
+ value: item.brandId
2093
+ }, null, 8, ["label", "value"]);
2094
+ }), 128))
2095
+ ]),
2096
+ _: 1
2097
+ }, 8, ["modelValue"]),
2098
+ createVNode(unref(ElSelect), {
2099
+ modelValue: selectData.goodId,
2100
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => selectData.goodId = $event),
2101
+ placeholder: "\u8BF7\u9009\u62E9\u8F66\u578B",
2102
+ size: "large",
2103
+ class: "select_1",
2104
+ onChange: changeGoodId
2105
+ }, {
2106
+ default: withCtx(() => [
2107
+ (openBlock(true), createElementBlock(Fragment, null, renderList(goodList.value, (item, index) => {
2108
+ return openBlock(), createBlock(unref(ElOption), {
2109
+ key: index,
2110
+ label: item.goodName,
2111
+ value: item.goodId
2112
+ }, null, 8, ["label", "value"]);
2113
+ }), 128))
2114
+ ]),
2115
+ _: 1
2116
+ }, 8, ["modelValue"]),
2117
+ createVNode(unref(ElSelect), {
2118
+ modelValue: selectData.carId,
2119
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => selectData.carId = $event),
2120
+ placeholder: "\u8BF7\u9009\u62E9\u6B3E\u578B",
2121
+ size: "large",
2122
+ class: "select_2"
2123
+ }, {
2124
+ default: withCtx(() => [
2125
+ (openBlock(true), createElementBlock(Fragment, null, renderList(carList.value, (item, index) => {
2126
+ return openBlock(), createBlock(unref(ElOption), {
2127
+ key: index,
2128
+ label: item.goodsCarName,
2129
+ value: item.carId
2130
+ }, null, 8, ["label", "value"]);
2131
+ }), 128))
2132
+ ]),
2133
+ _: 1
2134
+ }, 8, ["modelValue"])
2135
+ ]),
2136
+ createVNode(unref(ElButton), {
2137
+ type: "primary",
2138
+ size: "large",
2139
+ style: { "width": "80px" },
2140
+ onClick: search
2141
+ }, {
1691
2142
  default: withCtx(() => [
1692
- createVNode(unref(Picture))
2143
+ _hoisted_21
1693
2144
  ]),
1694
2145
  _: 1
1695
- }),
1696
- _hoisted_3$4
2146
+ })
1697
2147
  ]),
1698
- _hoisted_4$3
1699
- ])) : (openBlock(), createElementBlock("div", _hoisted_5$2, [
1700
- createVNode(unref(draggable), {
1701
- modelValue: unref(imgListTemp),
1702
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(imgListTemp) ? imgListTemp.value = $event : null),
1703
- handle: ".img-item",
1704
- class: "img-wrap",
1705
- group: "people",
1706
- onStart: _cache[1] || (_cache[1] = ($event) => drag.value = true),
1707
- "item-key": "id",
1708
- onEnd: _cache[2] || (_cache[2] = ($event) => drag.value = false)
1709
- }, {
1710
- item: withCtx(({ element }) => [
1711
- (openBlock(), createElementBlock("div", {
1712
- key: element.id,
1713
- class: "img-item"
1714
- }, [
1715
- createElementVNode("img", {
1716
- src: element.src,
1717
- style: { "object-fit": "cover" },
1718
- width: "120",
1719
- height: "120"
1720
- }, null, 8, _hoisted_6),
1721
- createVNode(unref(CircleCloseFilled), {
1722
- class: "icon pointer",
1723
- onClick: ($event) => deleteImg(element)
1724
- }, null, 8, ["onClick"])
1725
- ]))
1726
- ]),
1727
- footer: withCtx(() => [
1728
- createElementVNode("div", {
1729
- class: "upload-icon pointer",
1730
- onClick: emitEvent
1731
- }, [
1732
- createVNode(unref(ElIcon), { class: "icon pointer" }, {
1733
- default: withCtx(() => [
1734
- createVNode(unref(Plus))
1735
- ]),
1736
- _: 1
1737
- })
1738
- ])
2148
+ tabList.value && tabList.value.length ? (openBlock(), createElementBlock("div", _hoisted_22, [
2149
+ createElementVNode("div", _hoisted_23, [
2150
+ (openBlock(true), createElementBlock(Fragment, null, renderList(tabList.value, (item, index) => {
2151
+ return openBlock(), createElementBlock("div", {
2152
+ key: index,
2153
+ class: normalizeClass(["tab", { active: item.type === activeTab.value }]),
2154
+ onClick: ($event) => activeTab.value = item.type
2155
+ }, [
2156
+ createTextVNode(toDisplayString(item.name) + " ", 1),
2157
+ item.type === activeTab.value ? (openBlock(), createElementBlock("div", _hoisted_25)) : createCommentVNode("", true)
2158
+ ], 10, _hoisted_24);
2159
+ }), 128))
1739
2160
  ]),
1740
- _: 1
1741
- }, 8, ["modelValue"])
1742
- ])),
1743
- createElementVNode("div", _hoisted_7, [
1744
- createElementVNode("input", {
1745
- type: "file",
1746
- name: "file",
1747
- multiple: "",
1748
- class: "imageFile",
1749
- accept: "image/*",
1750
- onChange: _cache[3] || (_cache[3] = ($event) => selectImgs($event))
1751
- }, null, 32)
1752
- ])
1753
- ], 2)
2161
+ createElementVNode("div", _hoisted_26, [
2162
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(imageList), (item, index) => {
2163
+ return openBlock(), createElementBlock("div", {
2164
+ key: index,
2165
+ class: "image-item",
2166
+ onClick: ($event) => selectImage(item, 3)
2167
+ }, [
2168
+ createElementVNode("img", {
2169
+ src: item.imgOrgUrl,
2170
+ alt: "",
2171
+ class: "image"
2172
+ }, null, 8, _hoisted_28),
2173
+ item.num ? (openBlock(), createElementBlock("div", _hoisted_29, [
2174
+ createElementVNode("div", _hoisted_30, toDisplayString(item.num), 1)
2175
+ ])) : createCommentVNode("", true)
2176
+ ], 8, _hoisted_27);
2177
+ }), 128))
2178
+ ])
2179
+ ])) : (openBlock(), createElementBlock("div", _hoisted_31, _hoisted_33))
2180
+ ])) : createCommentVNode("", true)
2181
+ ])
1754
2182
  ]),
1755
2183
  _: 1
1756
2184
  }, 8, ["visible"]);
@@ -2014,7 +2442,9 @@ const _sfc_main = {
2014
2442
  "getEassyDetail",
2015
2443
  "getArticleList",
2016
2444
  "importEssay",
2017
- "uploadImageByOther"
2445
+ "uploadImageByOther",
2446
+ "chartGallery",
2447
+ "request"
2018
2448
  ],
2019
2449
  data() {
2020
2450
  return {
@@ -2029,6 +2459,7 @@ const _sfc_main = {
2029
2459
  setAlignFlag: true,
2030
2460
  article: {},
2031
2461
  imgList: [],
2462
+ imgNum: 20,
2032
2463
  videoList: [],
2033
2464
  visibleVideo: false,
2034
2465
  visibleCollectArticle: false,
@@ -2076,7 +2507,9 @@ const _sfc_main = {
2076
2507
  },
2077
2508
  countList: [],
2078
2509
  replaceSeamless: 0,
2079
- seamlessCount: 0
2510
+ seamlessCount: 0,
2511
+ overLine: "",
2512
+ currentVideo: null
2080
2513
  };
2081
2514
  },
2082
2515
  computed: {
@@ -2226,6 +2659,12 @@ const _sfc_main = {
2226
2659
  this.imgUploadHandler(type, src);
2227
2660
  });
2228
2661
  },
2662
+ replacePoster(e) {
2663
+ this.$emit("insertImgs", e.target.files, "replace-poster", (type, src) => {
2664
+ this.visibleImg = false;
2665
+ this.imgUploadHandler(type, src);
2666
+ });
2667
+ },
2229
2668
  againImg(e) {
2230
2669
  this.$emit("insertImgs", e.target.files, "uploadAgainImages", (type, src) => {
2231
2670
  this.visibleImg = false;
@@ -2357,6 +2796,8 @@ const _sfc_main = {
2357
2796
  this.parseGood(node);
2358
2797
  } else if (node.classList.contains("halo-img-content")) {
2359
2798
  const img = node.querySelector("img");
2799
+ img.setAttribute("tabindex", -1);
2800
+ img.setAttribute("draggable", false);
2360
2801
  const desc = img.dataset.desc;
2361
2802
  img.style.margin = "0";
2362
2803
  const seamlessFlag = ((_a = JSON.parse(img.getAttribute("data"))) == null ? void 0 : _a.seamlessFlag) || "0";
@@ -2415,7 +2856,9 @@ const _sfc_main = {
2415
2856
  node.onclick = function() {
2416
2857
  me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2417
2858
  };
2859
+ const replaceBtn = me2.insertVideoBtns(me2.editor, video);
2418
2860
  node.appendChild(delBtn);
2861
+ node.appendChild(replaceBtn);
2419
2862
  },
2420
2863
  async parseArticle(node) {
2421
2864
  const data = JSON.parse(node.dataset.article);
@@ -2516,20 +2959,95 @@ const _sfc_main = {
2516
2959
  uploadArticle() {
2517
2960
  this.visibleArticle = true;
2518
2961
  },
2519
- uploadImg(type) {
2962
+ uploadImg(type, num) {
2520
2963
  this.visibleImg = true;
2521
2964
  this.imgType = type;
2522
2965
  this.imgList = [];
2966
+ this.imgNum = num || 20;
2523
2967
  },
2524
- submitImg() {
2525
- const files = this.imgList.map((item) => item.file);
2968
+ async submitImg() {
2526
2969
  this.count = 0;
2527
2970
  this.countList = [];
2528
2971
  this.seamlessCount = 0;
2529
- this.$emit("insertImgs", files, "img", (type, src) => {
2972
+ if (this.imgList.length) {
2973
+ const idList = [];
2974
+ const list_1 = [];
2975
+ const list_2 = [];
2976
+ const list_3 = [];
2977
+ this.imgList.forEach((v) => {
2978
+ idList.push(v.id);
2979
+ if (v.type === 1) {
2980
+ list_1.push(v);
2981
+ } else if (v.type === 3) {
2982
+ list_3.push(v);
2983
+ } else {
2984
+ list_2.push(v);
2985
+ }
2986
+ });
2987
+ const list_2_new = await this.reviseFilesImg(list_2);
2988
+ const list_3_new = await this.reviseSrcImg(list_3);
2989
+ const list_all = [...list_1, ...list_2_new, ...list_3_new];
2990
+ const imgList_new = [];
2991
+ idList.forEach((id) => {
2992
+ const item = list_all.find((value) => value.id === id);
2993
+ if (item && item.src) {
2994
+ imgList_new.push(item);
2995
+ }
2996
+ });
2997
+ if (this.imgType === "coverImg") {
2998
+ this.$emit("insertImgs", imgList_new, this.imgType);
2999
+ } else {
3000
+ imgList_new.forEach((img) => {
3001
+ this.imgUploadHandler("img", img.src);
3002
+ });
3003
+ }
2530
3004
  this.visibleImg = false;
2531
- this.imgUploadHandler(type, src);
2532
- });
3005
+ } else {
3006
+ this.visibleImg = false;
3007
+ }
3008
+ },
3009
+ async reviseFilesImg(list) {
3010
+ if (list.length) {
3011
+ const p_l = [];
3012
+ list.forEach((v) => {
3013
+ const p = new Promise((resolve, reject) => {
3014
+ try {
3015
+ this.$emit("insertImgs", [v.file], "img", (type, src) => {
3016
+ resolve({ ...v, src });
3017
+ });
3018
+ } catch (error) {
3019
+ reject(error);
3020
+ }
3021
+ });
3022
+ p_l.push(p);
3023
+ });
3024
+ const res = await Promise.all(p_l);
3025
+ return res;
3026
+ } else {
3027
+ return [];
3028
+ }
3029
+ },
3030
+ async reviseSrcImg(list) {
3031
+ const copyToEssayImg = this.request.copyToEssayImg;
3032
+ if (copyToEssayImg && list.length) {
3033
+ const arr = [];
3034
+ list.forEach((v) => {
3035
+ arr.push(v.src);
3036
+ });
3037
+ const res = await copyToEssayImg({ imgUrls: arr.join(",") });
3038
+ if (res.data.code === 0) {
3039
+ const data = res.data.data || "";
3040
+ const list_new = data ? data.split(",") : [];
3041
+ list.forEach((v, i) => {
3042
+ v.src = list_new[i] || "";
3043
+ });
3044
+ return list;
3045
+ } else {
3046
+ return [];
3047
+ }
3048
+ } else {
3049
+ return [];
3050
+ }
2533
3051
  },
2534
3052
  imgUploadHandler(type, imgSrc) {
2535
3053
  const me2 = this;
@@ -2547,6 +3065,20 @@ const _sfc_main = {
2547
3065
  seamlessFlag: me2.replaceSeamless,
2548
3066
  type: "2"
2549
3067
  }, this.range);
3068
+ } else if (type === "replace-poster") {
3069
+ if (this.currentVideo) {
3070
+ this.currentVideo.poster = imgSrc;
3071
+ try {
3072
+ const videoData = JSON.parse(this.currentVideo.getAttribute("data") || "{}");
3073
+ this.currentVideo.setAttribute("data", JSON.stringify({ ...videoData, img: imgSrc }));
3074
+ const contentNode = this.currentVideo.parentNode;
3075
+ const contentData = JSON.parse(contentNode.dataset.video || "{}");
3076
+ contentNode.dataset.video = JSON.stringify({ ...contentData, img: imgSrc });
3077
+ } catch (error) {
3078
+ console.log(error);
3079
+ }
3080
+ this.currentVideo = null;
3081
+ }
2550
3082
  } else {
2551
3083
  this.seamlessCount++;
2552
3084
  const isLast = this.seamlessCount === this.imgList.length;
@@ -2565,6 +3097,21 @@ const _sfc_main = {
2565
3097
  this.setToast(rst.origin.name + "\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
2566
3098
  }
2567
3099
  },
3100
+ insertVideoBtns(editor, node) {
3101
+ const me2 = this;
3102
+ var replaceBtn = editor.createElement("div", {
3103
+ "class": "video-cover-replace pointer",
3104
+ "contenteditable": "false"
3105
+ });
3106
+ replaceBtn.onclick = function(e) {
3107
+ const posterBtn = document.querySelector(".replace-poster");
3108
+ posterBtn.click();
3109
+ me2.currentVideo = node;
3110
+ e.stopPropagation();
3111
+ };
3112
+ replaceBtn.innerText = "\u66F4\u6362\u5C01\u9762";
3113
+ return replaceBtn;
3114
+ },
2568
3115
  insertImgOperateBtns(editor, data) {
2569
3116
  const me2 = this;
2570
3117
  var replaceBtn = editor.createElement("div", {
@@ -2677,7 +3224,7 @@ const _sfc_main = {
2677
3224
  },
2678
3225
  initSquire() {
2679
3226
  const me2 = this;
2680
- me2.editorDom;
3227
+ const editorDom = me2.editorDom;
2681
3228
  me2.editor = new window.Squire(me2.editorDom, {
2682
3229
  blockTag: "p",
2683
3230
  blockAttributes: {
@@ -2796,7 +3343,9 @@ const _sfc_main = {
2796
3343
  "data": JSON.stringify(data),
2797
3344
  "style": isSeameless ? "margin: 0" : "margin-top: 0",
2798
3345
  "data-content": data.content || "",
2799
- "contenteditable": "false"
3346
+ "contenteditable": "false",
3347
+ "draggable": "false",
3348
+ "tabindex": "-1"
2800
3349
  });
2801
3350
  const btns = me2.insertImgOperateBtns(this, data);
2802
3351
  var childList = [];
@@ -2807,7 +3356,8 @@ const _sfc_main = {
2807
3356
  !isHaloImage && childList.push(again);
2808
3357
  var p = this.createElement("div", {
2809
3358
  "class": "halo-img-content",
2810
- "contenteditable": "false"
3359
+ "contenteditable": "false",
3360
+ "draggable": "false"
2811
3361
  }, [...childList]);
2812
3362
  this.insertElement(p, range);
2813
3363
  if (isSeameless) {
@@ -2857,14 +3407,41 @@ const _sfc_main = {
2857
3407
  }
2858
3408
  });
2859
3409
  console.log(delBtn);
3410
+ const posterBtn = me2.insertVideoBtns(this, video);
2860
3411
  var p = this.createElement("DIV", {
2861
3412
  "class": "halo-video-content",
2862
- "contenteditable": "true",
2863
- "data-video": JSON.stringify(data)
2864
- }, [video, delBtn]);
3413
+ "contenteditable": "false",
3414
+ "data-video": JSON.stringify(data),
3415
+ "draggable": "true"
3416
+ }, [video, delBtn, posterBtn]);
2865
3417
  p.onclick = function() {
2866
3418
  me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2867
3419
  };
3420
+ let targetMove = "";
3421
+ p.ondragstart = function(e) {
3422
+ if (!(e.target.className.indexOf("halo-video-content") < 0)) {
3423
+ e.dataTransfer.setData("text/html", e.target);
3424
+ e.dataTransfer.effectAllowed = "move";
3425
+ e.dataTransfer.dropEffect = "move";
3426
+ targetMove = e.target;
3427
+ }
3428
+ };
3429
+ editorDom.ondragover = function(e) {
3430
+ if (targetMove && !(targetMove.className.indexOf("halo-video-content") < 0)) {
3431
+ e.preventDefault();
3432
+ }
3433
+ };
3434
+ editorDom.ondrop = function(e) {
3435
+ if (targetMove && !(targetMove.className.indexOf("halo-video-content") < 0)) {
3436
+ if (e.target === editorDom) {
3437
+ e.target.appendChild(targetMove);
3438
+ } else {
3439
+ e.target.after(targetMove);
3440
+ }
3441
+ targetMove = "";
3442
+ e.preventDefault();
3443
+ }
3444
+ };
2868
3445
  this.insertElement(p);
2869
3446
  setTimeout(() => {
2870
3447
  document.documentElement.scrollTop = scrollTop;
@@ -3124,9 +3701,10 @@ const _sfc_main = {
3124
3701
  },
3125
3702
  refreshImg() {
3126
3703
  Array.from(document.querySelectorAll(".halo-img-content")).map((_ = {}) => {
3704
+ var _a;
3127
3705
  var target = _.querySelector(".halo-picture-area");
3128
3706
  var tag = null;
3129
- if (target.classList.contains("upload-fail")) {
3707
+ if ((_a = target == null ? void 0 : target.classList) == null ? void 0 : _a.contains("upload-fail")) {
3130
3708
  tag = _.querySelector(".img-again");
3131
3709
  } else {
3132
3710
  tag = _.querySelector(".desc-input");
@@ -3404,8 +3982,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3404
3982
  "onUpdate:img-list": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
3405
3983
  visible: $data.visibleImg,
3406
3984
  "onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
3985
+ chartGallery: $props.chartGallery,
3986
+ request: $props.request,
3987
+ imgNum: $data.imgNum,
3407
3988
  onSubmit: $options.submitImg
3408
- }, null, 8, ["img-list", "visible", "onSubmit"]),
3989
+ }, null, 8, ["img-list", "visible", "chartGallery", "request", "imgNum", "onSubmit"]),
3409
3990
  createVNode(_component_VideoUpload, {
3410
3991
  visible: $data.visibleVideo,
3411
3992
  "onUpdate:visible": _cache[8] || (_cache[8] = ($event) => $data.visibleVideo = $event),
@@ -3432,6 +4013,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3432
4013
  class: "replace-input hide",
3433
4014
  accept: "image/*",
3434
4015
  onChange: _cache[12] || (_cache[12] = (...args) => $options.replaceImg && $options.replaceImg(...args))
4016
+ }, null, 32),
4017
+ createElementVNode("input", {
4018
+ type: "file",
4019
+ name: "file",
4020
+ class: "replace-poster hide",
4021
+ accept: "image/*",
4022
+ onChange: _cache[13] || (_cache[13] = (...args) => $options.replacePoster && $options.replacePoster(...args))
3435
4023
  }, null, 32)
3436
4024
  ]);
3437
4025
  }