cnhis-design-vue 3.1.52-release.2 → 3.1.52-release.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.
- package/README.md +87 -87
- package/es/components/button-print/src/utils/print.d.ts +3 -3
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +45 -41
- package/es/components/classification/index.d.ts +0 -2
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +0 -2
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +0 -2
- package/es/components/classification/src/index.vue.d.ts +0 -2
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +2 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +74 -74
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +37 -37
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +37 -37
- package/es/components/form-render/index.d.ts +37 -37
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +37 -37
- package/es/components/form-render/src/components/renderer/date.d.ts +16 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/iho-table/index.d.ts +8 -4
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -4
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
- package/es/components/iho-table/src/plugins/copyPastePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/copyPastePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/forceArrowKeyPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -7
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +16 -12
- package/es/components/iho-table/src/utils/index.d.ts +2 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +75 -75
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +38 -38
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +37 -37
- package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +37 -37
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/components/table-filter/index.d.ts +2 -0
- package/es/components/table-filter/index.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +0 -2
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +0 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +0 -2
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +0 -2
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/package.json.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/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
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.FAQ
|
|
65
|
-
|
|
66
|
-
### 3.1 项目打包后样式丢失
|
|
67
|
-
|
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
// vite.config.ts
|
|
72
|
-
import { defineConfig } from 'vite';
|
|
73
|
-
|
|
74
|
-
export default defineConfig({
|
|
75
|
-
build: {
|
|
76
|
-
rollupOptions: {
|
|
77
|
-
// ..otherOptions
|
|
78
|
-
output: {
|
|
79
|
-
dir: './dist',
|
|
80
|
-
manualChunks: {
|
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
```
|
|
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.FAQ
|
|
65
|
+
|
|
66
|
+
### 3.1 项目打包后样式丢失
|
|
67
|
+
|
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// vite.config.ts
|
|
72
|
+
import { defineConfig } from 'vite';
|
|
73
|
+
|
|
74
|
+
export default defineConfig({
|
|
75
|
+
build: {
|
|
76
|
+
rollupOptions: {
|
|
77
|
+
// ..otherOptions
|
|
78
|
+
output: {
|
|
79
|
+
dir: './dist',
|
|
80
|
+
manualChunks: {
|
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
```
|
|
@@ -40,13 +40,13 @@ export declare class Print {
|
|
|
40
40
|
pageCount: any;
|
|
41
41
|
formatId: string;
|
|
42
42
|
};
|
|
43
|
-
_handleEventDirect({ templateId, formatId, params, cmdid, print, printdlgshow, nobillnode, btnprint, messageTimeout }: AnyObject): Promise<any>;
|
|
43
|
+
_handleEventDirect({ templateId, formatId, params, cmdid, print, signature, printdlgshow, nobillnode, btnprint, messageTimeout }: AnyObject): Promise<any>;
|
|
44
44
|
_handleEventEditFormat({ templateId, formatId, params, token, messageTimeout }: AnyObject): Promise<any>;
|
|
45
45
|
_queryProxyOrigin(): Promise<void>;
|
|
46
46
|
_queryPrintFile(formatId: string, params?: string): Promise<any>;
|
|
47
47
|
_browserPrint(result: AnyObject, mode: string): Promise<string | void>;
|
|
48
|
-
preview({ templateId, formatId, params, btnprint, messageTimeout }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<any>;
|
|
49
|
-
printDirect({ templateId, formatId, params, print, printdlgshow, nobillnode, isDownloadFile, messageTimeout }: AnyObject, successCallbackFn: Func, errorCallbackFn: Func, mode?: string): Promise<any>;
|
|
48
|
+
preview({ templateId, formatId, params, signature, btnprint, messageTimeout }: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<any>;
|
|
49
|
+
printDirect({ templateId, formatId, params, print, signature, printdlgshow, nobillnode, isDownloadFile, messageTimeout }: AnyObject, successCallbackFn: Func, errorCallbackFn: Func, mode?: string): Promise<any>;
|
|
50
50
|
private _downloadPDF;
|
|
51
51
|
/**
|
|
52
52
|
* 下载pdf
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as n,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";const h=t.create({timeout:1e3,withCredentials:!1}),m=`${window.location.protocol}//${window.location.host}`,c=`${m}/fdp-api/print/assembly/printIReport`,u=`${m}/bi-api/reprot/print/open/client/getRemote`,p=`${m}/printService/file`;let w=null;class f{constructor(){var t,e,n;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],w)return w;w=this;const r=window;this.CMonitor=r.$CMonitor;try{this.webview=r.top?null==(t=r.top.chrome)?void 0:t.webview:null==(e=r.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(n=r.chrome)?void 0:n.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:n}=e;try{s(i.res||"")}catch(t){n(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{h({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const s={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(s),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,n){const r={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(r);return this._handleQueryPrintDataResult(a,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:s,print:n,printdlgshow:r="0",nobillnode:a="1",btnprint:o="1",messageTimeout:l=0}){const h={templateId:t,formatId:e,params:i,cmdid:s,nobillnode:a,printdlgshow:r,btnprint:o,messageTimeout:l};if(n){try{n=JSON.parse(n)}catch(t){}h.print=n}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");h.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(h)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:n=0}){const r={};let a={};try{a=Object.assign({},r,JSON.parse(i))}catch(t){a=r}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:n};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await h({method:"get",url:u})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=m+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await h({method:"post",url:c,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await n(`${p}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:s,messageTimeout:n=0},l,d){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==d?void 0:d("获取文件失败!");const s=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,s),void(null==l||l({file:t}))}await this._queryProxyOrigin();const h=await this._testConnection();if(!this._handleResultTest(h,d))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:s,messageTimeout:n}),a=this._handleResult(r,d);if(!a)return!1;if(this.isRemote){const t=await this._browserPrint(a,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}null==l||l(a)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==d||d(i),this._handleMonitorNotify(i)}}async printDirect({templateId:t,formatId:e,params:i="",print:s,printdlgshow:n,nobillnode:o,isDownloadFile:l=!0,messageTimeout:d=0},h,m,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==h||h({file:t}))):null==m?void 0:m("获取文件失败!")}await this._queryProxyOrigin();const u=await this._testConnection();if(!this._handleResultTest(u,m))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:s,printdlgshow:n,nobillnode:o,messageTimeout:d}),a=this._handleResult(r,m);if(!a)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(a,c),null==h||h(a)}catch(t){const e="printDirect"===c?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==m||m(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):h.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=d(new Date,"yyyy-MM-dd"),i=l(),s=d(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}this.printDirect(t,(async n=>{if(n||s(null),a(t.formatId))return i(n);const r=this,o=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(n.filedir);i(o,n)}),(t=>s(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,r);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,r);if(!l)return!1;n&&n(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,r);return!!o&&(n&&n(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,n);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n=0},r,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n}),d=this._handleResult(l,a);if(!d)return!1;r&&r(d)}async addPrintFormat({templateId:t,params:e,token:i},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,n);if(!o)return!1;s&&s(o)}}export{f as Print};
|
|
1
|
+
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as n,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as d}from"date-fns";const h=t.create({timeout:1e3,withCredentials:!1}),m=`${window.location.protocol}//${window.location.host}`,u=`${m}/fdp-api/print/assembly/printIReport`,c=`${m}/bi-api/reprot/print/open/client/getRemote`,p=`${m}/printService/file`;let w=null;class f{constructor(){var t,e,n;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],w)return w;w=this;const r=window;this.CMonitor=r.$CMonitor;try{this.webview=r.top?null==(t=r.top.chrome)?void 0:t.webview:null==(e=r.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(n=r.chrome)?void 0:n.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:n}=e;try{s(i.res||"")}catch(t){n(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{h({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):h({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const s={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(s),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,n){const r={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(r);return this._handleQueryPrintDataResult(a,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:s,print:n,signature:r,printdlgshow:a="0",nobillnode:o="1",btnprint:l="1",messageTimeout:h=0}){const m={templateId:t,formatId:e,params:i,cmdid:s,nobillnode:o,printdlgshow:a,btnprint:l,messageTimeout:h,...r?{signature:r}:{}};if(n){try{n=JSON.parse(n)}catch(t){}m.print=n}else if(this.isRemote){const t=d(new Date,"yyyyMMddHHmmss");m.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(m)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:n=0}){const r={};let a={};try{a=Object.assign({},r,JSON.parse(i))}catch(t){a=r}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:n};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await h({method:"get",url:c})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=m+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await h({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await n(`${p}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",signature:s,btnprint:n,messageTimeout:l=0},d,h){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==h?void 0:h("获取文件失败!");const s=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,s),void(null==d||d({file:t}))}await this._queryProxyOrigin();const m=await this._testConnection();if(!this._handleResultTest(m,h))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",signature:s,btnprint:n,messageTimeout:l}),a=this._handleResult(r,h);if(!a)return!1;if(this.isRemote){const t=await this._browserPrint(a,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}null==d||d(a)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==h||h(i),this._handleMonitorNotify(i)}}async printDirect({templateId:t,formatId:e,params:i="",print:s,signature:n,printdlgshow:o,nobillnode:l,isDownloadFile:d=!0,messageTimeout:h=0},m,u,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==m||m({file:t}))):null==u?void 0:u("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,u))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:s,signature:n,printdlgshow:o,nobillnode:l,messageTimeout:h}),a=this._handleResult(r,u);if(!a)return!1;d&&["downloadPDF"].includes(c)&&await this._browserPrint(a,c),null==m||m(a)}catch(t){const e="printDirect"===c?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==u||u(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):h.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=d(new Date,"yyyy-MM-dd"),i=l(),s=d(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}this.printDirect(t,(async n=>{if(n||s(null),a(t.formatId))return i(n);const r=this,o=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(n.filedir);i(o,n)}),(t=>s(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,r);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,r);if(!l)return!1;n&&n(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},n,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,r);return!!o&&(n&&n(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,n);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n=0},r,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:n}),d=this._handleResult(l,a);if(!d)return!1;r&&r(d)}async addPrintFormat({templateId:t,params:e,token:i},s,n){const r=await this._testConnection();if(!this._handleResultTest(r,n))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,n);if(!o)return!1;s&&s(o)}}export{f as Print};
|
|
@@ -323,7 +323,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
323
323
|
syncBarPosition: import("../../../..").Func<any[], any>;
|
|
324
324
|
} | undefined>;
|
|
325
325
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
326
|
-
updateAnchorList: (field: import("
|
|
326
|
+
updateAnchorList: (field: import("@formily/core").GeneralField) => void;
|
|
327
327
|
anchorIdList: import("vue").Ref<{
|
|
328
328
|
name: string;
|
|
329
329
|
title: string;
|
|
@@ -340,12 +340,12 @@ export declare const CallbackMaps: Map<string, {
|
|
|
340
340
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../..").AnyObject | undefined): import("../../../..").AnyObject[];
|
|
341
341
|
afterOptionInit(fieldKey: string, options: import("../../../..").AnyObject[], payload?: import("../../../..").AnyObject | undefined): void;
|
|
342
342
|
}>>[T]>>;
|
|
343
|
-
triggerAutoHidden: (field: import("
|
|
344
|
-
observeFormGraph: Record<string, import("
|
|
345
|
-
setGraph: (field: import("
|
|
346
|
-
removeGraph: (field: import("
|
|
347
|
-
lowCodeEventTrigger: (field: import("
|
|
348
|
-
formModel: import("
|
|
343
|
+
triggerAutoHidden: (field: import("@formily/core").GeneralField) => Promise<void>;
|
|
344
|
+
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
345
|
+
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
346
|
+
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
347
|
+
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
348
|
+
formModel: import("@formily/core").Form<{
|
|
349
349
|
[x: string]: any;
|
|
350
350
|
}>;
|
|
351
351
|
lowCodeReactionsHandler: (field: string) => void;
|
|
@@ -560,12 +560,12 @@ export declare const CallbackMaps: Map<string, {
|
|
|
560
560
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
561
561
|
clearSpan: (uuid: string) => void;
|
|
562
562
|
exposeEvent: {
|
|
563
|
-
validate(path?: string | ((field: import("
|
|
563
|
+
validate(path?: string | ((field: import("@formily/core").Field<any, any, any, any>) => boolean), { force }?: {
|
|
564
564
|
force?: boolean | undefined;
|
|
565
565
|
}): Promise<void>;
|
|
566
566
|
getFormValues(needCombineExtendKey?: boolean): any;
|
|
567
567
|
setFormValues(values: import("../../../..").AnyObject, needSplitExtendKey?: boolean, overwrite?: boolean): void;
|
|
568
|
-
setFieldState(path: string, setter: (field: Partial<Pick<import("
|
|
568
|
+
setFieldState(path: string, setter: (field: Partial<Pick<import("@formily/core").Field<any, any, any, any>, import("@formily/core").NonFunctionPropertyNames<{
|
|
569
569
|
match: (pattern: import("@formily/path").Pattern) => boolean;
|
|
570
570
|
validate: (triggerType?: import("@formily/validator").ValidatorTriggerType | undefined) => any;
|
|
571
571
|
data: any;
|
|
@@ -578,22 +578,22 @@ export declare const CallbackMaps: Map<string, {
|
|
|
578
578
|
onBlur: (...args: any[]) => Promise<void>;
|
|
579
579
|
onInput: (...args: any[]) => Promise<void>;
|
|
580
580
|
editable: boolean;
|
|
581
|
-
reset: (options?: import("
|
|
581
|
+
reset: (options?: import("@formily/core").IFieldResetOptions | undefined) => Promise<void>;
|
|
582
582
|
title: string;
|
|
583
583
|
visible: boolean;
|
|
584
584
|
submit: <T_1>(onSubmit?: ((values: any) => void | Promise<T_1>) | undefined) => Promise<T_1>;
|
|
585
|
-
validator: import("
|
|
586
|
-
pattern: import("
|
|
585
|
+
validator: import("@formily/core").FieldValidator;
|
|
586
|
+
pattern: import("@formily/core").FieldPatternTypes;
|
|
587
587
|
content: any;
|
|
588
|
-
display: import("
|
|
588
|
+
display: import("@formily/core").FieldDisplayTypes;
|
|
589
589
|
hidden: boolean;
|
|
590
|
-
form: import("
|
|
590
|
+
form: import("@formily/core").Form<any>;
|
|
591
591
|
componentProps: Record<string, any>;
|
|
592
592
|
decoratorProps: Record<string, any>;
|
|
593
593
|
description: string;
|
|
594
594
|
readOnly: boolean;
|
|
595
|
-
component: import("
|
|
596
|
-
decorator: import("
|
|
595
|
+
component: import("@formily/core").FieldComponent<any, any>;
|
|
596
|
+
decorator: import("@formily/core").FieldDecorator<any, any>;
|
|
597
597
|
validating: boolean;
|
|
598
598
|
submitting: boolean;
|
|
599
599
|
active: boolean;
|
|
@@ -602,27 +602,27 @@ export declare const CallbackMaps: Map<string, {
|
|
|
602
602
|
modified: boolean;
|
|
603
603
|
inputValue: string;
|
|
604
604
|
inputValues: any[];
|
|
605
|
-
dataSource: import("
|
|
606
|
-
feedbacks: import("
|
|
607
|
-
caches: import("
|
|
608
|
-
selfErrors: import("
|
|
609
|
-
readonly errors: import("
|
|
610
|
-
selfWarnings: import("
|
|
611
|
-
readonly warnings: import("
|
|
612
|
-
selfSuccesses: import("
|
|
613
|
-
readonly successes: import("
|
|
605
|
+
dataSource: import("@formily/core").FieldDataSource;
|
|
606
|
+
feedbacks: import("@formily/core").IFieldFeedback[];
|
|
607
|
+
caches: import("@formily/core").IFieldCaches;
|
|
608
|
+
selfErrors: import("@formily/core").FeedbackMessage;
|
|
609
|
+
readonly errors: import("@formily/core").IFormFeedback[];
|
|
610
|
+
selfWarnings: import("@formily/core").FeedbackMessage;
|
|
611
|
+
readonly warnings: import("@formily/core").IFormFeedback[];
|
|
612
|
+
selfSuccesses: import("@formily/core").FeedbackMessage;
|
|
613
|
+
readonly successes: import("@formily/core").IFormFeedback[];
|
|
614
614
|
readonly selfValid: boolean;
|
|
615
615
|
readonly valid: boolean;
|
|
616
616
|
readonly selfInvalid: boolean;
|
|
617
617
|
readonly invalid: boolean;
|
|
618
618
|
initialValue: string;
|
|
619
619
|
readonly validateStatus: "error" | "success" | "warning" | "validating";
|
|
620
|
-
setDataSource: (dataSource?: import("
|
|
621
|
-
setFeedback: (feedback?: import("
|
|
622
|
-
setSelfErrors: (messages?: import("
|
|
623
|
-
setSelfWarnings: (messages?: import("
|
|
624
|
-
setSelfSuccesses: (messages?: import("
|
|
625
|
-
setValidator: (validator?: import("
|
|
620
|
+
setDataSource: (dataSource?: import("@formily/core").FieldDataSource | undefined) => void;
|
|
621
|
+
setFeedback: (feedback?: import("@formily/core").IFieldFeedback | undefined) => void;
|
|
622
|
+
setSelfErrors: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
|
|
623
|
+
setSelfWarnings: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
|
|
624
|
+
setSelfSuccesses: (messages?: import("@formily/core").FeedbackMessage | undefined) => void;
|
|
625
|
+
setValidator: (validator?: import("@formily/core").FieldValidator | undefined) => void;
|
|
626
626
|
setValidatorRule: (name: string, value: any) => void;
|
|
627
627
|
setRequired: (required?: boolean | undefined) => void;
|
|
628
628
|
setValue: (value?: string | undefined) => void;
|
|
@@ -630,7 +630,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
630
630
|
setLoading: (loading?: boolean | undefined) => void;
|
|
631
631
|
setValidating: (validating?: boolean | undefined) => void;
|
|
632
632
|
setSubmitting: (submitting?: boolean | undefined) => void;
|
|
633
|
-
queryFeedbacks: (search?: import("
|
|
633
|
+
queryFeedbacks: (search?: import("@formily/core").ISearchFeedback | undefined) => import("@formily/core").IFieldFeedback[];
|
|
634
634
|
modify: () => void;
|
|
635
635
|
initialized: boolean;
|
|
636
636
|
mounted: boolean;
|
|
@@ -639,13 +639,13 @@ export declare const CallbackMaps: Map<string, {
|
|
|
639
639
|
componentType: any;
|
|
640
640
|
designable: boolean;
|
|
641
641
|
locate: (address: import("@formily/path").Pattern) => void;
|
|
642
|
-
readonly parent: import("
|
|
642
|
+
readonly parent: import("@formily/core").GeneralField;
|
|
643
643
|
readPretty: boolean;
|
|
644
644
|
readonly destroyed: boolean;
|
|
645
645
|
setTitle: (title?: string | undefined) => void;
|
|
646
646
|
setDescription: (description?: string | undefined) => void;
|
|
647
|
-
setDisplay: (type?: import("
|
|
648
|
-
setPattern: (type?: import("
|
|
647
|
+
setDisplay: (type?: import("@formily/core").FieldDisplayTypes | undefined) => void;
|
|
648
|
+
setPattern: (type?: import("@formily/core").FieldPatternTypes | undefined) => void;
|
|
649
649
|
setComponent: <C extends unknown, ComponentProps extends object = {}>(component?: C | undefined, props?: ComponentProps | undefined) => void;
|
|
650
650
|
setComponentProps: <ComponentProps_1 extends object = {}>(props?: ComponentProps_1 | undefined) => void;
|
|
651
651
|
setDecorator: <D extends unknown, ComponentProps_2 extends object = {}>(component?: D | undefined, props?: ComponentProps_2 | undefined) => void;
|
|
@@ -655,8 +655,8 @@ export declare const CallbackMaps: Map<string, {
|
|
|
655
655
|
onInit: () => void;
|
|
656
656
|
onMount: () => void;
|
|
657
657
|
onUnmount: () => void;
|
|
658
|
-
query: (pattern: import("@formily/path").Pattern) => import("
|
|
659
|
-
notify: (type: import("
|
|
658
|
+
query: (pattern: import("@formily/path").Pattern) => import("@formily/core").Query;
|
|
659
|
+
notify: (type: import("@formily/core").LifeCycleTypes, payload?: any) => void;
|
|
660
660
|
dispose: () => void;
|
|
661
661
|
destroy: (forceClear?: boolean | undefined) => void;
|
|
662
662
|
}>>>) => void): void;
|
|
@@ -2776,6 +2776,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
2776
2776
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
2777
2777
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
2778
2778
|
}) => boolean) | undefined;
|
|
2779
|
+
forceArrowKey?: boolean | undefined;
|
|
2779
2780
|
} | undefined;
|
|
2780
2781
|
clipConfig?: {
|
|
2781
2782
|
isCopy?: boolean | undefined;
|
|
@@ -3017,10 +3018,11 @@ export declare const CallbackMaps: Map<string, {
|
|
|
3017
3018
|
isTree?: import("../../../..").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
3018
3019
|
isBatchSelect?: import("../../../..").MaybeString<0 | 1> | undefined;
|
|
3019
3020
|
isSingleSelect?: import("../../../..").MaybeString<0 | 1> | undefined;
|
|
3020
|
-
|
|
3021
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
3022
|
+
rowDraggable?: boolean | undefined;
|
|
3021
3023
|
showSeq?: boolean | undefined;
|
|
3022
3024
|
forceClearable?: boolean | undefined;
|
|
3023
|
-
|
|
3025
|
+
hideSettingBtn?: import("../../../..").MaybeString<0 | 1> | undefined;
|
|
3024
3026
|
rowGroupSetting?: {
|
|
3025
3027
|
firstRowGroup?: {
|
|
3026
3028
|
groupName?: string | undefined;
|
|
@@ -5277,6 +5279,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
5277
5279
|
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
5278
5280
|
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
5279
5281
|
}) => boolean) | undefined;
|
|
5282
|
+
forceArrowKey?: boolean | undefined;
|
|
5280
5283
|
} | undefined;
|
|
5281
5284
|
clipConfig?: {
|
|
5282
5285
|
isCopy?: boolean | undefined;
|
|
@@ -5458,10 +5461,11 @@ export declare const CallbackMaps: Map<string, {
|
|
|
5458
5461
|
isTree?: import("../../../..").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
5459
5462
|
isBatchSelect?: import("../../../..").MaybeString<0 | 1> | undefined;
|
|
5460
5463
|
isSingleSelect?: import("../../../..").MaybeString<0 | 1> | undefined;
|
|
5461
|
-
|
|
5464
|
+
selectType?: "checkbox" | "radio" | null | undefined;
|
|
5465
|
+
rowDraggable?: boolean | undefined;
|
|
5462
5466
|
showSeq?: boolean | undefined;
|
|
5463
5467
|
forceClearable?: boolean | undefined;
|
|
5464
|
-
|
|
5468
|
+
hideSettingBtn?: import("../../../..").MaybeString<0 | 1> | undefined;
|
|
5465
5469
|
rowGroupSetting?: {
|
|
5466
5470
|
firstRowGroup?: {
|
|
5467
5471
|
groupName?: string | undefined;
|
|
@@ -789,7 +789,6 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
789
789
|
label: string;
|
|
790
790
|
value: string;
|
|
791
791
|
}[]>;
|
|
792
|
-
initMounted: () => void;
|
|
793
792
|
isDateDisabled: (ts: number) => boolean;
|
|
794
793
|
timeDisabled: (ts: number) => {
|
|
795
794
|
isHourDisabled(hour: number): boolean | undefined;
|
|
@@ -1408,7 +1407,6 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1408
1407
|
value: string;
|
|
1409
1408
|
}[]>;
|
|
1410
1409
|
presetValCp: import("vue").WritableComputedRef<string>;
|
|
1411
|
-
initMounted: () => void;
|
|
1412
1410
|
handleChange: (val: any, type: "end" | "start") => void;
|
|
1413
1411
|
isStartDateDisabled: (ts: number) => boolean;
|
|
1414
1412
|
timeStartDisabled: (ts: number) => {
|
|
@@ -266,7 +266,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
266
266
|
label: string;
|
|
267
267
|
value: string;
|
|
268
268
|
}[]>;
|
|
269
|
-
initMounted: () => void;
|
|
270
269
|
isDateDisabled: (ts: number) => boolean;
|
|
271
270
|
timeDisabled: (ts: number) => {
|
|
272
271
|
isHourDisabled(hour: number): boolean | undefined;
|
|
@@ -885,7 +884,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
885
884
|
value: string;
|
|
886
885
|
}[]>;
|
|
887
886
|
presetValCp: import("vue").WritableComputedRef<string>;
|
|
888
|
-
initMounted: () => void;
|
|
889
887
|
handleChange: (val: any, type: "end" | "start") => void;
|
|
890
888
|
isStartDateDisabled: (ts: number) => boolean;
|
|
891
889
|
timeStartDisabled: (ts: number) => {
|
|
@@ -576,7 +576,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
576
576
|
label: string;
|
|
577
577
|
value: string;
|
|
578
578
|
}[]>;
|
|
579
|
-
initMounted: () => void;
|
|
580
579
|
isDateDisabled: (ts: number) => boolean;
|
|
581
580
|
timeDisabled: (ts: number) => {
|
|
582
581
|
isHourDisabled(hour: number): boolean | undefined;
|
|
@@ -1195,7 +1194,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1195
1194
|
value: string;
|
|
1196
1195
|
}[]>;
|
|
1197
1196
|
presetValCp: import("vue").WritableComputedRef<string>;
|
|
1198
|
-
initMounted: () => void;
|
|
1199
1197
|
handleChange: (val: any, type: "end" | "start") => void;
|
|
1200
1198
|
isStartDateDisabled: (ts: number) => boolean;
|
|
1201
1199
|
timeStartDisabled: (ts: number) => {
|
|
@@ -790,7 +790,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
790
790
|
label: string;
|
|
791
791
|
value: string;
|
|
792
792
|
}[]>;
|
|
793
|
-
initMounted: () => void;
|
|
794
793
|
isDateDisabled: (ts: number) => boolean;
|
|
795
794
|
timeDisabled: (ts: number) => {
|
|
796
795
|
isHourDisabled(hour: number): boolean | undefined;
|
|
@@ -1409,7 +1408,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1409
1408
|
value: string;
|
|
1410
1409
|
}[]>;
|
|
1411
1410
|
presetValCp: import("vue").WritableComputedRef<string>;
|
|
1412
|
-
initMounted: () => void;
|
|
1413
1411
|
handleChange: (val: any, type: "end" | "start") => void;
|
|
1414
1412
|
isStartDateDisabled: (ts: number) => boolean;
|
|
1415
1413
|
timeStartDisabled: (ts: number) => {
|