@ibiz-template/vue3-components 0.7.15 → 0.7.16

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.
Files changed (54) hide show
  1. package/dist/index-8VqjTY2N.js +4 -0
  2. package/dist/{index-Hg_8xCYx.js → index-B_FGiHpY.js} +1 -1
  3. package/dist/{index-8Lu2Ax-_.js → index-Q8y2iWnX.js} +1 -1
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/{xlsx-util-5nNxB32e.js → xlsx-util-AIEyudtA.js} +1 -1
  7. package/es/control/drbar/drbar.controller.d.ts +24 -0
  8. package/es/control/drbar/drbar.controller.mjs +107 -13
  9. package/es/control/drbar/drbar.mjs +3 -2
  10. package/es/control/drtab/drtab.controller.d.ts +39 -0
  11. package/es/control/drtab/drtab.controller.mjs +112 -5
  12. package/es/control/drtab/drtab.mjs +3 -2
  13. package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +0 -1
  14. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +4 -8
  15. package/es/control/grid/grid-column/grid-field-column/index.d.ts +0 -1
  16. package/es/editor/autocomplete/autocomplete-editor.controller.d.ts +9 -1
  17. package/es/editor/autocomplete/autocomplete-editor.controller.mjs +12 -1
  18. package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +8 -1
  19. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +13 -2
  20. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +11 -1
  21. package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +13 -2
  22. package/es/editor/data-picker/picker-editor.controller.d.ts +9 -1
  23. package/es/editor/data-picker/picker-editor.controller.mjs +12 -1
  24. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +27 -7
  25. package/es/editor/list-box/list-box-picker-editor.controller.d.ts +18 -2
  26. package/es/editor/list-box/list-box-picker-editor.controller.mjs +29 -1
  27. package/es/locale/en/index.d.ts +1 -0
  28. package/es/locale/en/index.mjs +2 -1
  29. package/es/locale/index.d.ts +72 -1
  30. package/es/locale/index.mjs +64 -1
  31. package/es/locale/zh-CN/index.d.ts +1 -0
  32. package/es/locale/zh-CN/index.mjs +2 -1
  33. package/es/view-engine/edit-view.engine.mjs +5 -1
  34. package/es/view-engine/opt-view.engine.mjs +5 -1
  35. package/lib/control/drbar/drbar.cjs +3 -2
  36. package/lib/control/drbar/drbar.controller.cjs +106 -12
  37. package/lib/control/drtab/drtab.cjs +3 -2
  38. package/lib/control/drtab/drtab.controller.cjs +111 -4
  39. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +4 -8
  40. package/lib/editor/autocomplete/autocomplete-editor.controller.cjs +11 -0
  41. package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +7 -0
  42. package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +12 -1
  43. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +10 -0
  44. package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +12 -1
  45. package/lib/editor/data-picker/picker-editor.controller.cjs +11 -0
  46. package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +26 -6
  47. package/lib/editor/list-box/list-box-picker-editor.controller.cjs +28 -0
  48. package/lib/locale/en/index.cjs +2 -1
  49. package/lib/locale/index.cjs +64 -1
  50. package/lib/locale/zh-CN/index.cjs +2 -1
  51. package/lib/view-engine/edit-view.engine.cjs +5 -1
  52. package/lib/view-engine/opt-view.engine.cjs +5 -1
  53. package/package.json +5 -5
  54. package/dist/index-vUHyK4p8.js +0 -4
@@ -97,6 +97,97 @@ class DRTabController extends runtime.ControlController {
97
97
  await super.onCreated();
98
98
  await this.initCounter();
99
99
  }
100
+ /**
101
+ * 通过计数器数据,计算项状态
102
+ *
103
+ * @author zhanghengfeng
104
+ * @date 2024-05-16 17:05:01
105
+ */
106
+ calcItemStateByCounter() {
107
+ this.state.drTabPages.forEach((item) => {
108
+ const visible = runtime.calcItemVisibleByCounter(item, this.counter);
109
+ if (visible !== void 0) {
110
+ item.hidden = !visible;
111
+ }
112
+ });
113
+ if (this.state.activeName) {
114
+ const { visible, defaultVisibleItem } = this.getItemVisibleState(
115
+ this.state.activeName
116
+ );
117
+ if (!visible && defaultVisibleItem) {
118
+ this.state.activeName = defaultVisibleItem.tag;
119
+ this.handleTabChange();
120
+ }
121
+ }
122
+ }
123
+ /**
124
+ * 获取对应项的显示状态
125
+ *
126
+ * @author zhanghengfeng
127
+ * @date 2024-05-16 17:05:18
128
+ * @param {string} key
129
+ * @return {*} {{
130
+ * visible: boolean;
131
+ * defaultVisibleItem?: IDRTabPagesState;
132
+ * }}
133
+ */
134
+ getItemVisibleState(key) {
135
+ let visible = true;
136
+ let defaultVisibleItem;
137
+ this.state.drTabPages.forEach((item) => {
138
+ if (!defaultVisibleItem && !item.hidden) {
139
+ defaultVisibleItem = item;
140
+ }
141
+ if (item.tag === key) {
142
+ visible = !item.hidden;
143
+ }
144
+ });
145
+ return {
146
+ visible,
147
+ defaultVisibleItem
148
+ };
149
+ }
150
+ /**
151
+ * 计算项权限
152
+ *
153
+ * @author zhanghengfeng
154
+ * @date 2024-05-16 17:05:40
155
+ * @param {IDRTabPagesState} item
156
+ * @return {*} {Promise<void>}
157
+ */
158
+ async calcPermitted(item) {
159
+ var _a;
160
+ let permitted = true;
161
+ const data = ((_a = this.getData()) == null ? void 0 : _a.length) ? this.getData()[0] : void 0;
162
+ const visible = await runtime.calcItemVisible(
163
+ item,
164
+ this.context,
165
+ this.params,
166
+ this.model.appDataEntityId,
167
+ this.model.appId,
168
+ data
169
+ );
170
+ if (visible !== void 0) {
171
+ permitted = visible;
172
+ }
173
+ item.hidden = !permitted;
174
+ }
175
+ /**
176
+ * 计算项状态
177
+ *
178
+ * @author zhanghengfeng
179
+ * @date 2024-05-16 17:05:05
180
+ * @return {*} {Promise<void>}
181
+ */
182
+ async calcDrTabPagesState() {
183
+ await Promise.all(
184
+ this.state.drTabPages.map(async (item) => {
185
+ await this.calcPermitted(item);
186
+ })
187
+ );
188
+ this.calcItemStateByCounter();
189
+ this.state.isCalculatedPermission = true;
190
+ }
100
191
  /**
101
192
  * 加载完成
102
193
  *
@@ -106,8 +197,13 @@ class DRTabController extends runtime.ControlController {
106
197
  async onMounted() {
107
198
  await super.onMounted();
108
199
  if (this.form) {
109
- this.form.evt.on("onLoadSuccess", (event) => {
110
- this.view.state.srfactiveviewdata = event.data[0];
200
+ this.form.evt.on("onLoadSuccess", async (event) => {
201
+ const data = event.data[0];
202
+ this.view.state.srfactiveviewdata = data;
203
+ if (data.srfreadonly) {
204
+ this.view.context.srfreadonly = true;
205
+ }
206
+ await this.calcDrTabPagesState();
111
207
  this.handleFormChange();
112
208
  });
113
209
  this.form.evt.on("onLoadDraftSuccess", () => {
@@ -118,6 +214,9 @@ class DRTabController extends runtime.ControlController {
118
214
  });
119
215
  }
120
216
  this.initDRTabPages();
217
+ if (!this.form) {
218
+ await this.calcDrTabPagesState();
219
+ }
121
220
  }
122
221
  /**
123
222
  * 处理表单数据变更
@@ -179,13 +278,18 @@ class DRTabController extends runtime.ControlController {
179
278
  if (item.capLanguageRes) {
180
279
  itemCaption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
181
280
  }
281
+ const { enableMode, dataAccessAction, testAppDELogicId, testScriptCode } = item;
182
282
  drTabPages.push({
183
283
  tag: item.id,
184
284
  caption: itemCaption,
185
285
  sysImage: item.sysImage,
186
286
  hidden: false,
187
287
  disabled: false,
188
- counterId: item.counterId
288
+ counterId: item.counterId,
289
+ dataAccessAction,
290
+ enableMode,
291
+ testAppDELogicId,
292
+ testScriptCode
189
293
  });
190
294
  });
191
295
  this.state.drTabPages = drTabPages;
@@ -215,7 +319,7 @@ class DRTabController extends runtime.ControlController {
215
319
  this.openNavPosView(drBarItem, isRoutePushed);
216
320
  } else {
217
321
  this.setVisible("form");
218
- if (this.routeDepth) {
322
+ if (this.routeDepth && this.state.drTabPages[0]) {
219
323
  this.router.push(this.state.drTabPages[0].fullPath);
220
324
  }
221
325
  }
@@ -310,6 +414,8 @@ class DRTabController extends runtime.ControlController {
310
414
  this.context,
311
415
  { ...this.params }
312
416
  );
417
+ this.calcItemStateByCounter = this.calcItemStateByCounter.bind(this);
418
+ this.counter.onChange(this.calcItemStateByCounter);
313
419
  }
314
420
  }
315
421
  /**
@@ -323,6 +429,7 @@ class DRTabController extends runtime.ControlController {
323
429
  async onDestroyed() {
324
430
  await super.onDestroyed();
325
431
  if (this.counter) {
432
+ this.counter.offChange(this.calcItemStateByCounter);
326
433
  this.counter.destroy();
327
434
  }
328
435
  }
@@ -23,6 +23,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
23
23
  },
24
24
  setup(props) {
25
25
  const ns = vue3Util.useNamespace("grid-field-column");
26
+ const c = props.controller;
26
27
  const zIndex = props.controller.grid.state.zIndex;
27
28
  const onCellClick = (event) => {
28
29
  if (props.controller.hasAction) {
@@ -55,13 +56,9 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
55
56
  const onActionClick = async (detail, event) => {
56
57
  await props.controller.onActionClick(detail, props.row, event);
57
58
  };
58
- const items = vue.ref([]);
59
- if (props.controller.codeList) {
60
- items.value = props.controller.codeListItems;
61
- }
62
59
  const fn = (data) => {
63
60
  if (data) {
64
- items.value = data;
61
+ c.codeListItems = data;
65
62
  }
66
63
  };
67
64
  vue3Util.useCodeListListen(props.controller.model.appCodeListId, props.controller.context.srfappid, fn);
@@ -76,8 +73,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
76
73
  formatValue,
77
74
  codeListValue,
78
75
  tooltip,
79
- zIndex,
80
- items
76
+ zIndex
81
77
  };
82
78
  },
83
79
  render() {
@@ -100,7 +96,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
100
96
  } else if (c.codeList) {
101
97
  content = vue.createVNode(vue.resolveComponent("iBizCodeList"), {
102
98
  "class": this.ns.e("text"),
103
- "codeListItems": this.items,
99
+ "codeListItems": c.codeListItems,
104
100
  "codeList": c.codeList,
105
101
  "value": this.codeListValue,
106
102
  "onClick": this.onTextClick,
@@ -38,6 +38,14 @@ class AutoCompleteEditorController extends runtime.EditorController {
38
38
  * 自填数据项集合(已排除了value和text)
39
39
  */
40
40
  __publicField(this, "dataItems", []);
41
+ /**
42
+ * 自填列表项适配器
43
+ *
44
+ * @author zhanghengfeng
45
+ * @date 2024-05-21 17:05:21
46
+ * @type {IAcItemProvider}
47
+ */
48
+ __publicField(this, "acItemProvider");
41
49
  }
42
50
  async onInit() {
43
51
  super.onInit();
@@ -72,6 +80,9 @@ class AutoCompleteEditorController extends runtime.EditorController {
72
80
  }
73
81
  );
74
82
  }
83
+ if (this.deACMode.itemSysPFPluginId) {
84
+ this.acItemProvider = await runtime.getAcItemProvider(this.deACMode);
85
+ }
75
86
  }
76
87
  }
77
88
  }
@@ -183,6 +183,13 @@ const IBizAutoComplete = /* @__PURE__ */ vue.defineComponent({
183
183
  default: ({
184
184
  item
185
185
  }) => {
186
+ if (this.c.acItemProvider) {
187
+ const component = vue.resolveComponent(this.c.acItemProvider.component);
188
+ return vue.h(component, {
189
+ item,
190
+ controller: this.c
191
+ });
192
+ }
186
193
  return vue.createVNode("div", {
187
194
  "class": [this.ns.e("transfer-item"), this.ns.is("ellipsis", isEllipsis)],
188
195
  "title": isEllipsis ? item[this.c.textName] : ""
@@ -310,7 +310,18 @@ const IBizMPicker = /* @__PURE__ */ vue.defineComponent({
310
310
  "key": item[this.c.keyName],
311
311
  "value": item[this.c.keyName],
312
312
  "label": item[this.c.textName]
313
- }, null);
313
+ }, {
314
+ default: () => {
315
+ if (this.c.acItemProvider) {
316
+ const component = vue.resolveComponent(this.c.acItemProvider.component);
317
+ return vue.h(component, {
318
+ item,
319
+ controller: this.c
320
+ });
321
+ }
322
+ return vue.createVNode("span", null, [item[this.c.textName] != null ? item[this.c.textName] : ""]);
323
+ }
324
+ });
314
325
  })) ? _slot : {
315
326
  default: () => [_slot]
316
327
  }), !this.readonly && vue.createVNode("div", {
@@ -207,6 +207,16 @@ const IBizPicker = /* @__PURE__ */ vue.defineComponent({
207
207
  context,
208
208
  params
209
209
  } = this.c;
210
+ if (this.c.acItemProvider) {
211
+ const component = vue.resolveComponent(this.c.acItemProvider.component);
212
+ return vue.h(component, {
213
+ item,
214
+ controller: this.c,
215
+ onClick: () => {
216
+ this.onACSelect(item);
217
+ }
218
+ });
219
+ }
210
220
  return panel ? vue.createVNode(vue.resolveComponent("iBizControlShell"), {
211
221
  "data": item,
212
222
  "modelData": panel,
@@ -242,7 +242,18 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
242
242
  "value": item[this.c.keyName],
243
243
  "key": item[this.c.keyName],
244
244
  "label": item[this.c.textName]
245
- }, null);
245
+ }, {
246
+ default: () => {
247
+ if (this.c.acItemProvider) {
248
+ const component = vue.resolveComponent(this.c.acItemProvider.component);
249
+ return vue.h(component, {
250
+ item,
251
+ controller: this.c
252
+ });
253
+ }
254
+ return vue.createVNode("span", null, [item[this.c.textName] != null ? item[this.c.textName] : ""]);
255
+ }
256
+ });
246
257
  })) ? _slot : {
247
258
  default: () => [_slot]
248
259
  });
@@ -68,6 +68,14 @@ class PickerEditorController extends runtime.EditorController {
68
68
  __publicField(this, "objectNameField", "");
69
69
  // 对象值属性
70
70
  __publicField(this, "objectValueField", "");
71
+ /**
72
+ * 自填列表项适配器
73
+ *
74
+ * @author zhanghengfeng
75
+ * @date 2024-05-21 17:05:50
76
+ * @type {IAcItemProvider}
77
+ */
78
+ __publicField(this, "acItemProvider");
71
79
  }
72
80
  async onInit() {
73
81
  var _a, _b, _c, _d;
@@ -105,6 +113,9 @@ class PickerEditorController extends runtime.EditorController {
105
113
  }
106
114
  );
107
115
  }
116
+ if (this.deACMode.itemSysPFPluginId) {
117
+ this.acItemProvider = await runtime.getAcItemProvider(this.deACMode);
118
+ }
108
119
  }
109
120
  }
110
121
  }
@@ -168,9 +168,19 @@ const IBizListBox = /* @__PURE__ */ vue.defineComponent({
168
168
  "label": item.value,
169
169
  "disabled": this.disabled || this.readonly || item.disableSelect === true
170
170
  }, {
171
- default: () => [vue.createVNode("span", {
172
- "class": this.ns.e("text")
173
- }, [item.text])]
171
+ default: () => {
172
+ const c = this.controller;
173
+ if (c.acItemProvider) {
174
+ const component = vue.resolveComponent(c.acItemProvider.component);
175
+ return vue.h(component, {
176
+ item,
177
+ controller: c
178
+ });
179
+ }
180
+ return vue.createVNode("span", {
181
+ "class": this.ns.e("text")
182
+ }, [item.text]);
183
+ }
174
184
  }))) ? _slot : {
175
185
  default: () => [_slot]
176
186
  }) : vue.createVNode(vue.resolveComponent("el-radio-group"), vue.mergeProps({
@@ -184,9 +194,19 @@ const IBizListBox = /* @__PURE__ */ vue.defineComponent({
184
194
  this.onSelectArrayChange(item.value);
185
195
  }
186
196
  }, {
187
- default: () => [vue.createVNode("span", {
188
- "class": this.ns.e("text")
189
- }, [item.text])]
197
+ default: () => {
198
+ const c = this.controller;
199
+ if (c.acItemProvider) {
200
+ const component = vue.resolveComponent(c.acItemProvider.component);
201
+ return vue.h(component, {
202
+ item,
203
+ controller: c
204
+ });
205
+ }
206
+ return vue.createVNode("span", {
207
+ "class": this.ns.e("text")
208
+ }, [item.text]);
209
+ }
190
210
  }))) ? _slot2 : {
191
211
  default: () => [_slot2]
192
212
  })]);
@@ -26,6 +26,22 @@ class ListBoxPickerEditorController extends runtime.EditorController {
26
26
  * 数据集codeName
27
27
  */
28
28
  __publicField(this, "interfaceName", "");
29
+ /**
30
+ * 实体自填模式模型
31
+ *
32
+ * @author zhanghengfeng
33
+ * @date 2024-05-21 17:05:03
34
+ * @type {IAppDEACMode}
35
+ */
36
+ __publicField(this, "deACMode");
37
+ /**
38
+ * 自填列表项适配器
39
+ *
40
+ * @author zhanghengfeng
41
+ * @date 2024-05-21 17:05:25
42
+ * @type {IAcItemProvider}
43
+ */
44
+ __publicField(this, "acItemProvider");
29
45
  }
30
46
  async onInit() {
31
47
  super.onInit();
@@ -33,6 +49,18 @@ class ListBoxPickerEditorController extends runtime.EditorController {
33
49
  if (this.model.appDEDataSetId) {
34
50
  this.interfaceName = this.model.appDEDataSetId;
35
51
  }
52
+ if (this.model.appDataEntityId && this.model.appDEACModeId) {
53
+ this.deACMode = await runtime.getDeACMode(
54
+ this.model.appDEACModeId,
55
+ this.model.appDataEntityId,
56
+ this.context.srfappid
57
+ );
58
+ if (this.deACMode) {
59
+ if (this.deACMode.itemSysPFPluginId) {
60
+ this.acItemProvider = await runtime.getAcItemProvider(this.deACMode);
61
+ }
62
+ }
63
+ }
36
64
  }
37
65
  }
38
66
  /**
@@ -742,7 +742,8 @@ var index = {
742
742
  frontEndPluginNode: "Cannot find interface logic front-end plugin node, plugin {pluginKey} corresponding adapter",
743
743
  viewPlugin: "Cannot find the adapter corresponding to the view plugin {pluginKey}.",
744
744
  correspondViewTypeStyle: "Cannot find an adapter for view type: [{viewType}] corresponding to view style: [{viewStyle}].",
745
- toolbarItem: "Cannot find the adapter corresponding to the toolbar item plugin {pluginKey}."
745
+ toolbarItem: "Cannot find the adapter corresponding to the toolbar item plugin {pluginKey}.",
746
+ acItem: "Cannot find the adapter corresponding to the ac item plugin {pluginKey}."
746
747
  }
747
748
  },
748
749
  service: {
@@ -14,9 +14,37 @@ const i18n = vueI18n.createI18n({
14
14
  locale: "zh-CN"
15
15
  });
16
16
  class IBizI18n {
17
+ /**
18
+ * Creates an instance of IBizI18n.
19
+ * @author tony001
20
+ * @date 2024-05-20 22:05:50
21
+ */
17
22
  constructor() {
23
+ /**
24
+ * html元素
25
+ *
26
+ * @author tony001
27
+ * @date 2024-05-20 22:05:58
28
+ * @protected
29
+ * @type {HTMLElement}
30
+ */
18
31
  __publicField(this, "html");
32
+ /**
33
+ * 默认语言
34
+ *
35
+ * @author tony001
36
+ * @date 2024-05-20 22:05:13
37
+ * @protected
38
+ * @type {string}
39
+ */
19
40
  __publicField(this, "defaultLang");
41
+ /**
42
+ * 语言资源映射表
43
+ *
44
+ * @author tony001
45
+ * @date 2024-05-20 22:05:38
46
+ * @protected
47
+ */
20
48
  __publicField(this, "langMap", /* @__PURE__ */ new Map());
21
49
  this.defaultLang = "zh-CN";
22
50
  this.html = document.querySelector("html");
@@ -58,7 +86,7 @@ class IBizI18n {
58
86
  });
59
87
  }
60
88
  /**
61
- * 设置
89
+ * 设置语言
62
90
  *
63
91
  * @author chitanda
64
92
  * @date 2023-08-24 16:08:42
@@ -75,9 +103,26 @@ class IBizI18n {
75
103
  }
76
104
  });
77
105
  }
106
+ /**
107
+ * 获取语言
108
+ *
109
+ * @author tony001
110
+ * @date 2024-05-20 22:05:05
111
+ * @return {*} {string}
112
+ */
78
113
  getLang() {
79
114
  return this.html.getAttribute("lang") || this.defaultLang;
80
115
  }
116
+ /**
117
+ * 格式化
118
+ *
119
+ * @author tony001
120
+ * @date 2024-05-20 22:05:44
121
+ * @param {unknown} tag
122
+ * @param {unknown} [defaultMsg]
123
+ * @param {unknown} [options]
124
+ * @return {*} {string}
125
+ */
81
126
  t(tag, defaultMsg, options) {
82
127
  return i18n.global.t(
83
128
  tag,
@@ -85,6 +130,24 @@ class IBizI18n {
85
130
  options
86
131
  );
87
132
  }
133
+ /**
134
+ * 合并语言资源
135
+ * @param lang
136
+ * @param data
137
+ */
138
+ mergeLocaleMessage(dataOrLang, data) {
139
+ if (typeof dataOrLang === "string") {
140
+ const lang = dataOrLang;
141
+ i18n.global.mergeLocaleMessage(lang, data);
142
+ } else {
143
+ const langData = dataOrLang;
144
+ if (langData && Object.keys(langData).length > 0) {
145
+ Object.keys(langData).forEach((key) => {
146
+ i18n.global.mergeLocaleMessage(key, langData[key]);
147
+ });
148
+ }
149
+ }
150
+ }
88
151
  }
89
152
  const iBizI18n = new IBizI18n();
90
153
 
@@ -740,7 +740,8 @@ var index = {
740
740
  frontEndPluginNode: "\u627E\u4E0D\u5230\u754C\u9762\u903B\u8F91\u524D\u7AEF\u63D2\u4EF6\u8282\u70B9\uFF0C\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
741
741
  viewPlugin: "\u627E\u4E0D\u5230\u89C6\u56FE\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
742
742
  correspondViewTypeStyle: "\u627E\u4E0D\u5230\u89C6\u56FE\u7C7B\u578B\uFF1A[{viewType}]\u7684\u89C6\u56FE\u6837\u5F0F\uFF1A[{viewStyle}]\u5BF9\u5E94\u7684\u9002\u914D\u5668",
743
- toolbarItem: "\u627E\u4E0D\u5230\u5DE5\u5177\u680F\u9879\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668"
743
+ toolbarItem: "\u627E\u4E0D\u5230\u5DE5\u5177\u680F\u9879\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668",
744
+ acItem: "\u627E\u4E0D\u5230\u81EA\u586B\u5217\u8868\u9879\u63D2\u4EF6{pluginKey}\u5BF9\u5E94\u7684\u9002\u914D\u5668"
744
745
  }
745
746
  },
746
747
  service: {
@@ -99,7 +99,11 @@ class EditViewEngine extends runtime.ViewEngineBase {
99
99
  };
100
100
  this.form.evt.on("onLoadSuccess", (event) => {
101
101
  formDataStateChange(event);
102
- this.view.state.srfactiveviewdata = event.data[0];
102
+ const data = event.data[0];
103
+ this.view.state.srfactiveviewdata = data;
104
+ if (data.srfreadonly) {
105
+ this.view.context.srfreadonly = true;
106
+ }
103
107
  evt.emit("onDataChange", { ...event, actionType: "LOAD" });
104
108
  });
105
109
  this.form.evt.on("onLoadDraftSuccess", (event) => {
@@ -66,7 +66,11 @@ class OptViewEngine extends runtime.ViewEngineBase {
66
66
  }
67
67
  };
68
68
  this.form.evt.on("onLoadSuccess", (event) => {
69
- this.view.state.srfactiveviewdata = event.data[0];
69
+ const data = event.data[0];
70
+ this.view.state.srfactiveviewdata = data;
71
+ if (data.srfreadonly) {
72
+ this.view.context.srfreadonly = true;
73
+ }
70
74
  formDataStateChange(event);
71
75
  });
72
76
  this.form.evt.on("onLoadDraftSuccess", (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.15",
3
+ "version": "0.7.16",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -30,12 +30,12 @@
30
30
  "@floating-ui/dom": "^1.5.3",
31
31
  "@ibiz-template-plugin/ai-chat": "^0.0.5",
32
32
  "@ibiz-template-plugin/gantt": "0.1.4",
33
- "@ibiz-template/core": "0.7.7-dev.0",
33
+ "@ibiz-template/core": "0.7.16",
34
34
  "@ibiz-template/devtool": "0.0.1-dev.6",
35
- "@ibiz-template/model-helper": "0.7.15",
36
- "@ibiz-template/runtime": "0.7.15",
35
+ "@ibiz-template/model-helper": "0.7.16",
36
+ "@ibiz-template/runtime": "0.7.16",
37
37
  "@ibiz-template/theme": "^0.7.0",
38
- "@ibiz-template/vue3-util": "0.7.15",
38
+ "@ibiz-template/vue3-util": "0.7.16",
39
39
  "@ibiz-template/web-theme": "^1.1.17",
40
40
  "@ibiz/model-core": "^0.1.27",
41
41
  "@imengyu/vue3-context-menu": "^1.3.5",