cnhis-design-vue 3.0.4 → 3.0.7
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/CHANGELOG.md +22 -0
- package/es/big-table/index.js +197 -132
- package/es/button-print/index.css +31 -31
- package/es/button-print/index.js +30 -128
- package/es/drag-layout/index.css +31 -31
- package/es/field-set/index.css +73 -73
- package/es/grid/index.css +73 -73
- package/es/index.js +226 -259
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +18 -20
- package/packages/big-table/src/bigTableEmits.ts +1 -2
- package/packages/big-table/src/components/edit-form/edit-date.vue +41 -0
- package/packages/big-table/src/components/edit-form/edit-input.vue +2 -2
- package/packages/big-table/src/components/edit-form/edit-select.vue +12 -3
- package/packages/big-table/src/hooks/useEdit.ts +16 -4
- package/packages/button-print/src/ButtonPrint.vue +39 -128
- package/packages/select-person/index.ts +11 -0
- package/packages/select-person/src/SelectPerson.vue +746 -0
package/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { watch, h as h$1, resolveComponent, defineComponent, inject, computed, nextTick, reactive, createApp, ref, Teleport, createCommentVNode, provide, onMounted, onUnmounted, getCurrentInstance, onBeforeUnmount, onActivated, onDeactivated, createVNode, mergeProps, isVNode, openBlock, createElementBlock, unref, createElementVNode, toDisplayString, withCtx, normalizeClass, renderSlot, createTextVNode, useAttrs, normalizeStyle, withDirectives, vShow, Fragment, createBlock, vModelSelect, vModelText, pushScopeId, popScopeId, vModelCheckbox, withModifiers } from 'vue';
|
|
2
|
+
import { NInput, NInputNumber, NSelect, NDatePicker, NTooltip, useMessage, NIcon, NPopconfirm, NButton, NInputGroup, NCheckbox, NCheckboxGroup, NSpace, NProgress, NDropdown, NSwitch, NPopover, NSpin, NRadio, NModal, NForm, NGrid, NFormItemGi, NFormItem } from 'naive-ui';
|
|
2
3
|
import { SettingsSharp, CaretDown, CaretForward, CopyOutline, SyncOutline, EllipsisVerticalSharp, Reload, ChevronDown } from '@vicons/ionicons5';
|
|
3
|
-
import { NTooltip, NInput, NInputNumber, NSelect, useMessage, NIcon, NPopconfirm, NButton, NInputGroup, NCheckbox, NCheckboxGroup, NSpace, NProgress, NDropdown, NSwitch, NPopover, NSpin, NDatePicker, NRadio, NModal, NForm, NGrid, NFormItemGi, NFormItem } from 'naive-ui';
|
|
4
4
|
import draggable from 'vuedraggable';
|
|
5
5
|
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -31033,7 +31033,7 @@ const bigTableEmits = [
|
|
|
31033
31033
|
"selectionChangeLocal",
|
|
31034
31034
|
"switchBtnOnChange",
|
|
31035
31035
|
"asyncTableChange",
|
|
31036
|
-
"
|
|
31036
|
+
"formChange"
|
|
31037
31037
|
];
|
|
31038
31038
|
|
|
31039
31039
|
var moment$1 = {exports: {}};
|
|
@@ -38412,6 +38412,162 @@ const useNestTable = (props, state, emit) => {
|
|
|
38412
38412
|
};
|
|
38413
38413
|
};
|
|
38414
38414
|
|
|
38415
|
+
var script$c = defineComponent({
|
|
38416
|
+
name: "EditInput",
|
|
38417
|
+
inheritAttrs: false,
|
|
38418
|
+
components: {
|
|
38419
|
+
NInput,
|
|
38420
|
+
NInputNumber
|
|
38421
|
+
},
|
|
38422
|
+
props: {
|
|
38423
|
+
type: {
|
|
38424
|
+
type: String,
|
|
38425
|
+
default: "input"
|
|
38426
|
+
},
|
|
38427
|
+
col: {
|
|
38428
|
+
type: Object,
|
|
38429
|
+
default: () => ({})
|
|
38430
|
+
},
|
|
38431
|
+
row: {
|
|
38432
|
+
type: Object,
|
|
38433
|
+
default: () => ({})
|
|
38434
|
+
},
|
|
38435
|
+
index: {
|
|
38436
|
+
type: [Number, Object],
|
|
38437
|
+
default: 0
|
|
38438
|
+
}
|
|
38439
|
+
},
|
|
38440
|
+
emits: ["formChange"],
|
|
38441
|
+
setup(props, { attrs, slots, emit }) {
|
|
38442
|
+
const onUpdateValue = (value) => {
|
|
38443
|
+
emit("formChange", {
|
|
38444
|
+
value,
|
|
38445
|
+
row: props.row,
|
|
38446
|
+
column: props.col,
|
|
38447
|
+
index: props.index
|
|
38448
|
+
});
|
|
38449
|
+
};
|
|
38450
|
+
return () => props.type === "input" ? createVNode(NInput, mergeProps(attrs, {
|
|
38451
|
+
"onUpdateValue": onUpdateValue
|
|
38452
|
+
}), null) : createVNode(NInputNumber, mergeProps(attrs, {
|
|
38453
|
+
"onUpdateValue": onUpdateValue
|
|
38454
|
+
}), null);
|
|
38455
|
+
}
|
|
38456
|
+
});
|
|
38457
|
+
|
|
38458
|
+
script$c.__file = "packages/big-table/src/components/edit-form/edit-input.vue";
|
|
38459
|
+
|
|
38460
|
+
var script$b = defineComponent({
|
|
38461
|
+
name: "EditSelect",
|
|
38462
|
+
inheritAttrs: false,
|
|
38463
|
+
components: {
|
|
38464
|
+
NSelect
|
|
38465
|
+
},
|
|
38466
|
+
props: {
|
|
38467
|
+
col: {
|
|
38468
|
+
type: Object,
|
|
38469
|
+
default: () => ({})
|
|
38470
|
+
},
|
|
38471
|
+
row: {
|
|
38472
|
+
type: Object,
|
|
38473
|
+
default: () => ({})
|
|
38474
|
+
},
|
|
38475
|
+
index: {
|
|
38476
|
+
type: [Number, Object],
|
|
38477
|
+
default: 0
|
|
38478
|
+
}
|
|
38479
|
+
},
|
|
38480
|
+
emits: ["setOptions", "formChange"],
|
|
38481
|
+
setup(props, { attrs, slots, emit }) {
|
|
38482
|
+
const state = reactive({
|
|
38483
|
+
options: []
|
|
38484
|
+
});
|
|
38485
|
+
const setOptions = async () => {
|
|
38486
|
+
if (props.col.options) {
|
|
38487
|
+
state.options = JSON.parse(JSON.stringify(props.col.options));
|
|
38488
|
+
}
|
|
38489
|
+
else {
|
|
38490
|
+
const optionsName = `${props.col.columnName}_options`;
|
|
38491
|
+
state.options = props.row[optionsName] || await props.col.queryOptions();
|
|
38492
|
+
if (!props.row[optionsName]) {
|
|
38493
|
+
emit("setOptions", state.options);
|
|
38494
|
+
}
|
|
38495
|
+
}
|
|
38496
|
+
};
|
|
38497
|
+
setOptions();
|
|
38498
|
+
const onUpdateValue = (value) => {
|
|
38499
|
+
emit("formChange", {
|
|
38500
|
+
value,
|
|
38501
|
+
row: props.row,
|
|
38502
|
+
column: props.col,
|
|
38503
|
+
index: props.index
|
|
38504
|
+
});
|
|
38505
|
+
};
|
|
38506
|
+
return () => [createVNode(NSelect, mergeProps(attrs, {
|
|
38507
|
+
"options": state.options,
|
|
38508
|
+
"consistentMenuWidth": false,
|
|
38509
|
+
"clearable": true,
|
|
38510
|
+
"filterable": true,
|
|
38511
|
+
"to": false,
|
|
38512
|
+
"placeholder": "\u8BF7\u9009\u62E9",
|
|
38513
|
+
"onUpdateValue": onUpdateValue
|
|
38514
|
+
}), null)];
|
|
38515
|
+
}
|
|
38516
|
+
});
|
|
38517
|
+
|
|
38518
|
+
script$b.__file = "packages/big-table/src/components/edit-form/edit-select.vue";
|
|
38519
|
+
|
|
38520
|
+
var script$a = defineComponent({
|
|
38521
|
+
name: "EditDate",
|
|
38522
|
+
inheritAttrs: false,
|
|
38523
|
+
components: {
|
|
38524
|
+
NDatePicker
|
|
38525
|
+
},
|
|
38526
|
+
props: {
|
|
38527
|
+
col: {
|
|
38528
|
+
type: Object,
|
|
38529
|
+
default: () => ({})
|
|
38530
|
+
},
|
|
38531
|
+
row: {
|
|
38532
|
+
type: Object,
|
|
38533
|
+
default: () => ({})
|
|
38534
|
+
},
|
|
38535
|
+
index: {
|
|
38536
|
+
type: [Number, Object],
|
|
38537
|
+
default: 0
|
|
38538
|
+
}
|
|
38539
|
+
},
|
|
38540
|
+
emits: ["formChange"],
|
|
38541
|
+
setup(props, { attrs, slots, emit }) {
|
|
38542
|
+
const onConfirm = (value) => {
|
|
38543
|
+
emit("formChange", {
|
|
38544
|
+
value,
|
|
38545
|
+
row: props.row,
|
|
38546
|
+
column: props.col,
|
|
38547
|
+
index: props.index
|
|
38548
|
+
});
|
|
38549
|
+
};
|
|
38550
|
+
const config = {
|
|
38551
|
+
type: props.col.type || "datetime",
|
|
38552
|
+
clearable: props.col.clearable || true,
|
|
38553
|
+
disabled: props.col.disabled || false,
|
|
38554
|
+
valueFormat: props.col.valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
38555
|
+
to: false
|
|
38556
|
+
};
|
|
38557
|
+
return () => createVNode(NDatePicker, mergeProps(attrs, config, {
|
|
38558
|
+
"onUpdateFormattedValue": onConfirm
|
|
38559
|
+
}), null);
|
|
38560
|
+
}
|
|
38561
|
+
});
|
|
38562
|
+
|
|
38563
|
+
script$a.__file = "packages/big-table/src/components/edit-form/edit-date.vue";
|
|
38564
|
+
|
|
38565
|
+
const comps = {
|
|
38566
|
+
"input": script$c,
|
|
38567
|
+
"number": script$c,
|
|
38568
|
+
"select": script$b,
|
|
38569
|
+
"date": script$a
|
|
38570
|
+
};
|
|
38415
38571
|
const useEdit = (props, state, emit, xGrid) => {
|
|
38416
38572
|
const initEditTable = async () => {
|
|
38417
38573
|
const { isEdit, fieldList = [] } = props.columnConfig;
|
|
@@ -38467,8 +38623,9 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
38467
38623
|
await xGrid.value.insertAt(record, getInsertRecords.at(-1));
|
|
38468
38624
|
xGrid.value.clearActived();
|
|
38469
38625
|
};
|
|
38470
|
-
const
|
|
38471
|
-
|
|
38626
|
+
const onFormChange = ({ value, row, column }) => {
|
|
38627
|
+
row[column.columnName] = value;
|
|
38628
|
+
emit("formChange", { value, row, column });
|
|
38472
38629
|
};
|
|
38473
38630
|
const getDefaultValue = (params, item) => {
|
|
38474
38631
|
const value = params.row[item.columnName];
|
|
@@ -38488,7 +38645,7 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
38488
38645
|
activeMethod,
|
|
38489
38646
|
deleteRow,
|
|
38490
38647
|
onClickSelectTable,
|
|
38491
|
-
|
|
38648
|
+
onFormChange,
|
|
38492
38649
|
getDefaultValue
|
|
38493
38650
|
};
|
|
38494
38651
|
};
|
|
@@ -38504,7 +38661,7 @@ var img$3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAADKCAYAAABDnT56A
|
|
|
38504
38661
|
const _hoisted_1$8 = { class: "no-data-tip NoData-page" };
|
|
38505
38662
|
const _hoisted_2$7 = ["src"];
|
|
38506
38663
|
const _hoisted_3$5 = { key: 1 };
|
|
38507
|
-
var script$
|
|
38664
|
+
var script$9 = /* @__PURE__ */ defineComponent({
|
|
38508
38665
|
props: {
|
|
38509
38666
|
noDataTip: {
|
|
38510
38667
|
type: String,
|
|
@@ -38565,14 +38722,14 @@ var script$b = /* @__PURE__ */ defineComponent({
|
|
|
38565
38722
|
}
|
|
38566
38723
|
});
|
|
38567
38724
|
|
|
38568
|
-
script$
|
|
38569
|
-
script$
|
|
38725
|
+
script$9.__scopeId = "data-v-4a4b0812";
|
|
38726
|
+
script$9.__file = "packages/big-table/src/components/NoData.vue";
|
|
38570
38727
|
|
|
38571
38728
|
const _hoisted_1$7 = { class: "text-over-tooltip-components" };
|
|
38572
38729
|
const __default__$8 = {
|
|
38573
38730
|
name: "TextOverTooltip"
|
|
38574
38731
|
};
|
|
38575
|
-
var script$
|
|
38732
|
+
var script$8 = /* @__PURE__ */ defineComponent({
|
|
38576
38733
|
...__default__$8,
|
|
38577
38734
|
props: {
|
|
38578
38735
|
content: { type: [String, Number], required: false },
|
|
@@ -38640,15 +38797,15 @@ var script$a = /* @__PURE__ */ defineComponent({
|
|
|
38640
38797
|
}
|
|
38641
38798
|
});
|
|
38642
38799
|
|
|
38643
|
-
script$
|
|
38644
|
-
script$
|
|
38800
|
+
script$8.__scopeId = "data-v-6633a934";
|
|
38801
|
+
script$8.__file = "packages/big-table/src/components/TextOverTooltip.vue";
|
|
38645
38802
|
|
|
38646
38803
|
const _hoisted_1$6 = { key: 0 };
|
|
38647
38804
|
const _hoisted_2$6 = ["xlink:href"];
|
|
38648
38805
|
const __default__$7 = {
|
|
38649
38806
|
name: "SvgIcon"
|
|
38650
38807
|
};
|
|
38651
|
-
var script$
|
|
38808
|
+
var script$7 = /* @__PURE__ */ defineComponent({
|
|
38652
38809
|
...__default__$7,
|
|
38653
38810
|
props: {
|
|
38654
38811
|
iconClass: { type: String, required: true, default: "" },
|
|
@@ -38678,102 +38835,8 @@ var script$9 = /* @__PURE__ */ defineComponent({
|
|
|
38678
38835
|
}
|
|
38679
38836
|
});
|
|
38680
38837
|
|
|
38681
|
-
script$
|
|
38682
|
-
script$
|
|
38683
|
-
|
|
38684
|
-
var script$8 = defineComponent({
|
|
38685
|
-
name: "EditInput",
|
|
38686
|
-
inheritAttrs: false,
|
|
38687
|
-
components: {
|
|
38688
|
-
NInput,
|
|
38689
|
-
NInputNumber
|
|
38690
|
-
},
|
|
38691
|
-
props: {
|
|
38692
|
-
type: {
|
|
38693
|
-
type: String,
|
|
38694
|
-
default: "input"
|
|
38695
|
-
},
|
|
38696
|
-
col: {
|
|
38697
|
-
type: Object,
|
|
38698
|
-
default: () => ({})
|
|
38699
|
-
},
|
|
38700
|
-
row: {
|
|
38701
|
-
type: Object,
|
|
38702
|
-
default: () => ({})
|
|
38703
|
-
},
|
|
38704
|
-
index: {
|
|
38705
|
-
type: [Number, Object],
|
|
38706
|
-
default: 0
|
|
38707
|
-
}
|
|
38708
|
-
},
|
|
38709
|
-
emits: ["updateInput"],
|
|
38710
|
-
setup(props, { attrs, slots, emit }) {
|
|
38711
|
-
const onUpdateValue = (value) => {
|
|
38712
|
-
emit("updateInput", {
|
|
38713
|
-
value,
|
|
38714
|
-
row: props.row,
|
|
38715
|
-
column: props.col,
|
|
38716
|
-
index: props.index
|
|
38717
|
-
});
|
|
38718
|
-
};
|
|
38719
|
-
return () => props.type === "input" ? createVNode(NInput, mergeProps(attrs, {
|
|
38720
|
-
"onUpdateValue": onUpdateValue
|
|
38721
|
-
}), null) : createVNode(NInputNumber, mergeProps(attrs, {
|
|
38722
|
-
"onUpdateValue": onUpdateValue
|
|
38723
|
-
}), null);
|
|
38724
|
-
}
|
|
38725
|
-
});
|
|
38726
|
-
|
|
38727
|
-
script$8.__file = "packages/big-table/src/components/edit-form/edit-input.vue";
|
|
38728
|
-
|
|
38729
|
-
var script$7 = defineComponent({
|
|
38730
|
-
name: "EditSelect",
|
|
38731
|
-
inheritAttrs: false,
|
|
38732
|
-
components: {
|
|
38733
|
-
NSelect
|
|
38734
|
-
},
|
|
38735
|
-
props: {
|
|
38736
|
-
col: {
|
|
38737
|
-
type: Object,
|
|
38738
|
-
default: () => {
|
|
38739
|
-
}
|
|
38740
|
-
},
|
|
38741
|
-
row: {
|
|
38742
|
-
type: Object,
|
|
38743
|
-
default: () => {
|
|
38744
|
-
}
|
|
38745
|
-
}
|
|
38746
|
-
},
|
|
38747
|
-
emits: ["setOptions"],
|
|
38748
|
-
setup(props, { attrs, slots, emit }) {
|
|
38749
|
-
const state = reactive({
|
|
38750
|
-
options: []
|
|
38751
|
-
});
|
|
38752
|
-
const setOptions = async () => {
|
|
38753
|
-
if (props.col.options) {
|
|
38754
|
-
state.options = JSON.parse(JSON.stringify(props.col.options));
|
|
38755
|
-
}
|
|
38756
|
-
else {
|
|
38757
|
-
const optionsName = `${props.col.columnName}_options`;
|
|
38758
|
-
state.options = props.row[optionsName] || await props.col.queryOptions();
|
|
38759
|
-
if (!props.row[optionsName]) {
|
|
38760
|
-
emit("setOptions", state.options);
|
|
38761
|
-
}
|
|
38762
|
-
}
|
|
38763
|
-
};
|
|
38764
|
-
setOptions();
|
|
38765
|
-
return () => [createVNode(NSelect, mergeProps(attrs, {
|
|
38766
|
-
"options": state.options,
|
|
38767
|
-
"consistentMenuWidth": false,
|
|
38768
|
-
"clearable": true,
|
|
38769
|
-
"filterable": true,
|
|
38770
|
-
"to": false,
|
|
38771
|
-
"placeholder": "\u8BF7\u9009\u62E9"
|
|
38772
|
-
}), null)];
|
|
38773
|
-
}
|
|
38774
|
-
});
|
|
38775
|
-
|
|
38776
|
-
script$7.__file = "packages/big-table/src/components/edit-form/edit-select.vue";
|
|
38838
|
+
script$7.__scopeId = "data-v-d1ad5be8";
|
|
38839
|
+
script$7.__file = "src/component/svg/index.vue";
|
|
38777
38840
|
|
|
38778
38841
|
var img$2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAYm0lEQVR4XtVd+3MVVZ7/dudF3iEJCa+QB6+ACCKP+AAcBVEZZWsVmZldZ6xRkIRZrZ3Z2T9gd539ZYaZLcUkCjpTs1u1NZRu+WRFURR5riAKAgEEkhDyTsg7Iffe7q3P9/a3Od237yMP1Omqrk7u7e7zPZ/z+T7P6b4afYfbyy+/nGua5mLTNOcSkeyTiSjdNM10TdPSIZ5pmr2apvUSEfZmIjqHXdM07Ce2bNnS/l11Q/s2G961a1dyZ2fnGiK6zzCM+zRNu9U0zTHJoGmaaZrmKV3XPyaij7Ozs/du3Lhx8Nvq15iEj0VIALRjx45VgUDgZ6ZpbiCijFiuG8M5PZqmvR4XF/fnzZs37wfAY7hX1EtvGoC7d+9Oqq+v/7lhGP9MRCVRJbk5J1zSdf23M2bM+OO6deuu34wmxh1AqGlHR0e5aZq/JqKpN0PoUdyzUdO03+Xk5FSPt3qPK4DV1dWPmKb5gmmaRaPo5E2/RNO0Wk3TnisvL39nvBobFwB37txZ6PP5ANz68RLsZt5H07S3dV1/dsuWLfVjbWfMAFZXVz9qGMarRJQ1VmG+5eu7dF1/ury8/H/G0u6oAdy1a1die3v774jo2bEI8D249sXc3Nxfb9y4cXg0sowKwJ07d2YPDw/Djtw1mkZjvcY0Rx6BaNqounQoMTHxkU2bNnXGKpucN+LWduzYMd3v9+8xTXP+SBsLd/5ogBpJ27GAqmnamfj4+Ac2b97cMKJ7j+TkyspKpFsfElHBSK7zOjcaaAkJCZScnEwTJkygxMREwv848ohrGum6Tn6fj4Z9PvL5fDTQ308Dg4N0/bp3uBcLiER0hYju37p1K1LFmLaYGQjm+Xy+Q2MBL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wRHio9depU3gXMcGo8Eu8ci+oimwDbkJJhbTSqPJHCKjd4yv9je+Da8sp4wQ4/8h8JRFW93KqGuBHMRCYDz82LiUYR4oQzH7yoaXiYZ/EaGhp4l8A5kuePEpuOzyP/lj10vHQiGpBuMGEXkU/L+ml8jwAc2Q0+c88zS9EWHVQdgBqOgGUAjadRldX3+BsASjFUNCMCy0JMxri+dELu7n7tiReIbuAAElRYnpgUe8fplbroUn0i0/WIA9rBudKe/C3MUr9XQUJwXF9f73hiyYtxHvHolXF/7YliD0NevBMOSLALMaKwzq1+KjMEBHwm4MYCmHRerlcBwt+8Auubb+z0LCSGC111cPNevKMy0evVTyqQsHkCnnROtUmR2BuJccJwu56oPBYrZS91MOT8ixcvUnd3d4iqqoB+K69+kgYjvXwM4CGMifboq8rIcCrqZowA4j7fQw0dl6ItN4iue397Lx+Thr1ef4eOIb2TlaBum+gFiGrTvADyuibWz1SVhjqfPn06+FCjc/v2X3+ntq++gLGgoIDyrTd1hFNT9Vqvc6IB6vW9qtJedk7UGst6kfta23f7AkZVUKR9SUlJL8ydO3f9aABQVTIau8Z6/7q6OgTZ359XgKodPn78+COBQOAFTdOKvLxoNHBi+d7tZCIxzuO72sHBwedWrlz5/XoJrSrolStXkltaWiqI6J/UynY4cGLxuiNxMu52cH9d17FOZFt+fn5VQUHBuL7lPPLrMGKhRJhzLly4kNTd3f1z0zS/0xdxa5r228zMzD/Onj37r+NF3B4M0E6cOMGvgieiDZqmZaixWjSVjDaGHjaxR9f11zVN+/PixYv/el8F79VxqHdra+sa64cI7iMiPCGFXxNwrMWLBJobcF3X+ccINE3jHyPIy8vbO95qGkmem6bC0ZiD748dO8Y/hxEXF1caCAT45zA0TctXfw7DKij06rrei5/FME2zRdf1c6ZpYq/Bz2EsXbr0O/s5jP8H7IBGeRihM9IAAAAASUVORK5CYII=";
|
|
38779
38842
|
|
|
@@ -39451,7 +39514,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
39451
39514
|
const { formatData, htmlToText, getBtnStyle } = useFormat(state);
|
|
39452
39515
|
const { imgs2imgArr, parseDurationValue, parseCombinationValue, formatFieldText } = useTableParse(formatData);
|
|
39453
39516
|
const { allSelectedLength, checkOperateCurrentTable, setRowStatus, resetBatchOperationRowStatus, checkListFormUnionSettingParamsList, handleClickCancelBtnByInline, setAllRowInlineStatus, hideSelectCloumns, handleEditFormLength, resetOperationRowStatus, recordClickBtnInfo, getInlineOpreateRow } = useBatchEditing(props, state, emit, xGrid);
|
|
39454
|
-
const { initEditTable, activeMethod, deleteRow, onClickSelectTable,
|
|
39517
|
+
const { initEditTable, activeMethod, deleteRow, onClickSelectTable, onFormChange, getDefaultValue } = useEdit(props, state, emit, xGrid);
|
|
39455
39518
|
const { isAboutNestTable, isExpandTable, handleRowId, toggleExpandMethod, loadExpandMethod, nestHandleClickRow } = useNestTable(props, state, emit);
|
|
39456
39519
|
const attr = useAttrs();
|
|
39457
39520
|
const currentCheckedKeys = computed(() => {
|
|
@@ -39543,7 +39606,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
39543
39606
|
};
|
|
39544
39607
|
onMounted(() => {
|
|
39545
39608
|
bindDocumentClick();
|
|
39546
|
-
state.tableHeight = handleTableHeight(state, props);
|
|
39609
|
+
state.tableHeight = handleTableHeight(state, props) || "auto";
|
|
39547
39610
|
if (!props.isNestTable)
|
|
39548
39611
|
return;
|
|
39549
39612
|
loadColumn(props.columnConfig);
|
|
@@ -39785,29 +39848,31 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
39785
39848
|
const formatterEdit = (params, col) => {
|
|
39786
39849
|
let { row, column, $rowIndex, rowIndex } = params;
|
|
39787
39850
|
let formType = column.formType || col.formType || "";
|
|
39851
|
+
if (!formType)
|
|
39852
|
+
return null;
|
|
39788
39853
|
if (formType === "custom") {
|
|
39789
39854
|
return col.slotFn(params);
|
|
39790
39855
|
}
|
|
39856
|
+
const Comp = comps[formType] || "";
|
|
39857
|
+
if (!Comp)
|
|
39858
|
+
return null;
|
|
39791
39859
|
const propsData = {
|
|
39792
39860
|
col,
|
|
39793
39861
|
row,
|
|
39794
|
-
index: $rowIndex
|
|
39862
|
+
index: $rowIndex,
|
|
39863
|
+
type: formType,
|
|
39864
|
+
onFormChange
|
|
39795
39865
|
};
|
|
39796
|
-
if (formType === "
|
|
39797
|
-
|
|
39798
|
-
|
|
39799
|
-
|
|
39800
|
-
|
|
39801
|
-
"onUpdateInput": onUpdateInput
|
|
39802
|
-
}), null);
|
|
39866
|
+
if (formType === "date") {
|
|
39867
|
+
propsData.defaultFormattedValue = row[col.columnName];
|
|
39868
|
+
}
|
|
39869
|
+
else {
|
|
39870
|
+
propsData.defaultValue = row[col.columnName];
|
|
39803
39871
|
}
|
|
39804
39872
|
if (formType === "select") {
|
|
39805
|
-
|
|
39806
|
-
"value": row[col.columnName],
|
|
39807
|
-
"onUpdate:value": ($event) => row[col.columnName] = $event,
|
|
39808
|
-
"onSetOptions": (options) => row[`${col.columnName}_options`] = options
|
|
39809
|
-
}), null);
|
|
39873
|
+
propsData.onSetOptions = (options) => row[`${col.columnName}_options`] = options;
|
|
39810
39874
|
}
|
|
39875
|
+
return createVNode(Comp, propsData, null);
|
|
39811
39876
|
};
|
|
39812
39877
|
const getEditBtn = (row, col, index) => {
|
|
39813
39878
|
return col.tileBtnList?.map((btn) => {
|
|
@@ -39903,7 +39968,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
39903
39968
|
return getOrCode(row, own, attrType);
|
|
39904
39969
|
}
|
|
39905
39970
|
if (column.property === "operatorColumn") {
|
|
39906
|
-
if (props.columnConfig.isEdit) {
|
|
39971
|
+
if (props.columnConfig.isEdit && !row.initRow) {
|
|
39907
39972
|
return getEditBtn(row, col, $rowIndex);
|
|
39908
39973
|
}
|
|
39909
39974
|
if (state.showButtonTop != 0 || props.isBatchEditing)
|
|
@@ -40188,13 +40253,13 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
40188
40253
|
isAlias = !!tooltipTitle;
|
|
40189
40254
|
}
|
|
40190
40255
|
if (type === "format")
|
|
40191
|
-
return createVNode(script$
|
|
40256
|
+
return createVNode(script$8, {
|
|
40192
40257
|
"tooltipTitle": tooltipTitle,
|
|
40193
40258
|
"content": name,
|
|
40194
40259
|
"isAlias": isAlias
|
|
40195
40260
|
}, null);
|
|
40196
40261
|
return () => {
|
|
40197
|
-
return [createVNode(script$
|
|
40262
|
+
return [createVNode(script$8, {
|
|
40198
40263
|
"tooltipTitle": tooltipTitle,
|
|
40199
40264
|
"content": name,
|
|
40200
40265
|
"isAlias": isAlias
|
|
@@ -40748,7 +40813,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
40748
40813
|
return createVNode(NPopconfirm, {
|
|
40749
40814
|
"onPositiveClick": () => confirmScanMulti(params)
|
|
40750
40815
|
}, {
|
|
40751
|
-
trigger: () => createVNode(script$
|
|
40816
|
+
trigger: () => createVNode(script$7, {
|
|
40752
40817
|
"class": "scan-multi-delete",
|
|
40753
40818
|
"iconClass": "shanchu"
|
|
40754
40819
|
}, null),
|
|
@@ -40961,7 +41026,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
40961
41026
|
}, [createVNode("img", {
|
|
40962
41027
|
"class": "bigTable-qr-img",
|
|
40963
41028
|
"src": src
|
|
40964
|
-
}, null), createVNode("span", null, [createVNode(script$
|
|
41029
|
+
}, null), createVNode("span", null, [createVNode(script$7, {
|
|
40965
41030
|
"iconClass": "fangda"
|
|
40966
41031
|
}, null)])])];
|
|
40967
41032
|
};
|
|
@@ -41045,7 +41110,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
41045
41110
|
}
|
|
41046
41111
|
else {
|
|
41047
41112
|
icon = createVNode(NTooltip, null, {
|
|
41048
|
-
trigger: () => createVNode(script$
|
|
41113
|
+
trigger: () => createVNode(script$7, {
|
|
41049
41114
|
"iconClass": btn.icon,
|
|
41050
41115
|
"style": {
|
|
41051
41116
|
marginRight: mr
|
|
@@ -41056,7 +41121,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
41056
41121
|
}
|
|
41057
41122
|
}
|
|
41058
41123
|
else if (btn.iconSetting) {
|
|
41059
|
-
icon = createVNode(script$
|
|
41124
|
+
icon = createVNode(script$7, {
|
|
41060
41125
|
"iconClass": JSON.parse(btn.iconSetting).icon,
|
|
41061
41126
|
"style": {
|
|
41062
41127
|
marginRight: mr
|
|
@@ -41485,7 +41550,7 @@ var script$6 = /* @__PURE__ */ defineComponent({
|
|
|
41485
41550
|
onScroll: handlerScroll,
|
|
41486
41551
|
onCellMouseenter: handleCellMouseenter
|
|
41487
41552
|
}, {
|
|
41488
|
-
empty: withCtx(() => [unref(state).isShowEmpty ? (openBlock(), createElementBlock("div", _hoisted_9$4, [createVNode(script$
|
|
41553
|
+
empty: withCtx(() => [unref(state).isShowEmpty ? (openBlock(), createElementBlock("div", _hoisted_9$4, [createVNode(script$9, {
|
|
41489
41554
|
"no-data-img": props.emptyItems.noDataImg,
|
|
41490
41555
|
"no-data-tip": props.emptyItems.noDataTip,
|
|
41491
41556
|
"show-img": !props.isNestTable
|
|
@@ -45158,14 +45223,13 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45158
45223
|
previewText: { type: String, required: false, default: "\u6253\u5370\u9884\u89C8" },
|
|
45159
45224
|
formatEditText: { type: String, required: false, default: "\u683C\u5F0F\u7F16\u8F91" },
|
|
45160
45225
|
identityVerificationTitle: { type: String, required: false, default: "\u6253\u5370\u670D\u52A1\u8EAB\u4EFD\u6821\u9A8C" },
|
|
45161
|
-
params: { type: Array, required:
|
|
45162
|
-
hisParams: { type: null, required: true },
|
|
45226
|
+
params: { type: Array, required: false, default: () => [] },
|
|
45163
45227
|
prevFn: { type: Function, required: false, default: () => Promise.resolve() },
|
|
45164
45228
|
verifyUser: { type: Function, required: false, default: () => Promise.resolve() },
|
|
45165
45229
|
queryPrintFormatByNumber: { type: Function, required: true, default: () => Promise.resolve({}) },
|
|
45166
45230
|
queryTemplateParams: { type: Function, required: false, default: () => Promise.resolve({}) },
|
|
45167
45231
|
strategy: { type: String, required: false, default: "MULTI" },
|
|
45168
|
-
|
|
45232
|
+
printParams: { type: Array, required: false }
|
|
45169
45233
|
},
|
|
45170
45234
|
emits: ["success", "error"],
|
|
45171
45235
|
setup(__props, { emit }) {
|
|
@@ -45206,7 +45270,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45206
45270
|
let id = state.currentFormatId;
|
|
45207
45271
|
return state.formatList.find((item) => item.id === id);
|
|
45208
45272
|
});
|
|
45209
|
-
|
|
45273
|
+
computed(() => currentFormatItem.value.name || "\u683C\u5F0F\u9009\u62E9");
|
|
45210
45274
|
const getTemplateIdByFormatId = (id) => {
|
|
45211
45275
|
let find = state.formatList.find((item) => item.id === id);
|
|
45212
45276
|
return find.templateId;
|
|
@@ -45228,36 +45292,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45228
45292
|
};
|
|
45229
45293
|
emit("error", error);
|
|
45230
45294
|
};
|
|
45231
|
-
const getHisParams = (index = 0) => {
|
|
45232
|
-
const { reportid = "280" } = props.hisParams;
|
|
45233
|
-
const { id, name } = state.templateParams;
|
|
45234
|
-
return {
|
|
45235
|
-
reportid,
|
|
45236
|
-
formatid: state.currentFormatId || id,
|
|
45237
|
-
formatname: name,
|
|
45238
|
-
param: props.params[index]
|
|
45239
|
-
};
|
|
45240
|
-
};
|
|
45241
|
-
const getOnceHisParams = () => {
|
|
45242
|
-
const { reportid = "280" } = props.hisParams;
|
|
45243
|
-
const { id, name } = state.templateParams;
|
|
45244
|
-
const obj = {};
|
|
45245
|
-
Object.keys(props.params[0]).forEach((v) => {
|
|
45246
|
-
obj[v] = [];
|
|
45247
|
-
props.params.forEach((k) => {
|
|
45248
|
-
obj[v].push(k[v]);
|
|
45249
|
-
});
|
|
45250
|
-
obj[v] = obj[v].join(",");
|
|
45251
|
-
});
|
|
45252
|
-
return {
|
|
45253
|
-
reportid,
|
|
45254
|
-
formatid: state.currentFormatId || id,
|
|
45255
|
-
formatname: name,
|
|
45256
|
-
param: obj
|
|
45257
|
-
};
|
|
45258
|
-
};
|
|
45259
45295
|
const getPrintParams = (index = 0) => {
|
|
45260
|
-
const params = state.printParams[index];
|
|
45296
|
+
const params = props.printParams?.length ? props.printParams[index] : state.printParams[index];
|
|
45261
45297
|
return JSON.stringify(params);
|
|
45262
45298
|
};
|
|
45263
45299
|
const getOnceParams = () => {
|
|
@@ -45299,49 +45335,26 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45299
45335
|
prevFnError();
|
|
45300
45336
|
return Promise.reject();
|
|
45301
45337
|
}).then(() => {
|
|
45302
|
-
if (props.
|
|
45303
|
-
|
|
45304
|
-
if (props.strategy === "MULTI") {
|
|
45305
|
-
for (let i = 0; i < props.params.length; i++) {
|
|
45306
|
-
const params = getHisParams(i);
|
|
45307
|
-
printInstance[printFn](7, params).then((res) => {
|
|
45308
|
-
console.log(res, "777777777777");
|
|
45309
|
-
}).catch((error) => {
|
|
45310
|
-
console.log(error, "error777");
|
|
45311
|
-
});
|
|
45312
|
-
}
|
|
45313
|
-
}
|
|
45314
|
-
else {
|
|
45315
|
-
const params = getOnceHisParams();
|
|
45316
|
-
printInstance[printFn](7, params).then((res) => {
|
|
45317
|
-
console.log(res, "777777777777");
|
|
45318
|
-
}).catch((error) => {
|
|
45319
|
-
console.log(error, "error777");
|
|
45320
|
-
});
|
|
45321
|
-
}
|
|
45322
|
-
}
|
|
45323
|
-
else {
|
|
45324
|
-
if (props.strategy === "MULTI") {
|
|
45325
|
-
for (let i = 0; i < state.printParams.length; i++) {
|
|
45326
|
-
const queryParams = {
|
|
45327
|
-
formatId: state.currentFormatId,
|
|
45328
|
-
templateId: getTemplateIdByFormatId(state.currentFormatId),
|
|
45329
|
-
params: getPrintParams(i)
|
|
45330
|
-
};
|
|
45331
|
-
printInstance.printDirect(queryParams, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
|
|
45332
|
-
}
|
|
45333
|
-
}
|
|
45334
|
-
else {
|
|
45338
|
+
if (props.strategy === "MULTI") {
|
|
45339
|
+
for (let i = 0; i < state.printParams.length; i++) {
|
|
45335
45340
|
const queryParams = {
|
|
45336
45341
|
formatId: state.currentFormatId,
|
|
45337
45342
|
templateId: getTemplateIdByFormatId(state.currentFormatId),
|
|
45338
|
-
params:
|
|
45343
|
+
params: getPrintParams(i)
|
|
45339
45344
|
};
|
|
45340
|
-
printInstance.printDirect(queryParams,
|
|
45341
|
-
callLocalServicesSuccessCb(res, "print");
|
|
45342
|
-
}, callLocalServicesErrorCb);
|
|
45345
|
+
printInstance.printDirect(queryParams, callLocalServicesSuccessCbTmp, callLocalServicesErrorCb);
|
|
45343
45346
|
}
|
|
45344
45347
|
}
|
|
45348
|
+
else {
|
|
45349
|
+
const queryParams = {
|
|
45350
|
+
formatId: state.currentFormatId,
|
|
45351
|
+
templateId: getTemplateIdByFormatId(state.currentFormatId),
|
|
45352
|
+
params: getOnceParams()
|
|
45353
|
+
};
|
|
45354
|
+
printInstance.printDirect(queryParams, (res) => {
|
|
45355
|
+
callLocalServicesSuccessCb(res, "print");
|
|
45356
|
+
}, callLocalServicesErrorCb);
|
|
45357
|
+
}
|
|
45345
45358
|
}).finally(() => {
|
|
45346
45359
|
state.visible = false;
|
|
45347
45360
|
});
|
|
@@ -45351,26 +45364,15 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45351
45364
|
prevFnError();
|
|
45352
45365
|
return Promise.reject();
|
|
45353
45366
|
}).then(() => {
|
|
45354
|
-
|
|
45355
|
-
|
|
45356
|
-
|
|
45357
|
-
|
|
45358
|
-
|
|
45359
|
-
|
|
45360
|
-
|
|
45361
|
-
|
|
45362
|
-
}
|
|
45363
|
-
else {
|
|
45364
|
-
const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
|
|
45365
|
-
const queryParams = {
|
|
45366
|
-
formatId: state.currentFormatId,
|
|
45367
|
-
templateId: getTemplateIdByFormatId(state.currentFormatId),
|
|
45368
|
-
params
|
|
45369
|
-
};
|
|
45370
|
-
printInstance.preview(queryParams, (res) => {
|
|
45371
|
-
callLocalServicesSuccessCb(res, "preview");
|
|
45372
|
-
}, callLocalServicesErrorCb);
|
|
45373
|
-
}
|
|
45367
|
+
const params = props.strategy === "MULTI" ? getPrintParams() : getOnceParams();
|
|
45368
|
+
const queryParams = {
|
|
45369
|
+
formatId: state.currentFormatId,
|
|
45370
|
+
templateId: getTemplateIdByFormatId(state.currentFormatId),
|
|
45371
|
+
params
|
|
45372
|
+
};
|
|
45373
|
+
printInstance.preview(queryParams, (res) => {
|
|
45374
|
+
callLocalServicesSuccessCb(res, "preview");
|
|
45375
|
+
}, callLocalServicesErrorCb);
|
|
45374
45376
|
}).finally(() => {
|
|
45375
45377
|
state.visible = false;
|
|
45376
45378
|
});
|
|
@@ -45380,18 +45382,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45380
45382
|
prevFnError();
|
|
45381
45383
|
return Promise.reject();
|
|
45382
45384
|
}).then(() => {
|
|
45383
|
-
|
|
45384
|
-
const params = props.strategy === "MULTI" ? getHisParams() : getOnceHisParams();
|
|
45385
|
-
const printFn = props.versionType == 1 ? "handleHisPrint" : "handleOldHisPrint";
|
|
45386
|
-
printInstance[printFn](9, params).then((res) => {
|
|
45387
|
-
console.log(res, 999999);
|
|
45388
|
-
}).catch((error) => {
|
|
45389
|
-
console.log(error, "error999");
|
|
45390
|
-
});
|
|
45391
|
-
}
|
|
45392
|
-
else {
|
|
45393
|
-
state.identityVerification.visible = true;
|
|
45394
|
-
}
|
|
45385
|
+
state.identityVerification.visible = true;
|
|
45395
45386
|
}).finally(() => {
|
|
45396
45387
|
state.visible = false;
|
|
45397
45388
|
});
|
|
@@ -45436,25 +45427,6 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45436
45427
|
let findDefault = list.find((item) => item[key] == 1);
|
|
45437
45428
|
return findDefault?.id || list[0].id;
|
|
45438
45429
|
};
|
|
45439
|
-
const setOptions = () => {
|
|
45440
|
-
const children = state.formatList.map((v) => {
|
|
45441
|
-
return {
|
|
45442
|
-
label: v.name,
|
|
45443
|
-
key: v.id
|
|
45444
|
-
};
|
|
45445
|
-
});
|
|
45446
|
-
options.unshift({
|
|
45447
|
-
label: formatTitle.value,
|
|
45448
|
-
key: "format",
|
|
45449
|
-
children
|
|
45450
|
-
});
|
|
45451
|
-
};
|
|
45452
|
-
const initHIS = (formatListResult) => {
|
|
45453
|
-
state.formatList = formatListResult ? formatListResult.list.filter((item) => item.printmark == 1) : [];
|
|
45454
|
-
setOptions();
|
|
45455
|
-
state.currentFormatId = getDefaultFormatId(state.formatList, "printmark");
|
|
45456
|
-
state.templateParams = state.formatList[0];
|
|
45457
|
-
};
|
|
45458
45430
|
const formatFormatList = (list) => {
|
|
45459
45431
|
let formatList = [];
|
|
45460
45432
|
list.forEach((item) => {
|
|
@@ -45518,7 +45490,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45518
45490
|
};
|
|
45519
45491
|
const initCRM = async (formatListResult) => {
|
|
45520
45492
|
state.formatList = formatListResult ? formatFormatList(formatListResult.obj) : [];
|
|
45521
|
-
|
|
45493
|
+
console.log("formatListResult", formatListResult);
|
|
45522
45494
|
state.currentFormatId = getDefaultFormatId(state.formatList, "defaultFlag");
|
|
45523
45495
|
if (!state.currentFormatId) {
|
|
45524
45496
|
window.$message.error("\u83B7\u53D6\u6253\u5370\u683C\u5F0F\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01");
|
|
@@ -45544,12 +45516,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
45544
45516
|
setTimeoutSpin();
|
|
45545
45517
|
instantiatePrintSDK();
|
|
45546
45518
|
const formatListResult = await props.queryPrintFormatByNumber();
|
|
45547
|
-
|
|
45548
|
-
initHIS(formatListResult);
|
|
45549
|
-
}
|
|
45550
|
-
else {
|
|
45551
|
-
await initCRM(formatListResult);
|
|
45552
|
-
}
|
|
45519
|
+
await initCRM(formatListResult);
|
|
45553
45520
|
setLoaded();
|
|
45554
45521
|
return true;
|
|
45555
45522
|
};
|