cnhis-design-vue 3.1.33-beta.2 → 3.1.33-beta.20
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/README.md +123 -123
- package/es/components/big-table/index.d.ts +2 -2
- package/es/components/big-table/src/BigTable.vue.d.ts +2 -2
- package/es/components/big-table/src/BigTable.vue2.js +11 -14
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-time.js +7 -4
- package/es/components/big-table/src/components/edit-form/useCommon.d.ts +2 -1
- package/es/components/big-table/src/components/edit-form/useCommon.js +7 -3
- package/es/components/big-table/src/hooks/useFormat.js +1 -1
- package/es/components/button-print/index.d.ts +13 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +13 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +6 -1
- package/es/components/button-print/src/utils/print.d.ts +2 -2
- package/es/components/button-print/src/utils/print.js +7 -4
- package/es/components/fabric-chart/index.d.ts +389 -181
- package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +181 -0
- package/es/components/fabric-chart/src/BirthProcessChart.vue.js +172 -0
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +390 -182
- package/es/components/fabric-chart/src/FabricChart.vue.js +21 -327
- package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +214 -0
- package/es/components/fabric-chart/src/TemperatureChart.vue.js +359 -0
- package/es/components/fabric-chart/src/components/PopupMenu.js +2 -2
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +3 -2
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +2 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +26 -0
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +419 -0
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/useCenter.js +22 -42
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +8 -0
- package/es/components/fabric-chart/src/hooks/useCommon.js +31 -0
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +9 -2
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +34 -1
- package/es/components/fabric-chart/src/hooks/useGrid.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useGrid.js +28 -18
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +11 -7
- package/es/components/fabric-chart/src/interface.d.ts +24 -6
- package/es/components/fabric-chart/src/interface.js +0 -3
- package/es/components/fabric-chart/src/utils/utils.d.ts +11 -0
- package/es/components/fabric-chart/src/utils/utils.js +27 -0
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -4
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +14 -8
- package/es/components/iho-table/index.d.ts +1 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +1 -0
- package/es/components/iho-table/src/IhoTable.vue.js +7 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/index.js +3 -1
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +11 -0
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +26 -0
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +5 -1
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +2 -1
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +17 -12
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +16 -5
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +8 -22
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +8 -16
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +7 -4
- package/es/components/iho-table/src/types/index.d.ts +9 -1
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +4 -0
- package/es/components/iho-table/src/types/pluginType.js +3 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.js +72 -56
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/keyboard/index.d.ts +62 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +62 -1
- package/es/components/keyboard/src/Keyboard.vue.js +4 -1
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +67 -5
- package/es/components/keyboard/src/components/NumberPanel.vue.js +48 -26
- package/es/components/keyboard/style/index.css +1 -1
- package/es/components/shortcut-provider/src/utils/index.d.ts +0 -1
- package/es/components/shortcut-provider/src/utils/index.js +26 -3
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +3 -0
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md
CHANGED
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
# 安装
|
|
2
|
-
|
|
3
|
-
```shell
|
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
|
5
|
-
# or
|
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## 1.全局引入
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// main.ts
|
|
13
|
-
import { createApp } from 'vue';
|
|
14
|
-
import App from './App.vue';
|
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
-
import cui from 'cnhis-design-vue';
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(cui).mount('#app');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. 按需引入
|
|
23
|
-
|
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
-
|
|
26
|
-
### 2.1 样式处理方式 1(按需引入样式)
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
# 安装自动导入样式的插件
|
|
30
|
-
npm i -d vite-plugin-style-import
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// vite.config.ts
|
|
35
|
-
import { defineConfig } from 'vite';
|
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
-
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
plugins: [
|
|
40
|
-
// ...otherPlugins
|
|
41
|
-
createStyleImportPlugin({
|
|
42
|
-
libs: [
|
|
43
|
-
{
|
|
44
|
-
libraryName: 'cnhis-design-vue',
|
|
45
|
-
esModule: true,
|
|
46
|
-
ensureStyleFile: true,
|
|
47
|
-
resolveStyle: name => {
|
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 2.2 样式处理方式 2(全局引入样式)
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// main.ts
|
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 3. 注意
|
|
65
|
-
|
|
66
|
-
由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
|
|
67
|
-
|
|
68
|
-
```typescript
|
|
69
|
-
// main.ts
|
|
70
|
-
import { createApp } from 'vue';
|
|
71
|
-
import App from './App.vue';
|
|
72
|
-
|
|
73
|
-
import { CGrid } from 'cnhis-design-vue';
|
|
74
|
-
// 或者
|
|
75
|
-
import { CBigTable } from 'cnhis-design-vue';
|
|
76
|
-
|
|
77
|
-
const app = createApp(App);
|
|
78
|
-
app.use(CGrid);
|
|
79
|
-
// 或者
|
|
80
|
-
app.use(CBigTable);
|
|
81
|
-
app.mount('#app');
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## 4.FAQ
|
|
85
|
-
|
|
86
|
-
### 4.1 项目打包后样式丢失
|
|
87
|
-
|
|
88
|
-
> 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
// vite.config.ts
|
|
92
|
-
import { defineConfig } from 'vite';
|
|
93
|
-
|
|
94
|
-
export default defineConfig({
|
|
95
|
-
rollupOptions: {
|
|
96
|
-
// ..otherOptions
|
|
97
|
-
output: {
|
|
98
|
-
dir: './dist',
|
|
99
|
-
manualChunks(id: string) {
|
|
100
|
-
if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
|
|
101
|
-
return 'vendor';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 4.2 找不到文件
|
|
110
|
-
|
|
111
|
-
> 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
|
|
112
|
-
|
|
113
|
-
```javascript
|
|
114
|
-
// vite.config.ts
|
|
115
|
-
const config = {
|
|
116
|
-
// ...otherOptions
|
|
117
|
-
resolve: {
|
|
118
|
-
// ...otherOptions
|
|
119
|
-
// 如果没有配置, 则不用考虑
|
|
120
|
-
extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
```
|
|
1
|
+
# 安装
|
|
2
|
+
|
|
3
|
+
```shell
|
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
|
5
|
+
# or
|
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1.全局引入
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// main.ts
|
|
13
|
+
import { createApp } from 'vue';
|
|
14
|
+
import App from './App.vue';
|
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
+
import cui from 'cnhis-design-vue';
|
|
17
|
+
|
|
18
|
+
const app = createApp(App);
|
|
19
|
+
app.use(cui).mount('#app');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. 按需引入
|
|
23
|
+
|
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
+
|
|
26
|
+
### 2.1 样式处理方式 1(按需引入样式)
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
# 安装自动导入样式的插件
|
|
30
|
+
npm i -d vite-plugin-style-import
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// vite.config.ts
|
|
35
|
+
import { defineConfig } from 'vite';
|
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
plugins: [
|
|
40
|
+
// ...otherPlugins
|
|
41
|
+
createStyleImportPlugin({
|
|
42
|
+
libs: [
|
|
43
|
+
{
|
|
44
|
+
libraryName: 'cnhis-design-vue',
|
|
45
|
+
esModule: true,
|
|
46
|
+
ensureStyleFile: true,
|
|
47
|
+
resolveStyle: name => {
|
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2.2 样式处理方式 2(全局引入样式)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// main.ts
|
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 3. 注意
|
|
65
|
+
|
|
66
|
+
由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
// main.ts
|
|
70
|
+
import { createApp } from 'vue';
|
|
71
|
+
import App from './App.vue';
|
|
72
|
+
|
|
73
|
+
import { CGrid } from 'cnhis-design-vue';
|
|
74
|
+
// 或者
|
|
75
|
+
import { CBigTable } from 'cnhis-design-vue';
|
|
76
|
+
|
|
77
|
+
const app = createApp(App);
|
|
78
|
+
app.use(CGrid);
|
|
79
|
+
// 或者
|
|
80
|
+
app.use(CBigTable);
|
|
81
|
+
app.mount('#app');
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 4.FAQ
|
|
85
|
+
|
|
86
|
+
### 4.1 项目打包后样式丢失
|
|
87
|
+
|
|
88
|
+
> 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
// vite.config.ts
|
|
92
|
+
import { defineConfig } from 'vite';
|
|
93
|
+
|
|
94
|
+
export default defineConfig({
|
|
95
|
+
rollupOptions: {
|
|
96
|
+
// ..otherOptions
|
|
97
|
+
output: {
|
|
98
|
+
dir: './dist',
|
|
99
|
+
manualChunks(id: string) {
|
|
100
|
+
if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
|
|
101
|
+
return 'vendor';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 4.2 找不到文件
|
|
110
|
+
|
|
111
|
+
> 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
// vite.config.ts
|
|
115
|
+
const config = {
|
|
116
|
+
// ...otherOptions
|
|
117
|
+
resolve: {
|
|
118
|
+
// ...otherOptions
|
|
119
|
+
// 如果没有配置, 则不用考虑
|
|
120
|
+
extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
```
|
|
@@ -646,7 +646,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
646
646
|
userInfo: Record<string, any>;
|
|
647
647
|
sysImageSize: unknown[];
|
|
648
648
|
}>;
|
|
649
|
-
treeConfig: import("vue").ComputedRef<
|
|
649
|
+
treeConfig: import("vue").ComputedRef<any>;
|
|
650
650
|
hideAllWrap: (e: any) => void;
|
|
651
651
|
bindDocumentClick: () => void;
|
|
652
652
|
unBindDocumentClick: () => void;
|
|
@@ -678,7 +678,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
678
678
|
align: string;
|
|
679
679
|
visible: any;
|
|
680
680
|
resizable: boolean;
|
|
681
|
-
width:
|
|
681
|
+
width: any;
|
|
682
682
|
showOverflow: boolean;
|
|
683
683
|
slots: {
|
|
684
684
|
header: () => any[];
|
|
@@ -645,7 +645,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
645
645
|
userInfo: Record<string, any>;
|
|
646
646
|
sysImageSize: unknown[];
|
|
647
647
|
}>;
|
|
648
|
-
treeConfig: import("vue").ComputedRef<
|
|
648
|
+
treeConfig: import("vue").ComputedRef<any>;
|
|
649
649
|
hideAllWrap: (e: any) => void;
|
|
650
650
|
bindDocumentClick: () => void;
|
|
651
651
|
unBindDocumentClick: () => void;
|
|
@@ -677,7 +677,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
677
677
|
align: string;
|
|
678
678
|
visible: any;
|
|
679
679
|
resizable: boolean;
|
|
680
|
-
width:
|
|
680
|
+
width: any;
|
|
681
681
|
showOverflow: boolean;
|
|
682
682
|
slots: {
|
|
683
683
|
header: () => any[];
|
|
@@ -123,7 +123,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
123
123
|
var _a;
|
|
124
124
|
let {
|
|
125
125
|
noSetting
|
|
126
|
-
} = getOtherConfigInit()
|
|
126
|
+
} = getOtherConfigInit();
|
|
127
127
|
return noSetting || ((_a = props.showSettings) == null ? void 0 : _a.hideSettingBtn);
|
|
128
128
|
});
|
|
129
129
|
const isScanMultiTable = computed(() => {
|
|
@@ -137,7 +137,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
137
137
|
};
|
|
138
138
|
});
|
|
139
139
|
const treeConfig = computed(() => {
|
|
140
|
-
let result =
|
|
140
|
+
let result = getAttr("tree-config");
|
|
141
141
|
let {
|
|
142
142
|
isTransform
|
|
143
143
|
} = props.tableParams;
|
|
@@ -314,7 +314,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
314
314
|
var _a, _b, _c;
|
|
315
315
|
let {
|
|
316
316
|
selectType
|
|
317
|
-
} = getOtherConfigInit()
|
|
317
|
+
} = getOtherConfigInit();
|
|
318
318
|
let {
|
|
319
319
|
isBatchSelect,
|
|
320
320
|
fieldList = [],
|
|
@@ -323,7 +323,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
323
323
|
isEdit = false,
|
|
324
324
|
editConfig = {},
|
|
325
325
|
rowConfig = {},
|
|
326
|
-
showSeq = true
|
|
326
|
+
showSeq = true,
|
|
327
|
+
seqWidth = 34
|
|
327
328
|
} = map;
|
|
328
329
|
if (isEdit) {
|
|
329
330
|
Object.assign(state.editConfig, editConfig);
|
|
@@ -373,7 +374,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
373
374
|
align: "center",
|
|
374
375
|
visible: showSeq,
|
|
375
376
|
resizable: true,
|
|
376
|
-
width:
|
|
377
|
+
width: seqWidth,
|
|
377
378
|
showOverflow: true,
|
|
378
379
|
slots: {
|
|
379
380
|
header: () => {
|
|
@@ -528,7 +529,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
528
529
|
editTrigger: state.editConfig.trigger
|
|
529
530
|
};
|
|
530
531
|
if (["date", "time"].includes(formType)) {
|
|
531
|
-
propsData.formattedValue = row[col.columnName];
|
|
532
|
+
propsData.formattedValue = row[col.columnName] || void 0;
|
|
532
533
|
} else if (formatMap) {
|
|
533
534
|
propsData.value = row[formatMap.value];
|
|
534
535
|
} else {
|
|
@@ -988,11 +989,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
988
989
|
}
|
|
989
990
|
}
|
|
990
991
|
};
|
|
991
|
-
|
|
992
|
+
function getOtherConfigInit() {
|
|
992
993
|
let tableOptions = (attr == null ? void 0 : attr.tableOptions) || props.tableOptions || {};
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
};
|
|
994
|
+
return (tableOptions == null ? void 0 : tableOptions.config) || {};
|
|
995
|
+
}
|
|
996
996
|
const refreshTable = () => {
|
|
997
997
|
state.hasRefresh = false;
|
|
998
998
|
emit("refreshTable");
|
|
@@ -2309,10 +2309,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2309
2309
|
"mouse-config": {
|
|
2310
2310
|
selected: ((_a = _ctx.columnConfig.keyboardConfig) == null ? void 0 : _a.isEdit) ? true : false
|
|
2311
2311
|
},
|
|
2312
|
-
"tree-config":
|
|
2313
|
-
...unref(treeConfig) || {},
|
|
2314
|
-
...unref(getAttr)("tree-config")
|
|
2315
|
-
},
|
|
2312
|
+
"tree-config": unref(treeConfig),
|
|
2316
2313
|
"row-class-name": getRowClassName,
|
|
2317
2314
|
"row-config": {
|
|
2318
2315
|
...state.rowConfig,
|
|
@@ -35,7 +35,7 @@ var EditInput = defineComponent({
|
|
|
35
35
|
const {
|
|
36
36
|
formRef
|
|
37
37
|
} = useCommon(props, attrs);
|
|
38
|
-
const __value = ref(attrs.value);
|
|
38
|
+
const __value = ref(props.type === "number" ? attrs.value || void 0 : attrs.value);
|
|
39
39
|
const commData = {
|
|
40
40
|
row: props.row,
|
|
41
41
|
column: props.col,
|
|
@@ -38,6 +38,7 @@ var EditTime = defineComponent({
|
|
|
38
38
|
} = useCommon(props, attrs);
|
|
39
39
|
const __value = ref(attrs.formattedValue);
|
|
40
40
|
const onConfirm = (value) => {
|
|
41
|
+
__value.value = value;
|
|
41
42
|
emit("formChange", {
|
|
42
43
|
value,
|
|
43
44
|
row: props.row,
|
|
@@ -58,7 +59,7 @@ var EditTime = defineComponent({
|
|
|
58
59
|
const strInsert = (str2, length) => {
|
|
59
60
|
const reg = new RegExp("\\w{1," + length + "}", "g");
|
|
60
61
|
const ma = str2.match(reg);
|
|
61
|
-
return ma.join(":");
|
|
62
|
+
return ma == null ? void 0 : ma.join(":");
|
|
62
63
|
};
|
|
63
64
|
const result = valueFormat.includes(":") ? strInsert(str, 2) : str;
|
|
64
65
|
return result;
|
|
@@ -79,12 +80,14 @@ var EditTime = defineComponent({
|
|
|
79
80
|
}
|
|
80
81
|
return false;
|
|
81
82
|
};
|
|
83
|
+
const isTime = (curTime) => {
|
|
84
|
+
const arr = curTime.split(":");
|
|
85
|
+
return +arr[0] * 60 * 60 + +arr[1] * 60 + (arr[3] ? +arr[3] : 0) < 24 * 60 * 60;
|
|
86
|
+
};
|
|
82
87
|
if (!isValid(time)) {
|
|
83
88
|
if (!isNaN(time) && (/^\d{4}$/.test(time) || /^\d{6}$/.test(time))) {
|
|
84
89
|
const curTime = getFormatTime(time);
|
|
85
|
-
|
|
86
|
-
time = curTime;
|
|
87
|
-
}
|
|
90
|
+
time = isValid(curTime) && isTime(curTime) ? curTime : "";
|
|
88
91
|
} else {
|
|
89
92
|
time = "";
|
|
90
93
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
2
|
+
export declare const useCommon: (props: AnyObject, attrs: AnyObject, isTriggerClick?: boolean) => {
|
|
2
3
|
formRef: import("vue").Ref<HTMLElement | null>;
|
|
3
4
|
isShow: import("vue").Ref<boolean>;
|
|
4
5
|
};
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { ref, onMounted } from 'vue';
|
|
2
2
|
|
|
3
|
-
const useCommon = (props, attrs) => {
|
|
3
|
+
const useCommon = (props, attrs, isTriggerClick = false) => {
|
|
4
4
|
const formRef = ref(null);
|
|
5
5
|
const isShow = ref(false);
|
|
6
6
|
onMounted(() => {
|
|
7
|
-
var _a;
|
|
7
|
+
var _a, _b, _c;
|
|
8
8
|
if (attrs.editTrigger !== "manual") {
|
|
9
|
-
(
|
|
9
|
+
if (isTriggerClick) {
|
|
10
|
+
(_b = (_a = formRef.value) == null ? void 0 : _a.handleTriggerClick) == null ? void 0 : _b.call(_a);
|
|
11
|
+
} else {
|
|
12
|
+
(_c = formRef.value) == null ? void 0 : _c.focus();
|
|
13
|
+
}
|
|
10
14
|
isShow.value = true;
|
|
11
15
|
}
|
|
12
16
|
});
|
|
@@ -60,6 +60,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
60
60
|
default: string;
|
|
61
61
|
type: StringConstructor;
|
|
62
62
|
};
|
|
63
|
+
btnprint: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
63
67
|
}, {
|
|
64
68
|
$message: import("naive-ui").MessageApi;
|
|
65
69
|
printInstance: any;
|
|
@@ -122,6 +126,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
122
126
|
default: string;
|
|
123
127
|
type: StringConstructor;
|
|
124
128
|
};
|
|
129
|
+
btnprint: {
|
|
130
|
+
type: StringConstructor;
|
|
131
|
+
default: string;
|
|
132
|
+
};
|
|
125
133
|
}>> & {
|
|
126
134
|
onError?: ((...args: any[]) => any) | undefined;
|
|
127
135
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
@@ -1869,6 +1877,10 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1869
1877
|
default: string;
|
|
1870
1878
|
type: StringConstructor;
|
|
1871
1879
|
};
|
|
1880
|
+
btnprint: {
|
|
1881
|
+
type: StringConstructor;
|
|
1882
|
+
default: string;
|
|
1883
|
+
};
|
|
1872
1884
|
}>> & {
|
|
1873
1885
|
onError?: ((...args: any[]) => any) | undefined;
|
|
1874
1886
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
@@ -1887,5 +1899,6 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1887
1899
|
clickPrevFn: Function;
|
|
1888
1900
|
noDataMsg: string;
|
|
1889
1901
|
printdlgshow: string;
|
|
1902
|
+
btnprint: string;
|
|
1890
1903
|
}>>;
|
|
1891
1904
|
export default ButtonPrint;
|
|
@@ -61,6 +61,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
default: string;
|
|
62
62
|
type: StringConstructor;
|
|
63
63
|
};
|
|
64
|
+
btnprint: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
64
68
|
}, {
|
|
65
69
|
$message: import("naive-ui").MessageApi;
|
|
66
70
|
printInstance: any;
|
|
@@ -126,6 +130,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
126
130
|
default: string;
|
|
127
131
|
type: StringConstructor;
|
|
128
132
|
};
|
|
133
|
+
btnprint: {
|
|
134
|
+
type: StringConstructor;
|
|
135
|
+
default: string;
|
|
136
|
+
};
|
|
129
137
|
}>> & {
|
|
130
138
|
onError?: ((...args: any[]) => any) | undefined;
|
|
131
139
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
@@ -1876,6 +1884,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1876
1884
|
default: string;
|
|
1877
1885
|
type: StringConstructor;
|
|
1878
1886
|
};
|
|
1887
|
+
btnprint: {
|
|
1888
|
+
type: StringConstructor;
|
|
1889
|
+
default: string;
|
|
1890
|
+
};
|
|
1879
1891
|
}>> & {
|
|
1880
1892
|
onError?: ((...args: any[]) => any) | undefined;
|
|
1881
1893
|
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
@@ -1894,5 +1906,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1894
1906
|
clickPrevFn: Function;
|
|
1895
1907
|
noDataMsg: string;
|
|
1896
1908
|
printdlgshow: string;
|
|
1909
|
+
btnprint: string;
|
|
1897
1910
|
}>;
|
|
1898
1911
|
export default _default;
|
|
@@ -67,6 +67,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
printdlgshow: {
|
|
68
68
|
default: "0",
|
|
69
69
|
type: String
|
|
70
|
+
},
|
|
71
|
+
btnprint: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "1"
|
|
70
74
|
}
|
|
71
75
|
},
|
|
72
76
|
emits: ["success", "error", "clickoutside"],
|
|
@@ -222,7 +226,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
222
226
|
const queryParams = {
|
|
223
227
|
formatId: state.currentFormatId,
|
|
224
228
|
templateId: getTemplateIdByFormatId.value,
|
|
225
|
-
params
|
|
229
|
+
params,
|
|
230
|
+
btnprint: props.btnprint
|
|
226
231
|
};
|
|
227
232
|
printInstance.preview(queryParams, (res) => {
|
|
228
233
|
callLocalServicesSuccessCb(res, "preview");
|
|
@@ -33,10 +33,10 @@ export declare class Print {
|
|
|
33
33
|
pageCount: any;
|
|
34
34
|
formatId: string;
|
|
35
35
|
};
|
|
36
|
-
_handleEventDirect({ templateId, formatId, params, cmdid, print, printdlgshow, nobillnode }: AnyObject): Promise<any>;
|
|
36
|
+
_handleEventDirect({ templateId, formatId, params, cmdid, print, printdlgshow, nobillnode, btnprint }: AnyObject): Promise<any>;
|
|
37
37
|
_handleEventEditFormat({ templateId, formatId, params, token }: AnyObject): Promise<any>;
|
|
38
38
|
_queryPrintFile(formatId: string, params?: string): Promise<any>;
|
|
39
|
-
preview({ templateId, formatId, params }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<any>;
|
|
39
|
+
preview({ templateId, formatId, params, btnprint }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<any>;
|
|
40
40
|
printDirect({ templateId, formatId, params, print, printdlgshow, nobillnode }: AnyObject, successCallbackFn: Func, errorCallbackFn: Func, mode?: string): Promise<any>;
|
|
41
41
|
private _downloadPDF;
|
|
42
42
|
/**
|
|
@@ -197,7 +197,8 @@ class Print {
|
|
|
197
197
|
cmdid,
|
|
198
198
|
print,
|
|
199
199
|
printdlgshow = "1",
|
|
200
|
-
nobillnode = "1"
|
|
200
|
+
nobillnode = "1",
|
|
201
|
+
btnprint = "1"
|
|
201
202
|
}) {
|
|
202
203
|
const queryParams = {
|
|
203
204
|
templateId,
|
|
@@ -205,7 +206,8 @@ class Print {
|
|
|
205
206
|
params,
|
|
206
207
|
cmdid,
|
|
207
208
|
nobillnode,
|
|
208
|
-
printdlgshow
|
|
209
|
+
printdlgshow,
|
|
210
|
+
btnprint
|
|
209
211
|
};
|
|
210
212
|
if (print) {
|
|
211
213
|
try {
|
|
@@ -245,7 +247,7 @@ class Print {
|
|
|
245
247
|
}) || {};
|
|
246
248
|
return data;
|
|
247
249
|
}
|
|
248
|
-
async preview({ templateId, formatId, params = "" }, successCallbackFn, errorCallbackFn) {
|
|
250
|
+
async preview({ templateId, formatId, params = "", btnprint }, successCallbackFn, errorCallbackFn) {
|
|
249
251
|
if (isIReport(formatId)) {
|
|
250
252
|
const data = await this._queryPrintFile(formatId, params);
|
|
251
253
|
if (!data)
|
|
@@ -264,7 +266,8 @@ class Print {
|
|
|
264
266
|
templateId,
|
|
265
267
|
formatId,
|
|
266
268
|
params,
|
|
267
|
-
cmdid: PREVIEW_CMD_ID
|
|
269
|
+
cmdid: PREVIEW_CMD_ID,
|
|
270
|
+
btnprint
|
|
268
271
|
});
|
|
269
272
|
if (!result)
|
|
270
273
|
return false;
|