@ibiz-template/vue3-components 0.7.3 → 0.7.4

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.
@@ -19,6 +19,7 @@ export declare const GridFieldColumn: import("vue").DefineComponent<{
19
19
  CustomHtml: import("vue").ComputedRef<string | undefined>;
20
20
  fieldValue: import("vue").ComputedRef<any>;
21
21
  formatValue: import("vue").ComputedRef<string>;
22
+ codeListValue: import("vue").ComputedRef<string>;
22
23
  tooltip: import("vue").ComputedRef<string | undefined>;
23
24
  zIndex: number | undefined;
24
25
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1,7 +1,7 @@
1
1
  import { computed, ref, resolveComponent, createVNode, defineComponent } from 'vue';
2
2
  import { useNamespace } from '@ibiz-template/vue3-util';
3
3
  import './grid-field-column.css';
4
- import { GridFieldColumnController, GridRowState } from '@ibiz-template/runtime';
4
+ import { GridFieldColumnController, GridRowState, ValueExUtil } from '@ibiz-template/runtime';
5
5
  import { isNotNil } from 'ramda';
6
6
 
7
7
  "use strict";
@@ -37,6 +37,7 @@ const GridFieldColumn = /* @__PURE__ */ defineComponent({
37
37
  });
38
38
  const fieldValue = computed(() => props.row.data[props.controller.fieldName]);
39
39
  const formatValue = computed(() => props.controller.formatValue(fieldValue.value));
40
+ const codeListValue = computed(() => ValueExUtil.toText(props.controller.model, fieldValue.value));
40
41
  const codeListText = ref("");
41
42
  const onInfoTextChange = (text) => {
42
43
  codeListText.value = text;
@@ -59,6 +60,7 @@ const GridFieldColumn = /* @__PURE__ */ defineComponent({
59
60
  CustomHtml,
60
61
  fieldValue,
61
62
  formatValue,
63
+ codeListValue,
62
64
  tooltip,
63
65
  zIndex
64
66
  };
@@ -85,7 +87,7 @@ const GridFieldColumn = /* @__PURE__ */ defineComponent({
85
87
  "class": this.ns.e("text"),
86
88
  "codeListItems": c.codeListItems,
87
89
  "codeList": c.codeList,
88
- "value": this.fieldValue,
90
+ "value": this.codeListValue,
89
91
  "onClick": this.onTextClick,
90
92
  "onInfoTextChange": this.onInfoTextChange,
91
93
  "title": this.tooltip
@@ -16,6 +16,7 @@ export declare const IBizGridFieldColumn: import("@ibiz-template/vue3-util").Typ
16
16
  CustomHtml: import("vue").ComputedRef<string | undefined>;
17
17
  fieldValue: import("vue").ComputedRef<any>;
18
18
  formatValue: import("vue").ComputedRef<string>;
19
+ codeListValue: import("vue").ComputedRef<string>;
19
20
  tooltip: import("vue").ComputedRef<string | undefined>;
20
21
  zIndex: number | undefined;
21
22
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -45,6 +45,12 @@ const UserAction = /* @__PURE__ */ defineComponent({
45
45
  return item.id === id;
46
46
  });
47
47
  if (targetMenu) {
48
+ if (targetMenu.accessKey) {
49
+ const app = await ibiz.hub.getApp(c.panel.context.srfappid);
50
+ const permitted = app.authority.calcByResCode(targetMenu.accessKey);
51
+ if (!permitted)
52
+ return;
53
+ }
48
54
  const tempContext = c.panel.context.clone();
49
55
  const tempParam = c.panel.params;
50
56
  tempContext.srfappid = targetMenu.appId || ibiz.env.appId;
@@ -146,7 +146,49 @@ class AppRouter {
146
146
  },
147
147
  {
148
148
  path: ":view6(".concat(viewReg, ")/:params6(").concat(paramReg, ")"),
149
- component: RouterShell
149
+ component: RouterShell,
150
+ children: [
151
+ {
152
+ path: "error/:code",
153
+ name: "errorView7",
154
+ component: ErrorView
155
+ },
156
+ {
157
+ path: "".concat(RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
158
+ components: {
159
+ [RouteConst.ROUTE_MODAL_TAG]: ModalRouterShell
160
+ }
161
+ },
162
+ {
163
+ path: ":view7(".concat(viewReg, ")/:params7(").concat(paramReg, ")"),
164
+ component: RouterShell,
165
+ children: [
166
+ {
167
+ path: "error/:code",
168
+ name: "errorView8",
169
+ component: ErrorView
170
+ },
171
+ {
172
+ path: "".concat(RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
173
+ components: {
174
+ [RouteConst.ROUTE_MODAL_TAG]: ModalRouterShell
175
+ }
176
+ },
177
+ {
178
+ path: ":view8(".concat(viewReg, ")/:params8(").concat(paramReg, ")"),
179
+ component: RouterShell
180
+ },
181
+ {
182
+ path: ":pathMatch(.*)*",
183
+ redirect: { name: "errorView8" }
184
+ }
185
+ ]
186
+ },
187
+ {
188
+ path: ":pathMatch(.*)*",
189
+ redirect: { name: "errorView7" }
190
+ }
191
+ ]
150
192
  },
151
193
  {
152
194
  path: ":pathMatch(.*)*",
@@ -156,7 +198,7 @@ class AppRouter {
156
198
  },
157
199
  {
158
200
  path: ":pathMatch(.*)*",
159
- redirect: { name: "errorView6" }
201
+ redirect: { name: "errorView5" }
160
202
  }
161
203
  ]
162
204
  },
@@ -41,6 +41,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
41
41
  });
42
42
  const fieldValue = vue.computed(() => props.row.data[props.controller.fieldName]);
43
43
  const formatValue = vue.computed(() => props.controller.formatValue(fieldValue.value));
44
+ const codeListValue = vue.computed(() => runtime.ValueExUtil.toText(props.controller.model, fieldValue.value));
44
45
  const codeListText = vue.ref("");
45
46
  const onInfoTextChange = (text) => {
46
47
  codeListText.value = text;
@@ -63,6 +64,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
63
64
  CustomHtml,
64
65
  fieldValue,
65
66
  formatValue,
67
+ codeListValue,
66
68
  tooltip,
67
69
  zIndex
68
70
  };
@@ -89,7 +91,7 @@ const GridFieldColumn = /* @__PURE__ */ vue.defineComponent({
89
91
  "class": this.ns.e("text"),
90
92
  "codeListItems": c.codeListItems,
91
93
  "codeList": c.codeList,
92
- "value": this.fieldValue,
94
+ "value": this.codeListValue,
93
95
  "onClick": this.onTextClick,
94
96
  "onInfoTextChange": this.onInfoTextChange,
95
97
  "title": this.tooltip
@@ -47,6 +47,12 @@ const UserAction = /* @__PURE__ */ vue.defineComponent({
47
47
  return item.id === id;
48
48
  });
49
49
  if (targetMenu) {
50
+ if (targetMenu.accessKey) {
51
+ const app = await ibiz.hub.getApp(c.panel.context.srfappid);
52
+ const permitted = app.authority.calcByResCode(targetMenu.accessKey);
53
+ if (!permitted)
54
+ return;
55
+ }
50
56
  const tempContext = c.panel.context.clone();
51
57
  const tempParam = c.panel.params;
52
58
  tempContext.srfappid = targetMenu.appId || ibiz.env.appId;
@@ -148,7 +148,49 @@ class AppRouter {
148
148
  },
149
149
  {
150
150
  path: ":view6(".concat(viewReg, ")/:params6(").concat(paramReg, ")"),
151
- component: routerShell.RouterShell
151
+ component: routerShell.RouterShell,
152
+ children: [
153
+ {
154
+ path: "error/:code",
155
+ name: "errorView7",
156
+ component: errorView.ErrorView
157
+ },
158
+ {
159
+ path: "".concat(runtime.RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
160
+ components: {
161
+ [runtime.RouteConst.ROUTE_MODAL_TAG]: modalRouterShell.ModalRouterShell
162
+ }
163
+ },
164
+ {
165
+ path: ":view7(".concat(viewReg, ")/:params7(").concat(paramReg, ")"),
166
+ component: routerShell.RouterShell,
167
+ children: [
168
+ {
169
+ path: "error/:code",
170
+ name: "errorView8",
171
+ component: errorView.ErrorView
172
+ },
173
+ {
174
+ path: "".concat(runtime.RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
175
+ components: {
176
+ [runtime.RouteConst.ROUTE_MODAL_TAG]: modalRouterShell.ModalRouterShell
177
+ }
178
+ },
179
+ {
180
+ path: ":view8(".concat(viewReg, ")/:params8(").concat(paramReg, ")"),
181
+ component: routerShell.RouterShell
182
+ },
183
+ {
184
+ path: ":pathMatch(.*)*",
185
+ redirect: { name: "errorView8" }
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ path: ":pathMatch(.*)*",
191
+ redirect: { name: "errorView7" }
192
+ }
193
+ ]
152
194
  },
153
195
  {
154
196
  path: ":pathMatch(.*)*",
@@ -158,7 +200,7 @@ class AppRouter {
158
200
  },
159
201
  {
160
202
  path: ":pathMatch(.*)*",
161
- redirect: { name: "errorView6" }
203
+ redirect: { name: "errorView5" }
162
204
  }
163
205
  ]
164
206
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -32,10 +32,10 @@
32
32
  "@ibiz-template-plugin/gantt": "0.1.3-alpha.46",
33
33
  "@ibiz-template/core": "0.7.3",
34
34
  "@ibiz-template/devtool": "0.0.1-dev.6",
35
- "@ibiz-template/model-helper": "0.7.3",
36
- "@ibiz-template/runtime": "0.7.3",
35
+ "@ibiz-template/model-helper": "0.7.4",
36
+ "@ibiz-template/runtime": "0.7.4",
37
37
  "@ibiz-template/theme": "^0.7.0",
38
- "@ibiz-template/vue3-util": "0.7.3",
38
+ "@ibiz-template/vue3-util": "0.7.4",
39
39
  "@ibiz-template/web-theme": "^1.1.16",
40
40
  "@ibiz/model-core": "^0.1.20",
41
41
  "@imengyu/vue3-context-menu": "^1.3.5",