sun-biz 0.0.2-beta.10 → 0.0.2-beta.12

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.
@@ -78,10 +78,12 @@ export declare function integrateData(initData: {
78
78
  };
79
79
  /**
80
80
  * 传入地址类似的值 ,拼接
81
+ * 如果接口返回了这个字段。 展示接口返回对应的vaule
82
+ * 没有的话则展示默认值
81
83
  * @param data
82
84
  * @param key
83
85
  * @returns
84
86
  */
85
87
  export declare function getDefaultValue(data: {
86
88
  [key: string]: unknown;
87
- }, key: string): string | undefined;
89
+ }, key: string): string;
@@ -895,8 +895,12 @@ const _hoisted_3 = {
895
895
  });
896
896
  if (res?.success) userList.value = res.data || [];
897
897
  }
898
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
898
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.componentNo, ()=>{
899
899
  fetchDbgridComponent();
900
+ }, {
901
+ immediate: true
902
+ });
903
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
900
904
  featchUserList();
901
905
  });
902
906
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)([
@@ -1171,7 +1175,7 @@ const _hoisted_3 = {
1171
1175
  const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
1172
1176
  [
1173
1177
  '__scopeId',
1174
- "data-v-8c01f31c"
1178
+ "data-v-1e494f3f"
1175
1179
  ]
1176
1180
  ]);
1177
1181
  /* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
@@ -1276,7 +1280,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1276
1280
  default: void 0
1277
1281
  },
1278
1282
  componentNo: {
1279
- default: ""
1283
+ default: ''
1280
1284
  },
1281
1285
  fetchData: {
1282
1286
  type: Function,
@@ -1291,7 +1295,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1291
1295
  default: false
1292
1296
  },
1293
1297
  rowKey: {
1294
- default: "id"
1298
+ default: 'id'
1295
1299
  },
1296
1300
  loading: {
1297
1301
  type: Boolean,
@@ -1332,11 +1336,11 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1332
1336
  });
1333
1337
  const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
1334
1338
  const columnTypes = [
1335
- "selection",
1336
- "radio",
1337
- "index",
1338
- "expand",
1339
- "sort"
1339
+ 'selection',
1340
+ 'radio',
1341
+ 'index',
1342
+ 'expand',
1343
+ 'sort'
1340
1344
  ];
1341
1345
  const dbgridComponentSettingRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
1342
1346
  const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
@@ -1356,7 +1360,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1356
1360
  sortData.curData = item;
1357
1361
  sortData.result = data;
1358
1362
  }
1359
- if (item?.[attrs?.["tree-props"]?.children]) getDragSortData(newIndex, item?.[attrs?.["tree-props"]?.children], startIndexObj, sortData);
1363
+ if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
1360
1364
  });
1361
1365
  return sortData;
1362
1366
  }
@@ -1366,7 +1370,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1366
1370
  let data = [
1367
1371
  ...state.tableData
1368
1372
  ];
1369
- if (attrs?.["tree-props"]) {
1373
+ if (attrs?.['tree-props']) {
1370
1374
  let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
1371
1375
  startIndex: -1
1372
1376
  }, {
@@ -1382,7 +1386,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1382
1386
  curData: {}
1383
1387
  });
1384
1388
  if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
1385
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("暂不支持跨层级拖拽配置");
1389
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
1386
1390
  return [];
1387
1391
  }
1388
1392
  const [removedItem] = result.splice(oldCurIndex, 1);
@@ -1398,16 +1402,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1398
1402
  * 表格拖拽排序
1399
1403
  **/ const initDragSort = ()=>{
1400
1404
  const tbody = document.querySelector(`#${uuid.value} tbody`);
1401
- let initialHTML = ""; //暂不支持跨层级拖拽
1405
+ let initialHTML = ''; //暂不支持跨层级拖拽
1402
1406
  if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
1403
- handle: ".cursor-move",
1407
+ handle: '.cursor-move',
1404
1408
  animation: 300,
1405
1409
  onEnd (evt) {
1406
1410
  const { newIndex, oldIndex } = evt;
1407
1411
  if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
1408
1412
  //获取拖动后的排序
1409
1413
  let data = getSortableResult(newIndex, oldIndex);
1410
- if (data.length) emit("drag-end", data);
1414
+ if (data.length) emit('drag-end', data);
1411
1415
  else evt.from.innerHTML = initialHTML;
1412
1416
  },
1413
1417
  onStart (evt) {
@@ -1422,7 +1426,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1422
1426
  });
1423
1427
  async function fetchDbgridComponent() {
1424
1428
  let [, result] = await queryDbgridComponentByExample({
1425
- componentNo: props.componentNo || ""
1429
+ componentNo: props.componentNo || ''
1426
1430
  });
1427
1431
  if (result?.success) try {
1428
1432
  let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
@@ -1431,12 +1435,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1431
1435
  console.log(error);
1432
1436
  }
1433
1437
  }
1438
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.componentNo, ()=>{
1439
+ if (props.componentNo) fetchDbgridComponent();
1440
+ }, {
1441
+ immediate: true
1442
+ });
1434
1443
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
1435
1444
  // 支持拖拽排序
1436
1445
  if (props.draggable) (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
1437
1446
  initDragSort();
1438
1447
  });
1439
- if (props.componentNo) fetchDbgridComponent();
1440
1448
  if (props.pagination && props?.fetchData) fetchList();
1441
1449
  });
1442
1450
  /**
@@ -1455,7 +1463,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1455
1463
  state.pageInfo.pageNumber = 1;
1456
1464
  state.pageInfo.pageSize = val;
1457
1465
  fetchList();
1458
- } else emit("size-page-change", val);
1466
+ } else emit('size-page-change', val);
1459
1467
  };
1460
1468
  /**
1461
1469
  * 分页组件改变 当前页数 事件
@@ -1463,7 +1471,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1463
1471
  if (props.fetchData) {
1464
1472
  state.pageInfo.pageNumber = val;
1465
1473
  fetchList();
1466
- } else emit("current-page-change", val);
1474
+ } else emit('current-page-change', val);
1467
1475
  }
1468
1476
  // 超级表格 ref
1469
1477
  const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
@@ -1480,7 +1488,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1480
1488
  if (Object.keys(props.filterObj).length) return [
1481
1489
  ...state.tableData
1482
1490
  ].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
1483
- "",
1491
+ '',
1484
1492
  void 0,
1485
1493
  null
1486
1494
  ].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
@@ -1527,7 +1535,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1527
1535
  if (!props.componentNo) return props.columns;
1528
1536
  {
1529
1537
  if (!serveColumns.value?.length) return props.columns.map((cur)=>({
1530
- displayFlag: cur.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
1538
+ displayFlag: cur.isHidden || cur.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
1531
1539
  ...cur
1532
1540
  }));
1533
1541
  let curColumns = [
@@ -1582,7 +1590,13 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1582
1590
  border: ""
1583
1591
  }, _ctx.$attrs), {
1584
1592
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
1585
- ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableColumns.value.filter((item)=>!item.isHidden), (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
1593
+ ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableColumns.value.filter((item)=>{
1594
+ /**
1595
+ * defaultDisplayFlag: 默认显示标识,0:不显示,1:显示
1596
+ * serveColumns :服务端返回的列配置
1597
+ */ if (props.componentNo && !serveColumns.value.length && item.defaultDisplayFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG).NO) return false;
1598
+ return !item.isHidden;
1599
+ }), (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
1586
1600
  item.type && columnTypes.includes(item.type) ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableColumn), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
1587
1601
  key: 0,
1588
1602
  ref_for: true
@@ -1731,7 +1745,8 @@ function unrefElement(elRef) {
1731
1745
  return plain?.$el ?? plain;
1732
1746
  }
1733
1747
  function findActiveIndexByDirection(options) {
1734
- const { data, direction, column, activeItem, rowKey, scrollTo } = options;
1748
+ const { data, direction, column, activeItem, rowKey: rowKeyValue, scrollTo } = options;
1749
+ const rowKey = (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(rowKeyValue);
1735
1750
  let currentIndex = data.findIndex((item)=>item[rowKey] === activeItem?.[rowKey]);
1736
1751
  const isYDirection = "ArrowUp" === direction || "ArrowDown" === direction;
1737
1752
  if (column) {
@@ -1824,15 +1839,14 @@ function useSelectByDirectionEvent(options) {
1824
1839
  label: item.title,
1825
1840
  prop: item.dataIndex
1826
1841
  })));
1827
- const patientList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>__props.accessResult.data);
1828
1842
  const setCurrentRow = (row)=>{
1829
1843
  currentRow.value = row;
1830
1844
  tableRef.value?.setCurrentRow(row);
1831
1845
  };
1832
1846
  /** 监听键盘方向事件 支持方向盘上下切换table 目标行 */ use_direction_select({
1833
1847
  triggerRef: inputRef,
1834
- rowKey: 'patientId',
1835
- data: patientList,
1848
+ rowKey: (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.accessResult.primaryKey),
1849
+ data: (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.accessResult.data),
1836
1850
  activeItem: currentRow,
1837
1851
  setCurrentItem: setCurrentRow,
1838
1852
  scrollTo: (params)=>{
@@ -1926,7 +1940,7 @@ function useSelectByDirectionEvent(options) {
1926
1940
  ref: tableRef,
1927
1941
  loading: _ctx.searchLoading,
1928
1942
  columns: columns.value,
1929
- data: patientList.value,
1943
+ data: _ctx.accessResult.data,
1930
1944
  "row-key": _ctx.accessResult.primaryKey,
1931
1945
  "highlight-current-row": "",
1932
1946
  "max-height": "480px",
@@ -2187,6 +2201,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
2187
2201
  emits('change', {
2188
2202
  inputInfo: {
2189
2203
  value: inputValue.value,
2204
+ primaryKey: accessResult.value.primaryKey,
2190
2205
  searchTypeCode: activeAccessWay.value.searchTypeCode,
2191
2206
  indexTypeCode: activeAccessWay.value.indexTypeCode,
2192
2207
  triggerTypeCode: activeAccessWay.value.triggerTypeCode
@@ -2222,7 +2237,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
2222
2237
  } else if (cardInfo?.indexNo || activeAccessWay.value?.indexTypeCode) handleChange({
2223
2238
  cardInfo
2224
2239
  });
2225
- else __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('未检索到患者信息');
2240
+ else __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('未检索到数据');
2226
2241
  };
2227
2242
  /** 触发患者检索 */ const triggerSearchAccess = async (data, cardInfo)=>{
2228
2243
  searchLoading.value = true;
@@ -3119,7 +3134,7 @@ function getExtraProps(item, dataValueNames, modelValue) {
3119
3134
  width: '100%'
3120
3135
  },
3121
3136
  filterable: true,
3122
- maxlength: item.maxLength,
3137
+ maxLength: item.maxLength,
3123
3138
  'automatic-dropdown': item.focusAutoDropDownFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
3124
3139
  disabled: item.disabledFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
3125
3140
  codeSystemNo: item.codeSystemNo,
@@ -3207,6 +3222,8 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
3207
3222
  }
3208
3223
  /**
3209
3224
  * 传入地址类似的值 ,拼接
3225
+ * 如果接口返回了这个字段。 展示接口返回对应的vaule
3226
+ * 没有的话则展示默认值
3210
3227
  * @param data
3211
3228
  * @param key
3212
3229
  * @returns
@@ -3216,13 +3233,13 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
3216
3233
  return key.split(COMMA).reduce((pre, cur)=>{
3217
3234
  if (data[cur]) return `${pre}${pre ? COMMA : ''}${data[cur]}`;
3218
3235
  return pre;
3219
- }, '') || void 0;
3236
+ }, '');
3220
3237
  }
3221
3238
  if ((key || '').startsWith(GROUP)) {
3222
3239
  const list = key.split(SEPARATOR);
3223
3240
  return (data[list[1]] || {})[list[2]];
3224
3241
  }
3225
- return data[key] || void 0;
3242
+ return data[key];
3226
3243
  }
3227
3244
  /* ESM default export */ const Collapsevue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
3228
3245
  __name: 'Collapse',
@@ -3238,12 +3255,13 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
3238
3255
  const formData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
3239
3256
  const hideData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({});
3240
3257
  const afterValueChange = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('afterValueChange');
3258
+ const disabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('disabled');
3241
3259
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)([
3242
3260
  ()=>props.designDetailInfo.subFormControlList,
3243
3261
  ()=>props.dataValueNames
3244
3262
  ], ()=>{
3245
- const { result: initList, hideData } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
3246
- hideData.value = hideData; /**
3263
+ const { result: initList, hideData: hideObj } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
3264
+ hideData.value = hideObj; /**
3247
3265
  * 初次渲染
3248
3266
  */
3249
3267
  const initData = useGetFromConfigData(initList, props.layoutTypeCode, props.designDetailInfo.formCtlNo, afterValueChange);
@@ -3272,10 +3290,8 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
3272
3290
  },
3273
3291
  getCurrentValue: ()=>modelValue.value
3274
3292
  });
3275
- return (_ctx, _cache)=>{
3276
- const _component_Title = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("Title");
3277
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
3278
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_Title, {
3293
+ return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
3294
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(Title), {
3279
3295
  class: "mb-4",
3280
3296
  title: props.designDetailInfo.labelName
3281
3297
  }, null, 8, [
@@ -3287,21 +3303,22 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
3287
3303
  modelValue: modelValue.value,
3288
3304
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>modelValue.value = $event),
3289
3305
  class: "ml-4 mr-4",
3306
+ disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(disabled),
3290
3307
  column: props.layoutTypeCode,
3291
3308
  data: formData.value
3292
3309
  }, null, 8, [
3293
3310
  "modelValue",
3311
+ "disabled",
3294
3312
  "column",
3295
3313
  "data"
3296
3314
  ])
3297
- ], 64);
3298
- };
3315
+ ], 64));
3299
3316
  }
3300
3317
  });
3301
3318
  const Collapse_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Collapsevue_type_script_setup_true_lang_tsx, [
3302
3319
  [
3303
3320
  '__scopeId',
3304
- "data-v-850b3202"
3321
+ "data-v-39478274"
3305
3322
  ]
3306
3323
  ]);
3307
3324
  /* ESM default export */ const Collapse = Collapse_exports_;
@@ -3339,17 +3356,20 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
3339
3356
  trigger: 'change'
3340
3357
  }
3341
3358
  ],
3342
- render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(FormUnit, {
3343
- disabled: disabled,
3359
+ render: (row)=>{
3360
+ const extraProps = getExtraProps(item, props.dataValueNames, row);
3361
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(FormUnit, {
3344
3362
  component: getComponentType(item),
3345
3363
  label: item.labelNameDisplay || item.labelName,
3346
3364
  placeholder: getPlaceholder(item),
3347
- ...getExtraProps(item, props.dataValueNames, row),
3365
+ ...extraProps,
3348
3366
  modelValue: row[item.bindingFieldNo],
3349
3367
  'onUpdate:modelValue': (value)=>{
3350
3368
  row[item.bindingFieldNo] = value;
3351
- }
3352
- })
3369
+ },
3370
+ disabled: extraProps.disabled || disabled
3371
+ });
3372
+ }
3353
3373
  }));
3354
3374
  }
3355
3375
  const tableColumn = useGetTableColumnData();
@@ -3426,7 +3446,7 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
3426
3446
  const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_script_setup_true_lang_tsx, [
3427
3447
  [
3428
3448
  '__scopeId',
3429
- "data-v-d25acd4c"
3449
+ "data-v-7c43a384"
3430
3450
  ]
3431
3451
  ]);
3432
3452
  /* ESM default export */ const Table = Table_exports_;
@@ -3449,8 +3469,8 @@ const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_
3449
3469
  ()=>props.designDetailInfo.subFormControlList,
3450
3470
  ()=>props.dataValueNames
3451
3471
  ], ()=>{
3452
- const { result: initList, hideData } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
3453
- hideData.value = hideData; /**
3472
+ const { result: initList, hideData: hideObj } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
3473
+ hideData.value = hideObj; /**
3454
3474
  * 初次渲染
3455
3475
  */
3456
3476
  const initData = useGetFromConfigData(initList, props.layoutTypeCode, props.designDetailInfo.formCtlNo, afterValueChange);
@@ -3468,7 +3488,7 @@ const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_
3468
3488
  let result = await formRef.value?.ref.validate();
3469
3489
  if (result) return {
3470
3490
  [props.designDetailInfo.bindingFieldNo]: utils_integrateData({
3471
- ...hideData,
3491
+ ...hideData.value,
3472
3492
  ...modelValue.value
3473
3493
  }),
3474
3494
  bindingFieldNo: props.designDetailInfo.bindingFieldNo,
@@ -3485,10 +3505,8 @@ const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_
3485
3505
  [props.designDetailInfo.formCtlNo]: modelValue.value
3486
3506
  })
3487
3507
  });
3488
- return (_ctx, _cache)=>{
3489
- const _component_Title = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("Title");
3490
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
3491
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_Title, {
3508
+ return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
3509
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(Title), {
3492
3510
  class: "mb-4",
3493
3511
  title: props.designDetailInfo.labelName
3494
3512
  }, null, 8, [
@@ -3509,14 +3527,13 @@ const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_
3509
3527
  "column",
3510
3528
  "data"
3511
3529
  ])
3512
- ], 64);
3513
- };
3530
+ ], 64));
3514
3531
  }
3515
3532
  });
3516
3533
  const Set_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Setvue_type_script_setup_true_lang_tsx_name_Set, [
3517
3534
  [
3518
3535
  '__scopeId',
3519
- "data-v-43fea02a"
3536
+ "data-v-2b1a8223"
3520
3537
  ]
3521
3538
  ]);
3522
3539
  /* ESM default export */ const Set = Set_exports_;
@@ -1,4 +1,4 @@
1
- import type { ConfigReqParams, SearchReqParams, AccessConfig } from './types.d';
1
+ import type { ConfigReqParams, SearchReqParams, AccessConfig, TPatient } from './types.d';
2
2
  /**
3
3
  * 1-10115-1 根据条件查询菜单的检索方式列表(业务态)
4
4
  * @param params
@@ -13,6 +13,6 @@ export declare const queryBizDataList: (params: SearchReqParams) => Promise<[imp
13
13
  display: string;
14
14
  }[];
15
15
  data: {
16
- data: unknown[];
16
+ data: TPatient[];
17
17
  };
18
18
  }> | undefined]>;
@@ -35,6 +35,7 @@ export type HeaderRenderScope<T> = {
35
35
  [key: string]: any;
36
36
  };
37
37
  export interface ColumnProps<T = any> extends Partial<Omit<TableColumnCtx<T>, 'type' | 'children' | 'renderCell' | 'renderHeader'>> {
38
+ defaultDisplayFlag?: number;
38
39
  required?: boolean | undefined;
39
40
  autoFormatterNumber?: boolean;
40
41
  columnClass?: string;
@@ -371,7 +371,8 @@ function unrefElement(elRef) {
371
371
  return plain?.$el ?? plain;
372
372
  }
373
373
  function findActiveIndexByDirection(options) {
374
- const { data, direction, column, activeItem, rowKey, scrollTo } = options;
374
+ const { data, direction, column, activeItem, rowKey: rowKeyValue, scrollTo } = options;
375
+ const rowKey = (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(rowKeyValue);
375
376
  let currentIndex = data.findIndex((item)=>item[rowKey] === activeItem?.[rowKey]);
376
377
  const isYDirection = "ArrowUp" === direction || "ArrowDown" === direction;
377
378
  if (column) {
@@ -37,7 +37,7 @@ export declare function unrefElement<T extends MaybeElement>(elRef: MaybeRefOrGe
37
37
  export declare function findActiveIndexByDirection<T extends Record<string, any>>(options: {
38
38
  data: T[];
39
39
  activeItem?: T;
40
- rowKey: keyof T;
40
+ rowKey: keyof T | Ref<keyof T>;
41
41
  direction: string;
42
42
  containerElement?: HTMLElement;
43
43
  scrollHeight?: number;
@@ -48,7 +48,7 @@ export interface UseSelectByDirectionEventOptions<T> {
48
48
  triggerRef: MaybeElementRef;
49
49
  data: MaybeRef<T[] | undefined>;
50
50
  activeItem: MaybeRef<T | undefined>;
51
- rowKey: keyof T;
51
+ rowKey: string | Ref<string>;
52
52
  column?: number;
53
53
  rowHeight?: number;
54
54
  setCurrentItem: (item: T) => void;
package/dist/index.js CHANGED
@@ -864,8 +864,12 @@ const _hoisted_3 = {
864
864
  });
865
865
  if (res?.success) userList.value = res.data || [];
866
866
  }
867
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
867
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.componentNo, ()=>{
868
868
  fetchDbgridComponent();
869
+ }, {
870
+ immediate: true
871
+ });
872
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
869
873
  featchUserList();
870
874
  });
871
875
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)([
@@ -1140,7 +1144,7 @@ const _hoisted_3 = {
1140
1144
  const dbgrid_component_setting_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(dbgrid_component_settingvue_type_script_setup_true_lang_tsx, [
1141
1145
  [
1142
1146
  '__scopeId',
1143
- "data-v-8c01f31c"
1147
+ "data-v-1e494f3f"
1144
1148
  ]
1145
1149
  ]);
1146
1150
  /* ESM default export */ const dbgrid_component_setting = dbgrid_component_setting_exports_;
@@ -1245,7 +1249,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1245
1249
  default: void 0
1246
1250
  },
1247
1251
  componentNo: {
1248
- default: ""
1252
+ default: ''
1249
1253
  },
1250
1254
  fetchData: {
1251
1255
  type: Function,
@@ -1260,7 +1264,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1260
1264
  default: false
1261
1265
  },
1262
1266
  rowKey: {
1263
- default: "id"
1267
+ default: 'id'
1264
1268
  },
1265
1269
  loading: {
1266
1270
  type: Boolean,
@@ -1301,11 +1305,11 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1301
1305
  });
1302
1306
  const serveColumns = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
1303
1307
  const columnTypes = [
1304
- "selection",
1305
- "radio",
1306
- "index",
1307
- "expand",
1308
- "sort"
1308
+ 'selection',
1309
+ 'radio',
1310
+ 'index',
1311
+ 'expand',
1312
+ 'sort'
1309
1313
  ];
1310
1314
  const dbgridComponentSettingRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
1311
1315
  const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
@@ -1325,7 +1329,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1325
1329
  sortData.curData = item;
1326
1330
  sortData.result = data;
1327
1331
  }
1328
- if (item?.[attrs?.["tree-props"]?.children]) getDragSortData(newIndex, item?.[attrs?.["tree-props"]?.children], startIndexObj, sortData);
1332
+ if (item?.[attrs?.['tree-props']?.children]) getDragSortData(newIndex, item?.[attrs?.['tree-props']?.children], startIndexObj, sortData);
1329
1333
  });
1330
1334
  return sortData;
1331
1335
  }
@@ -1335,7 +1339,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1335
1339
  let data = [
1336
1340
  ...state.tableData
1337
1341
  ];
1338
- if (attrs?.["tree-props"]) {
1342
+ if (attrs?.['tree-props']) {
1339
1343
  let { result, curIndex: newCurIndex, curData: newCurData } = getDragSortData(newIndex, data, {
1340
1344
  startIndex: -1
1341
1345
  }, {
@@ -1351,7 +1355,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1351
1355
  curData: {}
1352
1356
  });
1353
1357
  if (newCurData.belongGroupElementId !== oldCurData.belongGroupElementId) {
1354
- __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning("暂不支持跨层级拖拽配置");
1358
+ __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('暂不支持跨层级拖拽配置');
1355
1359
  return [];
1356
1360
  }
1357
1361
  const [removedItem] = result.splice(oldCurIndex, 1);
@@ -1367,16 +1371,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1367
1371
  * 表格拖拽排序
1368
1372
  **/ const initDragSort = ()=>{
1369
1373
  const tbody = document.querySelector(`#${uuid.value} tbody`);
1370
- let initialHTML = ""; //暂不支持跨层级拖拽
1374
+ let initialHTML = ''; //暂不支持跨层级拖拽
1371
1375
  if (tbody) __WEBPACK_EXTERNAL_MODULE_sortablejs__["default"].create(tbody, {
1372
- handle: ".cursor-move",
1376
+ handle: '.cursor-move',
1373
1377
  animation: 300,
1374
1378
  onEnd (evt) {
1375
1379
  const { newIndex, oldIndex } = evt;
1376
1380
  if (newIndex === oldIndex || void 0 === newIndex || void 0 === oldIndex) return;
1377
1381
  //获取拖动后的排序
1378
1382
  let data = getSortableResult(newIndex, oldIndex);
1379
- if (data.length) emit("drag-end", data);
1383
+ if (data.length) emit('drag-end', data);
1380
1384
  else evt.from.innerHTML = initialHTML;
1381
1385
  },
1382
1386
  onStart (evt) {
@@ -1391,7 +1395,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1391
1395
  });
1392
1396
  async function fetchDbgridComponent() {
1393
1397
  let [, result] = await queryDbgridComponentByExample({
1394
- componentNo: props.componentNo || ""
1398
+ componentNo: props.componentNo || ''
1395
1399
  });
1396
1400
  if (result?.success) try {
1397
1401
  let column = result.data.dbgridSettingValue && JSON.parse(result.data.dbgridSettingValue) || [];
@@ -1400,12 +1404,16 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1400
1404
  console.log(error);
1401
1405
  }
1402
1406
  }
1407
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)(()=>props.componentNo, ()=>{
1408
+ if (props.componentNo) fetchDbgridComponent();
1409
+ }, {
1410
+ immediate: true
1411
+ });
1403
1412
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.onMounted)(()=>{
1404
1413
  // 支持拖拽排序
1405
1414
  if (props.draggable) (0, __WEBPACK_EXTERNAL_MODULE_vue__.nextTick)(()=>{
1406
1415
  initDragSort();
1407
1416
  });
1408
- if (props.componentNo) fetchDbgridComponent();
1409
1417
  if (props.pagination && props?.fetchData) fetchList();
1410
1418
  });
1411
1419
  /**
@@ -1424,7 +1432,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1424
1432
  state.pageInfo.pageNumber = 1;
1425
1433
  state.pageInfo.pageSize = val;
1426
1434
  fetchList();
1427
- } else emit("size-page-change", val);
1435
+ } else emit('size-page-change', val);
1428
1436
  };
1429
1437
  /**
1430
1438
  * 分页组件改变 当前页数 事件
@@ -1432,7 +1440,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1432
1440
  if (props.fetchData) {
1433
1441
  state.pageInfo.pageNumber = val;
1434
1442
  fetchList();
1435
- } else emit("current-page-change", val);
1443
+ } else emit('current-page-change', val);
1436
1444
  }
1437
1445
  // 超级表格 ref
1438
1446
  const proTableRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
@@ -1449,7 +1457,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1449
1457
  if (Object.keys(props.filterObj).length) return [
1450
1458
  ...state.tableData
1451
1459
  ].filter((item)=>Object.keys(props.filterObj).every((cur)=>!props.filterObj[cur] && [
1452
- "",
1460
+ '',
1453
1461
  void 0,
1454
1462
  null
1455
1463
  ].includes(props.filterObj[cur]) || item[cur] === props.filterObj[cur]));
@@ -1496,7 +1504,7 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1496
1504
  if (!props.componentNo) return props.columns;
1497
1505
  {
1498
1506
  if (!serveColumns.value?.length) return props.columns.map((cur)=>({
1499
- displayFlag: cur.isHidden ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
1507
+ displayFlag: cur.isHidden || cur.defaultDisplayFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO ? __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.NO : __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG.YES,
1500
1508
  ...cur
1501
1509
  }));
1502
1510
  let curColumns = [
@@ -1551,7 +1559,13 @@ const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
1551
1559
  border: ""
1552
1560
  }, _ctx.$attrs), {
1553
1561
  default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
1554
- ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableColumns.value.filter((item)=>!item.isHidden), (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
1562
+ ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(tableColumns.value.filter((item)=>{
1563
+ /**
1564
+ * defaultDisplayFlag: 默认显示标识,0:不显示,1:显示
1565
+ * serveColumns :服务端返回的列配置
1566
+ */ if (props.componentNo && !serveColumns.value.length && item.defaultDisplayFlag === (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.ENABLED_FLAG).NO) return false;
1567
+ return !item.isHidden;
1568
+ }), (item, index)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
1555
1569
  item.type && columnTypes.includes(item.type) ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElTableColumn), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
1556
1570
  key: 0,
1557
1571
  ref_for: true
@@ -2029,7 +2043,8 @@ function unrefElement(elRef) {
2029
2043
  return plain?.$el ?? plain;
2030
2044
  }
2031
2045
  function findActiveIndexByDirection(options) {
2032
- const { data, direction, column, activeItem, rowKey, scrollTo } = options;
2046
+ const { data, direction, column, activeItem, rowKey: rowKeyValue, scrollTo } = options;
2047
+ const rowKey = (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(rowKeyValue);
2033
2048
  let currentIndex = data.findIndex((item)=>item[rowKey] === activeItem?.[rowKey]);
2034
2049
  const isYDirection = "ArrowUp" === direction || "ArrowDown" === direction;
2035
2050
  if (column) {
@@ -2129,15 +2144,14 @@ function useColumnConfig(options) {
2129
2144
  label: item.title,
2130
2145
  prop: item.dataIndex
2131
2146
  })));
2132
- const patientList = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>__props.accessResult.data);
2133
2147
  const setCurrentRow = (row)=>{
2134
2148
  currentRow.value = row;
2135
2149
  tableRef.value?.setCurrentRow(row);
2136
2150
  };
2137
2151
  /** 监听键盘方向事件 支持方向盘上下切换table 目标行 */ use_direction_select({
2138
2152
  triggerRef: inputRef,
2139
- rowKey: 'patientId',
2140
- data: patientList,
2153
+ rowKey: (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.accessResult.primaryKey),
2154
+ data: (0, __WEBPACK_EXTERNAL_MODULE_vue__.toRef)(()=>__props.accessResult.data),
2141
2155
  activeItem: currentRow,
2142
2156
  setCurrentItem: setCurrentRow,
2143
2157
  scrollTo: (params)=>{
@@ -2231,7 +2245,7 @@ function useColumnConfig(options) {
2231
2245
  ref: tableRef,
2232
2246
  loading: _ctx.searchLoading,
2233
2247
  columns: columns.value,
2234
- data: patientList.value,
2248
+ data: _ctx.accessResult.data,
2235
2249
  "row-key": _ctx.accessResult.primaryKey,
2236
2250
  "highlight-current-row": "",
2237
2251
  "max-height": "480px",
@@ -2492,6 +2506,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
2492
2506
  emits('change', {
2493
2507
  inputInfo: {
2494
2508
  value: inputValue.value,
2509
+ primaryKey: accessResult.value.primaryKey,
2495
2510
  searchTypeCode: activeAccessWay.value.searchTypeCode,
2496
2511
  indexTypeCode: activeAccessWay.value.indexTypeCode,
2497
2512
  triggerTypeCode: activeAccessWay.value.triggerTypeCode
@@ -2527,7 +2542,7 @@ const patient_accessvue_type_script_setup_true_lang_ts_hoisted_1 = {
2527
2542
  } else if (cardInfo?.indexNo || activeAccessWay.value?.indexTypeCode) handleChange({
2528
2543
  cardInfo
2529
2544
  });
2530
- else __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('未检索到患者信息');
2545
+ else __WEBPACK_EXTERNAL_MODULE_element_sun__.ElMessage.warning('未检索到数据');
2531
2546
  };
2532
2547
  /** 触发患者检索 */ const triggerSearchAccess = async (data, cardInfo)=>{
2533
2548
  searchLoading.value = true;
@@ -3424,7 +3439,7 @@ function getExtraProps(item, dataValueNames, modelValue) {
3424
3439
  width: '100%'
3425
3440
  },
3426
3441
  filterable: true,
3427
- maxlength: item.maxLength,
3442
+ maxLength: item.maxLength,
3428
3443
  'automatic-dropdown': item.focusAutoDropDownFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
3429
3444
  disabled: item.disabledFlag === __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__.FLAG.YES,
3430
3445
  codeSystemNo: item.codeSystemNo,
@@ -3512,6 +3527,8 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
3512
3527
  }
3513
3528
  /**
3514
3529
  * 传入地址类似的值 ,拼接
3530
+ * 如果接口返回了这个字段。 展示接口返回对应的vaule
3531
+ * 没有的话则展示默认值
3515
3532
  * @param data
3516
3533
  * @param key
3517
3534
  * @returns
@@ -3521,95 +3538,14 @@ function useGetFromConfigData(result, layoutTypeCode, parentFormCtlNo, afterValu
3521
3538
  return key.split(COMMA).reduce((pre, cur)=>{
3522
3539
  if (data[cur]) return `${pre}${pre ? COMMA : ''}${data[cur]}`;
3523
3540
  return pre;
3524
- }, '') || void 0;
3541
+ }, '');
3525
3542
  }
3526
3543
  if ((key || '').startsWith(GROUP)) {
3527
3544
  const list = key.split(SEPARATOR);
3528
3545
  return (data[list[1]] || {})[list[2]];
3529
3546
  }
3530
- return data[key] || void 0;
3547
+ return data[key];
3531
3548
  }
3532
- /* ESM default export */ const Collapsevue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
3533
- __name: 'Collapse',
3534
- props: {
3535
- designDetailInfo: {},
3536
- layoutTypeCode: {},
3537
- dataValueNames: {}
3538
- },
3539
- setup (__props, { expose: __expose }) {
3540
- const props = __props;
3541
- const modelValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({});
3542
- const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
3543
- const formData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
3544
- const hideData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({});
3545
- const afterValueChange = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('afterValueChange');
3546
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)([
3547
- ()=>props.designDetailInfo.subFormControlList,
3548
- ()=>props.dataValueNames
3549
- ], ()=>{
3550
- const { result: initList, hideData } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
3551
- hideData.value = hideData; /**
3552
- * 初次渲染
3553
- */
3554
- const initData = useGetFromConfigData(initList, props.layoutTypeCode, props.designDetailInfo.formCtlNo, afterValueChange);
3555
- formData.value = initData.map((item, index)=>({
3556
- ...item,
3557
- labelWidth: 110,
3558
- extraProps: getExtraProps(initList[index] || {}, props.dataValueNames, modelValue.value)
3559
- }));
3560
- }, {
3561
- immediate: true,
3562
- deep: true
3563
- });
3564
- __expose({
3565
- submit: async ()=>{
3566
- let result = await formRef.value?.ref.validate();
3567
- if (result) return utils_integrateData({
3568
- ...modelValue.value,
3569
- ...hideData.value
3570
- });
3571
- },
3572
- setModelValue: (val)=>{
3573
- modelValue.value = val;
3574
- },
3575
- resetFields: ()=>{
3576
- formRef.value?.ref.resetFields();
3577
- },
3578
- getCurrentValue: ()=>modelValue.value
3579
- });
3580
- return (_ctx, _cache)=>{
3581
- const _component_Title = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("Title");
3582
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
3583
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_Title, {
3584
- class: "mb-4",
3585
- title: props.designDetailInfo.labelName
3586
- }, null, 8, [
3587
- "title"
3588
- ]),
3589
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_form), {
3590
- ref_key: "formRef",
3591
- ref: formRef,
3592
- modelValue: modelValue.value,
3593
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>modelValue.value = $event),
3594
- class: "ml-4 mr-4",
3595
- column: props.layoutTypeCode,
3596
- data: formData.value
3597
- }, null, 8, [
3598
- "modelValue",
3599
- "column",
3600
- "data"
3601
- ])
3602
- ], 64);
3603
- };
3604
- }
3605
- });
3606
- const Collapse_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Collapsevue_type_script_setup_true_lang_tsx, [
3607
- [
3608
- '__scopeId',
3609
- "data-v-850b3202"
3610
- ]
3611
- ]);
3612
- /* ESM default export */ const Collapse = Collapse_exports_;
3613
3549
  // import { translation } from "@sun-core/micro-app";
3614
3550
  /**
3615
3551
  * 通用的调用壳子的请求封装方法
@@ -4232,6 +4168,87 @@ const createPrint = (params)=>{
4232
4168
  const print_component_print = async (options)=>{
4233
4169
  createPrint(options);
4234
4170
  };
4171
+ /* ESM default export */ const Collapsevue_type_script_setup_true_lang_tsx = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
4172
+ __name: 'Collapse',
4173
+ props: {
4174
+ designDetailInfo: {},
4175
+ layoutTypeCode: {},
4176
+ dataValueNames: {}
4177
+ },
4178
+ setup (__props, { expose: __expose }) {
4179
+ const props = __props;
4180
+ const modelValue = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({});
4181
+ const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4182
+ const formData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)([]);
4183
+ const hideData = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({});
4184
+ const afterValueChange = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('afterValueChange');
4185
+ const disabled = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('disabled');
4186
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.watch)([
4187
+ ()=>props.designDetailInfo.subFormControlList,
4188
+ ()=>props.dataValueNames
4189
+ ], ()=>{
4190
+ const { result: initList, hideData: hideObj } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
4191
+ hideData.value = hideObj; /**
4192
+ * 初次渲染
4193
+ */
4194
+ const initData = useGetFromConfigData(initList, props.layoutTypeCode, props.designDetailInfo.formCtlNo, afterValueChange);
4195
+ formData.value = initData.map((item, index)=>({
4196
+ ...item,
4197
+ labelWidth: 110,
4198
+ extraProps: getExtraProps(initList[index] || {}, props.dataValueNames, modelValue.value)
4199
+ }));
4200
+ }, {
4201
+ immediate: true,
4202
+ deep: true
4203
+ });
4204
+ __expose({
4205
+ submit: async ()=>{
4206
+ let result = await formRef.value?.ref.validate();
4207
+ if (result) return utils_integrateData({
4208
+ ...modelValue.value,
4209
+ ...hideData.value
4210
+ });
4211
+ },
4212
+ setModelValue: (val)=>{
4213
+ modelValue.value = val;
4214
+ },
4215
+ resetFields: ()=>{
4216
+ formRef.value?.ref.resetFields();
4217
+ },
4218
+ getCurrentValue: ()=>modelValue.value
4219
+ });
4220
+ return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
4221
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(Title), {
4222
+ class: "mb-4",
4223
+ title: props.designDetailInfo.labelName
4224
+ }, null, 8, [
4225
+ "title"
4226
+ ]),
4227
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(pro_form), {
4228
+ ref_key: "formRef",
4229
+ ref: formRef,
4230
+ modelValue: modelValue.value,
4231
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>modelValue.value = $event),
4232
+ class: "ml-4 mr-4",
4233
+ disabled: (0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(disabled),
4234
+ column: props.layoutTypeCode,
4235
+ data: formData.value
4236
+ }, null, 8, [
4237
+ "modelValue",
4238
+ "disabled",
4239
+ "column",
4240
+ "data"
4241
+ ])
4242
+ ], 64));
4243
+ }
4244
+ });
4245
+ const Collapse_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Collapsevue_type_script_setup_true_lang_tsx, [
4246
+ [
4247
+ '__scopeId',
4248
+ "data-v-39478274"
4249
+ ]
4250
+ ]);
4251
+ /* ESM default export */ const Collapse = Collapse_exports_;
4235
4252
  const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
4236
4253
  class: "mb-4 mt-4"
4237
4254
  };
@@ -4266,17 +4283,20 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
4266
4283
  trigger: 'change'
4267
4284
  }
4268
4285
  ],
4269
- render: (row)=>(0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(FormUnit, {
4270
- disabled: disabled,
4286
+ render: (row)=>{
4287
+ const extraProps = getExtraProps(item, props.dataValueNames, row);
4288
+ return (0, __WEBPACK_EXTERNAL_MODULE_vue__.h)(FormUnit, {
4271
4289
  component: getComponentType(item),
4272
4290
  label: item.labelNameDisplay || item.labelName,
4273
4291
  placeholder: getPlaceholder(item),
4274
- ...getExtraProps(item, props.dataValueNames, row),
4292
+ ...extraProps,
4275
4293
  modelValue: row[item.bindingFieldNo],
4276
4294
  'onUpdate:modelValue': (value)=>{
4277
4295
  row[item.bindingFieldNo] = value;
4278
- }
4279
- })
4296
+ },
4297
+ disabled: extraProps.disabled || disabled
4298
+ });
4299
+ }
4280
4300
  }));
4281
4301
  }
4282
4302
  const tableColumn = useGetTableColumnData();
@@ -4353,7 +4373,7 @@ const Tablevue_type_script_setup_true_lang_tsx_hoisted_1 = {
4353
4373
  const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_script_setup_true_lang_tsx, [
4354
4374
  [
4355
4375
  '__scopeId',
4356
- "data-v-d25acd4c"
4376
+ "data-v-7c43a384"
4357
4377
  ]
4358
4378
  ]);
4359
4379
  /* ESM default export */ const Table = Table_exports_;
@@ -4376,8 +4396,8 @@ const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_
4376
4396
  ()=>props.designDetailInfo.subFormControlList,
4377
4397
  ()=>props.dataValueNames
4378
4398
  ], ()=>{
4379
- const { result: initList, hideData } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
4380
- hideData.value = hideData; /**
4399
+ const { result: initList, hideData: hideObj } = expansionGroup(props.designDetailInfo.subFormControlList || [], []);
4400
+ hideData.value = hideObj; /**
4381
4401
  * 初次渲染
4382
4402
  */
4383
4403
  const initData = useGetFromConfigData(initList, props.layoutTypeCode, props.designDetailInfo.formCtlNo, afterValueChange);
@@ -4395,7 +4415,7 @@ const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_
4395
4415
  let result = await formRef.value?.ref.validate();
4396
4416
  if (result) return {
4397
4417
  [props.designDetailInfo.bindingFieldNo]: utils_integrateData({
4398
- ...hideData,
4418
+ ...hideData.value,
4399
4419
  ...modelValue.value
4400
4420
  }),
4401
4421
  bindingFieldNo: props.designDetailInfo.bindingFieldNo,
@@ -4412,10 +4432,8 @@ const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_
4412
4432
  [props.designDetailInfo.formCtlNo]: modelValue.value
4413
4433
  })
4414
4434
  });
4415
- return (_ctx, _cache)=>{
4416
- const _component_Title = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("Title");
4417
- return (0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
4418
- (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_Title, {
4435
+ return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, [
4436
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(Title), {
4419
4437
  class: "mb-4",
4420
4438
  title: props.designDetailInfo.labelName
4421
4439
  }, null, 8, [
@@ -4436,14 +4454,13 @@ const Table_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Tablevue_type_
4436
4454
  "column",
4437
4455
  "data"
4438
4456
  ])
4439
- ], 64);
4440
- };
4457
+ ], 64));
4441
4458
  }
4442
4459
  });
4443
4460
  const Set_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Setvue_type_script_setup_true_lang_tsx_name_Set, [
4444
4461
  [
4445
4462
  '__scopeId',
4446
- "data-v-43fea02a"
4463
+ "data-v-2b1a8223"
4447
4464
  ]
4448
4465
  ]);
4449
4466
  /* ESM default export */ const Set = Set_exports_;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sun-biz",
3
- "version": "0.0.2-beta.10",
3
+ "version": "0.0.2-beta.12",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {