cnhis-design-vue 3.0.9 → 3.1.2

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 CHANGED
@@ -2,6 +2,48 @@
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.1.2](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/compare/v3.1.1...v3.1.2) (2022-06-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * 打印按钮无数据时提示配置,点击前增加前置事件,代码优化 ([abadb9c](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/abadb9c9531f9172c59736dc7479a65b435360f2))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * 表格编辑更改data数据页面数据未联动 ([3e30da2](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/3e30da2dbf346217626811a8745a8e7286750c8c))
16
+ * 下拉未匹配到的默认值没有显示、表格编辑下拉被表格挡住 ([e4260f6](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/e4260f61a137d2248d7940d7a77d2e4a3cbcf526))
17
+ * 循环引用bigtable组件导致组件间sate数据联动的问题 ([472a415](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/472a4157b599c711ae2a90e72dee2d3dacd17a0e))
18
+ * bigtable表格高度自适应 ([f462a97](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/f462a978b4b0a30e92a8b4b2a7bf5082c0bf0f91))
19
+
20
+ ### [3.1.1](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/compare/v3.1.0...v3.1.1) (2022-06-01)
21
+
22
+
23
+ ### Features
24
+
25
+ * 表格编辑调接口下拉框支持关键字搜索 ([93157a8](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/93157a8e6cfca91f7f146c61ba7986eaa2716d0f))
26
+ * 表格编辑默认状态设置、校验规则可配置 ([e9618a5](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/e9618a57b9c26dc1a354650bf631eadb91cd0552))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * 打印组件选择格式后下拉菜单未收起,也没有选定的格式样式标识 ([f64f656](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/f64f656dc87c0efef1fea114a57fdc94c179b4b6))
32
+ * big-table初始化会强制默认选中所有行 ([55eadeb](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/55eadebe653f366d4fa27d5d82cfef6347d7f322))
33
+
34
+ ## [3.1.0](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/compare/v3.0.9...v3.1.0) (2022-05-31)
35
+
36
+
37
+ ### Features
38
+
39
+ * 打印格式选择 ([56180bf](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/56180bfde66108455c7ed15870c257c46a88c834))
40
+ * 下拉加映射配置 ([0ea094b](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/0ea094be74e155b2cf37b52df149694118ecf876))
41
+
42
+
43
+ ### Bug Fixes
44
+
45
+ * 解决冲突 ([0ee5bc1](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/commit/0ee5bc10e02148e208eb4da481590d2da9be536c))
46
+
5
47
  ### [3.0.9](http://120.25.59.85:3000/cnhis-frontend/cnhis-design-vue/compare/v3.0.8...v3.0.9) (2022-05-30)
6
48
 
7
49
 
@@ -13323,21 +13323,34 @@ var script$5 = defineComponent({
13323
13323
  emits: ["setOptions", "formChange"],
13324
13324
  setup(props, { attrs, slots, emit }) {
13325
13325
  const state = reactive({
13326
- options: []
13326
+ options: [],
13327
+ loading: false,
13328
+ keyword: "",
13329
+ config: {}
13327
13330
  });
13328
13331
  const setOptions = async () => {
13329
13332
  if (props.col.options) {
13330
13333
  state.options = JSON.parse(JSON.stringify(props.col.options));
13331
13334
  }
13332
13335
  else {
13333
- const optionsName = `${props.col.columnName}_options`;
13334
- state.options = props.row[optionsName] || await props.col.queryOptions();
13335
- if (!props.row[optionsName]) {
13336
- emit("setOptions", state.options);
13337
- }
13336
+ `${props.col.columnName}_options`;
13337
+ const obj = {
13338
+ keyword: state.keyword,
13339
+ row: props.row,
13340
+ column: props.col,
13341
+ index: props.index
13342
+ };
13343
+ state.options = await props.col.queryOptions(obj);
13344
+ state.loading = false;
13345
+ emit("setOptions", state.options);
13338
13346
  }
13339
13347
  };
13340
- setOptions();
13348
+ let selectSearch = (value) => {
13349
+ state.keyword = value;
13350
+ state.loading = true;
13351
+ setOptions();
13352
+ };
13353
+ selectSearch = xeUtils.debounce(selectSearch, 800);
13341
13354
  const onUpdateValue = (value) => {
13342
13355
  emit("formChange", {
13343
13356
  value,
@@ -13346,14 +13359,24 @@ var script$5 = defineComponent({
13346
13359
  index: props.index
13347
13360
  });
13348
13361
  };
13349
- console.log(attrs);
13350
- return () => [createVNode(NSelect, mergeProps(attrs, {
13362
+ const init = () => {
13363
+ if (props.col.options) {
13364
+ setOptions();
13365
+ }
13366
+ else {
13367
+ state.config.remote = true;
13368
+ state.config.onSearch = selectSearch;
13369
+ selectSearch("");
13370
+ }
13371
+ };
13372
+ init();
13373
+ return () => [createVNode(NSelect, mergeProps(attrs, state.config, {
13351
13374
  "options": state.options,
13352
13375
  "consistentMenuWidth": false,
13353
13376
  "clearable": true,
13354
13377
  "filterable": true,
13355
- "to": false,
13356
13378
  "placeholder": "\u8BF7\u9009\u62E9",
13379
+ "loading": state.loading,
13357
13380
  "onUpdateValue": onUpdateValue
13358
13381
  }), null)];
13359
13382
  }
@@ -13426,7 +13449,6 @@ var script$4 = defineComponent({
13426
13449
  clearable: props.col.clearable || true,
13427
13450
  disabled: props.col.disabled || false,
13428
13451
  valueFormat: props.col.valueFormat || "yyyy-MM-dd HH:mm:ss",
13429
- to: false,
13430
13452
  isDateDisabled: props.col.isDateDisabled || isDateDisabled
13431
13453
  };
13432
13454
  if (config.type.includes("time")) {
@@ -13529,12 +13551,11 @@ const useEdit = (props, state, emit, xGrid) => {
13529
13551
  return params.row[item.formatMap.label];
13530
13552
  }
13531
13553
  if (item.options) {
13532
- return item.options.find((v) => v.value == value)?.label || "";
13554
+ return item.options.find((v) => v.value == value)?.label || value || "";
13533
13555
  }
13534
13556
  if (item.queryOptions) {
13535
- return params.row[`${item.columnName}_options`]?.find((v) => v.value === value)?.label || "";
13557
+ return params.row[`${item.columnName}_options`]?.find((v) => v.value === value)?.label || value || "";
13536
13558
  }
13537
- return value;
13538
13559
  }
13539
13560
  return value;
13540
13561
  };
@@ -39565,7 +39586,8 @@ var script = /* @__PURE__ */ defineComponent({
39565
39586
  const GROUP_TITLE_KEY = "group-show-title";
39566
39587
  window.$message = useMessage();
39567
39588
  const xGrid = ref(null);
39568
- const state = reactive(bigTableState);
39589
+ const copyState = xeUtils.clone(bigTableState, true);
39590
+ const state = reactive(copyState);
39569
39591
  const { formatData, htmlToText, getBtnStyle } = useFormat(state);
39570
39592
  const { imgs2imgArr, parseDurationValue, parseCombinationValue, formatFieldText } = useTableParse(formatData);
39571
39593
  const { allSelectedLength, checkOperateCurrentTable, setRowStatus, resetBatchOperationRowStatus, checkListFormUnionSettingParamsList, handleClickCancelBtnByInline, setAllRowInlineStatus, hideSelectCloumns, handleEditFormLength, resetOperationRowStatus, recordClickBtnInfo, getInlineOpreateRow } = useBatchEditing(props, state, emit, xGrid);
@@ -39741,7 +39763,7 @@ var script = /* @__PURE__ */ defineComponent({
39741
39763
  return;
39742
39764
  let currentPageTableData = table.getTableData()?.tableData;
39743
39765
  let currentPageSelectedRows = currentPageTableData.filter((row) => {
39744
- return currentCheckedKeys.value.includes(row[props.primaryKey]);
39766
+ return row[props.primaryKey] ? currentCheckedKeys.value.includes(row[props.primaryKey]) : false;
39745
39767
  });
39746
39768
  setCurrentCheckedLength();
39747
39769
  if (!currentPageSelectedRows || !currentPageSelectedRows.length) {
@@ -39862,6 +39884,9 @@ var script = /* @__PURE__ */ defineComponent({
39862
39884
  if (!isEdit || item.columnName === "operatorColumn" || !item.isEdit) {
39863
39885
  return formatter(params, item);
39864
39886
  }
39887
+ else if (isEdit && item.isEdit && item.checkEditStatus && item.checkEditStatus(params)) {
39888
+ return formatterEdit(params, item);
39889
+ }
39865
39890
  else {
39866
39891
  return createVNode("span", null, [getDefaultValue(params, item)]);
39867
39892
  }
@@ -39920,13 +39945,13 @@ var script = /* @__PURE__ */ defineComponent({
39920
39945
  onFormChange
39921
39946
  };
39922
39947
  if (formType === "date") {
39923
- propsData.defaultFormattedValue = row[col.columnName];
39948
+ propsData.formattedValue = row[col.columnName];
39924
39949
  }
39925
39950
  else if (formatMap) {
39926
- propsData.defaultValue = row[formatMap.value];
39951
+ propsData.value = row[formatMap.value];
39927
39952
  }
39928
39953
  else {
39929
- propsData.defaultValue = row[col.columnName];
39954
+ propsData.value = row[col.columnName];
39930
39955
  }
39931
39956
  if (formType === "select") {
39932
39957
  propsData.onSetOptions = (options) => row[`${col.columnName}_options`] = options;
@@ -41413,7 +41438,8 @@ var script = /* @__PURE__ */ defineComponent({
41413
41438
  loadData(value);
41414
41439
  });
41415
41440
  }, {
41416
- immediate: true
41441
+ immediate: true,
41442
+ deep: true
41417
41443
  });
41418
41444
  watch(() => currentCheckedKeys, (val) => {
41419
41445
  setVisibleCheckAllWrap(state, props, currentCheckedKeys.value);
@@ -41563,7 +41589,7 @@ var script = /* @__PURE__ */ defineComponent({
41563
41589
  "highlight-current-row": "",
41564
41590
  "show-footer-overflow": "title",
41565
41591
  "keep-source": "",
41566
- height: "auto",
41592
+ height: props.height ? "auto" : "unset",
41567
41593
  resizable: "",
41568
41594
  "auto-resize": "",
41569
41595
  "seq-config": unref(handleSeqConfig),
@@ -41612,6 +41638,7 @@ var script = /* @__PURE__ */ defineComponent({
41612
41638
  iconClose: "iconfont icon-a-xitongtubiaotianjia"
41613
41639
  },
41614
41640
  "keyboard-config": _ctx.columnConfig.keyboardConfig || {},
41641
+ "edit-rules": _ctx.columnConfig.editRules || {},
41615
41642
  onCellDblclick: rowdblclick,
41616
41643
  onCellClick: handlerClickRow,
41617
41644
  onCheckboxChange: selectionChange,
@@ -41662,7 +41689,7 @@ var script = /* @__PURE__ */ defineComponent({
41662
41689
  }
41663
41690
  })]),
41664
41691
  _: 3
41665
- }, 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", {
41692
+ }, 8, ["height", "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", {
41666
41693
  class: "refresh",
41667
41694
  onClick: hanldeClickRefresh
41668
41695
  }, [createVNode(unref(NIcon), {