cnhis-design-vue 3.0.8 → 3.1.1
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 +34 -0
- package/es/big-table/index.js +101 -14
- package/es/button-print/index.css +4 -0
- package/es/button-print/index.js +112 -44
- package/es/drag-layout/index.css +4 -0
- package/es/field-set/index.css +46 -42
- package/es/grid/index.css +62 -58
- package/es/index.css +4 -0
- package/es/index.js +213 -58
- package/es/select-person/index.css +62 -58
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +9 -3
- package/packages/big-table/src/components/edit-form/edit-date.vue +36 -2
- package/packages/big-table/src/components/edit-form/edit-select.vue +37 -7
- package/packages/big-table/src/hooks/useEdit.ts +21 -2
- package/packages/button-print/src/ButtonPrint.vue +16 -3
package/es/index.js
CHANGED
|
@@ -38481,21 +38481,34 @@ var script$d = defineComponent({
|
|
|
38481
38481
|
emits: ["setOptions", "formChange"],
|
|
38482
38482
|
setup(props, { attrs, slots, emit }) {
|
|
38483
38483
|
const state = reactive({
|
|
38484
|
-
options: []
|
|
38484
|
+
options: [],
|
|
38485
|
+
loading: false,
|
|
38486
|
+
keyword: "",
|
|
38487
|
+
config: {}
|
|
38485
38488
|
});
|
|
38486
38489
|
const setOptions = async () => {
|
|
38487
38490
|
if (props.col.options) {
|
|
38488
38491
|
state.options = JSON.parse(JSON.stringify(props.col.options));
|
|
38489
38492
|
}
|
|
38490
38493
|
else {
|
|
38491
|
-
|
|
38492
|
-
|
|
38493
|
-
|
|
38494
|
-
|
|
38495
|
-
|
|
38494
|
+
`${props.col.columnName}_options`;
|
|
38495
|
+
const obj = {
|
|
38496
|
+
keyword: state.keyword,
|
|
38497
|
+
row: props.row,
|
|
38498
|
+
column: props.col,
|
|
38499
|
+
index: props.index
|
|
38500
|
+
};
|
|
38501
|
+
state.options = await props.col.queryOptions(obj);
|
|
38502
|
+
state.loading = false;
|
|
38503
|
+
emit("setOptions", state.options);
|
|
38496
38504
|
}
|
|
38497
38505
|
};
|
|
38498
|
-
|
|
38506
|
+
let selectSearch = (value) => {
|
|
38507
|
+
state.keyword = value;
|
|
38508
|
+
state.loading = true;
|
|
38509
|
+
setOptions();
|
|
38510
|
+
};
|
|
38511
|
+
selectSearch = xeUtils.debounce(selectSearch, 800);
|
|
38499
38512
|
const onUpdateValue = (value) => {
|
|
38500
38513
|
emit("formChange", {
|
|
38501
38514
|
value,
|
|
@@ -38504,13 +38517,25 @@ var script$d = defineComponent({
|
|
|
38504
38517
|
index: props.index
|
|
38505
38518
|
});
|
|
38506
38519
|
};
|
|
38507
|
-
|
|
38520
|
+
const init = () => {
|
|
38521
|
+
if (props.col.options) {
|
|
38522
|
+
setOptions();
|
|
38523
|
+
}
|
|
38524
|
+
else {
|
|
38525
|
+
state.config.remote = true;
|
|
38526
|
+
state.config.onSearch = selectSearch;
|
|
38527
|
+
selectSearch("");
|
|
38528
|
+
}
|
|
38529
|
+
};
|
|
38530
|
+
init();
|
|
38531
|
+
return () => [createVNode(NSelect, mergeProps(attrs, state.config, {
|
|
38508
38532
|
"options": state.options,
|
|
38509
38533
|
"consistentMenuWidth": false,
|
|
38510
38534
|
"clearable": true,
|
|
38511
38535
|
"filterable": true,
|
|
38512
38536
|
"to": false,
|
|
38513
38537
|
"placeholder": "\u8BF7\u9009\u62E9",
|
|
38538
|
+
"loading": state.loading,
|
|
38514
38539
|
"onUpdateValue": onUpdateValue
|
|
38515
38540
|
}), null)];
|
|
38516
38541
|
}
|
|
@@ -38548,13 +38573,47 @@ var script$c = defineComponent({
|
|
|
38548
38573
|
index: props.index
|
|
38549
38574
|
});
|
|
38550
38575
|
};
|
|
38576
|
+
const { isStartDate = false, isEndDate = false, connectField } = props.col;
|
|
38577
|
+
const setDateDisabled = (cur, date) => {
|
|
38578
|
+
if (isStartDate && connectField) {
|
|
38579
|
+
return cur > date;
|
|
38580
|
+
}
|
|
38581
|
+
if (isEndDate && connectField) {
|
|
38582
|
+
return cur < date;
|
|
38583
|
+
}
|
|
38584
|
+
return false;
|
|
38585
|
+
};
|
|
38586
|
+
const isDateDisabled = (ts) => {
|
|
38587
|
+
return setDateDisabled(ts, new Date(props.row[connectField]).getTime());
|
|
38588
|
+
};
|
|
38589
|
+
const isTimeDisabled = (ts) => {
|
|
38590
|
+
const date = new Date(props.row[connectField] || ts);
|
|
38591
|
+
const h = date.getHours();
|
|
38592
|
+
const m = date.getMinutes();
|
|
38593
|
+
const s = date.getSeconds();
|
|
38594
|
+
return {
|
|
38595
|
+
isHourDisabled: (hour) => {
|
|
38596
|
+
return setDateDisabled(hour, h);
|
|
38597
|
+
},
|
|
38598
|
+
isMinuteDisabled: (minute) => {
|
|
38599
|
+
return setDateDisabled(minute, m);
|
|
38600
|
+
},
|
|
38601
|
+
isSecondDisabled: (second) => {
|
|
38602
|
+
return setDateDisabled(second, s);
|
|
38603
|
+
}
|
|
38604
|
+
};
|
|
38605
|
+
};
|
|
38551
38606
|
const config = {
|
|
38552
38607
|
type: props.col.type || "datetime",
|
|
38553
38608
|
clearable: props.col.clearable || true,
|
|
38554
38609
|
disabled: props.col.disabled || false,
|
|
38555
38610
|
valueFormat: props.col.valueFormat || "yyyy-MM-dd HH:mm:ss",
|
|
38556
|
-
to: false
|
|
38611
|
+
to: false,
|
|
38612
|
+
isDateDisabled: props.col.isDateDisabled || isDateDisabled
|
|
38557
38613
|
};
|
|
38614
|
+
if (config.type.includes("time")) {
|
|
38615
|
+
config.isTimeDisabled = props.col.isTimeDisabled || isTimeDisabled;
|
|
38616
|
+
}
|
|
38558
38617
|
return () => createVNode(NDatePicker, mergeProps(attrs, config, {
|
|
38559
38618
|
"onUpdateFormattedValue": onConfirm
|
|
38560
38619
|
}), null);
|
|
@@ -38624,13 +38683,33 @@ const useEdit = (props, state, emit, xGrid) => {
|
|
|
38624
38683
|
await xGrid.value.insertAt(record, getInsertRecords.at(-1));
|
|
38625
38684
|
xGrid.value.clearActived();
|
|
38626
38685
|
};
|
|
38686
|
+
const getLabel = (opts, value) => {
|
|
38687
|
+
return opts.find((opt) => opt.value === value)?.label || "";
|
|
38688
|
+
};
|
|
38627
38689
|
const onFormChange = ({ value, row, column, index }) => {
|
|
38628
|
-
row[column.columnName]
|
|
38629
|
-
|
|
38690
|
+
let oldValue = row[column.columnName];
|
|
38691
|
+
if ((column?.formType === "input" || column?.formType === "number") && props.columnConfig?.formValidate) {
|
|
38692
|
+
row[column.columnName] = props.columnConfig?.formValidate({ row, column, current: value, old: row[column.columnName] });
|
|
38693
|
+
}
|
|
38694
|
+
else if (column?.formatMap) {
|
|
38695
|
+
oldValue = {
|
|
38696
|
+
label: row[column.formatMap.label],
|
|
38697
|
+
value: row[column.formatMap.value]
|
|
38698
|
+
};
|
|
38699
|
+
row[column.formatMap.label] = getLabel(row[column.columnName + "_options"] || [], value);
|
|
38700
|
+
row[column.formatMap.value] = value;
|
|
38701
|
+
}
|
|
38702
|
+
else {
|
|
38703
|
+
row[column.columnName] = value;
|
|
38704
|
+
}
|
|
38705
|
+
emit("formChange", { value, row, column, index, oldValue });
|
|
38630
38706
|
};
|
|
38631
38707
|
const getDefaultValue = (params, item) => {
|
|
38632
38708
|
const value = params.row[item.columnName];
|
|
38633
38709
|
if (item.formType === "select") {
|
|
38710
|
+
if (item.formatMap) {
|
|
38711
|
+
return params.row[item.formatMap.label];
|
|
38712
|
+
}
|
|
38634
38713
|
if (item.options) {
|
|
38635
38714
|
return item.options.find((v) => v.value == value)?.label || "";
|
|
38636
38715
|
}
|
|
@@ -39687,7 +39766,7 @@ var script$8 = /* @__PURE__ */ defineComponent({
|
|
|
39687
39766
|
return;
|
|
39688
39767
|
let currentPageTableData = table.getTableData()?.tableData;
|
|
39689
39768
|
let currentPageSelectedRows = currentPageTableData.filter((row) => {
|
|
39690
|
-
return currentCheckedKeys.value.includes(row[props.primaryKey]);
|
|
39769
|
+
return row[props.primaryKey] ? currentCheckedKeys.value.includes(row[props.primaryKey]) : false;
|
|
39691
39770
|
});
|
|
39692
39771
|
setCurrentCheckedLength();
|
|
39693
39772
|
if (!currentPageSelectedRows || !currentPageSelectedRows.length) {
|
|
@@ -39808,6 +39887,9 @@ var script$8 = /* @__PURE__ */ defineComponent({
|
|
|
39808
39887
|
if (!isEdit || item.columnName === "operatorColumn" || !item.isEdit) {
|
|
39809
39888
|
return formatter(params, item);
|
|
39810
39889
|
}
|
|
39890
|
+
else if (isEdit && item.isEdit && item.checkEditStatus && item.checkEditStatus(params)) {
|
|
39891
|
+
return formatterEdit(params, item);
|
|
39892
|
+
}
|
|
39811
39893
|
else {
|
|
39812
39894
|
return createVNode("span", null, [getDefaultValue(params, item)]);
|
|
39813
39895
|
}
|
|
@@ -39849,6 +39931,7 @@ var script$8 = /* @__PURE__ */ defineComponent({
|
|
|
39849
39931
|
const formatterEdit = (params, col) => {
|
|
39850
39932
|
let { row, column, $rowIndex, rowIndex } = params;
|
|
39851
39933
|
let formType = column.formType || col.formType || "";
|
|
39934
|
+
let formatMap = column.formatMap || col.formatMap || null;
|
|
39852
39935
|
if (!formType)
|
|
39853
39936
|
return null;
|
|
39854
39937
|
if (formType === "custom") {
|
|
@@ -39867,6 +39950,9 @@ var script$8 = /* @__PURE__ */ defineComponent({
|
|
|
39867
39950
|
if (formType === "date") {
|
|
39868
39951
|
propsData.defaultFormattedValue = row[col.columnName];
|
|
39869
39952
|
}
|
|
39953
|
+
else if (formatMap) {
|
|
39954
|
+
propsData.defaultValue = row[formatMap.value];
|
|
39955
|
+
}
|
|
39870
39956
|
else {
|
|
39871
39957
|
propsData.defaultValue = row[col.columnName];
|
|
39872
39958
|
}
|
|
@@ -40757,7 +40843,7 @@ var script$8 = /* @__PURE__ */ defineComponent({
|
|
|
40757
40843
|
emit("scroll", params);
|
|
40758
40844
|
};
|
|
40759
40845
|
const initScroll = () => {
|
|
40760
|
-
const { throttle = false, throttleTime = 800, throttleOptions = {} } = props.columnConfig?.scrollConfig;
|
|
40846
|
+
const { throttle = false, throttleTime = 800, throttleOptions = {} } = props.columnConfig?.scrollConfig || {};
|
|
40761
40847
|
if (throttle) {
|
|
40762
40848
|
scrollEvent = xeUtils.throttle(scrollEvent, throttleTime, throttleOptions);
|
|
40763
40849
|
}
|
|
@@ -41554,6 +41640,7 @@ var script$8 = /* @__PURE__ */ defineComponent({
|
|
|
41554
41640
|
iconClose: "iconfont icon-a-xitongtubiaotianjia"
|
|
41555
41641
|
},
|
|
41556
41642
|
"keyboard-config": _ctx.columnConfig.keyboardConfig || {},
|
|
41643
|
+
"edit-rules": _ctx.columnConfig.editRules || {},
|
|
41557
41644
|
onCellDblclick: rowdblclick,
|
|
41558
41645
|
onCellClick: handlerClickRow,
|
|
41559
41646
|
onCheckboxChange: selectionChange,
|
|
@@ -41604,7 +41691,7 @@ var script$8 = /* @__PURE__ */ defineComponent({
|
|
|
41604
41691
|
}
|
|
41605
41692
|
})]),
|
|
41606
41693
|
_: 3
|
|
41607
|
-
}, 8, ["seq-config", "tree-config", "row-id", "show-footer", "checkbox-config", "row-style", "edit-config", "expand-config", "keyboard-config"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
|
|
41694
|
+
}, 8, ["seq-config", "tree-config", "row-id", "show-footer", "checkbox-config", "row-style", "edit-config", "expand-config", "keyboard-config", "edit-rules"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
|
|
41608
41695
|
class: "refresh",
|
|
41609
41696
|
onClick: hanldeClickRefresh
|
|
41610
41697
|
}, [createVNode(unref(NIcon), {
|
|
@@ -45231,18 +45318,65 @@ const __default__$1 = create({
|
|
|
45231
45318
|
var script$2 = /* @__PURE__ */ defineComponent({
|
|
45232
45319
|
...__default__$1,
|
|
45233
45320
|
props: {
|
|
45234
|
-
btnText: {
|
|
45235
|
-
|
|
45236
|
-
|
|
45237
|
-
|
|
45238
|
-
|
|
45239
|
-
|
|
45240
|
-
|
|
45241
|
-
|
|
45242
|
-
|
|
45243
|
-
|
|
45244
|
-
|
|
45245
|
-
|
|
45321
|
+
btnText: {
|
|
45322
|
+
type: String,
|
|
45323
|
+
required: false,
|
|
45324
|
+
default: "\u6253\u5370"
|
|
45325
|
+
},
|
|
45326
|
+
printText: {
|
|
45327
|
+
type: String,
|
|
45328
|
+
required: false,
|
|
45329
|
+
default: "\u76F4\u63A5\u6253\u5370"
|
|
45330
|
+
},
|
|
45331
|
+
previewText: {
|
|
45332
|
+
type: String,
|
|
45333
|
+
required: false,
|
|
45334
|
+
default: "\u6253\u5370\u9884\u89C8"
|
|
45335
|
+
},
|
|
45336
|
+
formatEditText: {
|
|
45337
|
+
type: String,
|
|
45338
|
+
required: false,
|
|
45339
|
+
default: "\u683C\u5F0F\u7F16\u8F91"
|
|
45340
|
+
},
|
|
45341
|
+
identityVerificationTitle: {
|
|
45342
|
+
type: String,
|
|
45343
|
+
required: false,
|
|
45344
|
+
default: "\u6253\u5370\u670D\u52A1\u8EAB\u4EFD\u6821\u9A8C"
|
|
45345
|
+
},
|
|
45346
|
+
params: {
|
|
45347
|
+
type: Array,
|
|
45348
|
+
required: false,
|
|
45349
|
+
default: () => []
|
|
45350
|
+
},
|
|
45351
|
+
prevFn: {
|
|
45352
|
+
type: Function,
|
|
45353
|
+
required: false,
|
|
45354
|
+
default: () => Promise.resolve()
|
|
45355
|
+
},
|
|
45356
|
+
verifyUser: {
|
|
45357
|
+
type: Function,
|
|
45358
|
+
required: false,
|
|
45359
|
+
default: () => Promise.resolve()
|
|
45360
|
+
},
|
|
45361
|
+
queryPrintFormatByNumber: {
|
|
45362
|
+
type: Function,
|
|
45363
|
+
required: true,
|
|
45364
|
+
default: () => Promise.resolve({})
|
|
45365
|
+
},
|
|
45366
|
+
queryTemplateParams: {
|
|
45367
|
+
type: Function,
|
|
45368
|
+
required: false,
|
|
45369
|
+
default: () => Promise.resolve({})
|
|
45370
|
+
},
|
|
45371
|
+
strategy: {
|
|
45372
|
+
type: String,
|
|
45373
|
+
required: false,
|
|
45374
|
+
default: "MULTI"
|
|
45375
|
+
},
|
|
45376
|
+
printParams: {
|
|
45377
|
+
type: Array,
|
|
45378
|
+
required: false
|
|
45379
|
+
}
|
|
45246
45380
|
},
|
|
45247
45381
|
emits: ["success", "error"],
|
|
45248
45382
|
setup(__props, { emit }) {
|
|
@@ -45263,27 +45397,30 @@ var script$2 = /* @__PURE__ */ defineComponent({
|
|
|
45263
45397
|
watchPrintParamsReformatFn: null,
|
|
45264
45398
|
spinTimer: null
|
|
45265
45399
|
});
|
|
45266
|
-
const options = reactive([
|
|
45267
|
-
{
|
|
45400
|
+
const options = reactive([{
|
|
45268
45401
|
label: props.printText,
|
|
45269
45402
|
key: "printText"
|
|
45270
|
-
},
|
|
45271
|
-
{
|
|
45403
|
+
}, {
|
|
45272
45404
|
label: props.previewText,
|
|
45273
45405
|
key: "previewText"
|
|
45274
|
-
},
|
|
45275
|
-
{
|
|
45406
|
+
}, {
|
|
45276
45407
|
label: props.formatEditText,
|
|
45277
45408
|
key: "formatEditText"
|
|
45278
|
-
}
|
|
45279
|
-
]);
|
|
45409
|
+
}]);
|
|
45280
45410
|
const currentFormatItem = computed(() => {
|
|
45281
45411
|
if (!state.currentFormatId)
|
|
45282
45412
|
return {};
|
|
45283
45413
|
let id = state.currentFormatId;
|
|
45284
45414
|
return state.formatList.find((item) => item.id === id);
|
|
45285
45415
|
});
|
|
45286
|
-
computed(() => currentFormatItem.value.name || "\u683C\u5F0F\u9009\u62E9");
|
|
45416
|
+
const formatTitle = computed(() => currentFormatItem.value.name || "\u683C\u5F0F\u9009\u62E9");
|
|
45417
|
+
const renderLabel = (option) => {
|
|
45418
|
+
return createVNode("span", {
|
|
45419
|
+
"class": {
|
|
45420
|
+
"active": option.key === state.currentFormatId
|
|
45421
|
+
}
|
|
45422
|
+
}, [option.label]);
|
|
45423
|
+
};
|
|
45287
45424
|
const getTemplateIdByFormatId = (id) => {
|
|
45288
45425
|
let find = state.formatList.find((item) => item.id === id);
|
|
45289
45426
|
return find.templateId;
|
|
@@ -45413,6 +45550,7 @@ var script$2 = /* @__PURE__ */ defineComponent({
|
|
|
45413
45550
|
break;
|
|
45414
45551
|
default:
|
|
45415
45552
|
state.currentFormatId = key;
|
|
45553
|
+
state.visible = false;
|
|
45416
45554
|
break;
|
|
45417
45555
|
}
|
|
45418
45556
|
};
|
|
@@ -45440,6 +45578,19 @@ var script$2 = /* @__PURE__ */ defineComponent({
|
|
|
45440
45578
|
let findDefault = list.find((item) => item[key] == 1);
|
|
45441
45579
|
return findDefault?.id || list[0].id;
|
|
45442
45580
|
};
|
|
45581
|
+
const setOptions = () => {
|
|
45582
|
+
const children = state.formatList.map((v) => {
|
|
45583
|
+
return {
|
|
45584
|
+
label: v.name,
|
|
45585
|
+
key: v.id
|
|
45586
|
+
};
|
|
45587
|
+
});
|
|
45588
|
+
options.unshift({
|
|
45589
|
+
label: formatTitle.value,
|
|
45590
|
+
key: "format",
|
|
45591
|
+
children
|
|
45592
|
+
});
|
|
45593
|
+
};
|
|
45443
45594
|
const formatFormatList = (list) => {
|
|
45444
45595
|
let formatList = [];
|
|
45445
45596
|
list.forEach((item) => {
|
|
@@ -45505,6 +45656,7 @@ var script$2 = /* @__PURE__ */ defineComponent({
|
|
|
45505
45656
|
state.formatList = formatListResult ? formatFormatList(formatListResult.obj) : [];
|
|
45506
45657
|
console.log("formatListResult", formatListResult);
|
|
45507
45658
|
state.currentFormatId = getDefaultFormatId(state.formatList, "defaultFlag");
|
|
45659
|
+
setOptions();
|
|
45508
45660
|
if (!state.currentFormatId) {
|
|
45509
45661
|
window.$message.error("\u83B7\u53D6\u6253\u5370\u683C\u5F0F\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\uFF01");
|
|
45510
45662
|
return requestError();
|
|
@@ -45572,48 +45724,51 @@ var script$2 = /* @__PURE__ */ defineComponent({
|
|
|
45572
45724
|
if (!val?.length)
|
|
45573
45725
|
return false;
|
|
45574
45726
|
reformatPrintParams();
|
|
45575
|
-
}, {
|
|
45727
|
+
}, {
|
|
45728
|
+
deep: true
|
|
45729
|
+
});
|
|
45576
45730
|
return (_ctx, _cache) => {
|
|
45577
|
-
return openBlock(), createElementBlock("span", {
|
|
45578
|
-
|
|
45731
|
+
return openBlock(), createElementBlock("span", {
|
|
45732
|
+
onClick: handleClickWrap
|
|
45733
|
+
}, [createVNode(unref(NDropdown), {
|
|
45734
|
+
class: "rowFoldHideBtnList-dropdown",
|
|
45579
45735
|
placement: "bottom-start",
|
|
45580
45736
|
show: unref(state).visible,
|
|
45581
45737
|
onClickoutside: handleClickOutside,
|
|
45582
45738
|
options: unref(options),
|
|
45583
|
-
onSelect: handleSelect
|
|
45739
|
+
onSelect: handleSelect,
|
|
45740
|
+
"render-label": renderLabel
|
|
45584
45741
|
}, {
|
|
45585
|
-
default: withCtx(() => [
|
|
45586
|
-
renderSlot(_ctx.$slots, "button", {
|
|
45742
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "button", {
|
|
45587
45743
|
handleClickPrintBtn: handleClickBtn,
|
|
45588
45744
|
printSpinning: unref(state).spinning,
|
|
45589
45745
|
printbtnText: __props.btnText,
|
|
45590
45746
|
printVisible: unref(state).visible
|
|
45591
|
-
}, () => [
|
|
45592
|
-
createVNode(unref(NButton), {
|
|
45747
|
+
}, () => [createVNode(unref(NButton), {
|
|
45593
45748
|
class: "dropdown-button",
|
|
45594
|
-
style: {
|
|
45749
|
+
style: {
|
|
45750
|
+
"margin": "0 8px 8px 0"
|
|
45751
|
+
},
|
|
45595
45752
|
onClick: withModifiers(handleClickBtn, ["stop"])
|
|
45596
45753
|
}, {
|
|
45597
|
-
default: withCtx(() => [
|
|
45598
|
-
unref(state).spinning ? (openBlock(), createBlock(unref(NIcon), {
|
|
45754
|
+
default: withCtx(() => [unref(state).spinning ? (openBlock(), createBlock(unref(NIcon), {
|
|
45599
45755
|
key: 0,
|
|
45600
45756
|
component: unref(Reload),
|
|
45601
|
-
style: {
|
|
45602
|
-
|
|
45603
|
-
|
|
45604
|
-
|
|
45605
|
-
|
|
45757
|
+
style: {
|
|
45758
|
+
"line-height": "10px"
|
|
45759
|
+
}
|
|
45760
|
+
}, null, 8, ["component"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(__props.btnText) + " ", 1), createVNode(unref(NIcon), {
|
|
45761
|
+
component: unref(ChevronDown)
|
|
45762
|
+
}, null, 8, ["component"])]),
|
|
45606
45763
|
_: 1
|
|
45607
|
-
}, 8, ["onClick"])
|
|
45608
|
-
])
|
|
45609
|
-
]),
|
|
45764
|
+
}, 8, ["onClick"])])]),
|
|
45610
45765
|
_: 3
|
|
45611
|
-
}, 8, ["show", "options"]),
|
|
45612
|
-
createVNode(script$3, mergeProps({
|
|
45766
|
+
}, 8, ["show", "options"]), createVNode(script$3, mergeProps({
|
|
45613
45767
|
modelValue: unref(state).identityVerification.visible,
|
|
45614
45768
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(state).identityVerification.visible = $event)
|
|
45615
|
-
}, _ctx.$attrs, {
|
|
45616
|
-
|
|
45769
|
+
}, _ctx.$attrs, {
|
|
45770
|
+
onSuccess: verifiySuccess
|
|
45771
|
+
}), null, 16, ["modelValue"])]);
|
|
45617
45772
|
};
|
|
45618
45773
|
}
|
|
45619
45774
|
});
|
|
@@ -593,6 +593,10 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
593
593
|
margin-bottom: 8px;
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
+
.rowFoldHideBtnList-dropdown .n-dropdown-menu-wrapper span.active {
|
|
597
|
+
color: #5585f5;
|
|
598
|
+
}
|
|
599
|
+
|
|
596
600
|
.login-form[data-v-06588d4e] {
|
|
597
601
|
padding-top: 15px;
|
|
598
602
|
}
|
|
@@ -732,48 +736,6 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
732
736
|
z-index: 2001;
|
|
733
737
|
}
|
|
734
738
|
|
|
735
|
-
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] {
|
|
736
|
-
width: 100%;
|
|
737
|
-
margin-bottom: 16px;
|
|
738
|
-
overflow: hidden;
|
|
739
|
-
cursor: pointer;
|
|
740
|
-
color: #2e2e2e;
|
|
741
|
-
}
|
|
742
|
-
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] {
|
|
743
|
-
display: -webkit-box;
|
|
744
|
-
display: -webkit-flex;
|
|
745
|
-
display: -ms-flexbox;
|
|
746
|
-
display: flex;
|
|
747
|
-
-webkit-box-pack: center;
|
|
748
|
-
-webkit-justify-content: center;
|
|
749
|
-
-ms-flex-pack: center;
|
|
750
|
-
justify-content: center;
|
|
751
|
-
-webkit-box-align: center;
|
|
752
|
-
-webkit-align-items: center;
|
|
753
|
-
-ms-flex-align: center;
|
|
754
|
-
align-items: center;
|
|
755
|
-
width: 100%;
|
|
756
|
-
height: 60px;
|
|
757
|
-
padding: 0 8px;
|
|
758
|
-
-webkit-box-sizing: border-box;
|
|
759
|
-
box-sizing: border-box;
|
|
760
|
-
margin-bottom: 8px;
|
|
761
|
-
background: #f3f5f8;
|
|
762
|
-
}
|
|
763
|
-
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966]-input[data-v-55852966] {
|
|
764
|
-
width: 85%;
|
|
765
|
-
overflow: hidden;
|
|
766
|
-
text-overflow: ellipsis;
|
|
767
|
-
white-space: nowrap;
|
|
768
|
-
cursor: pointer !important;
|
|
769
|
-
}
|
|
770
|
-
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] input[type="radio"][disabled][data-v-55852966],
|
|
771
|
-
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] input[type="checkbox"][disabled][data-v-55852966],
|
|
772
|
-
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] input[type="radio"].disabled[data-v-55852966],
|
|
773
|
-
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] input[type="checkbox"].disabled[data-v-55852966] {
|
|
774
|
-
cursor: pointer !important;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
739
|
.DragFormRightItem[data-v-2d9603cc] {
|
|
778
740
|
position: relative;
|
|
779
741
|
}
|
|
@@ -845,6 +807,64 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
845
807
|
color: red;
|
|
846
808
|
}
|
|
847
809
|
|
|
810
|
+
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] {
|
|
811
|
+
width: 100%;
|
|
812
|
+
margin-bottom: 16px;
|
|
813
|
+
overflow: hidden;
|
|
814
|
+
cursor: pointer;
|
|
815
|
+
color: #2e2e2e;
|
|
816
|
+
}
|
|
817
|
+
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] {
|
|
818
|
+
display: -webkit-box;
|
|
819
|
+
display: -webkit-flex;
|
|
820
|
+
display: -ms-flexbox;
|
|
821
|
+
display: flex;
|
|
822
|
+
-webkit-box-pack: center;
|
|
823
|
+
-webkit-justify-content: center;
|
|
824
|
+
-ms-flex-pack: center;
|
|
825
|
+
justify-content: center;
|
|
826
|
+
-webkit-box-align: center;
|
|
827
|
+
-webkit-align-items: center;
|
|
828
|
+
-ms-flex-align: center;
|
|
829
|
+
align-items: center;
|
|
830
|
+
width: 100%;
|
|
831
|
+
height: 60px;
|
|
832
|
+
padding: 0 8px;
|
|
833
|
+
-webkit-box-sizing: border-box;
|
|
834
|
+
box-sizing: border-box;
|
|
835
|
+
margin-bottom: 8px;
|
|
836
|
+
background: #f3f5f8;
|
|
837
|
+
}
|
|
838
|
+
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966]-input[data-v-55852966] {
|
|
839
|
+
width: 85%;
|
|
840
|
+
overflow: hidden;
|
|
841
|
+
text-overflow: ellipsis;
|
|
842
|
+
white-space: nowrap;
|
|
843
|
+
cursor: pointer !important;
|
|
844
|
+
}
|
|
845
|
+
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] input[type="radio"][disabled][data-v-55852966],
|
|
846
|
+
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] input[type="checkbox"][disabled][data-v-55852966],
|
|
847
|
+
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] input[type="radio"].disabled[data-v-55852966],
|
|
848
|
+
.DragFormLeftItem[data-v-55852966] .left-content[data-v-55852966] .style-box[data-v-55852966] input[type="checkbox"].disabled[data-v-55852966] {
|
|
849
|
+
cursor: pointer !important;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
.popver-content {
|
|
854
|
+
height: 400px;
|
|
855
|
+
overflow: hidden;
|
|
856
|
+
overflow-y: auto;
|
|
857
|
+
}
|
|
858
|
+
.popver-ul {
|
|
859
|
+
margin-bottom: 10px;
|
|
860
|
+
}
|
|
861
|
+
.ul-title {
|
|
862
|
+
font-size: 14px;
|
|
863
|
+
font-weight: 400;
|
|
864
|
+
color: rgba(145, 159, 190, 1);
|
|
865
|
+
line-height: 20px;
|
|
866
|
+
}
|
|
867
|
+
|
|
848
868
|
ul[data-v-726261b7] {
|
|
849
869
|
margin: 0;
|
|
850
870
|
padding: 0;
|
|
@@ -1027,22 +1047,6 @@ ul[data-v-726261b7] {
|
|
|
1027
1047
|
text-overflow: ellipsis;
|
|
1028
1048
|
}
|
|
1029
1049
|
|
|
1030
|
-
|
|
1031
|
-
.popver-content {
|
|
1032
|
-
height: 400px;
|
|
1033
|
-
overflow: hidden;
|
|
1034
|
-
overflow-y: auto;
|
|
1035
|
-
}
|
|
1036
|
-
.popver-ul {
|
|
1037
|
-
margin-bottom: 10px;
|
|
1038
|
-
}
|
|
1039
|
-
.ul-title {
|
|
1040
|
-
font-size: 14px;
|
|
1041
|
-
font-weight: 400;
|
|
1042
|
-
color: rgba(145, 159, 190, 1);
|
|
1043
|
-
line-height: 20px;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
1050
|
.df[data-v-3b67e11b] {
|
|
1047
1051
|
display: -webkit-box;
|
|
1048
1052
|
display: -webkit-flex;
|
package/package.json
CHANGED
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
iconClose: 'iconfont icon-a-xitongtubiaotianjia',
|
|
98
98
|
}"
|
|
99
99
|
:keyboard-config="columnConfig.keyboardConfig || {}"
|
|
100
|
+
:edit-rules="columnConfig.editRules || {}"
|
|
100
101
|
@cell-dblclick="rowdblclick"
|
|
101
102
|
@cell-click="handlerClickRow"
|
|
102
103
|
@checkbox-change="selectionChange"
|
|
@@ -475,7 +476,7 @@ const setCurrentPageRowChecked = () => {
|
|
|
475
476
|
if (!table) return;
|
|
476
477
|
let currentPageTableData = table.getTableData()?.tableData;
|
|
477
478
|
let currentPageSelectedRows = currentPageTableData.filter((row: any) => {
|
|
478
|
-
return currentCheckedKeys.value.includes(row[props.primaryKey])
|
|
479
|
+
return (row[props.primaryKey] ? currentCheckedKeys.value.includes(row[props.primaryKey]) : false)
|
|
479
480
|
});
|
|
480
481
|
setCurrentCheckedLength();
|
|
481
482
|
if (!currentPageSelectedRows || !currentPageSelectedRows.length) {
|
|
@@ -655,6 +656,8 @@ const formatColumns = (map: any) => {
|
|
|
655
656
|
default: (params: any) => {
|
|
656
657
|
if(!isEdit || item.columnName === 'operatorColumn' || !item.isEdit) {
|
|
657
658
|
return formatter(params, item)
|
|
659
|
+
} else if (isEdit && item.isEdit && item.checkEditStatus && item.checkEditStatus(params)) {
|
|
660
|
+
return formatterEdit(params, item)
|
|
658
661
|
} else {
|
|
659
662
|
return <span>{getDefaultValue(params, item)}</span>
|
|
660
663
|
}
|
|
@@ -704,6 +707,7 @@ const formatColumns = (map: any) => {
|
|
|
704
707
|
const formatterEdit = (params: any, col: any) => {
|
|
705
708
|
let { row, column, $rowIndex, rowIndex } = params
|
|
706
709
|
let formType = column.formType || col.formType || ''
|
|
710
|
+
let formatMap = column.formatMap || col.formatMap || null
|
|
707
711
|
if (!formType) return null
|
|
708
712
|
if (formType === 'custom') {
|
|
709
713
|
return col.slotFn(params)
|
|
@@ -717,9 +721,11 @@ const formatterEdit = (params: any, col: any) => {
|
|
|
717
721
|
// vModel: [row[col.columnName], formType === 'date' ? 'formattedValue' :'value'],
|
|
718
722
|
type: formType,
|
|
719
723
|
onFormChange
|
|
720
|
-
}
|
|
724
|
+
}
|
|
721
725
|
if (formType === 'date') {
|
|
722
726
|
propsData.defaultFormattedValue = row[col.columnName]
|
|
727
|
+
} else if(formatMap){
|
|
728
|
+
propsData.defaultValue = row[formatMap.value]
|
|
723
729
|
} else {
|
|
724
730
|
propsData.defaultValue = row[col.columnName]
|
|
725
731
|
}
|
|
@@ -1689,7 +1695,7 @@ let scrollEvent = (params: any) => {
|
|
|
1689
1695
|
emit('scroll', params)
|
|
1690
1696
|
}
|
|
1691
1697
|
const initScroll = () => {
|
|
1692
|
-
const { throttle = false, throttleTime = 800, throttleOptions = {} } = props.columnConfig?.scrollConfig
|
|
1698
|
+
const { throttle = false, throttleTime = 800, throttleOptions = {} } = props.columnConfig?.scrollConfig || {}
|
|
1693
1699
|
if (throttle) {
|
|
1694
1700
|
scrollEvent = vexutils.throttle(scrollEvent, throttleTime, throttleOptions)
|
|
1695
1701
|
}
|