@gct-paas/word 0.2.5-beta.2 → 0.2.5-beta.3
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/dist/domain/active/active-types.d.ts +1 -1
- package/dist/domain/table/business/material/material-requisition/profile/field-keys.d.ts +1 -1
- package/dist/domain/table/design/ribbon-options.d.ts +2 -0
- package/dist/domain/table/types.d.ts +1 -1
- package/dist/index.es.js +58 -15
- package/dist/runtime/designer/ribbon/hooks/useDhrEdition.d.ts +7 -0
- package/dist/word.css +14 -14
- package/package.json +1 -1
|
@@ -7,6 +7,8 @@ export interface RibbonTableOptionsParams {
|
|
|
7
7
|
suiteKey?: string;
|
|
8
8
|
/** 套件级需从 Ribbon 隐藏的业务表类型 */
|
|
9
9
|
hiddenBusinessTableTypes?: BusinessSubTableType[];
|
|
10
|
+
/** 是否可使用仅向 eDHR Max / Ultra 开放的业务表 */
|
|
11
|
+
canUseMaxEditionTables?: boolean;
|
|
10
12
|
}
|
|
11
13
|
/** 生成 Ribbon「数据表」「业务表」下拉选项 */
|
|
12
14
|
export declare function getRibbonTableOptions(params?: RibbonTableOptionsParams): {
|
|
@@ -21,7 +21,7 @@ export type DataTableType = 'dynamic-table' | 'fixed-table' | 'two-d-table';
|
|
|
21
21
|
* @property warehouse-allocate - 库存调拨表
|
|
22
22
|
* @property material-consume - 物料消耗表
|
|
23
23
|
* @property material-balance - 物料平衡表
|
|
24
|
-
* @property material-requisition -
|
|
24
|
+
* @property material-requisition - 产线收料表
|
|
25
25
|
* @property material-substitution - 物料替换表
|
|
26
26
|
* @property point-inspection - 设备点检表(固定表业务模型)
|
|
27
27
|
* @property maintenance - 设备保养表(固定表业务模型)
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @gct-paas/word v0.2.5-beta.
|
|
1
|
+
/*! @gct-paas/word v0.2.5-beta.3 */
|
|
2
2
|
import { Fragment, Suspense, Teleport, Transition, TransitionGroup, cloneVNode, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, h, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, render, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toHandlers, toRaw, toRef, toValue, unref, useAttrs, useCssVars, useModel, useSlots, vModelRadio, vModelSelect, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
3
3
|
import Rt, { PopperWrapper } from "floating-vue";
|
|
4
4
|
import VueKonva from "vue-konva";
|
|
@@ -106074,7 +106074,7 @@ var init_profile$6 = __esmMin((() => {
|
|
|
106074
106074
|
TABLE_TYPE$5 = "material-requisition";
|
|
106075
106075
|
profile$6 = {
|
|
106076
106076
|
type: TABLE_TYPE$5,
|
|
106077
|
-
label: "
|
|
106077
|
+
label: "产线收料表",
|
|
106078
106078
|
category: "business",
|
|
106079
106079
|
ribbonAction: "material-requisition",
|
|
106080
106080
|
ribbonGroup: "生产",
|
|
@@ -115847,6 +115847,7 @@ function isRibbonVisibleForSuite(profile, suiteKey) {
|
|
|
115847
115847
|
/** 生成 Ribbon「数据表」「业务表」下拉选项 */
|
|
115848
115848
|
function getRibbonTableOptions(params = {}) {
|
|
115849
115849
|
const hidden = new Set(params.hiddenBusinessTableTypes ?? []);
|
|
115850
|
+
if (params.suiteKey === "edhr" && !params.canUseMaxEditionTables) MAX_EDITION_TABLE_TYPES.forEach((type) => hidden.add(type));
|
|
115850
115851
|
const dataTables = [TABLE_HEADER_RIBBON_OPTION, ...getProfilesByCategory("data").map((profile) => ({
|
|
115851
115852
|
value: profile.ribbonAction,
|
|
115852
115853
|
label: profile.label,
|
|
@@ -115867,7 +115868,7 @@ function getRibbonTableOptions(params = {}) {
|
|
|
115867
115868
|
businessTables
|
|
115868
115869
|
};
|
|
115869
115870
|
}
|
|
115870
|
-
var TABLE_HEADER_RIBBON_OPTION, BUSINESS_RIBBON_GROUPS;
|
|
115871
|
+
var TABLE_HEADER_RIBBON_OPTION, BUSINESS_RIBBON_GROUPS, MAX_EDITION_TABLE_TYPES;
|
|
115871
115872
|
var init_ribbon_options = __esmMin((() => {
|
|
115872
115873
|
init_registry$5();
|
|
115873
115874
|
init_types$5();
|
|
@@ -115921,6 +115922,14 @@ var init_ribbon_options = __esmMin((() => {
|
|
|
115921
115922
|
tableTypes: ["pretreatment-list"]
|
|
115922
115923
|
}
|
|
115923
115924
|
];
|
|
115925
|
+
MAX_EDITION_TABLE_TYPES = /* @__PURE__ */ new Set([
|
|
115926
|
+
"warehouse-in",
|
|
115927
|
+
"warehouse-out",
|
|
115928
|
+
"warehouse-inventory",
|
|
115929
|
+
"warehouse-allocate",
|
|
115930
|
+
"material-balance",
|
|
115931
|
+
"material-requisition"
|
|
115932
|
+
]);
|
|
115924
115933
|
}));
|
|
115925
115934
|
//#endregion
|
|
115926
115935
|
//#region src/domain/table/design/theme/region-item-theme.ts
|
|
@@ -153547,6 +153556,35 @@ var table_svg_icon_vue_vue_type_script_setup_true_name_table_svg_icon_lang_defau
|
|
|
153547
153556
|
init__plugin_vue_export_helper();
|
|
153548
153557
|
var table_svg_icon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(table_svg_icon_vue_vue_type_script_setup_true_name_table_svg_icon_lang_default, [["__scopeId", "data-v-04d24776"]]);
|
|
153549
153558
|
//#endregion
|
|
153559
|
+
//#region src/runtime/designer/ribbon/hooks/useDhrEdition.ts
|
|
153560
|
+
var DHR_LICENSE_API = "/gct-apaas/api/dhr/license/module";
|
|
153561
|
+
var AVAILABLE_EDITIONS = ["eDHR Max", "eDHR Ultra"];
|
|
153562
|
+
var dhrEditionRequest;
|
|
153563
|
+
function requestDhrEditions() {
|
|
153564
|
+
dhrEditionRequest ??= HttpUtil.get(DHR_LICENSE_API).catch((error) => {
|
|
153565
|
+
dhrEditionRequest = void 0;
|
|
153566
|
+
throw error;
|
|
153567
|
+
});
|
|
153568
|
+
return dhrEditionRequest;
|
|
153569
|
+
}
|
|
153570
|
+
/**
|
|
153571
|
+
* Word 设计器加载 DHR 版本授权;非 eDHR 套件不请求,加载失败时按无授权处理。
|
|
153572
|
+
*/
|
|
153573
|
+
function useDhrEdition(suiteKey) {
|
|
153574
|
+
const canUseMaxEditionTables = ref(false);
|
|
153575
|
+
async function loadDhrEdition() {
|
|
153576
|
+
if (suiteKey !== "edhr") return;
|
|
153577
|
+
try {
|
|
153578
|
+
const modules = await requestDhrEditions();
|
|
153579
|
+
canUseMaxEditionTables.value = Array.isArray(modules) && modules.some((edition) => typeof edition === "string" && AVAILABLE_EDITIONS.includes(edition));
|
|
153580
|
+
} catch (error) {
|
|
153581
|
+
console.warn("[Word DHR license] Failed to load editions", error);
|
|
153582
|
+
}
|
|
153583
|
+
}
|
|
153584
|
+
loadDhrEdition();
|
|
153585
|
+
return { canUseMaxEditionTables };
|
|
153586
|
+
}
|
|
153587
|
+
//#endregion
|
|
153550
153588
|
//#region src/runtime/designer/ribbon/components/table-ribbon-group.vue?vue&type=script&setup=true&name=table-ribbon-group&lang.ts
|
|
153551
153589
|
init_base$2();
|
|
153552
153590
|
init_core();
|
|
@@ -153576,18 +153614,20 @@ var table_ribbon_group_vue_vue_type_script_setup_true_name_table_ribbon_group_la
|
|
|
153576
153614
|
});
|
|
153577
153615
|
const { fields } = useModelData(toRef(docInst.value, "mainModelKey"));
|
|
153578
153616
|
const suiteFeatures = getSuiteFeatures(designCtx.suiteKey);
|
|
153579
|
-
const
|
|
153617
|
+
const { canUseMaxEditionTables } = useDhrEdition(designCtx.suiteKey);
|
|
153618
|
+
const ribbonOptions = computed(() => getRibbonTableOptions({
|
|
153580
153619
|
suiteKey: designCtx.suiteKey,
|
|
153581
|
-
hiddenBusinessTableTypes: suiteFeatures.hiddenBusinessTableTypes
|
|
153582
|
-
|
|
153583
|
-
|
|
153584
|
-
const
|
|
153620
|
+
hiddenBusinessTableTypes: suiteFeatures.hiddenBusinessTableTypes,
|
|
153621
|
+
canUseMaxEditionTables: canUseMaxEditionTables.value
|
|
153622
|
+
}));
|
|
153623
|
+
const dataTableOptions = computed(() => ribbonOptions.value.dataTables);
|
|
153624
|
+
const businessTableOptions = computed(() => ribbonOptions.value.businessTables);
|
|
153585
153625
|
const subTableRibbonActions = computed(() => {
|
|
153586
153626
|
const actions = /* @__PURE__ */ new Set();
|
|
153587
|
-
ribbonOptions.dataTables.forEach((item) => {
|
|
153627
|
+
ribbonOptions.value.dataTables.forEach((item) => {
|
|
153588
153628
|
if (item.value !== TABLE_HEADER_RIBBON_OPTION.value) actions.add(String(item.value));
|
|
153589
153629
|
});
|
|
153590
|
-
ribbonOptions.businessTables.forEach((group) => {
|
|
153630
|
+
ribbonOptions.value.businessTables.forEach((group) => {
|
|
153591
153631
|
group.options.forEach((item) => actions.add(String(item.value)));
|
|
153592
153632
|
});
|
|
153593
153633
|
return actions;
|
|
@@ -153745,7 +153785,7 @@ var table_ribbon_group_vue_vue_type_script_setup_true_name_table_ribbon_group_la
|
|
|
153745
153785
|
createVNode(unref(dropdown_basic_select_default), {
|
|
153746
153786
|
class: "gct-dropdown-basic-select--icon",
|
|
153747
153787
|
tooltip: "数据表",
|
|
153748
|
-
options:
|
|
153788
|
+
options: dataTableOptions.value,
|
|
153749
153789
|
popperWidth: 142,
|
|
153750
153790
|
"show-check": false,
|
|
153751
153791
|
onChange: handleTableTypeChange
|
|
@@ -153761,11 +153801,11 @@ var table_ribbon_group_vue_vue_type_script_setup_true_name_table_ribbon_group_la
|
|
|
153761
153801
|
}, null, 8, ["name"])])]),
|
|
153762
153802
|
_: 1
|
|
153763
153803
|
}, 8, ["options"]),
|
|
153764
|
-
|
|
153804
|
+
businessTableOptions.value.length ? (openBlock(), createBlock(unref(dropdown_basic_select_default), {
|
|
153765
153805
|
key: 0,
|
|
153766
153806
|
class: "gct-dropdown-basic-select--icon",
|
|
153767
153807
|
tooltip: "业务表",
|
|
153768
|
-
options:
|
|
153808
|
+
options: businessTableOptions.value,
|
|
153769
153809
|
grouped: "",
|
|
153770
153810
|
"list-max-height": 500,
|
|
153771
153811
|
popperWidth: 186,
|
|
@@ -153791,7 +153831,7 @@ var table_ribbon_group_vue_vue_type_script_setup_true_name_table_ribbon_group_la
|
|
|
153791
153831
|
//#endregion
|
|
153792
153832
|
//#region src/runtime/designer/ribbon/components/table-ribbon-group.vue
|
|
153793
153833
|
init__plugin_vue_export_helper();
|
|
153794
|
-
var table_ribbon_group_default = /*#__PURE__*/ _plugin_vue_export_helper_default(table_ribbon_group_vue_vue_type_script_setup_true_name_table_ribbon_group_lang_default, [["__scopeId", "data-v-
|
|
153834
|
+
var table_ribbon_group_default = /*#__PURE__*/ _plugin_vue_export_helper_default(table_ribbon_group_vue_vue_type_script_setup_true_name_table_ribbon_group_lang_default, [["__scopeId", "data-v-cfeccfcd"]]);
|
|
153795
153835
|
//#endregion
|
|
153796
153836
|
//#region src/runtime/designer/ribbon/constant/font.ts
|
|
153797
153837
|
/** 字重 */
|
|
@@ -168255,6 +168295,7 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
168255
168295
|
const props = __props;
|
|
168256
168296
|
const emit = __emit;
|
|
168257
168297
|
const { docInst } = useDocPubApiContext();
|
|
168298
|
+
const { canUseMaxEditionTables } = useDhrEdition(useDesignSuiteContext().suiteKey);
|
|
168258
168299
|
const modelKey = toRef(docInst.value, "mainModelKey");
|
|
168259
168300
|
const { fields } = useModelData(modelKey);
|
|
168260
168301
|
const isLineSideInventory = computed(() => {
|
|
@@ -168337,6 +168378,7 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
168337
168378
|
allFields,
|
|
168338
168379
|
objectFields: objectFields.filter((f) => !filledObjectFieldKeys.value.includes(f.key)),
|
|
168339
168380
|
RenderFieldWrapper,
|
|
168381
|
+
showMaterialStrategy: canUseMaxEditionTables.value,
|
|
168340
168382
|
showConsumePolicy: shouldShowConsumePolicy()
|
|
168341
168383
|
}, { title: "配置" }).then(({ success, result }) => {
|
|
168342
168384
|
if (!success || !result) return;
|
|
@@ -168353,6 +168395,7 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
168353
168395
|
...baseParam.value,
|
|
168354
168396
|
editingItem: obj,
|
|
168355
168397
|
RenderFieldWrapper,
|
|
168398
|
+
showMaterialStrategy: canUseMaxEditionTables.value,
|
|
168356
168399
|
showConsumePolicy: shouldShowConsumePolicy(obj),
|
|
168357
168400
|
openFormulaEditor: (_window$NocodeAdapter = window.NocodeAdapter) === null || _window$NocodeAdapter === void 0 || (_window$NocodeAdapter = _window$NocodeAdapter.utils) === null || _window$NocodeAdapter === void 0 ? void 0 : _window$NocodeAdapter.openFormulaEditor
|
|
168358
168401
|
}, { title: "配置" }).then(({ success, result }) => {
|
|
@@ -168401,7 +168444,7 @@ var object_init_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
168401
168444
|
//#endregion
|
|
168402
168445
|
//#region src/suites/edhr/panel-schema/data-init/object-init/object-init.vue
|
|
168403
168446
|
init__plugin_vue_export_helper();
|
|
168404
|
-
var object_init_default = /*#__PURE__*/ _plugin_vue_export_helper_default(object_init_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
168447
|
+
var object_init_default = /*#__PURE__*/ _plugin_vue_export_helper_default(object_init_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-976ce87b"]]);
|
|
168405
168448
|
//#endregion
|
|
168406
168449
|
//#region src/suites/edhr/panel-schema/data-init/DataInitPanel.vue?vue&type=script&setup=true&name=panel-data-init&lang.ts
|
|
168407
168450
|
init_core$1();
|
package/dist/word.css
CHANGED
|
@@ -10747,13 +10747,13 @@ to {
|
|
|
10747
10747
|
vertical-align: middle;
|
|
10748
10748
|
flex-shrink: 0;
|
|
10749
10749
|
}
|
|
10750
|
-
.ribbon-tab-item[data-v-
|
|
10750
|
+
.ribbon-tab-item[data-v-cfeccfcd] {
|
|
10751
10751
|
display: inline-flex;
|
|
10752
10752
|
flex-shrink: 0;
|
|
10753
10753
|
align-items: center;
|
|
10754
10754
|
gap: 6px;
|
|
10755
10755
|
}
|
|
10756
|
-
.split-divider[data-v-
|
|
10756
|
+
.split-divider[data-v-cfeccfcd] {
|
|
10757
10757
|
display: inline-block;
|
|
10758
10758
|
flex-shrink: 0;
|
|
10759
10759
|
width: 1px;
|
|
@@ -10761,7 +10761,7 @@ to {
|
|
|
10761
10761
|
margin: 0 6px;
|
|
10762
10762
|
background-color: rgba(13, 13, 13, 0.12);
|
|
10763
10763
|
}
|
|
10764
|
-
.option-svg-icon[data-v-
|
|
10764
|
+
.option-svg-icon[data-v-cfeccfcd] {
|
|
10765
10765
|
display: inline-flex;
|
|
10766
10766
|
flex-shrink: 0;
|
|
10767
10767
|
width: 16px;
|
|
@@ -12751,35 +12751,35 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
12751
12751
|
cursor: pointer;
|
|
12752
12752
|
color: #797a7d;
|
|
12753
12753
|
}
|
|
12754
|
-
.object-item[data-v-
|
|
12754
|
+
.object-item[data-v-976ce87b] {
|
|
12755
12755
|
margin-bottom: 16px;
|
|
12756
12756
|
padding: 12px;
|
|
12757
12757
|
border: 1px dashed #e4e4e4;
|
|
12758
12758
|
border-radius: 8px;
|
|
12759
12759
|
background: #f6f8fa;
|
|
12760
12760
|
}
|
|
12761
|
-
.object-item.is-filled[data-v-
|
|
12761
|
+
.object-item.is-filled[data-v-976ce87b] {
|
|
12762
12762
|
border-color: #a7cae6;
|
|
12763
12763
|
background: #ecf3fc;
|
|
12764
12764
|
}
|
|
12765
|
-
.object-item .item-info[data-v-
|
|
12765
|
+
.object-item .item-info[data-v-976ce87b] {
|
|
12766
12766
|
display: flex;
|
|
12767
12767
|
}
|
|
12768
|
-
.object-item .item-info .info-text[data-v-
|
|
12768
|
+
.object-item .item-info .info-text[data-v-976ce87b] {
|
|
12769
12769
|
flex-grow: 1;
|
|
12770
12770
|
margin-right: 8px;
|
|
12771
12771
|
overflow: hidden;
|
|
12772
12772
|
}
|
|
12773
|
-
.object-item .item-info .info-text .text-row[data-v-
|
|
12773
|
+
.object-item .item-info .info-text .text-row[data-v-976ce87b] {
|
|
12774
12774
|
margin-bottom: 4px;
|
|
12775
12775
|
overflow: hidden;
|
|
12776
12776
|
text-overflow: ellipsis;
|
|
12777
12777
|
white-space: nowrap;
|
|
12778
12778
|
}
|
|
12779
|
-
.object-item .item-info .info-text .text-row .row-label[data-v-
|
|
12779
|
+
.object-item .item-info .info-text .text-row .row-label[data-v-976ce87b] {
|
|
12780
12780
|
color: #76777e;
|
|
12781
12781
|
}
|
|
12782
|
-
.object-item .item-info .info-button[data-v-
|
|
12782
|
+
.object-item .item-info .info-button[data-v-976ce87b] {
|
|
12783
12783
|
display: flex;
|
|
12784
12784
|
flex-shrink: 0;
|
|
12785
12785
|
align-items: center;
|
|
@@ -12789,16 +12789,16 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
12789
12789
|
border-radius: 4px;
|
|
12790
12790
|
cursor: pointer;
|
|
12791
12791
|
}
|
|
12792
|
-
.object-item .item-info .info-button[data-v-
|
|
12792
|
+
.object-item .item-info .info-button[data-v-976ce87b]:hover {
|
|
12793
12793
|
background: #fff;
|
|
12794
12794
|
}
|
|
12795
|
-
.object-item .item-info .info-button:hover .gct-icon[data-v-
|
|
12795
|
+
.object-item .item-info .info-button:hover .gct-icon[data-v-976ce87b] {
|
|
12796
12796
|
color: #1c1e20;
|
|
12797
12797
|
}
|
|
12798
|
-
.object-item .item-info .info-button .gct-icon[data-v-
|
|
12798
|
+
.object-item .item-info .info-button .gct-icon[data-v-976ce87b] {
|
|
12799
12799
|
color: #a4aaaf;
|
|
12800
12800
|
}
|
|
12801
|
-
.object-item .item-button[data-v-
|
|
12801
|
+
.object-item .item-button[data-v-976ce87b] {
|
|
12802
12802
|
margin-top: 8px;
|
|
12803
12803
|
}
|
|
12804
12804
|
.panel-data-init[data-v-d6dda95c] {
|