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