cnhis-design-vue 3.0.5 → 3.0.6
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 +8 -0
- package/es/big-table/index.js +104 -39
- package/es/button-print/index.css +1 -1
- package/es/button-print/index.js +3 -2
- package/es/drag-layout/index.css +1 -1
- package/es/field-set/index.css +1 -1
- package/es/grid/index.css +16 -16
- package/es/index.js +107 -41
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +8 -12
- package/packages/big-table/src/bigTableEmits.ts +1 -2
- package/packages/big-table/src/components/edit-form/edit-date.vue +42 -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 +3 -3
- package/packages/button-print/src/ButtonPrint.vue +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [3.0.6](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/compare/v3.0.5...v3.0.6) (2022-05-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 打印增加默认参数配置 ([b7abea5](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/b7abea576bb8dd39d42324f8cdefb604903e131e))
|
|
11
|
+
* big-table 日期编辑 ([b4fc52e](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/b4fc52e4998bbaa7f63d475bae2028406ca78c1f))
|
|
12
|
+
|
|
5
13
|
### [3.0.5](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/compare/v3.0.4...v3.0.5) (2022-05-23)
|
|
6
14
|
|
|
7
15
|
### [3.0.4](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/compare/v3.0.3...v3.0.4) (2022-05-23)
|
package/es/big-table/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, watch, defineComponent, openBlock, createElementBlock, unref, createCommentVNode, createElementVNode, toDisplayString, ref, createVNode, withCtx, normalizeClass, renderSlot, createTextVNode, mergeProps, reactive, h, resolveComponent, inject, nextTick, createApp, Teleport, provide, onMounted, onUnmounted, getCurrentInstance, onBeforeUnmount, onActivated, onDeactivated, isVNode, useAttrs, normalizeStyle, withDirectives, vShow, Fragment, createBlock } from 'vue';
|
|
2
2
|
import { SettingsSharp, CaretDown, CaretForward, CopyOutline, SyncOutline } from '@vicons/ionicons5';
|
|
3
|
-
import { NTooltip, NInput, NInputNumber, NSelect, useMessage, NIcon, NPopconfirm, NButton, NInputGroup, NCheckbox, NCheckboxGroup, NSpace, NProgress, NDropdown, NSwitch, NPopover } from 'naive-ui';
|
|
3
|
+
import { NTooltip, NInput, NInputNumber, NSelect, NDatePicker, useMessage, NIcon, NPopconfirm, NButton, NInputGroup, NCheckbox, NCheckboxGroup, NSpace, NProgress, NDropdown, NSwitch, NPopover } from 'naive-ui';
|
|
4
4
|
|
|
5
5
|
const bigTableState = {
|
|
6
6
|
curAbleCheckedLen: 0,
|
|
@@ -210,7 +210,7 @@ const bigTableEmits = [
|
|
|
210
210
|
"selectionChangeLocal",
|
|
211
211
|
"switchBtnOnChange",
|
|
212
212
|
"asyncTableChange",
|
|
213
|
-
"
|
|
213
|
+
"formChange"
|
|
214
214
|
];
|
|
215
215
|
|
|
216
216
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -13309,8 +13309,8 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
13309
13309
|
await xGrid.value.insertAt(record, getInsertRecords.at(-1));
|
|
13310
13310
|
xGrid.value.clearActived();
|
|
13311
13311
|
};
|
|
13312
|
-
const
|
|
13313
|
-
emit("
|
|
13312
|
+
const onFormChange = ({ value, row, column }) => {
|
|
13313
|
+
emit("formChange", { value, row, column });
|
|
13314
13314
|
};
|
|
13315
13315
|
const getDefaultValue = (params, item) => {
|
|
13316
13316
|
const value = params.row[item.columnName];
|
|
@@ -13330,7 +13330,7 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
13330
13330
|
activeMethod,
|
|
13331
13331
|
deleteRow,
|
|
13332
13332
|
onClickSelectTable,
|
|
13333
|
-
|
|
13333
|
+
onFormChange,
|
|
13334
13334
|
getDefaultValue
|
|
13335
13335
|
};
|
|
13336
13336
|
};
|
|
@@ -13346,7 +13346,7 @@ var img$3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQQAAADKCAYAAABDnT56A
|
|
|
13346
13346
|
const _hoisted_1$3 = { class: "no-data-tip NoData-page" };
|
|
13347
13347
|
const _hoisted_2$2 = ["src"];
|
|
13348
13348
|
const _hoisted_3$1 = { key: 1 };
|
|
13349
|
-
var script$
|
|
13349
|
+
var script$6 = /* @__PURE__ */ defineComponent({
|
|
13350
13350
|
props: {
|
|
13351
13351
|
noDataTip: {
|
|
13352
13352
|
type: String,
|
|
@@ -13407,14 +13407,14 @@ var script$5 = /* @__PURE__ */ defineComponent({
|
|
|
13407
13407
|
}
|
|
13408
13408
|
});
|
|
13409
13409
|
|
|
13410
|
-
script$
|
|
13411
|
-
script$
|
|
13410
|
+
script$6.__scopeId = "data-v-4a4b0812";
|
|
13411
|
+
script$6.__file = "packages/big-table/src/components/NoData.vue";
|
|
13412
13412
|
|
|
13413
13413
|
const _hoisted_1$2 = { class: "text-over-tooltip-components" };
|
|
13414
13414
|
const __default__$2 = {
|
|
13415
13415
|
name: "TextOverTooltip"
|
|
13416
13416
|
};
|
|
13417
|
-
var script$
|
|
13417
|
+
var script$5 = /* @__PURE__ */ defineComponent({
|
|
13418
13418
|
...__default__$2,
|
|
13419
13419
|
props: {
|
|
13420
13420
|
content: { type: [String, Number], required: false },
|
|
@@ -13482,15 +13482,15 @@ var script$4 = /* @__PURE__ */ defineComponent({
|
|
|
13482
13482
|
}
|
|
13483
13483
|
});
|
|
13484
13484
|
|
|
13485
|
-
script$
|
|
13486
|
-
script$
|
|
13485
|
+
script$5.__scopeId = "data-v-6633a934";
|
|
13486
|
+
script$5.__file = "packages/big-table/src/components/TextOverTooltip.vue";
|
|
13487
13487
|
|
|
13488
13488
|
const _hoisted_1$1 = { key: 0 };
|
|
13489
13489
|
const _hoisted_2$1 = ["xlink:href"];
|
|
13490
13490
|
const __default__$1 = {
|
|
13491
13491
|
name: "SvgIcon"
|
|
13492
13492
|
};
|
|
13493
|
-
var script$
|
|
13493
|
+
var script$4 = /* @__PURE__ */ defineComponent({
|
|
13494
13494
|
...__default__$1,
|
|
13495
13495
|
props: {
|
|
13496
13496
|
iconClass: { type: String, required: true, default: "" },
|
|
@@ -13520,10 +13520,10 @@ var script$3 = /* @__PURE__ */ defineComponent({
|
|
|
13520
13520
|
}
|
|
13521
13521
|
});
|
|
13522
13522
|
|
|
13523
|
-
script$
|
|
13524
|
-
script$
|
|
13523
|
+
script$4.__scopeId = "data-v-d1ad5be8";
|
|
13524
|
+
script$4.__file = "src/component/svg/index.vue";
|
|
13525
13525
|
|
|
13526
|
-
var script$
|
|
13526
|
+
var script$3 = defineComponent({
|
|
13527
13527
|
name: "EditInput",
|
|
13528
13528
|
inheritAttrs: false,
|
|
13529
13529
|
components: {
|
|
@@ -13548,10 +13548,10 @@ var script$2 = defineComponent({
|
|
|
13548
13548
|
default: 0
|
|
13549
13549
|
}
|
|
13550
13550
|
},
|
|
13551
|
-
emits: ["
|
|
13551
|
+
emits: ["formChange"],
|
|
13552
13552
|
setup(props, { attrs, slots, emit }) {
|
|
13553
13553
|
const onUpdateValue = (value) => {
|
|
13554
|
-
emit("
|
|
13554
|
+
emit("formChange", {
|
|
13555
13555
|
value,
|
|
13556
13556
|
row: props.row,
|
|
13557
13557
|
column: props.col,
|
|
@@ -13566,9 +13566,9 @@ var script$2 = defineComponent({
|
|
|
13566
13566
|
}
|
|
13567
13567
|
});
|
|
13568
13568
|
|
|
13569
|
-
script$
|
|
13569
|
+
script$3.__file = "packages/big-table/src/components/edit-form/edit-input.vue";
|
|
13570
13570
|
|
|
13571
|
-
var script$
|
|
13571
|
+
var script$2 = defineComponent({
|
|
13572
13572
|
name: "EditSelect",
|
|
13573
13573
|
inheritAttrs: false,
|
|
13574
13574
|
components: {
|
|
@@ -13577,16 +13577,18 @@ var script$1 = defineComponent({
|
|
|
13577
13577
|
props: {
|
|
13578
13578
|
col: {
|
|
13579
13579
|
type: Object,
|
|
13580
|
-
default: () => {
|
|
13581
|
-
}
|
|
13580
|
+
default: () => ({})
|
|
13582
13581
|
},
|
|
13583
13582
|
row: {
|
|
13584
13583
|
type: Object,
|
|
13585
|
-
default: () => {
|
|
13586
|
-
|
|
13584
|
+
default: () => ({})
|
|
13585
|
+
},
|
|
13586
|
+
index: {
|
|
13587
|
+
type: [Number, Object],
|
|
13588
|
+
default: 0
|
|
13587
13589
|
}
|
|
13588
13590
|
},
|
|
13589
|
-
emits: ["setOptions"],
|
|
13591
|
+
emits: ["setOptions", "formChange"],
|
|
13590
13592
|
setup(props, { attrs, slots, emit }) {
|
|
13591
13593
|
const state = reactive({
|
|
13592
13594
|
options: []
|
|
@@ -13604,18 +13606,73 @@ var script$1 = defineComponent({
|
|
|
13604
13606
|
}
|
|
13605
13607
|
};
|
|
13606
13608
|
setOptions();
|
|
13609
|
+
const onUpdateValue = (value) => {
|
|
13610
|
+
emit("formChange", {
|
|
13611
|
+
value,
|
|
13612
|
+
row: props.row,
|
|
13613
|
+
column: props.col,
|
|
13614
|
+
index: props.index
|
|
13615
|
+
});
|
|
13616
|
+
};
|
|
13607
13617
|
return () => [createVNode(NSelect, mergeProps(attrs, {
|
|
13608
13618
|
"options": state.options,
|
|
13609
13619
|
"consistentMenuWidth": false,
|
|
13610
13620
|
"clearable": true,
|
|
13611
13621
|
"filterable": true,
|
|
13612
13622
|
"to": false,
|
|
13613
|
-
"placeholder": "\u8BF7\u9009\u62E9"
|
|
13623
|
+
"placeholder": "\u8BF7\u9009\u62E9",
|
|
13624
|
+
"onUpdateValue": onUpdateValue
|
|
13614
13625
|
}), null)];
|
|
13615
13626
|
}
|
|
13616
13627
|
});
|
|
13617
13628
|
|
|
13618
|
-
script$
|
|
13629
|
+
script$2.__file = "packages/big-table/src/components/edit-form/edit-select.vue";
|
|
13630
|
+
|
|
13631
|
+
var script$1 = defineComponent({
|
|
13632
|
+
name: "EditDate",
|
|
13633
|
+
inheritAttrs: false,
|
|
13634
|
+
components: {
|
|
13635
|
+
NDatePicker
|
|
13636
|
+
},
|
|
13637
|
+
props: {
|
|
13638
|
+
col: {
|
|
13639
|
+
type: Object,
|
|
13640
|
+
default: () => ({})
|
|
13641
|
+
},
|
|
13642
|
+
row: {
|
|
13643
|
+
type: Object,
|
|
13644
|
+
default: () => ({})
|
|
13645
|
+
},
|
|
13646
|
+
index: {
|
|
13647
|
+
type: [Number, Object],
|
|
13648
|
+
default: 0
|
|
13649
|
+
}
|
|
13650
|
+
},
|
|
13651
|
+
emits: ["formChange"],
|
|
13652
|
+
setup(props, { attrs, slots, emit }) {
|
|
13653
|
+
const onConfirm = (value, formattedValue) => {
|
|
13654
|
+
console.log("\u65F6\u95F4\u9009\u62E9->", value);
|
|
13655
|
+
emit("formChange", {
|
|
13656
|
+
value,
|
|
13657
|
+
row: props.row,
|
|
13658
|
+
column: props.col,
|
|
13659
|
+
index: props.index
|
|
13660
|
+
});
|
|
13661
|
+
};
|
|
13662
|
+
const config = {
|
|
13663
|
+
type: props.col.type || "datetime",
|
|
13664
|
+
clearable: props.col.clearable || true,
|
|
13665
|
+
disabled: props.col.disabled || false,
|
|
13666
|
+
valueFormat: props.col.valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
13667
|
+
to: false
|
|
13668
|
+
};
|
|
13669
|
+
return () => createVNode(NDatePicker, mergeProps(attrs, config, {
|
|
13670
|
+
"onConfirm": onConfirm
|
|
13671
|
+
}), null);
|
|
13672
|
+
}
|
|
13673
|
+
});
|
|
13674
|
+
|
|
13675
|
+
script$1.__file = "packages/big-table/src/components/edit-form/edit-date.vue";
|
|
13619
13676
|
|
|
13620
13677
|
var iconPrefix = 'vxe-icon--';
|
|
13621
13678
|
var GlobalConfig = {
|
|
@@ -39450,7 +39507,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
39450
39507
|
const { formatData, htmlToText, getBtnStyle } = useFormat(state);
|
|
39451
39508
|
const { imgs2imgArr, parseDurationValue, parseCombinationValue, formatFieldText } = useTableParse(formatData);
|
|
39452
39509
|
const { allSelectedLength, checkOperateCurrentTable, setRowStatus, resetBatchOperationRowStatus, checkListFormUnionSettingParamsList, handleClickCancelBtnByInline, setAllRowInlineStatus, hideSelectCloumns, handleEditFormLength, resetOperationRowStatus, recordClickBtnInfo, getInlineOpreateRow } = useBatchEditing(props, state, emit, xGrid);
|
|
39453
|
-
const { initEditTable, activeMethod, deleteRow, onClickSelectTable,
|
|
39510
|
+
const { initEditTable, activeMethod, deleteRow, onClickSelectTable, onFormChange, getDefaultValue } = useEdit(props, state, emit, xGrid);
|
|
39454
39511
|
const { isAboutNestTable, isExpandTable, handleRowId, toggleExpandMethod, loadExpandMethod, nestHandleClickRow } = useNestTable(props, state, emit);
|
|
39455
39512
|
const attr = useAttrs();
|
|
39456
39513
|
const currentCheckedKeys = computed(() => {
|
|
@@ -39542,7 +39599,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
39542
39599
|
};
|
|
39543
39600
|
onMounted(() => {
|
|
39544
39601
|
bindDocumentClick();
|
|
39545
|
-
state.tableHeight = handleTableHeight(state, props);
|
|
39602
|
+
state.tableHeight = handleTableHeight(state, props) || "auto";
|
|
39546
39603
|
if (!props.isNestTable)
|
|
39547
39604
|
return;
|
|
39548
39605
|
loadColumn(props.columnConfig);
|
|
@@ -39793,18 +39850,26 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
39793
39850
|
index: $rowIndex
|
|
39794
39851
|
};
|
|
39795
39852
|
if (formType === "input" || formType === "number") {
|
|
39796
|
-
return createVNode(script$
|
|
39853
|
+
return createVNode(script$3, mergeProps(propsData, {
|
|
39797
39854
|
"type": formType,
|
|
39798
39855
|
"value": row[col.columnName],
|
|
39799
39856
|
"onUpdate:value": ($event) => row[col.columnName] = $event,
|
|
39800
|
-
"
|
|
39857
|
+
"onFormChange": onFormChange
|
|
39801
39858
|
}), null);
|
|
39802
39859
|
}
|
|
39803
39860
|
if (formType === "select") {
|
|
39804
|
-
return createVNode(script$
|
|
39861
|
+
return createVNode(script$2, mergeProps(propsData, {
|
|
39805
39862
|
"value": row[col.columnName],
|
|
39806
39863
|
"onUpdate:value": ($event) => row[col.columnName] = $event,
|
|
39807
|
-
"onSetOptions": (options) => row[`${col.columnName}_options`] = options
|
|
39864
|
+
"onSetOptions": (options) => row[`${col.columnName}_options`] = options,
|
|
39865
|
+
"onFormChange": onFormChange
|
|
39866
|
+
}), null);
|
|
39867
|
+
}
|
|
39868
|
+
if (formType === "date") {
|
|
39869
|
+
return createVNode(script$1, mergeProps(propsData, {
|
|
39870
|
+
"formattedValue": row[col.columnName],
|
|
39871
|
+
"onUpdate:formattedValue": ($event) => row[col.columnName] = $event,
|
|
39872
|
+
"onFormChange": onFormChange
|
|
39808
39873
|
}), null);
|
|
39809
39874
|
}
|
|
39810
39875
|
};
|
|
@@ -40187,13 +40252,13 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
40187
40252
|
isAlias = !!tooltipTitle;
|
|
40188
40253
|
}
|
|
40189
40254
|
if (type === "format")
|
|
40190
|
-
return createVNode(script$
|
|
40255
|
+
return createVNode(script$5, {
|
|
40191
40256
|
"tooltipTitle": tooltipTitle,
|
|
40192
40257
|
"content": name,
|
|
40193
40258
|
"isAlias": isAlias
|
|
40194
40259
|
}, null);
|
|
40195
40260
|
return () => {
|
|
40196
|
-
return [createVNode(script$
|
|
40261
|
+
return [createVNode(script$5, {
|
|
40197
40262
|
"tooltipTitle": tooltipTitle,
|
|
40198
40263
|
"content": name,
|
|
40199
40264
|
"isAlias": isAlias
|
|
@@ -40747,7 +40812,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
40747
40812
|
return createVNode(NPopconfirm, {
|
|
40748
40813
|
"onPositiveClick": () => confirmScanMulti(params)
|
|
40749
40814
|
}, {
|
|
40750
|
-
trigger: () => createVNode(script$
|
|
40815
|
+
trigger: () => createVNode(script$4, {
|
|
40751
40816
|
"class": "scan-multi-delete",
|
|
40752
40817
|
"iconClass": "shanchu"
|
|
40753
40818
|
}, null),
|
|
@@ -40960,7 +41025,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
40960
41025
|
}, [createVNode("img", {
|
|
40961
41026
|
"class": "bigTable-qr-img",
|
|
40962
41027
|
"src": src
|
|
40963
|
-
}, null), createVNode("span", null, [createVNode(script$
|
|
41028
|
+
}, null), createVNode("span", null, [createVNode(script$4, {
|
|
40964
41029
|
"iconClass": "fangda"
|
|
40965
41030
|
}, null)])])];
|
|
40966
41031
|
};
|
|
@@ -41044,7 +41109,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
41044
41109
|
}
|
|
41045
41110
|
else {
|
|
41046
41111
|
icon = createVNode(NTooltip, null, {
|
|
41047
|
-
trigger: () => createVNode(script$
|
|
41112
|
+
trigger: () => createVNode(script$4, {
|
|
41048
41113
|
"iconClass": btn.icon,
|
|
41049
41114
|
"style": {
|
|
41050
41115
|
marginRight: mr
|
|
@@ -41055,7 +41120,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
41055
41120
|
}
|
|
41056
41121
|
}
|
|
41057
41122
|
else if (btn.iconSetting) {
|
|
41058
|
-
icon = createVNode(script$
|
|
41123
|
+
icon = createVNode(script$4, {
|
|
41059
41124
|
"iconClass": JSON.parse(btn.iconSetting).icon,
|
|
41060
41125
|
"style": {
|
|
41061
41126
|
marginRight: mr
|
|
@@ -41484,7 +41549,7 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
41484
41549
|
onScroll: handlerScroll,
|
|
41485
41550
|
onCellMouseenter: handleCellMouseenter
|
|
41486
41551
|
}, {
|
|
41487
|
-
empty: withCtx(() => [unref(state).isShowEmpty ? (openBlock(), createElementBlock("div", _hoisted_9, [createVNode(script$
|
|
41552
|
+
empty: withCtx(() => [unref(state).isShowEmpty ? (openBlock(), createElementBlock("div", _hoisted_9, [createVNode(script$6, {
|
|
41488
41553
|
"no-data-img": props.emptyItems.noDataImg,
|
|
41489
41554
|
"no-data-tip": props.emptyItems.noDataTip,
|
|
41490
41555
|
"show-img": !props.isNestTable
|