@newview/file-ui 1.1.47 → 1.1.48

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/file-ui.js CHANGED
@@ -8,10 +8,10 @@ import { BaseInstance } from "@newview/base-vue";
8
8
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, createElementVNode, reactive, renderList, createBlock, createSlots, normalizeClass, withModifiers, createCommentVNode, toDisplayString, createTextVNode, pushScopeId, popScopeId, onMounted, onBeforeUnmount, nextTick, h, watchEffect, withDirectives, vShow, normalizeStyle, vModelText } from "vue";
9
9
  import { QueryWrapper, storageInfo } from "@newview/infrastructure";
10
10
  import { OSSFileApi, FileApi, UploadApi, FileInfoApi } from "@newview/fileservice-api";
11
- import { DictionaryDetailApi, DataStructureApi, StructureInstanceApi } from "@newview/basics-api";
11
+ import { DictionaryDetailApi, DataStructureApi, StructureInstanceApi, StructureInstance_HCApi } from "@newview/basics-api";
12
12
  import { utilities } from "@newview/tools";
13
13
  import { CASign } from "@newview/permission-ui";
14
- const propDefine$7 = {
14
+ const propDefine$8 = {
15
15
  modelValue: {
16
16
  // 是否显示
17
17
  type: Boolean,
@@ -34,12 +34,12 @@ const propDefine$7 = {
34
34
  default: 0
35
35
  }
36
36
  };
37
- const _sfc_main$7 = defineComponent({
37
+ const _sfc_main$8 = defineComponent({
38
38
  name: "FilePreview",
39
39
  components: {},
40
40
  emits: ["update:modelValue"],
41
41
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
42
- props: propDefine$7,
42
+ props: propDefine$8,
43
43
  setup(props, ctx) {
44
44
  return new FilePreviewInstance(props, ctx);
45
45
  }
@@ -151,9 +151,9 @@ const _export_sfc = (sfc, props) => {
151
151
  }
152
152
  return target;
153
153
  };
154
- const _hoisted_1$4 = { class: "ifr-container" };
155
- const _hoisted_2$4 = ["src", "title"];
156
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
154
+ const _hoisted_1$5 = { class: "ifr-container" };
155
+ const _hoisted_2$5 = ["src", "title"];
156
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
157
157
  const _component_ImagePreview = resolveComponent("ImagePreview");
158
158
  const _component_Modal = resolveComponent("Modal");
159
159
  return openBlock(), createElementBlock(Fragment, null, [
@@ -177,20 +177,20 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
177
177
  onOnVisibleChange: _ctx.doClose
178
178
  }, {
179
179
  default: withCtx(() => [
180
- createElementVNode("div", _hoisted_1$4, [
180
+ createElementVNode("div", _hoisted_1$5, [
181
181
  createElementVNode("iframe", {
182
182
  src: _ctx.ifrUrl,
183
183
  class: "ifr-content",
184
184
  title: _ctx.fileInfo.fileInfo
185
- }, " ", 8, _hoisted_2$4)
185
+ }, " ", 8, _hoisted_2$5)
186
186
  ])
187
187
  ]),
188
188
  _: 1
189
189
  }, 8, ["modelValue", "title", "onOnVisibleChange"])
190
190
  ], 64);
191
191
  }
192
- const filePreview = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__scopeId", "data-v-e7f81a3b"]]);
193
- const propDefine$6 = {
192
+ const filePreview = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-e7f81a3b"]]);
193
+ const propDefine$7 = {
194
194
  linkParam: {
195
195
  // 带入的参数
196
196
  type: String,
@@ -267,12 +267,12 @@ const propDefine$6 = {
267
267
  default: true
268
268
  }
269
269
  };
270
- const _sfc_main$6 = defineComponent({
270
+ const _sfc_main$7 = defineComponent({
271
271
  name: "UploadFile",
272
272
  components: { filePreview },
273
273
  emits: ["success", "returnFileList"],
274
274
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
275
- props: propDefine$6,
275
+ props: propDefine$7,
276
276
  setup(props, ctx) {
277
277
  return new UploadFileInstance$1(props, ctx);
278
278
  }
@@ -762,28 +762,28 @@ let UploadFileInstance$1 = class UploadFileInstance extends BaseInstance {
762
762
  //#endregion 业务逻辑 文件预览 END
763
763
  };
764
764
  const UploadFile_vue_vue_type_style_index_0_scoped_6ac1e6fe_lang = "";
765
- const _withScopeId$1 = (n) => (pushScopeId("data-v-6ac1e6fe"), n = n(), popScopeId(), n);
766
- const _hoisted_1$3 = { class: "uploadFile uploadPage" };
767
- const _hoisted_2$3 = ["title"];
768
- const _hoisted_3$3 = ["onClick"];
769
- const _hoisted_4$2 = { class: "file-upload-list-cover" };
770
- const _hoisted_5$2 = {
765
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-6ac1e6fe"), n = n(), popScopeId(), n);
766
+ const _hoisted_1$4 = { class: "uploadFile uploadPage" };
767
+ const _hoisted_2$4 = ["title"];
768
+ const _hoisted_3$4 = ["onClick"];
769
+ const _hoisted_4$3 = { class: "file-upload-list-cover" };
770
+ const _hoisted_5$3 = {
771
771
  key: 0,
772
772
  class: "file-upload-list-name nv-text-nowrap"
773
773
  };
774
- const _hoisted_6$2 = { class: "file-upload-loading" };
775
- const _hoisted_7$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", null, "上传进度", -1));
776
- const _hoisted_8$2 = ["onClick"];
777
- const _hoisted_9$2 = {
774
+ const _hoisted_6$3 = { class: "file-upload-loading" };
775
+ const _hoisted_7$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", null, "上传进度", -1));
776
+ const _hoisted_8$3 = ["onClick"];
777
+ const _hoisted_9$3 = {
778
778
  key: 2,
779
779
  class: "nv-flex",
780
780
  style: { "color": "#949494", "border": "1px dashed #dcdee2", "height": "60px", "padding": "0 20px", "font-size": "16px", "justify-content": "center" }
781
781
  };
782
- const _hoisted_10$2 = {
782
+ const _hoisted_10$3 = {
783
783
  class: "nv-flex",
784
784
  style: { "width": "40px", "margin-right": "6px" }
785
785
  };
786
- const _hoisted_11$2 = {
786
+ const _hoisted_11$3 = {
787
787
  t: "1706683071705",
788
788
  class: "icon",
789
789
  viewBox: "0 0 1566 1024",
@@ -792,17 +792,17 @@ const _hoisted_11$2 = {
792
792
  "p-id": "4559",
793
793
  style: { "fill": "currentColor" }
794
794
  };
795
- const _hoisted_12$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("path", {
795
+ const _hoisted_12$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("path", {
796
796
  d: "M156.661991 699.757959h21.096999a10.443999 10.443999 0 0 1 10.235999 10.443999c0 5.765-4.491 10.443999-10.235999 10.444h-21.096999v21.097999a10.443999 10.443999 0 0 1-10.444 10.234999 10.276999 10.276999 0 0 1-10.443999-10.234999v-21.097999h-21.096999a10.443999 10.443999 0 0 1-10.234999-10.444c0-5.765 4.49-10.443999 10.234999-10.443999h21.096999v-21.096999a10.443999 10.443999 0 0 1 10.443999-10.234999c5.765 0 10.443999 4.49 10.444 10.234999v21.096999z m1378.627919-83.552995v-21.096999a10.276999 10.276999 0 0 0-10.443999-10.234999 10.443999 10.443999 0 0 0-10.444 10.234999v21.096999h-21.096998a10.276999 10.276999 0 0 0-10.235 10.443999c0 5.598 4.595 10.443999 10.235 10.444h21.096998v21.096998c0 5.745 4.679 10.235999 10.444 10.236a10.443999 10.443999 0 0 0 10.443999-10.236v-21.096998h21.097999c5.744 0 10.234999-4.679 10.234999-10.444a10.443999 10.443999 0 0 0-10.234999-10.443999h-21.097999zM776.459955 960.861944H250.596985a20.804999 20.804999 0 0 1-20.825998-20.887999c0-11.529999 9.462999-20.888999 20.825998-20.888999h94.727995a83.009995 83.009995 0 0 1-11.112-41.671997v-605.969965a83.489995 83.489995 0 0 1 83.636996-83.447995h62.580996v-20.992999a83.489995 83.489995 0 0 1 83.636995-83.448995h501.151971a83.448995 83.448995 0 0 1 83.636995 83.448995v605.969965c0 15.184999-4.053 29.409998-11.134 41.671997h115.553994c11.551999 0 20.909999 9.273999 20.909998 20.887999 0 11.529999-9.295999 20.887999-20.888998 20.887999h-250.659986v20.992999c0 15.185999-4.052 29.409998-11.132999 41.671997h11.195999c11.488999 0 20.825999 9.274999 20.825999 20.888999 0 11.529999-9.462999 20.887999-20.825999 20.887999H892.807948a41.657998 41.657998 0 0 1-6.413 50.862997 41.671998 41.671998 0 0 1-59.071996 0l-50.862997-50.862997z m76.367995-41.776998h66.423996c22.977999 0 41.609998-18.589999 41.609998-41.879997V270.460984c0-22.559999-18.047999-40.689998-40.313998-40.689997H416.303976c-22.266999 0-40.314998 18.213999-40.314998 40.689997v606.741965c0 23.123999 18.799999 41.880998 41.589998 41.880997h317.083981l-10.736999-10.756999a41.692998 41.692998 0 0 1-10.862-40.376998l-19.718999-19.739999a146.259991 146.259991 0 0 1-190.980988-220.516987 146.217991 146.217991 0 0 1 220.517987 190.980989l19.738998 19.739999a41.629998 41.629998 0 0 1 40.376998 10.839999l69.829996 69.829996z m149.809991-104.440994h62.852997a41.796998 41.796998 0 0 0 41.589997-41.776997v-605.759965c0-23.144999-18.632999-41.776998-41.589997-41.776997H563.774967a41.796998 41.796998 0 0 0-41.566998 41.775997v20.888999h396.793977a83.448995 83.448995 0 0 1 83.636995 83.448995v543.199968zM266.326984 46.998997h31.122999c8.773999 0 15.875999 6.955 15.875999 15.665999 0 8.647999-7.102 15.665999-15.875999 15.665999h-31.122999v31.123999c0 8.772999-6.956 15.874999-15.665999 15.874999a15.769999 15.769999 0 0 1-15.666999-15.874999V78.329995H203.869988a15.728999 15.728999 0 0 1-15.874999-15.665999c0-8.647999 7.102-15.665999 15.874999-15.665999h31.122998V15.874999C234.992986 7.102 241.949986 0 250.659985 0c8.646999 0 15.665999 7.102 15.665999 15.874999V46.999997zM20.887999 939.973945c0-11.529999 9.462999-20.888999 20.825999-20.888999h125.454992c11.488999 0 20.825999 9.274999 20.825999 20.888999 0 11.529999-9.462999 20.887999-20.825999 20.887999H41.713998a20.804999 20.804999 0 0 1-20.825999-20.887999z m658.733961-135.021992A104.441994 104.441994 0 1 0 531.899969 657.229961a104.441994 104.441994 0 0 0 147.721991 147.721992z m-220.079987-491.626971a20.887999 20.887999 0 0 1 20.867999-20.888999h229.791986a20.887999 20.887999 0 1 1 0 41.776997H480.430972a20.825999 20.825999 0 0 1-20.887999-20.887998z m0 104.440994c0-11.529999 9.295999-20.887999 20.742999-20.887999H814.789952c11.446999 0 20.741999 9.273999 20.741999 20.887999 0 11.529999-9.294999 20.887999-20.741999 20.887998H480.284972a20.762999 20.762999 0 0 1-20.741999-20.887998z m0 104.441993c0-11.529999 9.316999-20.888999 20.846999-20.888998h146.301991c11.509999 0 20.845999 9.274999 20.845999 20.888998 0 11.529999-9.315999 20.887999-20.845999 20.887999H480.388972a20.804999 20.804999 0 0 1-20.845999-20.887999zM62.665996 396.877977a62.664996 62.664996 0 1 1 0-125.329993 62.664996 62.664996 0 0 1 0 125.329993z m0-31.332998a31.331998 31.331998 0 1 0 0-62.664997 31.331998 31.331998 0 0 0 0 62.664997z m1295.074924-93.996995a62.664996 62.664996 0 1 1 0-125.329993 62.664996 62.664996 0 0 1 0 125.329993z m0-31.332998a31.331998 31.331998 0 1 0 0-62.663996 31.331998 31.331998 0 0 0 0 62.663996z",
797
797
  "p-id": "4560"
798
798
  }, null, -1));
799
- const _hoisted_13$1 = [
800
- _hoisted_12$2
799
+ const _hoisted_13$2 = [
800
+ _hoisted_12$3
801
801
  ];
802
- const _hoisted_14$1 = { class: "file-upload-list-cover" };
803
- const _hoisted_15$1 = { class: "file-upload-loading" };
804
- const _hoisted_16$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", null, "上传进度", -1));
805
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
802
+ const _hoisted_14$2 = { class: "file-upload-list-cover" };
803
+ const _hoisted_15$2 = { class: "file-upload-loading" };
804
+ const _hoisted_16$2 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", null, "上传进度", -1));
805
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
806
806
  const _component_Image = resolveComponent("Image");
807
807
  const _component_Icon = resolveComponent("Icon");
808
808
  const _component_Space = resolveComponent("Space");
@@ -811,7 +811,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
811
811
  const _component_Card = resolveComponent("Card");
812
812
  const _component_Spin = resolveComponent("Spin");
813
813
  const _component_filePreview = resolveComponent("filePreview");
814
- return openBlock(), createElementBlock("div", _hoisted_1$3, [
814
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [
815
815
  !_ctx.single ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.groups, (groupName) => {
816
816
  return openBlock(), createBlock(_component_Card, {
817
817
  "dis-hover": "",
@@ -834,7 +834,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
834
834
  width: "100%",
835
835
  height: "100%"
836
836
  }, null, 8, ["src"]),
837
- createElementVNode("div", _hoisted_4$2, [
837
+ createElementVNode("div", _hoisted_4$3, [
838
838
  createVNode(_component_Space, null, {
839
839
  default: withCtx(() => [
840
840
  createVNode(_component_Icon, {
@@ -852,9 +852,9 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
852
852
  _: 2
853
853
  }, 1024)
854
854
  ])
855
- ], 10, _hoisted_3$3),
856
- _ctx.isShowFileName ? (openBlock(), createElementBlock("div", _hoisted_5$2, toDisplayString(item.FileName), 1)) : createCommentVNode("", true)
857
- ], 8, _hoisted_2$3);
855
+ ], 10, _hoisted_3$4),
856
+ _ctx.isShowFileName ? (openBlock(), createElementBlock("div", _hoisted_5$3, toDisplayString(item.FileName), 1)) : createCommentVNode("", true)
857
+ ], 8, _hoisted_2$4);
858
858
  }), 256)),
859
859
  _ctx.uploadingPercent > 0 && _ctx.uploadingPercent < 100 ? (openBlock(), createBlock(_component_Circle, {
860
860
  key: 0,
@@ -863,9 +863,9 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
863
863
  "stroke-color": ["#108ee9", "#87d068"]
864
864
  }, {
865
865
  default: withCtx(() => [
866
- createElementVNode("div", _hoisted_6$2, [
866
+ createElementVNode("div", _hoisted_6$3, [
867
867
  createElementVNode("div", null, toDisplayString(_ctx.uploadingPercent) + "%", 1),
868
- _hoisted_7$2
868
+ _hoisted_7$3
869
869
  ])
870
870
  ]),
871
871
  _: 1
@@ -897,14 +897,14 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
897
897
  type: "ios-camera",
898
898
  size: "20"
899
899
  })
900
- ], 8, _hoisted_8$2)
900
+ ], 8, _hoisted_8$3)
901
901
  ]),
902
902
  _: 2
903
903
  }, 1032, ["multiple", "format", "max-size", "headers", "data", "on-success", "on-format-error", "on-exceeded-size", "before-upload"])) : createCommentVNode("", true)
904
904
  ], 64)),
905
- _ctx.readonly && _ctx.fileList.length == 0 ? (openBlock(), createElementBlock("div", _hoisted_9$2, [
906
- createElementVNode("i", _hoisted_10$2, [
907
- (openBlock(), createElementBlock("svg", _hoisted_11$2, _hoisted_13$1))
905
+ _ctx.readonly && _ctx.fileList.length == 0 ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
906
+ createElementVNode("i", _hoisted_10$3, [
907
+ (openBlock(), createElementBlock("svg", _hoisted_11$3, _hoisted_13$2))
908
908
  ]),
909
909
  createElementVNode("div", null, toDisplayString(_ctx.nullMsg), 1)
910
910
  ])) : createCommentVNode("", true)
@@ -932,7 +932,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
932
932
  width: "100%",
933
933
  height: "100%"
934
934
  }, null, 8, ["src"]),
935
- createElementVNode("div", _hoisted_14$1, [
935
+ createElementVNode("div", _hoisted_14$2, [
936
936
  createVNode(_component_Space, null, {
937
937
  default: withCtx(() => [
938
938
  createVNode(_component_Icon, {
@@ -964,9 +964,9 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
964
964
  "stroke-color": ["#108ee9", "#87d068"]
965
965
  }, {
966
966
  default: withCtx(() => [
967
- createElementVNode("div", _hoisted_15$1, [
967
+ createElementVNode("div", _hoisted_15$2, [
968
968
  createElementVNode("div", null, toDisplayString(_ctx.uploadingPercent) + "%", 1),
969
- _hoisted_16$1
969
+ _hoisted_16$2
970
970
  ])
971
971
  ]),
972
972
  _: 1
@@ -1019,7 +1019,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
1019
1019
  }, null, 8, ["modelValue", "preview-list", "preview-index", "file-info"])
1020
1020
  ]);
1021
1021
  }
1022
- const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-6ac1e6fe"]]);
1022
+ const UploadFile = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__scopeId", "data-v-6ac1e6fe"]]);
1023
1023
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
1024
1024
  function getDefaultExportFromCjs(x) {
1025
1025
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -15351,7 +15351,7 @@ const QuillEditor = defineComponent({
15351
15351
  });
15352
15352
  const vueQuill_snow = "";
15353
15353
  const vueQuill_bubble = "";
15354
- const propDefine$5 = {
15354
+ const propDefine$6 = {
15355
15355
  modelValue: {
15356
15356
  default: "",
15357
15357
  type: String
@@ -15369,14 +15369,14 @@ const propDefine$5 = {
15369
15369
  default: true
15370
15370
  }
15371
15371
  };
15372
- const _sfc_main$5 = defineComponent({
15372
+ const _sfc_main$6 = defineComponent({
15373
15373
  name: "TextEditor",
15374
15374
  components: {
15375
15375
  QuillEditor
15376
15376
  },
15377
15377
  emits: ["update:modelValue", "textChange"],
15378
15378
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
15379
- props: propDefine$5,
15379
+ props: propDefine$6,
15380
15380
  setup(props, ctx) {
15381
15381
  return new TextEditor$1(props, ctx);
15382
15382
  }
@@ -15495,7 +15495,7 @@ let TextEditor$1 = class TextEditor extends BaseInstance {
15495
15495
  //#endregion 业务逻辑 END
15496
15496
  };
15497
15497
  const TextEditor_vue_vue_type_style_index_0_scoped_5812cc0f_lang = "";
15498
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
15498
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
15499
15499
  const _component_QuillEditor = resolveComponent("QuillEditor");
15500
15500
  return openBlock(), createElementBlock("div", {
15501
15501
  style: { "height": "100%" },
@@ -15514,7 +15514,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
15514
15514
  }, null, 8, ["content", "readOnly", "theme", "onTextChange", "options"])) : createCommentVNode("", true)
15515
15515
  ], 2);
15516
15516
  }
15517
- const TextEditor2 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-5812cc0f"]]);
15517
+ const TextEditor2 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-5812cc0f"]]);
15518
15518
  const dictionaryDetailApi = new DictionaryDetailApi();
15519
15519
  const loadDictionaryData = async (optionCode, source, iViewOptions, platformId) => {
15520
15520
  if (!source) {
@@ -15530,7 +15530,7 @@ const loadDictionaryData = async (optionCode, source, iViewOptions, platformId)
15530
15530
  }
15531
15531
  return res;
15532
15532
  };
15533
- const propDefine$4 = {
15533
+ const propDefine$5 = {
15534
15534
  code: {
15535
15535
  // 字典码
15536
15536
  type: String,
@@ -15552,12 +15552,12 @@ const propDefine$4 = {
15552
15552
  default: false
15553
15553
  }
15554
15554
  };
15555
- const _sfc_main$4 = defineComponent({
15555
+ const _sfc_main$5 = defineComponent({
15556
15556
  name: "NvDicSelect",
15557
15557
  components: {},
15558
15558
  emits: ["input", "change"],
15559
15559
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
15560
- props: propDefine$4,
15560
+ props: propDefine$5,
15561
15561
  setup(props, ctx) {
15562
15562
  return new DicSelectInstance(props, ctx);
15563
15563
  }
@@ -15582,7 +15582,7 @@ class DicSelectInstance extends BaseInstance {
15582
15582
  this.dicOptions.value = await loadDictionaryData(this.props.code, [], true, this.props.platformId);
15583
15583
  }
15584
15584
  }
15585
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
15585
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
15586
15586
  const _component_Option = resolveComponent("Option");
15587
15587
  const _component_Select = resolveComponent("Select");
15588
15588
  return openBlock(), createBlock(_component_Select, {
@@ -15608,7 +15608,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
15608
15608
  _: 1
15609
15609
  }, 8, ["disabled", "modelValue", "onOnChange"]);
15610
15610
  }
15611
- const NvDicSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
15611
+ const NvDicSelect = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
15612
15612
  var Functions = {
15613
15613
  Identity: function(x) {
15614
15614
  return x;
@@ -18266,7 +18266,7 @@ var Grouping = function(groupKey, elements) {
18266
18266
  ArrayEnumerable.call(this, elements);
18267
18267
  };
18268
18268
  Grouping.prototype = new ArrayEnumerable();
18269
- const propDefine$3 = {
18269
+ const propDefine$4 = {
18270
18270
  // modelValue:{
18271
18271
  // // 平台Id
18272
18272
  // type: Array,
@@ -18288,12 +18288,12 @@ const propDefine$3 = {
18288
18288
  default: true
18289
18289
  }
18290
18290
  };
18291
- const _sfc_main$3 = defineComponent({
18291
+ const _sfc_main$4 = defineComponent({
18292
18292
  name: "NvStructureTypeSelect",
18293
18293
  components: {},
18294
18294
  emits: ["update", "on-change"],
18295
18295
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
18296
- props: propDefine$3,
18296
+ props: propDefine$4,
18297
18297
  setup(props, ctx) {
18298
18298
  return new StructureTypeSelectInstance(props, ctx);
18299
18299
  }
@@ -18539,40 +18539,40 @@ class StructureTypeSelectInstance extends BaseInstance {
18539
18539
  }
18540
18540
  const NvStructureTypeSelect_vue_vue_type_style_index_0_scoped_ef373745_lang = "";
18541
18541
  const NvStructureTypeSelect_vue_vue_type_style_index_1_lang = "";
18542
- const _hoisted_1$2 = { key: 0 };
18543
- const _hoisted_2$2 = {
18542
+ const _hoisted_1$3 = { key: 0 };
18543
+ const _hoisted_2$3 = {
18544
18544
  key: 0,
18545
18545
  ref: "StructureTypeSel",
18546
18546
  style: { "height": "220px", "display": "inline-block" }
18547
18547
  };
18548
- const _hoisted_3$2 = { class: "nv-cascader-box nv-overflow-auto" };
18549
- const _hoisted_4$1 = ["onClick"];
18550
- const _hoisted_5$1 = {
18548
+ const _hoisted_3$3 = { class: "nv-cascader-box nv-overflow-auto" };
18549
+ const _hoisted_4$2 = ["onClick"];
18550
+ const _hoisted_5$2 = {
18551
18551
  key: 0,
18552
18552
  class: "nv-cascader-box nv-overflow-auto"
18553
18553
  };
18554
- const _hoisted_6$1 = ["onClick"];
18555
- const _hoisted_7$1 = {
18554
+ const _hoisted_6$2 = ["onClick"];
18555
+ const _hoisted_7$2 = {
18556
18556
  key: 1,
18557
18557
  ref: "StructureTypeSel",
18558
18558
  style: { "display": "inline-block" }
18559
18559
  };
18560
- const _hoisted_8$1 = {
18560
+ const _hoisted_8$2 = {
18561
18561
  key: 0,
18562
18562
  style: { "padding": "5px 10px", "color": "#c5c8ce", "text-align": "center", "width": "150px" }
18563
18563
  };
18564
- const _hoisted_9$1 = { key: 1 };
18565
- const _hoisted_10$1 = {
18564
+ const _hoisted_9$2 = { key: 1 };
18565
+ const _hoisted_10$2 = {
18566
18566
  class: "nv-overflow-auto",
18567
18567
  style: { "max-height": "220px" }
18568
18568
  };
18569
- const _hoisted_11$1 = ["onClick"];
18570
- const _hoisted_12$1 = {
18569
+ const _hoisted_11$2 = ["onClick"];
18570
+ const _hoisted_12$2 = {
18571
18571
  key: 0,
18572
18572
  class: "nv-text-r",
18573
18573
  style: { "padding-right": "10px" }
18574
18574
  };
18575
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
18575
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
18576
18576
  const _component_Tag = resolveComponent("Tag");
18577
18577
  const _component_Checkbox = resolveComponent("Checkbox");
18578
18578
  const _component_Icon = resolveComponent("Icon");
@@ -18589,8 +18589,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
18589
18589
  onOnPopperHide: _ctx.poptipHideFun
18590
18590
  }, {
18591
18591
  content: withCtx(() => [
18592
- !_ctx.searchValue ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
18593
- createElementVNode("div", _hoisted_3$2, [
18592
+ !_ctx.searchValue ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
18593
+ createElementVNode("div", _hoisted_3$3, [
18594
18594
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.StructureTypeData, (item) => {
18595
18595
  return openBlock(), createElementBlock("div", {
18596
18596
  class: normalizeClass(["nv-c-p nv-cascader-item", { active: _ctx.TypeValue.includes(item.value) }]),
@@ -18611,12 +18611,12 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
18611
18611
  class: "arrow-right",
18612
18612
  type: "ios-arrow-forward"
18613
18613
  })) : createCommentVNode("", true)
18614
- ], 10, _hoisted_4$1);
18614
+ ], 10, _hoisted_4$2);
18615
18615
  }), 128))
18616
18616
  ]),
18617
18617
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.structrueTypeLevGroup, (item1) => {
18618
18618
  return openBlock(), createElementBlock(Fragment, null, [
18619
- item1 && item1.children && item1.children.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
18619
+ item1 && item1.children && item1.children.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
18620
18620
  (openBlock(true), createElementBlock(Fragment, null, renderList(item1.children, (item2) => {
18621
18621
  return openBlock(), createElementBlock("div", {
18622
18622
  class: normalizeClass(["nv-c-p nv-cascader-item", { active: _ctx.TypeValue.includes(item2.value) }]),
@@ -18637,14 +18637,14 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
18637
18637
  class: "arrow-right",
18638
18638
  type: "ios-arrow-forward"
18639
18639
  })) : createCommentVNode("", true)
18640
- ], 10, _hoisted_6$1);
18640
+ ], 10, _hoisted_6$2);
18641
18641
  }), 128))
18642
18642
  ])) : createCommentVNode("", true)
18643
18643
  ], 64);
18644
18644
  }), 256))
18645
- ], 512)) : (openBlock(), createElementBlock("div", _hoisted_7$1, [
18646
- _ctx.searchTypeList.length == 0 ? (openBlock(), createElementBlock("div", _hoisted_8$1, "无匹配数据")) : (openBlock(), createElementBlock("div", _hoisted_9$1, [
18647
- createElementVNode("div", _hoisted_10$1, [
18645
+ ], 512)) : (openBlock(), createElementBlock("div", _hoisted_7$2, [
18646
+ _ctx.searchTypeList.length == 0 ? (openBlock(), createElementBlock("div", _hoisted_8$2, "无匹配数据")) : (openBlock(), createElementBlock("div", _hoisted_9$2, [
18647
+ createElementVNode("div", _hoisted_10$2, [
18648
18648
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchTypeList, (item, index) => {
18649
18649
  return openBlock(), createElementBlock("div", {
18650
18650
  class: "nv-cascader-item nv-c-p",
@@ -18659,10 +18659,10 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
18659
18659
  onOnChange: ($event) => _ctx.toCheckSearchType(item, $event)
18660
18660
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onOnChange"])) : createCommentVNode("", true),
18661
18661
  createTextVNode(" " + toDisplayString(item.NodeName), 1)
18662
- ], 8, _hoisted_11$1);
18662
+ ], 8, _hoisted_11$2);
18663
18663
  }), 256))
18664
18664
  ]),
18665
- _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
18665
+ _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_12$2, [
18666
18666
  createVNode(_component_Button, {
18667
18667
  type: "primary",
18668
18668
  size: "small",
@@ -18682,7 +18682,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
18682
18682
  class: "nv-c-p structuretype-sel-box",
18683
18683
  onClick: _cache[2] || (_cache[2] = ($event) => _ctx.readonly ? null : _ctx.searchView = true)
18684
18684
  }, [
18685
- _ctx.StructureTypeCheckData.length == 0 && !_ctx.searchValue ? (openBlock(), createElementBlock("div", _hoisted_1$2, "选择构件类别")) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
18685
+ _ctx.StructureTypeCheckData.length == 0 && !_ctx.searchValue ? (openBlock(), createElementBlock("div", _hoisted_1$3, "选择构件类别")) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
18686
18686
  _ctx.multiple ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.StructureTypeCheckData, (item, index) => {
18687
18687
  return withDirectives((openBlock(), createBlock(_component_Tag, {
18688
18688
  style: { "position": "relative", "z-index": "5" },
@@ -18718,8 +18718,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
18718
18718
  }, 8, ["width", "disabled", "onOnPopperHide"])
18719
18719
  ]);
18720
18720
  }
18721
- const NvStructureTypeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-ef373745"]]);
18722
- const propDefine$2 = {
18721
+ const NvStructureTypeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-ef373745"]]);
18722
+ const propDefine$3 = {
18723
18723
  readonly: {
18724
18724
  // 只读
18725
18725
  type: Boolean,
@@ -18746,12 +18746,12 @@ const propDefine$2 = {
18746
18746
  default: true
18747
18747
  }
18748
18748
  };
18749
- const _sfc_main$2 = defineComponent({
18749
+ const _sfc_main$3 = defineComponent({
18750
18750
  name: "NvStructureSelect",
18751
18751
  components: {},
18752
18752
  emits: ["update", "on-change"],
18753
18753
  // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
18754
- props: propDefine$2,
18754
+ props: propDefine$3,
18755
18755
  setup(props, ctx) {
18756
18756
  return new StructureSelectInstance(props, ctx);
18757
18757
  }
@@ -18959,7 +18959,433 @@ class StructureSelectInstance extends BaseInstance {
18959
18959
  }
18960
18960
  }
18961
18961
  const NvStructureSelect_vue_vue_type_style_index_0_scoped_99c5b0ad_lang = "";
18962
- const _withScopeId = (n) => (pushScopeId("data-v-99c5b0ad"), n = n(), popScopeId(), n);
18962
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-99c5b0ad"), n = n(), popScopeId(), n);
18963
+ const _hoisted_1$2 = { key: 1 };
18964
+ const _hoisted_2$2 = { class: "nv-pos-r" };
18965
+ const _hoisted_3$2 = { class: "nv-c-p structure-sel-box" };
18966
+ const _hoisted_4$1 = { key: 0 };
18967
+ const _hoisted_5$1 = {
18968
+ key: 0,
18969
+ class: "nv-text-nowrap"
18970
+ };
18971
+ const _hoisted_6$1 = { key: 1 };
18972
+ const _hoisted_7$1 = { key: 0 };
18973
+ const _hoisted_8$1 = { key: 1 };
18974
+ const _hoisted_9$1 = {
18975
+ key: 0,
18976
+ style: { "margin-bottom": "10px" }
18977
+ };
18978
+ const _hoisted_10$1 = {
18979
+ class: "nv-flex",
18980
+ style: { "height": "280px" }
18981
+ };
18982
+ const _hoisted_11$1 = { class: "nv-flex-1 nv-flex-col nv-full-h" };
18983
+ const _hoisted_12$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", null, "单位工程:", -1));
18984
+ const _hoisted_13$1 = { class: "nv-flex-1 nv-overflow-auto" };
18985
+ const _hoisted_14$1 = {
18986
+ key: 0,
18987
+ class: "nv-flex-1 nv-full-h nv-overflow-auto nv-pos-r"
18988
+ };
18989
+ const _hoisted_15$1 = { key: 0 };
18990
+ const _hoisted_16$1 = {
18991
+ class: "nv-flex-1 nv-text-nowrap",
18992
+ style: { "margin-left": "7px" }
18993
+ };
18994
+ const _hoisted_17$1 = { key: 0 };
18995
+ const _hoisted_18$1 = { key: 1 };
18996
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
18997
+ const _component_Option = resolveComponent("Option");
18998
+ const _component_OptionGroup = resolveComponent("OptionGroup");
18999
+ const _component_Select = resolveComponent("Select");
19000
+ const _component_Radio = resolveComponent("Radio");
19001
+ const _component_RadioGroup = resolveComponent("RadioGroup");
19002
+ const _component_nvLoading = resolveComponent("nvLoading");
19003
+ const _component_Tree = resolveComponent("Tree");
19004
+ const _component_Poptip = resolveComponent("Poptip");
19005
+ const _component_Icon = resolveComponent("Icon");
19006
+ return _ctx.selType == 1 ? (openBlock(), createBlock(_component_Select, {
19007
+ key: 0,
19008
+ modelValue: _ctx.UnitValue,
19009
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.UnitValue = $event),
19010
+ multiple: _ctx.multiple,
19011
+ transfer: "",
19012
+ filterable: "",
19013
+ clearable: "",
19014
+ onOnChange: _ctx.unitSelectChange,
19015
+ disabled: _ctx.readonly
19016
+ }, {
19017
+ default: withCtx(() => [
19018
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.TypeGroupData, (item, index) => {
19019
+ return openBlock(), createBlock(_component_OptionGroup, {
19020
+ label: item.NodeTypeName
19021
+ }, {
19022
+ default: withCtx(() => [
19023
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.UnitData, (item2) => {
19024
+ return openBlock(), createBlock(_component_Option, {
19025
+ value: item2.Id,
19026
+ key: item2.Id
19027
+ }, {
19028
+ default: withCtx(() => [
19029
+ createTextVNode(toDisplayString(item2.NodeName), 1)
19030
+ ]),
19031
+ _: 2
19032
+ }, 1032, ["value"]);
19033
+ }), 128))
19034
+ ]),
19035
+ _: 2
19036
+ }, 1032, ["label"]);
19037
+ }), 256))
19038
+ ]),
19039
+ _: 1
19040
+ }, 8, ["modelValue", "multiple", "onOnChange", "disabled"])) : (openBlock(), createElementBlock("div", _hoisted_1$2, [
19041
+ createVNode(_component_Poptip, {
19042
+ placement: "bottom-start",
19043
+ width: 700,
19044
+ transfer: "",
19045
+ disabled: _ctx.readonly
19046
+ }, {
19047
+ content: withCtx(() => [
19048
+ _ctx.TypeGroupData.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
19049
+ createVNode(_component_RadioGroup, {
19050
+ modelValue: _ctx.activeNodeType,
19051
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.activeNodeType = $event),
19052
+ type: "button",
19053
+ size: "small",
19054
+ "button-style": "solid",
19055
+ onOnChange: _ctx.NodeTypeSelect
19056
+ }, {
19057
+ default: withCtx(() => [
19058
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.TypeGroupData, (item, index) => {
19059
+ return openBlock(), createBlock(_component_Radio, {
19060
+ key: index,
19061
+ label: item.NodeTypeName
19062
+ }, null, 8, ["label"]);
19063
+ }), 128))
19064
+ ]),
19065
+ _: 1
19066
+ }, 8, ["modelValue", "onOnChange"])
19067
+ ])) : createCommentVNode("", true),
19068
+ createElementVNode("div", _hoisted_10$1, [
19069
+ createElementVNode("div", _hoisted_11$1, [
19070
+ _hoisted_12$1,
19071
+ createElementVNode("div", _hoisted_13$1, [
19072
+ createVNode(_component_RadioGroup, {
19073
+ modelValue: _ctx.activeUnit,
19074
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.activeUnit = $event),
19075
+ vertical: "",
19076
+ onOnChange: _ctx.unitSelected
19077
+ }, {
19078
+ default: withCtx(() => [
19079
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.unitData, (item, index) => {
19080
+ return openBlock(), createBlock(_component_Radio, {
19081
+ label: item.Id
19082
+ }, {
19083
+ default: withCtx(() => [
19084
+ createElementVNode("span", null, toDisplayString(item.NodeName), 1)
19085
+ ]),
19086
+ _: 2
19087
+ }, 1032, ["label"]);
19088
+ }), 256))
19089
+ ]),
19090
+ _: 1
19091
+ }, 8, ["modelValue", "onOnChange"])
19092
+ ])
19093
+ ]),
19094
+ _ctx.selType == 2 ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
19095
+ _ctx.StructureInstanceLoading ? (openBlock(), createBlock(_component_nvLoading, { key: 0 })) : (openBlock(), createBlock(_component_Tree, {
19096
+ key: 1,
19097
+ style: { "width": "calc(100% - 30px)" },
19098
+ data: _ctx.StructureInstanceData,
19099
+ "load-data": _ctx.loadStructureInstance,
19100
+ "check-strictly": true,
19101
+ "show-checkbox": _ctx.multiple,
19102
+ onOnCheckChange: _ctx.StructureInstanceCheckFun,
19103
+ onOnSelectChange: _ctx.StructureInstanceSelectFun
19104
+ }, null, 8, ["data", "load-data", "show-checkbox", "onOnCheckChange", "onOnSelectChange"]))
19105
+ ])) : createCommentVNode("", true)
19106
+ ])
19107
+ ]),
19108
+ default: withCtx(() => [
19109
+ createElementVNode("div", _hoisted_2$2, [
19110
+ createElementVNode("div", _hoisted_3$2, [
19111
+ _ctx.StructureInstanceCheckData.length == 0 ? (openBlock(), createElementBlock("div", _hoisted_4$1, "点击选择构件")) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
19112
+ _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_5$1, " 已选择" + toDisplayString(_ctx.StructureInstanceCheckData.length) + "个构件(" + toDisplayString(_ctx.StructureInstanceCheckData.map((e) => e["NodeName"]).toString()) + ") ", 1)) : (openBlock(), createElementBlock("div", _hoisted_6$1, [
19113
+ createTextVNode(toDisplayString(_ctx.StructureInstanceCheckData[0].NodeName) + " ", 1),
19114
+ _ctx.StructureInstanceCheckData[0].NodeTypeName ? (openBlock(), createElementBlock("span", _hoisted_7$1, "[" + toDisplayString(_ctx.StructureInstanceCheckData[0].NodeTypeName) + "]", 1)) : createCommentVNode("", true),
19115
+ _ctx.StructureInstanceCheckData[0].UnitName ? (openBlock(), createElementBlock("span", _hoisted_8$1, "[" + toDisplayString(_ctx.StructureInstanceCheckData[0].UnitName) + "]", 1)) : createCommentVNode("", true)
19116
+ ]))
19117
+ ], 64))
19118
+ ])
19119
+ ])
19120
+ ]),
19121
+ _: 1
19122
+ }, 8, ["disabled"]),
19123
+ _ctx.multiple ? (openBlock(), createElementBlock("div", _hoisted_15$1, [
19124
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.StructureInstanceCheckData, (item, index) => {
19125
+ return openBlock(), createElementBlock("div", {
19126
+ class: "nv-flex",
19127
+ key: index
19128
+ }, [
19129
+ !_ctx.readonly ? (openBlock(), createBlock(_component_Icon, {
19130
+ key: 0,
19131
+ class: "nv-c-p",
19132
+ type: "md-trash",
19133
+ onClick: withModifiers(($event) => _ctx.removeStructureInstance(item), ["stop"]),
19134
+ size: 20,
19135
+ color: "#ae5d55"
19136
+ }, null, 8, ["onClick"])) : createCommentVNode("", true),
19137
+ createElementVNode("div", _hoisted_16$1, [
19138
+ createTextVNode(toDisplayString(item.NodeName) + " ", 1),
19139
+ item.NodeTypeName ? (openBlock(), createElementBlock("span", _hoisted_17$1, "[" + toDisplayString(item.NodeTypeName) + "]", 1)) : createCommentVNode("", true),
19140
+ item.UnitName ? (openBlock(), createElementBlock("span", _hoisted_18$1, "[" + toDisplayString(item.UnitName) + "]", 1)) : createCommentVNode("", true)
19141
+ ])
19142
+ ]);
19143
+ }), 128))
19144
+ ])) : createCommentVNode("", true)
19145
+ ]));
19146
+ }
19147
+ const NvStructureSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-99c5b0ad"]]);
19148
+ const propDefine$2 = {
19149
+ readonly: {
19150
+ // 只读
19151
+ type: Boolean,
19152
+ default: false
19153
+ },
19154
+ selType: {
19155
+ // 选择类别
19156
+ type: Number,
19157
+ default: 1
19158
+ },
19159
+ multiple: {
19160
+ // 是否多选
19161
+ type: Boolean,
19162
+ default: true
19163
+ },
19164
+ businessId: {
19165
+ // 创建机构id
19166
+ type: Array || Number,
19167
+ default: 0
19168
+ },
19169
+ dataValue: {
19170
+ // 值
19171
+ type: Array || Number,
19172
+ default: true
19173
+ }
19174
+ };
19175
+ const _sfc_main$2 = defineComponent({
19176
+ name: "NvStructureSelect_HC",
19177
+ components: {},
19178
+ emits: ["update", "on-change"],
19179
+ // 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
19180
+ props: propDefine$2,
19181
+ setup(props, ctx) {
19182
+ return new StructureSelect_HCInstance(props, ctx);
19183
+ }
19184
+ });
19185
+ class StructureSelect_HCInstance extends BaseInstance {
19186
+ constructor(props, ctx) {
19187
+ super();
19188
+ __publicField(this, "props");
19189
+ __publicField(this, "ctx");
19190
+ // 全局属性
19191
+ __publicField(this, "TypeValue", ref([]));
19192
+ __publicField(this, "StructureTypeData", ref([]));
19193
+ /**
19194
+ * 获取构件类别列表数据
19195
+ */
19196
+ __publicField(this, "dataStructureApi", new DataStructureApi());
19197
+ __publicField(this, "structureInstanceApi", new StructureInstance_HCApi());
19198
+ /** 单位工程下拉列表值 */
19199
+ __publicField(this, "UnitValue", ref());
19200
+ __publicField(this, "TypeGroupData", ref([]));
19201
+ __publicField(this, "activeNodeType", ref(""));
19202
+ /**
19203
+ * 单位工程选择项改变事件
19204
+ */
19205
+ __publicField(this, "unitSelectChange", () => {
19206
+ this.doSelectedAfterFun();
19207
+ });
19208
+ //#region 构件选择--单位工程列表相关
19209
+ __publicField(this, "activeUnit", ref(0));
19210
+ __publicField(this, "activeUnitName", "");
19211
+ __publicField(this, "unitData", ref([]));
19212
+ /**
19213
+ * 顶级构件类别选择事件
19214
+ */
19215
+ __publicField(this, "NodeTypeSelect", () => {
19216
+ this.unitData.value = this.TypeGroupData.value.find((e) => e["NodeTypeName"] == this.activeNodeType.value).UnitData;
19217
+ if (this.props.selType == 1 && this.props.multiple) {
19218
+ return;
19219
+ }
19220
+ if (this.unitData.value[0]) {
19221
+ this.activeUnit.value = this.unitData.value[0].Id;
19222
+ this.activeUnitName = this.unitData.value[0].NodeName;
19223
+ this.unitSelected(this.activeUnit.value);
19224
+ }
19225
+ });
19226
+ //#endregion
19227
+ //#region 构件选择--构件树列表数据相关
19228
+ __publicField(this, "StructureInstanceLoading", ref(false));
19229
+ __publicField(this, "StructureInstanceData", ref([]));
19230
+ /**
19231
+ * 构件树根节点数据获取
19232
+ * @param value 单位工程Id
19233
+ */
19234
+ __publicField(this, "unitSelected", async (value) => {
19235
+ this.activeUnitName = this.unitData.value.find((e) => e["Id"] == value).NodeName;
19236
+ this.StructureInstanceLoading.value = true;
19237
+ this.StructureInstanceData.value = [];
19238
+ let res = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "PlatformId", "CreateUnitId"]).eq("PId", value)));
19239
+ this.StructureInstanceData.value = res.map((e) => {
19240
+ e.title = e.NodeName;
19241
+ e.UnitName = this.activeUnitName;
19242
+ e.loading = false;
19243
+ e.checked = this.StructureInstanceCheckData.value.find((x) => x["Id"] == e.Id) ? true : false;
19244
+ e.children = [];
19245
+ return e;
19246
+ });
19247
+ this.StructureInstanceLoading.value = false;
19248
+ });
19249
+ /**
19250
+ * 构件树子级数据获取
19251
+ * @param item
19252
+ * @param callback
19253
+ * @returns
19254
+ */
19255
+ __publicField(this, "loadStructureInstance", async (item, callback) => {
19256
+ let res = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "PlatformId", "CreateUnitId"]).eq("PId", item.Id)));
19257
+ if (res.length == 0) {
19258
+ item.children = void 0;
19259
+ callback([]);
19260
+ return;
19261
+ }
19262
+ res = res.map((e) => {
19263
+ e.title = e.NodeName;
19264
+ e.loading = false;
19265
+ e.checked = this.StructureInstanceCheckData.value.find((x) => x["Id"] == e.Id) ? true : false;
19266
+ e.children = [];
19267
+ return e;
19268
+ });
19269
+ callback(res);
19270
+ });
19271
+ /** 已选择构件数据 */
19272
+ __publicField(this, "StructureInstanceCheckData", ref([]));
19273
+ /**
19274
+ * 构件复选框选中
19275
+ * @param nodes
19276
+ * @param item
19277
+ */
19278
+ __publicField(this, "StructureInstanceCheckFun", (nodes, item) => {
19279
+ if (item.checked) {
19280
+ this.StructureInstanceCheckData.value.push(item);
19281
+ } else {
19282
+ this.removeStructureInstance(item);
19283
+ }
19284
+ this.doSelectedAfterFun();
19285
+ });
19286
+ __publicField(this, "StructureInstanceSelectFun", (nodes, item) => {
19287
+ if (!this.props.multiple) {
19288
+ this.StructureInstanceCheckData.value = [item];
19289
+ this.doSelectedAfterFun();
19290
+ }
19291
+ });
19292
+ /**
19293
+ * 移除选中构件
19294
+ * @param item
19295
+ */
19296
+ __publicField(this, "removeStructureInstance", (item) => {
19297
+ item.checked = false;
19298
+ let index = Enumerable.from(this.StructureInstanceCheckData.value).indexOf((e) => e["Id"] == item.Id);
19299
+ this.StructureInstanceCheckData.value.splice(index, 1);
19300
+ this.treeChStateChange(this.StructureInstanceData.value);
19301
+ this.doSelectedAfterFun();
19302
+ });
19303
+ this.props = props;
19304
+ this.ctx = ctx;
19305
+ this.loadNodeTypeAndUnitData();
19306
+ }
19307
+ /**
19308
+ * 获取构件类别大类及单位工程数据
19309
+ */
19310
+ async loadNodeTypeAndUnitData() {
19311
+ var _a, _b;
19312
+ let filter = new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "RootId", "PlatformId", "CreateUnitId"]).eq("PId", 0).eq("PlatformId", (_a = this.storageInfo.getCurrentPlatform()) == null ? void 0 : _a.Id);
19313
+ if (this.props.businessId) {
19314
+ if (typeof this.props.businessId == "number") {
19315
+ filter.eq("CreateUnitId", this.props.businessId);
19316
+ } else if (Array.isArray(this.props.businessId)) {
19317
+ filter.in("CreateUnitId", this.props.businessId);
19318
+ }
19319
+ }
19320
+ let res = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(filter));
19321
+ this.TypeGroupData.value = Enumerable.from(res).groupBy((e) => e["NodeTypeName"]).select((e) => {
19322
+ return {
19323
+ NodeTypeName: e.key(),
19324
+ UnitData: e.getSource()
19325
+ };
19326
+ }).toArray();
19327
+ if (this.props.selType == 1) {
19328
+ this.UnitValue.value = this.props.dataValue;
19329
+ return;
19330
+ }
19331
+ if (this.TypeGroupData.value[0]) {
19332
+ this.activeNodeType.value = this.TypeGroupData.value[0].NodeTypeName;
19333
+ this.NodeTypeSelect();
19334
+ if (this.props.dataValue) {
19335
+ let ids = typeof this.props.dataValue == "object" ? this.props.dataValue : [this.props.dataValue];
19336
+ this.StructureInstanceCheckData.value = this.utilities.parseApiResult(await this.structureInstanceApi.getEntities(new QueryWrapper().select(["Id", "NodeTypeName", "NodeType", "NodeName", "RootId", "PlatformId"]).in("Id", ids).eq("PlatformId", (_b = this.storageInfo.getCurrentPlatform()) == null ? void 0 : _b.Id)));
19337
+ this.StructureInstanceCheckData.value = this.StructureInstanceCheckData.value.map((e) => {
19338
+ let unitInfo = this.unitData.value.find((x) => x["Id"] == e.RootId);
19339
+ e.UnitName = unitInfo ? unitInfo.NodeName : "";
19340
+ return e;
19341
+ });
19342
+ }
19343
+ }
19344
+ }
19345
+ /**
19346
+ * 变更树组件选中状态
19347
+ * @param data
19348
+ */
19349
+ treeChStateChange(data) {
19350
+ data.map((e) => {
19351
+ e.checked = this.StructureInstanceCheckData.value.find((x) => x["Id"] == e.Id) ? true : false;
19352
+ if (e.children && e.children.length > 0) {
19353
+ this.treeChStateChange(e.children);
19354
+ }
19355
+ });
19356
+ }
19357
+ //#endregion
19358
+ /**
19359
+ * 执行选择项发生改变后事件
19360
+ */
19361
+ doSelectedAfterFun() {
19362
+ if (this.props.selType == 1) {
19363
+ try {
19364
+ let unitData = [];
19365
+ this.TypeGroupData.value.map((e) => {
19366
+ e.UnitData.map((x) => {
19367
+ if (Array.isArray(this.UnitValue.value)) {
19368
+ if (this.UnitValue.value.includes(x.Id)) {
19369
+ unitData.push(x);
19370
+ }
19371
+ } else {
19372
+ if (this.UnitValue.value == x.Id) {
19373
+ unitData = [x];
19374
+ }
19375
+ }
19376
+ });
19377
+ });
19378
+ this.ctx.emit("on-change", { Ids: this.UnitValue.value, data: unitData });
19379
+ } catch (error) {
19380
+ this.ctx.emit("on-change", { Ids: this.UnitValue.value, data: [] });
19381
+ }
19382
+ } else {
19383
+ this.ctx.emit("on-change", { Ids: this.StructureInstanceCheckData.value.map((e) => e["Id"]), data: this.StructureInstanceCheckData.value });
19384
+ }
19385
+ }
19386
+ }
19387
+ const NvStructureSelect_HC_vue_vue_type_style_index_0_scoped_ca628399_lang = "";
19388
+ const _withScopeId = (n) => (pushScopeId("data-v-ca628399"), n = n(), popScopeId(), n);
18963
19389
  const _hoisted_1$1 = { key: 1 };
18964
19390
  const _hoisted_2$1 = { class: "nv-pos-r" };
18965
19391
  const _hoisted_3$1 = { class: "nv-c-p structure-sel-box" };
@@ -19144,7 +19570,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
19144
19570
  ])) : createCommentVNode("", true)
19145
19571
  ]));
19146
19572
  }
19147
- const NvStructureSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-99c5b0ad"]]);
19573
+ const NvStructureSelect_HC = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-ca628399"]]);
19148
19574
  const propDefine$1 = {
19149
19575
  linkParam: {
19150
19576
  // 带入的参数
@@ -19883,7 +20309,7 @@ const propDefine = {
19883
20309
  };
19884
20310
  const _sfc_main = defineComponent({
19885
20311
  name: "NvComFormUp",
19886
- components: { UploadFile, TextEditor: TextEditor2, NvDicSelect, NvStructureTypeSelect, NvStructureSelect, UploadFileList, CASign },
20312
+ components: { UploadFile, TextEditor: TextEditor2, NvDicSelect, NvStructureTypeSelect, NvStructureSelect, UploadFileList, CASign, NvStructureSelect_HC },
19887
20313
  emits: ["textChange", "TokenChange"],
19888
20314
  props: propDefine,
19889
20315
  setup(props, ctx) {
@@ -20016,6 +20442,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
20016
20442
  const _component_NvDicSelect = resolveComponent("NvDicSelect");
20017
20443
  const _component_NvStructureTypeSelect = resolveComponent("NvStructureTypeSelect");
20018
20444
  const _component_NvStructureSelect = resolveComponent("NvStructureSelect");
20445
+ const _component_NvStructureSelect_HC = resolveComponent("NvStructureSelect_HC");
20019
20446
  const _component_UploadFileList = resolveComponent("UploadFileList");
20020
20447
  const _component_CASign = resolveComponent("CASign");
20021
20448
  const _component_NvComForm = resolveComponent("NvComForm");
@@ -20067,8 +20494,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
20067
20494
  businessId: _ctx.getPropValue(item.structureProp, "businessId"),
20068
20495
  onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
20069
20496
  }, null, 8, ["readonly", "dataValue", "multiple", "selType", "businessId", "onOnChange"])) : createCommentVNode("", true),
20070
- item.type === "UploadFileList" ? (openBlock(), createBlock(_component_UploadFileList, {
20497
+ item.type === "Structure_HC" ? (openBlock(), createBlock(_component_NvStructureSelect_HC, {
20071
20498
  key: 5,
20499
+ readonly: _ctx.getPropValue(item.structureProp, "readonly") || _ctx.onlyView,
20500
+ dataValue: _ctx.formModel[item.model],
20501
+ multiple: _ctx.getPropValue(item.structureProp, "multiple"),
20502
+ selType: _ctx.getPropValue(item.structureProp, "selType"),
20503
+ businessId: _ctx.getPropValue(item.structureProp, "businessId"),
20504
+ onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
20505
+ }, null, 8, ["readonly", "dataValue", "multiple", "selType", "businessId", "onOnChange"])) : createCommentVNode("", true),
20506
+ item.type === "UploadFileList" ? (openBlock(), createBlock(_component_UploadFileList, {
20507
+ key: 6,
20072
20508
  style: normalizeStyle(_ctx.uploadFileListStyle(item)),
20073
20509
  readonly: _ctx.getPropValue(item.uploadFileListProp, "readonly") || _ctx.onlyView,
20074
20510
  token: _ctx.formModel[item.model],
@@ -20076,7 +20512,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
20076
20512
  onReturnFileList: ($event) => _ctx.tokenList($event, item)
20077
20513
  }, null, 8, ["style", "readonly", "token", "paginationSet", "onReturnFileList"])) : createCommentVNode("", true),
20078
20514
  item.type === "CASign" ? (openBlock(), createBlock(_component_CASign, {
20079
- key: 6,
20515
+ key: 7,
20080
20516
  signContent: _ctx.getPropValue(item.signProp, "signContent"),
20081
20517
  signType: _ctx.getPropValue(item.signProp, "signType"),
20082
20518
  isFakeVerifySign: _ctx.getPropValue(item.signProp, "isFakeVerifySign"),
@@ -20093,6 +20529,7 @@ export {
20093
20529
  ComFormUp as NvComFormUp,
20094
20530
  NvDicSelect,
20095
20531
  NvStructureSelect,
20532
+ NvStructureSelect_HC,
20096
20533
  NvStructureTypeSelect,
20097
20534
  TextEditor2 as TextEditor,
20098
20535
  UploadFile,