@haluo/biz 2.0.13 → 2.0.14-beta.2

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";
@@ -300,6 +300,15 @@ O.install = function(e, t) {
300
300
  e.component(O.name, O);
301
301
  };
302
302
  console.log("name", O.name);
303
+ const Se = [
304
+ O
305
+ ], Fe = function(e) {
306
+ Se.map((t) => e.component(t.name, t));
307
+ }, De = {
308
+ install: Fe,
309
+ colorPicker: O
310
+ };
311
+ const style = "";
303
312
  const ToolBar_vue_vue_type_style_index_0_scoped_true_lang = "";
304
313
  const ToolBar_vue_vue_type_style_index_1_lang = "";
305
314
  const _export_sfc = (sfc, props) => {
@@ -313,7 +322,8 @@ const _sfc_main$7 = {
313
322
  components: {
314
323
  ElTooltip,
315
324
  ElDivider,
316
- ElPopover
325
+ ElPopover,
326
+ colorPicker: De.colorPicker
317
327
  },
318
328
  props: ["editor", "isOss", "hiddenTools"],
319
329
  data() {
@@ -517,49 +527,49 @@ const _hoisted_2$7 = { class: "tools-content" };
517
527
  const _hoisted_3$7 = ["src"];
518
528
  const _hoisted_4$6 = ["src"];
519
529
  const _hoisted_5$5 = ["src"];
520
- const _hoisted_6$2 = { class: "box" };
530
+ const _hoisted_6$3 = { class: "box" };
521
531
  const _hoisted_7$2 = ["src"];
522
- const _hoisted_8$1 = {
532
+ const _hoisted_8$2 = {
523
533
  key: 0,
524
534
  class: "box-mask"
525
535
  };
526
- const _hoisted_9$1 = { class: "tools-title" };
527
- const _hoisted_10$1 = ["src"];
528
- const _hoisted_11$1 = { class: "tools-font" };
529
- const _hoisted_12$1 = ["onClick"];
530
- const _hoisted_13$1 = { style: { "font-size": "10px" } };
531
- const _hoisted_14$1 = { class: "box" };
532
- const _hoisted_15$1 = ["src"];
533
- 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 = {
534
544
  key: 0,
535
545
  class: "box-mask"
536
546
  };
537
- const _hoisted_17 = { class: "box" };
538
- const _hoisted_18 = ["src"];
539
- const _hoisted_19 = {
547
+ const _hoisted_17$1 = { class: "box" };
548
+ const _hoisted_18$1 = ["src"];
549
+ const _hoisted_19$1 = {
540
550
  key: 0,
541
551
  class: "box-mask"
542
552
  };
543
- const _hoisted_20 = { class: "tools-title" };
544
- const _hoisted_21 = ["src"];
545
- const _hoisted_22 = ["src"];
546
- const _hoisted_23 = { class: "tools-title_content" };
547
- const _hoisted_24 = { class: "box" };
548
- const _hoisted_25 = ["src"];
549
- 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 = {
550
560
  key: 0,
551
561
  class: "box-mask"
552
562
  };
553
- const _hoisted_27 = { class: "box" };
554
- const _hoisted_28 = ["src"];
555
- const _hoisted_29 = {
563
+ const _hoisted_27$1 = { class: "box" };
564
+ const _hoisted_28$1 = ["src"];
565
+ const _hoisted_29$1 = {
556
566
  key: 0,
557
567
  class: "box-mask"
558
568
  };
559
- const _hoisted_30 = { class: "box" };
560
- const _hoisted_31 = ["src"];
561
- const _hoisted_32 = ["src"];
562
- 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"];
563
573
  const _hoisted_34 = ["src"];
564
574
  const _hoisted_35 = { class: "tools-title" };
565
575
  const _hoisted_36 = ["src"];
@@ -649,7 +659,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
649
659
  placement: "top"
650
660
  }, {
651
661
  default: withCtx(() => [
652
- createElementVNode("div", _hoisted_6$2, [
662
+ createElementVNode("div", _hoisted_6$3, [
653
663
  createElementVNode("img", {
654
664
  src: $options.getImageUrl("tools_refresh@3x.png"),
655
665
  width: "40",
@@ -657,7 +667,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
657
667
  alt: "",
658
668
  onClick: _cache[3] || (_cache[3] = (...args) => $options.copyFormat && $options.copyFormat(...args))
659
669
  }, null, 8, _hoisted_7$2),
660
- $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)
661
671
  ])
662
672
  ]),
663
673
  _: 1
@@ -672,7 +682,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
672
682
  width: "152"
673
683
  }, {
674
684
  reference: withCtx(() => [
675
- createElementVNode("div", _hoisted_9$1, [
685
+ createElementVNode("div", _hoisted_9$2, [
676
686
  createVNode(_component_el_tooltip, {
677
687
  class: "item",
678
688
  effect: "dark",
@@ -691,7 +701,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
691
701
  width: "16",
692
702
  height: "40",
693
703
  alt: ""
694
- }, null, 8, _hoisted_10$1)
704
+ }, null, 8, _hoisted_10$2)
695
705
  ], 2)
696
706
  ]),
697
707
  _: 1
@@ -699,7 +709,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
699
709
  ])
700
710
  ]),
701
711
  default: withCtx(() => [
702
- withDirectives((openBlock(), createElementBlock("ul", _hoisted_11$1, [
712
+ withDirectives((openBlock(), createElementBlock("ul", _hoisted_11$2, [
703
713
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.fontsizes, (item, index) => {
704
714
  return openBlock(), createElementBlock("li", {
705
715
  class: normalizeClass([$data.activeFontsize + "px" === item.value ? "active" : ""]),
@@ -710,8 +720,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
710
720
  createElementVNode("span", {
711
721
  style: normalizeStyle({ fontSize: item.value })
712
722
  }, toDisplayString(item.name), 5),
713
- createElementVNode("span", _hoisted_13$1, toDisplayString(item.desc), 1)
714
- ], 10, _hoisted_12$1);
723
+ createElementVNode("span", _hoisted_13$2, toDisplayString(item.desc), 1)
724
+ ], 10, _hoisted_12$2);
715
725
  }), 128))
716
726
  ])), [
717
727
  [_directive_click_outside, $options.handlePopover]
@@ -730,7 +740,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
730
740
  placement: "top"
731
741
  }, {
732
742
  default: withCtx(() => [
733
- createElementVNode("div", _hoisted_14$1, [
743
+ createElementVNode("div", _hoisted_14$2, [
734
744
  createElementVNode("img", {
735
745
  src: $options.getImageUrl("tools_title@3x.png"),
736
746
  "data-editor-id": "makeHeader",
@@ -738,8 +748,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
738
748
  height: "40",
739
749
  alt: "",
740
750
  onClick: _cache[5] || (_cache[5] = ($event) => $options.setTitle($event, $data.statusInfo.title ? 0 : 1))
741
- }, null, 8, _hoisted_15$1),
742
- $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)
743
753
  ])
744
754
  ]),
745
755
  _: 1
@@ -751,15 +761,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
751
761
  placement: "top"
752
762
  }, {
753
763
  default: withCtx(() => [
754
- createElementVNode("div", _hoisted_17, [
764
+ createElementVNode("div", _hoisted_17$1, [
755
765
  createElementVNode("img", {
756
766
  src: $options.getImageUrl("tools_bold@3x.png"),
757
767
  width: "40",
758
768
  height: "40",
759
769
  alt: "",
760
770
  onClick: _cache[6] || (_cache[6] = ($event) => $options.setStyle($data.statusInfo.bold ? "removeBold" : "bold", "bold", !$data.statusInfo.bold))
761
- }, null, 8, _hoisted_18),
762
- $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)
763
773
  ])
764
774
  ]),
765
775
  _: 1
@@ -771,7 +781,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
771
781
  width: "152"
772
782
  }, {
773
783
  reference: withCtx(() => [
774
- createElementVNode("div", _hoisted_20, [
784
+ createElementVNode("div", _hoisted_20$1, [
775
785
  createVNode(_component_el_tooltip, {
776
786
  class: "item",
777
787
  effect: "dark",
@@ -789,13 +799,13 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
789
799
  width: "24",
790
800
  height: "40",
791
801
  alt: ""
792
- }, null, 8, _hoisted_21),
802
+ }, null, 8, _hoisted_21$1),
793
803
  createElementVNode("img", {
794
804
  src: $options.getImageUrl("tools_arrow@3x.png"),
795
805
  width: "16",
796
806
  height: "40",
797
807
  alt: ""
798
- }, null, 8, _hoisted_22)
808
+ }, null, 8, _hoisted_22$1)
799
809
  ], 2)
800
810
  ]),
801
811
  _: 1
@@ -803,7 +813,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
803
813
  ])
804
814
  ]),
805
815
  default: withCtx(() => [
806
- withDirectives((openBlock(), createElementBlock("ul", _hoisted_23, [
816
+ withDirectives((openBlock(), createElementBlock("ul", _hoisted_23$1, [
807
817
  createElementVNode("li", {
808
818
  "data-editor-id": "makeHeader",
809
819
  onClick: _cache[8] || (_cache[8] = ($event) => $options.updatePosition(() => {
@@ -830,15 +840,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
830
840
  placement: "top"
831
841
  }, {
832
842
  default: withCtx(() => [
833
- createElementVNode("div", _hoisted_24, [
843
+ createElementVNode("div", _hoisted_24$1, [
834
844
  createElementVNode("img", {
835
845
  src: $options.getImageUrl("tools_xie@3x.png"),
836
846
  width: "40",
837
847
  height: "40",
838
848
  alt: "",
839
849
  onClick: _cache[10] || (_cache[10] = ($event) => $options.setStyle($data.statusInfo.italic ? "removeItalic" : "italic", "italic", !$data.statusInfo.italic))
840
- }, null, 8, _hoisted_25),
841
- $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)
842
852
  ])
843
853
  ]),
844
854
  _: 1
@@ -850,15 +860,15 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
850
860
  placement: "top"
851
861
  }, {
852
862
  default: withCtx(() => [
853
- createElementVNode("div", _hoisted_27, [
863
+ createElementVNode("div", _hoisted_27$1, [
854
864
  createElementVNode("img", {
855
865
  src: $options.getImageUrl("tools_line@3x.png"),
856
866
  width: "40",
857
867
  height: "40",
858
868
  alt: "",
859
869
  onClick: _cache[11] || (_cache[11] = ($event) => $options.setStyle($data.statusInfo.underline ? "removeUnderline" : "underline", "underline", !$data.statusInfo.underline))
860
- }, null, 8, _hoisted_28),
861
- $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)
862
872
  ])
863
873
  ]),
864
874
  _: 1
@@ -871,14 +881,14 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
871
881
  placement: "top"
872
882
  }, {
873
883
  default: withCtx(() => [
874
- createElementVNode("div", _hoisted_30, [
884
+ createElementVNode("div", _hoisted_30$1, [
875
885
  createElementVNode("img", {
876
886
  src: $options.getImageUrl("icon_web_link@2x.png"),
877
887
  width: "40",
878
888
  height: "40",
879
889
  alt: "",
880
890
  onClick: _cache[12] || (_cache[12] = (...args) => $options.insertLink && $options.insertLink(...args))
881
- }, null, 8, _hoisted_31)
891
+ }, null, 8, _hoisted_31$1)
882
892
  ])
883
893
  ]),
884
894
  _: 1
@@ -896,7 +906,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
896
906
  height: "40",
897
907
  alt: "",
898
908
  onClick: _cache[13] || (_cache[13] = ($event) => $options.setStyle("setIndent"))
899
- }, null, 8, _hoisted_32)
909
+ }, null, 8, _hoisted_32$1)
900
910
  ]),
901
911
  _: 1
902
912
  }),
@@ -916,7 +926,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
916
926
  width: "24",
917
927
  height: "40",
918
928
  alt: ""
919
- }, null, 8, _hoisted_33),
929
+ }, null, 8, _hoisted_33$1),
920
930
  createElementVNode("img", {
921
931
  src: $options.getImageUrl("tools_arrow@3x.png"),
922
932
  width: "16",
@@ -1095,23 +1105,25 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
1095
1105
  ])
1096
1106
  ])) : createCommentVNode("", true);
1097
1107
  }
1098
- const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-dd9e6bac"]]);
1108
+ const ToolBar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$3], ["__scopeId", "data-v-719229ac"]]);
1099
1109
  const __vite_glob_0_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAmCAYAAAClI5npAAAA0UlEQVR42uWYwQnDMAxFfckAXkFDmGzgS1foDpnFS3gTb+IFtIDyA4UeBKUtNR8qwTvlkAdyfmSletySmRUwgIIJOijXs9VcLxegwNVDRFYLdHtdCg6wrRKY9l4NUFYIqH1WDeTfCXxXE9w5Ar4tQhBwh7SBjSDg2lJJAj47SAI+OwgC7pDuJAGfHQQBnx0kAZ8dBAF3SOtTgCchybjV2QLKFpihW6BAQn6GA0i4KG4g037H4QaSDiTWUMocyweQcFezBjLrer5TFxR/uaKhL6lOdeUQ8G6X1pQAAAAASUVORK5CYII=";
1100
1110
  const index_vue_vue_type_style_index_0_lang$4 = "";
1101
- const _hoisted_1$6 = { class: "basic-dialog_title" };
1102
- const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("span", { class: "basic-dialog_divider" }, null, -1);
1103
- 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 = {
1104
1115
  key: 0,
1105
1116
  class: "dialog-footer"
1106
1117
  };
1107
- const _hoisted_4$5 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
1108
- 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");
1109
1120
  const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1110
1121
  name: "index",
1111
1122
  props: {
1112
1123
  visible: { type: Boolean, default: false },
1113
1124
  showBtn: { type: Boolean, default: true },
1114
- width: { default: "840px" }
1125
+ width: { default: "840px" },
1126
+ showTitle: { type: Boolean, default: true }
1115
1127
  },
1116
1128
  emits: ["submit", "cancel"],
1117
1129
  setup(__props, { emit: emits }) {
@@ -1142,26 +1154,26 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1142
1154
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(dialogVisible) ? dialogVisible.value = $event : null),
1143
1155
  "before-close": handleClose,
1144
1156
  width: __props.width,
1145
- class: "basic-dialog"
1157
+ class: normalizeClass(["basic-dialog", { "hide-title": !__props.showTitle }])
1146
1158
  }, {
1147
1159
  header: withCtx(() => [
1148
- createElementVNode("div", null, [
1149
- createElementVNode("div", _hoisted_1$6, [
1150
- _hoisted_2$6,
1160
+ __props.showTitle ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
1161
+ createElementVNode("div", _hoisted_2$6, [
1162
+ _hoisted_3$6,
1151
1163
  renderSlot(_ctx.$slots, "title")
1152
1164
  ])
1153
- ])
1165
+ ])) : createCommentVNode("", true)
1154
1166
  ]),
1155
1167
  footer: withCtx(() => [
1156
- __props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_3$6, [
1168
+ __props.showBtn ? (openBlock(), createElementBlock("span", _hoisted_4$5, [
1157
1169
  createVNode(unref(ElButton), {
1158
- style: { "width": "120px", "border-color": "#CCCCCC", "color": "#333333" },
1170
+ style: { "width": "120px", "border-color": "#cccccc", "color": "#333333" },
1159
1171
  plain: "",
1160
1172
  round: "",
1161
1173
  onClick: handleClose
1162
1174
  }, {
1163
1175
  default: withCtx(() => [
1164
- _hoisted_4$5
1176
+ _hoisted_5$4
1165
1177
  ]),
1166
1178
  _: 1
1167
1179
  }),
@@ -1172,7 +1184,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1172
1184
  onClick: confirm
1173
1185
  }, {
1174
1186
  default: withCtx(() => [
1175
- _hoisted_5$4
1187
+ _hoisted_6$2
1176
1188
  ]),
1177
1189
  _: 1
1178
1190
  })
@@ -1182,7 +1194,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1182
1194
  renderSlot(_ctx.$slots, "default")
1183
1195
  ]),
1184
1196
  _: 3
1185
- }, 8, ["modelValue", "width"]);
1197
+ }, 8, ["modelValue", "width", "class"]);
1186
1198
  };
1187
1199
  }
1188
1200
  });
@@ -1332,21 +1344,21 @@ const _hoisted_4$4 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u6587\u
1332
1344
  const _hoisted_5$3 = /* @__PURE__ */ createTextVNode("\u4ECE\u6211\u7684\u89C6\u9891\u4E2D\u9009\u62E9");
1333
1345
  const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u4ECE\u6240\u6709\u6587\u7AE0\u4E2D\u9009\u62E9");
1334
1346
  const _hoisted_7$1 = { class: "insert-article_input" };
1335
- const _hoisted_8 = {
1347
+ const _hoisted_8$1 = {
1336
1348
  key: 0,
1337
1349
  class: "nodata"
1338
1350
  };
1339
- const _hoisted_9 = ["infinite-scroll-disabled"];
1340
- const _hoisted_10 = {
1351
+ const _hoisted_9$1 = ["infinite-scroll-disabled"];
1352
+ const _hoisted_10$1 = {
1341
1353
  key: 0,
1342
1354
  class: "video-item"
1343
1355
  };
1344
- const _hoisted_11 = { class: "video-pic" };
1345
- const _hoisted_12 = ["src"];
1346
- const _hoisted_13 = ["src"];
1347
- const _hoisted_14 = { class: "video-text" };
1348
- const _hoisted_15 = { class: "dotdotdot2" };
1349
- 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 = {
1350
1362
  key: 1,
1351
1363
  style: { "display": "inline-flex", "flex-direction": "column" }
1352
1364
  };
@@ -1503,7 +1515,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1503
1515
  _: 1
1504
1516
  }, 8, ["modelValue", "placeholder"])
1505
1517
  ]),
1506
- 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", {
1507
1519
  key: 1,
1508
1520
  "infinite-scroll-immediate": false,
1509
1521
  class: "insert-article_list",
@@ -1523,22 +1535,22 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1523
1535
  default: withCtx(() => {
1524
1536
  var _a;
1525
1537
  return [
1526
- unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10, [
1527
- createElementVNode("div", _hoisted_11, [
1538
+ unref(isVideo) ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
1539
+ createElementVNode("div", _hoisted_11$1, [
1528
1540
  createElementVNode("img", {
1529
1541
  class: "video-pic",
1530
1542
  src: (_a = item == null ? void 0 : item.mediaInfo[0]) == null ? void 0 : _a.img
1531
- }, null, 8, _hoisted_12),
1543
+ }, null, 8, _hoisted_12$1),
1532
1544
  createElementVNode("img", {
1533
1545
  class: "play",
1534
1546
  src: getImageUrl("play.png")
1535
- }, null, 8, _hoisted_13)
1547
+ }, null, 8, _hoisted_13$1)
1536
1548
  ]),
1537
- createElementVNode("div", _hoisted_14, [
1538
- 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),
1539
1551
  createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD hh-mm")), 1)
1540
1552
  ])
1541
- ])) : (openBlock(), createElementBlock("div", _hoisted_16, [
1553
+ ])) : (openBlock(), createElementBlock("div", _hoisted_16$1, [
1542
1554
  createElementVNode("span", null, toDisplayString(item.title || "[\u65E0\u6807\u9898]"), 1),
1543
1555
  createElementVNode("span", null, toDisplayString(unref(date).format(item.createTime * 1e3, "YYYY-MM-DD")), 1)
1544
1556
  ]))
@@ -1548,7 +1560,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1548
1560
  }, 1032, ["modelValue", "label", "onChange"])
1549
1561
  ]);
1550
1562
  }), 128))
1551
- ], 8, _hoisted_9)), [
1563
+ ], 8, _hoisted_9$1)), [
1552
1564
  [unref(vInfiniteScroll), getArticleList]
1553
1565
  ])
1554
1566
  ])
@@ -1598,24 +1610,94 @@ function v4(options, buf, offset) {
1598
1610
  return unsafeStringify(rnds);
1599
1611
  }
1600
1612
  const index_vue_vue_type_style_index_0_lang$2 = "";
1601
- const _hoisted_1$4 = /* @__PURE__ */ createElementVNode("span", null, "\u63D2\u5165\u56FE\u7247", -1);
1602
- 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 = {
1603
1617
  key: 0,
1604
- class: "upload-wrap"
1618
+ class: "line"
1605
1619
  };
1606
- const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("span", null, "\u672C\u5730\u4E0A\u4F20", -1);
1607
- 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);
1608
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 = {
1609
1647
  key: 1,
1610
1648
  class: "img-list"
1611
1649
  };
1612
- const _hoisted_6 = ["src"];
1613
- 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
+ ];
1614
1693
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1615
1694
  name: "index",
1616
1695
  props: {
1617
1696
  visible: { type: Boolean, default: false },
1618
- imgList: { default: [] }
1697
+ imgList: { default: [] },
1698
+ chartGallery: { type: Boolean, default: false },
1699
+ request: { default: {} },
1700
+ imgNum: { default: 20 }
1619
1701
  },
1620
1702
  emits: ["update:imgList", "update:visible", "submit"],
1621
1703
  setup(__props, { emit: emits }) {
@@ -1661,86 +1743,442 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1661
1743
  var ele = document.getElementsByClassName("imageFile");
1662
1744
  ele[0].dispatchEvent(event);
1663
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
+ };
1664
1962
  return (_ctx, _cache) => {
1665
1963
  return openBlock(), createBlock(_sfc_main$6, {
1666
- visible: props.visible
1964
+ visible: props.visible,
1965
+ showTitle: false
1667
1966
  }, {
1668
- title: withCtx(() => [
1669
- _hoisted_1$4
1670
- ]),
1671
1967
  default: withCtx(() => [
1672
- createElementVNode("div", {
1673
- class: normalizeClass(["insert-img", !props.imgList.length ? "no-img" : ""])
1674
- }, [
1675
- !props.imgList.length ? (openBlock(), createElementBlock("div", _hoisted_2$4, [
1676
- createElementVNode("div", {
1677
- class: "upload-wrap_box",
1678
- onClick: emitEvent
1679
- }, [
1680
- 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
+ }, {
1681
2142
  default: withCtx(() => [
1682
- createVNode(unref(Picture))
2143
+ _hoisted_21
1683
2144
  ]),
1684
2145
  _: 1
1685
- }),
1686
- _hoisted_3$4
2146
+ })
1687
2147
  ]),
1688
- _hoisted_4$3
1689
- ])) : (openBlock(), createElementBlock("div", _hoisted_5$2, [
1690
- createVNode(unref(draggable), {
1691
- modelValue: unref(imgListTemp),
1692
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(imgListTemp) ? imgListTemp.value = $event : null),
1693
- handle: ".img-item",
1694
- class: "img-wrap",
1695
- group: "people",
1696
- onStart: _cache[1] || (_cache[1] = ($event) => drag.value = true),
1697
- "item-key": "id",
1698
- onEnd: _cache[2] || (_cache[2] = ($event) => drag.value = false)
1699
- }, {
1700
- item: withCtx(({ element }) => [
1701
- (openBlock(), createElementBlock("div", {
1702
- key: element.id,
1703
- class: "img-item"
1704
- }, [
1705
- createElementVNode("img", {
1706
- src: element.src,
1707
- style: { "object-fit": "cover" },
1708
- width: "120",
1709
- height: "120"
1710
- }, null, 8, _hoisted_6),
1711
- createVNode(unref(CircleCloseFilled), {
1712
- class: "icon pointer",
1713
- onClick: ($event) => deleteImg(element)
1714
- }, null, 8, ["onClick"])
1715
- ]))
1716
- ]),
1717
- footer: withCtx(() => [
1718
- createElementVNode("div", {
1719
- class: "upload-icon pointer",
1720
- onClick: emitEvent
1721
- }, [
1722
- createVNode(unref(ElIcon), { class: "icon pointer" }, {
1723
- default: withCtx(() => [
1724
- createVNode(unref(Plus))
1725
- ]),
1726
- _: 1
1727
- })
1728
- ])
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))
1729
2160
  ]),
1730
- _: 1
1731
- }, 8, ["modelValue"])
1732
- ])),
1733
- createElementVNode("div", _hoisted_7, [
1734
- createElementVNode("input", {
1735
- type: "file",
1736
- name: "file",
1737
- multiple: "",
1738
- class: "imageFile",
1739
- accept: "image/*",
1740
- onChange: _cache[3] || (_cache[3] = ($event) => selectImgs($event))
1741
- }, null, 32)
1742
- ])
1743
- ], 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
+ ])
1744
2182
  ]),
1745
2183
  _: 1
1746
2184
  }, 8, ["visible"]);
@@ -2004,7 +2442,9 @@ const _sfc_main = {
2004
2442
  "getEassyDetail",
2005
2443
  "getArticleList",
2006
2444
  "importEssay",
2007
- "uploadImageByOther"
2445
+ "uploadImageByOther",
2446
+ "chartGallery",
2447
+ "request"
2008
2448
  ],
2009
2449
  data() {
2010
2450
  return {
@@ -2019,6 +2459,7 @@ const _sfc_main = {
2019
2459
  setAlignFlag: true,
2020
2460
  article: {},
2021
2461
  imgList: [],
2462
+ imgNum: 20,
2022
2463
  videoList: [],
2023
2464
  visibleVideo: false,
2024
2465
  visibleCollectArticle: false,
@@ -2066,7 +2507,9 @@ const _sfc_main = {
2066
2507
  },
2067
2508
  countList: [],
2068
2509
  replaceSeamless: 0,
2069
- seamlessCount: 0
2510
+ seamlessCount: 0,
2511
+ overLine: "",
2512
+ currentVideo: null
2070
2513
  };
2071
2514
  },
2072
2515
  computed: {
@@ -2216,6 +2659,12 @@ const _sfc_main = {
2216
2659
  this.imgUploadHandler(type, src);
2217
2660
  });
2218
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
+ },
2219
2668
  againImg(e) {
2220
2669
  this.$emit("insertImgs", e.target.files, "uploadAgainImages", (type, src) => {
2221
2670
  this.visibleImg = false;
@@ -2405,7 +2854,9 @@ const _sfc_main = {
2405
2854
  node.onclick = function() {
2406
2855
  me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2407
2856
  };
2857
+ const replaceBtn = me2.insertVideoBtns(this, video);
2408
2858
  node.appendChild(delBtn);
2859
+ node.appendChild(replaceBtn);
2409
2860
  },
2410
2861
  async parseArticle(node) {
2411
2862
  const data = JSON.parse(node.dataset.article);
@@ -2506,20 +2957,95 @@ const _sfc_main = {
2506
2957
  uploadArticle() {
2507
2958
  this.visibleArticle = true;
2508
2959
  },
2509
- uploadImg(type) {
2960
+ uploadImg(type, num) {
2510
2961
  this.visibleImg = true;
2511
2962
  this.imgType = type;
2512
2963
  this.imgList = [];
2964
+ this.imgNum = num || 20;
2513
2965
  },
2514
- submitImg() {
2515
- const files = this.imgList.map((item) => item.file);
2966
+ async submitImg() {
2516
2967
  this.count = 0;
2517
2968
  this.countList = [];
2518
2969
  this.seamlessCount = 0;
2519
- this.$emit("insertImgs", files, "img", (type, src) => {
2970
+ if (this.imgList.length) {
2971
+ const idList = [];
2972
+ const list_1 = [];
2973
+ const list_2 = [];
2974
+ const list_3 = [];
2975
+ this.imgList.forEach((v) => {
2976
+ idList.push(v.id);
2977
+ if (v.type === 1) {
2978
+ list_1.push(v);
2979
+ } else if (v.type === 3) {
2980
+ list_3.push(v);
2981
+ } else {
2982
+ list_2.push(v);
2983
+ }
2984
+ });
2985
+ const list_2_new = await this.reviseFilesImg(list_2);
2986
+ const list_3_new = await this.reviseSrcImg(list_3);
2987
+ const list_all = [...list_1, ...list_2_new, ...list_3_new];
2988
+ const imgList_new = [];
2989
+ idList.forEach((id) => {
2990
+ const item = list_all.find((value) => value.id === id);
2991
+ if (item && item.src) {
2992
+ imgList_new.push(item);
2993
+ }
2994
+ });
2995
+ if (this.imgType === "coverImg") {
2996
+ this.$emit("insertImgs", imgList_new, this.imgType);
2997
+ } else {
2998
+ imgList_new.forEach((img) => {
2999
+ this.imgUploadHandler("img", img.src);
3000
+ });
3001
+ }
2520
3002
  this.visibleImg = false;
2521
- this.imgUploadHandler(type, src);
2522
- });
3003
+ } else {
3004
+ this.visibleImg = false;
3005
+ }
3006
+ },
3007
+ async reviseFilesImg(list) {
3008
+ if (list.length) {
3009
+ const p_l = [];
3010
+ list.forEach((v) => {
3011
+ const p = new Promise((resolve, reject) => {
3012
+ try {
3013
+ this.$emit("insertImgs", [v.file], "img", (type, src) => {
3014
+ resolve({ ...v, src });
3015
+ });
3016
+ } catch (error) {
3017
+ reject(error);
3018
+ }
3019
+ });
3020
+ p_l.push(p);
3021
+ });
3022
+ const res = await Promise.all(p_l);
3023
+ return res;
3024
+ } else {
3025
+ return [];
3026
+ }
3027
+ },
3028
+ async reviseSrcImg(list) {
3029
+ const copyToEssayImg = this.request.copyToEssayImg;
3030
+ if (copyToEssayImg && list.length) {
3031
+ const arr = [];
3032
+ list.forEach((v) => {
3033
+ arr.push(v.src);
3034
+ });
3035
+ const res = await copyToEssayImg({ imgUrls: arr.join(",") });
3036
+ if (res.data.code === 0) {
3037
+ const data = res.data.data || "";
3038
+ const list_new = data ? data.split(",") : [];
3039
+ list.forEach((v, i) => {
3040
+ v.src = list_new[i] || "";
3041
+ });
3042
+ return list;
3043
+ } else {
3044
+ return [];
3045
+ }
3046
+ } else {
3047
+ return [];
3048
+ }
2523
3049
  },
2524
3050
  imgUploadHandler(type, imgSrc) {
2525
3051
  const me2 = this;
@@ -2537,6 +3063,20 @@ const _sfc_main = {
2537
3063
  seamlessFlag: me2.replaceSeamless,
2538
3064
  type: "2"
2539
3065
  }, this.range);
3066
+ } else if (type === "replace-poster") {
3067
+ if (this.currentVideo) {
3068
+ this.currentVideo.poster = imgSrc;
3069
+ try {
3070
+ const videoData = JSON.parse(this.currentVideo.getAttribute("data") || "{}");
3071
+ this.currentVideo.setAttribute("data", JSON.stringify({ ...videoData, img: imgSrc }));
3072
+ const contentNode = this.currentVideo.parentNode;
3073
+ const contentData = JSON.parse(contentNode.dataset.video || "{}");
3074
+ contentNode.dataset.video = JSON.stringify({ ...contentData, img: imgSrc });
3075
+ } catch (error) {
3076
+ console.log(error);
3077
+ }
3078
+ this.currentVideo = null;
3079
+ }
2540
3080
  } else {
2541
3081
  this.seamlessCount++;
2542
3082
  const isLast = this.seamlessCount === this.imgList.length;
@@ -2555,6 +3095,21 @@ const _sfc_main = {
2555
3095
  this.setToast(rst.origin.name + "\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5");
2556
3096
  }
2557
3097
  },
3098
+ insertVideoBtns(editor, node) {
3099
+ const me2 = this;
3100
+ var replaceBtn = editor.createElement("div", {
3101
+ "class": "video-cover-replace pointer",
3102
+ "contenteditable": "false"
3103
+ });
3104
+ replaceBtn.onclick = function(e) {
3105
+ const posterBtn = document.querySelector(".replace-poster");
3106
+ posterBtn.click();
3107
+ me2.currentVideo = node;
3108
+ e.stopPropagation();
3109
+ };
3110
+ replaceBtn.innerText = "\u66F4\u6362\u5C01\u9762";
3111
+ return replaceBtn;
3112
+ },
2558
3113
  insertImgOperateBtns(editor, data) {
2559
3114
  const me2 = this;
2560
3115
  var replaceBtn = editor.createElement("div", {
@@ -2667,7 +3222,7 @@ const _sfc_main = {
2667
3222
  },
2668
3223
  initSquire() {
2669
3224
  const me2 = this;
2670
- me2.editorDom;
3225
+ const editorDom = me2.editorDom;
2671
3226
  me2.editor = new window.Squire(me2.editorDom, {
2672
3227
  blockTag: "p",
2673
3228
  blockAttributes: {
@@ -2786,7 +3341,8 @@ const _sfc_main = {
2786
3341
  "data": JSON.stringify(data),
2787
3342
  "style": isSeameless ? "margin: 0" : "margin-top: 0",
2788
3343
  "data-content": data.content || "",
2789
- "contenteditable": "false"
3344
+ "contenteditable": "false",
3345
+ "draggable": "false"
2790
3346
  });
2791
3347
  const btns = me2.insertImgOperateBtns(this, data);
2792
3348
  var childList = [];
@@ -2797,8 +3353,15 @@ const _sfc_main = {
2797
3353
  !isHaloImage && childList.push(again);
2798
3354
  var p = this.createElement("div", {
2799
3355
  "class": "halo-img-content",
2800
- "contenteditable": "false"
3356
+ "contenteditable": "false",
3357
+ "draggable": "false"
2801
3358
  }, [...childList]);
3359
+ p.onfocus = function() {
3360
+ img.style["outline"] = "1px solid #1a74ff";
3361
+ };
3362
+ p.onblur = function() {
3363
+ img.style["outline"] = "none";
3364
+ };
2802
3365
  this.insertElement(p, range);
2803
3366
  if (isSeameless) {
2804
3367
  me2.removeDefault(p, "nextElementSibling");
@@ -2847,14 +3410,41 @@ const _sfc_main = {
2847
3410
  }
2848
3411
  });
2849
3412
  console.log(delBtn);
3413
+ const posterBtn = me2.insertVideoBtns(this, video);
2850
3414
  var p = this.createElement("DIV", {
2851
3415
  "class": "halo-video-content",
2852
- "contenteditable": "true",
2853
- "data-video": JSON.stringify(data)
2854
- }, [video, delBtn]);
3416
+ "contenteditable": "false",
3417
+ "data-video": JSON.stringify(data),
3418
+ "draggable": "true"
3419
+ }, [video, delBtn, posterBtn]);
2855
3420
  p.onclick = function() {
2856
3421
  me2.setToast("\u4E0D\u652F\u6301\u64AD\u653E");
2857
3422
  };
3423
+ let targetMove = "";
3424
+ p.ondragstart = function(e) {
3425
+ if (!(e.target.className.indexOf("halo-video-content") < 0)) {
3426
+ e.dataTransfer.setData("text/html", e.target);
3427
+ e.dataTransfer.effectAllowed = "move";
3428
+ e.dataTransfer.dropEffect = "move";
3429
+ targetMove = e.target;
3430
+ }
3431
+ };
3432
+ editorDom.ondragover = function(e) {
3433
+ if (targetMove && !(targetMove.className.indexOf("halo-video-content") < 0)) {
3434
+ e.preventDefault();
3435
+ }
3436
+ };
3437
+ editorDom.ondrop = function(e) {
3438
+ if (targetMove && !(targetMove.className.indexOf("halo-video-content") < 0)) {
3439
+ if (e.target === editorDom) {
3440
+ e.target.appendChild(targetMove);
3441
+ } else {
3442
+ e.target.after(targetMove);
3443
+ }
3444
+ targetMove = "";
3445
+ e.preventDefault();
3446
+ }
3447
+ };
2858
3448
  this.insertElement(p);
2859
3449
  setTimeout(() => {
2860
3450
  document.documentElement.scrollTop = scrollTop;
@@ -3078,11 +3668,16 @@ const _sfc_main = {
3078
3668
  getSticker(type, handler) {
3079
3669
  this.setSticker(type.fragment.children);
3080
3670
  },
3081
- setSticker(data) {
3671
+ setSticker(data, isImport) {
3082
3672
  const me2 = this;
3083
3673
  data = Array.from(data);
3084
3674
  data.map(function(value, index) {
3085
- const htmlArr = (value.innerHTML || value.outerHTML).replace(/<img(.*?)src="(.*?)"(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<img(.*?)src='(.*?)'(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<a href="(.*?)"(.*?)>(.*?)<\/a>/g, "(delimiter)$3(delimiter)").replace(/<p (.*?)>(.*?)<\/p>/g, "(delimiter)$2(delimiter)").replace(/<\/?.+?>/g, "").split("(delimiter)");
3675
+ let htmlArr = [];
3676
+ if (isImport) {
3677
+ htmlArr = value.outerHTML.replace(/<img(.*?)src="(.*?)"(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<img(.*?)src='(.*?)'(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<a href="(.*?)"(.*?)>(.*?)<\/a>/g, "(delimiter)$3(delimiter)").replace(/<p (.*?)>(.*?)<\/p>/g, '(delimiter)<p class="halo-paragraph" $1>$2</p>(delimiter)').split("(delimiter)");
3678
+ } else {
3679
+ htmlArr = (value.innerHTML || value.outerHTML).replace(/<img(.*?)src="(.*?)"(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<img(.*?)src='(.*?)'(.*?)>/g, "(delimiter)[img src=$2](delimiter)").replace(/<a href="(.*?)"(.*?)>(.*?)<\/a>/g, "(delimiter)$3(delimiter)").replace(/<p (.*?)>(.*?)<\/p>/g, "(delimiter)$2(delimiter)").replace(/<\/?.+?>/g, "").split("(delimiter)");
3680
+ }
3086
3681
  htmlArr.map(function(nValue) {
3087
3682
  if (!nValue || nValue === "&nbsp;") {
3088
3683
  return;
@@ -3246,7 +3841,7 @@ const _sfc_main = {
3246
3841
  data.data.content = data.data.content.replace(/<a href="(.*?)"(.*?)>/g, "").replace(/<\/a>/g, "").replace(/<iframe([^<>]*)>([^<>]*)<\/iframe>/g, "").replace(/<video([^<>]*)>([^<>]*)<\/video>/g, "");
3247
3842
  const importContent = document.createElement("div");
3248
3843
  importContent.innerHTML = data.data.content;
3249
- me2.setSticker(importContent.children);
3844
+ me2.setSticker(importContent.children, true);
3250
3845
  me2.closeDialog();
3251
3846
  me2.linkContent = "";
3252
3847
  return;
@@ -3394,8 +3989,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3394
3989
  "onUpdate:img-list": _cache[6] || (_cache[6] = ($event) => $data.imgList = $event),
3395
3990
  visible: $data.visibleImg,
3396
3991
  "onUpdate:visible": _cache[7] || (_cache[7] = ($event) => $data.visibleImg = $event),
3992
+ chartGallery: $props.chartGallery,
3993
+ request: $props.request,
3994
+ imgNum: $data.imgNum,
3397
3995
  onSubmit: $options.submitImg
3398
- }, null, 8, ["img-list", "visible", "onSubmit"]),
3996
+ }, null, 8, ["img-list", "visible", "chartGallery", "request", "imgNum", "onSubmit"]),
3399
3997
  createVNode(_component_VideoUpload, {
3400
3998
  visible: $data.visibleVideo,
3401
3999
  "onUpdate:visible": _cache[8] || (_cache[8] = ($event) => $data.visibleVideo = $event),
@@ -3422,6 +4020,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
3422
4020
  class: "replace-input hide",
3423
4021
  accept: "image/*",
3424
4022
  onChange: _cache[12] || (_cache[12] = (...args) => $options.replaceImg && $options.replaceImg(...args))
4023
+ }, null, 32),
4024
+ createElementVNode("input", {
4025
+ type: "file",
4026
+ name: "file",
4027
+ class: "replace-poster hide",
4028
+ accept: "image/*",
4029
+ onChange: _cache[13] || (_cache[13] = (...args) => $options.replacePoster && $options.replacePoster(...args))
3425
4030
  }, null, 32)
3426
4031
  ]);
3427
4032
  }